@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #f4f7fb;
  --bg-accent: #edf4fc;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --line: rgba(203, 213, 225, 0.82);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #0f172a;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --sky: #0284c7;
  --sky-soft: rgba(14, 165, 233, 0.1);
  --pink: #ec4899;
  --pink-soft: rgba(236, 72, 153, 0.1);
  --green: #16a34a;
  --green-soft: rgba(34, 197, 94, 0.12);
  --red: #dc2626;
  --red-soft: rgba(248, 113, 113, 0.12);
  --shadow-soft: 0 12px 36px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 24px 70px rgba(15, 23, 42, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background-color: #f5f8fc;
  background-image:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.98), transparent 42%),
    radial-gradient(circle at bottom center, rgba(226, 236, 248, 0.72), transparent 48%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

code {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--sky);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.auth-screen {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  padding: 118px 16px 48px;
}

.auth-screen-inner {
  width: 100%;
  max-width: 450px;
}

.login-brand {
  text-align: center;
}

.login-brand h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: #334155;
}

.brand-accent {
  background: linear-gradient(135deg, #5b8ef6, #ef6ab4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.brand-tooth {
  display: inline-block;
  margin-left: 2px;
  filter: saturate(0.78);
}

.login-brand p {
  margin: 10px 0 0;
  color: #7c8aa5;
  font-size: 0.98rem;
}

.login-card {
  margin-top: 34px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(139, 164, 195, 0.2);
  overflow: hidden;
}

.login-card-head {
  padding: 26px 34px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.login-card-head h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
  color: #1e293b;
}

.login-card-body {
  padding: 30px 34px 12px;
}

.auth-hint {
  margin: 0 0 18px;
  color: #7c8aa5;
  font-size: 0.88rem;
  line-height: 1.65;
}

.auth-form {
  gap: 18px;
  margin-top: 0;
}

.auth-screen .field {
  gap: 10px;
}

.auth-screen .field span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.auth-screen .field input {
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dbe5f2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 2px 6px rgba(148, 163, 184, 0.12);
}

.auth-screen .field input:focus {
  transform: none;
  border-color: rgba(22, 135, 213, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(22, 135, 213, 0.08);
}

.auth-submit-btn {
  min-height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  background: #1487d7;
  border-color: #1487d7;
  box-shadow: 0 10px 24px rgba(20, 135, 215, 0.22);
}

.auth-submit-btn:hover {
  background: #0f7eca;
  box-shadow: 0 14px 28px rgba(20, 135, 215, 0.26);
}

.login-card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 34px 26px;
}

.text-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}

.text-link:hover {
  color: #1387d7;
}

.text-link.subtle {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  opacity: 0.9;
}

.admin-shell {
  min-height: 100vh;
}

.admin-topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.admin-topbar-inner {
  width: min(1100px, calc(100% - 36px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7da4ff, #f06eb1);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(240, 110, 177, 0.24);
}

.admin-topbar-brand strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-brand-emoji {
  font-size: 1rem;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(186, 230, 253, 0.9);
  background: rgba(240, 249, 255, 0.84);
  color: #0284c7;
  font-weight: 500;
}

.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.admin-icon-btn:hover {
  color: #64748b;
  transform: translateX(1px);
}

.admin-stage {
  width: min(1100px, calc(100% - 36px));
  margin: 40px auto 48px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.admin-section-head h1 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 400;
  color: #475569;
  letter-spacing: -0.03em;
}

.admin-section-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.98rem;
}

.admin-log-title {
  padding-top: 22px;
}

.admin-panel,
.admin-log-panel {
  margin-top: 14px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(139, 164, 195, 0.16);
  overflow: hidden;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 34px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  color: #1e293b;
  font-weight: 700;
}

.admin-panel-icon {
  font-size: 1rem;
}

.admin-panel-body {
  padding: 24px 34px 30px;
}

.admin-bind-form {
  margin-top: 0;
  gap: 18px;
}

.admin-shell .field {
  gap: 10px;
}

.admin-shell .field span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.admin-shell .field input {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #dbe5f2;
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 2px 6px rgba(148, 163, 184, 0.12);
}

.admin-shell .field input:focus {
  transform: none;
  border-color: rgba(22, 135, 213, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(22, 135, 213, 0.08);
}

.admin-primary-btn {
  min-height: 48px;
  margin-top: 8px;
  border-radius: 14px;
  background: #1487d7;
  border-color: #1487d7;
  box-shadow: 0 10px 24px rgba(20, 135, 215, 0.22);
}

.admin-primary-btn:hover {
  background: #0f7eca;
  border-color: #0f7eca;
}

.admin-inline-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.admin-inline-actions > * {
  flex: 1 1 0;
}

.admin-binding-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.admin-binding-status strong,
.admin-binding-status span {
  display: block;
}

.admin-binding-status strong {
  margin-bottom: 4px;
}

.admin-binding-status.is-bound {
  background: rgba(240, 253, 244, 0.92);
  border: 1px solid rgba(134, 239, 172, 0.8);
  color: #15803d;
}

.admin-binding-status.is-warning {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #64748b;
}

.admin-log-panel {
  min-height: 150px;
  padding: 18px;
  background: transparent;
  box-shadow: none;
}

.admin-log-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed rgba(203, 213, 225, 0.88);
  border-radius: 24px;
  color: #a0aec0;
  background: rgba(255, 255, 255, 0.34);
}

.admin-log-list {
  display: grid;
  gap: 14px;
}

.admin-log-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.12);
}

