:root {
  color-scheme: dark;
  --bg: #08090a;
  --panel: #111315;
  --panel-raised: #15181b;
  --panel-soft: #1b1f23;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f6f8;
  --muted: #8f98a3;
  --subtle: #c4cbd3;
  --green: #44d19d;
  --blue: #6aa8ff;
  --amber: #f2bd5b;
  --red: #ff6b6b;
  --radius: 8px;
  --sidebar: 248px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 300px),
    var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

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

input[type="file"] {
  padding: 8px;
}

input[type="file"]::file-selector-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-right: 10px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

button,
.button-link {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

button:hover,
.button-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line-strong);
}

button:active,
.button-link:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  background: var(--text);
  border-color: var(--text);
  color: #07080a;
}

.primary:hover {
  background: #dfe4ea;
  color: #07080a;
}

.ghost {
  background: transparent;
}

.text-button,
.link-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
}

.text-button:hover,
.link-button:hover {
  background: transparent;
  border-color: transparent;
  color: #9dc5ff;
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 16px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  outline: none;
  padding: 10px 11px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(106, 168, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(106, 168, 255, 0.12);
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.12;
  font-weight: 650;
}

h2 {
  font-size: 15px;
  font-weight: 620;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #111315;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

td {
  color: var(--subtle);
  font-size: 13px;
}

td strong {
  display: block;
  color: var(--text);
  font-weight: 590;
  overflow-wrap: anywhere;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.price-stack {
  display: grid;
  gap: 3px;
}

.price-stack strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.old-price {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(196, 203, 211, 0.65);
}

.credit-detail {
  display: grid;
  min-width: 96px;
  gap: 3px;
}

.credit-detail strong,
.credit-detail span {
  display: block;
}

.credit-detail strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
}

.credit-detail span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.credit-detail.pending strong {
  color: var(--amber);
}

.credit-detail.refund strong {
  color: var(--green);
}

tr.selected td {
  background: rgba(106, 168, 255, 0.08);
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 22px;
}

.auth-card {
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 19, 21, 0.92);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.34);
  padding: 22px;
}

.auth-card .brand-block {
  padding: 0;
}

.auth-card h1 {
  margin-top: 6px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100svh;
  border-right: 1px solid var(--line);
  background: rgba(10, 11, 12, 0.92);
  padding: 18px 14px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 4px 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f4f6f8;
  color: #07080a;
  font-weight: 700;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block strong {
  font-size: 14px;
}

.brand-block span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 4px;
}

.nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--subtle);
  font-size: 11px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  padding: 14px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-footer .status-badge {
  justify-self: start;
}

.main-shell {
  min-width: 0;
  padding: 22px;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.breadcrumb {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.section-view {
  display: none;
}

.section-view.active {
  display: grid;
  gap: 14px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-tile,
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric-tile {
  min-height: 82px;
  padding: 15px;
}

.metric-tile span {
  display: block;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 12px;
}

.metric-tile strong {
  display: block;
  overflow: hidden;
  font-size: 24px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-grid,
.resource-layout,
.generation-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

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

.resource-layout {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.generation-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.inspector,
.stack-sm {
  display: grid;
  gap: 14px;
}

.surface {
  min-width: 0;
  padding: 15px;
}

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.surface-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

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

.search-field {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 0 10px;
}

.search-field span {
  color: var(--muted);
}

.search-field input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.wide {
  grid-column: 1 / -1;
}

.key-create-row {
  margin-bottom: 14px;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.compact-actions {
  margin-top: 10px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.switch-line input {
  width: 17px;
  height: 17px;
}

.switch-line span {
  margin: 0;
  color: var(--subtle);
}

.segmented {
  display: inline-flex;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: 3px;
}

.segmented button {
  min-height: 30px;
  border: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.table-frame {
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
}

.resource-table {
  max-height: calc(100svh - 174px);
}

.compact-frame {
  max-height: 280px;
}

.compact-frame th,
.compact-frame td {
  padding: 10px 9px;
}

.compact-frame td:last-child {
  width: 74px;
}

.compact-frame button {
  min-height: 30px;
  padding: 0 8px;
}

.tall-frame {
  max-height: calc(100svh - 160px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-badge.ok {
  border-color: rgba(68, 209, 157, 0.36);
  background: rgba(68, 209, 157, 0.09);
  color: var(--green);
}

.status-badge.warn {
  border-color: rgba(242, 189, 91, 0.34);
  background: rgba(242, 189, 91, 0.08);
  color: var(--amber);
}

.status-badge.bad {
  border-color: rgba(255, 107, 107, 0.38);
  background: rgba(255, 107, 107, 0.08);
  color: var(--red);
}

.empty-cell {
  height: 72px;
  color: var(--muted);
  text-align: center;
}

.asset-list {
  display: grid;
  gap: 9px;
}

.asset-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.asset-item strong,
.asset-item span {
  display: block;
  overflow-wrap: anywhere;
}

.asset-item strong {
  color: var(--text);
  font-size: 13px;
}

.asset-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.asset-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.asset-actions button {
  min-height: 30px;
  padding: 0 7px;
  font-size: 12px;
}

.video-preview {
  display: grid;
  place-items: center;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #050607;
}

.video-preview.empty {
  color: var(--muted);
  font-size: 13px;
}

.video-preview video {
  width: 100%;
  max-height: 360px;
  background: #050607;
}

.code-box {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #070809;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 4px;
}

.docs-toc h2 {
  margin-bottom: 6px;
}

.docs-toc a {
  border-radius: 7px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 13px;
}

.docs-toc a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  text-decoration: none;
}

.docs-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.doc-section {
  scroll-margin-top: 22px;
}

.doc-section code {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 12px;
}

.doc-kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  margin-bottom: 14px;
}

.doc-kv span {
  color: var(--muted);
  font-size: 12px;
}

.doc-kv strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 590;
  overflow-wrap: anywhere;
}

.doc-note,
.doc-text {
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.65;
}

.endpoint-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.endpoint-line strong {
  min-width: 54px;
  border: 1px solid rgba(68, 209, 157, 0.35);
  border-radius: 7px;
  padding: 5px 8px;
  background: rgba(68, 209, 157, 0.08);
  color: var(--green);
  font-size: 12px;
  text-align: center;
}

.endpoint-line code {
  overflow-wrap: anywhere;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
}

.code-head span {
  color: var(--muted);
  font-size: 12px;
}

.code-head button {
  min-height: 28px;
  padding: 0 9px;
  color: var(--subtle);
  font-size: 12px;
}

.doc-code {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #070809;
  color: var(--subtle);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
}

.doc-table td {
  line-height: 1.55;
}

.doc-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.doc-status-grid div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: rgba(255, 255, 255, 0.028);
}

.doc-status-grid strong,
.doc-status-grid span {
  display: block;
}

.doc-status-grid strong {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
}

.doc-status-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(18, 20, 22, 0.98);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.38);
  color: var(--text);
}

.toast.bad {
  border-color: rgba(255, 107, 107, 0.48);
}

@media (max-width: 1180px) {
  .overview-grid,
  .resource-layout,
  .generation-layout,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    position: static;
  }

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

  .resource-table,
  .tall-frame {
    max-height: 520px;
  }
}

/* Final customer studio override: keep the second redesign visually authoritative. */
body.customer-console {
  color-scheme: dark;
  --bg: #05080a;
  --panel: rgba(9, 20, 24, 0.9);
  --panel-raised: rgba(13, 29, 34, 0.94);
  --panel-soft: rgba(14, 40, 45, 0.78);
  --line: rgba(139, 245, 235, 0.13);
  --line-strong: rgba(139, 245, 235, 0.28);
  --text: #f1fbf8;
  --muted: #84a4a8;
  --subtle: #c2d7d8;
  --green: #61e6a7;
  --blue: #28d5f2;
  --amber: #ffc05a;
  --red: #ff6f6f;
  --teal: #1ee7d6;
  --sidebar: 244px;
  background:
    linear-gradient(120deg, rgba(30, 231, 214, 0.13), transparent 24%),
    linear-gradient(240deg, rgba(255, 192, 90, 0.08), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 72px),
    #05080a;
  color: var(--text);
}

.customer-console .customer-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 180px),
    transparent;
}

.customer-console .sidebar {
  border-right: 1px solid rgba(139, 245, 235, 0.12);
  background:
    linear-gradient(180deg, rgba(30, 231, 214, 0.14), transparent 220px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(3, 10, 13, 0.94);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.28);
}

.customer-console .brand-mark {
  border: 1px solid rgba(30, 231, 214, 0.46);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.95), rgba(72, 166, 255, 0.72)),
    #0b2024;
  color: #061014;
  box-shadow: 0 0 0 4px rgba(30, 231, 214, 0.08), 0 18px 42px rgba(30, 231, 214, 0.2);
}

