:root {
  --bg: #f6f5f3;
  --panel: #ffffff;
  --panel-soft: #f8f7f5;
  --text: #171513;
  --muted: #6f6964;
  --border: #ded8d2;
  --border-strong: #c9c0b8;
  --accent: #ff5a14;
  --accent-strong: #d9480f;
  --accent-soft: #fff2eb;
  --accent-gold: #ffb000;
  --blue: #3f454d;
  --blue-soft: #eef0ee;
  --amber: #b7791f;
  --amber-soft: #fff7df;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow: 0 1px 2px rgba(24, 20, 17, 0.06);
  --radius: 8px;
}

.env-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f97316;
  color: #111827;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.18);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
}

* {
  box-sizing: border-box;
  -webkit-user-select: text;
  user-select: text;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.45) rgba(244, 241, 238, 0.9);
}

body::-webkit-scrollbar,
.customer-sidebar::-webkit-scrollbar,
.customer-main::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

body::-webkit-scrollbar-track,
.customer-sidebar::-webkit-scrollbar-track,
.customer-main::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: rgba(244, 241, 238, 0.86);
}

body::-webkit-scrollbar-thumb,
.customer-sidebar::-webkit-scrollbar-thumb,
.customer-main::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid rgba(244, 241, 238, 0.86);
  border-radius: 999px;
  background: rgba(255, 90, 20, 0.42);
}

body::-webkit-scrollbar-thumb:hover,
.customer-sidebar::-webkit-scrollbar-thumb:hover,
.customer-main::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 90, 20, 0.66);
}

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

button {
  border: 0;
  cursor: pointer;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}

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

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 90, 20, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 90, 20, 0.14);
}

svg {
  width: 18px;
  height: 18px;
}

code {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.hidden {
  display: none !important;
}

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 54px;
  border-radius: var(--radius);
  background: transparent;
  background-image: url("/static/lanxen-logo-blue.jpg?v=brand-20260513");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 0;
  box-shadow: none;
  color: transparent;
  overflow: hidden;
  text-indent: -999px;
}

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

.auth-card .brand-row span {
  color: var(--text);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.auth-card {
  width: min(440px, calc(100% - 2rem));
  margin: 12vh auto;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.55rem;
}

.auth-card p,
.panel-subtitle {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.quiet-link,
.quiet-button,
.auth-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.quiet-link {
  display: inline-flex;
  margin-top: 1rem;
}

.quiet-button {
  width: fit-content;
  padding: 0;
  background: transparent;
}

.quiet-button:hover {
  color: var(--accent);
}

.auth-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.admin-mini-link {
  opacity: 0.7;
}

.customer-shell {
  min-height: 100vh;
  padding: 1rem;
  background: #050607;
}

body.public-home {
  background: #050607;
}

body:has(#customerApp:not(.hidden)) .customer-shell {
  background: var(--bg);
}

body.app-home .customer-shell {
  padding: 1rem;
  background: var(--bg);
}

.customer-auth {
  max-width: 1440px;
  min-height: calc(100vh - 2rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(360px, 420px);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: center;
  padding: clamp(1rem, 3vw, 3rem);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.11), transparent 24%),
    linear-gradient(135deg, #050607 0%, #111317 52%, #050607 100%);
  color: #f7f7f5;
  border-radius: var(--radius);
  overflow: hidden;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  position: relative;
  z-index: 2;
}

.auth-copy {
  position: relative;
  z-index: 0;
  overflow: hidden;
  min-height: min(720px, calc(100vh - 8rem));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.2rem, 4vw, 4rem);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #08090b;
  isolation: isolate;
}

.login-hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: grayscale(1) contrast(1.15) brightness(0.72);
  pointer-events: none;
}

.auth-copy::before,
.auth-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-copy::before {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.92) 0%, rgba(5, 6, 7, 0.62) 44%, rgba(5, 6, 7, 0.28) 100%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.36) 0%, rgba(5, 6, 7, 0.82) 100%);
}

.auth-copy::after {
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 76%, transparent 100%);
}

.gateway-architecture {
  position: absolute;
  inset: 8%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
}

.gateway-node,
.flow-line {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gateway-node {
  min-width: 112px;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(10, 12, 15, 0.64);
  color: rgba(255, 255, 255, 0.78);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0;
  backdrop-filter: blur(10px);
}

.gateway-node-core {
  left: 45%;
  top: 42%;
  width: 158px;
  border-color: rgba(255, 90, 20, 0.55);
  color: #fff;
  box-shadow: 0 0 28px rgba(255, 90, 20, 0.22);
}

.gateway-node-api { left: 8%; top: 18%; }
.gateway-node-key { right: 8%; top: 22%; }
.gateway-node-meter { right: 18%; bottom: 18%; }

.flow-line {
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  overflow: hidden;
}

.flow-line::after {
  content: "";
  width: 88px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 20, 0.95), transparent);
  animation: data-flow 3.8s linear infinite;
}

.flow-line-a {
  left: 22%;
  top: 26%;
  width: 42%;
  transform: rotate(18deg);
}

.flow-line-b {
  left: 55%;
  top: 34%;
  width: 34%;
  transform: rotate(-9deg);
}

.flow-line-c {
  left: 54%;
  bottom: 28%;
  width: 32%;
  transform: rotate(24deg);
}

@keyframes data-flow {
  from { transform: translateX(-110px); }
  to { transform: translateX(520px); }
}

.brand-row span {
  color: #f7f7f5;
  letter-spacing: 0;
}

.sidebar-brand strong {
  color: #16181d;
  letter-spacing: 0;
}

.auth-copy h1 {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 1.4rem 0 0.85rem;
  color: #fff;
  font-size: clamp(3rem, 5.2vw, 5.8rem);
  font-weight: 900;
  line-height: 1.02;
}

.auth-copy h1 span {
  display: block;
}

.auth-copy p {
  position: relative;
  z-index: 2;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.75;
}