.admin-log-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-log-title-row strong {
  font-size: 1rem;
  color: #1e293b;
}

.admin-log-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(236, 253, 245, 0.96);
  color: #16a34a;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-log-line {
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
}

.admin-log-line:last-child {
  margin-bottom: 0;
}

.admin-log-line span {
  color: #94a3b8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-log-line strong {
  color: #334155;
  font-size: 0.92rem;
  word-break: break-word;
}

.admin-log-time {
  color: #94a3b8;
  font-size: 0.8rem;
  white-space: nowrap;
}

.user-shell {
  min-height: 100vh;
}

.user-topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.user-topbar-inner {
  width: min(980px, calc(100% - 72px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.user-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7da4ff, #f06eb1);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(240, 110, 177, 0.24);
}

.user-topbar-brand strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.user-brand-emoji {
  font-size: 1rem;
}

.user-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(186, 230, 253, 0.9);
  background: rgba(240, 249, 255, 0.84);
  color: #0284c7;
  font-weight: 500;
}

.user-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.user-icon-btn:hover {
  color: #64748b;
  transform: translateX(1px);
}

.user-stage {
  width: min(980px, calc(100% - 72px));
  margin: 44px auto 52px;
}

.user-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 30px;
  align-items: start;
}

.user-records-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.user-records-heading h1 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: #475569;
}

.user-records-desc {
  margin: 6px 0 0;
  color: #94a3b8;
}

.user-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #ec4899;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.user-create-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.38);
}

.user-empty-state {
  display: grid;
  place-items: center;
  min-height: 128px;
  border: 1px dashed rgba(203, 213, 225, 0.88);
  border-radius: 24px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.42);
}

.user-case-list {
  display: grid;
  gap: 14px;
}

.user-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 124px;
  padding: 22px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 14px 34px rgba(148, 163, 184, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.user-record-card:hover,
.user-record-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 20px 38px rgba(148, 163, 184, 0.12);
  outline: none;
}

.user-record-main h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #1e293b;
  font-weight: 700;
}

.user-record-main p {
  margin: 10px 0 0;
  font-size: 0.98rem;
  color: #7c8aa5;
  line-height: 1.55;
}

.user-record-side {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #94a3b8;
}

.user-record-side time {
  font-size: 0.88rem;
  color: #a3b1c5;
  white-space: nowrap;
}

.user-record-arrow {
  font-size: 1.38rem;
  line-height: 1;
  color: #9fb1c8;
}

.user-sidebar {
  position: sticky;
  top: 18px;
}

.user-order-card {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 58px rgba(139, 164, 195, 0.18);
  overflow: hidden;
}

.user-order-head {
  padding: 24px 32px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.user-order-head h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 700;
  color: #1e293b;
}

.user-order-body {
  padding: 24px 32px 32px;
}

.user-order-body > .guard-card {
  margin-top: 0;
}

