﻿:root {
  --bg: #050707;
  --bg-2: #0a0f10;
  --surface: rgba(9, 14, 15, 0.8);
  --surface-strong: rgba(13, 18, 19, 0.94);
  --surface-soft: rgba(232, 245, 240, 0.07);
  --surface-warm: rgba(226, 185, 102, 0.14);
  --text: #e9f0ec;
  --text-strong: #fbfffd;
  --muted: #a8b4af;
  --muted-2: #76827d;
  --line: rgba(233, 240, 236, 0.16);
  --line-strong: rgba(233, 240, 236, 0.28);
  --cream: #e2c077;
  --cream-strong: #f0d793;
  --cyan: #66dce8;
  --green: #8bd49f;
  --amber: #dfab55;
  --red: #f06a62;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --mono: "IBM Plex Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial;
}

html[data-theme="light"],
body[data-theme="light"] {
  --bg: #f5f7f3;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(23, 48, 50, 0.06);
  --surface-warm: rgba(190, 134, 43, 0.12);
  --text: #253033;
  --text-strong: #101618;
  --muted: #667174;
  --muted-2: #90999b;
  --line: rgba(29, 43, 46, 0.14);
  --line-strong: rgba(29, 43, 46, 0.24);
  --cream: #17383c;
  --cream-strong: #0a2529;
  --cyan: #007486;
  --green: #1d7040;
  --amber: #956314;
  --shadow: 0 18px 48px rgba(22, 35, 37, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 68%, rgba(102, 220, 232, 0.08) 68% 68.2%, transparent 68.2% 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
  mix-blend-mode: normal;
  opacity: 0.42;
}

.pixel-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 44%, rgba(102, 220, 232, 0.24), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(223, 171, 85, 0.20), transparent 22%),
    linear-gradient(90deg, rgba(4, 5, 7, 0.94) 0%, rgba(4, 5, 7, 0.62) 42%, rgba(4, 5, 7, 0.88) 100%),
    repeating-linear-gradient(90deg, rgba(28, 73, 255, 0.24) 0 4px, rgba(246, 45, 50, 0.16) 4px 6px, rgba(255, 213, 74, 0.18) 6px 8px, transparent 8px 18px),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(255, 255, 255, 0.08) 15px 16px, transparent 16px 32px),
    #050609;
  background-position: 50% 50%, 50% 50%, 50% 50%, 0 0, 0 0, 50% 50%;
  background-size: 100% 100%, 100% 100%, 100% 100%, 150px 100%, 100% 64px, 100% 100%;
  filter: saturate(1.24) contrast(1.08);
  animation: mecproBackdrop 18s linear infinite;
  transform: scale(1.02);
  transform-origin: center;
  will-change: background-position, transform;
}

.pixel-field::before,
.pixel-field::after {
  content: "";
  position: absolute;
  inset: 0;
}

.pixel-field::before {
  width: min(56vw, 780px);
  height: min(56vw, 780px);
  inset: 14vh 7vw auto auto;
  background:
    repeating-linear-gradient(90deg, #69f4ff 0 8px, #f3424e 8px 11px, #ffcf5a 11px 15px, rgba(26, 74, 255, 0.92) 15px 21px, transparent 21px 34px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.24));
  mask: url("/static/mecpro-mark.svg") center / contain no-repeat;
  -webkit-mask: url("/static/mecpro-mark.svg") center / contain no-repeat;
  opacity: 0.78;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 28px rgba(102, 220, 232, 0.54)) drop-shadow(22px 12px 0 rgba(241, 45, 55, 0.18));
  animation: mecproMarkPulse 7.4s ease-in-out infinite;
}

.pixel-field::after {
  background:
    linear-gradient(105deg, transparent 0 30%, rgba(102, 220, 232, 0.00) 39%, rgba(102, 220, 232, 0.30) 47%, rgba(223, 171, 85, 0.18) 51%, transparent 62% 100%),
    repeating-linear-gradient(90deg, transparent 0 108px, rgba(102, 220, 232, 0.18) 109px 110px, transparent 111px 140px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.50) 100%);
  background-size: 920px 100%, 420px 100%, 100% 6px, 100% 100%;
  opacity: 0.70;
  mix-blend-mode: screen;
  animation: mecproScan 8s ease-in-out infinite, mecproGrid 20s linear infinite;
}

body[data-theme="light"] .pixel-field {
  background:
    radial-gradient(circle at 70% 44%, rgba(0, 116, 134, 0.22), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(149, 99, 20, 0.18), transparent 22%),
    linear-gradient(90deg, rgba(247, 249, 247, 0.86) 0%, rgba(247, 249, 247, 0.48) 42%, rgba(247, 249, 247, 0.80) 100%),
    repeating-linear-gradient(90deg, rgba(0, 88, 126, 0.25) 0 4px, rgba(184, 55, 48, 0.17) 4px 6px, rgba(149, 99, 20, 0.21) 6px 8px, transparent 8px 18px),
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(7, 18, 20, 0.10) 15px 16px, transparent 16px 32px),
    #f4f7f4;
  filter: saturate(0.98) brightness(0.99) contrast(1.05);
}

body[data-theme="light"] .pixel-field::before {
  opacity: 0.58;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 0 18px rgba(0, 116, 134, 0.22));
}

body[data-theme="light"] .pixel-field::after {
  background:
    linear-gradient(105deg, transparent 0 30%, rgba(0, 116, 134, 0.00) 39%, rgba(0, 116, 134, 0.22) 47%, rgba(149, 99, 20, 0.16) 51%, transparent 62% 100%),
    repeating-linear-gradient(90deg, transparent 0 108px, rgba(0, 116, 134, 0.18) 109px 110px, transparent 111px 140px),
    repeating-linear-gradient(0deg, rgba(7, 18, 20, 0.034) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.00), rgba(255, 255, 255, 0.28));
  opacity: 0.76;
  mix-blend-mode: multiply;
}

body[data-theme="light"]::before {
  background:
    linear-gradient(90deg, transparent 0 68%, rgba(0, 116, 134, 0.10) 68% 68.2%, transparent 68.2% 100%),
    repeating-linear-gradient(0deg, rgba(16, 22, 24, 0.030) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.24));
  opacity: 0.34;
}

@keyframes mecproBackdrop {
  from {
    background-position: 50% 50%, 50% 50%, 50% 50%, 0 0, 0 0, 50% 50%;
    transform: scale(1.02) translate3d(-0.6%, -0.4%, 0);
  }

  50% {
    background-position: 52% 49%, 48% 52%, 50% 50%, 120px 0, 0 24px, 50% 50%;
    transform: scale(1.045) translate3d(0.5%, 0.2%, 0);
  }

  to {
    background-position: 50% 50%, 50% 50%, 50% 50%, 240px 0, 0 48px, 50% 50%;
    transform: scale(1.02) translate3d(-0.6%, -0.4%, 0);
  }
}

@keyframes mecproGrid {
  from {
    background-position: -360px 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 360px 0, 420px 0, 0 24px, 0 0;
  }
}

@keyframes mecproMarkPulse {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.98);
    opacity: 0.70;
  }

  50% {
    transform: translate3d(-2.2%, 1.2%, 0) scale(1.04);
    opacity: 0.90;
  }
}

@keyframes mecproScan {
  0%,
  100% {
    transform: translate3d(-34%, 0, 0) skewX(-8deg);
    opacity: 0.48;
  }

  50% {
    transform: translate3d(34%, 0, 0) skewX(-8deg);
    opacity: 0.82;
  }
}

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

a:hover {
  color: var(--text-strong);
}

.status-card {
  gap: 14px;
}

.optional-password-field {
  opacity: 1;
}

.optional-password-field.is-hidden {
  display: none;
}

.login-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-mode-option,
.login-mode-option:hover {
  position: relative;
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  justify-items: start;
  gap: 5px 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(245, 234, 209, 0.04), rgba(102, 220, 232, 0.02)),
    rgba(6, 11, 12, 0.38);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.login-mode-option b {
  color: var(--text-strong);
  font-size: 0.98rem;
  line-height: 1.2;
}

.login-mode-option small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.42;
}

.login-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.login-mode-option:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(180deg, rgba(245, 234, 209, 0.08), rgba(102, 220, 232, 0.04)),
    rgba(6, 11, 12, 0.48);
}

.login-mode-option.is-active,
.login-mode-option.is-active:hover {
  border-color: rgba(102, 220, 232, 0.66);
  background:
    linear-gradient(180deg, rgba(102, 220, 232, 0.16), rgba(245, 234, 209, 0.06)),
    rgba(6, 11, 12, 0.58);
  box-shadow: inset 0 0 0 1px rgba(102, 220, 232, 0.16);
}

.login-mode-option.is-active .login-mode-badge {
  border-color: rgba(102, 220, 232, 0.54);
  background: rgba(102, 220, 232, 0.14);
  color: var(--cyan);
}

body[data-theme="light"] .login-mode-option,
body[data-theme="light"] .login-mode-option:hover {
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

body[data-theme="light"] .login-mode-option.is-active,
body[data-theme="light"] .login-mode-option.is-active:hover {
  background: rgba(0, 116, 134, 0.10);
  color: var(--text-strong);
}

.mini-note {
  min-height: 38px;
}

.verification-card {
  opacity: 0.72;
}

.verification-card.is-ready {
  opacity: 1;
  border-color: rgba(102, 220, 232, 0.42);
}

.slider-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.slider-modal-card {
  width: min(1120px, 100%);
  max-height: calc(100vh - 36px);
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: auto;
}

.slider-modal-head {
  position: relative;
  display: grid;
  padding-right: 48px;
}

.slider-modal-head .muted {
  margin-top: 6px;
}

.slider-browser-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1366 / 768;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0b0f10;
  outline: none;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.slider-browser-frame:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(102, 220, 232, 0.14);
}

.slider-browser-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.slider-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  background: rgba(8, 13, 14, 0.9);
}