.auth-points {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.auth-points span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.auth-copy .auth-links {
  position: relative;
  z-index: 2;
}

.auth-copy .auth-links a {
  color: rgba(255, 255, 255, 0.58);
}

.auth-copy .auth-links a:hover {
  color: #fff;
}

.auth-panel {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.auth-tab {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tab.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: var(--shadow);
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.auth-mode-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 40px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.auth-mode-switch button.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: var(--shadow);
}

.customer-app {
  max-width: 1360px;
  margin: 0 auto;
}

.customer-console {
  max-width: none;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  margin: 0;
  background:
    radial-gradient(circle at 78% 0%, rgba(255, 90, 20, 0.09), transparent 30%),
    linear-gradient(180deg, #fbfaf8 0%, #f3f1ee 100%);
  color: var(--text);
}

.customer-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1rem;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.45) transparent;
}

.customer-sidebar .sidebar-brand {
  border-bottom-color: var(--border);
  gap: 0.95rem;
}

.customer-sidebar .brand-mark.compact {
  width: 78px;
  height: 50px;
  flex: 0 0 78px;
  background-size: 68px 68px;
}

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

.customer-sidebar .sidebar-brand span,
.nav-group-label {
  color: var(--muted);
}

.nav-group-label {
  margin: 1rem 0 0.35rem;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.customer-side-nav .side-link {
  color: #57514b;
}

.customer-side-nav .side-link.active,
.customer-side-nav .side-link:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.customer-main {
  min-width: 0;
  padding: 1rem 1rem 6.5rem;
}

.customer-console .app-header,
.customer-console .panel,
.customer-console .metric,
.customer-console .status-bar {
  border-color: rgba(222, 216, 210, 0.92);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.customer-console .app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 1rem;
  border: 1px solid rgba(222, 216, 210, 0.92);
  border-radius: var(--radius);
}

.customer-console .panel-subtitle,
.customer-console .metric-label,
.customer-console .field span,
.customer-console .section-title,
.customer-console .history-meta,
.customer-console .history-time,
.customer-console .inline-status,
.customer-console .access-item span,
.customer-console .bar-meta {
  color: var(--muted);
}

.customer-console .access-item,
.customer-console .example-card,
.customer-console .model-row,
.customer-console .model-row-head,
.customer-console .model-card,
.customer-console .empty,
.customer-console .response-content,
.customer-console .code-block {
  border-color: var(--border);
  background: #fbfcfd;
  color: var(--text);
}

.customer-console .model-row.active,
.customer-console .model-card.active,
.customer-console .key-card.active {
  background: #fff7ef;
}

.customer-console .model-card:hover {
  background: #fff8f3;
}

.customer-console .model-card-title strong,
.customer-console .model-price-line {
  color: var(--text);
}

.customer-console .model-card-title span,
.customer-console .model-desc {
  color: var(--muted);
}

.customer-console .model-card-actions {
  border-color: var(--border);
  background: #fff;
  color: var(--muted);
}

.customer-console .model-brand-icon {
  border-color: var(--border);
  background: #fff;
}

.customer-console .btn-ghost,
.customer-console .icon-btn {
  border-color: var(--border);
  color: var(--text);
}

.customer-console .btn-secondary {
  background: var(--blue-soft);
  color: var(--blue);
}

body.app-home .customer-console .status-bar {
  position: fixed;
  top: auto;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  z-index: 80;
  display: flex;
  align-items: center;
  width: min(520px, calc(100vw - 296px));
  min-height: 44px;
  max-height: min(132px, calc(100vh - 2rem));
  margin: 0;
  padding: 0.62rem 0.85rem;
  overflow: auto;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(24, 20, 17, 0.13);
}

.dashboard-actions,
.recharge-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.compact-metrics {
  margin-top: -0.1rem;
}

.recharge-balance-card {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.recharge-balance-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.recharge-balance-card strong {
  font-size: 1.8rem;
}

.recharge-presets {
  margin-bottom: 0.75rem;
}

.recharge-presets button {
  min-width: 96px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 900;
}

.recharge-presets button.active,
.recharge-presets button:hover {
  border-color: rgba(255, 90, 20, 0.5);
  background: var(--accent-soft);
}

.manual-recharge-panel .security-callout {
  align-items: flex-start;
  background: var(--accent-soft);
  border-color: rgba(255, 90, 20, 0.28);
  color: var(--accent-strong);
}

.manual-recharge-panel .security-callout p {
  margin: 0.35rem 0 0;
  color: #7a4a32;
  line-height: 1.65;
}

.manual-recharge-panel .recharge-bank-lines {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
  color: #7a4a32;
  line-height: 1.55;
}

.manual-recharge-panel .recharge-bank-lines span {
  display: block;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-login {
  margin-top: 12vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 84px;
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.sidebar-brand span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.side-nav {
  display: grid;
  gap: 0.35rem;
}

.nav-group {
  display: grid;
  gap: 0.28rem;
  padding-top: 0.45rem;
}

.side-nav-label {
  padding: 0.3rem 0.75rem 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.72rem 0.75rem;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 700;
}

.side-link.active,
.side-link:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.sidebar-logout {
  margin-top: auto;
}

body.admin-home {
  background: #f3f1ee;
  color: var(--text);
  overflow: hidden;
}

body.admin-home .admin-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: 264px minmax(0, 1fr);
  background:
    radial-gradient(circle at 78% 0%, rgba(255, 90, 20, 0.09), transparent 34%),
    linear-gradient(180deg, #fbfaf8 0%, #f3f1ee 100%);
}

body.admin-home .admin-sidebar {
  height: 100vh;
  min-height: 0;
  gap: 0.85rem;
  padding: 0.9rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border-right-color: var(--border);
}

body.admin-home .sidebar-brand {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 0.95rem;
  min-height: 84px;
}

body.admin-home .sidebar-brand .brand-mark.compact {
  width: 78px;
  height: 50px;
  flex: 0 0 78px;
  background-image: url("/static/lanxen-logo-blue.jpg?v=brand-admin-20260514");
  background-size: 68px 68px;
}

body.admin-home .sidebar-brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

body.admin-home .admin-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

body.admin-home .admin-nav::-webkit-scrollbar {
  width: 6px;
}

body.admin-home .admin-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(153, 143, 134, 0.32);
}

body.admin-home .sidebar-logout {
  flex: 0 0 auto;
  margin-top: 0;
}

body.admin-home .sidebar-brand,
body.admin-home .metric,
body.admin-home .panel,
body.admin-home .status-bar,
body.admin-home .access-item,
body.admin-home .status-tile,
body.admin-home .example-card,
body.admin-home .gateway-map-item {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

body.admin-home .metric-label,
body.admin-home .panel-subtitle,
body.admin-home .field span,
body.admin-home .section-title,
body.admin-home .history-meta,
body.admin-home .history-time,
body.admin-home .inline-status,
body.admin-home .side-nav-label,
body.admin-home .sidebar-brand span {
  color: var(--muted);
}

body.admin-home input,
body.admin-home textarea,
body.admin-home select {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

body.admin-home .side-link {
  color: #57514b;
}

body.admin-home .side-link.active,
body.admin-home .side-link:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

body.admin-home .btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

body.admin-home .btn-ghost:hover,
body.admin-home .chip:hover,
body.admin-home .icon-btn:hover {
  background: #f4f1ee;
}

body.admin-home .btn-secondary {
  background: var(--blue-soft);
  color: var(--blue);
}

body.admin-home .badge {
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--muted);
}

body.admin-home .badge.configured {
  border-color: rgba(255, 90, 20, 0.25);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

body.admin-home .badge.error,
body.admin-home .btn.danger {
  border-color: rgba(248, 113, 113, 0.28);
  background: var(--danger-soft);
  color: var(--danger);
}

.admin-main {
  min-width: 0;
  padding: 1rem;
}

body.admin-home .admin-main {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  padding: 0.9rem 1rem 6.5rem;
  scroll-padding-top: 5.5rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-header h1 {
  margin: 0.1rem 0 0;
  font-size: 1.55rem;
}

body.admin-home .app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -0.9rem -1rem 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 250, 248, 0.94);
  backdrop-filter: blur(12px);
}

body.admin-home .app-header h1 {
  font-size: 1.42rem;
}

.admin-subnav {
  position: sticky;
  top: 65px;
  z-index: 24;
  display: flex;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  padding: 0.45rem 0;
  overflow-x: auto;
  border-bottom: 1px solid rgba(222, 216, 209, 0.72);
  background: rgba(251, 250, 248, 0.94);
  backdrop-filter: blur(12px);
}

.admin-subnav.hidden {
  display: none;
}

.admin-subnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.admin-subnav-link:hover,
.admin-subnav-link:focus-visible,
.admin-subnav-link.active {
  border-color: rgba(255, 90, 20, 0.32);
  background: rgba(255, 242, 236, 0.92);
  color: var(--accent-strong);
}

.admin-subsection-hidden {
  display: none !important;
}

.entrypoint-grid,
.capability-grid,
.diagnostics-detail-grid,
.impact-preview-grid {
  display: grid;
  gap: 0.62rem;
}

.entrypoint-grid,
.capability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0.72rem 0;
}

.entrypoint-grid article,
.capability-grid article,
.diagnostics-detail-grid article,
.impact-preview-grid article,
.process-flow article {
  min-width: 0;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
}

.entrypoint-grid article.configured,
.capability-grid article.configured,
.process-flow article.configured,
.impact-preview.configured,
.impact-preview-grid article.configured {
  border-color: rgba(21, 132, 95, 0.16);
  background: rgba(239, 250, 245, 0.72);
}

.entrypoint-grid article.attention,
.capability-grid article.attention,
.process-flow article.attention,
.impact-preview.attention {
  border-color: rgba(183, 121, 31, 0.2);
  background: rgba(255, 249, 235, 0.78);
}

.entrypoint-grid span,
.capability-grid span,
.diagnostics-detail-grid span,
.impact-preview-grid span,
.process-flow span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 780;
}

.entrypoint-grid strong,
.capability-grid strong,
.diagnostics-detail-grid strong,
.impact-preview-grid strong,
.process-flow strong {
  display: block;
  margin-top: 0.24rem;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.entrypoint-grid small,
.capability-grid small,
.impact-preview-grid small,
.process-flow small {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.process-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.52rem;
  align-items: stretch;
  margin: 0 0 0.88rem;
}

.request-process-flow {
  grid-template-columns: repeat(13, auto);
  overflow-x: auto;
  padding-bottom: 0.12rem;
}

.request-process-flow article {
  width: 170px;
  flex: 0 0 auto;
}

.process-flow > i {
  align-self: center;
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.request-diagnostics-workbench {
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
}

.request-diagnostics-detail-panel {
  min-width: 0;
}

.request-diagnostics-detail-panel:nth-of-type(n + 3) {
  grid-column: span 1;
}

.request-diagnostics-panel {
  min-width: 0;
}

.request-diagnostics-form {
  grid-template-columns: minmax(260px, 1fr);
}

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

.diagnostics-log-list {
  display: grid;
  gap: 0.58rem;
  max-height: 340px;
  overflow: auto;
}

.impact-preview {
  margin: 0.75rem 0;
  padding: 0.76rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
}

.impact-preview.empty {
  color: var(--muted);
  font-size: 0.84rem;
}

.impact-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.62rem;
}

.impact-preview-head strong {
  color: var(--text);
  font-size: 0.94rem;
}

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

.link-button {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--accent);
}

.header-actions,
.action-row,
.gateway-badges,
.table-actions,
.pagination-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.language-switcher {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  align-items: center;
  min-width: 112px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.language-switcher button {
  min-width: 0;
  min-height: 28px;
  padding: 0 0.52rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.language-switcher button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 90, 20, 0.16);
}

.language-switcher button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 20, 0.18);
}

.auth-language-switcher {
  margin: -0.1rem auto 0.85rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

body.admin-home .metrics {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.metric,
.panel,
.status-bar {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 0.95rem 1rem;
}

body.admin-home .metric {
  min-height: 78px;
  padding: 0.85rem 0.95rem;
}

.metric-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric strong {
  font-size: 1.28rem;
}

body.admin-home .metric strong {
  line-height: 1.2;
}

.customer-grid,
.admin-grid,
.usage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

body.admin-home .admin-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.panel {
  padding: 1rem;
}

body.admin-home .panel {
  min-width: 0;
  padding: 0.9rem;
}

body.admin-home .tab-panel {
  min-width: 0;
}

.quick-card {
  margin-bottom: 0.9rem;
  border-color: rgba(255, 90, 20, 0.25);
}

.panel-head,
.example-head,
.history-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.panel-head {
  margin-bottom: 0.9rem;
}

.panel h2 {
  margin: 0;
  font-size: 1.06rem;
}

.model-price-workbench {
  align-items: start;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
}

.model-price-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
  margin-bottom: 0.85rem;
}

.model-price-summary-card {
  min-width: 0;
  padding: 0.84rem 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.model-price-summary-card span,
.model-price-summary-card small {
  display: block;
  color: var(--muted);
}

.model-price-summary-card span {
  font-size: 0.76rem;
  font-weight: 780;
}

.model-price-summary-card strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.15;
}

.model-price-summary-card small {
  margin-top: 0.24rem;
  font-size: 0.76rem;
}

.model-price-list-panel,
.model-price-editor-panel {
  min-width: 0;
}

.model-price-list {
  max-height: calc(100vh - 280px);
  overflow: auto;
  padding-right: 0.2rem;
}

.model-price-filters {
  margin: 0.75rem 0;
}

.model-price-row {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}

.model-price-row:hover {
  border-color: rgba(255, 90, 20, 0.3);
}

.model-price-row.selected {
  border-color: rgba(255, 90, 20, 0.55);
  background: var(--accent-soft);
}

.model-price-row-top,
.model-price-row-meta,
.model-price-editor-head,
.model-price-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.model-price-row-top strong {
  overflow-wrap: anywhere;
}

.model-price-row-meta span,
.model-price-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.model-price-row-capabilities,
.model-price-editor-summary strong {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.model-price-row-capabilities span,
.model-price-editor-summary em {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.18rem 0.46rem;
  border-radius: 999px;
  background: rgba(255, 242, 235, 0.86);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 840;
}

.model-price-editor {
  display: grid;
  gap: 0.9rem;
}

.model-price-editor.empty {
  align-content: start;
  min-height: 240px;
  padding: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
}

.model-price-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.78rem;
  border: 1px solid rgba(24, 20, 17, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.52);
}

.model-price-form-grid .field-wide {
  padding-top: 0.58rem;
  border-top: 1px solid rgba(24, 20, 17, 0.07);
}

.model-price-form-grid .check-line {
  min-height: 38px;
  align-items: center;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(24, 20, 17, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.model-price-editor-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.model-price-editor-summary article {
  min-width: 0;
  padding: 0.68rem 0.74rem;
  border: 1px solid rgba(24, 20, 17, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.model-price-editor-summary span {
  display: block;
  margin-bottom: 0.32rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 780;
}

.model-price-editor-summary strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.overview-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
  gap: 0.92rem;
  align-items: start;
  margin-bottom: 0.92rem;
}

.overview-primary-panel,
.overview-side-panel,
.overview-side-block,
.overview-account-panel {
  min-width: 0;
}

.overview-primary-panel,
.overview-side-block,
.overview-account-panel {
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.overview-primary-panel {
  min-height: 340px;
}

.overview-side-panel {
  position: sticky;
  top: 1rem;
}

.overview-side-block {
  min-height: 340px;
}

.overview-check-list {
  max-height: calc(100vh - 330px);
  min-height: 230px;
  overflow: auto;
}

.overview-finance-list {
  max-height: 360px;
  overflow: auto;
}

.overview-account-panel {
  display: grid;
  gap: 0.75rem;
}

.overview-account-panel .panel-head,
.overview-account-panel .account-summary-filters,
.overview-account-panel .account-summary-pagination {
  margin-bottom: 0;
}

.overview-account-panel .account-summary-wrap {
  max-height: calc(100vh - 420px);
  min-height: 340px;
  overflow: auto;
}

.customer-account-workbench-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-workbench,
.monitoring-workbench {
  display: grid;
  gap: 0.92rem;
  align-items: start;
  min-width: 0;
  margin-bottom: 0.92rem;
}

.customer-workbench {
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
}

.customer-list-pane,
.customer-maintenance-pane,
.invite-workbench,
.monitoring-workbench > .panel {
  min-width: 0;
}

.customer-list-pane,
.customer-maintenance-pane,
.customer-maintenance-section,
.invite-workbench {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.customer-list-pane,
.customer-maintenance-pane,
.invite-workbench {
  padding: 0.9rem;
}

.customer-maintenance-pane {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.customer-maintenance-section {
  padding: 0.78rem;
  background: var(--panel-soft);
  box-shadow: none;
}

.customer-maintenance-section .section-title,
.invite-workbench .section-title {
  margin-top: 0;
}

.customer-list-filters {
  grid-template-columns: minmax(220px, 1fr) 130px 110px;
  margin-bottom: 0.7rem;
}

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

.customer-table-wrap {
  max-height: calc(100vh - 350px);
  min-height: 360px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.customer-table-wrap .table {
  margin: 0;
}

.invite-workbench {
  margin-top: 0.92rem;
}

.invite-manager {
  grid-template-columns: minmax(0, 0.9fr) auto minmax(260px, 1fr);
  align-items: start;
}

.invite-create-grid {
  grid-template-columns: minmax(180px, 1fr) 120px minmax(180px, 1fr);
}

.invite-list {
  max-height: 320px;
  overflow: auto;
}

.monitoring-overview-workbench {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
}

.monitoring-overview-workbench .monitoring-config-panel {
  grid-column: 1 / -1;
}

.monitoring-model-probe-workbench {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.monitoring-model-probe-workbench .model-probe-hero {
  grid-column: 1 / -1;
}

.model-probe-summary-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.model-probe-summary-card {
  min-width: 0;
  padding: 0.84rem 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.model-probe-summary-card span,
.model-probe-summary-card small {
  display: block;
  color: var(--muted);
}

.model-probe-summary-card span {
  font-size: 0.76rem;
  font-weight: 780;
}

.model-probe-summary-card strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.model-probe-summary-card strong.configured {
  color: var(--accent-strong);
}

.model-probe-summary-card strong.error {
  color: var(--danger);
}

.model-probe-summary-card strong.attention {
  color: var(--amber);
}

.model-probe-summary-card small {
  margin-top: 0.24rem;
  font-size: 0.76rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.monitoring-model-probe-workbench .monitoring-matrix-panel {
  grid-column: 1 / -1;
}

.monitoring-group-stability-panel .ops-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.monitoring-route-workbench {
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
}

.monitoring-primary-panel .ops-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.monitoring-probe-controls {
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  align-items: end;
}

.monitoring-probe-controls .action-row {
  align-self: end;
  margin: 0;
  justify-content: flex-end;
  white-space: nowrap;
}

.compact-monitor-table {
  max-height: 360px;
}

.monitor-card-list {
  display: grid;
  gap: 0.62rem;
  max-height: 440px;
  overflow: auto;
  padding-right: 0.16rem;
}

.monitor-health-list {
  max-height: min(458px, calc(100vh - 330px));
}

.model-health-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.58rem;
  margin-bottom: 0.68rem;
}

.model-health-summary-card {
  display: grid;
  align-content: start;
  min-height: 92px;
  padding: 0.7rem 0.76rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.model-health-summary-card.configured {
  border-color: rgba(21, 132, 95, 0.16);
  background: rgba(239, 250, 245, 0.76);
}

.model-health-summary-card.attention {
  border-color: rgba(183, 121, 31, 0.22);
  background: rgba(255, 249, 235, 0.84);
}

.model-health-summary-card.error {
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(255, 244, 242, 0.84);
}

.model-health-summary-card span,
.model-health-summary-card small {
  color: var(--muted);
  line-height: 1.35;
}

.model-health-summary-card span {
  font-size: 0.72rem;
  font-weight: 820;
}

.model-health-summary-card strong {
  margin-top: 0.2rem;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.16;
}

.model-health-summary-card.configured strong {
  color: #157452;
}

.model-health-summary-card.attention strong {
  color: var(--amber);
}

.model-health-summary-card.error strong {
  color: var(--danger);
}

.model-health-summary-card small {
  margin-top: 0.22rem;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.model-health-mode-switch {
  display: inline-flex;
  gap: 0.22rem;
  margin-bottom: 0.68rem;
  padding: 0.22rem;
  border: 1px solid rgba(24, 20, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.model-health-mode-switch button {
  min-height: 30px;
  padding: 0.26rem 0.72rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
  cursor: pointer;
}

.model-health-mode-switch button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.group-stability-list {
  max-height: min(330px, calc(100vh - 430px));
}

.monitor-matrix-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: min(520px, calc(100vh - 300px));
}

.monitor-card {
  display: grid;
  gap: 0.58rem;
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-left-width: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
}

.monitor-card.configured {
  border-left-color: var(--accent);
}

.monitor-card.error {
  border-left-color: var(--danger);
}

.monitor-card.attention {
  border-left-color: var(--amber);
}

.monitor-impact-card {
  background: rgba(255, 255, 255, 0.78);
}

.monitor-card-main,
.monitor-card-route,
.monitor-card-meta,
.monitor-card-badges {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  min-width: 0;
  flex-wrap: wrap;
}

.monitor-card-main {
  justify-content: space-between;
}

.monitor-card-badges {
  justify-content: flex-end;
}

.monitor-card-route {
  justify-content: space-between;
}

.monitor-card-meta {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.monitor-latency {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 780;
}

.monitor-route-block {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
}

.monitor-route-block > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
}

.monitor-health-table {
  min-width: 1120px;
  table-layout: fixed;
}

.monitor-health-table th:nth-child(1),
.monitor-health-table td:nth-child(1) {
  width: 170px;
}

.monitor-health-table th:nth-child(2),
.monitor-health-table td:nth-child(2) {
  width: 190px;
}

.monitor-health-table th:nth-child(3),
.monitor-health-table td:nth-child(3),
.monitor-health-table th:nth-child(4),
.monitor-health-table td:nth-child(4),
.monitor-health-table th:nth-child(5),
.monitor-health-table td:nth-child(5) {
  width: 92px;
}

.monitor-health-table th:nth-child(6),
.monitor-health-table td:nth-child(6) {
  width: 260px;
}

.monitor-health-table th:nth-child(7),
.monitor-health-table td:nth-child(7),
.monitor-health-table th:nth-child(8),
.monitor-health-table td:nth-child(8) {
  width: 145px;
}

.monitor-health-table th:nth-child(9),
.monitor-health-table td:nth-child(9) {
  width: 74px;
}

.monitor-matrix-table {
  min-width: 980px;
  table-layout: fixed;
}

.monitor-matrix-table th:nth-child(1),
.monitor-matrix-table td:nth-child(1) {
  width: 220px;
}

.monitor-matrix-table th:nth-child(2),
.monitor-matrix-table td:nth-child(2),
.monitor-matrix-table th:nth-child(3),
.monitor-matrix-table td:nth-child(3) {
  width: 220px;
}

.monitor-matrix-table th:nth-child(4),
.monitor-matrix-table td:nth-child(4) {
  width: 160px;
}

.monitor-matrix-table th:nth-child(5),
.monitor-matrix-table td:nth-child(5) {
  width: 90px;
}

.monitor-matrix-table th:nth-child(6),
.monitor-matrix-table td:nth-child(6) {
  width: 240px;
}

.model-health-cell {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.model-health-cell strong {
  color: var(--text);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.model-health-cell span {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.route-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  max-width: 100%;
}

.route-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  max-width: min(100%, 260px);
  min-height: 28px;
  padding: 0.24rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.1;
}

.route-pill strong,
.route-pill small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-pill strong {
  color: inherit;
  font-weight: 820;
}

.route-pill small {
  color: currentColor;
  opacity: 0.72;
  font-size: 0.7rem;
}

.route-pill.configured {
  border-color: rgba(255, 90, 20, 0.25);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.route-pill.error {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
}

.route-pill.attention {
  border-color: rgba(183, 121, 31, 0.28);
  background: var(--amber-soft);
  color: var(--amber);
}

.route-pill.empty {
  color: var(--muted);
}

.probe-reason-text {
  display: inline-block;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.monitor-card .probe-reason-text {
  display: -webkit-box;
  max-height: 3.4em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.monitor-empty-state {
  display: grid;
  gap: 0.32rem;
  min-height: 86px;
  align-content: center;
  padding: 0.78rem;
  border: 1px dashed rgba(24, 20, 17, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
}

.monitor-empty-state strong {
  color: var(--text);
  font-size: 0.94rem;
}

.monitor-empty-state span {
  font-size: 0.8rem;
  line-height: 1.45;
}

.alert-config-grid,
.route-config-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
}

.billing-workbench {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
  gap: 0.92rem;
}

.billing-primary-panel {
  grid-row: span 2;
  min-height: 520px;
}

.billing-primary-panel .billing-scroll-list {
  min-height: 340px;
  max-height: calc(100vh - 300px);
}

.billing-balance-workbench {
  position: sticky;
  top: 1rem;
}

.billing-scroll-list,
.system-audit-wrap {
  overflow: auto;
  padding-right: 0.15rem;
}

.billing-scroll-list {
  max-height: 340px;
}

.billing-balance-form {
  grid-template-columns: minmax(140px, 0.7fr) minmax(210px, 1fr);
}

.billing-statement-form {
  grid-template-columns: minmax(220px, 1fr) 150px;
}

.billing-workbench:has(.billing-orders-panel.admin-subsection-hidden):has(.billing-statements-panel.admin-subsection-hidden):has(.billing-invoices-panel.admin-subsection-hidden) .billing-balance-panel,
.billing-workbench:has(.billing-balance-panel.admin-subsection-hidden):has(.billing-statements-panel.admin-subsection-hidden):has(.billing-invoices-panel.admin-subsection-hidden) .billing-orders-panel {
  position: static;
  grid-column: 1 / -1;
  grid-row: auto;
}

.system-workbench-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.system-workbench {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 0.92rem;
  align-items: start;
}

.system-settings-pane,
.system-audit-pane {
  min-width: 0;
  padding: 0.86rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.system-limits-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.system-settings-pane .action-row {
  margin-top: 0.7rem;
}

.system-placeholder-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.system-audit-wrap {
  max-height: calc(100vh - 280px);
  min-height: 380px;
}

.system-audit-wrap .table {
  min-width: 720px;
}

.system-workbench:has(.system-audit-pane.admin-subsection-hidden) .system-settings-pane,
.system-workbench:has(.system-settings-pane.admin-subsection-hidden) .system-audit-pane {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.check-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.check-line input {
  width: auto;
  margin-top: 0.2rem;
}

.check-line a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.field span,
.section-title,
.access-item span,
.status-tile span {
  color: var(--muted);
  font-size: 0.82rem;
}

.section-title {
  margin: 1rem 0 0.55rem;
  font-weight: 800;
}

.form-grid,
.gateway-grid,
.filters,
.access-grid,
.gateway-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.compact-filters {
  grid-template-columns: minmax(240px, 1fr) 150px 120px;
}

.model-filters {
  grid-template-columns: 1fr;
}

.playground-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.playground-controls .field:last-child {
  grid-column: 1 / -1;
}

.field-wide,
.status-tile.wide {
  grid-column: 1 / -1;
}

.panel-kicker {
  display: inline-flex;
  margin-bottom: 0.26rem;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
}

.gateway-workflow-panel {
  margin-bottom: 0.75rem;
}

.verification-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: start;
}

.verification-hero {
  margin-bottom: 0.75rem;
}

.verification-metrics {
  margin-bottom: 0.75rem;
}

.verification-form-grid textarea {
  min-height: 104px;
}

.verification-list {
  margin-top: 0.75rem;
  max-height: min(360px, calc(100vh - 420px));
  overflow: auto;
  padding-right: 0.12rem;
}

.verification-item.selected {
  padding-inline: 0.75rem;
  border: 1px solid rgba(255, 90, 20, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.verification-run-panel {
  margin-top: 0.75rem;
}

.verification-receipt-panel {
  margin-top: 0.75rem;
}

.verification-receipt-form {
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 0.9fr) minmax(220px, 0.9fr);
  margin-bottom: 0.72rem;
}

.verification-receipt-result {
  min-height: 88px;
  padding: 0.76rem;
  border: 1px solid rgba(255, 90, 20, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 252, 250, 0.72);
}

.verification-receipt-result.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.verification-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.58rem;
}

.verification-receipt-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.verification-run-list {
  display: grid;
  gap: 0.65rem;
  max-height: min(680px, calc(100vh - 260px));
  overflow: auto;
  padding-right: 0.12rem;
}

.verification-run-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.65rem 0;
}

.verification-run-grid span {
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.78);
  color: var(--muted);
  font-size: 0.8rem;
}

.verification-run-grid strong {
  display: block;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.9rem;
}

.verification-decision-row,
.verification-protocol-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin: 0.55rem 0;
}

.verification-collector-panel {
  margin: 0.62rem 0;
  padding: 0.72rem;
  border: 1px solid rgba(34, 126, 230, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(238, 246, 255, 0.52);
}

.verification-collector-head,
.verification-collector-title,
.verification-collector-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.verification-collector-head span,
.verification-collector-foot,
.verification-collector-grid p,
.verification-collector-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.verification-collector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
  margin-top: 0.6rem;
}

.verification-collector-grid > div {
  min-width: 0;
  padding: 0.58rem 0.64rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.verification-collector-grid > div.is-muted {
  background: rgba(248, 250, 252, 0.62);
}

.verification-collector-diagnostic {
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 6px;
  background: rgba(180, 35, 24, 0.06);
  color: var(--danger) !important;
}

.verification-collector-grid p {
  margin: 0.42rem 0;
  line-height: 1.42;
}

.verification-collector-grid dl {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0.28rem 0.45rem;
  margin: 0;
}

.verification-collector-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.verification-collector-foot {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.verification-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
  margin: 0.6rem 0;
}

.verification-score-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0.56rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.14) var(--score-percent), transparent 0),
    rgba(248, 250, 252, 0.9);
}

.verification-score-tile span,
.verification-score-tile strong {
  position: relative;
  z-index: 1;
}

.verification-score-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.verification-score-tile strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--text);
  font-size: 0.9rem;
}

.verification-recommendation {
  margin: 0.58rem 0;
  padding: 0.65rem 0.72rem;
  border: 1px solid rgba(255, 90, 20, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(255, 242, 236, 0.74);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
}

.verification-probe-evidence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.verification-probe-evidence div {
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.verification-probe-evidence strong {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--text);
  font-size: 0.84rem;
}

.verification-probe-evidence p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.verification-error {
  color: var(--danger);
}

.compact-actions {
  margin-top: 0.65rem;
}

.gateway-flow-strip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: -0.1rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 90, 20, 0.2);
  border-radius: var(--radius);
  background: #fff8f2;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.gateway-flow-strip span {
  white-space: nowrap;
}

.gateway-flow-strip i {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: 0 0 auto;
}

.route-toolbar {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.48rem;
  margin-bottom: 0.9rem;
}

.route-save-row {
  justify-content: flex-start;
  margin: 0.8rem 0 0;
}

.gateway-workbench {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(350px, 1.08fr) minmax(330px, 1fr);
  gap: 0.8rem;
  align-items: stretch;
}

.route-list-column,
.route-editor-column,
.route-key-column {
  min-width: 0;
}

.route-list-column {
  align-self: start;
  position: sticky;
  top: 124px;
  max-height: calc(100vh - 168px);
  overflow: auto;
  padding: 0.72rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.34) transparent;
}

.route-list-column::-webkit-scrollbar {
  width: 7px;
}

.route-list-column::-webkit-scrollbar-track {
  background: transparent;
}

.route-list-column::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 90, 20, 0.28);
}

.route-list-section + .route-list-section {
  margin-top: 0.9rem;
}

.route-picker-list {
  display: grid;
  gap: 0.48rem;
}

.route-picker-list .history-item {
  padding: 0.62rem;
}

.route-picker-list .history-top {
  gap: 0.38rem;
}

.route-picker-list .history-top strong,
.route-picker-list .history-meta {
  overflow-wrap: anywhere;
}

.route-picker-list .history-meta {
  font-size: 0.75rem;
  line-height: 1.42;
}

.route-step {
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.route-step-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.route-step-head h3 {
  margin: 0;
  font-size: 0.98rem;
}

.route-step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.route-mode-badge {
  min-height: 24px;
  padding: 0.16rem 0.45rem;
  font-size: 0.72rem;
}

.route-step-head p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.route-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.route-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem;
}

.route-key-column .route-form-grid {
  grid-template-columns: 1fr;
}

.route-key-column textarea {
  min-height: 132px;
}

.gateway-instance-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 0.8rem;
  align-items: start;
}

.gateway-instance-form-pane,
.gateway-instance-list-pane {
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

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

.gateway-instance-list {
  max-height: 350px;
  overflow: auto;
}

.route-link {
  display: grid;
  place-items: center;
  color: var(--accent);
}

.route-link i {
  width: 22px;
  height: 22px;
}

.route-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.route-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.route-actions .btn {
  min-height: 32px;
  padding: 0.34rem 0.58rem;
  font-size: 0.78rem;
}

.route-actions .btn[disabled] {
  cursor: not-allowed;
  opacity: 0.46;
}

.compact-history {
  max-height: 240px;
  overflow: auto;
  padding-right: 0.15rem;
}

.legacy-gateway-panel {
  margin-top: 0.75rem;
}

.legacy-gateway-panel summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  cursor: default;
  list-style: none;
}

.legacy-gateway-panel summary::-webkit-details-marker {
  display: none;
}

.legacy-gateway-panel summary::after {
  content: "展开";
  align-self: center;
  min-height: 30px;
  padding: 0.28rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.legacy-gateway-panel[open] summary {
  margin-bottom: 0.9rem;
}

.legacy-gateway-panel[open] summary::after {
  content: "收起";
}

body[data-language="en"] .legacy-gateway-panel summary::after {
  content: "Expand";
}

body[data-language="en"] .legacy-gateway-panel[open] summary::after {
  content: "Collapse";
}

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

.access-item,
.status-tile,
.example-card,
.gateway-map-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.access-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.85rem;
}

.access-item span,
.access-item strong {
  grid-column: 1;
}

.access-item strong,
.status-tile strong {
  overflow-wrap: anywhere;
}

.status-tile {
  min-width: 0;
}

.access-item .btn {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 82px;
  min-height: 42px;
}

.btn,
.chip,
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius);
  font-weight: 800;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease,
    box-shadow 0.14s ease;
}

.btn {
  padding: 0.66rem 0.9rem;
}

.btn:hover:not(:disabled),
.icon-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(24, 20, 17, 0.1);
}

.btn:active:not(:disabled),
.icon-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 1px 2px rgba(24, 20, 17, 0.16);
}

.btn:focus-visible,
.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 20, 0.18);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.create-key-btn {
  min-width: 112px;
  padding-inline: 0.95rem;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--blue-soft);
  color: var(--blue);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover,
.chip:hover,
.icon-btn:hover {
  background: #eef3f6;
}

.btn.is-attention {
  box-shadow: 0 0 0 3px rgba(255, 90, 20, 0.14);
}

.btn.is-loading,
.icon-btn.is-loading {
  pointer-events: none;
  box-shadow: 0 0 0 3px rgba(63, 69, 77, 0.1);
}

.btn.is-loading i,
.icon-btn.is-loading i,
.drawer-feedback.saving i {
  animation: spin 0.85s linear infinite;
}

.btn.is-confirmed,
.icon-btn.is-confirmed {
  border-color: rgba(21, 132, 95, 0.32);
  background: #15845f;
  color: #fff;
  box-shadow: 0 8px 20px rgba(21, 132, 95, 0.18);
}

.btn.is-danger,
.icon-btn.is-danger {
  border-color: rgba(180, 35, 24, 0.32);
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 20px rgba(180, 35, 24, 0.16);
}

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

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  flex: 0 0 34px;
}

.icon-btn.danger {
  color: var(--danger);
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 0.28rem 0.68rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.badge.configured {
  border-color: rgba(255, 90, 20, 0.25);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge.error {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.attention,
body.admin-home .badge.attention {
  border-color: rgba(183, 121, 31, 0.28);
  background: var(--amber-soft);
  color: var(--amber);
}

.ops-overview-panel {
  margin-bottom: 0.9rem;
}

.ops-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.upstream-connect-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin: 0.8rem 0;
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(183, 121, 31, 0.35);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: #663c00;
}

.upstream-connect-callout div {
  min-width: 0;
}

.upstream-connect-callout strong {
  display: block;
  margin-bottom: 0.18rem;
  color: #442600;
}

.upstream-connect-callout p,
.upstream-connect-callout small {
  display: block;
  margin: 0;
  line-height: 1.45;
}

.upstream-connect-callout small {
  margin-top: 0.18rem;
  color: #7a5108;
}

.upstream-connect-callout .btn {
  flex: 0 0 auto;
}

.ops-status-tile strong.configured {
  color: var(--accent-strong);
}

.ops-status-tile strong.error {
  color: var(--danger);
}

.ops-status-tile strong.attention {
  color: var(--amber);
}

.admin-workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 0.9rem;
  align-items: stretch;
  margin-bottom: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 14px;
  background: rgba(255, 252, 250, 0.76);
  box-shadow: var(--admin-shadow-soft, 0 1px 2px rgba(24, 20, 17, 0.06));
}

.admin-workbench-hero h2 {
  margin: 0.12rem 0 0;
  color: var(--text);
  font-size: 1.24rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.admin-workbench-hero .panel-subtitle {
  margin-top: 0.42rem;
}

.workbench-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  min-width: 0;
}

.workbench-health-grid article {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 116px;
  padding: 0.78rem 0.82rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.workbench-health-grid article.configured {
  border-color: rgba(21, 132, 95, 0.16);
  background: rgba(239, 250, 245, 0.76);
}

.workbench-health-grid article.attention {
  border-color: rgba(183, 121, 31, 0.22);
  background: rgba(255, 249, 235, 0.84);
}

.workbench-health-grid article.error {
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(255, 244, 242, 0.84);
}

.workbench-health-grid span,
.workbench-health-grid small {
  display: block;
  color: var(--muted);
}

.workbench-health-grid span {
  font-size: 0.74rem;
  font-weight: 820;
}

.workbench-health-grid strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.workbench-health-grid article.configured strong {
  color: #157452;
}

.workbench-health-grid article.attention strong {
  color: var(--amber);
}

.workbench-health-grid article.error strong {
  color: var(--danger);
}

.workbench-health-grid small {
  margin-top: 0.26rem;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.advanced-filter-card {
  margin-top: 0.68rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.56);
}

.advanced-filter-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 0.78rem;
  cursor: pointer;
  list-style: none;
}

.advanced-filter-card summary::-webkit-details-marker {
  display: none;
}

.advanced-filter-card summary span {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
}

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

.advanced-filter-card[open] summary {
  border-bottom: 1px solid rgba(24, 20, 17, 0.075);
}

.advanced-filter-card .finance-center-range-grid {
  margin-top: 0;
  border: 0;
  border-radius: 0 0 13px 13px;
  background: transparent;
}

.ops-table-wrap {
  max-height: 440px;
}

.profit-text {
  color: var(--success);
  font-weight: 900;
}

.error-text {
  color: var(--danger);
  font-weight: 900;
}

.table-subtext {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.finance-center-metrics {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

#financeCenterTab:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.finance-center-metrics {
  order: 1;
}

.finance-center-hero {
  order: 0;
}

.finance-center-panel,
.finance-center-upstream-panel,
.finance-center-breakdown-panel,
.finance-center-record-panel,
.finance-center-reconcile-stack {
  margin-bottom: 0.9rem;
}

.finance-center-panel {
  order: 3;
}

.finance-center-breakdown-panel {
  order: 4;
}

.finance-center-two-col {
  order: 5;
}

.finance-center-record-panel {
  order: 6;
}

.finance-center-upstream-panel {
  order: 7;
}

.finance-center-reconcile-stack {
  order: 8;
}

#financeCenterLedgerSection,
#financeCenterUsersSection,
#financeCenterRecordsSection,
#financeCenterUpstreamSection,
#gatewayBillingTab {
  scroll-margin-top: 1rem;
}

.finance-center-filter-grid,
.finance-center-range-grid {
  display: grid;
  gap: 0.7rem;
}

.finance-center-filter-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.finance-center-range-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.finance-center-filter-grid,
.finance-center-range-grid,
.finance-center-upstream-controls {
  padding: 0.78rem;
  border: 1px solid rgba(24, 20, 17, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.52);
}

.finance-center-upstream-controls {
  align-items: end;
}

.finance-upstream-config {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
}

.finance-upstream-config summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.82rem;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.finance-upstream-config summary::-webkit-details-marker {
  display: none;
}

.finance-upstream-config[open] summary {
  border-bottom: 1px solid var(--border);
}

.finance-upstream-source-form {
  padding: 0.82rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-upstream-config .action-row,
.finance-upstream-config .history-list {
  padding: 0 0.82rem 0.82rem;
}

.finance-upstream-source-form select[multiple] {
  min-height: 112px;
  padding: 0.45rem;
}

.finance-center-upstream-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.finance-center-upstream-summary div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 0.72rem 0.78rem;
}

.finance-center-upstream-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-bottom: 0.25rem;
}

.finance-center-upstream-summary strong {
  display: block;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.finance-center-upstream-summary strong.configured {
  color: var(--success);
}

.finance-center-upstream-summary strong.error {
  color: var(--danger);
}

.finance-center-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
  margin-bottom: 0.9rem;
}

.finance-center-record-wrap {
  max-height: min(560px, calc(100vh - 280px));
}

.finance-center-record-table {
  min-width: 1180px;
}

.finance-center-account-table {
  min-width: 980px;
}

.finance-center-account-row {
  cursor: pointer;
}

.finance-center-account-row:hover {
  background: rgba(255, 90, 20, 0.045);
}

.finance-center-account-row.selected {
  background: var(--accent-soft);
}

.finance-center-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(255, 90, 20, 0.22);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.finance-center-selection-bar div {
  min-width: 0;
}

.finance-center-selection-bar strong,
.finance-center-selection-bar span {
  display: block;
}

.finance-center-selection-bar span {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.finance-center-upstream-table {
  min-width: 920px;
}

.compact-rank-table {
  min-width: 620px;
}

.compact-rank-table td:first-child,
.finance-center-record-table td:nth-child(3),
.finance-center-model-cell {
  min-width: 180px;
}

.finance-center-panel .panel-head,
.finance-center-upstream-panel .panel-head,
.verification-grid .panel-head,
.monitoring-group-stability-panel .panel-head {
  align-items: flex-start;
}

.model-brand-icon.tiny {
  width: 22px;
  height: 22px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.ops-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 0.9rem;
  align-items: start;
}

.ops-config-block {
  min-width: 0;
}

.compact-actions {
  margin-top: 0;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

.ops-group-route-card {
  display: grid;
  gap: 0.7rem;
}

.ops-route-binding-list {
  display: grid;
  gap: 0.5rem;
}

.ops-route-binding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.62rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.ops-route-binding-row .route-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.ops-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.85rem 0;
}

.group-rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.36rem 0.58rem;
  border: 1px solid rgba(21, 132, 95, 0.18);
  border-radius: 999px;
  background: #edf7f3;
  color: #006b55;
  font-size: 0.78rem;
  font-weight: 900;
}

.group-rate-pill small {
  margin: 0;
  color: #477067;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: normal;
}

.security-callout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.9rem 0;
  padding: 0.85rem;
  border: 1px solid rgba(183, 121, 31, 0.35);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: #663c00;
}