.customer-console .brand-block strong,
.customer-console h1,
.customer-console h2 {
  color: #ffffff;
}

.customer-console .brand-block span {
  color: rgba(195, 231, 232, 0.68);
}

.customer-console .nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(219, 241, 240, 0.7);
  box-shadow: none;
  font-weight: 660;
}

.customer-console .nav-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  background: transparent;
}

.customer-console .nav-item span {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(222, 246, 245, 0.82);
}

.customer-console .nav-item.active,
.customer-console .nav-item:hover {
  border-color: rgba(30, 231, 214, 0.24);
  background:
    linear-gradient(90deg, rgba(30, 231, 214, 0.22), rgba(30, 231, 214, 0.055)),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.customer-console .nav-item.active::before {
  background: var(--teal);
  box-shadow: 0 0 18px rgba(30, 231, 214, 0.85);
}

.customer-console .nav-item.active span,
.customer-console .nav-item:hover span {
  border-color: rgba(30, 231, 214, 0.32);
  background: rgba(30, 231, 214, 0.15);
  color: #ffffff;
}

.customer-console .breadcrumb,
.customer-console .page-subtitle,
.customer-console .surface-head p {
  color: var(--muted);
}

.customer-console button,
.customer-console .button-link {
  border-color: rgba(139, 245, 235, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(9, 22, 26, 0.86);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.customer-console button:hover,
.customer-console .button-link:hover {
  border-color: rgba(30, 231, 214, 0.42);
  background: rgba(30, 231, 214, 0.1);
}

.customer-console .primary {
  background: linear-gradient(135deg, #21d5e7, #19e3bd);
  border-color: rgba(139, 245, 235, 0.45);
  color: #041013;
  font-weight: 780;
}

.customer-console .primary:hover {
  background: linear-gradient(135deg, #5cecff, #33f0cb);
  color: #041013;
}

.customer-console .ghost {
  background: rgba(9, 22, 26, 0.86);
}

.customer-console .text-button,
.customer-console .link-button {
  background: transparent;
  color: var(--teal);
  box-shadow: none;
}

.customer-console .account-pill {
  border: 1px solid rgba(255, 192, 90, 0.22);
  background: rgba(255, 192, 90, 0.08);
  color: var(--amber);
}

.customer-console .account-pill strong {
  color: #ffe2a4;
}

.customer-console .customer-hero {
  min-height: 112px;
  border: 1px solid rgba(139, 245, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.16), transparent 48%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(8, 22, 27, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  padding: 22px;
}

.customer-console .customer-hero::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--amber));
  box-shadow: 0 0 24px rgba(30, 231, 214, 0.55);
}

.customer-console .customer-hero h2 {
  color: #ffffff;
  font-size: 25px;
}

.customer-console .eyebrow {
  color: var(--teal);
  font-weight: 780;
  letter-spacing: 0.04em;
}

.customer-console .metric-tile,
.customer-console .surface {
  border-color: rgba(139, 245, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    rgba(7, 18, 22, 0.9);
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.customer-console .metric-tile {
  min-height: 112px;
}

.customer-console .metric-tile::before {
  inset: auto 18px 15px 18px;
  width: auto;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(30, 231, 214, 0.5);
}

.customer-console .metric-tile[data-tone="amber"]::before {
  background: var(--amber);
}

.customer-console .metric-tile[data-tone="green"]::before {
  background: var(--green);
}

.customer-console .metric-tile[data-tone="blue"]::before,
.customer-console .metric-tile[data-tone="teal"]::before {
  background: var(--blue);
}

.customer-console .metric-tile strong,
.customer-console td strong,
.customer-console .price-stack strong,
.customer-console .credit-detail strong,
.customer-console .doc-status-grid strong,
.customer-console .asset-item strong {
  color: var(--text);
}

.customer-console .metric-tile strong {
  font-size: 29px;
  text-shadow: 0 0 28px rgba(30, 231, 214, 0.18);
}

.customer-console input,
.customer-console select,
.customer-console textarea {
  border-color: rgba(139, 245, 235, 0.15);
  background: rgba(3, 12, 15, 0.82);
  color: var(--text);
}

.customer-console input:focus,
.customer-console select:focus,
.customer-console textarea:focus {
  border-color: rgba(30, 231, 214, 0.68);
  box-shadow: 0 0 0 3px rgba(30, 231, 214, 0.12);
}

.customer-console input[type="file"] {
  min-height: 128px;
  border-style: dashed;
  background:
    repeating-linear-gradient(90deg, rgba(139, 245, 235, 0.04) 0 1px, transparent 1px 16px),
    rgba(3, 12, 15, 0.82);
}

.customer-console input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.customer-console .asset-item,
.customer-console .doc-status-grid div {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.customer-console .video-preview {
  min-height: 268px;
  border-color: rgba(139, 245, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.08), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px),
    #02080b;
  color: rgba(241, 251, 248, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 18px 60px rgba(0, 0, 0, 0.22);
}

.customer-console .table-frame {
  border-color: rgba(139, 245, 235, 0.12);
  background: rgba(3, 12, 15, 0.72);
}

.customer-console th,
.customer-console td {
  border-bottom-color: rgba(139, 245, 235, 0.085);
}

.customer-console th {
  background: rgba(11, 28, 33, 0.98);
  color: #84a4a8;
  font-weight: 720;
}

.customer-console td {
  color: var(--subtle);
}

.customer-console tr.selected td {
  background: rgba(30, 231, 214, 0.09);
}

.customer-console tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.customer-console .status-badge {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.customer-console .status-badge.ok {
  border-color: rgba(97, 230, 167, 0.28);
  background: rgba(97, 230, 167, 0.09);
  color: var(--green);
}

.customer-console .status-badge.warn {
  border-color: rgba(255, 192, 90, 0.3);
  background: rgba(255, 192, 90, 0.08);
  color: var(--amber);
}

.customer-console .status-badge.bad {
  border-color: rgba(255, 111, 111, 0.3);
  background: rgba(255, 111, 111, 0.08);
  color: var(--red);
}

.customer-console .segmented {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(3, 12, 15, 0.74);
}

.customer-console .segmented button {
  background: transparent;
  color: var(--muted);
}

.customer-console .segmented button.active {
  background: rgba(30, 231, 214, 0.16);
  color: #ffffff;
}

.customer-console .code-box,
.customer-console .doc-code {
  border-color: rgba(139, 245, 235, 0.14);
  background: #02080b;
  color: #d9efed;
}

.customer-console .doc-section code {
  border-color: rgba(139, 245, 235, 0.16);
  background: rgba(30, 231, 214, 0.08);
  color: #9df6ee;
}

.customer-console .toast {
  border-color: rgba(139, 245, 235, 0.18);
  background: rgba(7, 18, 22, 0.98);
  color: var(--text);
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    grid-template-columns: 24px max-content;
    width: auto;
    flex: 0 0 auto;
  }

  .sidebar-footer {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .main-shell {
    padding: 16px 11px 28px;
  }

  .main-header {
    display: grid;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .metric-strip,
  .form-grid.two,
  .doc-kv,
  .doc-status-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-row {
    align-items: stretch;
  }

  .search-field {
    width: 100%;
  }

  table {
    min-width: 680px;
  }

  .table-frame {
    width: 100%;
  }
}

body.customer-console,
body.admin-console {
  color-scheme: dark;
  --bg: #05080a;
  --panel: rgba(9, 20, 24, 0.9);
  --panel-raised: rgba(13, 29, 34, 0.94);
  --panel-soft: rgba(14, 40, 45, 0.78);
  --line: rgba(139, 245, 235, 0.13);
  --line-strong: rgba(139, 245, 235, 0.28);
  --text: #f1fbf8;
  --muted: #84a4a8;
  --subtle: #c2d7d8;
  --green: #61e6a7;
  --blue: #28d5f2;
  --amber: #ffc05a;
  --red: #ff6f6f;
  --teal: #1ee7d6;
  --coral: #ff7f70;
  --magenta: #df6dff;
  --sidebar: 244px;
  min-height: 100svh;
  background:
    linear-gradient(120deg, rgba(30, 231, 214, 0.13), transparent 24%),
    linear-gradient(240deg, rgba(255, 192, 90, 0.08), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 72px),
    #05080a;
  color: var(--text);
}

body.admin-console {
  --teal: #23d3ff;
  --blue: #48a6ff;
}

.customer-console .customer-shell,
.admin-console .command-shell,
.admin-console #adminApp {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 180px),
    transparent;
}

.customer-console .sidebar,
.admin-console .sidebar {
  border-right: 1px solid rgba(139, 245, 235, 0.12);
  background:
    linear-gradient(180deg, rgba(30, 231, 214, 0.14), transparent 220px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(3, 10, 13, 0.94);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.28);
}

.customer-console .brand-mark,
.admin-console .brand-mark {
  border: 1px solid rgba(30, 231, 214, 0.46);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.95), rgba(72, 166, 255, 0.72)),
    #0b2024;
  color: #061014;
  box-shadow: 0 0 0 4px rgba(30, 231, 214, 0.08), 0 18px 42px rgba(30, 231, 214, 0.2);
}

.customer-console .brand-block strong,
.admin-console .brand-block strong {
  color: #ffffff;
  letter-spacing: 0;
}

.customer-console .brand-block span,
.admin-console .brand-block span {
  color: rgba(195, 231, 232, 0.68);
}

.customer-console .nav-item,
.admin-console .nav-item {
  position: relative;
  min-height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(219, 241, 240, 0.7);
  box-shadow: none;
  font-weight: 660;
}

.customer-console .nav-item::before,
.admin-console .nav-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  background: transparent;
}

.customer-console .nav-item span,
.admin-console .nav-item span {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(222, 246, 245, 0.82);
}

.customer-console .nav-item.active,
.customer-console .nav-item:hover,
.admin-console .nav-item.active,
.admin-console .nav-item:hover {
  border-color: rgba(30, 231, 214, 0.24);
  background:
    linear-gradient(90deg, rgba(30, 231, 214, 0.22), rgba(30, 231, 214, 0.055)),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.customer-console .nav-item.active::before,
.admin-console .nav-item.active::before {
  background: var(--teal);
  box-shadow: 0 0 18px rgba(30, 231, 214, 0.85);
}

.customer-console .nav-item.active span,
.customer-console .nav-item:hover span,
.admin-console .nav-item.active span,
.admin-console .nav-item:hover span {
  border-color: rgba(30, 231, 214, 0.32);
  background: rgba(30, 231, 214, 0.15);
  color: #ffffff;
}

.customer-console .sidebar-footer,
.admin-console .sidebar-footer {
  color: var(--muted);
}

.customer-console .sidebar-footer a,
.admin-console .sidebar-footer a {
  color: var(--teal);
}

.customer-console .sidebar-footer .primary,
.admin-console .sidebar-footer .primary {
  width: 100%;
  background: linear-gradient(135deg, #28d5f2, #1ee7d6 64%, #ffc05a);
  border-color: rgba(139, 245, 235, 0.28);
  color: #061014;
}

.customer-console .main-shell,
.admin-console .main-shell {
  padding: 26px 28px 38px;
}

.customer-console .main-header,
.admin-console .main-header {
  margin-bottom: 20px;
}

.customer-console .breadcrumb,
.admin-console .breadcrumb {
  color: rgba(194, 215, 216, 0.56);
}

.customer-console .page-subtitle,
.admin-console .page-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.customer-console h1,
.admin-console h1 {
  color: #ffffff;
  font-size: 30px;
  font-weight: 780;
}

.customer-console h2,
.admin-console h2 {
  color: #f4fffc;
  font-size: 16px;
  font-weight: 720;
}

.customer-console button,
.customer-console .button-link,
.admin-console button,
.admin-console .button-link {
  border-color: rgba(139, 245, 235, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(9, 22, 26, 0.86);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.customer-console button:hover,
.customer-console .button-link:hover,
.admin-console button:hover,
.admin-console .button-link:hover {
  border-color: rgba(30, 231, 214, 0.42);
  background: rgba(30, 231, 214, 0.1);
}

.customer-console button:focus-visible,
.customer-console .button-link:focus-visible,
.customer-console input:focus-visible,
.customer-console select:focus-visible,
.customer-console textarea:focus-visible,
.admin-console button:focus-visible,
.admin-console .button-link:focus-visible,
.admin-console input:focus-visible,
.admin-console select:focus-visible,
.admin-console textarea:focus-visible {
  outline: 3px solid rgba(30, 231, 214, 0.2);
  outline-offset: 2px;
}

.customer-console .primary,
.admin-console .primary {
  background: linear-gradient(135deg, #21d5e7, #19e3bd);
  border-color: rgba(139, 245, 235, 0.45);
  color: #041013;
  font-weight: 780;
}

.customer-console .primary:hover,
.admin-console .primary:hover {
  background: linear-gradient(135deg, #5cecff, #33f0cb);
  color: #041013;
}

.customer-console .text-button,
.customer-console .link-button,
.admin-console .text-button,
.admin-console .link-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  box-shadow: none;
}

.customer-console .account-pill,
.admin-console .ops-pill {
  display: inline-grid;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 192, 90, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 192, 90, 0.08);
  color: var(--amber);
  font-size: 12px;
  white-space: nowrap;
}

.customer-console .account-pill {
  grid-template-columns: auto auto;
  gap: 8px;
}

.customer-console .account-pill strong {
  color: #ffe2a4;
}

.customer-console .customer-hero,
.admin-console .ops-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid rgba(139, 245, 235, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.16), transparent 48%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(8, 22, 27, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  padding: 22px;
}

.customer-console .customer-hero::after,
.admin-console .ops-hero::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--amber));
  box-shadow: 0 0 24px rgba(30, 231, 214, 0.55);
}

.customer-console .customer-hero h2,
.admin-console .ops-hero h2 {
  margin-top: 6px;
  color: #ffffff;
  font-size: 25px;
  line-height: 1.12;
}

.customer-console .eyebrow,
.admin-console .eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.customer-console .hero-actions,
.admin-console .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.customer-console .metric-strip,
.admin-console .metric-strip {
  gap: 12px;
}

.customer-console .metric-tile,
.customer-console .surface,
.admin-console .metric-tile,
.admin-console .surface,
.admin-console .auth-card {
  border-color: rgba(139, 245, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    rgba(7, 18, 22, 0.9);
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.customer-console .metric-tile,
.admin-console .metric-tile {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 18px;
}

.customer-console .metric-tile::before,
.admin-console .metric-tile::before {
  content: "";
  position: absolute;
  inset: auto 18px 15px 18px;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(30, 231, 214, 0.5);
}

.customer-console .metric-tile[data-tone="amber"]::before,
.admin-console .metric-tile[data-tone="amber"]::before {
  background: var(--amber);
  box-shadow: 0 0 20px rgba(255, 192, 90, 0.5);
}

.customer-console .metric-tile[data-tone="green"]::before,
.admin-console .metric-tile[data-tone="green"]::before {
  background: var(--green);
}

.customer-console .metric-tile[data-tone="blue"]::before,
.admin-console .metric-tile[data-tone="blue"]::before,
.admin-console .metric-tile[data-tone="cyan"]::before {
  background: var(--blue);
}

.customer-console .metric-tile span,
.admin-console .metric-tile span {
  color: var(--muted);
  font-weight: 680;
}

.customer-console .metric-tile strong,
.admin-console .metric-tile strong {
  color: #ffffff;
  font-size: 29px;
  font-weight: 800;
  text-shadow: 0 0 28px rgba(30, 231, 214, 0.18);
}

.customer-console .surface,
.admin-console .surface {
  padding: 18px;
}

.customer-console .surface-head,
.admin-console .surface-head {
  margin-bottom: 16px;
}

.customer-console .surface-head p,
.admin-console .surface-head p {
  color: var(--muted);
}

.customer-console .account-card,
.admin-console .command-card,
.admin-console .command-panel {
  border-color: rgba(255, 192, 90, 0.18);
}

.customer-console .quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.customer-console input,
.customer-console select,
.customer-console textarea,
.admin-console input,
.admin-console select,
.admin-console textarea {
  border-color: rgba(139, 245, 235, 0.15);
  background: rgba(3, 12, 15, 0.82);
  color: var(--text);
}

.customer-console input:focus,
.customer-console select:focus,
.customer-console textarea:focus,
.admin-console input:focus,
.admin-console select:focus,
.admin-console textarea:focus {
  border-color: rgba(30, 231, 214, 0.68);
  box-shadow: 0 0 0 3px rgba(30, 231, 214, 0.12);
}

.customer-console label span,
.admin-console label span {
  color: var(--muted);
  font-weight: 680;
}

.customer-console input[type="file"] {
  min-height: 128px;
  border-style: dashed;
  background:
    repeating-linear-gradient(90deg, rgba(139, 245, 235, 0.04) 0 1px, transparent 1px 16px),
    rgba(3, 12, 15, 0.82);
}

.customer-console input[type="file"]::file-selector-button,
.admin-console input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.customer-console .generation-layout {
  grid-template-columns: minmax(0, 1.05fr) 410px;
  gap: 16px;
}

.customer-console .composer-panel,
.customer-console .preview-panel,
.customer-console .asset-panel,
.admin-console .inspector .surface {
  background:
    linear-gradient(180deg, rgba(30, 231, 214, 0.05), transparent 220px),
    rgba(7, 18, 22, 0.92);
}

.customer-console #promptInput {
  min-height: 166px;
}

.customer-console .asset-item,
.admin-console .asset-item {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.customer-console .asset-item strong,
.admin-console .asset-item strong {
  color: var(--text);
}

.customer-console .video-preview,
.admin-console .video-preview {
  min-height: 268px;
  border-color: rgba(139, 245, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.08), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px),
    #02080b;
  color: rgba(241, 251, 248, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 18px 60px rgba(0, 0, 0, 0.22);
}

.customer-console .video-preview video,
.admin-console .video-preview video {
  background: #02080b;
}

.customer-console .table-frame,
.admin-console .table-frame {
  border-color: rgba(139, 245, 235, 0.12);
  background: rgba(3, 12, 15, 0.72);
}

.customer-console th,
.customer-console td,
.admin-console th,
.admin-console td {
  border-bottom-color: rgba(139, 245, 235, 0.085);
}

.customer-console th,
.admin-console th {
  background: rgba(11, 28, 33, 0.98);
  color: #84a4a8;
  font-weight: 720;
}

.customer-console td,
.admin-console td {
  color: var(--subtle);
}

.customer-console td strong,
.customer-console .price-stack strong,
.customer-console .credit-detail strong,
.admin-console td strong,
.admin-console .price-stack strong,
.admin-console .credit-detail strong {
  color: var(--text);
}

.customer-console tr.selected td,
.admin-console tr.selected td {
  background: rgba(30, 231, 214, 0.09);
}

.customer-console tr:hover td,
.admin-console tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.customer-console .status-badge,
.admin-console .status-badge {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.customer-console .status-badge.ok,
.admin-console .status-badge.ok {
  border-color: rgba(97, 230, 167, 0.28);
  background: rgba(97, 230, 167, 0.09);
  color: var(--green);
}

.customer-console .status-badge.warn,
.admin-console .status-badge.warn {
  border-color: rgba(255, 192, 90, 0.3);
  background: rgba(255, 192, 90, 0.08);
  color: var(--amber);
}

.customer-console .status-badge.bad,
.admin-console .status-badge.bad {
  border-color: rgba(255, 111, 111, 0.3);
  background: rgba(255, 111, 111, 0.08);
  color: var(--red);
}

.customer-console .segmented,
.admin-console .segmented {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(3, 12, 15, 0.74);
}

.customer-console .segmented button,
.admin-console .segmented button {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.customer-console .segmented button.active,
.admin-console .segmented button.active {
  background: rgba(30, 231, 214, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(30, 231, 214, 0.16);
}

.customer-console .code-box,
.customer-console .doc-code,
.admin-console .code-box,
.admin-console .doc-code {
  border-color: rgba(139, 245, 235, 0.14);
  background: #02080b;
  color: #d9efed;
}

.customer-console .docs-toc a,
.admin-console .docs-toc a {
  color: var(--muted);
}

.customer-console .docs-toc a:hover,
.admin-console .docs-toc a:hover {
  background: rgba(30, 231, 214, 0.1);
  color: var(--teal);
}

.customer-console .doc-section code,
.admin-console .doc-section code {
  border-color: rgba(139, 245, 235, 0.16);
  background: rgba(30, 231, 214, 0.08);
  color: #9df6ee;
}

.customer-console .endpoint-line strong,
.admin-console .endpoint-line strong {
  border-color: rgba(97, 230, 167, 0.28);
  background: rgba(97, 230, 167, 0.09);
  color: var(--green);
}

.customer-console .doc-status-grid div,
.admin-console .doc-status-grid div {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.customer-console .doc-status-grid strong,
.admin-console .doc-status-grid strong {
  color: var(--text);
}

.customer-console .toast,
.admin-console .toast {
  border-color: rgba(139, 245, 235, 0.18);
  background: rgba(7, 18, 22, 0.98);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.admin-console .auth-screen {
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.14), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    #05080a;
}

.admin-console .auth-card {
  width: min(460px, 100%);
}

@media (max-width: 1180px) {
  .customer-console .overview-grid,
  .customer-console .resource-layout,
  .customer-console .generation-layout,
  .customer-console .docs-layout,
  .admin-console .overview-grid,
  .admin-console .resource-layout,
  .admin-console .generation-layout,
  .admin-console .docs-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .customer-console .main-shell,
  .admin-console .main-shell {
    padding: 16px 12px 28px;
  }

  .customer-console .sidebar,
  .admin-console .sidebar {
    box-shadow: none;
  }

  .customer-console .side-nav,
  .admin-console .side-nav {
    scrollbar-width: none;
  }

  .customer-console .side-nav::-webkit-scrollbar,
  .admin-console .side-nav::-webkit-scrollbar {
    display: none;
  }

  .customer-console .customer-hero,
  .admin-console .ops-hero {
    display: grid;
  }

  .customer-console .hero-actions,
  .admin-console .hero-actions {
    justify-content: stretch;
  }

  .customer-console .hero-actions button,
  .customer-console .quick-actions button,
  .admin-console .hero-actions button {
    width: 100%;
  }

  .customer-console .quick-actions,
  .customer-console .metric-strip,
  .customer-console .form-grid.two,
  .customer-console .doc-kv,
  .customer-console .doc-status-grid,
  .admin-console .metric-strip,
  .admin-console .form-grid.two,
  .admin-console .doc-kv,
  .admin-console .doc-status-grid {
    grid-template-columns: 1fr;
  }
}

body.customer-console {
  color-scheme: light;
  --bg: #eef3f3;
  --panel: #ffffff;
  --panel-raised: #f8fbfb;
  --panel-soft: #edf4f3;
  --line: rgba(21, 38, 42, 0.12);
  --line-strong: rgba(21, 38, 42, 0.22);
  --text: #172326;
  --muted: #66777a;
  --subtle: #3b4b4f;
  --green: #16815f;
  --blue: #087989;
  --amber: #b66c0d;
  --red: #c2413a;
  --sidebar: 236px;
  background:
    linear-gradient(180deg, rgba(8, 121, 137, 0.08), transparent 340px),
    var(--bg);
  color: var(--text);
}

.customer-console .customer-shell {
  background: var(--bg);
}

.customer-console .sidebar {
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(19, 184, 170, 0.16), transparent 260px),
    #071417;
  color: #f1f7f6;
  box-shadow: 18px 0 46px rgba(10, 26, 30, 0.16);
}

.customer-console .brand-block {
  padding-bottom: 22px;
}

.customer-console .brand-mark {
  background: #18c4b7;
  color: #021112;
  box-shadow: 0 12px 30px rgba(24, 196, 183, 0.28);
}

.customer-console .brand-block strong {
  color: #f8fffe;
  font-size: 15px;
}

.customer-console .brand-block span {
  color: rgba(234, 247, 245, 0.64);
}

.customer-console .nav-item {
  min-height: 42px;
  border-color: transparent;
  background: transparent;
  border-radius: 8px;
  color: rgba(232, 246, 244, 0.72);
  box-shadow: none;
  font-weight: 560;
}

.customer-console .nav-item span {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 247, 246, 0.82);
}

.customer-console .nav-item.active,
.customer-console .nav-item:hover {
  background: rgba(20, 159, 154, 0.92);
  color: #ffffff;
}

.customer-console .nav-item.active span,
.customer-console .nav-item:hover span {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.customer-console .sidebar-footer {
  gap: 12px;
  padding-top: 18px;
}

.customer-console .sidebar-footer .primary {
  width: 100%;
  min-height: 40px;
  background: #18c4b7;
  border-color: #18c4b7;
  color: #021112;
  font-weight: 700;
}

.customer-console .main-shell {
  padding: 24px 28px 34px;
}

.customer-console .main-header {
  min-height: 58px;
  margin-bottom: 18px;
}

.customer-console .breadcrumb,
.customer-console .page-subtitle,
.customer-console .surface-head p {
  color: var(--muted);
}

.customer-console .page-subtitle {
  margin-top: 7px;
  font-size: 13px;
}

.customer-console h1 {
  font-size: 29px;
  font-weight: 760;
  color: #102025;
}

.customer-console h2 {
  color: #13282c;
  font-size: 16px;
  font-weight: 720;
}

.customer-console button,
.customer-console .button-link {
  border-color: rgba(21, 38, 42, 0.14);
  background: #ffffff;
  color: #172326;
  box-shadow: 0 1px 0 rgba(21, 38, 42, 0.04);
}

.customer-console button:hover,
.customer-console .button-link:hover {
  background: #f4fafa;
  border-color: rgba(8, 121, 137, 0.35);
}

.customer-console button:focus-visible,
.customer-console .button-link:focus-visible,
.customer-console input:focus-visible,
.customer-console select:focus-visible,
.customer-console textarea:focus-visible {
  outline: 3px solid rgba(8, 121, 137, 0.2);
  outline-offset: 2px;
}

.customer-console .primary {
  background: #087989;
  border-color: #087989;
  color: #ffffff;
  font-weight: 680;
}

.customer-console .primary:hover {
  background: #066b78;
  border-color: #066b78;
  color: #ffffff;
}

.customer-console .ghost {
  background: #f8fbfb;
}

.customer-console .text-button,
.customer-console .link-button {
  background: transparent;
  color: #087989;
  box-shadow: none;
}

.customer-console .header-actions {
  gap: 10px;
}

.customer-console .account-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  min-height: 34px;
  gap: 8px;
  border: 1px solid rgba(182, 108, 13, 0.18);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 248, 229, 0.88);
  color: #7c4a05;
}

.customer-console .account-pill span {
  font-size: 12px;
}

.customer-console .account-pill strong {
  font-size: 13px;
  font-weight: 760;
}

.customer-console .customer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
  border: 1px solid rgba(8, 121, 137, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 246, 245, 0.9)),
    #ffffff;
  box-shadow: 0 20px 58px rgba(13, 48, 56, 0.08);
  padding: 20px;
}

.customer-console .customer-hero h2 {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.2;
}

.customer-console .eyebrow {
  color: #087989;
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.customer-console .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.customer-console .metric-strip {
  gap: 12px;
}

.customer-console .metric-tile,
.customer-console .surface {
  border-color: rgba(21, 38, 42, 0.11);
  background: var(--panel);
  box-shadow: 0 12px 38px rgba(18, 45, 50, 0.06);
}

.customer-console .metric-tile {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 17px;
}

.customer-console .metric-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #087989;
}

.customer-console .metric-tile[data-tone="amber"]::before {
  background: #e59a26;
}

.customer-console .metric-tile[data-tone="teal"]::before {
  background: #18a99b;
}

.customer-console .metric-tile[data-tone="blue"]::before {
  background: #2c86d1;
}

.customer-console .metric-tile[data-tone="green"]::before {
  background: #4b9b35;
}

.customer-console .metric-tile span {
  margin-bottom: 13px;
  color: var(--muted);
  font-weight: 640;
}

.customer-console .metric-tile strong {
  color: #102025;
  font-size: 28px;
  font-weight: 780;
}

.customer-console .surface {
  padding: 18px;
}

.customer-console .surface-head {
  min-height: 36px;
  margin-bottom: 16px;
}

.customer-console .account-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 249, 248, 0.96)),
    #ffffff;
}

.customer-console .quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.customer-console .quick-actions button {
  min-height: 38px;
  padding: 0 8px;
  font-size: 12px;
}

.customer-console input,
.customer-console select,
.customer-console textarea {
  border-color: rgba(21, 38, 42, 0.14);
  background: #f8fbfb;
  color: #172326;
}

.customer-console input:focus,
.customer-console select:focus,
.customer-console textarea:focus {
  border-color: rgba(8, 121, 137, 0.62);
  box-shadow: 0 0 0 3px rgba(8, 121, 137, 0.12);
}

.customer-console label span {
  color: var(--muted);
  font-weight: 640;
}

.customer-console input[type="file"] {
  min-height: 118px;
  border-style: dashed;
  background: #f3f8f8;
}

.customer-console input[type="file"]::file-selector-button {
  background: #ffffff;
  color: #172326;
}

.customer-console .composer-panel {
  min-height: calc(100svh - 130px);
}

.customer-console .generation-layout {
  grid-template-columns: minmax(0, 1fr) 404px;
  gap: 16px;
}

.customer-console .form-grid {
  gap: 14px;
}

.customer-console #promptInput {
  min-height: 158px;
  font-size: 14px;
}

.customer-console .asset-panel {
  border-color: rgba(8, 121, 137, 0.16);
}

.customer-console .asset-item {
  border-color: rgba(8, 121, 137, 0.12);
  background: #f6fbfb;
}

.customer-console .asset-item strong {
  color: #172326;
}

.customer-console .video-preview {
  min-height: 260px;
  border-color: rgba(7, 20, 23, 0.12);
  background:
    linear-gradient(135deg, rgba(24, 196, 183, 0.08), rgba(7, 20, 23, 0.96)),
    #091418;
  color: rgba(255, 255, 255, 0.78);
}

.customer-console .video-preview video {
  background: #091418;
}

.customer-console .table-frame {
  border-color: rgba(21, 38, 42, 0.1);
  background: #ffffff;
}

.customer-console th,
.customer-console td {
  border-bottom-color: rgba(21, 38, 42, 0.08);
}

.customer-console th {
  background: #f5f8f8;
  color: #66777a;
  font-weight: 700;
}

.customer-console td {
  color: #3b4b4f;
}

.customer-console td strong,
.customer-console .price-stack strong,
.customer-console .credit-detail strong {
  color: #172326;
}

.customer-console tr.selected td {
  background: rgba(8, 121, 137, 0.08);
}

.customer-console .status-badge {
  border-color: rgba(21, 38, 42, 0.12);
  background: #f8fbfb;
  color: #5d6f72;
}

.customer-console .status-badge.ok {
  border-color: rgba(22, 129, 95, 0.22);
  background: rgba(22, 129, 95, 0.09);
  color: #16815f;
}

.customer-console .status-badge.warn {
  border-color: rgba(182, 108, 13, 0.24);
  background: rgba(255, 246, 224, 0.9);
  color: #9a5b08;
}

.customer-console .status-badge.bad {
  border-color: rgba(194, 65, 58, 0.22);
  background: rgba(194, 65, 58, 0.08);
  color: #b3342d;
}

.customer-console .segmented {
  border-color: rgba(21, 38, 42, 0.12);
  background: #edf4f3;
}

.customer-console .segmented button {
  color: #66777a;
  box-shadow: none;
}

.customer-console .segmented button.active {
  background: #ffffff;
  color: #087989;
  box-shadow: 0 4px 14px rgba(21, 38, 42, 0.08);
}

.customer-console .code-box,
.customer-console .doc-code {
  border-color: rgba(7, 20, 23, 0.16);
  background: #0b1518;
  color: #d7e4e4;
}

.customer-console .docs-toc a:hover {
  background: rgba(8, 121, 137, 0.08);
  color: #087989;
}

.customer-console .doc-section code {
  border-color: rgba(8, 121, 137, 0.14);
  background: #edf7f6;
  color: #0b5964;
}

.customer-console .endpoint-line strong {
  border-color: rgba(22, 129, 95, 0.24);
  background: rgba(22, 129, 95, 0.09);
  color: #16815f;
}

.customer-console .doc-status-grid div {
  border-color: rgba(21, 38, 42, 0.1);
  background: #f8fbfb;
}

.customer-console .doc-status-grid strong {
  color: #172326;
}

.customer-console .toast {
  border-color: rgba(21, 38, 42, 0.14);
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(13, 48, 56, 0.18);
  color: #172326;
}

@media (max-width: 1180px) {
  .customer-console .overview-grid,
  .customer-console .resource-layout,
  .customer-console .generation-layout,
  .customer-console .docs-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body.customer-console {
    background: var(--bg);
  }

  .customer-console .sidebar {
    box-shadow: none;
  }

  .customer-console .side-nav {
    scrollbar-width: none;
  }

  .customer-console .side-nav::-webkit-scrollbar {
    display: none;
  }

  .customer-console .sidebar-footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .customer-console .sidebar-footer .primary {
    width: auto;
  }

  .customer-console .main-shell {
    padding: 16px 12px 28px;
  }

  .customer-console .customer-hero {
    display: grid;
  }

  .customer-console .hero-actions {
    justify-content: stretch;
  }

  .customer-console .hero-actions button,
  .customer-console .quick-actions button {
    width: 100%;
  }

  .customer-console .quick-actions {
    grid-template-columns: 1fr;
  }

  .customer-console .metric-strip,
  .customer-console .form-grid.two,
  .customer-console .doc-kv,
  .customer-console .doc-status-grid {
    grid-template-columns: 1fr;
  }
}

/* Absolute final theme pin: last rules win over older customer iterations. */
body.customer-console,
body.admin-console {
  color-scheme: dark;
  --bg: #05080a;
  --panel: rgba(9, 20, 24, 0.9);
  --line: rgba(139, 245, 235, 0.13);
  --line-strong: rgba(139, 245, 235, 0.28);
  --text: #f1fbf8;
  --muted: #84a4a8;
  --subtle: #c2d7d8;
  --green: #61e6a7;
  --blue: #28d5f2;
  --amber: #ffc05a;
  --red: #ff6f6f;
  --teal: #1ee7d6;
  --sidebar: 244px;
  background:
    linear-gradient(120deg, rgba(30, 231, 214, 0.13), transparent 24%),
    linear-gradient(240deg, rgba(255, 192, 90, 0.08), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 72px),
    #05080a;
  color: var(--text);
}

.customer-console .customer-shell,
.admin-console .command-shell,
.admin-console #adminApp {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 180px),
    transparent;
}

.customer-console .sidebar,
.admin-console .sidebar {
  border-right: 1px solid rgba(139, 245, 235, 0.12);
  background:
    linear-gradient(180deg, rgba(30, 231, 214, 0.14), transparent 220px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(3, 10, 13, 0.94);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.28);
}

.customer-console .brand-mark,
.admin-console .brand-mark {
  border: 1px solid rgba(30, 231, 214, 0.46);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.95), rgba(72, 166, 255, 0.72)),
    #0b2024;
  color: #061014;
  box-shadow: 0 0 0 4px rgba(30, 231, 214, 0.08), 0 18px 42px rgba(30, 231, 214, 0.2);
}