.user-order-form {
  margin-top: 0;
  gap: 18px;
}

.user-order-form .field {
  gap: 10px;
}

.user-order-form .field span {
  font-size: 0.93rem;
  font-weight: 600;
  color: #475569;
}

.user-order-form .field input,
.user-order-form .field textarea {
  border-radius: 14px;
  border: 1px solid #dbe5f2;
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 2px 6px rgba(148, 163, 184, 0.12);
}

.user-order-form .field input:focus,
.user-order-form .field textarea:focus {
  transform: none;
  border-color: rgba(22, 135, 213, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(22, 135, 213, 0.08);
}

.user-order-form .field textarea {
  min-height: 84px;
}

.user-upload-field {
  display: grid;
  gap: 12px;
}

.user-upload-head {
  display: grid;
  gap: 10px;
}

.user-upload-label {
  font-size: 0.93rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.5;
}

.user-upload-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-upload-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.upload-target-tabs {
  display: inline-flex;
  gap: 4px;
  opacity: 0.82;
}

.upload-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(219, 234, 254, 0.72);
  background: rgba(255, 255, 255, 0.96);
  color: #a2b0c4;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: 160ms ease;
}

.upload-target.is-active {
  border-color: rgba(125, 211, 252, 0.3);
  background: rgba(240, 249, 255, 0.96);
  color: #0284c7;
}

.native-file-input {
  display: none;
}

.upload-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  border: 1px dashed rgba(203, 213, 225, 0.96);
  background: rgba(255, 255, 255, 0.94);
  color: #7c8aa5;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.upload-trigger-btn:hover {
  border-color: rgba(148, 163, 184, 0.64);
  color: #475569;
  background: rgba(255, 255, 255, 0.98);
}

.upload-summary {
  display: grid;
  gap: 6px;
  min-height: 0;
}

.upload-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.upload-summary-pill,
.upload-file-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.upload-summary-pill {
  background: rgba(245, 249, 255, 0.96);
  color: #0f6fb2;
  font-weight: 700;
}

.upload-file-chip {
  background: rgba(248, 250, 252, 0.94);
  color: #475569;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-order-form .user-submit-btn {
  min-height: 44px;
  border-radius: 14px;
  background: #1487d7;
  border-color: #1487d7;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(20, 135, 215, 0.24);
}

.user-order-form .user-submit-btn:hover {
  background: #0f7eca;
  border-color: #0f7eca;
}

.utility-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .user-topbar-inner,
  .user-stage {
    width: calc(100% - 32px);
  }
}

.dashboard-shell {
  padding: 26px 16px 40px;
}

.dashboard-frame {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-brand h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 300;
}

.dashboard-brand p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.card,
.workspace-page-hero,
.workspace-page-actions,
.workspace-page-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.section-kicker,
.eyebrow {
  margin: 0 0 10px;
  color: var(--sky);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
}

.section-intro h2,
.section-intro h3,
.workspace-head h2,
.workspace-head h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-intro p,
.binding-summary,
.workspace-summary,
.hero-text,
.inline-note,
.guard-card,
.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.section-intro p {
  margin: 8px 0 0;
}

.section-intro.compact p {
  margin-top: 6px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 360px;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-card,
.signal-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.hero-card::before,
.signal-card::before,
.workspace-page-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 32%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.08), transparent 30%);
  pointer-events: none;
}

.brand-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 24px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0ea5e9, #ec4899);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(236, 72, 153, 0.2);
}

.hero-card h1,
.workspace-page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  font-weight: 300;
}

.hero-text {
  margin: 16px 0 0;
  max-width: 58ch;
}

.hero-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #334155;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}

.signal-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.signal-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 24px;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.signal-card p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.signal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.signal-grid div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.88);
}