.security-callout code {
  display: block;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.example-card {
  padding: 0.8rem;
  background: #fff;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(86px, 120px)) auto;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 18, 32, 0.42);
}

.key-edit-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(520px, 100vw);
  background: var(--panel, #fff);
  color: var(--text, #132033);
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.22);
  overflow-y: auto;
}

.key-edit-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.drawer-head,
.drawer-row,
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-head {
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.28));
}

.drawer-head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
}

.drawer-section {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.28));
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

.drawer-row {
  justify-content: space-between;
  min-width: 0;
}

.drawer-row code {
  max-width: 68%;
  overflow-wrap: anywhere;
  text-align: right;
}

.drawer-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 0.25rem;
}

.drawer-actions .btn {
  min-height: 43px;
  min-width: 118px;
}

.drawer-feedback {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.68rem 0.75rem;
  border: 1px solid rgba(222, 216, 210, 0.92);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.drawer-feedback i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.drawer-feedback.dirty {
  border-color: rgba(255, 90, 20, 0.26);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.drawer-feedback.saving {
  border-color: rgba(63, 69, 77, 0.18);
  background: #f4f6f5;
  color: var(--blue);
}

.drawer-feedback.success {
  border-color: rgba(21, 132, 95, 0.28);
  background: #effaf5;
  color: #106447;
}

.drawer-feedback.error {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--danger-soft);
  color: var(--danger);
}

.security-callout.compact {
  align-items: flex-start;
  gap: 0.7rem;
}

.security-callout.compact p {
  margin: 0.25rem 0 0;
}

@media (max-width: 640px) {
  .key-edit-drawer {
    width: 100vw;
  }

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

  .drawer-actions .btn {
    flex: 1 1 100%;
  }
}

.key-create-form {
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(172px, 0.8fr)) auto;
  align-items: stretch;
  gap: 0.72rem;
  margin: 0.85rem 0;
  padding: 0.8rem;
  border: 1px solid rgba(222, 216, 210, 0.92);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.key-create-field {
  display: grid;
  min-width: 0;
  gap: 0.3rem;
}

.key-create-field span {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 900;
}

.key-create-field small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.key-create-field input {
  min-height: 42px;
  padding: 0.62rem 0.7rem;
}

.key-create-submit {
  align-self: start;
  min-height: 42px;
  margin-top: 1.42rem;
  white-space: nowrap;
}

.compact-recharge {
  grid-template-columns: minmax(140px, 1fr) 150px auto;
}

@media (max-width: 1320px) {
  .key-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .key-name-field {
    grid-column: 1 / -1;
  }

  .key-create-submit {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: 0;
  }
}

@media (max-width: 780px) {
  .key-create-form {
    padding: 0.7rem;
  }

  .key-create-submit {
    width: 100%;
    justify-self: stretch;
  }
}

.payment-qr-box {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.9rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.payment-qr-box img {
  width: 140px;
  height: 140px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.payment-qr-box p {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.payment-qr-box a {
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.public-copy {
  display: grid;
  gap: 1rem;
  line-height: 1.65;
}

.public-copy p {
  margin: 0;
  color: var(--muted);
}

.key-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.05rem;
}

.key-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.95fr) minmax(260px, 1.6fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.key-card.active {
  border-color: rgba(255, 90, 20, 0.35);
  background: #fff7ef;
}

.key-card.saved-flash {
  animation: keySavedFlash 1.8s ease;
}

@keyframes keySavedFlash {
  0% {
    border-color: rgba(21, 132, 95, 0.52);
    background: #effaf5;
    box-shadow: 0 0 0 3px rgba(21, 132, 95, 0.16);
  }

  100% {
    border-color: rgba(255, 90, 20, 0.35);
    background: #fff7ef;
    box-shadow: none;
  }
}

.key-card strong,
.key-card span {
  display: block;
}

.key-card strong {
  overflow-wrap: normal;
  word-break: normal;
}

.key-card span {
  color: var(--muted);
  font-size: 0.84rem;
  word-break: break-word;
}

.key-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}

.detailed-key-card .table-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.invite-manager {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.model-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 0.85rem;
  overflow-anchor: none;
}

.model-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(2.6rem, auto) auto;
  gap: 0.7rem;
  min-height: 180px;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow-anchor: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.model-card:hover,
.model-card.active {
  border-color: rgba(255, 90, 20, 0.42);
  background: #fff8f3;
  box-shadow: 0 10px 28px rgba(24, 20, 17, 0.08);
}

.model-card:hover {
  transform: translateY(-1px);
}

.model-card.active {
  box-shadow: 0 0 0 2px rgba(255, 90, 20, 0.11), 0 10px 28px rgba(24, 20, 17, 0.08);
}

.model-card-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  appearance: none;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.model-card.active .model-card-actions {
  border-color: rgba(255, 90, 20, 0.35);
  color: var(--accent);
  background: var(--accent-soft);
}

.model-card-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.model-card-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding-right: 2rem;
}

.model-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #3f454d;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 20, 17, 0.08);
}

.model-brand-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.model-brand-icon.openai { color: #3f454d; }
.model-brand-icon.deepseek { color: #3563ff; background: #f3f6ff; }
.model-brand-icon.qwen { color: #5b63ff; background: #f4f2ff; }
.model-brand-icon.doubao { color: #1f72ff; background: #eef5ff; }
.model-brand-icon.gemini { color: #1a73e8; background: #eef6ff; }
.model-brand-icon.glm { color: #5968ff; background: #f3f5ff; }
.model-brand-icon.kimi { color: #242a30; background: #f3f5f7; }
.model-brand-icon.minimax { color: #ff5f8a; background: #fff2f6; }
.model-brand-icon.lanxen { color: var(--accent); background: #101213; border-color: rgba(255, 90, 20, 0.42); }

.model-card-title {
  display: grid;
  min-width: 0;
  gap: 0.16rem;
}

.model-card-title strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.model-card-title span,
.model-price-line,
.model-group-line,
.model-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.model-price-line {
  color: #2d3540;
  font-weight: 700;
}

.model-group-line {
  display: block;
  margin-top: -0.28rem;
  color: #59636e;
  font-weight: 800;
}

.model-availability {
  --availability-percent: 0%;
  --availability-fill: #12b981;
  --availability-empty: #e5ece8;
  --availability-pill-bg: #e7f8ef;
  --availability-pill-color: #047447;
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.availability-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
}

.availability-score {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34rem;
  min-width: 0;
  color: #24312c;
}

.availability-score-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.availability-score strong {
  color: var(--availability-pill-color);
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.availability-bars {
  display: block;
  min-width: 0;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--availability-fill) 0 var(--availability-percent),
    var(--availability-empty) var(--availability-percent) 100%
  );
}

.availability-bar {
  display: block;
  width: 100%;
  height: 17px;
  min-width: 2px;
  border-radius: 999px;
  background: #dfe7e3;
}

.availability-bar.on {
  background: #12d77a;
  box-shadow: 0 0 0 1px rgba(4, 177, 94, 0.06);
}

.availability-bar.warn {
  background: #ffba45;
}

.availability-bar.danger {
  background: #ff6b6b;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--availability-pill-bg);
  color: var(--availability-pill-color);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.availability-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  min-width: 0;
}

.availability-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: #f4f7f6;
  color: #52615a;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.model-availability.excellent {
  --availability-fill: #0f766e;
  --availability-empty: #dceee9;
  --availability-pill-bg: #def7ec;
  --availability-pill-color: #047857;
}

.model-availability.good {
  --availability-fill: #14b8a6;
  --availability-empty: #e1efeb;
  --availability-pill-bg: #e3f8ef;
  --availability-pill-color: #0f766e;
}

.model-availability.watch {
  --availability-fill: #f59e0b;
  --availability-empty: #f1e9d6;
  --availability-pill-bg: #fff3d6;
  --availability-pill-color: #9a5b00;
}

.model-availability.risk,
.model-availability.low {
  --availability-fill: #ef6a4c;
  --availability-empty: #f0dfda;
  --availability-pill-bg: #ffe8e0;
  --availability-pill-color: #b42318;
}

.model-availability.unknown {
  --availability-fill: #dfe7e3;
  --availability-empty: #dfe7e3;
  --availability-pill-bg: #edf1f4;
  --availability-pill-color: #59636e;
}

.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-self: end;
}

.model-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #edf7f3;
  color: #006b55;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.model-tag.billing-tag {
  background: #f4ebff;
  color: #5b21b6;
}

.model-tag.group-tag {
  background: #eef5ff;
  color: #185abc;
}

.model-test-models-panel {
  margin-top: 0.85rem;
}

.gateway-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 0.75rem;
}

.gateway-map-item,
.status-tile {
  padding: 0.72rem;
}

.gateway-test-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  margin: 0.8rem 0 0.9rem;
  padding: 0.85rem;
  border: 1px solid rgba(255, 90, 20, 0.22);
  border-radius: var(--radius);
  background: #fff8f2;
}

.compact-title {
  display: block;
  margin: 0 0 0.28rem;
}

.gateway-test-panel .panel-subtitle {
  margin: 0;
}

.gateway-test-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
}

.gateway-test-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 178px;
}

.gateway-test-actions .btn {
  white-space: nowrap;
}

.gateway-test-model,
.gateway-map-model {
  min-width: 0;
}

.gateway-model-connector {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.gateway-test-model {
  min-height: 66px;
  padding: 0.62rem;
  border: 1px solid rgba(214, 207, 200, 0.9);
  border-radius: var(--radius);
  background: #fff;
}

.gateway-test-model span,
.gateway-map-local span,
.gateway-map-upstream span {
  display: block;
  margin-bottom: 0.16rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.gateway-test-model strong,
.gateway-map-local strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gateway-test-model small,
.gateway-map-local small {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.model-brand-icon.gateway-model-icon {
  width: 38px;
  height: 38px;
  box-shadow: none;
}

.model-brand-icon.gateway-model-icon svg {
  width: 22px;
  height: 22px;
}

.gateway-map-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.86fr) 54px minmax(230px, 1.14fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 96px;
  border-color: rgba(214, 207, 200, 0.88);
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 20, 17, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gateway-map-item:hover {
  border-color: rgba(255, 90, 20, 0.28);
  background: #fffaf6;
}

.gateway-map-item.testing {
  border-color: rgba(255, 90, 20, 0.46);
  background: #fff8f2;
  box-shadow: inset 3px 0 0 var(--accent), 0 10px 24px rgba(24, 20, 17, 0.07);
}

.gateway-map-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 900;
}

.gateway-test-badge {
  position: absolute;
  top: 0.52rem;
  right: 0.58rem;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.gateway-map-item.testing .gateway-test-badge {
  display: inline-flex;
  border-color: rgba(255, 90, 20, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
}

.gateway-current-test {
  border-color: rgba(255, 90, 20, 0.22);
  background: #fff8f2;
}

.gateway-map-item > svg {
  color: var(--muted);
  width: 16px;
  height: 16px;
}

.gateway-map-local {
  min-width: 0;
}

.gateway-map-item .field {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-user-table {
  min-width: 905px;
  table-layout: fixed;
}

.admin-user-table th:nth-child(1),
.admin-user-table td:nth-child(1) {
  width: 220px;
}

.admin-user-table th:nth-child(2),
.admin-user-table td:nth-child(2) {
  width: 115px;
}

.admin-user-table th:nth-child(3),
.admin-user-table td:nth-child(3) {
  width: 75px;
}

.admin-user-table th:nth-child(4),
.admin-user-table td:nth-child(4) {
  width: 85px;
}

.admin-user-table th:nth-child(5),
.admin-user-table td:nth-child(5) {
  width: 110px;
}

.admin-user-table th:nth-child(6),
.admin-user-table td:nth-child(6) {
  width: 90px;
}

.admin-user-table .table-actions-cell {
  width: 210px;
  white-space: nowrap;
}

.admin-user-table .table-actions-inline {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.admin-user-table .table-actions-inline .icon-btn {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.account-summary-panel {
  margin-bottom: 0.75rem;
}

.account-summary-filters {
  grid-template-columns: minmax(260px, 1fr) 150px;
  margin-bottom: 0.7rem;
}

.account-summary-table {
  min-width: 960px;
  table-layout: fixed;
}

.account-summary-table th:nth-child(1),
.account-summary-table td:nth-child(1) {
  width: 24%;
}

.account-summary-table th:nth-child(2),
.account-summary-table td:nth-child(2) {
  width: 12%;
}

.account-summary-table th:nth-child(3),
.account-summary-table td:nth-child(3) {
  width: 10%;
}

.account-summary-table th:nth-child(4),
.account-summary-table td:nth-child(4) {
  width: 16%;
}

.account-summary-table th:nth-child(5),
.account-summary-table td:nth-child(5) {
  width: 12%;
}

.account-summary-table th:nth-child(6),
.account-summary-table td:nth-child(6) {
  width: 12%;
}

.account-summary-table th:nth-child(7),
.account-summary-table td:nth-child(7) {
  width: 10%;
}

.account-summary-table .table-actions-cell {
  width: 52px;
  text-align: right;
}

.account-summary-table tbody tr:hover {
  background: rgba(255, 90, 20, 0.045);
}

.table th,
.table td {
  padding: 0.72rem 0.45rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 0.78rem;
}

.billing-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.billing-filter-panel {
  margin-bottom: 0.9rem;
}

.billing-log-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.billing-log-actions .btn {
  min-height: 36px;
  white-space: nowrap;
}

.billing-log-metrics {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.billing-log-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 32px;
  padding: 0.34rem 0.64rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.billing-log-badge.spend {
  border-color: rgba(34, 126, 230, 0.2);
  background: #eef6ff;
  color: #0b64c0;
}

.billing-log-badge span,
.billing-log-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.billing-log-badge strong {
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.billing-log-count {
  margin-left: auto;
}

.billing-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.68rem;
  align-items: end;
}

.billing-filter-form .field {
  min-width: 0;
}

.billing-filter-form input,
.billing-filter-form select {
  min-height: 34px;
  border-radius: 8px;
  background: #f6f7f9;
}

.billing-filter-form .field-wide {
  grid-column: span 2;
}

.billing-filter-form .billing-email-field {
  grid-column: 1 / -1;
}

.billing-filter-actions {
  display: flex;
  justify-content: stretch;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  align-self: end;
  grid-column: 1 / -1;
}

.billing-filter-actions .btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
}

.sub-account-metrics {
  align-items: stretch;
}

.sub-account-login-toggle {
  min-height: 44px;
  align-self: end;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 800;
}

.sub-account-card {
  display: grid;
  gap: 0.72rem;
  padding: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.sub-account-card.is-disabled {
  background: #f8fafc;
}

.sub-account-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.72rem;
}

.sub-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(34, 126, 230, 0.22);
  border-radius: 8px;
  background: #eef6ff;
  color: #0b64c0;
  font-size: 0.86rem;
  font-weight: 900;
}

.sub-account-title {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.sub-account-title strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.sub-account-kicker,
.sub-account-id,
.sub-account-policy-row,
.sub-account-foot p,
.sub-account-metric-grid small {
  color: var(--muted);
  font-size: 0.78rem;
}

.sub-account-kicker {
  display: block;
  margin-bottom: 0.12rem;
  font-weight: 900;
}

.sub-account-id {
  overflow-wrap: anywhere;
}

.sub-account-policy-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sub-account-policy-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 28px;
  padding: 0.26rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.sub-account-policy-row svg,
.sub-account-action-row svg {
  width: 15px;
  height: 15px;
}

.sub-account-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.sub-account-metric-grid span {
  min-width: 0;
  padding: 0.48rem 0.56rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}

.sub-account-metric-grid small,
.sub-account-metric-grid strong {
  display: block;
}

.sub-account-metric-grid strong {
  margin-top: 0.18rem;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.sub-account-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding-top: 0.15rem;
}

.sub-account-foot p {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sub-account-action-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .sub-account-card-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .sub-account-card-head .badge {
    grid-column: 2;
    justify-self: start;
  }

  .sub-account-avatar {
    width: 38px;
    height: 38px;
  }

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

  .sub-account-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .sub-account-action-row {
    width: 100%;
    justify-content: flex-start;
  }
}

.billing-grid {
  grid-template-columns: 1fr;
}

.wallet-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.wallet-summary-card {
  min-height: 86px;
}

.billing-usage-log-panel {
  margin-bottom: 0.9rem;
}

.billing-data-table {
  min-width: 680px;
  table-layout: fixed;
}

.billing-data-table th,
.billing-data-table td {
  padding: 0.78rem 0.7rem;
  overflow-wrap: anywhere;
}

.billing-data-table tbody tr:hover {
  background: rgba(255, 90, 20, 0.045);
}

.billing-data-table th:nth-child(1),
.billing-data-table td:nth-child(1) {
  width: 25%;
}

.billing-data-table th:nth-child(2),
.billing-data-table td:nth-child(2),
.billing-data-table th:nth-child(3),
.billing-data-table td:nth-child(3),
.billing-data-table th:nth-child(4),
.billing-data-table td:nth-child(4) {
  width: 13%;
}

.billing-data-table th:nth-child(5),
.billing-data-table td:nth-child(5) {
  width: 17%;
}

.billing-data-table th:nth-child(6),
.billing-data-table td:nth-child(6) {
  width: 19%;
}

.billing-usage-table {
  min-width: 760px;
}

.billing-usage-table th:nth-child(1),
.billing-usage-table td:nth-child(1) {
  width: 21%;
}

.billing-usage-table th:nth-child(2),
.billing-usage-table td:nth-child(2) {
  width: 15%;
}

.billing-usage-table th:nth-child(3),
.billing-usage-table td:nth-child(3) {
  width: 23%;
}

.billing-usage-table th:nth-child(4),
.billing-usage-table td:nth-child(4) {
  width: 12%;
}

.billing-usage-table th:nth-child(5),
.billing-usage-table td:nth-child(5) {
  width: 12%;
}

.billing-usage-table th:nth-child(6),
.billing-usage-table td:nth-child(6) {
  width: 17%;
}

.billing-log-table th,
.billing-log-table td {
  padding: 0.62rem 0.72rem;
}

.billing-log-table td {
  font-size: 0.88rem;
}

.billing-log-table tbody tr:nth-child(even) {
  background: rgba(17, 24, 39, 0.018);
}

.log-row-toggle {
  display: inline-flex;
  width: 16px;
  color: var(--muted);
}

.group-pill,
.model-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.group-pill {
  background: #f3f7ff;
  color: #1d4ed8;
}

.model-pill {
  background: #eefaf3;
  color: #047857;
}

.billing-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.72rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.billing-page-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.amount-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  white-space: nowrap;
}

.amount-cell.positive {
  color: #15845f;
}

.amount-cell.negative {
  color: var(--danger);
}

@media (max-width: 1240px) {
  .billing-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .billing-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .verification-receipt-form {
    grid-template-columns: 1fr;
  }

  .billing-log-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 760px) {
  .verification-collector-grid,
  .verification-run-grid {
    grid-template-columns: 1fr;
  }

  .billing-log-metrics,
  .billing-pagination {
    align-items: stretch;
  }

  .billing-log-badge,
  .billing-log-count,
  .billing-page-controls {
    width: 100%;
  }

  .billing-log-count {
    margin-left: 0;
  }

  .billing-page-controls {
    justify-content: space-between;
  }

  .billing-filter-form {
    grid-template-columns: 1fr;
  }

  .billing-filter-form .field-wide {
    grid-column: 1;
  }

  .billing-filter-form .billing-email-field {
    grid-column: 1;
  }

  .wallet-summary-grid {
    grid-template-columns: 1fr;
  }

  .billing-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .billing-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .billing-filter-actions .btn {
    width: 100%;
  }

  .billing-data-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 0.65rem;
    table-layout: auto;
  }

  .billing-data-table thead {
    display: none;
  }

  .billing-data-table,
  .billing-data-table tbody,
  .billing-data-table tr,
  .billing-data-table td {
    display: block;
    width: 100% !important;
  }

  .billing-data-table tr {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: var(--shadow-soft);
  }

  .billing-data-table td {
    display: grid;
    grid-template-columns: minmax(5.7rem, 0.38fr) minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    padding: 0.68rem 0.78rem;
    border-bottom: 1px solid var(--border);
  }

  .billing-data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .billing-data-table td:last-child {
    border-bottom: 0;
  }

  .billing-data-table .amount-cell {
    white-space: normal;
  }
}

.table strong,
.subtext {
  display: block;
}

.subtext {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.row-active {
  background: rgba(255, 90, 20, 0.05);
}

.account-only-row td {
  background: rgba(244, 241, 238, 0.42);
}

.account-only-row.row-active td {
  background: rgba(255, 90, 20, 0.07);
}

.pagination-row {
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.usage-bars,
.history-list {
  display: grid;
  gap: 0.65rem;
}

.usage-bar {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(140px, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.bar-label {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent));
}

.bar-meta,
.history-meta,
.history-time,
.inline-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.history-diagnostics span {
  max-width: 100%;
  padding: 0.18rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.verification-lookup-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(140px, auto);
  gap: 0.75rem;
  align-items: end;
  max-width: 920px;
}

.verification-lookup-form .field {
  min-width: 0;
}

.verification-lookup-form .btn {
  min-height: 44px;
  white-space: nowrap;
}

.verification-lookup-result {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
}

.verification-lookup-result.error {
  border-color: rgba(190, 18, 60, 0.26);
  background: rgba(190, 18, 60, 0.06);
}

.verification-lookup-result.error p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.verification-result-head,
.history-verification-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.verification-result-head {
  color: var(--muted);
  font-size: 0.82rem;
}

.verification-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.verification-result-grid div {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.verification-result-grid span,
.verification-result-grid strong,
.verification-result-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.verification-result-grid span {
  color: var(--muted);
  font-size: 0.75rem;
}

.verification-result-grid strong {
  margin-top: 0.18rem;
  font-size: 0.84rem;
}

.verification-result-grid small {
  margin-top: 0.32rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.verification-evidence,
.history-verification-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.verification-evidence {
  margin-top: 0.6rem;
}

.verification-evidence span,
.history-verification-details span {
  max-width: 100%;
  padding: 0.14rem 0.38rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.history-verification {
  margin-top: 0.45rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-soft);
}

.history-verification-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.history-verification-details {
  margin-top: 0.4rem;
}

.history-suggestion {
  margin-top: 0.4rem;
  color: #7a4a32;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.history-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.review-field {
  margin-top: 0.75rem;
}

.review-field textarea {
  min-height: 76px;
}

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

.admin-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.9rem 0;
}

.admin-placeholder-grid article {
  min-height: 96px;
  padding: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.06);
}

.admin-placeholder-grid strong,
.admin-placeholder-grid span {
  display: block;
}

.admin-placeholder-grid span {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

body.admin-home .history-item {
  border-bottom-color: var(--border);
}

body.admin-home .admin-placeholder-grid article {
  background: rgba(255, 255, 255, 0.72);
}

body.admin-home .admin-placeholder-grid span {
  color: var(--muted);
}

.history-top strong {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.check-detail {
  margin-top: 0.35rem;
}

.history-prompt {
  margin: 0.35rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  background: var(--muted);
}

.status-dot.ok {
  background: var(--accent);
}

.status-dot.fail {
  background: var(--danger);
}

.response-content,
.code-block {
  margin: 0;
  min-height: 220px;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfcfd;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.86rem;
}

.response-content.image-response {
  display: grid;
  place-items: center;
  min-height: 260px;
  white-space: normal;
  font-family: inherit;
}

.response-image-preview {
  display: block;
  width: min(100%, 420px);
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.compact-code {
  min-height: 170px;
}

.response-usage {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.response-error {
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
}

.response-error p {
  margin: 0.35rem 0 0;
  color: #7a271a;
}

.empty {
  padding: 0.9rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
}

.status-bar {
  padding: 0.78rem 0.95rem;
  color: var(--muted);
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  margin-bottom: 0.9rem;
}

body.admin-home .status-bar {
  position: fixed;
  top: auto;
  bottom: 1rem;
  right: 1rem;
  left: auto;
  z-index: 80;
  display: flex;
  align-items: center;
  width: min(520px, calc(100vw - 296px));
  min-height: 44px;
  max-height: min(132px, calc(100vh - 2rem));
  margin: 0;
  padding: 0.62rem 0.85rem;
  overflow: auto;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(24, 20, 17, 0.13);
}

.status-bar.success {
  border-color: rgba(255, 90, 20, 0.25);
  background: #fff7ef;
  color: var(--accent-strong);
}

.status-bar.error {
  border-color: rgba(180, 35, 24, 0.25);
  background: #fff7f6;
  color: var(--danger);
}

/* Apple-inspired polish for the administrator console. Keep this scoped to
   admin-home so the customer console and landing pages keep their own rhythm. */
body.admin-home {
  --admin-surface: rgba(255, 255, 255, 0.82);
  --admin-surface-strong: rgba(255, 255, 255, 0.96);
  --admin-hairline: rgba(24, 20, 17, 0.08);
  --admin-muted-fill: rgba(246, 245, 243, 0.78);
  --admin-shadow: 0 18px 48px rgba(32, 27, 22, 0.08);
  --admin-shadow-soft: 0 10px 26px rgba(32, 27, 22, 0.055);
  background:
    linear-gradient(135deg, rgba(255, 90, 20, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfbfa 0%, #f5f4f1 56%, #efede9 100%);
}

body.admin-home .admin-shell {
  grid-template-columns: 252px minmax(0, 1fr);
  background: transparent;
}

body.admin-home .admin-sidebar {
  padding: 1rem 0.85rem;
  border-right: 1px solid var(--admin-hairline);
  background: rgba(251, 250, 248, 0.74);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.62) inset;
  backdrop-filter: blur(22px);
}

body.admin-home .sidebar-brand {
  min-height: 74px;
  padding: 0.25rem 0.35rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--admin-hairline);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.admin-home .sidebar-brand strong {
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: 0;
}

body.admin-home .sidebar-brand span {
  font-size: 0.8rem;
}

body.admin-home .admin-nav {
  display: block;
}

body.admin-home .side-nav {
  display: grid;
  align-content: start;
  gap: 0.24rem;
}

body.admin-home .nav-group {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.32rem;
}

body.admin-home .side-nav-label {
  margin: 0.62rem 0 0.14rem;
  padding: 0 0.65rem;
  color: #9b948d;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.admin-home .side-link {
  min-height: 38px;
  padding: 0.52rem 0.64rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #4f4943;
  font-size: 0.88rem;
  font-weight: 760;
  box-shadow: none;
}

body.admin-home .side-link i {
  width: 17px;
  height: 17px;
  color: #8a837c;
}

body.admin-home .side-link.active {
  border-color: rgba(255, 90, 20, 0.14);
  background: rgba(255, 90, 20, 0.11);
  color: var(--accent-strong);
  box-shadow: none;
}

body.admin-home .side-link.active i {
  color: var(--accent-strong);
}

body.admin-home .side-link:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: none;
}

body.admin-home .sidebar-logout {
  justify-content: flex-start;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.62);
  color: #5b554f;
}

body.admin-home .admin-main {
  padding: 1.05rem 1.25rem 6.75rem;
  scroll-padding-top: 6.4rem;
}

body.admin-home .app-header {
  align-items: center;
  margin: -1.05rem -1.25rem 0.85rem;
  padding: 1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--admin-hairline);
  background: rgba(251, 250, 248, 0.84);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  backdrop-filter: blur(24px);
}

body.admin-home .app-header .eyebrow {
  color: #8b8580;
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: none;
}

body.admin-home .app-header h1 {
  margin-top: 0.05rem;
  font-size: 1.72rem;
  font-weight: 820;
  letter-spacing: 0;
}

body.admin-home .header-actions {
  gap: 0.45rem;
}

body.admin-home .admin-subnav {
  top: 70px;
  gap: 0.24rem;
  margin: 0 0 0.92rem;
  padding: 0.24rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--admin-hairline);
  border-radius: 13px;
  background: rgba(238, 236, 232, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

body.admin-home .admin-subnav-link {
  min-height: 31px;
  padding: 0.34rem 0.68rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6d665f;
  font-size: 0.8rem;
  font-weight: 820;
}

body.admin-home .admin-subnav-link:hover {
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
}

body.admin-home .admin-subnav-link.active {
  background: var(--admin-surface-strong);
  color: var(--accent-strong);
  box-shadow: 0 1px 2px rgba(32, 27, 22, 0.08);
}

body.admin-home .metric,
body.admin-home .panel,
body.admin-home .status-bar,
body.admin-home .history-item,
body.admin-home .access-item,
body.admin-home .status-tile,
body.admin-home .example-card,
body.admin-home .gateway-map-item {
  border-color: rgba(24, 20, 17, 0.075);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow-soft);
  backdrop-filter: blur(18px);
}

body.admin-home .panel {
  padding: 1.04rem;
  border-radius: 14px;
}

body.admin-home .metric {
  position: relative;
  min-height: 88px;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border-radius: 14px;
}

body.admin-home .metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 90, 20, 0.72), rgba(255, 176, 0, 0.5), transparent);
  opacity: 0.72;
}

body.admin-home .metric-label {
  margin-bottom: 0.42rem;
  color: #817a73;
  font-size: 0.76rem;
  font-weight: 720;
}

body.admin-home .metric strong {
  color: #161310;
  font-size: 1.42rem;
  font-weight: 840;
  letter-spacing: 0;
}

body.admin-home .metrics {
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

body.admin-home .admin-grid {
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

body.admin-home .model-price-workbench {
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
}

body.admin-home .overview-workbench {
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
}

body.admin-home .billing-workbench {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

body.admin-home .monitoring-overview-workbench {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
}

body.admin-home .monitoring-model-probe-workbench {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

body.admin-home .monitoring-route-workbench {
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
}

body.admin-home .finance-center-metrics {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

body.admin-home .panel-head {
  align-items: center;
  margin-bottom: 0.95rem;
}

body.admin-home .panel h2 {
  color: #191612;
  font-size: 1.08rem;
  font-weight: 820;
  letter-spacing: 0;
}

body.admin-home .panel-kicker {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 860;
  letter-spacing: 0;
  text-transform: none;
}

body.admin-home .panel-subtitle {
  max-width: 780px;
  color: #7c746d;
  font-size: 0.86rem;
}

body.admin-home input,
body.admin-home textarea,
body.admin-home select {
  min-height: 38px;
  border-color: rgba(24, 20, 17, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

body.admin-home textarea {
  min-height: 108px;
}

body.admin-home .field span {
  color: #746d66;
  font-size: 0.78rem;
  font-weight: 760;
}

body.admin-home .btn,
body.admin-home .icon-btn {
  min-height: 36px;
  border-radius: 10px;
  font-weight: 820;
}

body.admin-home .btn {
  padding: 0.58rem 0.84rem;
}

body.admin-home .btn:hover:not(:disabled),
body.admin-home .icon-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(32, 27, 22, 0.1);
}

body.admin-home .btn-primary {
  background: linear-gradient(180deg, #ff6a25 0%, var(--accent) 100%);
  box-shadow: 0 10px 22px rgba(255, 90, 20, 0.18);
}

body.admin-home .btn-primary:hover {
  background: linear-gradient(180deg, #ff7130 0%, var(--accent-strong) 100%);
}

body.admin-home .btn-secondary {
  border: 1px solid rgba(63, 69, 77, 0.11);
  background: rgba(240, 242, 241, 0.92);
  color: #343a40;
}

body.admin-home .btn-ghost,
body.admin-home .icon-btn {
  border-color: rgba(24, 20, 17, 0.09);
  background: rgba(255, 255, 255, 0.54);
  color: #393530;
}

body.admin-home .btn-ghost:hover,
body.admin-home .icon-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

body.admin-home .badge {
  min-height: 28px;
  border-color: rgba(24, 20, 17, 0.075);
  background: rgba(246, 245, 243, 0.82);
  color: #675f58;
  font-size: 0.76rem;
  font-weight: 760;
}

body.admin-home .badge.configured {
  border-color: rgba(255, 90, 20, 0.18);
  background: rgba(255, 242, 235, 0.86);
  color: var(--accent-strong);
}

body.admin-home .badge.error {
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(255, 240, 238, 0.88);
}

body.admin-home .table-wrap {
  border: 1px solid rgba(24, 20, 17, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

body.admin-home .table {
  font-size: 0.86rem;
}

body.admin-home .table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom-color: rgba(24, 20, 17, 0.08);
  background: rgba(248, 247, 245, 0.96);
  color: #7d766f;
  font-size: 0.74rem;
  font-weight: 820;
}

body.admin-home .table td {
  border-bottom-color: rgba(24, 20, 17, 0.058);
}

body.admin-home .table tbody tr:hover {
  background: rgba(255, 90, 20, 0.038);
}

body.admin-home .history-item {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

body.admin-home .history-top strong,
body.admin-home .table strong {
  font-weight: 820;
}

body.admin-home .status-bar {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f5851;
  box-shadow: 0 8px 24px rgba(32, 27, 22, 0.06);
}

body.admin-home .status-bar.success {
  border-color: rgba(21, 132, 95, 0.18);
  background: rgba(237, 250, 245, 0.9);
  color: #157452;
}

body.admin-home .status-bar.error {
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(255, 246, 244, 0.92);
}

body.admin-home .gateway-flow-strip {
  border-color: rgba(255, 90, 20, 0.12);
  border-radius: 13px;
  background: rgba(255, 246, 241, 0.72);
}

body.admin-home .route-step,
body.admin-home .route-list-column,
body.admin-home .overview-primary-panel,
body.admin-home .overview-side-block,
body.admin-home .overview-account-panel,
body.admin-home .admin-workbench-hero,
body.admin-home .workbench-health-grid article,
body.admin-home .advanced-filter-card,
body.admin-home .model-price-summary-card,
body.admin-home .model-probe-summary-card,
body.admin-home .monitor-card,
body.admin-home .model-price-editor-summary article,
body.admin-home .gateway-instance-form-pane,
body.admin-home .gateway-instance-list-pane,
body.admin-home .customer-list-pane,
body.admin-home .customer-maintenance-pane,
body.admin-home .customer-maintenance-section,
body.admin-home .invite-workbench,
body.admin-home .monitoring-workbench > .panel,
body.admin-home .billing-workbench > .panel,
body.admin-home .system-settings-pane,
body.admin-home .system-audit-pane,
body.admin-home .finance-center-filter-grid,
body.admin-home .finance-center-range-grid,
body.admin-home .finance-center-upstream-controls,
body.admin-home .finance-upstream-config,
body.admin-home .finance-center-upstream-summary div,
body.admin-home .ops-config-block,
body.admin-home .gateway-test-panel,
body.admin-home .verification-collector-panel,
body.admin-home .model-price-row,
body.admin-home .billing-balance-form,
body.admin-home .billing-statement-form,
body.admin-home .system-limits-grid,
body.admin-home .model-price-form-grid .check-line {
  border-color: rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

body.admin-home .route-step-index {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 90, 20, 0.18);
}

body.admin-home .gateway-workbench {
  gap: 0.92rem;
}

body.admin-home .gateway-instance-workbench {
  gap: 0.8rem;
}

body.admin-home .gateway-instance-form-pane,
body.admin-home .gateway-instance-list-pane {
  background: rgba(255, 255, 255, 0.58);
}

body.admin-home .gateway-instance-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.36) transparent;
}

body.admin-home .overview-primary-panel {
  border-color: rgba(255, 90, 20, 0.14);
  background: rgba(255, 252, 250, 0.76);
}

body.admin-home .admin-workbench-hero {
  border-color: rgba(255, 90, 20, 0.12);
  background: rgba(255, 252, 250, 0.76);
}

body.admin-home .workbench-health-grid article {
  background: rgba(255, 255, 255, 0.62);
}

body.admin-home .workbench-health-grid article.configured {
  border-color: rgba(21, 132, 95, 0.16);
  background: rgba(239, 250, 245, 0.72);
}

body.admin-home .workbench-health-grid article.attention {
  border-color: rgba(183, 121, 31, 0.2);
  background: rgba(255, 249, 235, 0.78);
}

body.admin-home .workbench-health-grid article.error {
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(255, 244, 242, 0.8);
}

body.admin-home .overview-side-block,
body.admin-home .overview-account-panel {
  background: rgba(255, 255, 255, 0.66);
}

body.admin-home .model-price-summary-card,
body.admin-home .model-probe-summary-card {
  background: rgba(255, 255, 255, 0.72);
}

body.admin-home .model-price-summary-card:first-child,
body.admin-home .model-probe-summary-card:first-child,
body.admin-home .model-price-editor-summary article:first-child {
  border-color: rgba(255, 90, 20, 0.13);
  background: rgba(255, 252, 250, 0.76);
}

body.admin-home .route-pill {
  border-color: rgba(24, 20, 17, 0.075);
  background: rgba(246, 245, 243, 0.82);
}

body.admin-home .route-pill.configured {
  border-color: rgba(255, 90, 20, 0.18);
  background: rgba(255, 242, 235, 0.86);
}

body.admin-home .route-pill.error {
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(255, 240, 238, 0.88);
}

body.admin-home .route-pill.attention {
  border-color: rgba(183, 121, 31, 0.22);
  background: rgba(255, 248, 232, 0.88);
}

body.admin-home .overview-check-list,
body.admin-home .overview-finance-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.36) transparent;
}

body.admin-home .route-list-column {
  padding: 0.78rem;
}

body.admin-home .customer-account-workbench-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.admin-home .customer-table-wrap {
  border-color: rgba(24, 20, 17, 0.07);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

body.admin-home .customer-table-wrap thead th,
body.admin-home .ops-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(250, 249, 247, 0.96);
  backdrop-filter: blur(12px);
}

body.admin-home .customer-maintenance-section {
  background: rgba(255, 255, 255, 0.56);
}

body.admin-home .customer-maintenance-pane .action-row,
body.admin-home .invite-workbench .action-row {
  margin-top: 0.62rem;
}

body.admin-home .monitoring-workbench {
  gap: 0.9rem;
}

body.admin-home .monitoring-primary-panel {
  border-color: rgba(255, 90, 20, 0.14);
  background: rgba(255, 252, 250, 0.76);
}

body.admin-home .monitoring-config-panel,
body.admin-home .monitoring-alerts-panel,
body.admin-home .monitoring-model-health-panel,
body.admin-home .monitoring-matrix-panel,
body.admin-home .monitoring-group-routes-panel,
body.admin-home .finance-center-panel,
body.admin-home .finance-center-upstream-panel,
body.admin-home .finance-center-breakdown-panel,
body.admin-home .finance-center-record-panel,
body.admin-home .finance-center-reconcile-stack > .panel,
body.admin-home .billing-statements-panel,
body.admin-home .billing-invoices-panel,
body.admin-home .system-audit-pane {
  background: rgba(255, 255, 255, 0.66);
}

body.admin-home .finance-center-panel {
  border-color: rgba(255, 90, 20, 0.13);
  background: rgba(255, 252, 250, 0.76);
}

body.admin-home .finance-center-range-grid {
  margin-top: 0.62rem;
}

body.admin-home .finance-center-upstream-summary div {
  background: rgba(255, 255, 255, 0.58);
}

body.admin-home .finance-center-record-wrap,
body.admin-home .ops-table-wrap,
body.admin-home .monitor-card-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.36) transparent;
}

body.admin-home .billing-primary-panel,
body.admin-home .billing-balance-workbench,
body.admin-home .system-settings-pane {
  border-color: rgba(255, 90, 20, 0.12);
  background: rgba(255, 252, 250, 0.76);
}

body.admin-home .billing-scroll-list,
body.admin-home .compact-history {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 90, 20, 0.36) transparent;
}

body.admin-home .billing-balance-form,
body.admin-home .billing-statement-form,
body.admin-home .system-limits-grid {
  padding: 0.72rem;
  background: rgba(255, 255, 255, 0.52);
}

body.admin-home .billing-balance-panel .section-title,
body.admin-home .billing-statements-panel .section-title,
body.admin-home .system-settings-pane .section-title,
body.admin-home .system-audit-pane .section-title {
  margin-top: 0.78rem;
}

body.admin-home .system-workbench-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.admin-home .system-workbench-panel > .panel-head {
  padding: 0.9rem;
  border: 1px solid rgba(24, 20, 17, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
}

body.admin-home .system-placeholder-grid article {
  min-height: 92px;
  border-color: rgba(24, 20, 17, 0.07);
  background: rgba(255, 255, 255, 0.54);
}

body.admin-home .monitoring-probe-controls {
  padding: 0.72rem;
  border: 1px solid rgba(24, 20, 17, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.52);
}

body.admin-home .route-picker-list .history-item {
  cursor: default;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.68);
}

body.admin-home .route-picker-list .history-item:hover {
  border-color: rgba(255, 90, 20, 0.16);
  background: rgba(255, 250, 247, 0.9);
}

body.admin-home .route-picker-list .route-actions {
  gap: 0.32rem;
}

body.admin-home .route-picker-list .route-actions .btn {
  min-height: 30px;
  padding: 0.28rem 0.44rem;
}

body.admin-home .legacy-gateway-panel summary {
  border-radius: 12px;
}

body.admin-home .language-switcher {
  min-height: 32px;
  border-color: rgba(24, 20, 17, 0.085);
  background: rgba(238, 236, 232, 0.72);
  box-shadow: none;
}

body.admin-home .language-switcher button {
  min-height: 26px;
  font-size: 0.76rem;
}

body.admin-home .language-switcher button.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 1px 2px rgba(32, 27, 22, 0.08);
}

body.admin-home .form-grid,
body.admin-home .gateway-grid,
body.admin-home .filters,
body.admin-home .access-grid,
body.admin-home .gateway-status-grid {
  gap: 0.72rem;
}

@media (max-width: 1180px) {
  body.admin-home .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--admin-hairline);
  }

  body.admin-home .app-header {
    margin-inline: 0;
    padding-inline: 1rem;
  }

  body.admin-home .status-bar {
    position: fixed;
    top: auto;
  }

  body.admin-home .gateway-workbench {
    grid-template-columns: 1fr;
  }

  body.admin-home .gateway-instance-workbench {
    grid-template-columns: 1fr;
  }

  body.admin-home .overview-workbench,
  body.admin-home .customer-workbench,
  body.admin-home .monitoring-overview-workbench,
  body.admin-home .request-diagnostics-workbench,
  body.admin-home .monitoring-model-probe-workbench,
  body.admin-home .monitoring-route-workbench,
  body.admin-home .billing-workbench,
  body.admin-home .system-workbench,
  body.admin-home .admin-workbench-hero,
  body.admin-home .verification-grid {
    grid-template-columns: 1fr;
  }

  body.admin-home .overview-side-panel,
  body.admin-home .customer-maintenance-pane,
  body.admin-home .billing-balance-workbench {
    position: static;
  }

  body.admin-home .route-list-column {
    position: static;
    max-height: none;
  }
}

@media (max-width: 780px) {
  body.admin-home .admin-main {
    padding-inline: 0.82rem;
    padding-bottom: 7rem;
  }

  body.admin-home .app-header {
    align-items: flex-start;
  }

  body.admin-home .app-header h1 {
    font-size: 1.36rem;
  }

  body.admin-home .admin-subnav {
    width: 100%;
  }

  body.admin-home .status-bar {
    position: static;
    width: 100%;
    min-height: 42px;
    max-height: none;
    margin: 0 0 0.72rem;
    padding: 0.55rem 0.72rem;
    border-radius: 12px;
    font-size: 0.84rem;
  }

  body.admin-home .app-header {
    margin: -1.05rem -0.82rem 0.85rem;
    width: calc(100% + 1.64rem);
  }

  body.admin-home .gateway-flow-strip {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  body.admin-home .gateway-flow-strip span {
    flex: 0 0 auto;
  }

  body.admin-home .customer-list-filters,
  body.admin-home .customer-create-grid,
  body.admin-home .customer-access-grid,
  body.admin-home .invite-manager,
  body.admin-home .invite-create-grid,
  body.admin-home .gateway-instance-form-grid,
  body.admin-home .monitoring-probe-controls,
  body.admin-home .monitoring-primary-panel .ops-status-grid,
  body.admin-home .alert-config-grid,
  body.admin-home .route-config-grid,
  body.admin-home .model-price-form-grid,
  body.admin-home .model-price-summary-grid,
  body.admin-home .model-probe-summary-grid,
  body.admin-home .workbench-health-grid,
  body.admin-home .verification-run-grid,
  body.admin-home .verification-score-grid,
  body.admin-home .verification-probe-evidence,
  body.admin-home .verification-collector-grid,
  body.admin-home .model-price-editor-summary,
  body.admin-home .finance-center-metrics,
  body.admin-home .finance-center-filter-grid,
  body.admin-home .finance-center-range-grid,
  body.admin-home .finance-center-upstream-controls,
  body.admin-home .billing-balance-form,
  body.admin-home .billing-statement-form,
  body.admin-home .system-limits-grid,
  body.admin-home .system-placeholder-grid {
    grid-template-columns: 1fr;
  }

  body.admin-home .entrypoint-grid,
  body.admin-home .capability-grid,
  body.admin-home .diagnostics-detail-grid,
  body.admin-home .impact-preview-grid,
  body.admin-home .verification-process-flow {
    grid-template-columns: 1fr;
  }

  body.admin-home .verification-process-flow > i {
    display: none;
  }

  body.admin-home .customer-table-wrap {
    min-height: 260px;
    max-height: none;
  }

  body.admin-home .billing-primary-panel,
  body.admin-home .billing-primary-panel .billing-scroll-list,
  body.admin-home .system-audit-wrap {
    min-height: 0;
    max-height: none;
  }

  body.admin-home .overview-primary-panel,
  body.admin-home .overview-side-block,
  body.admin-home .overview-account-panel .account-summary-wrap {
    min-height: 0;
    max-height: none;
  }

  body.admin-home .monitoring-probe-controls .action-row {
    justify-content: flex-start;
    white-space: normal;
  }

  body.admin-home .monitor-matrix-list {
    grid-template-columns: 1fr;
  }

  body.admin-home .monitor-card-main,
  body.admin-home .monitor-card-route {
    align-items: flex-start;
    justify-content: flex-start;
  }

  body.admin-home .monitor-card-badges {
    justify-content: flex-start;
  }

  body.admin-home .admin-workbench-hero {
    padding: 0.82rem;
  }

  body.admin-home .workbench-health-grid article {
    min-height: 96px;
  }

  body.admin-home .advanced-filter-card summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .customer-auth,
  .customer-grid,
  .billing-filter-form,
  .admin-grid,
  .model-price-workbench,
  .usage-grid,
  .verification-result-grid,
  .example-grid,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .verification-lookup-form {
    grid-template-columns: 1fr;
  }

  .customer-auth {
    align-items: stretch;
  }

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

  .auth-copy {
    min-height: 560px;
  }

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

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

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .customer-sidebar {
    position: static;
    height: auto;
  }

  .side-nav,
  .customer-side-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .nav-group {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .side-nav-label {
    grid-column: 1 / -1;
  }

  .sidebar-logout {
    margin-top: 0;
  }

  body.admin-home {
    overflow: auto;
  }

  body.admin-home .admin-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body.admin-home .admin-sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  body.admin-home .admin-nav {
    overflow: visible;
  }

  body.admin-home .admin-main {
    height: auto;
    overflow: visible;
  }

  body.admin-home .status-bar {
    right: 0.75rem;
    bottom: 0.75rem;
    left: auto;
    width: min(560px, calc(100vw - 1.5rem));
  }

  body.app-home .customer-console .status-bar {
    right: 0.75rem;
    bottom: 0.75rem;
    left: auto;
    width: min(560px, calc(100vw - 1.5rem));
  }

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

  .ops-status-grid,
  .ops-config-grid {
    grid-template-columns: 1fr;
  }

  .finance-center-metrics,
  .finance-center-filter-grid,
  .finance-center-range-grid,
  .finance-center-upstream-summary,
  .finance-center-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .auth-copy h1 {
    font-size: 2.85rem;
  }

  .customer-shell {
    padding: 0;
  }

  .customer-auth {
    min-height: 100vh;
    border-radius: 0;
    padding: 0.75rem;
  }

  .auth-copy {
    min-height: 520px;
    padding: 1rem;
  }

  .auth-copy .brand-mark {
    width: 108px;
    height: 44px;
    flex: 0 0 108px;
  }

  .brand-row {
    gap: 0.65rem;
  }

  .brand-row span {
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .gateway-architecture {
    inset: 4%;
    opacity: 0.38;
  }

  .gateway-node {
    min-width: 92px;
    font-size: 0.66rem;
  }

  .gateway-node-core {
    left: 36%;
    width: 130px;
  }

  .app-header,
  .panel-head,
  .history-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .metrics,
  .form-grid,
  .gateway-grid,
  .route-builder,
  .route-form-grid,
  .route-lists,
  .playground-controls,
  .filters,
  .compact-filters,
  .gateway-map,
  .gateway-status-grid,
  .usage-bar,
  .key-card,
    .inline-form,
    .side-nav,
    .customer-side-nav,
    .nav-group,
    .admin-placeholder-grid,
    .ops-status-grid,
    .ops-config-grid,
    .ops-check-grid,
    .ops-route-binding-row,
    .model-row,
    .access-item {
    grid-template-columns: 1fr;
  }

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

  .route-link {
    min-height: 18px;
  }

  .route-link i {
    transform: rotate(90deg);
  }

  .gateway-flow-strip {
    align-items: flex-start;
  }

  .gateway-test-panel,
  .gateway-test-target {
    grid-template-columns: 1fr;
  }

  .gateway-test-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .gateway-test-actions .btn {
    width: 100%;
  }

  body.admin-home .metrics,
  body.admin-home .gateway-grid,
  body.admin-home .gateway-status-grid,
  body.admin-home .gateway-map {
    grid-template-columns: 1fr;
  }

  .model-table {
    grid-template-columns: 1fr;
  }

  .access-item .btn {
    grid-row: auto;
    grid-column: auto;
  }

  .payment-qr-box {
    grid-template-columns: 1fr;
  }

  .btn,
  .chip,
  .side-link {
    width: 100%;
  }
}

@media (max-width: 780px) {
  body.app-home {
    overflow: auto;
  }

  body.app-home .customer-console {
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  body.app-home .customer-sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    height: auto;
    max-height: none;
    padding: 0.7rem 0.85rem 0.8rem;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(222, 216, 210, 0.92);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 26px rgba(24, 20, 17, 0.08);
    backdrop-filter: blur(16px);
  }

  body.app-home .customer-sidebar .sidebar-brand {
    min-height: 44px;
    padding-bottom: 0.55rem;
    margin-bottom: 0.55rem;
  }

  body.app-home .customer-sidebar .brand-mark.compact {
    width: 58px;
    height: 36px;
    flex-basis: 58px;
    background-size: 54px 54px;
  }

  body.app-home .customer-sidebar .sidebar-brand strong {
    font-size: 0.95rem;
  }

  body.app-home .customer-sidebar .sidebar-brand span {
    font-size: 0.76rem;
  }

  body.app-home .customer-side-nav {
    display: flex;
    grid-template-columns: none;
    gap: 0.45rem;
    margin-inline: -0.85rem;
    padding: 0 0.85rem 0.1rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.app-home .customer-side-nav::-webkit-scrollbar {
    display: none;
  }

  body.app-home .customer-side-nav .nav-group-label {
    display: none;
  }

  body.app-home .customer-side-nav .side-link {
    width: auto;
    min-width: max-content;
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0.68rem 0.85rem;
    border: 1px solid rgba(222, 216, 210, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    scroll-snap-align: start;
  }

  body.app-home .customer-side-nav .side-link.active {
    border-color: rgba(255, 90, 20, 0.22);
    background: var(--accent-soft);
    box-shadow: 0 7px 16px rgba(255, 90, 20, 0.12);
  }

  body.app-home .customer-main {
    padding: 0.85rem 0.85rem 6rem;
  }

  body.app-home .customer-console .app-header {
    position: static;
    gap: 0.75rem;
  }

  body.app-home .customer-console .header-actions {
    width: 100%;
    min-width: 0;
  }

  body.app-home .customer-console .header-actions .btn {
    width: auto;
    max-width: 100%;
    min-height: 46px;
    flex: 0 1 auto;
  }

  body.app-home .customer-console .dashboard-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  body.app-home .dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  body.app-home #customerOverviewTab {
    display: flex;
    flex-direction: column;
  }

  body.app-home #customerOverviewTab .quick-card {
    order: -1;
    margin-bottom: 0.85rem;
  }
}

/* LanXen Grid public homepage. Scoped to the unauthenticated landing page only. */
html {
  scroll-behavior: smooth;
}

html:has(body.app-home) {
  scroll-behavior: auto;
}

body:has(#authView:not(.hidden)) {
  background: #050607;
}

body.public-home {
  background: #050607;
}

.customer-shell:has(.landing-page:not(.hidden)) {
  padding: 0;
  background: #050607;
}

body.public-home .customer-shell {
  padding: 0;
  min-height: 100vh;
  background: #050607;
}

.login-home {
  position: relative;
  min-height: 100vh;
  max-width: none;
  display: block;
  margin: 0;
  padding: clamp(2rem, 7vw, 6.5rem);
  border-radius: 0;
  overflow: hidden;
  color: #101723;
  background: #050607;
  isolation: isolate;
}

.login-bg-fallback,
.login-bg-video,
.login-bg-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-bg-fallback {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(250, 252, 253, 0.94) 0%, rgba(245, 248, 250, 0.78) 42%, rgba(239, 244, 247, 0.62) 100%),
    url("/static/lanxen-logo-orange.jpg?v=lanxen-fallback-20260514") center center / cover no-repeat;
  transform: scale(1.02);
}

.login-bg-video {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  opacity: 0;
  transition: opacity 420ms ease;
}

.login-home.video-ready .login-bg-video {
  opacity: 1;
}

.login-home.video-fallback .login-bg-video {
  display: none;
}

.login-bg-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 24, 29, 0.28) 0%, rgba(18, 24, 29, 0.1) 36%, rgba(18, 24, 29, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08));
}

.login-brand-card {
  position: absolute;
  top: clamp(0.45rem, 1.65vw, 1.2rem);
  left: clamp(2.4rem, 6vw, 5rem);
  right: 40%;
  bottom: clamp(2rem, 5vw, 3.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-brand-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 1.4vw, 1.35rem);
  width: min(100%, 900px);
}

.login-brand-logo {
  width: clamp(148px, 8.6vw, 188px);
  height: auto;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  object-position: left center;
  margin-left: -0.1rem;
  image-rendering: auto;
  transform: translateZ(0);
  filter:
    contrast(1.08)
    saturate(1.08)
    drop-shadow(0 2px 7px rgba(0, 0, 0, 0.2))
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.22));
}

.login-home .auth-copy {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 0.5rem;
  justify-content: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  color: #101723;
  isolation: auto;
}

.login-home .auth-copy::before,
.login-home .auth-copy::after {
  display: none;
}

.login-home .auth-copy h1 {
  max-width: none;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.16rem, 1.7vw, 1.78rem);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
}

.login-home .auth-copy p {
  max-width: 600px;
  margin: 0;
  color: #5d6876;
  font-size: 1rem;
  line-height: 1.85;
}

.login-home .auth-points {
  position: fixed;
  left: 50%;
  bottom: clamp(0.55rem, 1.8vw, 1.35rem);
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.55rem;
  width: min(calc(100vw - 2rem), 720px);
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

.login-home .auth-points span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(242, 247, 252, 0.88);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-shadow: none;
}

.login-home .auth-points svg {
  display: none;
}

.login-home .auth-panel {
  position: relative;
  width: min(420px, 100%);
  margin-left: auto;
  margin-right: clamp(1rem, 6vw, 5rem);
  margin-top: clamp(7rem, 14vh, 10rem);
  padding: 3.1rem 1rem 1rem;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 90px rgba(17, 24, 39, 0.14);
  backdrop-filter: blur(14px) saturate(1.08);
}

.login-avatar {
  position: absolute;
  top: -24px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #050607;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.14);
  transform: translateX(-50%);
}

.login-avatar svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.login-title {
  margin-bottom: 0.8rem;
  text-align: center;
  color: #171513;
  font-size: 0.78rem;
  font-weight: 900;
}

.login-home .auth-tabs {
  background: rgba(255, 255, 255, 0.18);
}

.login-home .auth-tab.active {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  text-shadow: none;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.14);
}

.login-home input {
  min-height: 46px;
  border-color: rgba(203, 213, 225, 0.9);
  background: rgba(236, 241, 248, 0.84);
}

.login-home .field span {
  color: rgba(255, 255, 255, 0.92);
}

.login-home .check-line {
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.login-home .check-line input {
  width: 16px;
  height: 16px;
  margin-top: 0;
  accent-color: var(--accent);
}

.login-home .check-line a {
  color: #ff6e2f;
}

.login-home input::placeholder {
  color: #6f7782;
}

.login-home .btn-primary {
  min-height: 44px;
}

.login-home .quiet-button {
  min-height: 44px;
  margin-top: -0.25rem;
  padding-inline: 0.1rem;
  color: rgba(255, 255, 255, 0.82);
}

.login-home .auth-tab {
  min-height: 44px;
  color: rgba(255, 255, 255, 0.72);
}

.login-home .inline-status {
  color: rgba(255, 255, 255, 0.86);
}

.landing-page {
  position: relative;
  display: block;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #050607;
  color: #f8fafc;
  isolation: isolate;
}

.landing-page > :not(.landing-bg-video):not(.landing-video-shade):not(.landing-data-layer) {
  position: relative;
  z-index: 3;
}

.landing-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0.78;
  filter: grayscale(0.22) saturate(1.08) contrast(1.06) brightness(0.78);
  pointer-events: none;
}

.landing-video-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 6, 7, 0.24) 0%, rgba(5, 6, 7, 0.58) 70%, #050607 100%),
    linear-gradient(90deg, rgba(5, 6, 7, 0.82) 0%, rgba(5, 6, 7, 0.38) 48%, rgba(5, 6, 7, 0.7) 100%);
}

.landing-data-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 78%, transparent 100%);
}