.customer-console h1,
.customer-console h2,
.customer-console .brand-block strong,
.admin-console h1,
.admin-console h2,
.admin-console .brand-block strong {
  color: #ffffff;
}

.customer-console .brand-block span,
.admin-console .brand-block span,
.customer-console .breadcrumb,
.customer-console .page-subtitle,
.customer-console .surface-head p,
.admin-console .breadcrumb,
.admin-console .page-subtitle,
.admin-console .surface-head p {
  color: var(--muted);
}

.customer-console .nav-item,
.admin-console .nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(219, 241, 240, 0.7);
  box-shadow: none;
  font-weight: 660;
}

.customer-console .nav-item span,
.admin-console .nav-item span {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(222, 246, 245, 0.82);
}

.customer-console .nav-item.active,
.customer-console .nav-item:hover,
.admin-console .nav-item.active,
.admin-console .nav-item:hover {
  border-color: rgba(30, 231, 214, 0.24);
  background:
    linear-gradient(90deg, rgba(30, 231, 214, 0.22), rgba(30, 231, 214, 0.055)),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.customer-console button,
.customer-console .button-link,
.admin-console button,
.admin-console .button-link {
  border-color: rgba(139, 245, 235, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(9, 22, 26, 0.86);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.customer-console .primary,
.admin-console .primary {
  background: linear-gradient(135deg, #21d5e7, #19e3bd);
  border-color: rgba(139, 245, 235, 0.45);
  color: #041013;
  font-weight: 780;
}

.customer-console .text-button,
.customer-console .link-button,
.admin-console .text-button,
.admin-console .link-button {
  background: transparent;
  color: var(--teal);
  box-shadow: none;
}

.customer-console .ghost,
.admin-console .ghost {
  background: rgba(9, 22, 26, 0.86);
  color: var(--text);
}

.customer-console .customer-hero,
.admin-console .ops-hero,
.customer-console .metric-tile,
.customer-console .surface,
.admin-console .metric-tile,
.admin-console .surface,
.admin-console .auth-card {
  border-color: rgba(139, 245, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022)),
    rgba(7, 18, 22, 0.9);
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.customer-console .customer-hero,
.admin-console .ops-hero {
  min-height: 112px;
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.16), transparent 48%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(8, 22, 27, 0.86);
}

.customer-console .metric-tile::before,
.admin-console .metric-tile::before {
  inset: auto 18px 15px 18px;
  width: auto;
  height: 2px;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(30, 231, 214, 0.5);
}

.customer-console .metric-tile strong,
.customer-console td strong,
.customer-console .price-stack strong,
.customer-console .credit-detail strong,
.customer-console .asset-item strong,
.admin-console .metric-tile strong,
.admin-console td strong,
.admin-console .price-stack strong,
.admin-console .credit-detail strong {
  color: var(--text);
}

.customer-console input,
.customer-console select,
.customer-console textarea,
.admin-console input,
.admin-console select,
.admin-console textarea {
  border-color: rgba(139, 245, 235, 0.15);
  background: rgba(3, 12, 15, 0.82);
  color: var(--text);
}

.customer-console input[type="file"] {
  background:
    repeating-linear-gradient(90deg, rgba(139, 245, 235, 0.04) 0 1px, transparent 1px 16px),
    rgba(3, 12, 15, 0.82);
}

.customer-console .video-preview,
.admin-console .video-preview {
  border-color: rgba(139, 245, 235, 0.18);
  background:
    linear-gradient(135deg, rgba(30, 231, 214, 0.08), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px),
    #02080b;
  color: rgba(241, 251, 248, 0.78);
}

.customer-console .table-frame,
.admin-console .table-frame {
  border-color: rgba(139, 245, 235, 0.12);
  background: rgba(3, 12, 15, 0.72);
}

.customer-console th,
.admin-console th {
  background: rgba(11, 28, 33, 0.98);
  color: #84a4a8;
}

.customer-console td,
.admin-console td {
  color: var(--subtle);
}

.customer-console .status-badge,
.admin-console .status-badge {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.customer-console .status-badge.ok,
.admin-console .status-badge.ok {
  border-color: rgba(97, 230, 167, 0.28);
  background: rgba(97, 230, 167, 0.09);
  color: var(--green);
}

.customer-console .status-badge.warn,
.admin-console .status-badge.warn {
  border-color: rgba(255, 192, 90, 0.3);
  background: rgba(255, 192, 90, 0.08);
  color: var(--amber);
}

.customer-console .status-badge.bad,
.admin-console .status-badge.bad {
  border-color: rgba(255, 111, 111, 0.3);
  background: rgba(255, 111, 111, 0.08);
  color: var(--red);
}

.customer-console .segmented,
.admin-console .segmented {
  border-color: rgba(139, 245, 235, 0.14);
  background: rgba(3, 12, 15, 0.74);
}

.customer-console .segmented button,
.admin-console .segmented button {
  background: transparent;
  color: var(--muted);
}

.customer-console .segmented button.active,
.admin-console .segmented button.active {
  background: rgba(30, 231, 214, 0.16);
  color: #ffffff;
}

.customer-console input[type="file"]::file-selector-button,
.admin-console input[type="file"]::file-selector-button {
  border-color: rgba(139, 245, 235, 0.16);
  background: rgba(9, 22, 26, 0.92);
  color: var(--text);
}