.signal-grid small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signal-grid span {
  display: block;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.auth-card,
.status-card,
.submit-card,
.result-card,
.workspace-card {
  padding: 30px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-top: 20px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: 180ms ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.inline-note {
  margin: 18px 0 0;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.stack-form > .primary-btn,
.stack-form > .secondary-btn,
.stack-form > .ghost-btn {
  width: 100%;
}

.is-hidden {
  display: none !important;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 12px 14px;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-soft);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.grid-two,
.grid-three,
.upload-grid,
.binding-meta,
.stats-grid {
  display: grid;
  gap: 14px;
}

.grid-two,
.upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, opacity 160ms ease,
    background 160ms ease, color 160ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #ec4899);
  box-shadow: 0 18px 38px rgba(236, 72, 153, 0.22);
}

.auth-screen .auth-submit-btn {
  background: #1487d7;
  border-color: #1487d7;
  box-shadow: 0 10px 24px rgba(20, 135, 215, 0.22);
}

.auth-screen .auth-submit-btn:hover {
  background: #0f7eca;
  border-color: #0f7eca;
  box-shadow: 0 14px 28px rgba(20, 135, 215, 0.26);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(226, 232, 240, 0.96);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.secondary-btn.compact,
.ghost-btn.compact {
  min-height: 42px;
  padding-inline: 14px;
}

.ghost-btn {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(56, 189, 248, 0.16);
  color: var(--sky);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.session-card,
.binding-card,
.admin-bind-card,
.guard-card,
.empty-state {
  margin-top: 22px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
}

.session-card.is-offline {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 255, 255, 0.84));
}

.session-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(248, 113, 113, 0.12);
}

.session-card:not(.is-offline) .session-dot {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.session-card strong {
  font-size: 1.05rem;
}

.session-card p {
  margin: 10px 0 0;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.stat-card,
.meta-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.94);
}

.stat-card dt,
.meta-card dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card dd,
.meta-card dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  word-break: break-word;
}

.binding-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.binding-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.binding-summary {
  margin: 16px 0 0;
}

.binding-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  min-width: 0;
}

.dashboard-side {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 24px;
}

.list-intro {
  margin-bottom: 18px;
}

.case-list {
  display: grid;
  gap: 14px;
}

.case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.case-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 114, 182, 0.4);
  box-shadow: 0 22px 48px rgba(236, 72, 153, 0.1);
}

.case-main {
  min-width: 0;
}

.case-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 14px;
}

.case-title-row h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.case-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.1);
  color: #be185d;
  font-size: 0.82rem;
  font-weight: 700;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 16px;
}

.case-meta-line {
  display: grid;
  gap: 6px;
  margin: 0;
}

.case-meta-line span {
  color: var(--muted);
  font-size: 0.82rem;
}

.case-meta-line strong {
  font-size: 0.94rem;
  word-break: break-word;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.guard-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.84));
}

.guard-card::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 70%);
  pointer-events: none;
}

.upload-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.9);
}

.upload-card > span {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
}

.upload-card small {
  color: var(--muted);
  line-height: 1.6;
}

.upload-card input[type="file"] {
  width: 100%;
  color: var(--muted);
}

.upload-card input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(236, 72, 153, 0.12));
  color: var(--text);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.09);
  border: 1px solid rgba(244, 114, 182, 0.16);
  color: #be185d;
  font-size: 0.82rem;
  font-weight: 500;
}

.result-card {
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.07), transparent 30%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.07), transparent 26%);
  pointer-events: none;
}

.result-content {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: #334155;
  line-height: 1.8;
  word-break: break-word;
}

.result-content p {
  margin: 0 0 8px;
}

.result-content strong {
  color: var(--text);
}

.result-content a {
  color: var(--sky);
  font-weight: 600;
}

.empty-state {
  text-align: center;
}

.workspace-card {
  margin-top: 24px;
}

.workspace-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.workspace-actions > *,
.workspace-page-actions > * {
  white-space: nowrap;
}

.workspace-frame-shell {
  position: relative;
  isolation: isolate;
  min-height: 760px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(191, 219, 254, 0.96);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 24%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.08), transparent 20%),
    linear-gradient(180deg, #fbfdff 0%, #edf4ff 100%);
  box-shadow:
    0 28px 60px rgba(148, 163, 184, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.workspace-frame-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(59, 130, 246, 0.14), transparent 18%),
    radial-gradient(circle at 88% 10%, rgba(236, 72, 153, 0.1), transparent 16%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 22%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 28px
    );
  opacity: 0.92;
}