.data-thread,
.data-node {
  position: absolute;
  display: block;
}

.data-thread {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 20, 0.36), transparent);
  transform-origin: left center;
}

.data-thread::after {
  content: "";
  display: block;
  width: 140px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 176, 0, 0.7), rgba(255, 90, 20, 0.95), transparent);
  animation: landing-data-flow 6s linear infinite;
}

.data-thread-a {
  left: 8vw;
  top: 31vh;
  width: 68vw;
  transform: rotate(8deg);
}

.data-thread-b {
  right: -6vw;
  top: 54vh;
  width: 58vw;
  transform: rotate(-14deg);
}

.data-thread-c {
  left: 19vw;
  bottom: 20vh;
  width: 72vw;
  transform: rotate(-4deg);
}

.data-node {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 90, 20, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 18px rgba(255, 90, 20, 0.45);
}

.data-node-a { left: 22vw; top: 30vh; }
.data-node-b { right: 21vw; top: 48vh; }
.data-node-c { left: 55vw; bottom: 22vh; }

@keyframes landing-data-flow {
  from { transform: translateX(-160px); }
  to { transform: translateX(76vw); }
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 6, 7, 0.74);
  backdrop-filter: blur(18px);
}

.landing-brand,
.landing-menu,
.landing-actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.landing-brand {
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  min-width: 0;
}

