:root {
  --color-primary: #1e40af;
  --color-primary-strong: #1e3a8a;
  --color-on-primary: #ffffff;
  --color-secondary: #3b82f6;
  --color-accent: #d97706;
  --color-accent-soft: #fef3c7;
  --color-background: #f8fafc;
  --color-foreground: #1e3a8a;
  --color-muted: #e9eef6;
  --color-muted-foreground: #5b6b83;
  --color-card: rgba(255, 255, 255, 0.82);
  --color-card-strong: rgba(255, 255, 255, 0.96);
  --color-border: rgba(147, 197, 253, 0.44);
  --color-ring: rgba(30, 64, 175, 0.28);
  --color-success: #15803d;
  --color-success-soft: #dcfce7;
  --color-danger: #dc2626;
  --color-danger-soft: #fee2e2;
  --shadow-soft: 0 22px 70px rgba(30, 58, 138, 0.14);
  --shadow-card: 0 12px 34px rgba(30, 58, 138, 0.09);
  --radius-lg: 28px;
  --radius-md: 18px;
  --space-4: 16px;
  --font-sans: "Fira Sans", "Plus Jakarta Sans", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #94a3b8;
    --color-primary-strong: #cbd5e1;
    --color-on-primary: #0f172a;
    --color-secondary: #94a3b8;
    --color-accent: #fbbf24;
    --color-accent-soft: rgba(251, 191, 36, 0.14);
    --color-background: #0f172a;
    --color-foreground: #e5edf6;
    --color-muted: rgba(30, 41, 59, 0.78);
    --color-muted-foreground: #aab7c7;
    --color-card: rgba(15, 23, 42, 0.72);
    --color-card-strong: rgba(15, 23, 42, 0.9);
    --color-border: rgba(148, 163, 184, 0.24);
    --color-ring: rgba(203, 213, 225, 0.42);
    --color-success-soft: rgba(22, 163, 74, 0.16);
    --color-danger-soft: rgba(220, 38, 38, 0.16);
    --shadow-soft: 0 18px 55px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.24);
  }
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }

html { min-height: 100%; background: var(--color-background); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    linear-gradient(rgba(30, 64, 175, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 64, 175, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(217, 119, 6, 0.18), transparent 31vw),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.18), transparent 28vw),
    linear-gradient(135deg, #f8fafc 0%, #eef5ff 48%, #f8fafc 100%);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 12% 8%, rgba(251, 191, 36, 0.12), transparent 31vw),
      radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.12), transparent 28vw),
      linear-gradient(135deg, #0f172a 0%, #111827 48%, #020617 100%);
  }
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.58; filter: grayscale(0.2); }
button, a, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  box-shadow: 0 0 0 4px var(--color-ring);
  border-color: var(--color-primary);
}

.ambient { position: fixed; z-index: -1; pointer-events: none; filter: blur(10px); opacity: 0.72; }
.ambient-a {
  width: 260px; height: 260px; left: -88px; top: 88px;
  background: linear-gradient(135deg, rgba(161, 98, 7, 0.2), rgba(71, 85, 105, 0.1));
  border-radius: 42% 58% 62% 38%;
}
.ambient-b {
  width: 360px; height: 360px; right: -150px; bottom: 40px;
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.18), rgba(14, 165, 233, 0.08));
  border-radius: 58% 42% 40% 60%;
}

.glass-panel {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  position: relative;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 460px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.auth-hero, .auth-card { border-radius: var(--radius-lg); }
.auth-hero {
  min-height: 560px;
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.55), transparent 65%);
}

.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row strong, .brand-row span { display: block; }
.brand-row strong { font-size: 17px; }
.brand-row span { color: var(--color-muted-foreground); font-size: 12px; margin-top: 2px; }
.brand-row.compact { margin-bottom: 24px; }
.brand-logo {
  display: block;
  width: 206px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.16));
}
.brand-logo-hero { width: min(280px, 70vw); }
.brand-logo-sidebar { width: 158px; }
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-accent));
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}
.brand-mark.small { width: 42px; height: 42px; border-radius: 14px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.auth-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}
.hero-copy {
  max-width: 690px;
  color: var(--color-muted-foreground);
  font-size: 17px;
  line-height: 1.8;
}
.hero-metrics, .trust-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-metrics div, .trust-strip span {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.46);
  border-radius: 18px;
}
@media (prefers-color-scheme: dark) {
  .hero-metrics div, .trust-strip span { background: rgba(15, 23, 42, 0.46); }
}
.hero-metrics div { min-width: 140px; padding: 16px; }
.hero-metrics strong { display: block; font-size: 30px; letter-spacing: -0.04em; }
.hero-metrics span, .trust-strip span { color: var(--color-muted-foreground); font-size: 13px; }
.trust-strip span { padding: 9px 12px; }
.auth-card { padding: 24px; }
.auth-card::before,
.sidebar::before,
.panel::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.78), transparent);
  pointer-events: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.12);
}
.segmented button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  color: var(--color-muted-foreground);
  background: transparent;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.segmented button.active {
  color: var(--color-foreground);
  background: var(--color-card-strong);
  box-shadow: var(--shadow-card);
}

.form-stack, .form-grid { display: grid; gap: 14px; }
.form-row, .actions, .topbar-actions, .toolbar, .model-head, .account-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-row > * { flex: 1; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .wide, .wide { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 7px;
  color: var(--color-muted-foreground);
  font-size: 13px;
  font-weight: 700;
}
input, textarea, select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--color-foreground);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--color-border);
  border-radius: 13px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
input:hover, textarea:hover, select:hover {
  background: rgba(255, 255, 255, 0.82);
}
@media (prefers-color-scheme: dark) {
  input, textarea, select { background: rgba(15, 23, 42, 0.58); }
}
textarea { min-height: 88px; resize: vertical; }

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn.full { width: 100%; }
.btn.tiny { min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 12px; }
.btn.primary {
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-accent));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}
.btn.primary:hover:not(:disabled) {
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
}
.btn.secondary {
  color: var(--color-foreground);
  border-color: var(--color-border);
  background: var(--color-card-strong);
}
.btn.ghost {
  color: var(--color-muted-foreground);
  border-color: var(--color-border);
  background: transparent;
}

.hint, small, .muted { color: var(--color-muted-foreground); }
.hint { margin: 16px 0 0; font-size: 13px; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  max-width: 1720px;
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow: hidden;
}
.nav { display: grid; gap: 8px; }
.nav button {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: var(--color-muted-foreground);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 15px;
  font-weight: 800;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  position: relative;
}
.nav button:hover, .nav button.active {
  color: var(--color-foreground);
  background: var(--color-card-strong);
  border-color: var(--color-border);
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.08);
}
.nav-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--color-border); }
.nav button.active .nav-dot { background: var(--color-accent); box-shadow: 0 0 0 5px var(--color-accent-soft); }
.account-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.48);
}
@media (prefers-color-scheme: dark) {
  .account-card { background: rgba(15, 23, 42, 0.46); }
}
.account-card strong, .account-card span { display: block; }
.account-card span { color: var(--color-muted-foreground); font-size: 12px; margin-top: 2px; }
.account-meta { justify-content: space-between; margin: 14px 0; }
.account-meta span { padding: 6px 9px; border-radius: 999px; background: var(--color-muted); color: var(--color-foreground); }

.main { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.topbar {
  position: sticky;
  top: 18px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
}
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255,255,255,0.28), transparent 42%, rgba(161,98,7,0.06));
  pointer-events: none;
}
.topbar h2, .toolbar h3, .content-block h3, .doc-section h4 { margin: 0; letter-spacing: -0.03em; }
.topbar h2 {
  font-size: 30px;
  color: transparent;
  background: linear-gradient(135deg, #172554, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
}
.model-pill {
  max-width: 420px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-card-strong);
  color: var(--color-muted-foreground);
  font-size: 13px;
  font-weight: 800;
}

.view-root { min-width: 0; }
.metric-grid, .grid, .model-grid, .plan-grid { display: grid; gap: 14px; }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.align-start { align-items: start; }
.section-gap { margin-top: 16px; }
.section-gap-sm { margin-top: 14px; }
.metric-card, .panel, .model-card, .plan-card, .sub-panel, .content-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  position: relative;
}
.metric-card, .model-card, .plan-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.metric-card:hover, .model-card:hover, .plan-card:hover {
  transform: translateY(-2px);
  border-color: rgba(161, 98, 7, 0.38);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}
.metric-card {
  min-height: 132px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}
.metric-card span, .metric-card small { color: var(--color-muted-foreground); font-size: 12px; font-weight: 700; }
.metric-card strong { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.05em; }
.panel { padding: 16px; overflow: hidden; }
.toolbar { justify-content: space-between; margin-bottom: 14px; }
.toolbar h3 { font-size: 17px; }
.toolbar p { margin: 6px 0 0; color: var(--color-muted-foreground); font-size: 13px; }
.compact-toolbar { align-items: flex-start; }

.badge, .status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  white-space: nowrap;
}
.badge.muted { color: var(--color-muted-foreground); background: var(--color-muted); }
.badge.success { color: var(--color-success); background: var(--color-success-soft); }
.status.paid { color: var(--color-success); background: var(--color-success-soft); }
.status.pending { color: var(--color-accent); background: var(--color-accent-soft); }
.status.cancelled, .status.refunded { color: var(--color-danger); background: var(--color-danger-soft); }

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.36);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: rgba(255, 255, 255, 0.42);
}
@media (prefers-color-scheme: dark) {
  table { background: rgba(15, 23, 42, 0.42); }
}
th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
td:nth-child(1),
td:nth-child(2),
.model-card dd,
.model-pill {
  font-family: var(--font-mono);
}
th {
  color: var(--color-muted-foreground);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(148, 163, 184, 0.1);
  position: sticky;
  top: 0;
  z-index: 1;
}
tr:last-child td { border-bottom: 0; }
td small { line-height: 1.6; }

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(30,64,175,0.48), rgba(217,119,6,0.42));
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.empty-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--color-muted-foreground);
  border: 1px dashed var(--color-border);
  border-radius: 18px;
  background: rgba(148, 163, 184, 0.08);
}
.empty-state span {
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-card-strong), var(--color-muted));
}

.model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.model-card, .plan-card { padding: 16px; box-shadow: var(--shadow-card); }
.model-card.active {
  border-color: rgba(161, 98, 7, 0.55);
  background:
    linear-gradient(135deg, rgba(254, 243, 199, 0.34), transparent 42%),
    var(--color-card);
}
.model-card.disabled { opacity: 0.62; }
.model-head { align-items: flex-start; justify-content: space-between; }
.model-head strong { line-height: 1.35; }
.model-card p { color: var(--color-muted-foreground); line-height: 1.7; }
.model-card dl { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 10px; font-size: 12px; }
.model-card dt { color: var(--color-muted-foreground); font-weight: 800; }
.model-card dd { margin: 0; overflow-wrap: anywhere; }
.model-card .actions { margin-top: 16px; }
.muted-text { color: var(--color-muted-foreground); font-size: 12px; }

.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card { display: flex; flex-direction: column; gap: 12px; position: relative; }
.plan-card.featured {
  border-color: rgba(217, 119, 6, 0.55);
  transform: translateY(-2px);
  background:
    radial-gradient(circle at 84% 8%, rgba(217,119,6,0.14), transparent 32%),
    var(--color-card);
}
.plan-card strong { font-size: 36px; letter-spacing: -0.05em; }
.plan-card ul, .content-block ul, .content-block ol, .log-list { margin: 0; padding-left: 20px; }
.plan-card li, .content-block li, .log-list li { margin: 7px 0; line-height: 1.6; }
.plan-card .btn { margin-top: auto; }