.slider-placeholder b {
  color: var(--text-strong);
}

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

.slider-modal-actions .btn {
  min-width: 150px;
}

body[data-theme="light"] .slider-placeholder {
  background: rgba(255, 255, 255, 0.9);
}

.auth-progress {
  display: grid;
  gap: 10px;
}

.auth-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(6, 11, 12, 0.28);
}

body[data-theme="light"] .auth-step {
  background: rgba(255, 255, 255, 0.54);
}

.auth-step span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 900;
}

.auth-step b {
  color: var(--text-strong);
  font-size: 0.95rem;
}

.auth-step small {
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-step.is-active {
  border-color: rgba(102, 220, 232, 0.56);
  background: rgba(102, 220, 232, 0.1);
}

.auth-step.is-active span {
  border-color: rgba(102, 220, 232, 0.7);
  color: var(--cyan);
}

.auth-step.is-done span {
  border-color: rgba(114, 208, 150, 0.62);
  background: rgba(114, 208, 150, 0.14);
  color: var(--green);
}

.status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text-strong);
  background: rgba(245, 234, 209, 0.07);
  font-size: 0.82rem;
  font-weight: 820;
}

.compact-status-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.compact-status-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.compact-status-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.compact-status-list dt,
.compact-status-list dd {
  margin: 0;
}

.compact-status-list dt {
  color: var(--muted);
}

.compact-status-list dd {
  color: var(--text-strong);
  font-weight: 800;
  text-align: right;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--text-strong);
  font-size: 2.5rem;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  color: var(--text-strong);
  font-size: 1.35rem;
  line-height: 1.22;
  letter-spacing: 0;
}

h3 {
  color: var(--text-strong);
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.mono,
.kicker,
.brand-meta,
.side-kicker,
.solution-kicker,
.section-title {
  font-family: var(--mono);
}

.page-shell,
.container {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.app-frame {
  position: relative;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 70px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 13, 14, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

body[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.76);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(234, 214, 172, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(234, 214, 172, 0.22), rgba(115, 216, 241, 0.08)),
    #0c0d0b;
  color: var(--cream-strong);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand-word {
  color: var(--text-strong);
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-meta {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.brand-large {
  gap: 12px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(102, 220, 232, 0.22), 0 10px 26px rgba(0, 0, 0, 0.24);
}

.brand-wordmark {
  color: var(--text-strong);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0;
}

.landing-topbar {
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  background: rgba(8, 13, 14, 0.6);
}

body[data-theme="light"] .landing-topbar {
  background: rgba(255, 255, 255, 0.74);
}

.pill-nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 9, 10, 0.66);
  overflow-x: auto;
  scrollbar-width: none;
}

.pill-nav::-webkit-scrollbar {
  display: none;
}

.pill-nav a,
.utility-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  white-space: nowrap;
}

.pill-nav a:hover,
.utility-pill {
  background: rgba(245, 234, 209, 0.09);
  color: var(--text-strong);
}

.utility-button {
  border: 0;
  background: rgba(245, 234, 209, 0.09);
  color: var(--text-strong);
  cursor: pointer;
}

.admin-entry {
  border: 1px solid rgba(215, 169, 85, 0.26);
  color: var(--cream-strong);
}

.admin-entry:hover {
  border-color: rgba(215, 169, 85, 0.45);
}

body[data-theme="light"] .pill-nav,
body[data-theme="light"] .utility-button {
  background: rgba(255, 255, 255, 0.66);
}

body[data-theme="light"] .admin-entry {
  border-color: rgba(13, 95, 102, 0.20);
  color: var(--cream);
}

body[data-theme="light"] .pill-nav a:hover,
body[data-theme="light"] .utility-button:hover {
  background: rgba(23, 56, 60, 0.08);
}

.topbar-actions,
.header-actions,
.actions,
.highlight-row,
.chip-list,
.row,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.topbar-actions {
  justify-content: flex-end;
}

.home-page .topbar-actions {
  flex-wrap: nowrap;
}

.home-page .topbar-actions .utility-button {
  min-width: 88px;
}

.theme-control {
  position: relative;
  display: inline-flex;
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 160;
  min-width: 132px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.theme-dropdown button {
  min-height: 34px;
  justify-content: flex-start;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
}

.theme-dropdown button:hover,
.theme-dropdown button.active {
  background: var(--surface-soft);
  color: var(--text-strong);
}

.btn,
button {
  min-height: 40px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary,
.btn,
button {
  background: var(--cream);
  border-color: rgba(255, 248, 231, 0.28);
  color: #16110a;
}

.btn-primary:hover,
.btn:hover,
button:hover {
  color: #16110a;
  background: var(--cream-strong);
}

body[data-theme="light"] .btn-primary,
body[data-theme="light"] .btn,
body[data-theme="light"] button {
  color: #fffaf0;
}

body[data-theme="light"] .btn-primary:hover,
body[data-theme="light"] .btn:hover,
body[data-theme="light"] button:hover {
  color: #fffaf0;
}

.btn-secondary,
.btn.secondary,
button.secondary {
  background: rgba(245, 234, 209, 0.08);
  border-color: var(--line-strong);
  color: var(--text);
}

body[data-theme="light"] .btn-secondary,
body[data-theme="light"] .btn.secondary,
body[data-theme="light"] button.secondary,
body[data-theme="light"] .btn-ghost {
  color: var(--text);
}

.btn-secondary:hover,
.btn.secondary:hover,
button.secondary:hover {
  background: rgba(245, 234, 209, 0.14);
  color: var(--text-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(245, 234, 209, 0.08);
  color: var(--text-strong);
}

button:disabled {
  opacity: 0.64;
  cursor: wait;
}

button.utility-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  background: rgba(245, 234, 209, 0.09);
  color: var(--text-strong);
}

button.utility-button:hover {
  background: rgba(245, 234, 209, 0.14);
  color: var(--text-strong);
}

body[data-theme="light"] button.utility-button {
  background: rgba(23, 56, 60, 0.06);
  color: var(--text-strong);
}

body[data-theme="light"] button.utility-button:hover {
  background: rgba(23, 56, 60, 0.1);
}

body[data-theme="light"] .theme-dropdown button {
  color: var(--text);
}

body[data-theme="light"] .theme-dropdown button:hover,
body[data-theme="light"] .theme-dropdown button.active {
  color: var(--text-strong);
}

.home-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(470px, 0.78fr);
  grid-template-areas:
    "hero form"
    "side form";
  gap: 18px;
  align-items: start;
}

.landing-hero {
  position: relative;
  min-height: min(720px, calc(100vh - 132px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 5vw, 76px) clamp(22px, 4vw, 54px) clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 13, 14, 0.10), rgba(8, 13, 14, 0.68)),
    rgba(8, 13, 14, 0.30);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-hero {
  min-height: min(760px, calc(100vh - 132px));
  grid-template-columns: minmax(0, 980px);
  justify-content: start;
}

.product-hero .landing-title {
  font-size: 4.3rem;
}

body[data-theme="light"] .landing-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.18);
}

.landing-copy {
  display: grid;
  gap: 22px;
  align-content: center;
}

.landing-title {
  display: grid;
  gap: 0;
  max-width: 980px;
  font-size: 6.6rem;
  line-height: 0.88;
  letter-spacing: 0;
}

.landing-title span {
  display: block;
}

.landing-rail {
  display: grid;
  gap: 10px;
}

.hero-signal {
  display: grid;
  gap: 10px;
  align-self: center;
}

.advantages-section .feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.advantage-card {
  min-height: 190px;
}

.signal-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 13, 0.62);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.signal-card span,
.signal-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.signal-card b {
  color: var(--text-strong);
  font-size: 1.45rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

body[data-theme="light"] .signal-card {
  background: rgba(255, 255, 255, 0.72);
}

.landing-section,
.datasource-strip,
.selector-layout {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 14, 15, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
}

body[data-theme="light"] .landing-section,
body[data-theme="light"] .datasource-strip,
body[data-theme="light"] .selector-layout {
  background: rgba(255, 255, 255, 0.72);
}

.section-head {
  max-width: 920px;
}

.section-head h2,
.selector-intro h2,
.datasource-strip h2 {
  margin-top: 6px;
}

.section-head .muted,
.selector-intro .muted,
.datasource-strip .muted {
  margin-top: 8px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.feature-card {
  min-height: 160px;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 13, 0.52);
  padding: 16px;
}

body[data-theme="light"] .feature-card {
  background: rgba(255, 255, 255, 0.7);
}

.datasource-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 430px) auto;
  align-items: center;
  gap: 18px;
}

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

.selector-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.selector-intro {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 8px;
}

.selector-form {
  position: static;
  grid-area: auto;
}

.selector-layout .selector-form {
  grid-area: auto;
  position: static;
  top: auto;
}

.hero-panel {
  grid-area: hero;
  min-height: 500px;
  display: grid;
  align-content: end;
  gap: 20px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 6, 5, 0.54), rgba(8, 9, 8, 0.9)),
    rgba(3, 4, 4, 0.76);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-title {
  display: grid;
  gap: 0;
  color: var(--text-strong);
  font-size: 5.15rem;
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-title span {
  display: block;
}

.hero-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.03rem;
  overflow-wrap: anywhere;
}

.kicker,
.section-title,
.side-kicker,
.solution-kicker {
  color: var(--cream);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.route-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.route-note {
  min-height: 116px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 13, 0.66);
}

body[data-theme="light"] .route-note {
  background: rgba(255, 255, 255, 0.7);
}

.route-index {
  width: max-content;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
}

.route-note strong {
  color: var(--text-strong);
  font-size: 1rem;
}