.workspace-frame-shell::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.workspace-frame-shell iframe {
  width: 100%;
  min-height: 760px;
  border: 0;
  background: #f8fbff;
  position: relative;
  z-index: 1;
}

.workspace-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.84);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.workspace-loading.is-visible {
  opacity: 1;
}

.workspace-stage-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.workspace-stage-edge,
.workspace-stage-corner {
  position: absolute;
  pointer-events: none;
}

.workspace-stage-edge-top {
  top: 0;
  left: 22px;
  right: 22px;
  height: 18px;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 100%);
}

.workspace-stage-edge-left {
  top: 28px;
  bottom: 28px;
  left: 0;
  width: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 100%);
}

.workspace-stage-edge-right {
  top: 28px;
  bottom: 28px;
  right: 0;
  width: 18px;
  background:
    linear-gradient(270deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 100%);
}

.workspace-stage-edge-bottom {
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 20px;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0) 100%);
}

.workspace-stage-corner {
  width: 28px;
  height: 28px;
  border-style: solid;
  opacity: 0.9;
}

.workspace-stage-corner-tl {
  top: 18px;
  left: 18px;
  border-width: 2px 0 0 2px;
  border-color: rgba(96, 165, 250, 0.48);
  border-radius: 14px 0 0 0;
}

.workspace-stage-corner-tr {
  top: 18px;
  right: 18px;
  border-width: 2px 2px 0 0;
  border-color: rgba(96, 165, 250, 0.48);
  border-radius: 0 14px 0 0;
}

.workspace-stage-corner-bl {
  bottom: 18px;
  left: 18px;
  border-width: 0 0 2px 2px;
  border-color: rgba(236, 72, 153, 0.38);
  border-radius: 0 0 0 14px;
}

.workspace-stage-corner-br {
  bottom: 18px;
  right: 18px;
  border-width: 0 2px 2px 0;
  border-color: rgba(236, 72, 153, 0.38);
  border-radius: 0 0 14px 0;
}