.patent-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }
.patent-list { display: grid; gap: 10px; max-height: calc(100vh - 180px); overflow: auto; padding-right: 4px; }
.patent-item {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 13px;
  text-align: left;
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.44);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
@media (prefers-color-scheme: dark) {
  .patent-item { background: rgba(15, 23, 42, 0.44); }
}
.patent-item:hover, .patent-item.active {
  border-color: rgba(217, 119, 6, 0.5);
  background: var(--color-card-strong);
  transform: translateY(-1px);
}
.patent-item span, .patent-item small { color: var(--color-muted-foreground); }
.patent-preview { min-width: 0; display: grid; gap: 14px; }
.diagram-box {
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background:
    linear-gradient(45deg, rgba(30,64,175,0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(30,64,175,0.035) 25%, transparent 25%),
    #fff;
  background-size: 18px 18px;
}
.diagram-box svg { display: block; width: 100%; min-width: 0; height: auto; }
.content-block { padding: 15px; background: rgba(255, 255, 255, 0.46); }
@media (prefers-color-scheme: dark) {
  .content-block { background: rgba(15, 23, 42, 0.48); }
}
.content-block h3 { margin-bottom: 10px; font-size: 16px; }
.content-block p { margin: 8px 0; line-height: 1.85; color: var(--color-foreground); }
.doc-section { margin-top: 12px; }
.doc-section h4 { font-size: 14px; color: var(--color-accent); }
.score-line { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.score-line strong { font-size: 30px; letter-spacing: -0.05em; }
.score-line span { color: var(--color-muted-foreground); }
.log-list { margin-top: 12px; color: var(--color-muted-foreground); }

.toast {
  position: fixed;
  top: 112px;
  right: 24px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 16px;
  border-radius: 16px;
  color: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(255,255,255,0.16);
}
.toast.ok { background: #102033; }
.toast.bad { background: #b91c1c; }

.page-enter-active, .page-leave-active, .toast-fade-enter-active, .toast-fade-leave-active {
  transition: opacity 180ms ease, transform 180ms ease;
}
.page-enter-from, .page-leave-to { opacity: 0; transform: translateY(8px); }
.toast-fade-enter-from, .toast-fade-leave-to { opacity: 0; transform: translateY(-6px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-4, .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patent-layout { grid-template-columns: 1fr; }
  .patent-list { max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; padding: 24px 0; }
  .auth-hero { min-height: 420px; }
  .shell { grid-template-columns: 1fr; padding: 12px; }
  .sidebar { position: static; height: auto; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { gap: 12px; }
  .topbar { position: static; flex-direction: column; align-items: flex-start; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .model-pill { max-width: 100%; width: 100%; }
  .cols-5, .cols-4, .cols-2, .model-grid, .plan-grid, .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { background-attachment: fixed; }
  .auth-screen { width: min(100% - 20px, 1180px); }
  .auth-hero, .auth-card, .topbar, .sidebar { border-radius: 22px; }
  .auth-hero { padding: 24px; }
  .auth-hero h1 { font-size: 34px; }
  .hero-metrics div { min-width: calc(50% - 6px); }
  .segmented { grid-template-columns: 1fr; }
  .form-row, .actions, .toolbar, .topbar-actions { align-items: stretch; flex-direction: column; }
  .toolbar { gap: 12px; }
  .toolbar .actions { width: 100%; }
  .btn { width: 100%; }
  .nav { grid-template-columns: 1fr; }
  .patent-list { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .panel { padding: 12px; }
  .toast { top: auto; right: 12px; bottom: 12px; }
}

/* 2026 enterprise console refinement */
:root {
  --color-primary: #244a7c;
  --color-primary-strong: #17365f;
  --color-on-primary: #ffffff;
  --color-secondary: #4e6f96;
  --color-accent: #b86f0b;
  --color-accent-soft: #fff4dc;
  --color-background: #f3f6fa;
  --color-foreground: #17263a;
  --color-muted: #edf1f6;
  --color-muted-foreground: #65758a;
  --color-card: #ffffff;
  --color-card-strong: #ffffff;
  --color-border: #dce3ec;
  --color-ring: rgba(36, 74, 124, 0.22);
  --color-success: #18734a;
  --color-success-soft: #e5f5ed;
  --color-danger: #c53a3a;
  --color-danger-soft: #fdeaea;
  --shadow-soft: 0 8px 24px rgba(24, 47, 79, 0.07);
  --shadow-card: 0 3px 12px rgba(24, 47, 79, 0.06);
  --radius-lg: 8px;
  --radius-md: 8px;
  --font-sans: "Plus Jakarta Sans", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { letter-spacing: 0 !important; }

html { background: var(--color-background); }

body {
  color: var(--color-foreground);
  background-color: var(--color-background);
  background-image:
    linear-gradient(rgba(36, 74, 124, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 74, 124, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

svg.lucide {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
}

.glass-panel {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-screen {
  width: min(1120px, calc(100vw - 40px));
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 430px);
  gap: 20px;
  padding: 32px 0;
}

.auth-hero,
.auth-card { border-radius: 8px; }

.auth-hero {
  min-height: 600px;
  padding: 48px;
  color: #ffffff;
  background: #17365f;
  border-color: #17365f;
  box-shadow: 0 18px 44px rgba(23, 54, 95, 0.18);
}

.auth-hero::after,
.auth-card::before,
.sidebar::before,
.panel::before { display: none; }

.auth-hero .brand-logo {
  padding: 9px 12px;
  border-radius: 6px;
  background: #ffffff;
  filter: none;
}

.auth-hero .eyebrow { color: #f4b957; }

.auth-hero h1 {
  max-width: 720px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 800;
}

.hero-copy {
  max-width: 650px;
  color: #d8e3f0;
  font-size: 16px;
  line-height: 1.75;
}

.hero-metrics,
.trust-strip { gap: 10px; }

.hero-metrics div,
.trust-strip span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
}

.hero-metrics div { min-width: 132px; padding: 14px 16px; }
.hero-metrics strong { font-size: 26px; }
.hero-metrics span,
.trust-strip span { color: #d8e3f0; }

.auth-card { padding: 28px; }

.auth-card-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.auth-card-heading h2,
.auth-card-heading p { margin: 0; }
.auth-card-heading h2 { font-size: 21px; }
.auth-card-heading p { margin-top: 4px; color: var(--color-muted-foreground); font-size: 13px; }

.auth-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--color-primary);
  border: 1px solid #cbd9ea;
  border-radius: 6px;
  background: #eff5fb;
}

.segmented {
  gap: 2px;
  padding: 3px;
  border-radius: 6px;
  background: var(--color-muted);
}

.segmented button { min-height: 38px; border-radius: 4px; font-size: 13px; }
.segmented button.active { color: var(--color-primary-strong); box-shadow: 0 1px 5px rgba(24, 47, 79, 0.08); }

.shell {
  width: 100%;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.sidebar {
  top: 0;
  height: 100vh;
  padding: 24px 18px 18px;
  border-width: 0 1px 0 0;
  border-radius: 0;
  box-shadow: 4px 0 18px rgba(24, 47, 79, 0.04);
}

.brand-row.compact {
  min-height: 44px;
  margin: 0 8px 24px;
}

.brand-logo-sidebar { width: 154px; filter: none; }

.nav { gap: 5px; }

.nav button {
  min-height: 44px;
  padding: 0 12px;
  gap: 11px;
  justify-content: flex-start;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #596b82;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  box-shadow: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav button:hover {
  color: var(--color-primary-strong);
  background: #f1f5f9;
}

.nav button.active {
  color: var(--color-primary-strong);
  border-color: #d8e4f1;
  background: #edf4fb;
  box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav button.active svg { color: var(--color-primary); }
.nav-dot { display: none; }

.account-card {
  padding: 14px;
  border-radius: 8px;
  background: #f7f9fc;
  box-shadow: none;
}

.account-identity { display: flex; align-items: center; gap: 10px; }
.account-identity > div { min-width: 0; }

.account-card .avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 0;
  color: #ffffff !important;
  border-radius: 50%;
  background: var(--color-primary);
  font-size: 14px;
  font-weight: 800;
}

.account-card strong { font-size: 14px; }
.account-card > div > span { font-size: 12px; }
.account-meta { margin: 12px 0; }
.account-meta span { border-radius: 4px; background: #e8eef6; }

.main {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  gap: 0;
  padding: 0 28px 32px;
}

.topbar {
  position: static;
  min-height: 106px;
  padding: 24px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-heading { min-width: 0; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 7px;
  color: var(--color-muted-foreground);
  font-size: 12px;
}
.breadcrumb span { color: var(--color-primary); font-weight: 700; }
.breadcrumb svg { width: 13px; height: 13px; }
.topbar h2 { font-size: 25px; line-height: 1.2; }
.page-description { margin: 6px 0 0; color: var(--color-muted-foreground); font-size: 13px; }

.topbar-actions { flex-shrink: 0; }

.model-pill {
  min-height: 40px;
  max-width: 360px;
  padding: 0 12px;
  gap: 7px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

.model-pill span { color: var(--color-muted-foreground); }
.model-pill strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-foreground); }
.status-light { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #25a36f; box-shadow: 0 0 0 3px #dff3ea; }

.view-root { padding-top: 20px; }

.panel,
.plan-card {
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(24, 47, 79, 0.05);
}

.panel { padding: 18px; }
.sub-panel { border-radius: 6px; background: #f7f9fc; }

.toolbar { min-height: 34px; margin-bottom: 16px; }
.toolbar h3 { font-size: 16px; }
.toolbar.compact-toolbar h3 { font-size: 18px; }

.metric-grid { gap: 12px; }

.metric-card {
  min-height: 126px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--metric-accent, var(--color-primary));
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(24, 47, 79, 0.045);
}

.metric-card::before { display: none; }
.metric-card:nth-child(2) { --metric-accent: #387f7a; }
.metric-card:nth-child(3) { --metric-accent: #b86f0b; }
.metric-card:nth-child(4) { --metric-accent: #357153; }
.metric-card:nth-child(5) { --metric-accent: #a64b4b; }
.metric-card span { color: #5d6e83; font-size: 12px; font-weight: 700; }
.metric-card strong { margin: 9px 0 4px; font-size: clamp(23px, 2vw, 31px); color: #1d3f71; }
.metric-card small { font-size: 12px; }

.grid,
.model-grid,
.plan-grid { gap: 14px; }

.section-gap { margin-top: 14px; }
.section-gap-sm { margin-top: 14px; }

.model-card {
  padding: 16px;
  border-radius: 8px;
  background: #fbfcfe;
  box-shadow: none;
}
.model-card.active { border-color: #a8bfd9; box-shadow: inset 3px 0 0 var(--color-primary); }
.model-card dl { border-radius: 6px; background: #f1f4f8; }

.plan-card { padding: 22px; }
.plan-card.featured { transform: none; border: 2px solid #bf8735; }
.plan-card.featured::before { border-radius: 3px; background: #bf8735; }
.plan-card > strong { color: #1d3f71; font-size: 34px; }

.patent-layout {
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 14px;
}
.patent-list { padding-right: 12px; }
.patent-item { border-radius: 6px; background: #f7f9fc; }
.patent-item.active { border-color: #9fb7d2; background: #eef4fa; box-shadow: inset 3px 0 0 var(--color-primary); }
.patent-preview { border-radius: 6px; background: #fbfcfe; }
.content-block,
.diagram-box { border-radius: 6px; }

label { gap: 7px; color: #506278; font-size: 12px; }

input,
textarea,
select {
  min-height: 42px;
  padding: 10px 12px;
  border-color: #cfd8e4;
  border-radius: 6px;
  color: var(--color-foreground);
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

textarea { min-height: 92px; line-height: 1.6; }
input:hover,
textarea:hover,
select:hover { border-color: #aebdd0; }
input::placeholder,
textarea::placeholder { color: #95a2b2; }
input[readonly] { color: #5d6e83; background: #f4f6f9; }

.btn {
  min-height: 40px;
  padding: 0 14px;
  gap: 7px;
  border-radius: 6px;
  box-shadow: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btn.primary { background: var(--color-primary); box-shadow: 0 3px 8px rgba(36, 74, 124, 0.18); }
.btn.primary:hover:not(:disabled) { background: var(--color-primary-strong); box-shadow: 0 5px 12px rgba(36, 74, 124, 0.22); transform: none; }
.btn.secondary:hover:not(:disabled),
.btn.ghost:hover:not(:disabled) { transform: none; }
.btn.tiny { min-height: 32px; padding: 0 10px; border-radius: 5px; }
.btn svg { width: 16px; height: 16px; }

.badge,
.status {
  border-radius: 4px;
  font-size: 11px;
}

.table-wrap {
  border-color: var(--color-border);
  border-radius: 6px;
  background: #ffffff;
}

table { font-size: 12px; }
th { padding: 10px 11px; color: #53667e; background: #f2f5f8; }
td { padding: 11px; border-top-color: #e6ebf1; }
tbody tr { transition: background-color 140ms ease; }
tbody tr:hover { background: #f7f9fc; }

.empty-state { min-height: 140px; border-radius: 6px; background: #f7f9fc; }
.empty-state span { border-radius: 4px; background: #dce6f0; }

.toast {
  top: 18px;
  right: 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #8fb4de;
    --color-primary-strong: #b8d2ee;
    --color-on-primary: #10253f;
    --color-secondary: #91a8c0;
    --color-accent: #e2a94c;
    --color-accent-soft: rgba(226, 169, 76, 0.14);
    --color-background: #101720;
    --color-foreground: #e5edf5;
    --color-muted: #202b38;
    --color-muted-foreground: #a5b2c1;
    --color-card: #18222e;
    --color-card-strong: #1c2835;
    --color-border: #2c3948;
    --color-ring: rgba(143, 180, 222, 0.32);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 3px 12px rgba(0, 0, 0, 0.16);
  }

  body {
    background-color: var(--color-background);
    background-image:
      linear-gradient(rgba(143, 180, 222, 0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(143, 180, 222, 0.025) 1px, transparent 1px);
  }

  .auth-hero { color: #ffffff; background: #17365f; }
  .auth-card,
  .glass-panel,
  .metric-card,
  .model-pill,
  input,
  textarea,
  select,
  .table-wrap { background: var(--color-card); }
  .nav button:hover,
  .account-card,
  .model-card,
  .patent-item,
  .empty-state { background: #1d2835; }
  .nav button.active,
  .patent-item.active { color: #dceaf8; border-color: #3a5169; background: #23364a; }
  .account-meta span,
  .model-card dl,
  th,
  .sub-panel { background: #202c39; }
  .patent-preview,
  tbody tr:hover { background: #1b2632; }
  input[readonly] { background: #202a36; }
  .metric-card strong,
  .plan-card > strong { color: #c4dbf3; }
  .status-light { box-shadow: 0 0 0 3px rgba(37, 163, 111, 0.18); }
}

@media (max-width: 1180px) {
  .main { padding-right: 20px; padding-left: 20px; }
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: minmax(0, 1fr); }
  .shell { display: block; padding: 0; }
  .sidebar {
    position: relative;
    z-index: 20;
    display: grid;
    height: auto;
    padding: 12px 16px;
    border-width: 0 0 1px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 18px;
  }
  .brand-row.compact { margin: 0; }
  .brand-logo-sidebar { width: 126px; }
  .nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { min-width: max-content; min-height: 40px; padding: 0 11px; }
  .account-card {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .account-meta { margin: 0; }
  .account-card .btn { width: 40px; padding: 0; font-size: 0; }
  .account-card .btn svg { width: 17px; height: 17px; }
  .main { padding: 0 16px 24px; }
  .topbar { min-height: 96px; }
  .patent-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-screen { width: min(100% - 24px, 1120px); padding: 12px 0; }
  .auth-card { order: -1; width: 100%; }
  .auth-hero { min-height: auto; width: 100%; padding: 24px; }
  .auth-hero .brand-logo { width: 180px; }
  .auth-hero h1 { font-size: 29px; }
  .hero-copy { font-size: 14px; }
  .hero-metrics div { min-width: calc(33.333% - 7px); padding: 10px; }
  .hero-metrics strong { font-size: 21px; }
  .trust-strip { display: none; }
  .auth-card { padding: 20px; }
  .segmented { grid-template-columns: repeat(3, 1fr); }
  .sidebar { grid-template-columns: 1fr auto; padding: 10px 12px; }
  .account-identity > div,
  .account-meta { display: none; }
  .avatar { width: 34px; height: 34px; }
  .nav { margin: 0 -12px; padding: 2px 12px 4px; }
  .nav button { min-height: 38px; font-size: 13px; }
  .main { padding: 0 12px 20px; }
  .topbar { min-height: auto; padding: 17px 0 15px; gap: 14px; }
  .topbar-actions { flex-direction: row; align-items: center; }
  .model-pill { width: auto; max-width: calc(100% - 88px); }
  .model-pill > span:not(.status-light) { display: none; }
  .topbar-actions .btn { width: auto; flex: 0 0 auto; }
  .page-description { max-width: 290px; }
  .view-root { padding-top: 14px; }
  .cols-5,
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 112px; padding: 14px; }
  .metric-card strong { font-size: 23px; }
  .panel { padding: 14px; }
  .toolbar { align-items: center; flex-direction: row; }
  .toolbar .actions { width: auto; flex-direction: row; }
  .toolbar .actions .btn { width: auto; }
  .form-row,
  .actions { align-items: stretch; flex-direction: column; }
  .actions .btn { width: 100%; }
  .plan-card { padding: 18px; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
}

@media (max-width: 390px) {
  .cols-5,
  .cols-4 { grid-template-columns: 1fr; }
  .hero-metrics div { min-width: calc(50% - 5px); }
  .auth-card-heading { margin-bottom: 18px; }
  .auth-icon { display: none; }
}

/* Payment channel selector keeps the billing surface operational without turning it into a marketing card. */
.payment-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 10px;
}
.payment-choice button {
  min-height: 36px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  color: var(--ui-muted);
  background: var(--ui-surface);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.payment-choice button:hover,
.payment-choice button.active {
  border-color: var(--ui-accent);
  color: var(--ui-accent-strong);
  background: var(--ui-accent-soft);
}
.payment-choice button:active { transform: translateY(1px); }

/* Premium visual polish - 2026-07-29 */
:root {
  --premium-navy: #102a4c;
  --premium-navy-2: #173b67;
  --premium-blue: #2f6fb5;
  --premium-cyan: #2aa7c9;
  --premium-gold: #d79026;
  --premium-ink: #152033;
  --premium-paper: rgba(255, 255, 255, 0.92);
  --premium-line: rgba(117, 145, 179, 0.26);
  --premium-glow: 0 22px 70px rgba(27, 63, 111, 0.14);
}

#app {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

body {
  background-color: #f4f8fc;
  background-image:
    radial-gradient(circle at 16% 12%, rgba(42, 167, 201, 0.18), transparent 28vw),
    radial-gradient(circle at 86% 4%, rgba(215, 144, 38, 0.16), transparent 24vw),
    linear-gradient(120deg, rgba(255, 255, 255, 0.82), rgba(229, 239, 250, 0.78)),
    linear-gradient(rgba(16, 42, 76, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 76, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 34px 34px, 34px 34px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(47, 111, 181, 0.055) 42% 58%, transparent 58%),
    radial-gradient(circle at 50% 100%, rgba(16, 42, 76, 0.06), transparent 42%);
}

.ambient {
  display: block;
  position: fixed;
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
  filter: blur(2px);
  animation: premiumFloat 12s ease-in-out infinite;
}

.ambient-a {
  width: 360px;
  height: 360px;
  left: -150px;
  top: 9vh;
  border-radius: 42% 58% 64% 36%;
  background: radial-gradient(circle, rgba(42, 167, 201, 0.18), transparent 68%);
}

.ambient-b {
  width: 430px;
  height: 430px;
  right: -190px;
  bottom: -80px;
  border-radius: 60% 40% 38% 62%;
  background: radial-gradient(circle, rgba(215, 144, 38, 0.16), transparent 70%);
  animation-delay: -5s;
}

@keyframes premiumFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(14px, -18px, 0) rotate(5deg); }
}

.glass-panel,
.metric-card,
.model-card,
.plan-card,
.content-block,
.table-wrap,
.patent-item,
.sub-panel {
  border-color: var(--premium-line);
}

.auth-screen {
  width: min(1188px, calc(100vw - 42px));
  gap: 22px;
}

.auth-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(16, 42, 76, 0.98), rgba(23, 59, 103, 0.96) 48%, rgba(20, 92, 132, 0.94)),
    radial-gradient(circle at 80% 16%, rgba(215, 144, 38, 0.32), transparent 34%);
  box-shadow: 0 30px 90px rgba(16, 42, 76, 0.27);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 72% 72%, rgba(42, 167, 201, 0.25), transparent 28%);
  background-size: 38px 38px, 38px 38px, auto;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.auth-hero::after {
  display: block;
  right: -96px;
  bottom: -120px;
  width: 380px;
  height: 380px;
  border-color: rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle, rgba(255,255,255,0.13), transparent 66%);
}

.auth-hero .brand-logo {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.auth-hero h1 {
  text-wrap: balance;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}

.hero-copy { max-width: 600px; }

.hero-metrics div,
.trust-strip span {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-visual {
  position: absolute;
  right: 42px;
  bottom: 108px;
  z-index: 0;
  width: 290px;
  height: 205px;
  opacity: 0.84;
}

.hero-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-family: var(--font-mono);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.node-a { left: 18px; top: 26px; width: 96px; height: 96px; font-size: 28px; }
.node-b { right: 18px; top: 0; width: 78px; height: 78px; color: #17365f; background: rgba(255, 214, 145, 0.92); }
.node-c { right: 46px; bottom: 18px; width: 128px; height: 70px; color: #ccefff; }
.hero-link {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.05));
}
.link-a { left: 104px; top: 75px; width: 112px; transform: rotate(-18deg); }
.link-b { left: 106px; top: 108px; width: 118px; transform: rotate(21deg); }

.auth-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--premium-glow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(145%);
}

.auth-icon,
.segmented button.active,
.account-card .avatar {
  box-shadow: 0 12px 28px rgba(36, 74, 124, 0.16);
}

.shell {
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  border: 0;
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(16, 42, 76, 0.98), rgba(19, 49, 86, 0.96) 54%, rgba(11, 30, 55, 0.98)),
    radial-gradient(circle at 30% 0%, rgba(215, 144, 38, 0.16), transparent 34%);
  box-shadow: 14px 0 44px rgba(16, 42, 76, 0.15);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.6;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar .brand-logo-sidebar {
  width: 168px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
}

.sidebar .nav button {
  min-height: 46px;
  border-radius: 12px;
  color: rgba(224, 235, 247, 0.76);
}

.sidebar .nav button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .nav button.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  box-shadow: inset 3px 0 0 var(--premium-gold), 0 12px 30px rgba(0, 0, 0, 0.12);
}

.sidebar .nav button.active svg { color: #ffd695; }

.sidebar .account-card {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar .account-card strong { color: #fff; }
.sidebar .account-card span { color: rgba(224, 235, 247, 0.72); }
.sidebar .account-meta span { color: #fff; background: rgba(255, 255, 255, 0.12); }
.sidebar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); }
.sidebar .btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }

.main { max-width: 1740px; padding-right: 34px; padding-left: 34px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 -34px;
  padding: 22px 34px 18px;
  background: rgba(244, 248, 252, 0.82);
  border-bottom-color: rgba(117, 145, 179, 0.22);
  backdrop-filter: blur(18px) saturate(145%);
}

.topbar h2 {
  font-size: 28px;
  background: linear-gradient(135deg, var(--premium-ink), var(--premium-blue) 62%, var(--premium-gold));
  -webkit-background-clip: text;
  background-clip: text;
}

.model-pill,
.btn.secondary,
.btn.ghost {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(24, 47, 79, 0.055);
}

.btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--premium-blue), var(--premium-navy-2));
  box-shadow: 0 12px 26px rgba(47, 111, 181, 0.24);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #367cc9, var(--premium-navy));
  box-shadow: 0 16px 34px rgba(47, 111, 181, 0.3);
}

.btn.secondary:hover:not(:disabled),
.btn.ghost:hover:not(:disabled) {
  border-color: rgba(47, 111, 181, 0.34);
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 47, 79, 0.09);
}

.metric-grid,
.grid,
.model-grid,
.plan-grid { gap: 16px; }

.metric-card,
.panel,
.model-card,
.plan-card {
  border-radius: 18px;
  background: var(--premium-paper);
  box-shadow: 0 12px 34px rgba(24, 47, 79, 0.075);
  backdrop-filter: blur(14px) saturate(120%);
}

.metric-card {
  min-height: 138px;
  padding: 18px;
  border-top: 0;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 111, 181, 0.14), rgba(42, 167, 201, 0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.metric-card:nth-child(2)::after { background: linear-gradient(135deg, rgba(56, 127, 122, 0.16), rgba(42, 167, 201, 0.08)); }
.metric-card:nth-child(3)::after { background: linear-gradient(135deg, rgba(215, 144, 38, 0.2), rgba(255, 214, 145, 0.18)); }
.metric-card:nth-child(4)::after { background: linear-gradient(135deg, rgba(53, 113, 83, 0.18), rgba(103, 190, 140, 0.1)); }
.metric-card:nth-child(5)::after { background: linear-gradient(135deg, rgba(166, 75, 75, 0.16), rgba(215, 144, 38, 0.1)); }

.metric-card strong,
.plan-card > strong { color: var(--premium-navy-2); }

.panel { padding: 20px; }
.panel::after,
.model-card::after,
.plan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 36%);
  opacity: 0.7;
}

.panel > *,
.model-card > *,
.plan-card > * { position: relative; z-index: 1; }

.toolbar h3 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.toolbar h3::before {
  content: "";
  width: 9px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--premium-blue), var(--premium-gold));
  box-shadow: 0 6px 14px rgba(47, 111, 181, 0.22);
}

.badge,
.status {
  border: 1px solid rgba(215, 144, 38, 0.18);
  border-radius: 999px;
}

input,
textarea,
select {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

input:focus,
textarea:focus,
select:focus {
  background: #fff;
  border-color: rgba(47, 111, 181, 0.52);
  box-shadow: 0 0 0 4px rgba(47, 111, 181, 0.12);
}

.table-wrap {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(24, 47, 79, 0.05);
}

th {
  background: linear-gradient(180deg, #f7f9fc, #edf3f8);
}

tbody tr:hover { background: rgba(47, 111, 181, 0.045); }

.model-card,
.plan-card,
.patent-item,
.content-block,
.empty-state,
.sub-panel,
.diagram-box { border-radius: 16px; }

.model-card.active,
.patent-item.active {
  border-color: rgba(47, 111, 181, 0.38);
  background: linear-gradient(135deg, rgba(47, 111, 181, 0.08), rgba(255, 255, 255, 0.9));
  box-shadow: inset 4px 0 0 var(--premium-blue), 0 12px 30px rgba(24, 47, 79, 0.07);
}

.plan-card.featured {
  border: 0;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--premium-gold), var(--premium-blue)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 22px 52px rgba(126, 82, 22, 0.14);
}

.plan-card.featured::before {
  content: "推荐";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--premium-gold), #b96d11);
  font-size: 11px;
  font-weight: 800;
}

.diagram-box {
  background:
    radial-gradient(circle at 20px 20px, rgba(47, 111, 181, 0.08) 2px, transparent 2px),
    linear-gradient(135deg, #ffffff, #f4f8fc);
  background-size: 22px 22px, auto;
}

.empty-state span {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 111, 181, 0.14), rgba(215, 144, 38, 0.12));
}

.toast {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(16, 42, 76, 0.22);
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #0e1622;
    background-image:
      radial-gradient(circle at 16% 12%, rgba(42, 167, 201, 0.14), transparent 28vw),
      radial-gradient(circle at 86% 4%, rgba(215, 144, 38, 0.12), transparent 24vw),
      linear-gradient(120deg, rgba(10, 18, 30, 0.9), rgba(14, 25, 40, 0.92)),
      linear-gradient(rgba(143, 180, 222, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(143, 180, 222, 0.03) 1px, transparent 1px);
  }

  .topbar { background: rgba(14, 22, 34, 0.82); }
  .auth-card,
  .metric-card,
  .panel,
  .model-card,
  .plan-card,
  .model-pill,
  .btn.secondary,
  .btn.ghost,
  input,
  textarea,
  select,
  .table-wrap { background: rgba(24, 34, 46, 0.88); }
  .panel::after,
  .model-card::after,
  .plan-card::after { opacity: 0.08; }
  .metric-card strong,
  .plan-card > strong { color: #c8e0f8; }
  th { background: #202c39; }
  .model-card.active,
  .patent-item.active { background: linear-gradient(135deg, rgba(47, 111, 181, 0.18), rgba(24, 34, 46, 0.92)); }
  .plan-card.featured { background: linear-gradient(#18222e, #18222e) padding-box, linear-gradient(135deg, var(--premium-gold), #8fb4de) border-box; }
}

@media (max-width: 900px) {
  .sidebar {
    background: linear-gradient(180deg, rgba(16, 42, 76, 0.98), rgba(18, 49, 86, 0.98));
  }
  .topbar {
    position: sticky;
    top: 0;
    margin: 0 -16px;
    padding-right: 16px;
    padding-left: 16px;
  }
  .hero-visual { display: none; }
}

@media (max-width: 620px) {
  .auth-screen { width: min(100% - 22px, 1188px); }
  .auth-hero,
  .auth-card,
  .metric-card,
  .panel,
  .model-card,
  .plan-card { border-radius: 18px; }
  .topbar { margin: 0 -12px; padding-right: 12px; padding-left: 12px; }
  .hero-metrics div { min-width: calc(50% - 5px); }
}

/* Fine-tune hero decoration so it never competes with headline text */
.auth-hero h1 { max-width: 610px; }
.hero-copy { max-width: 535px; }
.hero-visual {
  right: 26px;
  bottom: 118px;
  width: 260px;
  height: 180px;
  opacity: 0.42;
}
.node-a { left: 38px; top: 34px; width: 84px; height: 84px; font-size: 24px; }
.node-b { right: 18px; top: 10px; width: 70px; height: 70px; }
.node-c { right: 38px; bottom: 10px; width: 116px; height: 62px; }
.link-a { left: 118px; top: 75px; width: 88px; }
.link-b { left: 115px; top: 105px; width: 98px; }

@media (max-width: 1280px) {
  .hero-visual { opacity: 0.24; right: 8px; }
}

/* Commercial SaaS facelift - focused polish requested 2026-07-29 */
:root {
  --biz-bg: #eef5fb;
  --biz-ink: #102033;
  --biz-navy: #0b2341;
  --biz-navy-2: #123a66;
  --biz-blue: #1f6fbe;
  --biz-sky: #37b3d5;
  --biz-gold: #d89b35;
  --biz-green: #1b8a68;
  --biz-card: rgba(255, 255, 255, 0.94);
  --biz-line: rgba(121, 150, 184, 0.28);
  --biz-shadow: 0 26px 70px rgba(15, 42, 74, 0.16);
  --biz-shadow-soft: 0 12px 34px rgba(15, 42, 74, 0.09);
}

body {
  background-color: var(--biz-bg);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(55, 179, 213, 0.20), transparent 30vw),
    radial-gradient(circle at 88% 16%, rgba(216, 155, 53, 0.15), transparent 27vw),
    linear-gradient(135deg, rgba(255,255,255,0.86), rgba(225,237,249,0.82) 52%, rgba(247,250,253,0.92)),
    linear-gradient(rgba(20, 65, 108, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 65, 108, 0.028) 1px, transparent 1px);
  background-size: auto, auto, auto, 36px 36px, 36px 36px;
}

/* Login page: turn the entry into a commercial product gateway */
.auth-screen {
  width: min(1220px, calc(100vw - 48px));
  grid-template-columns: minmax(0, 1.16fr) minmax(380px, 448px);
  gap: clamp(22px, 3vw, 34px);
}

.auth-hero {
  min-height: 650px;
  padding: 42px 46px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(8, 30, 56, 0.98), rgba(17, 61, 106, 0.98) 48%, rgba(13, 105, 142, 0.94)),
    radial-gradient(circle at 72% 20%, rgba(216, 155, 53, 0.24), transparent 34%);
  box-shadow: 0 34px 96px rgba(9, 35, 66, 0.30);
}

.auth-hero > * { position: relative; z-index: 2; }
.auth-hero::before {
  opacity: 0.92;
  background:
    linear-gradient(rgba(255,255,255,0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.065) 1px, transparent 1px),
    radial-gradient(circle at 78% 70%, rgba(55,179,213,0.23), transparent 30%),
    linear-gradient(120deg, transparent 0 45%, rgba(255,255,255,0.07) 45% 46%, transparent 46%);
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.product-ribbon {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(235, 245, 255, 0.88);
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.13);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
}
.product-ribbon span {
  color: #ffd99b;
  text-transform: uppercase;
  letter-spacing: 0.08em !important;
}
.product-ribbon strong { color: #fff; }

.auth-hero .brand-row { margin-top: 4px; }
.auth-hero .brand-logo {
  width: min(250px, 68vw);
  padding: 11px 16px;
  border-radius: 18px;
}

.auth-hero .eyebrow {
  margin-top: 2px;
  color: #ffc96f;
  letter-spacing: 0.11em !important;
}

.auth-hero h1 {
  max-width: 650px;
  font-size: clamp(43px, 4.7vw, 68px);
  line-height: 1.04;
  text-wrap: balance;
}

.hero-copy {
  max-width: 650px;
  color: rgba(232, 243, 255, 0.86);
  font-size: 17px;
}

.commerce-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(650px, 100%);
}
.commerce-board div {
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  backdrop-filter: blur(12px);
}
.commerce-board span,
.commerce-board small {
  display: block;
  color: rgba(232, 243, 255, 0.70);
  font-size: 12px;
  font-weight: 700;
}
.commerce-board strong {
  display: block;
  margin: 8px 0 3px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: -0.03em !important;
}

.hero-metrics div {
  min-width: 128px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
}
.trust-strip span {
  border-radius: 999px;
  color: rgba(240, 247, 255, 0.82);
}

.auth-card {
  align-self: center;
  min-height: 472px;
  padding: 30px;
  border: 1px solid rgba(148, 170, 196, 0.24);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,252,255,0.92)),
    radial-gradient(circle at 85% 8%, rgba(55, 179, 213, 0.12), transparent 30%);
  box-shadow: 0 28px 74px rgba(17, 52, 88, 0.16), inset 0 1px 0 rgba(255,255,255,0.95);
}
.login-version {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--biz-blue);
  background: rgba(31,111,190,0.09);
  border: 1px solid rgba(31,111,190,0.12);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em !important;
}
.auth-card-heading h2 {
  color: var(--biz-ink);
  font-size: 24px;
  letter-spacing: -0.03em !important;
}
.auth-card-heading p { color: #667890; }
.auth-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--biz-blue);
  background: linear-gradient(145deg, #eef7ff, #ffffff);
}
.segmented {
  padding: 5px;
  border-radius: 15px;
  background: #edf3f8;
}
.segmented button { border-radius: 11px; }
.segmented button.active {
  color: var(--biz-navy-2);
  background: #fff;
}
.auth-card .btn.primary {
  min-height: 46px;
  border-radius: 13px;
  font-size: 16px;
}
.login-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.login-benefits span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(121,150,184,0.22);
  border-radius: 12px;
  color: #48617f;
  background: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 800;
}
.login-benefits svg { width: 15px; height: 15px; color: var(--biz-blue); }

/* Business console chrome */
.sidebar {
  background:
    radial-gradient(circle at 70% -10%, rgba(216,155,53,0.20), transparent 30%),
    linear-gradient(180deg, #081f3b, #12385f 48%, #081d36);
}
.sidebar .nav button.active {
  background: linear-gradient(90deg, rgba(216,155,53,0.22), rgba(255,255,255,0.09));
  box-shadow: inset 4px 0 0 var(--biz-gold), 0 14px 34px rgba(0,0,0,0.14);
}

.enterprise-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(216,155,53,0.22);
  border-radius: 999px;
  color: #8b5a11;
  background: linear-gradient(145deg, rgba(255,246,225,0.95), rgba(255,255,255,0.76));
  box-shadow: 0 10px 24px rgba(126,82,22,0.08);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.enterprise-tag svg { width: 15px; height: 15px; }

.commerce-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(121,150,184,0.20);
  box-shadow: var(--biz-shadow-soft);
}
.commerce-strip article {
  min-height: 92px;
  padding: 17px 18px;
  background:
    radial-gradient(circle at 92% 20%, rgba(55,179,213,0.12), transparent 34%),
    rgba(255,255,255,0.88);
}
.commerce-strip article:nth-child(2) { background: radial-gradient(circle at 92% 20%, rgba(216,155,53,0.14), transparent 34%), rgba(255,255,255,0.88); }
.commerce-strip article:nth-child(3) { background: radial-gradient(circle at 92% 20%, rgba(27,138,104,0.12), transparent 34%), rgba(255,255,255,0.88); }
.commerce-strip article:nth-child(4) { background: radial-gradient(circle at 92% 20%, rgba(31,111,190,0.12), transparent 34%), rgba(255,255,255,0.88); }
.commerce-strip span,
.commerce-strip small {
  display: block;
  color: #64758a;
  font-size: 12px;
  font-weight: 750;
}
.commerce-strip strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--biz-navy-2);
  font-size: 22px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-root { padding-top: 18px; }
.metric-card,
.panel,
.model-card,
.plan-card {
  border: 1px solid rgba(121,150,184,0.24);
  border-radius: 20px;
  background: rgba(255,255,255,0.90);
  box-shadow: 0 14px 42px rgba(15,42,74,0.08);
}
.metric-card strong { color: var(--biz-navy-2); }
.metric-card::after {
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 10px 26px rgba(15,42,74,0.08);
}
.toolbar h3::before {
  width: 8px;
  height: 22px;
  background: linear-gradient(180deg, var(--biz-gold), var(--biz-blue));
}

/* Tables: more enterprise, less cramped; prevents clipped admin columns */
.table-wrap {
  border-radius: 16px;
  background: #fff;
  scrollbar-gutter: stable both-edges;
}
table {
  min-width: 760px;
  table-layout: auto;
}
th, td {
  padding: 13px 14px;
  white-space: nowrap;
}
td:first-child,
th:first-child {
  padding-left: 18px;
}
td small,
td select,
td input,
td textarea {
  white-space: normal;
}
tbody tr:hover {
  background: rgba(31,111,190,0.045);
}
#app .grid.cols-2 > .panel .table-wrap {
  max-height: calc(100vh - 240px);
}
#app .grid.cols-2 > .panel .table-wrap table {
  min-width: 700px;
}
#app .grid.cols-2 > .panel:first-child .table-wrap table {
  min-width: 660px;
}
#app .grid.cols-2 > .panel:first-child td,
#app .grid.cols-2 > .panel:first-child th {
  padding-right: 10px;
  padding-left: 10px;
}
#app .grid.cols-2 > .panel:first-child td:first-child,
#app .grid.cols-2 > .panel:first-child th:first-child {
  min-width: 150px;
  padding-left: 16px;
}
#app .grid.cols-2 > .panel:first-child input,
#app .grid.cols-2 > .panel:first-child select {
  min-width: 92px;
}

.badge,
.status {
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}
.btn.primary {
  background: linear-gradient(135deg, #2c79ca, #123a66);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #3586dc, #0b2341);
}

@media (prefers-color-scheme: dark) {
  .auth-card,
  .commerce-strip article,
  .metric-card,
  .panel,
  .model-card,
  .plan-card,
  .table-wrap {
    background: rgba(24, 34, 48, 0.92);
  }
  .commerce-strip { background: rgba(64, 83, 108, 0.55); }
  .commerce-strip strong { color: #d6e9fc; }
  .commerce-strip article:nth-child(n) { background: rgba(24, 34, 48, 0.92); }
  .enterprise-tag { color: #ffd99b; background: rgba(216,155,53,0.12); }
  .login-benefits span { color: #b6c7da; background: rgba(255,255,255,0.04); }
}

@media (max-width: 1180px) {
  .commerce-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .auth-screen {
    width: min(100% - 26px, 1220px);
    grid-template-columns: 1fr;
  }
  .auth-card { order: -1; }
  .auth-hero { min-height: 560px; }
  .commerce-board { grid-template-columns: 1fr; }
  .topbar-actions { flex-wrap: wrap; }
  .enterprise-tag { min-height: 36px; }
  .commerce-strip { margin-top: 14px; }
}

@media (max-width: 620px) {
  .auth-hero { padding: 26px 24px; }
  .auth-hero h1 { font-size: 34px; }
  .commerce-board { display: none; }
  .login-benefits { grid-template-columns: 1fr; }
  .commerce-strip { grid-template-columns: 1fr; border-radius: 16px; }
  .commerce-strip article { min-height: 78px; padding: 14px; }
  .enterprise-tag span { display: none; }
  table { min-width: 680px; }
}

/* Commercial login final balance: full viewport fit and quieter background diagram */
.auth-screen { padding: 22px 0; }
.auth-hero { min-height: 590px; padding: 36px 46px; }
.auth-hero h1 { font-size: clamp(40px, 4.2vw, 60px); }
.hero-copy { font-size: 16px; line-height: 1.7; }
.commerce-board div { min-height: 78px; padding: 12px 16px; background: linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10)); }
.commerce-board strong { font-size: 22px; }
.hero-visual { opacity: 0.13; right: 26px; bottom: 54px; }
@media (max-height: 780px) and (min-width: 901px) {
  .auth-screen { padding: 16px 0; }
  .auth-hero { min-height: 558px; padding-top: 30px; padding-bottom: 30px; }
  .auth-hero h1 { font-size: clamp(38px, 4vw, 54px); }
  .hero-metrics div { padding: 10px 14px; }
  .commerce-board div { min-height: 70px; padding: 10px 14px; }
  .trust-strip { display: none; }
}

/* Fit dense business tables inside two-column commercial panels */
#app .grid.cols-2 > .panel:nth-child(2) .table-wrap {
  overflow-x: hidden;
}
#app .grid.cols-2 > .panel:nth-child(2) .table-wrap table {
  min-width: 100%;
  table-layout: fixed;
}
#app .grid.cols-2 > .panel:nth-child(2) th,
#app .grid.cols-2 > .panel:nth-child(2) td {
  padding-left: 10px;
  padding-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#app .grid.cols-2 > .panel:nth-child(2) td:nth-child(2),
#app .grid.cols-2 > .panel:nth-child(2) th:nth-child(2) {
  width: 42%;
}

/* Taste refresh: a restrained patent operations workspace */
:root {
  --taste-ink: #102a43;
  --taste-ink-soft: #47627c;
  --taste-accent: #0b7f86;
  --taste-accent-dark: #075e66;
  --taste-accent-soft: #e5f4f3;
  --taste-surface: #ffffff;
  --taste-surface-muted: #f4f7fa;
  --taste-line: #d8e2eb;
  --taste-shadow: 0 10px 28px rgba(16, 42, 67, 0.07);
  --taste-radius: 14px;
  --taste-pill: 999px;
}

html { background: #f4f7fa; }

body {
  color: var(--taste-ink);
  background: #f4f7fa;
  background-image:
    linear-gradient(rgba(16, 42, 67, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 67, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

body::before,
.ambient,
.ambient-a,
.ambient-b { display: none; }

.glass-panel,
.metric-card,
.panel,
.model-card,
.plan-card,
.content-block,
.table-wrap,
.patent-item,
.sub-panel,
.empty-state,
.diagram-box {
  border-color: var(--taste-line);
  border-radius: var(--taste-radius);
  box-shadow: var(--taste-shadow);
}

.auth-screen {
  width: min(1160px, calc(100vw - 40px));
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 420px);
  gap: 28px;
  padding: 34px 0;
}

.auth-hero {
  min-height: 600px;
  padding: clamp(32px, 4vw, 52px);
  border-radius: 22px;
  background: #102a43;
  box-shadow: 0 24px 60px rgba(16, 42, 67, 0.2);
}

.auth-hero::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.auth-hero::after { border-color: rgba(255, 255, 255, 0.12); }
.auth-hero .eyebrow { color: #7ed8d5; }
.auth-hero h1 { max-width: 650px; font-size: clamp(35px, 4.2vw, 56px); line-height: 1.08; }
.hero-copy { max-width: 590px; color: #c8d9e8; }

.hero-metrics div,
.trust-strip span {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: var(--taste-radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.commerce-board { gap: 10px; }
.commerce-board div { border-radius: var(--taste-radius); background: rgba(255, 255, 255, 0.08); }

.auth-card {
  align-self: center;
  border-radius: 22px;
  background: var(--taste-surface);
  box-shadow: 0 18px 46px rgba(16, 42, 67, 0.12);
}

.auth-card-heading { margin-bottom: 22px; }
.auth-icon { color: var(--taste-accent); border-color: #c7e4e2; background: var(--taste-accent-soft); }
.segmented { border-radius: 10px; background: var(--taste-surface-muted); }
.segmented button { border-radius: 8px; }
.segmented button.active { color: var(--taste-accent-dark); background: var(--taste-surface); box-shadow: 0 3px 10px rgba(16, 42, 67, 0.08); }

input,
textarea,
select {
  border-color: var(--taste-line);
  border-radius: 10px;
  color: var(--taste-ink);
  background: var(--taste-surface);
}

input:hover,
textarea:hover,
select:hover { border-color: #9bb4c7; }
input:focus,
textarea:focus,
select:focus { border-color: var(--taste-accent); box-shadow: 0 0 0 4px rgba(11, 127, 134, 0.12); }

.btn { border-radius: 10px; }
.btn.primary { background: var(--taste-accent); box-shadow: 0 8px 18px rgba(11, 127, 134, 0.2); }
.btn.primary:hover:not(:disabled) { background: var(--taste-accent-dark); box-shadow: 0 10px 22px rgba(11, 127, 134, 0.24); }
.btn.secondary,
.btn.ghost { color: var(--taste-ink-soft); border-color: var(--taste-line); background: var(--taste-surface); }
.btn.secondary:hover:not(:disabled),
.btn.ghost:hover:not(:disabled) { color: var(--taste-accent-dark); border-color: #9dc9c8; background: var(--taste-accent-soft); }

.shell { grid-template-columns: 258px minmax(0, 1fr); }
.sidebar { background: #102a43; box-shadow: 12px 0 32px rgba(16, 42, 67, 0.12); }
.sidebar::after { opacity: 0.3; }
.sidebar .nav button { border-radius: 10px; }
.sidebar .nav button.active { background: rgba(255, 255, 255, 0.1); box-shadow: inset 3px 0 0 #7ed8d5; }
.sidebar .nav button.active svg { color: #7ed8d5; }
.sidebar .account-card { border-radius: var(--taste-radius); background: rgba(255, 255, 255, 0.08); }

.main { max-width: 1720px; padding-right: 36px; padding-left: 36px; }
.topbar { margin: 0 -36px; padding-right: 36px; padding-left: 36px; background: rgba(244, 247, 250, 0.9); border-bottom-color: var(--taste-line); }
.topbar h2 { color: var(--taste-ink); background: none; -webkit-text-fill-color: currentColor; }
.model-pill { border-radius: var(--taste-pill); }
.enterprise-tag { color: var(--taste-accent-dark); border-color: #c7e4e2; background: var(--taste-accent-soft); }
.status-light { background: var(--taste-accent); box-shadow: 0 0 0 3px rgba(11, 127, 134, 0.14); }

.commerce-strip { border-radius: var(--taste-radius); background: var(--taste-surface); box-shadow: var(--taste-shadow); }
.commerce-strip article + article { border-left-color: var(--taste-line); }
.metric-card,
.panel,
.model-card,
.plan-card { background: var(--taste-surface); }
.metric-card { min-height: 136px; border-top: 3px solid var(--taste-accent); }
.metric-card:nth-child(2),
.metric-card:nth-child(3),
.metric-card:nth-child(4),
.metric-card:nth-child(5) { border-top-color: var(--taste-accent); }
.metric-card::after { width: 38px; height: 38px; border-radius: 12px; background: var(--taste-accent-soft); box-shadow: none; }
.metric-card:nth-child(2)::after,
.metric-card:nth-child(3)::after,
.metric-card:nth-child(4)::after,
.metric-card:nth-child(5)::after { background: var(--taste-accent-soft); }
.metric-card strong,
.plan-card > strong { color: var(--taste-ink); }

.panel { padding: 20px; }
.toolbar h3::before { width: 7px; height: 16px; background: var(--taste-accent); box-shadow: none; }
.badge,
.status { border-color: #c7e4e2; color: var(--taste-accent-dark); background: var(--taste-accent-soft); }
.badge.muted { border-color: var(--taste-line); color: var(--taste-ink-soft); background: var(--taste-surface-muted); }
.model-card.active,
.patent-item.active { border-color: #9dc9c8; background: #f0f9f8; box-shadow: inset 3px 0 0 var(--taste-accent), var(--taste-shadow); }
.plan-card.featured { border-color: #7eb5b4; background: #f0f9f8; box-shadow: var(--taste-shadow); }
.plan-card.featured::before { background: var(--taste-accent); }
.table-wrap { box-shadow: none; }
th { background: var(--taste-surface-muted); }
tbody tr:hover { background: #f0f9f8; }
.empty-state { background: var(--taste-surface-muted); }
.empty-state span { background: var(--taste-accent-soft); }
.auth-card .btn.primary { border-radius: 10px; }

@media (prefers-color-scheme: dark) {
  :root {
    --taste-ink: #e5edf5;
    --taste-ink-soft: #a9bacb;
    --taste-accent: #75d2ce;
    --taste-accent-dark: #a6e4e0;
    --taste-accent-soft: rgba(117, 210, 206, 0.14);
    --taste-surface: #172431;
    --taste-surface-muted: #202f3d;
    --taste-line: #334656;
    --taste-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  }
  html,
  body { background: #0f1a24; }
  body { background-image: linear-gradient(rgba(117, 210, 206, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(117, 210, 206, 0.025) 1px, transparent 1px); }
  .topbar { background: rgba(15, 26, 36, 0.9); }
  .auth-card,
  .commerce-strip,
  .metric-card,
  .panel,
  .model-card,
  .plan-card,
  .table-wrap,
  input,
  textarea,
  select { background: var(--taste-surface); }
  .model-card.active,
  .patent-item.active,
  .plan-card.featured,
  tbody tr:hover { background: rgba(117, 210, 206, 0.1); }
  th { background: var(--taste-surface-muted); }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; gap: 16px; }
  .auth-card { order: -1; }
  .main { padding-right: 20px; padding-left: 20px; }
  .topbar { margin: 0 -20px; padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 620px) {
  .auth-screen { width: min(100% - 24px, 1160px); padding: 12px 0; }
  .auth-hero { min-height: auto; padding: 26px 22px; border-radius: 18px; }
  .auth-card { border-radius: 18px; }
  .auth-hero h1 { font-size: 30px; }
  .main { padding-right: 12px; padding-left: 12px; }
  .topbar { margin: 0 -12px; padding-right: 12px; padding-left: 12px; }
  .commerce-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-strip article + article { border-left: 0; border-top: 1px solid var(--taste-line); }
}
#app .grid.cols-2 > .panel:nth-child(2) td:last-child,
#app .grid.cols-2 > .panel:nth-child(2) th:last-child {
  width: 72px;
}

/* Commercial finish: reduce decoration and give every surface one visual language. */
:root {
  --finish-ink: #102a43;
  --finish-ink-muted: #63768a;
  --finish-accent: #0b7f86;
  --finish-accent-dark: #075e66;
  --finish-accent-soft: #e7f5f4;
  --finish-paper: #ffffff;
  --finish-canvas: #f4f7fa;
  --finish-line: #d7e1ea;
  --finish-radius: 14px;
}

body {
  color: var(--finish-ink);
  background: var(--finish-canvas);
  background-image: none;
}

/* Login is a product gateway, not a data dashboard. Keep only the message and proof points. */
.auth-screen {
  width: min(1240px, calc(100vw - 64px));
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, 420px);
  gap: 32px;
  padding: 32px 0;
}

.auth-hero {
  min-height: 560px;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  border-radius: 24px;
  background: #102a43;
  box-shadow: 0 24px 56px rgba(16, 42, 67, 0.18);
}

.auth-hero::before {
  opacity: 0.55;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

.auth-hero::after,
.auth-hero .hero-visual,
.auth-hero .commerce-board,
.auth-hero .trust-strip { display: none; }

.auth-hero .brand-logo {
  width: 190px;
  padding: 9px 12px;
  border-radius: 14px;
}

.auth-hero h1 {
  max-width: 660px;
  font-size: clamp(38px, 4.2vw, 56px);
  line-height: 1.08;
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color: #c8d9e8;
  font-size: 16px;
  line-height: 1.75;
}

.hero-metrics { margin-top: 6px; }
.hero-metrics div { min-width: 118px; padding: 13px 14px; border-radius: var(--finish-radius); background: rgba(255, 255, 255, 0.08); }
.hero-metrics strong { font-size: 24px; }

.auth-card {
  align-self: center;
  min-height: 0;
  justify-content: center;
  padding: 32px;
  border-radius: 18px;
  border-color: var(--finish-line);
  background: var(--finish-paper);
  box-shadow: 0 18px 46px rgba(16, 42, 67, 0.1);
}

.auth-card-heading { margin-bottom: 18px; }
.auth-card-heading h2 { color: var(--finish-ink); font-size: 22px; }
.auth-card-heading p { color: var(--finish-ink-muted); }
.login-version { color: var(--finish-accent-dark); background: var(--finish-accent-soft); border-color: #c5e3e1; }
.auth-icon { color: var(--finish-accent); background: var(--finish-accent-soft); border-color: #c5e3e1; box-shadow: none; }
.segmented { margin-bottom: 18px; border-color: var(--finish-line); background: #f1f5f8; }
.segmented button.active { color: var(--finish-accent-dark); }
.login-benefits span { border-color: var(--finish-line); color: var(--finish-ink-muted); background: #f8fafb; }

/* Workspace chrome */
.sidebar { background: #102a43; box-shadow: 10px 0 28px rgba(16, 42, 67, 0.12); }
.sidebar::after { display: none; }
.topbar { background: var(--finish-canvas); border-bottom-color: var(--finish-line); backdrop-filter: none; }
.topbar::after { display: none; }
.topbar h2 { color: var(--finish-ink); }
.enterprise-tag { color: var(--finish-accent-dark); background: var(--finish-accent-soft); border-color: #c5e3e1; }
.model-pill { border-color: var(--finish-line); box-shadow: 0 4px 14px rgba(16, 42, 67, 0.05); }
.commerce-strip,
.metric-card,
.panel,
.model-card,
.plan-card { border-color: var(--finish-line); background: var(--finish-paper); box-shadow: 0 8px 24px rgba(16, 42, 67, 0.06); }
.commerce-strip article,
.commerce-strip article:nth-child(2),
.commerce-strip article:nth-child(3),
.commerce-strip article:nth-child(4) { background: var(--finish-paper); }
.commerce-strip article + article { border-left-color: var(--finish-line); }
.commerce-strip strong { color: var(--finish-ink); }
.commerce-strip span,
.commerce-strip small,
.metric-card span,
.metric-card small { color: var(--finish-ink-muted); }
.metric-card { border-top: 3px solid var(--finish-accent); }
.metric-card:nth-child(2),
.metric-card:nth-child(3),
.metric-card:nth-child(4),
.metric-card:nth-child(5) { border-top-color: var(--finish-accent); }
.metric-card::after,
.metric-card:nth-child(2)::after,
.metric-card:nth-child(3)::after,
.metric-card:nth-child(4)::after,
.metric-card:nth-child(5)::after { background: var(--finish-accent-soft); }
.metric-card strong,
.plan-card > strong { color: var(--finish-ink); }

.panel { padding: 20px; }
.toolbar h3::before { background: var(--finish-accent); }
.badge,
.status { color: var(--finish-accent-dark); background: var(--finish-accent-soft); border-color: #c5e3e1; }
.badge.muted { color: var(--finish-ink-muted); background: #f1f5f8; border-color: var(--finish-line); }
.table-wrap { border-color: var(--finish-line); box-shadow: none; }
th { color: var(--finish-ink-muted); background: #f3f6f8; }
td { border-bottom-color: #e6edf2; }
tbody tr:hover { background: #f2faf9; }

.model-card { border-top: 3px solid transparent; }
.model-card.active { border-top-color: var(--finish-accent); border-left-color: var(--finish-line); background: #f4fbfa; box-shadow: 0 8px 24px rgba(16, 42, 67, 0.07); }
.model-card dl { border: 1px solid #e3ebf0; background: #f5f8fa; }
.plan-card.featured { border: 2px solid #83bdbb; background: #f4fbfa; box-shadow: 0 10px 28px rgba(11, 127, 134, 0.1); }
.plan-card.featured::before { background: var(--finish-accent); }
.patent-item { background: #f8fafb; }
.patent-item.active { border-color: #8ec7c4; background: #f1faf9; box-shadow: inset 3px 0 0 var(--finish-accent), 0 8px 24px rgba(16, 42, 67, 0.06); }
.patent-preview { background: transparent; }
.content-block { background: #fbfcfd; box-shadow: none; }
.empty-state { border-color: var(--finish-line); background: #f7f9fb; box-shadow: none; }

@media (prefers-color-scheme: dark) {
  body { background: #0f1a24; background-image: none; }
  .topbar { background: #0f1a24; }
  .commerce-strip,
  .commerce-strip article,
  .commerce-strip article:nth-child(2),
  .commerce-strip article:nth-child(3),
  .commerce-strip article:nth-child(4),
  .metric-card,
  .panel,
  .model-card,
  .plan-card { background: #172431; }
  .model-card.active,
  .patent-item.active,
  .plan-card.featured { background: rgba(117, 210, 206, 0.1); }
  th { background: #202f3d; }
  .model-card dl { border-color: #334656; background: #202f3d; }
}

@media (max-width: 900px) {
  .auth-screen { width: min(100% - 32px, 760px); grid-template-columns: 1fr; }
  .auth-card { order: -1; min-height: auto; }
  .auth-hero { min-height: auto; }
}

@media (max-width: 620px) {
  .auth-screen { width: min(100% - 24px, 760px); padding: 12px 0; }
  .auth-card { padding: 22px; border-radius: 16px; }
  .auth-hero { padding: 28px 22px; border-radius: 18px; }
  .auth-hero h1 { font-size: 31px; }
  .hero-metrics div { min-width: calc(33.333% - 7px); }
  .hero-metrics strong { font-size: 21px; }
  .commerce-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Unified commercial operations system. This final layer retires the legacy visual variants above. */
:root {
  --ui-canvas: #f5f7f9;
  --ui-surface: #ffffff;
  --ui-surface-subtle: #f8fafb;
  --ui-border: #dbe3e8;
  --ui-border-strong: #c4d0d8;
  --ui-ink: #142b3d;
  --ui-muted: #627587;
  --ui-accent: #087d78;
  --ui-accent-strong: #05615e;
  --ui-accent-soft: #e2f2f0;
  --ui-navy: #102e43;
  --ui-navy-soft: #173d55;
  --ui-success: #16724e;
  --ui-warning: #a96510;
  --ui-danger: #c34242;
  --ui-radius: 12px;
  --ui-shadow: 0 8px 20px rgba(20, 43, 61, 0.06);
  --font-sans: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "Fira Code", Consolas, monospace;
}

* { letter-spacing: 0 !important; }
html, body { background: var(--ui-canvas); }
body {
  min-height: 100dvh;
  color: var(--ui-ink);
  font-family: var(--font-sans);
  background-image: linear-gradient(rgba(20, 43, 61, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 43, 61, 0.018) 1px, transparent 1px);
  background-size: 40px 40px;
}
body::before, .ambient, .ambient-a, .ambient-b { display: none !important; }

/* Shared controls */
.glass-panel, .panel, .metric-card, .model-card, .plan-card, .content-block, .sub-panel, .patent-item, .table-wrap, .empty-state, .diagram-box {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.panel::after, .model-card::after, .plan-card::after, .metric-card::after, .topbar::after { display: none; }
button, input, textarea, select { font-family: inherit; }
label { color: var(--ui-ink); font-size: 12px; font-weight: 700; }
input, textarea, select {
  min-height: 40px;
  color: var(--ui-ink);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface);
  box-shadow: none;
}
input:hover, textarea:hover, select:hover { border-color: var(--ui-border-strong); background: var(--ui-surface); }
input:focus, textarea:focus, select:focus { border-color: var(--ui-accent); box-shadow: 0 0 0 3px rgba(8, 125, 120, 0.12); }
input::placeholder, textarea::placeholder { color: #91a0ad; }
.btn {
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { color: #fff; background: var(--ui-accent); box-shadow: 0 5px 12px rgba(8, 125, 120, 0.17); }
.btn.primary:hover:not(:disabled) { background: var(--ui-accent-strong); box-shadow: 0 7px 14px rgba(8, 125, 120, 0.22); }
.btn.secondary, .btn.ghost { color: var(--ui-ink); border-color: var(--ui-border); background: var(--ui-surface); }
.btn.secondary:hover:not(:disabled), .btn.ghost:hover:not(:disabled) { color: var(--ui-accent-strong); border-color: #9dc9c6; background: var(--ui-accent-soft); }
.badge, .status { min-height: 24px; padding: 0 8px; border-radius: 6px; color: var(--ui-accent-strong); border: 1px solid #c0e0dc; background: var(--ui-accent-soft); font-size: 11px; font-weight: 700; }
.badge.muted { color: var(--ui-muted); border-color: var(--ui-border); background: #f3f6f8; }
.badge.success, .status.paid { color: var(--ui-success); background: #e7f6ee; border-color: #c8e9d6; }
.status.pending { color: var(--ui-warning); background: #fff5e7; border-color: #f0d6ae; }
.status.cancelled, .status.refunded { color: var(--ui-danger); background: #fdeceb; border-color: #f2c8c6; }

/* Authentication */
.auth-screen {
  width: min(1160px, calc(100vw - 48px));
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 408px);
  gap: 28px;
  padding: 32px 0;
}
.auth-hero {
  min-height: 572px;
  padding: 50px;
  gap: 16px;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--ui-navy);
  box-shadow: 0 22px 50px rgba(16, 46, 67, 0.18);
}
.auth-hero::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero::after, .auth-hero .commerce-board, .auth-hero .hero-visual, .auth-hero .trust-strip { display: none; }
.product-ribbon {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #dce9f0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
}
.product-ribbon span { color: #9dd4d0; }
.auth-hero .brand-logo { width: 182px; padding: 8px 11px; border-radius: 10px; background: #fff; filter: none; }
.auth-hero .eyebrow { margin: 0; color: #9dd4d0; font-size: 11px; letter-spacing: 0.1em !important; }
.auth-hero h1 { max-width: 620px; margin: 0; font-size: clamp(38px, 4.4vw, 56px); line-height: 1.1; letter-spacing: 0 !important; }
.hero-copy { max-width: 590px; margin: 0; color: #c5d7e2; font-size: 16px; line-height: 1.75; }
.hero-metrics { gap: 10px; margin-top: 6px; }
.hero-metrics div { min-width: 118px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 10px; background: rgba(255, 255, 255, 0.07); }
.hero-metrics strong { font-size: 25px; color: #fff; }
.hero-metrics span { color: #c5d7e2; font-size: 12px; }
.auth-card {
  align-self: center;
  padding: 28px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--ui-surface);
  box-shadow: 0 16px 40px rgba(20, 43, 61, 0.09);
}
.auth-card::before { display: none; }
.login-version { margin-bottom: 12px; padding: 5px 8px; border: 1px solid #c0e0dc; border-radius: 999px; color: var(--ui-accent-strong); background: var(--ui-accent-soft); font-size: 10px; }
.auth-card-heading { gap: 10px; margin-bottom: 18px; }
.auth-card-heading h2 { color: var(--ui-ink); font-size: 21px; }
.auth-card-heading p { color: var(--ui-muted); font-size: 12px; }
.auth-icon { width: 42px; height: 42px; color: var(--ui-accent); border: 1px solid #c0e0dc; border-radius: 8px; background: var(--ui-accent-soft); box-shadow: none; }
.segmented { padding: 4px; gap: 3px; border: 1px solid var(--ui-border); border-radius: 9px; background: #f2f5f7; }
.segmented button { min-height: 38px; border-radius: 6px; color: var(--ui-muted); font-size: 12px; }
.segmented button.active { color: var(--ui-accent-strong); background: #fff; box-shadow: 0 2px 5px rgba(20, 43, 61, 0.08); }
.auth-card .hint { color: var(--ui-muted); }
.login-benefits { gap: 6px; }
.login-benefits span { min-height: 34px; border: 1px solid var(--ui-border); border-radius: 7px; color: var(--ui-muted); background: #f8fafb; font-size: 11px; }
.login-benefits svg { color: var(--ui-accent); }

/* Application shell */
.shell { grid-template-columns: 244px minmax(0, 1fr); gap: 0; padding: 0; max-width: none; }
.sidebar {
  top: 0;
  height: 100dvh;
  padding: 22px 16px 16px;
  border: 0;
  border-radius: 0;
  color: #d9e5ec;
  background: var(--ui-navy);
  box-shadow: 8px 0 22px rgba(16, 46, 67, 0.08);
}
.sidebar::before, .sidebar::after { display: none; }
.brand-row.compact { min-height: 40px; margin: 0 8px 26px; }
.brand-logo-sidebar { width: 150px; padding: 7px 9px; border-radius: 8px; background: #fff; filter: none; }
.nav { gap: 4px; }
.nav button { min-height: 42px; padding: 0 11px; border-radius: 8px; color: #b9cbd8; font-size: 13px; font-weight: 600; }
.nav button:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav button.active { color: #fff; border-color: rgba(157, 212, 208, 0.25); background: rgba(157, 212, 208, 0.12); box-shadow: inset 3px 0 0 #83c8c3; }
.nav button.active svg { color: #83c8c3; }
.account-card { padding: 13px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.account-card strong { color: #fff; }
.account-card span { color: #b9cbd8; }
.account-card .avatar { background: #1a5266; }
.account-meta span { border-radius: 5px; color: #d9e5ec; background: rgba(255, 255, 255, 0.1); }
.sidebar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.04); }
.sidebar .btn.ghost:hover:not(:disabled) { color: #fff; background: rgba(255, 255, 255, 0.1); }

.main { max-width: none; gap: 0; padding: 0 30px 30px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 98px;
  margin: 0 -30px;
  padding: 20px 30px 16px;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  background: rgba(245, 247, 249, 0.94);
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.breadcrumb { color: var(--ui-muted); }
.breadcrumb span { color: var(--ui-accent); }
.topbar h2 { color: var(--ui-ink); font-size: 26px; background: none; -webkit-text-fill-color: currentColor; }
.page-description { color: var(--ui-muted); }
.enterprise-tag { border: 1px solid #c0e0dc; border-radius: 999px; color: var(--ui-accent-strong); background: var(--ui-accent-soft); }
.model-pill { min-height: 38px; border: 1px solid var(--ui-border); border-radius: 8px; color: var(--ui-muted); background: var(--ui-surface); box-shadow: none; }
.status-light { background: var(--ui-accent); box-shadow: 0 0 0 3px rgba(8, 125, 120, 0.12); }
.view-root { padding-top: 18px; }
.commerce-strip { border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.commerce-strip article, .commerce-strip article:nth-child(n) { min-height: 80px; padding: 15px 17px; background: transparent; }
.commerce-strip article + article { border-left: 1px solid var(--ui-border); }
.commerce-strip span, .commerce-strip small { color: var(--ui-muted); font-size: 11px; }
.commerce-strip strong { margin: 6px 0 2px; color: var(--ui-ink); font-size: 20px; }

.metric-grid, .grid, .model-grid, .plan-grid { gap: 14px; }
.metric-card { min-height: 122px; padding: 16px; border: 1px solid var(--ui-border); border-top: 3px solid var(--ui-accent); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: none; }
.metric-card::before, .metric-card::after { display: none; }
.metric-card:hover { transform: none; border-color: var(--ui-border-strong); border-top-color: var(--ui-accent); box-shadow: var(--ui-shadow); }
.metric-card span, .metric-card small { color: var(--ui-muted); font-size: 12px; }
.metric-card strong { margin: 8px 0 3px; color: var(--ui-ink); font-size: 28px; }
.panel { padding: 18px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: none; }
.toolbar { min-height: 30px; margin-bottom: 15px; }
.toolbar h3 { color: var(--ui-ink); font-size: 16px; }
.toolbar h3::before { width: 4px; height: 17px; border-radius: 999px; background: var(--ui-accent); box-shadow: none; }
.toolbar p { color: var(--ui-muted); }
.sub-panel { margin-bottom: 14px; padding: 16px; border: 1px solid var(--ui-border); border-radius: 8px; background: #f8fafb; }

/* Dense data surfaces */
.table-wrap { border: 1px solid var(--ui-border); border-radius: 8px; background: var(--ui-surface); box-shadow: none; }
table { background: var(--ui-surface); }
th { padding: 10px 11px; color: var(--ui-muted); border-bottom: 1px solid var(--ui-border); background: #f3f6f8; font-size: 11px; letter-spacing: 0.04em !important; }
td { padding: 11px; color: var(--ui-ink); border-bottom: 1px solid #e7edf1; font-size: 12px; }
tbody tr:hover { background: #f2faf9; }
td:nth-child(1), td:nth-child(2), .model-card dd, .model-pill { font-family: var(--font-mono); }
.empty-state { min-height: 150px; border: 1px dashed var(--ui-border-strong); border-radius: 8px; color: var(--ui-muted); background: #f8fafb; box-shadow: none; }
.empty-state span { width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--ui-accent-soft); }

.model-card, .plan-card { padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: none; }
.model-card:hover, .plan-card:hover { transform: none; border-color: var(--ui-border-strong); box-shadow: var(--ui-shadow); }
.model-card.active { border-color: #9fcfcb; border-top: 3px solid var(--ui-accent); background: #f3fbfa; box-shadow: none; }
.model-card dl { padding: 10px; border: 1px solid #e1e9ee; border-radius: 7px; background: #f5f8fa; }
.model-card dt { color: var(--ui-muted); }
.model-card p, .muted-text { color: var(--ui-muted); }
.plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card { min-height: 300px; gap: 12px; }
.plan-card > strong { color: var(--ui-ink); font-size: 34px; }
.plan-card.featured { transform: none; border: 2px solid #8fc8c4; background: #f3fbfa; box-shadow: 0 8px 20px rgba(8, 125, 120, 0.08); }
.plan-card.featured::before { top: 12px; right: 12px; color: #fff; background: var(--ui-accent); }

.patent-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 18px; }
.patent-list { gap: 8px; padding-right: 4px; }
.patent-item { padding: 13px; border: 1px solid var(--ui-border); border-radius: 8px; color: var(--ui-ink); background: #f8fafb; box-shadow: none; }
.patent-item:hover { transform: none; border-color: var(--ui-border-strong); background: var(--ui-surface); }
.patent-item.active { border-color: #95cbc7; background: #eff9f8; box-shadow: inset 3px 0 0 var(--ui-accent); }
.patent-preview { gap: 16px; padding: 0; background: transparent; }
.diagram-box { border: 1px solid var(--ui-border); border-radius: 8px; background: #f8fafb; box-shadow: none; }
.content-block { padding: 16px; border: 1px solid var(--ui-border); border-radius: 8px; background: #fbfcfd; box-shadow: none; }
.content-block h3 { color: var(--ui-ink); }
.doc-section h4 { color: var(--ui-accent-strong); }

.toast { border-radius: 8px; box-shadow: 0 12px 26px rgba(20, 43, 61, 0.18); }
.toast.ok { background: var(--ui-navy); }

@media (prefers-color-scheme: dark) {
  :root { --ui-canvas: #101b25; --ui-surface: #172633; --ui-surface-subtle: #1d2d3a; --ui-border: #304454; --ui-border-strong: #466070; --ui-ink: #e3edf3; --ui-muted: #a8bbc8; --ui-accent: #72c8c2; --ui-accent-strong: #a2e2dd; --ui-accent-soft: rgba(114, 200, 194, 0.13); }
  body { background-image: linear-gradient(rgba(114, 200, 194, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(114, 200, 194, 0.025) 1px, transparent 1px); }
  .topbar { background: rgba(16, 27, 37, 0.94); }
  .auth-card, .model-pill, input, textarea, select, .commerce-strip, .metric-card, .panel, .model-card, .plan-card, .table-wrap, table { background: var(--ui-surface); }
  .segmented, th, .model-card dl, .sub-panel, .empty-state { background: var(--ui-surface-subtle); }
  .segmented button.active { background: #263846; }
  .model-card.active, .plan-card.featured, .patent-item.active, tbody tr:hover { background: rgba(114, 200, 194, 0.1); }
  .patent-item, .content-block, .diagram-box { background: #1a2a36; }
}

@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .main { padding-right: 22px; padding-left: 22px; }
  .topbar { margin-right: -22px; margin-left: -22px; padding-right: 22px; padding-left: 22px; }
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth-screen { width: min(100% - 28px, 680px); grid-template-columns: 1fr; gap: 16px; }
  .auth-card { order: -1; }
  .auth-hero { min-height: auto; }
  .shell { display: block; }
  .sidebar { position: relative; display: grid; height: auto; padding: 12px 16px; grid-template-columns: auto 1fr; align-items: center; gap: 10px 16px; }
  .brand-row.compact { margin: 0; }
  .nav { grid-column: 1 / -1; display: flex; overflow-x: auto; padding-bottom: 2px; }
  .nav button { min-width: max-content; }
  .account-card { grid-column: 2; grid-row: 1; display: flex; justify-self: end; align-items: center; padding: 0; border: 0; background: transparent; }
  .account-identity > div, .account-meta { display: none; }
  .account-card .btn { width: 38px; padding: 0; font-size: 0; }
  .main { padding: 0 16px 24px; }
  .topbar { position: static; margin: 0 -16px; padding: 18px 16px 14px; }
  .commerce-strip { margin-top: 14px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .cols-5, .cols-4, .cols-2, .model-grid, .plan-grid, .form-grid, .patent-layout { grid-template-columns: 1fr; }
  .patent-list { max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .auth-screen { width: min(100% - 22px, 680px); padding: 12px 0; }
  .auth-card { padding: 20px; border-radius: 12px; }
  .auth-hero { padding: 28px 22px; border-radius: 14px; }
  .auth-hero h1 { font-size: 31px; }
  .hero-metrics div { min-width: calc(33.333% - 7px); padding: 10px; }
  .hero-metrics strong { font-size: 21px; }
  .sidebar { padding: 10px 12px; }
  .main { padding: 0 12px 20px; }
  .topbar { margin: 0 -12px; padding-right: 12px; padding-left: 12px; }
  .topbar h2 { font-size: 24px; }
  .model-pill { max-width: calc(100% - 72px); }
  .model-pill > span:not(.status-light) { display: none; }
  .topbar-actions .btn { width: auto; }
  .commerce-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-strip article + article { border-left: 0; border-top: 1px solid var(--ui-border); }
  .metric-card { min-height: 108px; }
  .patent-list { grid-template-columns: 1fr; }
  .toolbar { align-items: center; flex-direction: row; }
  .toolbar .actions { width: auto; flex-direction: row; }
  .toolbar .actions .btn { width: auto; }
}

/* Enterprise entry refresh: remove the promotional AI aesthetic from the sign-in page. */
body:has(.auth-screen) {
  background: #edf1f4;
  background-image: none;
}

.auth-screen {
  width: min(1080px, calc(100vw - 48px));
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 392px);
  gap: 0;
  min-height: 100dvh;
  padding: 48px 0;
}

.auth-hero {
  min-height: 532px;
  padding: 48px;
  justify-content: flex-start;
  gap: 0;
  border-radius: 12px 0 0 12px;
  background: #18364c;
  box-shadow: none;
}

.auth-hero::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
  background-size: auto;
}

.product-ribbon {
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  color: #d4e0e7;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}
.product-ribbon span { color: #d4e0e7; }
.product-ribbon strong { color: #d4e0e7; font-weight: 600; }
.auth-hero .brand-row { margin: 36px 0 16px; }
.auth-hero .brand-logo {
  width: 168px;
  padding: 7px 10px;
  border-radius: 6px;
}
.auth-hero .eyebrow {
  margin: 0 0 14px;
  color: #9bc6c4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0 !important;
  text-transform: none;
}
.auth-hero h1 {
  max-width: 430px;
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 3.25vw, 42px);
  font-weight: 700;
  line-height: 1.22;
}
.hero-copy {
  max-width: 445px;
  margin: 16px 0 0;
  color: #c6d4dd;
  font-size: 15px;
  line-height: 1.8;
}
.hero-metrics,
.auth-scope-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  margin: auto 0 0;
  padding: 28px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  list-style: none;
}
.hero-metrics div,
.auth-scope-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.hero-metrics div + div,
.auth-scope-list li + li { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.hero-metrics strong,
.auth-scope-list strong { color: #fff; font-size: 14px; font-weight: 700; }
.hero-metrics span,
.auth-scope-list span { color: #b6c7d1; font-size: 13px; }

.auth-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 38px;
  border: 1px solid #d6e0e6;
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #fff;
  box-shadow: 0 14px 32px rgba(26, 47, 63, 0.1);
}
.login-version {
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #687c8d;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}
.auth-card-heading { margin-bottom: 24px; }
.auth-card-heading h2 { color: #18364c; font-size: 24px; }
.auth-card-heading p { color: #6c7f8f; font-size: 13px; }
.auth-icon {
  width: 38px;
  height: 38px;
  color: #087d78;
  border: 1px solid #cde5e3;
  border-radius: 6px;
  background: #edf7f6;
}
.segmented {
  gap: 0;
  padding: 0;
  margin-bottom: 22px;
  border: 0;
  border-bottom: 1px solid #dbe4e9;
  border-radius: 0;
  background: transparent;
}
.segmented button {
  min-height: 38px;
  border-radius: 0;
  color: #718395;
  font-size: 13px;
}
.segmented button.active {
  color: #087d78;
  background: transparent;
  box-shadow: inset 0 -2px 0 #087d78;
}
.auth-card .form-stack { gap: 16px; }
.auth-card label { color: #526779; font-size: 13px; }
.auth-card input { min-height: 42px; border-radius: 6px; }
.auth-card .btn.primary { min-height: 44px; margin-top: 2px; border-radius: 6px; }
.auth-card .hint { margin: 18px 0 0; font-size: 12px; }
.login-benefits {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid #e3e9ed;
}
.login-benefits span {
  min-height: 0;
  justify-content: flex-start;
  flex: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #64788a;
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
}
.login-benefits svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .auth-screen {
    width: min(100% - 32px, 600px);
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 24px 0;
  }
  .auth-card {
    order: -1;
    width: 100%;
    min-width: 0;
    border: 1px solid #d6e0e6;
    border-radius: 12px;
  }
  .auth-hero { min-height: auto; border-radius: 12px; }
}
@media (max-width: 620px) {
  .auth-screen {
    width: min(100% - 24px, 600px);
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0;
  }
  .auth-card { padding: 28px 22px; }
  .auth-hero { padding: 28px 24px; }
  .auth-hero .brand-row { margin: 26px 0 14px; }
  .auth-hero h1 { font-size: 30px; }
  .hero-metrics,
  .auth-scope-list { margin-top: 26px; padding-top: 18px; }
  .hero-metrics div,
  .auth-scope-list li { grid-template-columns: 98px minmax(0, 1fr); }
  .login-benefits { gap: 10px; }
  .login-benefits span { font-size: 11px; }
}

/* Refine the enterprise entry proportions: the sign-in form should read as a focused panel, not a full-height blank column. */
@media (min-width: 901px) {
  .auth-screen {
    width: min(1120px, calc(100vw - 64px));
    grid-template-columns: minmax(0, 1.16fr) minmax(390px, 430px);
    align-items: center;
    min-height: 100dvh;
    padding: 32px 0;
  }

  .auth-hero {
    min-height: 560px;
    padding: 52px 56px;
    border-radius: 14px 0 0 14px;
    box-shadow: 0 20px 46px rgba(25, 52, 71, 0.1);
  }

  .auth-card {
    align-self: center;
    min-height: 560px;
    padding: 46px 44px;
    border-left: 1px solid #d6e0e6;
    border-radius: 0 14px 14px 0;
    box-shadow: 0 20px 46px rgba(25, 52, 71, 0.1);
  }

  .auth-card-heading h2 { font-size: 26px; }
  .auth-card .form-stack { gap: 15px; }
  .auth-card input { min-height: 44px; }
  .auth-card .btn.primary { min-height: 46px; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .auth-screen { width: min(960px, calc(100vw - 48px)); }
  .auth-hero { padding: 44px; }
  .auth-card { padding: 40px 36px; }
}

/* Keep the compact console header legible when the workspace becomes narrow. */
@media (max-width: 620px) {
  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    align-items: center;
    gap: 10px;
  }

  .enterprise-tag {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .enterprise-tag span { display: inline; }
  .enterprise-tag svg { width: 14px; height: 14px; }

  .model-pill {
    display: flex;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 40px;
    padding: 0 11px;
  }

  .model-pill > span:not(.status-light) { display: inline; flex: 0 0 auto; }
  .model-pill strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  .topbar-actions .btn {
    width: auto;
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  .model-pill > span:not(.status-light) { display: none; }
  .topbar-actions .btn { width: 40px; padding: 0; font-size: 0; }
  .topbar-actions .btn svg { margin: 0; }
}