.route-note span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.panel,
.card,
.summary-card,
.side-block,
.result-hero {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel,
.card {
  padding: 18px;
  margin: 16px 0;
}

.form-panel {
  grid-area: form;
  position: sticky;
  top: 104px;
  margin: 0;
  background: rgba(11, 17, 18, 0.88);
}

.selector-layout .selector-form {
  position: static;
  top: auto;
}

body[data-theme="light"] .form-panel {
  background: rgba(255, 255, 255, 0.9);
}

.side-panel {
  grid-area: side;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.side-block {
  padding: 16px;
}

.metric-list,
.strategy-stack,
.status-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.metric-list div,
.strategy-stack div,
.engineering-grid div,
.solution-metrics div,
.status-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.055);
}

body[data-theme="light"] .metric-list div,
body[data-theme="light"] .strategy-stack div,
body[data-theme="light"] .engineering-grid div,
body[data-theme="light"] .solution-metrics div,
body[data-theme="light"] .status-list div {
  background: rgba(23, 56, 60, 0.045);
}

.metric-list div,
.strategy-stack div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
}

.strategy-stack div {
  justify-content: flex-start;
  font-size: 0.86rem;
}

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.dot-cyan,
.dot-blue {
  background: var(--cyan);
}

.dot-green {
  background: var(--green);
}

.dot-amber {
  background: var(--amber);
}

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

.panel-head .kicker {
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.panel-head .muted,
.brand .muted {
  margin-top: 4px;
}

.form-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.form-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.section-title {
  margin-bottom: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(6, 11, 12, 0.76);
  color: var(--text-strong);
  outline: none;
  padding: 10px 11px;
  font: inherit;
  font-weight: 560;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-strong);
}

textarea {
  resize: vertical;
}

select option {
  color: var(--text);
  background: #11110f;
}

body[data-theme="light"] select option {
  color: #252017;
  background: #fffaf0;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(115, 216, 241, 0.78);
  box-shadow: 0 0 0 3px rgba(115, 216, 241, 0.16);
}

input[readonly] {
  cursor: pointer;
}

.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 9, 10, 0.72);
}

body[data-theme="light"] .seg {
  background: rgba(23, 56, 60, 0.06);
}

.seg-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.seg-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg-item:has(input:checked) {
  background: var(--cream);
  color: #17110b;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.055);
}

body[data-theme="light"] .check-row {
  background: rgba(23, 56, 60, 0.045);
}

.check-row input,
.ms-option input {
  width: auto;
  accent-color: var(--cream);
}

.field-note,
.block-note,
.test-output {
  margin-top: 10px;
}

.primary-action {
  min-width: 190px;
}

.alert,
.warn-panel,
.card.warn {
  border-color: rgba(229, 177, 93, 0.4);
  background: rgba(72, 42, 12, 0.46);
}

.alert {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: var(--text-strong);
}

.alert-title {
  margin-bottom: 4px;
  color: var(--amber);
  font-weight: 850;
}

.badge {
  min-height: 24px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.badge-cyan,
.badge-blue {
  color: #061719;
  background: var(--cyan);
  border-color: rgba(115, 216, 241, 0.6);
}

.badge-green {
  color: #06190e;
  background: var(--green);
  border-color: rgba(134, 215, 166, 0.62);
}

.badge-amber {
  color: #211303;
  background: var(--amber);
  border-color: rgba(229, 177, 93, 0.66);
}

.chip {
  max-width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 234, 209, 0.075);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.chip-amber {
  border-color: rgba(229, 177, 93, 0.52);
  background: rgba(229, 177, 93, 0.16);
  color: var(--cream-strong);
}

.chip-cyan {
  border-color: rgba(128, 233, 255, 0.42);
  background: rgba(128, 233, 255, 0.12);
  color: var(--cyan);
}

.result-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 24px;
  margin-bottom: 16px;
  background: rgba(11, 17, 18, 0.82);
}

body[data-theme="light"] .result-hero {
  background: rgba(255, 255, 255, 0.86);
}

.result-hero .kicker {
  margin-bottom: 8px;
}

.result-hero .muted {
  max-width: 720px;
  margin-top: 8px;
}

.result-route {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-route span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  min-height: 140px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
}

.summary-card span,
.solution-metrics span,
.engineering-grid span,
.metric-list span,
.status-list span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 4px;
}

.summary-card b {
  display: block;
  color: var(--text-strong);
  font-size: 1.65rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.summary-card small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.readiness-card {
  border-left: 3px solid var(--cyan);
}

.readiness-card b {
  font-size: 1.3rem;
}

.readiness-card small {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.readiness-high {
  border-left-color: var(--amber);
}

.readiness-medium {
  border-left-color: var(--cyan);
}

.readiness-low {
  border-left-color: var(--green);
}

.solution-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.solution-card {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.solution-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.solution-kicker {
  margin-bottom: 7px;
  color: var(--cyan);
  text-transform: uppercase;
}

.solution-side {
  display: grid;
  gap: 10px;
}

.solution-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.cart-status {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.refresh-status {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.refresh-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.refresh-summary div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 20, 0.42);
}

body[data-theme="light"] .refresh-summary div {
  background: rgba(255, 255, 255, 0.7);
}

.refresh-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.refresh-summary b {
  color: var(--text-strong);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.workflow-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 20, 0.42);
}

body[data-theme="light"] .workflow-step {
  background: rgba(255, 255, 255, 0.72);
}

.workflow-step > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(126, 221, 165, 0.14);
  color: var(--green);
  font-weight: 900;
}

.workflow-step b,
.enterprise-item b {
  display: block;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.workflow-step small,
.enterprise-item small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.workflow-current {
  border-color: rgba(86, 198, 215, 0.55);
}

.workflow-current > span {
  background: rgba(86, 198, 215, 0.16);
  color: var(--cyan);
}

.workflow-blocked {
  border-color: rgba(246, 198, 94, 0.55);
}

.workflow-blocked > span {
  background: rgba(246, 198, 94, 0.18);
  color: var(--amber);
}

.workflow-pending {
  opacity: 0.78;
}

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

.enterprise-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 20, 0.42);
}

body[data-theme="light"] .enterprise-item {
  background: rgba(255, 255, 255, 0.72);
}

.enterprise-item > span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 850;
}

.enterprise-planned > span {
  color: var(--amber);
}

.enterprise-active > span {
  color: var(--green);
}

.maturity-status {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 12px;
}

.input-gate {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 20, 0.42);
}

body[data-theme="light"] .input-gate {
  background: rgba(255, 255, 255, 0.72);
}

.input-gate b {
  color: var(--text-strong);
}

.ai-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-evidence-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 20, 0.42);
}

body[data-theme="light"] .ai-evidence-item {
  background: rgba(255, 255, 255, 0.72);
}

.ai-evidence-item span,
.line-blockers {
  display: block;
  font-size: 0.76rem;
}