.workspace-frame-mask {
  position: absolute;
  z-index: 3;
  pointer-events: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace-overlay-actions {
  position: absolute;
  z-index: 4;
  top: 3px;
  left: calc(clamp(112px, 18.2%, 250px) + 13px);
  width: 356px;
  height: 50px;
  display: grid;
  grid-template-columns: 30px 292px;
  gap: 10px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 18px 34px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.workspace-cutline-toggle {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  cursor: pointer;
}

.workspace-cutline-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.workspace-cutline-toggle-box {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow:
    0 8px 16px rgba(148, 163, 184, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.workspace-cutline-toggle-box::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ec4899;
  font-size: 0.92rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 160ms ease, transform 160ms ease;
}

.workspace-cutline-toggle:hover .workspace-cutline-toggle-box {
  transform: translateY(-1px);
  box-shadow:
    0 12px 22px rgba(236, 72, 153, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.workspace-cutline-toggle input:checked + .workspace-cutline-toggle-box {
  background: #ffffff;
  border-color: rgba(236, 72, 153, 0.42);
  box-shadow:
    0 10px 20px rgba(236, 72, 153, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.workspace-cutline-toggle input:checked + .workspace-cutline-toggle-box::after {
  opacity: 1;
  transform: scale(1);
}

.workspace-cutline-toggle input:disabled + .workspace-cutline-toggle-box {
  opacity: 0.54;
  box-shadow: none;
}

.workspace-download-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 92px));
  justify-content: start;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.workspace-download-btn {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(191, 219, 254, 0.96);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.08) 42%),
    linear-gradient(135deg, #dbeafe 0%, #bfdbfe 54%, #c7d2fe 100%);
  color: #315aa9;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 0 8px;
  box-shadow:
    0 10px 18px rgba(147, 197, 253, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease,
    filter 160ms ease;
  pointer-events: auto;
}

.workspace-download-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 14px 24px rgba(147, 197, 253, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.workspace-download-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: saturate(0.84);
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.12);
}

.workspace-frame-mask-export {
  top: 3px;
  left: calc(clamp(112px, 18.2%, 250px) + 13px);
  width: 356px;
  height: 50px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.workspace-frame-mask-blank-left {
  top: 238px;
  left: 18px;
  width: clamp(320px, 36.4%, 490px);
  bottom: 18px;
  border-radius: 0 0 24px 24px;
  background: transparent;
}

.workspace-frame-mask-overlap {
  top: 0;
  right: 180px;
  width: 330px;
  height: 74px;
  border-radius: 18px;
  background: transparent;
  cursor: context-menu;
}

.workspace-frame-mask-settings {
  top: 0;
  right: 8px;
  width: 230px;
  height: 430px;
  border-radius: 18px;
  background: transparent;
  cursor: context-menu;
}

.workspace-context-menu {
  position: fixed;
  z-index: 9999;
  display: none;
  width: 230px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(191, 219, 254, 0.94);
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.92), transparent 44%),
    rgba(255, 255, 255, 0.96);
  box-shadow:
    0 22px 48px rgba(71, 85, 105, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.workspace-context-menu.is-visible {
  display: block;
}

.workspace-context-head {
  padding: 10px 12px 12px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(253, 242, 248, 0.84));
  border: 1px solid rgba(226, 232, 240, 0.82);
}

.workspace-context-head span,
.workspace-context-head small,
.workspace-context-menu button small {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workspace-context-head strong {
  display: block;
  margin: 4px 0 2px;
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.25;
}

.workspace-context-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #315aa9;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

.workspace-context-menu button:hover:not(:disabled) {
  background: rgba(219, 234, 254, 0.82);
  color: #1d4ed8;
  transform: translateX(1px);
}

.workspace-context-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.workspace-context-menu hr {
  height: 1px;
  margin: 8px 6px;
  border: 0;
  background: rgba(226, 232, 240, 0.94);
}

.workspace-body {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.98), transparent 38%),
    radial-gradient(circle at bottom center, rgba(226, 236, 248, 0.86), transparent 48%),
    #f3f7fc;
}

.workspace-topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.workspace-topbar-inner {
  width: calc(100% - 40px);
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.workspace-topbar-brand,
.workspace-brand-lockup {
  display: flex;
  align-items: center;
}

.workspace-topbar-brand {
  gap: 18px;
  min-width: 0;
}

.workspace-back-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  transition: color 160ms ease;
}

.workspace-back-link:hover {
  color: #0f172a;
}

.workspace-brand-lockup {
  gap: 12px;
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #7da4ff, #f06eb1);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(240, 110, 177, 0.2);
}

.workspace-brand-copy {
  display: grid;
  gap: 2px;
}

.workspace-brand-copy strong {
  font-size: 1.04rem;
  line-height: 1.1;
  color: #1e293b;
}

.workspace-brand-copy span {
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.workspace-page-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(226, 232, 240, 0.92);
}

.workspace-page-heading strong {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-page-heading span {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-page-shell {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 18px 20px 20px;
}

.workspace-page-shell-full {
  display: flex;
  flex-direction: column;
}

.workspace-studio {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.workspace-rail {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
}

.workspace-sidebar-card,
.workspace-stage-panel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.workspace-sidebar-card::before,
.workspace-stage-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 32%),
    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.08), transparent 30%);
  pointer-events: none;
}

.workspace-sidebar-card {
  padding: 22px;
}

.workspace-sidebar-head,
.workspace-stage-head {
  position: relative;
  z-index: 1;
}

.workspace-sidebar-head h1,
.workspace-sidebar-head h2,
.workspace-stage-copy h2 {
  margin: 0;
  color: #1e293b;
  letter-spacing: -0.03em;
}

.workspace-sidebar-head h1 {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
}

.workspace-sidebar-head h2,
.workspace-stage-copy h2 {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-sidebar-head.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workspace-sidebar-head.compact .section-kicker {
  margin-bottom: 0;
}

.workspace-side-note {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
}

.workspace-case-spotlight {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(247, 250, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.92);
}

.workspace-case-identity {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-case-identity strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #1e293b;
}

.workspace-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(240, 249, 255, 0.96);
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.workspace-case-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.workspace-case-meta-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-case-meta-grid small {
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-case-meta-grid span {
  color: #334155;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workspace-case-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.workspace-list-empty {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 112px;
  margin-top: 16px;
  border-radius: 20px;
  border: 1px dashed rgba(203, 213, 225, 0.9);
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.56);
}

.workspace-case-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.workspace-case-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.52);
  box-shadow: 0 12px 24px rgba(148, 163, 184, 0.12);
}

.workspace-case-entry.is-active {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(240, 249, 255, 0.92);
  box-shadow: 0 16px 28px rgba(56, 189, 248, 0.1);
}

.workspace-case-entry-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.workspace-case-entry-main strong {
  color: #0f172a;
  font-size: 0.96rem;
  line-height: 1.35;
}

.workspace-case-entry-main small {
  color: #7c8aa5;
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-case-entry-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: #9fb1c8;
}

.workspace-case-entry-side time {
  font-size: 0.82rem;
}

.workspace-case-entry-side span {
  font-size: 1.2rem;
  line-height: 1;
}

.workspace-link-form-rail {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.workspace-stage-panel {
  padding: 24px;
}

.workspace-stage-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.workspace-stage-copy {
  max-width: 820px;
}

.workspace-stage-copy .section-kicker {
  margin-bottom: 8px;
}

.workspace-stage-copy p {
  margin: 10px 0 0;
}

.workspace-stage-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-stage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.92);
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 600;
}