.landing-brand img {
  width: 152px;
  height: 58px;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  padding: 0.34rem 0.48rem;
  border: 1px solid rgba(255, 90, 20, 0.28);
  background: rgba(16, 18, 19, 0.92);
}

.landing-brand span {
  display: grid;
  gap: 0.08rem;
  line-height: 1.1;
  white-space: nowrap;
}

.landing-brand strong {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 800;
}

.landing-menu {
  justify-content: center;
  gap: clamp(0.7rem, 2vw, 1.5rem);
}

.landing-menu a,
.landing-login-link,
.landing-footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.92rem;
}

.landing-menu a:hover,
.landing-login-link:hover,
.landing-footer a:hover {
  color: #fff;
}

.landing-actions {
  justify-content: flex-end;
  gap: 0.6rem;
}

.landing-login-link,
.landing-console-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.landing-console-link {
  border: 1px solid rgba(255, 90, 20, 0.58);
  background: var(--accent);
  color: #fff;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.76fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  min-height: calc(100vh - 78px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7.5rem) clamp(1rem, 4vw, 3rem) clamp(5rem, 9vw, 8rem);
}

.landing-page .auth-copy {
  min-height: 0;
  display: block;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  isolation: auto;
}

.landing-page .auth-copy::before,
.landing-page .auth-copy::after {
  display: none;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255, 132, 67, 0.92);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-kicker span {
  width: 34px;
  height: 1px;
  background: rgba(255, 90, 20, 0.86);
}