.ai-evidence-item b {
  display: block;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.ai-evidence-item small {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.refresh-failures {
  margin-top: 10px;
}

.inline-action {
  display: inline-block;
  margin-left: 8px;
  color: var(--cyan);
  font-size: 0.92em;
  white-space: nowrap;
}

.solution-metrics div,
.engineering-grid div,
.status-list div {
  min-width: 0;
  padding: 11px 12px;
}

.solution-metrics b,
.engineering-grid b,
.metric-list b,
.status-list b {
  color: var(--text-strong);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.path-text {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.details-block {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 11, 12, 0.56);
  padding: 10px 12px;
}

body[data-theme="light"] .details-block {
  background: rgba(23, 56, 60, 0.045);
}

.details-block summary {
  color: var(--text-strong);
  cursor: pointer;
  font-weight: 820;
}

.details-note {
  margin-top: 8px;
}

.details-grid {
  margin-top: 12px;
}

.engineering-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.compact-list li {
  margin: 4px 0;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 11, 12, 0.58);
}

body[data-theme="light"] .table-wrap {
  background: rgba(255, 255, 255, 0.68);
}

.mini-table-wrap {
  margin-top: 10px;
}

.table {
  width: 100%;
  min-width: 1660px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.82rem;
}

.mini-table {
  min-width: 640px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(17, 27, 29, 0.98);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 820;
}

body[data-theme="light"] .table th {
  background: rgba(240, 245, 243, 0.98);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: rgba(245, 234, 209, 0.045);
}

.table .rfq td,
.rfq td {
  background: rgba(229, 177, 93, 0.10);
}

.table th:nth-child(1) { width: 90px; }
.table th:nth-child(2) { width: 190px; }
.table th:nth-child(3) { width: 180px; }
.table th:nth-child(4) { width: 260px; }
.table th:nth-child(5) { width: 70px; }
.table th:nth-child(6) { width: 95px; }
.table th:nth-child(7) { width: 150px; }
.table th:nth-child(8) { width: 90px; }
.table th:nth-child(9) { width: 160px; }
.table th:nth-child(10) { width: 300px; }
.table th:nth-child(11) { width: 260px; }

.pre {
  margin: 12px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(115, 216, 241, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--text-strong);
  padding: 14px;
  font-family: var(--mono);
  font-size: 0.82rem;
}

body[data-theme="light"] .pre {
  background: rgba(248, 250, 248, 0.9);
  color: var(--text-strong);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
}

.overlay-card {
  width: min(460px, 100%);
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 20px;
}

.overlay-title {
  color: var(--text-strong);
  font-weight: 850;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(245, 234, 209, 0.14);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.task-progress {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.task-step {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(10, 18, 20, 0.4);
  font-weight: 780;
}

body[data-theme="light"] .task-step {
  background: rgba(255, 255, 255, 0.74);
}

.task-step.is-active {
  border-color: rgba(86, 198, 215, 0.55);
  color: var(--text-strong);
}

.task-step.is-done {
  border-color: rgba(126, 221, 165, 0.42);
  color: var(--green);
}

.progress-help {
  font-size: 0.86rem;
}

.ms {
  position: relative;
}

.ms-display {
  width: 100%;
  cursor: pointer;
}

.ms-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0d1415;
  box-shadow: var(--shadow);
  padding: 10px;
}

body[data-theme="light"] .ms-panel {
  background: #ffffff;
}

.ms-filter {
  width: 100%;
  margin-bottom: 10px;
}

.ms-options {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
}

.single-source-grid {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-chips {
  margin-top: 8px;
}

.action-row {
  margin-top: 12px;
}

.field-gap,
.section-divider {
  margin-top: 14px;
}

.section-divider {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.section-divider .muted {
  margin-top: 6px;
}

.clear-form {
  margin-top: 10px;
}

.source-hero {
  margin-bottom: 16px;
}

.source-card {
  margin: 0;
}

.compact-feature-grid .feature-card {
  min-height: 130px;
}

.price-panel .compact-status {
  margin-top: 0;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.055);
  padding: 14px;
}

.history-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 11, 12, 0.36);
  padding: 10px;
}

body[data-theme="light"] .history-metrics div {
  background: rgba(255, 255, 255, 0.62);
}

.history-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.history-metrics b {
  color: var(--text-strong);
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-page .page-shell {
  padding-bottom: 42px;
}

.admin-hero {
  background:
    linear-gradient(135deg, rgba(102, 220, 232, 0.14), rgba(223, 171, 85, 0.08)),
    rgba(11, 17, 18, 0.82);
}

body[data-theme="light"] .admin-hero {
  background:
    linear-gradient(135deg, rgba(0, 116, 134, 0.12), rgba(149, 99, 20, 0.08)),
    rgba(255, 255, 255, 0.88);
}

.admin-summary-grid {
  align-items: stretch;
}

.admin-metric-card {
  min-height: 132px;
  background:
    linear-gradient(180deg, rgba(245, 234, 209, 0.075), rgba(102, 220, 232, 0.045)),
    var(--surface);
}

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

.admin-panel {
  min-width: 0;
}

.admin-status-panel {
  position: sticky;
  top: 104px;
}

.admin-status-list {
  margin-top: 0;
}

.admin-status-list div {
  padding: 12px;
}

.admin-status-list b {
  display: block;
  color: var(--text-strong);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.admin-table-wrap {
  background: rgba(6, 11, 12, 0.5);
}

.admin-table {
  min-width: 880px;
  table-layout: auto;
}

.admin-history-table {
  min-width: 1060px;
}

.admin-feedback-table {
  min-width: 1120px;
}

.admin-table th:nth-child(n) {
  width: auto;
}

.admin-table th,
.admin-table td {
  font-size: 0.82rem;
}

.admin-strong,
.admin-table strong {
  color: var(--text-strong);
  font-weight: 850;
}

.admin-key {
  max-width: 180px;
  color: var(--muted);
}

.admin-message {
  max-width: 360px;
  color: var(--text);
  line-height: 1.45;
}

.admin-page-link {
  display: inline-block;
  max-width: 240px;
  color: var(--cyan);
  overflow-wrap: anywhere;
}

.admin-mini-action {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-danger-action {
  border-color: rgba(240, 106, 98, 0.32);
  color: var(--red);
}

.admin-danger-action:hover {
  border-color: rgba(240, 106, 98, 0.52);
  background: rgba(240, 106, 98, 0.10);
  color: var(--text-strong);
}

.admin-status-select {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-note-input {
  width: min(220px, 100%);
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 22, 0.72);
  color: var(--text-strong);
  padding: 8px 10px;
}

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

.admin-empty {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.045);
}

body[data-theme="light"] .admin-empty,
body[data-theme="light"] .admin-table-wrap {
  background: rgba(255, 255, 255, 0.66);
}

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

.admin-api-grid a {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.055);
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.admin-api-grid a:hover {
  background: rgba(102, 220, 232, 0.10);
  color: var(--cyan);
  text-decoration: none;
}

.quota-summary-grid,
.quota-workspace-grid {
  margin-bottom: 18px;
}

.quota-workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.quota-buy-btn {
  min-width: 88px;
}

.quota-alert {
  margin-bottom: 18px;
}

.admin-gate {
  max-width: 880px;
  margin: 0 auto;
}

.admin-login-panel {
  width: min(560px, 100%);
  margin: 16px auto 0;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.66);
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 20px;
}

.feedback-card {
  width: min(560px, 100%);
}

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

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 234, 209, 0.08);
  color: var(--text-strong);
}

.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(240, 106, 98, 0.34);
  border-radius: 8px;
  background: rgba(240, 106, 98, 0.11);
  color: var(--text-strong);
  font-size: 0.88rem;
}

.support-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 850;
  min-width: 148px;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  row-gap: 1px;
  padding: 10px 14px;
  border: 1px solid rgba(102, 220, 232, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(102, 220, 232, 0.18), rgba(226, 192, 119, 0.18)),
    var(--surface-strong);
  color: var(--text-strong);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.support-launcher:hover {
  background:
    linear-gradient(135deg, rgba(102, 220, 232, 0.26), rgba(226, 192, 119, 0.24)),
    var(--surface-strong);
  color: var(--text-strong);
}

.support-launcher span:not(.support-dot) {
  font-size: 0.92rem;
  font-weight: 860;
}

.support-launcher small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
  line-height: 1.1;
}

.support-dot {
  grid-row: 1 / span 2;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(102, 220, 232, 0.14), 0 0 22px rgba(102, 220, 232, 0.42);
}

.feedback-status {
  min-height: 1.2em;
}

.grow {
  flex: 1 1 240px;
}

.hidden {
  display: none !important;
}

label.span2,
.span2,
label.span3,
.span3 {
  grid-column: 1 / -1;
}

@media (max-width: 1220px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .pill-nav {
    justify-self: stretch;
  }

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

  .hero-title {
    font-size: 4.3rem;
  }

  .landing-topbar {
    grid-template-columns: 1fr;
  }

  .landing-title {
    font-size: 5rem;
  }

  .datasource-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .home-workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "form"
      "side";
  }

  .form-panel {
    position: static;
  }

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

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

  .solution-head,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .result-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-route {
    justify-content: flex-start;
  }

  .landing-hero,
  .selector-layout {
    grid-template-columns: 1fr;
  }

  .selector-intro {
    position: static;
  }

  .feature-grid,
  .compact-status,
  .refresh-summary,
  .workflow-steps,
  .enterprise-grid,
  .ai-evidence-grid {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

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

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

  .admin-status-panel {
    position: static;
  }

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

}

