:root {
  color-scheme: light;
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --sidebar: #0f1f1f;
  --sidebar-muted: #8ca3a3;
  --text: #102033;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #c2ccd8;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #d9f3ee;
  --accent: #2563eb;
  --good: #11845b;
  --warn: #b54708;
  --bad: #b42318;
  --code: #0b1220;
  --shadow: 0 14px 34px rgba(15, 31, 31, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }
button {
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
button:hover { background: var(--primary-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: 0.55; }

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  color: #e7f5f2;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #10b981;
  color: #082f2c;
  font-weight: 900;
}
.brand strong, .brand span { display: block; }
.brand span, .sidebar-foot span { color: var(--sidebar-muted); font-size: 12px; margin-top: 3px; }
.nav-list { display: grid; gap: 6px; }
.nav-list a {
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  padding: 0 12px;
  color: #c7d8d8;
  text-decoration: none;
  font-weight: 700;
}
.nav-list a:hover, .nav-list a.active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}
.sidebar-foot strong { display: block; margin-top: 6px; overflow-wrap: anywhere; }

.workspace {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.eyebrow, .section-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 30px; line-height: 1.18; }
h2 { font-size: 18px; line-height: 1.35; }
h3 { font-size: 15px; line-height: 1.4; margin: 18px 0 10px; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.top-actions, .hero-actions, .compact-actions, .admin-actions, .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-desc {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.module-main {
  min-width: 0;
}
.module-side {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}
.module-side h3 { margin-top: 0; }
.customer-key-row {
  margin-bottom: 10px;
}
.billing-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  margin-top: 12px;
}
.billing-note span { color: var(--muted); line-height: 1.55; }
.compact-table { min-width: 820px; }
.compact-note { margin: 0 0 12px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}
.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 178px;
  background: linear-gradient(135deg, #102033 0%, #11443f 100%);
  color: #fff;
}
.hero-copy { max-width: 780px; }
.hero-panel .section-kicker { color: #8ce9d8; }
.hero-panel h2 {
  font-size: 26px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.hero-panel p { color: #cfe7e4; line-height: 1.65; margin: 12px 0 0; }
.status-panel { display: grid; align-items: center; }
.metric-strip, .metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric-strip div, .metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
  min-height: 78px;
}
.metric-strip strong, .metrics strong {
  display: block;
  font-size: 25px;
  line-height: 1.15;
  color: var(--text);
}
.label, label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.content-grid, .admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.steps { display: grid; gap: 12px; }
.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.step > span, .rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}
.step strong { display: block; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); line-height: 1.55; }

.status-pill, .provider-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  background: #e7eef7;
  color: #344054;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.ok { background: #dcfae6; color: var(--good); }
.status-pill.error { background: #fee4e2; color: var(--bad); }
.provider-badge.active { background: #dbeafe; color: #1d4ed8; }
.muted-pill { background: #f2f4f7; color: #475467; }

.link-button, .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
}
.link-button:hover, .ghost-button:hover { border-color: var(--primary); background: #f1fbf8; color: var(--primary-dark); }
.inline-link { color: var(--primary-dark); font-weight: 800; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

.key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: none;
  min-height: 40px;
  padding: 10px 12px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}
.hint { color: var(--muted); font-size: 13px; line-height: 1.55; }
.notice {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  background: var(--surface-soft);
}
.notice strong { font-size: 14px; }
.notice span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.notice.info { border-color: #bfdbfe; background: #eff6ff; }
.notice.info strong { color: #1d4ed8; }
.notice.ok { border-color: #bbf7d0; background: #f0fdf4; }
.notice.ok strong { color: var(--good); }
.notice.warn { border-color: #fedf89; background: #fffbeb; }
.notice.warn strong { color: var(--warn); }
.notice.error { border-color: #fecdca; background: #fff5f5; }
.notice.error strong { color: var(--bad); }
.dirty-button {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(181, 71, 8, 0.12);
}
.dirty-button:hover { background: #93370d; }
.pending-card {
  border-color: #fdb022;
  background: #fffbeb;
}
.pending-pill { background: #fef0c7; color: var(--warn); }
.compact-actions { margin-top: 10px; }

.docs-preview .code-block { margin-bottom: 0; }
.code-block, .response-box {
  overflow: auto;
  border-radius: 8px;
  background: var(--code);
  color: #e6edf7;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}
.response-box { min-height: 240px; max-height: 460px; margin: 0; border: 1px solid #1f2937; }

.usage-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.usage-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.providers-list { display: grid; gap: 10px; }
.providers-list.empty {
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-soft);
}
.provider-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}
.provider-card:hover { border-color: var(--line-strong); background: #fff; }
.provider-name { font-weight: 900; overflow-wrap: anywhere; }
.provider-url {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.stacked-badges, .admin-card-actions { display: grid; justify-items: end; gap: 6px; }
.usage-card .rank { width: 46px; }
.route-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #b7eadf;
  border-radius: 8px;
  background: #edfbf8;
  padding: 12px;
  margin-bottom: 12px;
  color: #134e4a;
}
.route-note span { color: #28625f; line-height: 1.55; }

.admin-grid { margin-top: 16px; }
.admin-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.admin-main { display: grid; gap: 16px; }
.admin-side {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.summary-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
  min-height: 96px;
}
.summary-tile strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 5px;
}
.summary-tile small, .data-table small, .management-block p {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.management-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.subhead-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.subhead-row h3 { margin: 0 0 4px; }
.subhead-row p { margin: 0; }
.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}
.side-card h3 { margin-top: 0; }
.compact-form { background: #fff; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong { display: block; margin-bottom: 4px; }
.pending-row td { background: #fffbeb; }
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.table-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.bad-text { color: var(--bad) !important; font-weight: 800; }
.good-text { color: var(--ok) !important; font-weight: 800; }
.warn-text { color: #a15c00 !important; font-weight: 800; }
.admin-grid h3 { margin-top: 0; }
.admin-key-row { margin-top: 10px; }
.mini-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}
.admin-card { grid-template-columns: 42px minmax(0, 1fr) auto; }
.admin-card button {
  background: #fff;
  border: 1px solid #fecdca;
  color: var(--bad);
}
.admin-card button:hover { background: #fff5f5; }
.form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(180px, 240px) 1fr;
  gap: 14px;
}
.prompt-field { grid-column: span 1; }
.actions { margin: 14px 0; }

.docs-shell { max-width: 1040px; }
.docs-panel { line-height: 1.65; }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.doc-table th, .doc-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.doc-table th { width: 170px; background: var(--surface-soft); color: #475467; }
code { border-radius: 4px; background: #eef4ff; color: #1849a9; padding: 2px 5px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .nav-list { display: flex; min-width: max-content; }
  .sidebar-foot { display: none; }
  .workspace { width: min(100% - 28px, 1280px); }
  .hero-grid, .content-grid, .admin-grid, .admin-workbench, .module-layout { grid-template-columns: 1fr; }
  .admin-side, .module-side { position: static; }
  .admin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-columns { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .workspace { width: min(100% - 20px, 1280px); padding-top: 18px; }
  .topbar, .panel-head, .hero-panel { flex-direction: column; align-items: flex-start; }
  .top-actions, .hero-actions, .admin-actions { width: 100%; }
  .top-actions > *, .hero-actions > *, .admin-actions button { flex: 1; }
  h1 { font-size: 24px; }
  .hero-panel h2 { font-size: 20px; }
  .metric-strip, .metrics, .usage-metrics, .form-grid, .key-row, .admin-summary-grid { grid-template-columns: 1fr; }
  .provider-card, .admin-card { grid-template-columns: 42px minmax(0, 1fr); }
  .provider-card .status-pill, .stacked-badges, .admin-card-actions {
    grid-column: 2;
    justify-items: start;
  }
  .doc-table th, .doc-table td { display: block; width: 100%; }
}

.admin-card button[data-edit-billing],
.admin-card button[data-test-provider] {
  border-color: var(--line-strong);
  color: var(--primary-dark);
}

.admin-card button[data-edit-billing]:hover,
.admin-card button[data-test-provider]:hover {
  background: #f1fbf8;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eaf1f7;
}
.login-shell {
  width: min(100% - 32px, 420px);
}
.login-card {
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.login-card h1 { font-size: 24px; }
.login-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-brand { margin-bottom: 6px; }
.login-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.quick-provider-box {
  display: grid;
  gap: 10px;
  border: 1px solid #b7eadf;
  border-radius: 8px;
  background: #edfbf8;
  padding: 12px;
  margin-bottom: 14px;
}
.quick-provider-box p {
  margin: 0;
  color: #28625f;
  font-size: 13px;
  line-height: 1.55;
}

.api-key-box {
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #0f172a;
  line-height: 1.5;
}
.customer-shell .workspace { max-width: 1320px; }
.compact-table { min-width: 760px; }

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.input-action-row button { min-height: 42px; white-space: nowrap; }
.pricing-editor {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pricing-editor.empty {
  padding: 12px;
  color: var(--muted);
  background: var(--surface-soft);
}
.pricing-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
.pricing-table th, .pricing-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}
.pricing-table th { background: #f8fafc; color: #475467; }
.pricing-table input { min-height: 34px; padding: 7px 9px; font-size: 12px; }
.dual-price { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.price-rule-list { display: grid; gap: 4px; min-width: 220px; }
.price-rule-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 3px;
  color: #475467;
}
.price-rule-list strong { color: #0f172a; margin: 0; white-space: nowrap; }
.price-rule-list em { color: var(--muted); font-style: normal; }
.muted-text { color: var(--muted); }

.tenant-card-list {
  display: grid;
  gap: 10px;
}
.tenant-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.tenant-card-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.tenant-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.tenant-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e6f8f4;
  color: var(--primary-dark);
  font-weight: 800;
}
.tenant-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
}
.tenant-title-row strong {
  font-size: 15px;
  color: #0f172a;
}
.tenant-identity small,
.tenant-stat-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.tenant-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}
.tenant-stat-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
  min-width: 0;
}
.tenant-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.tenant-stat-grid strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.tenant-price-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}
.tenant-price-details summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
}
.tenant-price-list {
  margin-top: 10px;
}
.tenant-card-actions {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 86px;
}
.tenant-card-actions button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}
.tenant-key-cell {
  min-width: 0;
}
.tenant-secret {
  display: block;
  width: 100%;
  margin: 2px 0 6px;
  overflow-wrap: anywhere;
  color: #102033;
  background: #eef4ff;
}
.mini-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.mini-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .tenant-card { grid-template-columns: 1fr; }
  .tenant-card-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tenant-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tenant-stat-grid, .tenant-card-actions { grid-template-columns: 1fr; }
}

/* v0.4.0 account-first admin console */
.console-workspace {
  width: min(1400px, calc(100% - 40px));
}
.compact-topbar {
  align-items: center;
}
.link-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--primary-dark);
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
}
.link-button:hover,
.ghost-button:hover {
  background: #eefbf7;
  border-color: #9fd9ce;
}
.primary-workbench {
  padding: 20px;
}
.account-workbench {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}
.account-workbench .admin-main {
  min-width: 0;
}
.ops-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  align-self: start;
  background: transparent;
  border: 0;
  padding: 0;
}
.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}
.side-card h3 {
  margin-top: 0;
}
.compact-form {
  gap: 10px;
}
.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.account-list-head {
  align-items: flex-start;
  margin-top: 16px;
}
.quick-links-card .route-note {
  margin-bottom: 12px;
}
.quick-link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.endpoint-card {
  display: grid;
  gap: 10px;
}
.endpoint-line {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.endpoint-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.endpoint-line code,
.route-note code {
  overflow-wrap: anywhere;
}
.test-key-row {
  margin: 12px 0;
}
.mini-doc-preview {
  margin-bottom: 12px;
}
.compact-secondary-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}
#tenantList.providers-list.empty,
#adminProviderList.providers-list.empty,
#adminRecentLogList.providers-list.empty {
  min-height: 90px;
  display: grid;
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px;
  background: #fbfdff;
  color: var(--muted);
}
.doc-alert {
  display: grid;
  gap: 8px;
  border: 1px solid #fedf89;
  background: #fffbeb;
  border-radius: 8px;
  padding: 12px;
  color: #7a4b05;
}
.doc-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 1180px) {
  .account-workbench,
  .compact-secondary-layout {
    grid-template-columns: 1fr;
  }
  .ops-sidebar,
  .module-side {
    position: static;
  }
}
@media (max-width: 760px) {
  .console-workspace { width: min(100% - 20px, 1280px); }
  .link-button,
  .ghost-button,
  .top-actions > * {
    width: 100%;
  }
  .side-card { padding: 12px; }
}