.landing-page .auth-copy h1 {
  max-width: 980px;
  margin: 1.2rem 0 1.25rem;
  color: #fff;
  font-size: clamp(3.6rem, 7.3vw, 7.4rem);
  font-weight: 900;
  line-height: 0.98;
  text-wrap: balance;
}

.landing-page .auth-copy p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 1.3vw, 1.22rem);
  line-height: 1.85;
}

.hero-actions {
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-primary,
.hero-secondary {
  min-height: 46px;
  border-radius: 6px;
  padding-inline: 1.1rem;
  text-decoration: none;
}

.hero-primary {
  background: var(--accent);
  color: #fff;
}

.hero-primary:hover {
  background: var(--accent-strong);
}

.hero-secondary {
  border-color: rgba(255, 90, 20, 0.36);
  background: rgba(255, 90, 20, 0.08);
  color: #f8fafc;
}

.hero-secondary:hover {
  background: rgba(255, 90, 20, 0.16);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 760px;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-metrics div {
  padding-top: 1rem;
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  color: #fff;
  font-size: 1.06rem;
}

.hero-metrics span {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.86rem;
}

.hero-system {
  position: relative;
  min-height: 500px;
  border: 1px solid rgba(255, 90, 20, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 56%, rgba(255, 90, 20, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(5, 6, 7, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 90px rgba(0, 0, 0, 0.34), 0 0 64px rgba(255, 90, 20, 0.08);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.hero-system::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.hero-mascot {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -4px;
  width: min(60%, 340px);
  max-height: 84%;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.42)) drop-shadow(0 0 22px rgba(255, 90, 20, 0.18));
  pointer-events: none;
}

.system-panel {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(5, 6, 7, 0.72);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(16px);
}

.system-panel-gateway {
  left: 50%;
  top: 9%;
  width: 190px;
  min-height: 58px;
  transform: translate(-50%, -50%);
  border-color: rgba(255, 90, 20, 0.58);
  color: #fff;
  box-shadow: 0 0 40px rgba(255, 90, 20, 0.18);
}

.system-panel-user { left: 6%; top: 21%; }
.system-panel-key { right: 6%; top: 25%; }
.system-panel-route { left: 6%; bottom: 20%; }
.system-panel-provider { right: 6%; bottom: 20%; }
.system-panel-log { left: 50%; bottom: 5%; transform: translateX(-50%); }

.system-line {
  position: absolute;
  z-index: 1;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform-origin: left center;
}

.system-line::after {
  content: "";
  display: block;
  width: 90px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 20, 0.95), transparent);
  animation: system-pulse 4s linear infinite;
}

.line-1 { left: 25%; top: 22%; width: 44%; transform: rotate(12deg); }
.line-2 { right: 18%; top: 34%; width: 32%; transform: rotate(-16deg); }
.line-3 { left: 22%; bottom: 31%; width: 38%; transform: rotate(-14deg); }
.line-4 { right: 17%; bottom: 26%; width: 34%; transform: rotate(12deg); }

@keyframes system-pulse {
  from { transform: translateX(-90px); }
  to { transform: translateX(420px); }
}

.login-strip,
.landing-section,
.landing-cta,
.landing-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding-right: clamp(1rem, 4vw, 3rem);
  padding-left: clamp(1rem, 4vw, 3rem);
}

.login-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.login-copy h2,
.section-heading h2,
.landing-cta h2 {
  margin: 0.8rem 0 0;
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 4.8rem);
  line-height: 1.02;
  text-wrap: balance;
}