@media (max-width: 760px) {
  .page-shell,
  .container {
    width: min(1440px, calc(100% - 20px));
    padding-top: 10px;
  }

  .topbar {
    top: 8px;
    gap: 10px;
    min-height: 0;
    padding: 10px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-word {
    font-size: 1rem;
  }

  .pill-nav {
    justify-content: flex-start;
  }

  .topbar-actions,
  .header-actions,
  .actions,
  .row,
  .hero-actions {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .topbar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar-actions .btn,
  .topbar-actions .utility-button,
  .topbar-actions .theme-control,
  .actions .btn,
  .actions button,
  .row .btn,
  .row button {
    flex: 1 1 0;
    min-width: 0;
  }

  .topbar-actions .btn,
  .topbar-actions .utility-button {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.86rem;
  }

  .topbar-actions .theme-control .utility-button {
    width: 100%;
  }

  .hero-panel {
    min-height: 0;
    padding: 20px;
  }

  .hero-title {
    font-size: 3.05rem;
    line-height: 0.94;
  }

  .landing-title {
    font-size: 3.35rem;
    line-height: 0.94;
  }

  .landing-hero,
  .landing-section,
  .datasource-strip,
  .selector-layout {
    padding: 18px;
  }

  .landing-hero {
    min-height: 0;
  }

  .brand-wordmark {
    font-size: 1.55rem;
  }

  .hero-lead {
    font-size: 0.96rem;
  }

  .route-stack,
  .form-panel .grid,
  .grid,
  .side-panel,
  .summary-grid,
  .engineering-grid,
  .refresh-summary,
  .workflow-steps,
  .enterprise-grid,
  .ai-evidence-grid,
  .solution-metrics,
  .advantages-section .feature-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .card,
  .result-hero {
    padding: 14px;
  }

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

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

  .seg {
    width: 100%;
  }

  .seg-item {
    flex: 1 1 0;
  }

  .login-mode-control {
    grid-template-columns: 1fr;
  }

  .slider-modal {
    padding: 10px;
  }

  .slider-modal-card {
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .slider-browser-frame {
    min-height: 220px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.18rem;
  }

  .table {
    min-width: 980px;
  }
}

/* Taste-skill polish: calmer B2B product UI, lower paint cost, clearer states. */
:root {
  --bg: #090c0e;
  --bg-2: #101519;
  --surface: rgba(15, 20, 22, 0.86);
  --surface-strong: rgba(18, 24, 27, 0.96);
  --surface-soft: rgba(219, 229, 224, 0.08);
  --surface-warm: rgba(215, 169, 85, 0.13);
  --text: #dfe6e3;
  --text-strong: #fbfdfc;
  --muted: #a8b2ae;
  --muted-2: #747f7b;
  --line: rgba(224, 233, 229, 0.13);
  --line-strong: rgba(224, 233, 229, 0.24);
  --cream: #d7aa55;
  --cream-strong: #efc979;
  --cyan: #6fc9d2;
  --green: #7cc893;
  --amber: #d7aa55;
  --red: #ec7369;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.22);
  --mono: "Cascadia Code", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Aptos", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial;
}

html[data-theme="light"],
body[data-theme="light"] {
  --bg: #f5f7f6;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(14, 42, 47, 0.055);
  --surface-warm: rgba(13, 95, 102, 0.08);
  --text: #273235;
  --text-strong: #111719;
  --muted: #657174;
  --muted-2: #8b9699;
  --line: rgba(19, 35, 39, 0.12);
  --line-strong: rgba(19, 35, 39, 0.22);
  --cream: #0d5f66;
  --cream-strong: #073f45;
  --cyan: #0a7281;
  --green: #217247;
  --amber: #94620e;
  --red: #b9423a;
  --shadow: 0 18px 45px rgba(18, 32, 36, 0.11);
  --shadow-soft: 0 10px 26px rgba(18, 32, 36, 0.08);
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 10%, rgba(111, 201, 210, 0.10), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(215, 169, 85, 0.09), transparent 26%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

body::before {
  background:
    linear-gradient(90deg, transparent 0 75%, rgba(111, 201, 210, 0.08) 75% 75.08%, transparent 75.08% 100%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  opacity: 0.28;
}

body[data-theme="light"]::before {
  background:
    linear-gradient(90deg, transparent 0 75%, rgba(13, 95, 102, 0.09) 75% 75.08%, transparent 75.08% 100%),
    linear-gradient(rgba(16, 30, 34, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 30, 34, 0.030) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  opacity: 0.42;
}

.pixel-field {
  background:
    radial-gradient(circle at 76% 30%, rgba(111, 201, 210, 0.14), transparent 22%),
    radial-gradient(circle at 84% 78%, rgba(215, 169, 85, 0.10), transparent 24%),
    linear-gradient(135deg, rgba(5, 8, 10, 0.88), rgba(9, 13, 15, 0.98));
  background-size: 100% 100%;
  filter: none;
  opacity: 1;
  animation: none;
  transform: none;
  will-change: auto;
}

.pixel-field::before {
  width: min(42vw, 620px);
  height: min(42vw, 620px);
  inset: 18vh 8vw auto auto;
  background: linear-gradient(135deg, rgba(111, 201, 210, 0.22), rgba(215, 169, 85, 0.16));
  opacity: 0.34;
  mix-blend-mode: screen;
  filter: drop-shadow(0 24px 80px rgba(0, 0, 0, 0.38));
  animation: none;
}

.pixel-field::after {
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(111, 201, 210, 0.13) 47%, transparent 58%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 840px 100%, 100% 6px;
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: none;
}

body[data-theme="light"] .pixel-field {
  background:
    radial-gradient(circle at 74% 28%, rgba(13, 95, 102, 0.10), transparent 23%),
    radial-gradient(circle at 86% 78%, rgba(148, 98, 14, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(247, 249, 248, 0.96), rgba(235, 241, 239, 0.98));
}

body[data-theme="light"] .pixel-field::before {
  opacity: 0.18;
  mix-blend-mode: multiply;
  filter: none;
}

body[data-theme="light"] .pixel-field::after {
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(13, 95, 102, 0.10) 47%, transparent 58%),
    linear-gradient(rgba(16, 30, 34, 0.022) 1px, transparent 1px);
  opacity: 0.36;
  mix-blend-mode: multiply;
}

h1,
h2,
h3,
.landing-title,
.hero-title,
.brand-wordmark {
  letter-spacing: 0;
  text-wrap: balance;
}

p,
.muted,
.hero-lead {
  text-wrap: pretty;
}

a,
button,
.btn,
.utility-pill,
.feature-card,
.summary-card,
.panel,
.card,
input,
select,
textarea,
summary {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.page-shell,
.container {
  width: min(1400px, calc(100% - 44px));
  padding-top: 16px;
}

.topbar {
  top: 12px;
  min-height: 68px;
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(15, 20, 22, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

body[data-theme="light"] .topbar,
body[data-theme="light"] .landing-topbar {
  background: rgba(255, 255, 255, 0.84);
}

.brand-icon,
.brand-mark {
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(111, 201, 210, 0.18), 0 12px 28px rgba(0, 0, 0, 0.20);
}

.brand-wordmark {
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 850;
}

.brand-meta,
.kicker,
.section-title,
.side-kicker,
.solution-kicker {
  letter-spacing: 0;
}

.pill-nav {
  border-radius: 8px;
  background: rgba(8, 12, 14, 0.54);
}

body[data-theme="light"] .pill-nav,
body[data-theme="light"] .utility-button {
  background: rgba(15, 42, 47, 0.055);
}

.pill-nav a,
.utility-pill {
  border-radius: 7px;
  font-weight: 740;
}

.home-page .pill-nav a[href="/"],
.start-page .pill-nav a[href="/start"],
.history-page .pill-nav a[href="/history"],
.settings-page .pill-nav a[href="/settings"] {
  background: var(--surface-soft);
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn,
button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 780;
  white-space: nowrap;
}

.btn-primary,
.btn {
  background: linear-gradient(180deg, var(--cream-strong), var(--cream));
  border-color: rgba(255, 242, 204, 0.22);
  color: #141009;
  box-shadow: 0 12px 26px rgba(215, 169, 85, 0.18);
}

.btn-primary:hover,
.btn:hover {
  background: linear-gradient(180deg, #f4d389, var(--cream-strong));
  color: #141009;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(215, 169, 85, 0.24);
}

.btn:active,
button:active,
.utility-pill:active {
  transform: translateY(1px);
}

body[data-theme="light"] .btn-primary,
body[data-theme="light"] .btn {
  background: linear-gradient(180deg, var(--cream), var(--cream-strong));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(13, 95, 102, 0.16);
}

body[data-theme="light"] .btn-primary:hover,
body[data-theme="light"] .btn:hover {
  background: linear-gradient(180deg, #126b74, var(--cream));
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(13, 95, 102, 0.20);
}

.btn-secondary,
.btn.secondary,
button.secondary,
.btn-ghost,
.utility-button {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: none;
}

.btn-secondary:hover,
.btn.secondary:hover,
button.secondary:hover,
.btn-ghost:hover,
.utility-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--text-strong);
  box-shadow: none;
}

.theme-dropdown button,
.modal-close {
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.theme-dropdown button:hover,
.theme-dropdown button.active,
.modal-close:hover {
  background: var(--surface-soft);
  color: var(--text-strong);
  box-shadow: none;
}

.landing-hero,
.landing-section,
.selector-layout,
.panel,
.card,
.summary-card,
.side-block,
.result-hero {
  border-radius: 8px;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .landing-hero,
body[data-theme="light"] .landing-section,
body[data-theme="light"] .selector-layout,
body[data-theme="light"] .panel,
body[data-theme="light"] .card,
body[data-theme="light"] .summary-card,
body[data-theme="light"] .side-block,
body[data-theme="light"] .result-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62)),
    var(--surface);
}

.product-hero {
  min-height: min(700px, calc(100dvh - 124px));
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  justify-content: stretch;
  background:
    radial-gradient(circle at 82% 30%, rgba(111, 201, 210, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(13, 18, 20, 0.74);
}

body[data-theme="light"] .product-hero {
  background:
    radial-gradient(circle at 82% 30%, rgba(13, 95, 102, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.54)),
    rgba(255, 255, 255, 0.76);
}

.product-hero .landing-title,
.landing-title {
  max-width: 980px;
  font-size: clamp(3.35rem, 8vw, 6.25rem);
  line-height: 0.96;
  font-weight: 900;
}

.product-hero .landing-copy {
  max-width: 980px;
}

.hero-lead {
  max-width: 780px;
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.72;
}

.hero-actions {
  align-items: center;
}

.hero-system-panel {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.022)),
    rgba(8, 13, 15, 0.58);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-system-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 63%, rgba(111, 201, 210, 0.12) 63% 63.4%, transparent 63.4%),
    linear-gradient(rgba(255, 255, 255, 0.030) 1px, transparent 1px);
  background-size: 100% 100%, 100% 32px;
  opacity: 0.5;
}

body[data-theme="light"] .hero-system-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.64)),
    rgba(255, 255, 255, 0.74);
}

.system-panel-head,
.system-readout {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.system-panel-head .mono {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.system-flow {
  position: relative;
  display: grid;
  gap: 10px;
}

.system-flow div {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.040);
}

.system-flow span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(111, 201, 210, 0.28);
  border-radius: 8px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 850;
}

.system-flow b,
.system-readout b {
  color: var(--text-strong);
}

.system-flow small,
.system-readout span {
  color: var(--muted);
  font-size: 0.76rem;
}

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

.system-readout div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(215, 169, 85, 0.08);
}

.system-readout b {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.feature-grid {
  gap: 14px;
}

.feature-card,
.summary-card,
.status-list div,
.metric-list div,
.strategy-stack div,
.engineering-grid div,
.solution-metrics div,
.route-note,
.details-block,
.history-item,
.admin-api-grid a {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body[data-theme="light"] .feature-card,
body[data-theme="light"] .summary-card,
body[data-theme="light"] .status-list div,
body[data-theme="light"] .metric-list div,
body[data-theme="light"] .strategy-stack div,
body[data-theme="light"] .engineering-grid div,
body[data-theme="light"] .solution-metrics div,
body[data-theme="light"] .route-note,
body[data-theme="light"] .details-block,
body[data-theme="light"] .history-item,
body[data-theme="light"] .admin-api-grid a {
  background: rgba(255, 255, 255, 0.66);
}

.feature-card:hover,
.summary-card:hover,
.admin-api-grid a:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.summary-card {
  position: relative;
  min-height: 132px;
  overflow: hidden;
}

.summary-card::before,
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cream), transparent 65%);
  opacity: 0.72;
}

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

.summary-card b {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 850;
}

.status-list div,
.metric-list div,
.solution-metrics div,
.engineering-grid div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.status-list b,
.metric-list b,
.solution-metrics b,
.engineering-grid b {
  text-align: right;
}

.form-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(15, 20, 22, 0.92);
}

body[data-theme="light"] .form-panel {
  background: rgba(255, 255, 255, 0.94);
}

label {
  gap: 8px;
  font-weight: 720;
}

input,
select,
textarea,
.ms-panel {
  border-radius: 8px;
  background: rgba(4, 8, 10, 0.66);
  border-color: var(--line);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="light"] .ms-panel {
  background: rgba(255, 255, 255, 0.88);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus,
.slider-browser-frame:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(111, 201, 210, 0.16);
}

.seg {
  border-radius: 8px;
  background: rgba(4, 8, 10, 0.52);
}

.seg-item {
  border-radius: 7px;
}

.seg-item:has(input:checked) {
  background: var(--cream);
  color: #141009;
  box-shadow: 0 8px 20px rgba(215, 169, 85, 0.16);
}

body[data-theme="light"] .seg-item:has(input:checked) {
  color: #ffffff;
}

.details-block {
  padding: 12px;
}

.details-block summary {
  list-style: none;
}

.details-block summary::-webkit-details-marker {
  display: none;
}

.details-block summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.details-block[open] summary::after {
  content: "-";
}

.table-wrap,
.admin-table-wrap {
  border-radius: 8px;
  background: rgba(4, 8, 10, 0.52);
  box-shadow: var(--shadow-soft);
}

.table th {
  background: rgba(18, 24, 27, 0.98);
  color: var(--text-strong);
  letter-spacing: 0;
}

body[data-theme="light"] .table th {
  background: rgba(238, 244, 242, 0.98);
  color: var(--text-strong);
}

.alert,
.warn-panel,
.card.warn,
.flash {
  border: 1px solid rgba(215, 169, 85, 0.34);
  border-radius: 8px;
  background: rgba(82, 57, 16, 0.32);
  box-shadow: var(--shadow-soft);
}

.flash {
  padding: 13px 15px;
  margin-bottom: 16px;
  color: var(--text-strong);
}

body[data-theme="light"] .alert,
body[data-theme="light"] .warn-panel,
body[data-theme="light"] .card.warn,
body[data-theme="light"] .flash {
  background: rgba(148, 98, 14, 0.08);
}

.modal {
  background: rgba(3, 6, 7, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card,
.overlay-card,
.slider-modal-card {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface-strong);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.modal-card {
  gap: 16px;
  padding: 22px;
}

.modal-close {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  color: var(--text-strong);
  font-size: 1.15rem;
  font-weight: 850;
  line-height: 1;
  background: var(--surface-soft);
}

.login-mode-option {
  border-radius: 8px;
}

.support-launcher {
  right: 20px;
  bottom: 20px;
  min-width: 128px;
  min-height: 60px;
  border-color: rgba(215, 169, 85, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, var(--cream-strong), var(--cream));
  color: #141009;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}

.support-launcher:hover {
  background: linear-gradient(180deg, #f4d389, var(--cream-strong));
  color: #141009;
  transform: translateY(-1px);
}

.support-launcher small {
  display: none;
  color: rgba(20, 16, 9, 0.72);
}

.support-dot {
  background: #141009;
  box-shadow: 0 0 0 5px rgba(20, 16, 9, 0.10);
}

body[data-theme="light"] .support-launcher {
  background: linear-gradient(180deg, var(--cream), var(--cream-strong));
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(13, 95, 102, 0.24);
}

body[data-theme="light"] .support-launcher:hover {
  background: linear-gradient(180deg, #126b74, var(--cream));
  color: #ffffff;
}

body[data-theme="light"] .support-launcher small {
  color: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .support-dot {
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16);
}

.bridge-token-panel,
.source-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.bridge-token-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(111, 201, 210, 0.07);
}

.overlay-card {
  justify-items: start;
}

.spinner {
  border-width: 3px;
  border-top-color: var(--cream);
}

@media (max-width: 1220px) {
  .product-hero {
    grid-template-columns: 1fr;
  }

  .hero-system-panel {
    max-width: 720px;
  }
}

@media (max-width: 760px) {
  .page-shell,
  .container {
    width: min(1400px, calc(100% - 20px));
  }

  .topbar {
    top: 8px;
  }

  .product-hero .landing-title,
  .landing-title {
    font-size: clamp(2.45rem, 13vw, 3.15rem);
  }

  .product-hero,
  .landing-section,
  .selector-layout {
    padding: 16px;
  }

  .hero-system-panel {
    padding: 12px;
  }

  .system-readout,
  .status-list div,
  .metric-list div,
  .solution-metrics div,
  .engineering-grid div {
    grid-template-columns: 1fr;
  }

  .status-list b,
  .metric-list b,
  .solution-metrics b,
  .engineering-grid b {
    text-align: left;
  }

  .btn,
  button {
    white-space: normal;
  }

  .support-launcher {
    right: 12px;
    bottom: 12px;
    min-width: 92px;
    min-height: 54px;
    grid-template-columns: auto 1fr;
    padding: 9px 10px;
  }

  .support-launcher small {
    display: none;
  }

  .support-launcher span:not(.support-dot) {
    font-size: 0.84rem;
  }
}

/* Frontend-design pass: product cockpit, clearer workflow, stronger admin density. */
.workspace-overview,
.auth-path-strip {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 12%, rgba(111, 201, 210, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(12px);
}

body[data-theme="light"] .workspace-overview,
body[data-theme="light"] .auth-path-strip {
  background:
    radial-gradient(circle at 88% 12%, rgba(13, 95, 102, 0.10), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.64)),
    var(--surface);
}

.workspace-overview {
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  align-items: end;
}

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

.workspace-copy h1 {
  font-size: clamp(2.35rem, 5vw, 4.9rem);
  line-height: 0.96;
  font-weight: 900;
}

.workspace-copy .muted {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.7;
}

.workspace-status-grid,
.auth-path-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workspace-status-grid {
  display: grid;
  gap: 10px;
}

.workspace-status-grid div,
.auth-path-strip div,
.selection-guide div {
  min-width: 0;
  position: relative;
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.048);
  overflow: hidden;
}

body[data-theme="light"] .workspace-status-grid div,
body[data-theme="light"] .auth-path-strip div,
body[data-theme="light"] .selection-guide div {
  background: rgba(255, 255, 255, 0.66);
}

.workspace-status-grid div::before,
.auth-path-strip div::before,
.selection-guide div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cyan);
  opacity: 0.76;
}

.workspace-status-grid span,
.auth-path-strip small,
.selection-guide small {
  color: var(--muted);
  font-size: 0.76rem;
}

.workspace-status-grid b,
.auth-path-strip b,
.selection-guide b {
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.auth-path-strip {
  align-items: stretch;
}

.auth-path-strip span,
.selection-guide span {
  width: max-content;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 850;
}

.quota-summary-grid {
  gap: 14px;
}

.quota-card {
  min-height: 150px;
}

.quota-card-balance {
  background:
    linear-gradient(135deg, rgba(215, 169, 85, 0.16), rgba(111, 201, 210, 0.055)),
    var(--surface);
}

.quota-ok::before {
  background: linear-gradient(90deg, var(--green), transparent 65%);
}

.quota-low::before {
  background: linear-gradient(90deg, var(--red), transparent 65%);
}

.quota-low b {
  color: var(--red);
}

.source-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.source-card .actions {
  margin-top: 2px;
}

.source-card .status-list {
  margin-top: 4px;
}

.selection-guide {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.selector-intro {
  padding: 2px 2px 10px;
}

.selector-intro h2 {
  font-size: 1.55rem;
}

.selector-layout {
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 20px;
}

.form-panel {
  border-color: var(--line-strong);
}

.form-section {
  border-top-style: dashed;
}

.section-title {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-strong);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: none;
}

.form-panel > .actions:last-child {
  position: sticky;
  bottom: 10px;
  z-index: 3;
  margin: 18px -8px -8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(18, 24, 27, 0.94), rgba(18, 24, 27, 0.88));
  box-shadow: var(--shadow-soft);
}

body[data-theme="light"] .form-panel > .actions:last-child {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.90));
}