.workspace-link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 20px;
}

.workspace-frame-shell-page,
.workspace-frame-shell-page iframe {
  min-height: 100%;
  height: 100%;
}

.workspace-frame-shell-full {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}

.notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.notice.is-success {
  background: rgba(22, 163, 74, 0.96);
}

.notice.is-error {
  background: rgba(220, 38, 38, 0.96);
}

@media (max-width: 1180px) {
  .hero-grid,
  .top-grid,
  .dashboard-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    position: static;
  }

  .user-layout {
    grid-template-columns: 1fr;
  }

  .user-sidebar {
    position: static;
  }

  .signal-card strong {
    font-size: 1.7rem;
  }
}

@media (max-width: 860px) {
  .auth-screen {
    padding-top: 92px;
  }

  .auth-screen-inner {
    max-width: 100%;
  }

  .admin-topbar-inner,
  .admin-stage,
  .user-topbar-inner,
  .user-stage {
    width: min(100% - 20px, 100%);
  }

  .admin-topbar-inner {
    min-height: 58px;
  }

  .admin-topbar-brand {
    min-width: 0;
  }

  .admin-topbar-brand strong {
    white-space: nowrap;
  }

  .admin-grid {
    gap: 24px;
  }

  .user-records-head {
    flex-direction: column;
    align-items: stretch;
  }

  .user-topbar-inner {
    min-height: 58px;
  }

  .user-order-head,
  .user-order-body {
    padding-inline: 22px;
  }

  .admin-panel-head,
  .admin-panel-body {
    padding-inline: 22px;
  }

  .admin-inline-actions {
    flex-direction: column;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-shell,
  .workspace-page-shell {
    width: min(100% - 20px, 100%);
  }

  .hero-card,
  .signal-card,
  .auth-card,
  .status-card,
  .submit-card,
  .result-card,
  .workspace-card,
  .workspace-page-hero,
  .workspace-page-actions,
  .workspace-page-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .hero-copy {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 1.6rem;
  }

  .stats-grid,
  .binding-meta,
  .grid-two,
  .grid-three,
  .upload-grid,
  .case-meta,
  .workspace-link-form {
    grid-template-columns: 1fr;
  }

  .workspace-topbar-inner {
    width: min(100% - 20px, 100%);
    align-items: start;
    padding-block: 10px;
  }

  .workspace-topbar-brand,
  .workspace-topbar-inner,
  .workspace-stage-head {
    flex-direction: column;
  }

  .workspace-topbar-actions,
  .workspace-stage-pills {
    width: 100%;
    justify-content: stretch;
  }

  .workspace-topbar-actions > *,
  .workspace-stage-pills > * {
    flex: 1 1 100%;
  }

  .workspace-studio {
    grid-template-columns: 1fr;
  }

  .workspace-rail {
    position: static;
  }

  .workspace-page-shell {
    padding: 14px 10px 10px;
  }

  .workspace-page-heading {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .workspace-head,
  .binding-head {
    flex-direction: column;
  }

  .workspace-actions,
  .workspace-page-actions,
  .action-row {
    justify-content: stretch;
  }

  .workspace-actions > *,
  .workspace-page-actions > *,
  .action-row > *,
  .case-actions > * {
    flex: 1 1 100%;
  }

  .case-card {
    grid-template-columns: 1fr;
  }

  .case-actions {
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding-top: 68px;
  }

  .login-brand h1 {
    font-size: 1.7rem;
  }

  .login-card {
    margin-top: 26px;
    border-radius: 22px;
  }

  .login-card-head {
    padding: 22px 22px 20px;
  }

  .login-card-body {
    padding: 22px 22px 10px;
  }

  .login-card-footer {
    padding: 10px 22px 22px;
  }

  .admin-topbar-inner {
    width: min(100% - 16px, 100%);
  }

  .workspace-topbar-inner {
    width: min(100% - 16px, 100%);
  }

  .admin-stage {
    width: min(100% - 16px, 100%);
    margin-top: 24px;
  }

  .user-topbar-inner {
    width: min(100% - 16px, 100%);
  }

  .user-stage {
    width: min(100% - 16px, 100%);
    margin-top: 24px;
  }

  .workspace-page-shell {
    width: 100%;
    padding: 12px 8px 8px;
  }

  .admin-topbar-actions {
    gap: 10px;
  }

  .workspace-topbar-actions {
    gap: 8px;
  }

  .user-topbar-actions {
    gap: 10px;
  }

  .admin-user-pill {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-log-card {
    grid-template-columns: 1fr;
  }

  .user-user-pill {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-record-card {
    grid-template-columns: 1fr;
  }

  .user-record-side {
    justify-content: space-between;
  }

  .admin-log-time {
    white-space: normal;
  }

  .app-shell {
    margin-top: 12px;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .hero-points {
    flex-direction: column;
  }

  .workspace-case-meta-grid {
    grid-template-columns: 1fr;
  }

  .workspace-stage-panel,
  .workspace-sidebar-card {
    padding: 18px;
    border-radius: 22px;
  }

  .workspace-frame-shell,
  .workspace-frame-shell iframe,
  .workspace-frame-shell-page,
  .workspace-frame-shell-page iframe {
    min-height: 560px;
  }

  .workspace-stage-edge-top {
    left: 16px;
    right: 16px;
    height: 14px;
  }

  .workspace-stage-edge-left,
  .workspace-stage-edge-right {
    top: 22px;
    bottom: 22px;
    width: 14px;
  }

  .workspace-stage-edge-bottom {
    left: 20px;
    right: 20px;
    height: 16px;
  }

  .workspace-stage-corner {
    width: 22px;
    height: 22px;
  }

  .workspace-stage-corner-tl,
  .workspace-stage-corner-tr {
    top: 14px;
  }

  .workspace-stage-corner-bl,
  .workspace-stage-corner-br {
    bottom: 14px;
  }

  .workspace-stage-corner-tl,
  .workspace-stage-corner-bl {
    left: 14px;
  }

  .workspace-stage-corner-tr,
  .workspace-stage-corner-br {
    right: 14px;
  }

  .workspace-frame-mask-export {
    top: 3px;
    left: calc(clamp(88px, 18.4%, 202px) + 13px);
    width: 324px;
    height: 46px;
  }

  .workspace-frame-mask-blank-left {
    top: 214px;
    left: 14px;
    width: clamp(284px, 40.5%, 430px);
    bottom: 14px;
    border-radius: 0 0 20px 20px;
  }

  .workspace-overlay-actions {
    top: 3px;
    left: calc(clamp(88px, 18.4%, 202px) + 13px);
    width: 324px;
    height: 46px;
    grid-template-columns: 28px 268px;
    gap: 8px;
    padding: 3px 8px;
  }

  .workspace-cutline-toggle,
  .workspace-cutline-toggle-box {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .workspace-download-group {
    grid-template-columns: repeat(3, minmax(0, 84px));
    gap: 8px;
  }

  .workspace-download-btn {
    height: 36px;
    font-size: 0.82rem;
    padding: 0 10px;
  }

  .notice {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}