.login-copy p,
.section-heading p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 1rem;
  line-height: 1.75;
}

.landing-page .auth-panel {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(247, 247, 245, 0.96);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.landing-page .auth-panel .btn-primary {
  background: var(--accent);
  color: #fff;
}

.landing-page .auth-panel .btn-primary:hover {
  background: var(--accent-strong);
}

.landing-page .auth-panel .auth-tab.active {
  color: #050607;
}

.landing-page .auth-panel .quiet-button:hover,
.landing-page .auth-panel .check-line a {
  color: var(--accent-strong);
}

.landing-section {
  padding-top: clamp(4rem, 9vw, 8rem);
  padding-bottom: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.section-heading {
  display: grid;
  gap: 0.5rem;
  max-width: 940px;
}

.capability-grid,
.scenario-grid,
.provider-grid,
.governance-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

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

.capability-grid article,
.scenario-grid article {
  min-height: 210px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
}

.capability-grid article i {
  color: rgba(255, 132, 67, 0.92);
}

.capability-grid h3,
.scenario-grid h3 {
  margin: 1.2rem 0 0.6rem;
  color: #fff;
  font-size: 1.2rem;
}

.capability-grid p,
.scenario-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.65;
}

.workflow-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
}

.workflow-map {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 32px minmax(160px, 1fr) 32px minmax(160px, 1fr) 32px minmax(130px, 1fr) 32px minmax(160px, 1fr) 32px minmax(170px, 1fr);
  gap: 0.7rem;
  align-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.workflow-map div {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.58);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(12px);
}