.primary-action {
  min-width: 230px;
}

.check-row {
  align-items: center;
}

.check-row input {
  margin-top: 1px;
}

.details-block[open] {
  border-color: rgba(111, 201, 210, 0.34);
  background: rgba(111, 201, 210, 0.055);
}

.ms-panel {
  z-index: 90;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.ms-option {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 7px;
}

.ms-option:hover {
  background: var(--surface-soft);
}

.history-list {
  gap: 14px;
}

.history-item {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px) minmax(160px, auto);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.history-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.history-item h2 {
  font-size: 1.18rem;
}

.history-metrics div {
  display: grid;
  gap: 4px;
  min-height: 62px;
}

.empty-state {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.empty-state-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--cream-strong);
  font-family: var(--mono);
  font-weight: 900;
}

.local-auth-page .source-hero {
  margin-bottom: 14px;
}

.bridge-token-panel input {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.bridge-auto-status {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(111, 201, 210, 0.24);
  border-radius: 8px;
  background: rgba(111, 201, 210, 0.065);
}

.bridge-auto-status div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bridge-auto-status span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.bridge-auto-status b {
  color: var(--text-strong);
}

.bridge-install-card {
  border-color: rgba(215, 169, 85, 0.24);
}

.bridge-store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.bridge-store-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed rgba(215, 169, 85, 0.38);
  border-radius: 8px;
  background: rgba(215, 169, 85, 0.075);
}

.bridge-store-note b {
  color: var(--text-strong);
}

.bridge-store-note span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.bridge-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.bridge-route-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.bridge-route-grid span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bridge-route-grid b {
  color: var(--text-strong);
  line-height: 1.25;
}

.bridge-route-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.bridge-dev-details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

body[data-theme="light"] .bridge-dev-details {
  background: rgba(255, 255, 255, 0.56);
}

.bridge-dev-details summary {
  cursor: pointer;
  padding: 12px;
  color: var(--text-strong);
  font-weight: 850;
}

.bridge-dev-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.bridge-dev-details .bridge-install-steps,
.bridge-dev-details .actions {
  margin-left: 12px;
  margin-right: 12px;
}

.bridge-dev-details .actions {
  margin-bottom: 12px;
}

.bridge-install-steps {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.bridge-install-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.bridge-install-steps span {
  grid-row: span 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: rgba(111, 201, 210, 0.13);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 900;
}

.bridge-install-steps b {
  color: var(--text-strong);
  line-height: 1.25;
}

.bridge-install-steps small {
  color: var(--muted);
  line-height: 1.45;
}

.test-output:not(:empty),
.feedback-status:not(:empty) {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-strong);
}

.admin-hero {
  border-color: rgba(111, 201, 210, 0.22);
}

.admin-summary-grid {
  gap: 14px;
}

.admin-layout {
  gap: 18px;
}

.admin-panel {
  margin-top: 18px;
}

.admin-status-panel {
  top: 108px;
}

.admin-table-wrap {
  border-color: var(--line);
}

.admin-table {
  min-width: 960px;
}

.admin-ai-usage-table {
  min-width: 1120px;
}

.admin-table th {
  height: 42px;
  white-space: nowrap;
}

.admin-table td {
  color: var(--text);
}

.admin-table tbody tr:hover td {
  background: rgba(111, 201, 210, 0.055);
}

.admin-status-select,
.admin-note-input {
  border-radius: 8px;
}

.admin-adjust-form {
  gap: 14px;
}

.admin-api-grid a {
  min-height: 64px;
}

.admin-toast {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 960;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

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

.admin-toast[data-type="error"] {
  border-color: rgba(236, 115, 105, 0.42);
  background:
    linear-gradient(180deg, rgba(236, 115, 105, 0.12), rgba(236, 115, 105, 0.06)),
    var(--surface-strong);
}

@media (max-width: 1180px) {
  .workspace-overview,
  .workspace-status-grid,
  .auth-path-strip,
  .bridge-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1040px) {
  .selector-layout {
    grid-template-columns: 1fr;
  }

  .form-panel > .actions:last-child {
    position: static;
  }

  .empty-state {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workspace-overview,
  .workspace-status-grid,
  .auth-path-strip,
  .bridge-route-grid {
    grid-template-columns: 1fr;
  }

  .workspace-overview,
  .auth-path-strip {
    padding: 16px;
  }

  .workspace-copy h1 {
    font-size: clamp(2.15rem, 13vw, 3.1rem);
  }

  .quota-card {
    min-height: 124px;
  }

  .selector-intro h2 {
    font-size: 1.28rem;
  }

  .form-panel > .actions:last-child {
    margin: 16px 0 0;
  }

  .primary-action {
    min-width: 0;
    width: 100%;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .history-metrics {
    grid-template-columns: 1fr;
  }

  .empty-state-mark {
    width: 48px;
    height: 48px;
  }
}

/* Full-product polish: result pages, machine plans, admin gate, and resilient tables. */
.result-page .result-hero,
.admin-page .admin-hero {
  position: relative;
  overflow: hidden;
}

.result-page .result-hero::after,
.admin-page .admin-hero::after {
  content: "";
  position: absolute;
  inset: auto 24px 18px auto;
  width: min(30vw, 360px);
  height: 64%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(111, 201, 210, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(111, 201, 210, 0.10) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(90deg, transparent, #000 24%, #000);
  opacity: 0.45;
}

body[data-theme="light"] .result-page .result-hero::after,
body[data-theme="light"] .admin-page .admin-hero::after {
  opacity: 0.32;
}

.result-page .summary-grid {
  gap: 14px;
}

.price-panel {
  border-color: rgba(111, 201, 210, 0.24);
}

.price-panel.warn-panel {
  border-color: rgba(215, 169, 85, 0.38);
}

.price-panel .compact-status {
  gap: 10px;
}

.price-panel .compact-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.price-panel .block-note {
  border-left: 3px solid var(--cyan);
  padding-left: 12px;
}

.quality-status {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.engineering-review-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.review-grid div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 6px;
  min-width: 0;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.055);
}

body[data-theme="light"] .review-grid div {
  background: rgba(23, 56, 60, 0.045);
}

.review-grid span {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

.review-grid b {
  color: var(--text-strong);
  font-size: 0.96rem;
  line-height: 1.38;
  text-align: left;
  overflow-wrap: anywhere;
}

.review-grid small {
  display: block;
  margin-top: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.action-checklist {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.action-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 234, 209, 0.045);
}

body[data-theme="light"] .action-check {
  background: rgba(23, 56, 60, 0.035);
}

.action-check b {
  display: block;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.action-check p {
  margin: 0 0 5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.action-check small {
  display: block;
  overflow-wrap: anywhere;
}

.action-high {
  border-left: 3px solid var(--amber);
}

.action-medium {
  border-left: 3px solid var(--cyan);
}

.action-low {
  border-left: 3px solid var(--green);
}

.price-panel .compact-status {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.line-reason {
  font-weight: 760;
  color: var(--text-strong);
}

.line-risk {
  margin: 8px 0 4px;
}

.mini-notes {
  margin: 7px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.mini-notes li {
  margin: 3px 0;
}

.report-page .solution-card::before {
  display: none;
}

.report-solution .solution-head {
  padding-right: 0;
}

.report-table {
  min-width: 980px;
}

.report-table th:nth-child(n) {
  width: auto;
}

.report-table th:nth-child(1) { width: 210px; }
.report-table th:nth-child(2) { width: 110px; }
.report-table th:nth-child(3) { width: 100px; }
.report-table th:nth-child(4) { width: 90px; }
.report-table th:nth-child(5) { width: 470px; }

.table td:nth-child(9) a {
  display: inline-flex;
  margin: 0 6px 6px 0;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
}

.table td:nth-child(9) a:hover {
  border-color: var(--line-strong);
  color: var(--text-strong);
}

.solution-stack {
  counter-reset: solution;
}

.solution-card {
  position: relative;
  padding-top: 20px;
  overflow: hidden;
}

.solution-card::before {
  counter-increment: solution;
  content: "方案 " counter(solution, decimal-leading-zero);
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 1;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
}

.solution-head {
  padding-right: 86px;
}

.solution-kicker {
  max-width: min(820px, 100%);
}

.solution-metrics div {
  min-height: 70px;
}

.solution-actions {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

body[data-theme="light"] .solution-actions {
  background: rgba(14, 42, 47, 0.035);
}

.cart-status:not(:empty) {
  flex: 1 1 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-strong);
}

.highlight-row {
  margin-bottom: 14px;
}

.chip {
  border-radius: 7px;
}

.badge {
  border-radius: 7px;
}

.list {
  padding-left: 0;
  list-style: none;
}

.list li {
  position: relative;
  margin: 8px 0;
  padding-left: 18px;
}

.list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
  transform: translateY(-50%);
}

ol.list {
  counter-reset: ordered-list;
}

ol.list li {
  counter-increment: ordered-list;
  padding-left: 28px;
}

ol.list li::before {
  content: counter(ordered-list);
  top: 0.78em;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(111, 201, 210, 0.28);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 850;
}

.table-wrap {
  scrollbar-color: var(--line-strong) transparent;
}

.table {
  border-collapse: separate;
}

.table th,
.table td {
  line-height: 1.45;
}

.table th {
  backdrop-filter: blur(10px);
}

.table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.018);
}

body[data-theme="light"] .table tbody tr:nth-child(even) td {
  background: rgba(14, 42, 47, 0.024);
}

.table a {
  color: var(--cyan);
  font-weight: 750;
}

.table a:hover {
  color: var(--cream-strong);
}

.pre {
  border-color: var(--line);
  background:
    linear-gradient(90deg, rgba(111, 201, 210, 0.08) 1px, transparent 1px),
    rgba(3, 6, 7, 0.74);
  background-size: 42px 100%;
}

body[data-theme="light"] .pre {
  background:
    linear-gradient(90deg, rgba(13, 95, 102, 0.06) 1px, transparent 1px),
    rgba(255, 255, 255, 0.90);
}

.admin-gate {
  display: grid;
  gap: 16px;
}

.admin-login-panel {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.admin-login-panel .actions {
  margin-top: 2px;
}

.admin-login-panel .btn {
  min-width: 128px;
}

.admin-page .topbar .pill-nav a[href*="/admin"],
.result-page .pill-nav a[href="/history"] {
  color: var(--text-strong);
}

@media (max-width: 1040px) {
  .solution-head {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .solution-card::before {
    position: static;
    width: max-content;
    margin: 0 0 12px auto;
  }

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

@media (max-width: 760px) {
  .result-page .result-hero::after,
  .admin-page .admin-hero::after {
    display: none;
  }

  .solution-card {
    padding-top: 14px;
  }

  .solution-card::before {
    margin-left: 0;
  }

  .solution-actions .btn,
  .solution-actions a,
  .solution-actions button {
    width: 100%;
  }

  .cart-status:not(:empty) {
    flex-basis: 100%;
  }

  .table-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }

  .table th,
  .table td {
    padding: 10px 9px;
  }

  .admin-login-panel .btn {
    width: 100%;
  }

  .admin-toast {
    right: 12px;
    bottom: 76px;
  }
}

/* Admin console redesign: dense operations UI with visible data-source coverage. */
.admin-page .page-shell {
  max-width: 1480px;
}

html:has(body.admin-console-page) {
  height: 100%;
  overflow: hidden;
}

body.admin-console-page {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.admin-workbench {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.admin-workbench-main {
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 18px 18px;
  scrollbar-gutter: stable;
}

.admin-workbench-main .page-shell {
  width: 100%;
  max-width: none;
  padding-top: 0;
  padding-bottom: 42px;
}

.admin-sidebar {
  position: relative;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 14px 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(8, 13, 16, 0.92);
  overflow: hidden;
  overscroll-behavior: contain;
}

body[data-theme="light"] .admin-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    rgba(243, 249, 250, 0.94);
}

.admin-sidebar-brand {
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-strong);
}

.admin-sidebar-brand img {
  grid-row: span 2;
}

.admin-sidebar-brand span {
  font-weight: 900;
  line-height: 1;
}

.admin-sidebar-brand small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.admin-sidebar-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-sidebar-nav a {
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.is-active {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text-strong);
}

.admin-sidebar-nav span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border-radius: 7px;
  background: rgba(111, 201, 210, 0.10);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-sidebar-nav b {
  font-size: 0.92rem;
}

.admin-sidebar-footer {
  align-self: end;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.admin-sidebar-footer span {
  color: var(--muted);
  font-size: 0.76rem;
}

.admin-sidebar-footer b {
  color: var(--text-strong);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.admin-console,
.admin-gate-pro {
  display: grid;
  gap: 18px;
}

.admin-gate-pro {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.admin-console-page .topbar,
.admin-login-page .topbar {
  border-color: rgba(111, 201, 210, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(8, 12, 13, 0.76);
}

body[data-theme="light"] .admin-console-page .topbar,
body[data-theme="light"] .admin-login-page .topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.70)),
    rgba(255, 255, 255, 0.84);
}

.admin-console-page .topbar {
  top: 0;
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.admin-command-hero,
.admin-login-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(111, 201, 210, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(111, 201, 210, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(111, 201, 210, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(111, 201, 210, 0.16), rgba(223, 171, 85, 0.08)),
    rgba(8, 13, 14, 0.88);
  background-size: 34px 34px, 34px 34px, 100% 100%, 100% 100%;
  box-shadow: var(--shadow);
}

body[data-theme="light"] .admin-command-hero,
body[data-theme="light"] .admin-login-hero {
  border-color: rgba(0, 116, 134, 0.20);
  background:
    linear-gradient(90deg, rgba(0, 116, 134, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(0, 116, 134, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, rgba(0, 116, 134, 0.10), rgba(149, 99, 20, 0.06)),
    rgba(255, 255, 255, 0.90);
}

.admin-command-copy,
.admin-login-copy,
.admin-command-card,
.admin-login-signal-grid,
.admin-login-side,
.admin-console-block {
  position: relative;
  z-index: 1;
}

.admin-command-copy,
.admin-login-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  min-height: 248px;
}

.admin-command-copy h1,
.admin-login-copy h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text-strong);
  font-size: 3.3rem;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.admin-command-copy .muted,
.admin-login-copy .muted {
  max-width: 720px;
  font-size: 1rem;
}

.admin-command-actions,
.admin-login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-login-badges span,
.admin-section-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
}

body[data-theme="light"] .admin-login-badges span,
body[data-theme="light"] .admin-section-chip {
  background: rgba(7, 35, 39, 0.045);
}

.admin-command-card,
.admin-login-signal-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(4, 8, 9, 0.58);
  backdrop-filter: blur(16px);
}

body[data-theme="light"] .admin-command-card,
body[data-theme="light"] .admin-login-signal-grid {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.70);
}

.admin-command-row,
.admin-login-signal-grid div {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

body[data-theme="light"] .admin-command-row,
body[data-theme="light"] .admin-login-signal-grid div {
  border-color: rgba(12, 33, 36, 0.08);
  background: rgba(12, 33, 36, 0.035);
}

.admin-command-row span,
.admin-login-signal-grid span,
.admin-metric span,
.admin-source-meta span,
.admin-storage-grid span,
.admin-product-list span,
.admin-side-list span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.admin-command-row b,
.admin-login-signal-grid b,
.admin-source-meta b,
.admin-product-list b,
.admin-side-list b {
  color: var(--text-strong);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.admin-login-signal-grid small,
.admin-product-list small,
.admin-flow-list small {
  color: var(--muted);
  line-height: 1.45;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-metric {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--surface);
}

.admin-metric b {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 2.1rem;
  line-height: 1;
}

.admin-metric small {
  color: var(--muted);
  line-height: 1.35;
}

.admin-console-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface);
}

.admin-section-head,
.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-section-head {
  margin-bottom: 14px;
}

.admin-section-head.compact {
  margin-bottom: 12px;
}

.admin-section-head h2,
.admin-panel-head h2,
.admin-side-head h2 {
  margin: 0;
  color: var(--text-strong);
  letter-spacing: 0;
}

.admin-source-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-source-tile {
  min-height: 194px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .admin-source-tile {
  background: rgba(8, 33, 36, 0.035);
}

.admin-source-tile.is-on {
  border-color: rgba(139, 212, 159, 0.28);
}

.admin-source-tile.is-standby {
  border-color: rgba(223, 171, 85, 0.32);
}

.admin-source-tile.is-warn {
  border-color: rgba(240, 106, 98, 0.26);
}

.admin-source-topline,
.admin-source-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-source-topline .mono {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.admin-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(139, 212, 159, 0.12);
}

.admin-source-tile.is-standby .admin-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(223, 171, 85, 0.13);
}

.admin-source-tile.is-warn .admin-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(240, 106, 98, 0.13);
}

.admin-source-tile h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.2;
}

.admin-source-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.admin-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

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

.admin-flow-list div,
.admin-product-list div,
.admin-side-list div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .admin-flow-list div,
body[data-theme="light"] .admin-product-list div,
body[data-theme="light"] .admin-side-list div {
  background: rgba(8, 33, 36, 0.035);
}

.admin-flow-list span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(111, 201, 210, 0.26);
  border-radius: 7px;
  background: rgba(111, 201, 210, 0.08);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
}

.admin-flow-list b {
  color: var(--text-strong);
}

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

.admin-storage-grid div {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .admin-storage-grid div {
  background: rgba(8, 33, 36, 0.035);
}

.admin-storage-grid b {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.admin-table-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-search-input {
  min-width: 240px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 22, 0.72);
  color: var(--text-strong);
  padding: 8px 11px;
  font: inherit;
}

body[data-theme="light"] .admin-search-input,
body[data-theme="light"] .admin-note-input {
  background: rgba(255, 255, 255, 0.82);
}

.admin-search-input:focus,
.admin-page-size:focus,
.admin-note-input:focus,
.admin-status-select:focus {
  outline: 2px solid rgba(111, 201, 210, 0.46);
  outline-offset: 2px;
}

.admin-page-size {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 16, 22, 0.72);
  color: var(--text-strong);
  padding: 7px 10px;
  font: inherit;
}

body[data-theme="light"] .admin-page-size {
  background: rgba(255, 255, 255, 0.82);
}

.admin-row-menu-root {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.admin-kebab {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.admin-kebab:hover,
.admin-kebab[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text-strong);
}

.admin-row-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 120;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 22, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body[data-theme="light"] .admin-row-menu {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(21, 39, 44, 0.16);
}

.admin-row-menu[hidden] {
  display: none;
}

.admin-row-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 760;
  cursor: pointer;
}

.admin-row-menu button:hover {
  background: var(--surface-soft);
  color: var(--text-strong);
}

.admin-row-menu button.danger {
  color: var(--red);
}

.admin-row-menu button.danger:hover {
  background: rgba(240, 106, 98, 0.12);
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 0;
}

.admin-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-page-button {
  min-height: 36px;
  min-width: 84px;
  padding: 7px 11px;
}

.admin-login-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: stretch;
}

.admin-login-layout .admin-login-panel {
  grid-area: auto;
  position: static;
  top: auto;
  width: 100%;
  margin: 0;
}

.admin-login-layout .admin-login-panel > .actions:last-child {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-command-panel,
.admin-login-side {
  border-color: var(--line-strong);
}

.admin-login-side {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 201, 210, 0.075), rgba(255, 255, 255, 0.025)),
    var(--surface);
}

.admin-side-list,
.admin-product-list {
  display: grid;
  gap: 10px;
}

.admin-products-panel {
  min-width: 0;
}

.admin-product-list div {
  min-height: 82px;
}

.admin-status-panel {
  align-self: start;
}

.admin-toast {
  transition: opacity 180ms ease, transform 180ms ease;
}

.admin-user-modal-card {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
}

.admin-user-modal-body {
  display: grid;
  gap: 12px;
}

.admin-user-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-modal-summary div,
.admin-feedback-detail {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.admin-user-modal-summary span,
.admin-feedback-detail-meta,
.admin-feedback-detail-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-user-modal-summary b,
.admin-feedback-detail-head b {
  display: block;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.admin-feedback-detail-list {
  display: grid;
  gap: 10px;
}

.admin-feedback-detail {
  display: grid;
  gap: 8px;
}

.admin-feedback-detail-head,
.admin-feedback-detail-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.admin-feedback-detail p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-page .support-launcher {
  min-width: 108px;
  min-height: 46px;
  padding: 0 12px;
}

.admin-page .support-launcher span:not(.support-dot) {
  font-size: 0.84rem;
}

@media (max-width: 1280px) {
  .admin-source-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .admin-flow-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  html:has(body.admin-console-page) {
    height: auto;
    overflow: auto;
  }

  body.admin-console-page {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .admin-workbench {
    position: static;
    inset: auto;
    grid-template-columns: 1fr;
    width: auto;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .admin-workbench-main {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 12px;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    min-height: 0;
    grid-template-rows: auto;
    overflow: visible;
  }

  .admin-sidebar-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .admin-command-hero,
  .admin-login-hero,
  .admin-login-layout,
  .admin-ops-grid {
    grid-template-columns: 1fr;
  }

  .admin-command-copy,
  .admin-login-copy {
    min-height: 0;
  }

  .admin-command-copy h1,
  .admin-login-copy h1 {
    font-size: 2.5rem;
  }

  .admin-status-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .admin-workbench-main {
    padding: 8px;
  }

  .admin-sidebar {
    padding: 12px;
  }

  .admin-sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-command-hero,
  .admin-login-hero,
  .admin-console-block,
  .admin-login-side {
    padding: 14px;
  }

  .admin-command-copy h1,
  .admin-login-copy h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .admin-metrics-grid,
  .admin-source-grid,
  .admin-flow-list,
  .admin-storage-grid,
  .admin-user-modal-summary {
    grid-template-columns: 1fr;
  }

  .admin-section-head,
  .admin-panel-head {
    display: grid;
  }

  .admin-table-tools,
  .admin-command-actions {
    justify-content: stretch;
  }

  .admin-search-input,
  .admin-command-actions .btn,
  .admin-login-layout .btn {
    width: 100%;
  }
}