.workflow-map span {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 90, 20, 0.05), rgba(255, 90, 20, 0.78));
}

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

.provider-grid span {
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.governance-section {
  background: rgba(5, 6, 7, 0.44);
}

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

.governance-grid div {
  min-height: 170px;
  padding: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

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

.governance-grid strong {
  color: rgba(255, 132, 67, 0.82);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.88rem;
}

.governance-grid span {
  margin-top: 4.5rem;
  color: #fff;
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.35;
}

.landing-cta {
  display: grid;
  justify-items: center;
  padding-top: clamp(5rem, 10vw, 9rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.landing-cta h2 {
  max-width: 980px;
}

.landing-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

.landing-footer strong,
.landing-footer span {
  display: block;
}

.landing-footer strong {
  color: #fff;
}

.landing-footer nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.landing-footer small {
  color: rgba(255, 255, 255, 0.48);
}

@supports (animation-timeline: view()) {
  .reveal-section {
    animation: landing-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

@keyframes landing-reveal {
  from {
    opacity: 0.3;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .login-home {
    display: grid;
    gap: 1.5rem;
    align-content: center;
  }

  .login-brand-card {
    position: static;
    right: auto;
    bottom: auto;
    min-height: 0;
    gap: 1.5rem;
  }

  .login-brand-head {
    justify-content: center;
    flex-wrap: nowrap;
    max-width: calc(100vw - 2rem);
  }

  .login-home .auth-copy {
    max-width: calc(100vw - 9rem);
    justify-content: start;
  }

  .login-home .auth-copy h1 {
    text-align: left;
  }

  .login-home .auth-points {
    position: fixed;
    bottom: clamp(0.45rem, 1.9vw, 1rem);
    transform: translateX(-50%);
    width: min(calc(100vw - 2rem), 640px);
    margin: 0;
  }

  .login-home .auth-panel {
    margin: 0 auto;
  }

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

  .landing-menu {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .landing-hero,
  .login-strip {
    grid-template-columns: 1fr;
  }

  .hero-system {
    min-height: 500px;
  }

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

  .workflow-map {
    grid-template-columns: 1fr;
  }

  .workflow-map span {
    width: 1px;
    height: 28px;
    justify-self: center;
    background: linear-gradient(180deg, rgba(255, 90, 20, 0.05), rgba(255, 90, 20, 0.78));
  }

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

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

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

@media (max-width: 780px) {
  .login-home {
    padding: 4rem 1rem 2rem;
  }

  .login-brand-card {
    gap: 1.1rem;
  }

  .login-brand-logo {
    width: 118px;
  }

  .login-home .auth-copy h1 {
    width: 100%;
    max-width: calc(100vw - 9rem);
    font-size: clamp(0.86rem, 3.2vw, 1.02rem);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .login-home .auth-points {
    gap: 0.6rem;
    bottom: max(0.45rem, env(safe-area-inset-bottom));
  }

  .login-home .auth-panel {
    padding-top: 3rem;
  }

  .landing-nav {
    position: relative;
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }

  .landing-brand img {
    width: 128px;
    height: 48px;
  }

  .landing-brand span {
    white-space: normal;
  }

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

  .landing-login-link,
  .landing-console-link {
    flex: 1;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 4rem;
  }

  .landing-page .auth-copy h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 11.8vw, 3.35rem);
    line-height: 1.04;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .hero-metrics,
  .capability-grid,
  .scenario-grid,
  .provider-grid,
  .governance-grid {
    grid-template-columns: 1fr;
  }

  .hero-system {
    min-height: 440px;
  }

  .hero-mascot {
    width: min(72%, 292px);
    bottom: 0;
  }

  .system-panel {
    min-width: 126px;
    max-width: 180px;
    font-size: 0.78rem;
  }

  .system-panel-gateway {
    width: 160px;
  }

  .system-panel-user { left: 5%; top: 18%; }
  .system-panel-key { right: 4%; top: 24%; }
  .system-panel-route { left: 5%; bottom: 24%; }
  .system-panel-provider { right: 4%; bottom: 18%; }
  .system-panel-log { width: 190px; bottom: 6%; }

  .login-strip,
  .landing-section,
  .landing-cta {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .login-copy h2,
  .section-heading h2,
  .landing-cta h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .capability-grid article,
  .scenario-grid article {
    min-height: 0;
  }

  .provider-grid span {
    min-height: 76px;
  }

  .governance-grid div {
    min-height: 120px;
  }

  .governance-grid span {
    margin-top: 2.2rem;
  }
}
