:root {
  color-scheme: dark;
  --bg: #070b14;
  --panel: #101827;
  --panel2: #151f31;
  --line: #26354a;
  --muted: #91a0b6;
  --text: #eef5ff;
  --accent: #3b82f6;
  --accent2: #22d3ee;
  --good: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --surface: rgba(15, 24, 39, .94);
  --surface-strong: #111c2d;
  --surface-soft: #0b1321;
  --line-soft: rgba(148, 163, 184, .14);
  --shadow: 0 24px 70px rgba(0, 0, 0, .26);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #354760 #0a111d;
}

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

body {
  position: relative;
  background:
    radial-gradient(circle at 18% -10%, rgba(34, 211, 238, .11), transparent 31rem),
    radial-gradient(circle at 92% 4%, rgba(59, 130, 246, .15), transparent 34rem),
    linear-gradient(180deg, #080d17 0%, #070b14 100%);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .025) 1px, transparent 1px);
  background-size: 40px 40px;
  content: "";
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

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

button,
input,
select,
textarea,
summary {
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(34, 211, 238, .28);
  outline-offset: 2px;
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .2);
  font-size: 14px;
  font-weight: 750;
}

button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.ghost {
  border-color: var(--line);
  background: #162236;
  color: #d7e2f1;
  box-shadow: none;
}

.ghost:hover {
  border-color: #3b506c;
  background: #1b2a41;
}

.danger {
  border-color: rgba(251, 113, 133, .34);
  background: rgba(251, 113, 133, .1);
  color: #fda4af;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(103, 232, 249, .34);
  border-radius: 13px;
  background: linear-gradient(145deg, #2563eb, #0e7490);
  box-shadow: 0 12px 30px rgba(8, 145, 178, .25), inset 0 1px rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 19px;
}

.brand strong {
  color: #f8fbff;
  font-size: 16px;
  letter-spacing: .01em;
}

.brand small {
  color: #7f91aa;
  font-size: 12px;
}

.sidebar {
  width: 264px;
  border-right-color: rgba(148, 163, 184, .14);
  background: linear-gradient(180deg, rgba(13, 21, 35, .99), rgba(7, 12, 21, .99));
  box-shadow: 24px 0 70px rgba(0, 0, 0, .2);
}

.sidebar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), transparent 85%);
  content: "";
}

.sidebar-brand {
  flex-shrink: 0;
  height: 92px;
  padding: 0 24px;
  border-bottom-color: var(--line-soft);
}

.menu-label {
  padding: 25px 22px 10px;
  color: #60718a;
  font-size: 12px;
  letter-spacing: .11em;
}

.side-nav {
  gap: 6px;
  padding: 0 13px;
}

.sidebar-menu {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 18px;
}

.side-nav .nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-nav .nav-group-toggle {
  gap: 10px;
}

.side-nav .nav-group-toggle.has-active-child {
  color: #e6f3ff;
}

.nav-group-count {
  margin-left: auto;
  min-width: 21px;
  border-radius: 6px;
  background: rgba(148, 163, 184, .09);
  color: #91a6c2;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

.nav-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-90deg);
  transition: transform .2s ease;
}

.is-expanded .nav-chevron {
  transform: rotate(0);
}

.nav-submenu {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  opacity: 0;
  transition: grid-template-rows .2s ease, opacity .2s ease, visibility .2s;
}

.is-expanded .nav-submenu {
  grid-template-rows: 1fr;
  visibility: visible;
  opacity: 1;
}

.nav-submenu-inner {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding-left: 25px;
}

.nav-submenu-inner::before {
  position: absolute;
  top: 5px;
  bottom: 9px;
  left: 27px;
  width: 1px;
  background: #24354d;
  content: "";
}

.side-nav .nav-submenu button {
  min-height: 39px;
  margin-top: 3px;
  gap: 11px;
  padding: 7px 12px 7px 17px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}

.side-nav .nav-submenu button.active {
  border-color: rgba(56, 189, 248, .18);
  background: rgba(56, 189, 248, .1);
  color: #b9ebff;
  box-shadow: inset 2px 0 #38bdf8;
  font-weight: 650;
}

.nav-channel-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #8da1bd;
}

.nav-channel-dot.channel-adobe { background: #7aaeff; }
.nav-channel-dot.channel-adobe-free { background: #6ed5ab; }
.nav-channel-dot.channel-loova { background: #b99bff; }
.nav-channel-dot.channel-genspark { background: #f2c478; }

.nav-divider {
  height: 1px;
  margin: 10px 12px;
  background: var(--line-soft);
}

.side-nav button {
  position: relative;
  min-height: 48px;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #9dabc0;
  font-size: 14px;
  font-weight: 650;
}

.side-nav button:hover {
  border-color: rgba(148, 163, 184, .12);
  background: rgba(30, 45, 68, .7);
  color: #eff6ff;
}

.side-nav button.active {
  border-color: rgba(59, 130, 246, .26);
  background: linear-gradient(100deg, rgba(37, 99, 235, .2), rgba(8, 145, 178, .1));
  color: #fff;
  box-shadow: inset 3px 0 #38bdf8;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-color: #2c3d55;
  border-radius: 10px;
  background: #111c2d;
  color: #8bdcf1;
  font-size: 12px;
}

.side-nav button.active .nav-icon {
  border-color: rgba(103, 232, 249, .34);
  background: linear-gradient(145deg, rgba(37, 99, 235, .34), rgba(8, 145, 178, .24));
}

.sidebar-bottom {
  flex-shrink: 0;
  padding: 16px;
  border-top-color: var(--line-soft);
  background: rgba(7, 12, 21, .48);
}

.sidebar-health {
  padding: 10px 11px;
}

.sidebar-health > div,
.sidebar-user > div {
  min-width: 0;
}

#sidebarChannel {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-health strong,
.sidebar-user strong {
  font-size: 13px;
}

.sidebar-health small,
.sidebar-user small,
.sidebar-user button {
  font-size: 12px;
}

.sidebar-user {
  grid-template-columns: 38px 1fr auto;
  border-color: var(--line-soft);
  border-radius: 13px;
  background: #101a2a;
  padding: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid #31435c;
  border-radius: 11px;
  background: #17243a;
  color: #a5e7f5;
  font-size: 13px;
}

.app-main {
  width: min(1500px, calc(100% - 324px));
  margin-left: max(294px, calc(50% - 618px));
  padding: 42px 0 84px;
}

.page-location {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: #768aa6;
  font-size: 12px;
}

.page-location strong {
  color: #c5d4e7;
  font-weight: 550;
}

.page-location [hidden] {
  display: none;
}

.page-view.active {
  animation: page-enter .22s ease-out;
}

@keyframes page-enter {
  from { opacity: .2; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  color: #67e8f9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
}

.accounts-heading {
  margin-bottom: 22px;
}

.accounts-heading h1 {
  margin: 8px 0 7px;
  color: #f8fbff;
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 780;
  letter-spacing: -.035em;
}

.accounts-heading p {
  max-width: 820px;
  color: var(--muted);
  font-size: 15px;
}

.panel {
  border-color: var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17, 28, 45, .96), rgba(11, 19, 32, .96));
  box-shadow: var(--shadow);
}

.panel-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head > span {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 11px;
  background: rgba(14, 116, 144, .18);
  color: #8be7f4;
  font-size: 14px;
}

.panel h2,
.section-title h2 {
  color: #f3f7fd;
  font-size: 20px;
}

.panel p,
.section-title p {
  color: var(--muted);
  font-size: 13px;
}

label {
  color: #c8d3e2;
  font-size: 14px;
}

input,
select,
textarea {
  min-height: 44px;
  border-color: #304158;
  border-radius: 11px;
  background: #091321;
  color: #edf5ff;
  font-size: 14px;
}

input::placeholder,
textarea::placeholder {
  color: #5f7088;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #405673;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .13);
}

.accounts-import {
  position: relative;
  margin-bottom: 18px;
  overflow: hidden;
}

.accounts-import::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent2), var(--accent), transparent 90%);
  content: "";
}

.accounts-import textarea {
  min-height: 128px;
}

.accounts-import > button {
  min-width: 180px;
}

.account-import-progress {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: 13px;
  background: rgba(56, 189, 248, .08);
}

.account-import-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-import-progress strong,
.account-import-progress span {
  font-size: 12px;
}

.account-import-progress span {
  color: #dec2ff;
  font-variant-numeric: tabular-nums;
}

.account-import-progress small {
  color: var(--muted);
  font-size: 11px;
}

.account-import-progress progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #282332;
}

.account-import-progress progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #282332;
}

.account-import-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .3s ease;
}

.account-import-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.account-import-progress.is-complete {
  border-color: rgba(73, 212, 157, .28);
  background: rgba(73, 212, 157, .08);
}

.account-import-progress.is-complete span {
  color: #9beacb;
}

.account-import-progress.is-failed {
  border-color: rgba(255, 107, 126, .3);
  background: rgba(255, 107, 126, .08);
}

.account-import-progress.is-failed span {
  color: #ffadba;
}

.json-upload {
  border-color: #344861;
  border-radius: 13px;
  background: rgba(9, 19, 33, .72);
}

.feedback,
.alert {
  border-radius: 11px;
  font-size: 13px;
}

.accounts-heading .auto-refresh-status {
  min-height: 32px;
  margin-top: 12px;
  padding: 5px 11px;
  border-color: rgba(52, 211, 153, .25);
  background: rgba(52, 211, 153, .08);
  color: #78e1b8;
  font-size: 12px;
}

.accounts-panel {
  min-height: 360px;
}

.section-title {
  align-items: flex-start;
}

.genspark-account-summary,
.stats-log-metrics,
.settings-status-grid {
  gap: 12px;
}

.genspark-account-summary article,
.stats-log-metrics article,
.settings-status-grid article {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  border-color: var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(145deg, #142035, #0c1524);
}

.genspark-account-summary article::before,
.stats-log-metrics article::before,
.settings-status-grid article::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, .75), transparent 70%);
  content: "";
}

.genspark-account-summary span,
.genspark-account-summary small,
.stats-log-metrics span,
.stats-log-metrics small,
.settings-status-grid span,
.settings-status-grid small {
  color: #8fa0b7;
  font-size: 12px;
}

.genspark-account-summary strong,
.stats-log-metrics strong,
.settings-status-grid strong {
  color: #f3f8ff;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.settings-status-grid .resource-card strong {
  margin-bottom: 8px;
}

.resource-meter {
  width: 100%;
  height: 6px;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .13);
}

.resource-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
  box-shadow: 0 0 12px rgba(56, 189, 248, .35);
  transition: width .35s ease;
}

.resource-card:nth-child(3) .resource-meter i {
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  box-shadow: 0 0 12px rgba(52, 211, 153, .3);
}

.resource-card:nth-child(4) .resource-meter i {
  background: linear-gradient(90deg, #a78bfa, #818cf8);
  box-shadow: 0 0 12px rgba(167, 139, 250, .3);
}

.cluster-node-section {
  margin-top: 22px;
}

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

.cluster-node-head h4 {
  margin: 3px 0 0;
  color: #f3f8ff;
  font-size: 17px;
}

.cluster-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.cluster-node-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: linear-gradient(145deg, #111d2f, #0a1422);
}

.cluster-node-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #64748b;
  content: "";
}

.cluster-node-card.is-healthy::before {
  background: linear-gradient(90deg, #34d399, #22d3ee, transparent 82%);
}

.cluster-node-card.is-degraded::before {
  background: linear-gradient(90deg, #f5b83b, transparent 82%);
}

.cluster-node-card.is-offline::before {
  background: linear-gradient(90deg, #fb7185, transparent 82%);
}

.cluster-node-card.is-stopped::before {
  background: linear-gradient(90deg, #60a5fa, #818cf8, transparent 82%);
}

.cluster-node-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cluster-node-title > div {
  display: grid;
  gap: 2px;
}

.cluster-node-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.cluster-node-power {
  min-width: 58px;
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.cluster-node-title strong {
  color: #f3f8ff;
  font-size: 15px;
}

.cluster-node-title small,
.cluster-node-metrics span,
.cluster-node-metrics small,
.cluster-node-foot {
  color: #8fa0b7;
  font-size: 11px;
}

.cluster-node-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.cluster-node-metrics > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, .1);
  border-radius: 11px;
  background: rgba(7, 15, 27, .62);
}

.cluster-node-metrics strong {
  display: block;
  margin: 4px 0 6px;
  color: #f3f8ff;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.node-resource-progress {
  display: block;
  width: 100%;
  height: 4px;
  margin-bottom: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, .13);
  appearance: none;
}

.node-resource-progress::-webkit-progress-bar {
  background: rgba(148, 163, 184, .13);
}

.node-resource-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.node-resource-progress.memory::-webkit-progress-value {
  background: linear-gradient(90deg, #34d399, #2dd4bf);
}

.node-resource-progress.disk::-webkit-progress-value {
  background: linear-gradient(90deg, #a78bfa, #818cf8);
}

.node-resource-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.node-resource-progress.memory::-moz-progress-bar {
  background: linear-gradient(90deg, #34d399, #2dd4bf);
}

.node-resource-progress.disk::-moz-progress-bar {
  background: linear-gradient(90deg, #a78bfa, #818cf8);
}

.cluster-node-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 13px;
}

.cluster-node-error,
.cluster-node-power-state,
.cluster-node-empty {
  display: grid;
  min-height: 110px;
  place-items: center;
  color: #fda4af;
  font-size: 13px;
  text-align: center;
}

.cluster-node-power-state {
  align-content: center;
  gap: 7px;
  color: #93c5fd;
}

.cluster-node-power-state strong,
.cluster-node-power-state small {
  display: block;
}

.cluster-node-power-state small {
  max-width: 220px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cluster-node-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-soft);
  border-radius: 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .cluster-node-grid {
    grid-template-columns: 1fr;
  }
}

.runtime-summary-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  gap: 10px;
  margin-top: 18px;
}

.runtime-summary-bar > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(8, 16, 28, .76);
}

.runtime-summary-bar span,
.runtime-summary-bar small {
  color: var(--muted);
  font-size: 12px;
}

.runtime-summary-bar strong {
  color: #eef6ff;
  font-size: 14px;
  text-align: right;
}

.runtime-summary-bar small {
  grid-column: 2 / -1;
}

.runtime-summary-dot {
  grid-row: 1 / 3;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, .08);
}

.daily-generation-section {
  margin-top: 22px;
}

.runtime-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.runtime-block-head h4 {
  margin: 3px 0 0;
  color: #f3f8ff;
  font-size: 17px;
}

.runtime-block-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.daily-generation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.daily-generation-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #0b1422;
}

.daily-generation-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #38bdf8;
  content: "";
}

.daily-generation-card.is-total {
  background: linear-gradient(145deg, rgba(14, 116, 144, .2), #0b1422 72%);
}

.daily-generation-card.is-total::before {
  background: linear-gradient(90deg, #34d399, #22d3ee);
}

.daily-generation-card > span,
.daily-generation-card p {
  color: var(--muted);
  font-size: 11px;
}

.daily-generation-card strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
  color: #f3f8ff;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.daily-generation-card strong small {
  color: var(--muted);
  font-size: 11px;
}

.daily-generation-card p {
  margin: 6px 0 0;
  white-space: nowrap;
}

.daily-generation-card p b {
  color: #fda4af;
}

@media (max-width: 1080px) {
  .cluster-node-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .runtime-summary-bar,
  .cluster-node-grid {
    grid-template-columns: 1fr;
  }
}

.account-toolbar,
.stats-log-filter-bar {
  border-color: var(--line-soft);
  border-radius: 13px;
  background: rgba(8, 16, 28, .76);
  padding: 12px;
}

.account-toolbar > span,
.account-search > span,
.account-status-filter > span,
.stats-log-filter-bar label > span {
  color: var(--muted);
  font-size: 12px;
}

.account-search input,
.account-status-filter select,
.stats-log-filter-bar select,
.stats-log-filter-bar input,
.stats-log-filter-bar button {
  min-height: 40px;
  font-size: 13px;
}

.table-wrap {
  border-color: var(--line-soft);
  border-radius: 13px;
  background: #0b1422;
}

table {
  background: #0b1422;
}

th,
td {
  padding: 12px 13px;
  border-bottom-color: rgba(148, 163, 184, .1);
  font-size: 13px;
}

th {
  background: #121e30;
  color: #8fa0b7;
  font-size: 12px;
  letter-spacing: .05em;
}

td {
  color: #d6e0ee;
}

tbody tr {
  transition: background-color .16s ease;
}

tbody tr:hover {
  background: rgba(56, 189, 248, .045);
}

.account-table td > small,
.account-table td > code,
.stats-log-table td > small,
.stats-log-preview,
.stats-log-account {
  font-size: 12px;
}

.account-table td > code,
.copy-row code,
.copy-row input {
  color: #9edff1;
}

.status {
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
}

.status.active,
.status.completed,
.status.available,
.status.assigned,
.status.channel-adobe_free {
  border-color: rgba(52, 211, 153, .22);
  background: rgba(52, 211, 153, .09);
  color: #7ce4bd;
}

.status.queued,
.status.running,
.status.polling,
.status.unverified,
.status.channel-adobe {
  border-color: rgba(56, 189, 248, .22);
  background: rgba(56, 189, 248, .09);
  color: #8bdcf1;
}

.status.risk_control,
.status.rate_limited,
.status.cooldown,
.status.daily_limited {
  border-color: rgba(251, 191, 36, .22);
  background: rgba(251, 191, 36, .08);
  color: #fcd56a;
}

.status.invalid,
.status.failed,
.status.exhausted,
.status.expired,
.status.unavailable {
  border-color: rgba(251, 113, 133, .22);
  background: rgba(251, 113, 133, .08);
  color: #fda4af;
}

.account-pagination,
.stats-log-pagination {
  color: var(--muted);
  font-size: 12px;
}

.live-task-panel,
.queue-panel,
.api-summary > article,
.api-doc-grid > article,
.settings-list,
.model-create-panel,
.model-route-list {
  border-color: var(--line-soft);
  background: #0b1422;
}

.live-task-head,
.queue-head,
.code-head {
  border-bottom-color: var(--line-soft);
  background: #131f31;
}

.live-task-head strong,
.queue-head strong,
.code-head strong {
  font-size: 13px;
}

.live-task-head small,
.queue-head span,
.live-task-meta,
.live-log-head strong,
.live-log-head span,
.live-log-row,
.queue-copy > span,
.queue-copy .countdown {
  font-size: 12px;
}

.queue-item,
.live-task-card {
  border-bottom-color: var(--line-soft);
  background: #0c1625;
}

.queue-copy strong,
.live-task-title strong,
.live-task-prompt {
  font-size: 13px;
}

.live-task-prompt,
.live-log-list,
.stats-log-detail {
  border-color: var(--line-soft);
  background: #07101c;
}

.api-summary > article > span,
.api-note,
.copy-row code,
.copy-row input {
  font-size: 13px;
}

.api-note,
.settings-note {
  border-color: rgba(56, 189, 248, .2);
  background: rgba(14, 116, 144, .08);
  color: #9eacc0;
  font-size: 13px;
}

.api-note strong {
  color: #8be7f4;
}

.api-doc-grid pre,
.stats-log-detail {
  color: #c5d2e3;
  font-size: 12px;
}

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

.api-key-manager {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.api-key-create-card,
.api-key-list-card {
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #0b1422;
}

.api-key-create-card {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.2fr);
  align-items: center;
  gap: 16px 24px;
  padding: 18px;
}

.api-key-create-card strong,
.api-key-create-card small,
.api-key-list-head strong,
.api-key-list-head small,
.api-key-identity strong,
.api-key-identity small {
  display: block;
}

.api-key-create-card strong,
.api-key-list-head strong,
.api-key-identity strong {
  color: #eef6ff;
  font-size: 14px;
}

.api-key-create-card small,
.api-key-list-head small,
.api-key-identity small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.api-key-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.api-key-create-row input,
.api-key-create-row button {
  min-height: 42px;
}

.api-key-create-row button {
  width: auto;
  min-width: 110px;
}

.api-key-create-card .feedback {
  grid-column: 1 / -1;
  margin: 0;
}

.api-key-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #131f31;
}

.api-key-list {
  display: grid;
}

.api-key-item {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(480px, 1.35fr);
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #0c1625;
}

.api-key-item:last-child {
  border-bottom: 0;
}

.api-key-identity > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-key-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.api-key-value input {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #9edff1;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 900px) {
  .api-section .api-summary,
  .api-key-create-card,
  .api-key-item {
    grid-template-columns: 1fr;
  }

  .api-key-value {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }
}

@media (max-width: 620px) {
  .api-key-create-row,
  .api-key-value {
    grid-template-columns: 1fr 1fr;
  }

  .api-key-create-row input,
  .api-key-value input {
    grid-column: 1 / -1;
  }

  .api-key-create-row button,
  .api-key-value button {
    width: 100%;
  }
}

.settings-tabs {
  position: sticky;
  top: 14px;
  z-index: 12;
  gap: 6px;
  margin-top: 20px;
  padding: 6px;
  border-color: rgba(148, 163, 184, .16);
  border-radius: 13px;
  background: rgba(10, 18, 31, .86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .2);
  backdrop-filter: blur(16px);
}

.settings-tab {
  min-width: 138px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #91a0b6;
  font-size: 13px;
}

.settings-tab:hover {
  border-color: rgba(148, 163, 184, .12);
  background: #142135;
}

.settings-tab.active {
  border-color: rgba(56, 189, 248, .22);
  background: linear-gradient(100deg, rgba(37, 99, 235, .24), rgba(8, 145, 178, .16));
  box-shadow: inset 0 -2px #38bdf8;
}

.settings-tab b {
  background: #21324a;
  color: #a5e7f5;
  font-size: 12px;
}

.settings-config-group {
  padding-top: 24px;
}

.settings-group-head h3 {
  color: #f3f8ff;
  font-size: 20px;
}

.settings-group-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settings-control-list {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  border: 0;
}

.settings-control-row,
.channel-priority-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(145deg, #111d2f, #0b1524);
  padding: 15px;
}

.settings-control-row {
  grid-template-columns: minmax(260px, 1fr) 72px 190px 80px 126px;
  min-height: 78px;
}

.settings-control-row.global-execution-row {
  grid-template-columns: minmax(220px, 1fr) 64px minmax(140px, 190px) 80px minmax(140px, max-content);
}

.settings-control-copy strong,
.settings-control-copy code {
  color: #eef5ff;
  font-size: 14px;
}

.settings-control-copy small,
.settings-control-row label {
  color: var(--muted);
  font-size: 12px;
}

.settings-control-row select,
.settings-control-row input,
.settings-control-row button {
  min-height: 42px;
  font-size: 13px;
}

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

.autoscale-overview article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: linear-gradient(145deg, #111d2f, #0b1524);
}

.autoscale-overview span,
.autoscale-overview small,
.autoscale-overview strong {
  display: block;
}

.autoscale-overview span,
.autoscale-overview small {
  color: var(--muted);
  font-size: 12px;
}

.autoscale-overview strong {
  margin: 8px 0 2px;
  color: #f3f8ff;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.autoscale-overview strong.is-enabled {
  color: var(--good);
}

.autoscale-config-card {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #0b1524;
  overflow: hidden;
}

.autoscale-master-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 0;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.autoscale-master-switch > span:first-child strong,
.autoscale-master-switch > span:first-child small {
  display: block;
}

.autoscale-master-switch > span:first-child strong,
.autoscale-key-copy strong,
.autoscale-node-head strong {
  color: #eef5ff;
  font-size: 14px;
}

.autoscale-master-switch > span:first-child small,
.autoscale-key-copy small,
.autoscale-node-head small,
.autoscale-threshold-grid label > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
}

.switch-control input {
  position: absolute;
  inset: 0 auto 0 0;
  width: 48px;
  height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-control i {
  position: relative;
  width: 48px;
  height: 26px;
  border: 1px solid #40506a;
  border-radius: 999px;
  background: #17243a;
  transition: .18s ease;
}

.switch-control i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9aabc1;
  transition: .18s ease;
}

.switch-control input:checked + i {
  border-color: rgba(73, 212, 157, .55);
  background: rgba(73, 212, 157, .22);
}

.switch-control input:checked + i::after {
  left: 25px;
  background: var(--good);
}

.switch-control input:focus-visible + i {
  outline: 3px solid rgba(56, 189, 248, .28);
  outline-offset: 2px;
}

.switch-control b {
  min-width: 48px;
  color: #c9d4e4;
  font-size: 12px;
}

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

.autoscale-threshold-grid {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.autoscale-threshold-grid label,
.autoscale-key-grid label {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #081321;
}

.autoscale-threshold-grid label > span,
.autoscale-key-grid label > span {
  display: block;
  color: #e4edf9;
  font-size: 13px;
  font-weight: 750;
}

.threshold-input {
  position: relative;
  margin-top: 12px;
}

.threshold-input input {
  min-height: 46px;
  padding-right: 42px;
  font-size: 17px;
  font-weight: 800;
}

.threshold-input b {
  position: absolute;
  top: 50%;
  right: 15px;
  color: #8bdcf1;
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.autoscale-key-section {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.autoscale-node-section {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.autoscale-node-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.autoscale-node-head strong,
.autoscale-node-head small {
  display: block;
}

.autoscale-node-labels,
.autoscale-node-row {
  display: grid;
  grid-template-columns: minmax(130px, .85fr) minmax(210px, 1.35fr) minmax(145px, .9fr) minmax(90px, .55fr) 66px;
  gap: 9px;
  align-items: end;
}

.autoscale-node-labels {
  margin: 15px 1px 6px;
  color: var(--muted);
  font-size: 11px;
}

.autoscale-node-row {
  margin-top: 8px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #081321;
}

.autoscale-node-row label {
  margin: 0;
}

.autoscale-node-row label > span {
  display: none;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.autoscale-node-row input {
  min-height: 42px;
}

.autoscale-node-remove {
  min-height: 42px;
}

.autoscale-key-copy strong,
.autoscale-key-copy small {
  display: block;
}

.autoscale-key-grid {
  margin-top: 12px;
}

.autoscale-key-grid input {
  min-height: 44px;
  margin-top: 7px;
}

.autoscale-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 15px 18px;
}

.autoscale-save-row .feedback {
  flex: 1 1 auto;
  margin: 0;
}

.autoscale-save-row button {
  width: auto;
  min-width: 200px;
}

.autoscale-log-section {
  margin-top: 24px;
}

.autoscale-log-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.autoscale-log-head h4 {
  margin: 4px 0 0;
  color: #f3f8ff;
  font-size: 17px;
}

.autoscale-log-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.autoscale-log-table {
  min-width: 720px;
  table-layout: fixed;
}

.autoscale-log-table th:nth-child(1) { width: 19%; }
.autoscale-log-table th:nth-child(2) { width: 15%; }
.autoscale-log-table th:nth-child(3) { width: 18%; }
.autoscale-log-table th:nth-child(4) { width: 48%; }

.autoscale-action {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #c4cfde;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.autoscale-action.started { background: rgba(73, 212, 157, .11); color: #74dcaf; }
.autoscale-action.stopped { background: rgba(56, 189, 248, .12); color: #7dd3fc; }
.autoscale-action.failed { background: rgba(255, 107, 126, .11); color: #ff8fa0; }
.autoscale-action.changed { background: rgba(56, 189, 248, .13); color: #8bdcf1; }

.channel-priority-item {
  min-height: 50px;
  border-color: var(--line-soft);
  border-radius: 11px;
  background: #0b1625;
}

.channel-priority-item label,
.channel-priority-toggle,
.model-check,
.model-channel-options label {
  font-size: 13px;
}

.channel-priority-item b {
  background: rgba(56, 189, 248, .12);
  color: #8bdcf1;
  font-size: 12px;
}

.channel-balance-controls input[type="number"] {
  border-color: var(--line-soft);
  background: #08111e;
}

.model-create-panel,
.model-route-list {
  border-radius: 14px;
}

.model-create-summary,
.model-route-summary {
  min-height: 60px;
}

.model-create-summary:hover,
.model-route-summary:hover {
  background: #142034;
}

.model-create-icon {
  background: linear-gradient(145deg, rgba(37, 99, 235, .32), rgba(8, 145, 178, .26));
  color: #a5f3fc;
}

.model-create-summary small,
.model-route-identity small,
.model-list-head span,
.model-expand-hint,
.model-channel-fieldset legend,
.model-channel-fieldset small {
  font-size: 12px;
}

.model-route-identity code,
.model-list-head strong {
  color: #eaf3ff;
  font-size: 13px;
}

.model-route-body,
.model-create-body {
  border-top-color: var(--line-soft);
  background: #091321;
}

.model-form-grid input,
.model-form-grid select {
  min-height: 42px;
  font-size: 13px;
}

.model-channel-fieldset {
  border-color: var(--line-soft);
  background: rgba(17, 28, 45, .6);
}

.model-capability-row {
  border-color: var(--line-soft);
  background: rgba(11, 23, 39, .72);
}

.model-capability-row:not(.is-disabled):hover {
  border-color: #385276;
  background: rgba(19, 36, 59, .82);
}

.model-capability-channel span {
  color: #e3edfb;
}

.settings-list > div {
  border-bottom-color: var(--line-soft);
  padding: 16px 18px;
}

.settings-list span,
.settings-list strong {
  font-size: 13px;
}

.proxy-settings-dialog {
  border-color: #304158;
  border-radius: 18px;
  background: #101a2a;
}

.proxy-settings-dialog::backdrop {
  background: rgba(2, 6, 13, .76);
  backdrop-filter: blur(7px);
}

.proxy-dialog-description,
.proxy-enabled-toggle small,
.proxy-current-status {
  font-size: 12px;
}

.proxy-enabled-toggle {
  border-color: var(--line-soft);
  background: #0b1422;
}

.toast {
  border-color: #344861;
  border-radius: 12px;
  background: #142136;
  color: #edf5ff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  font-size: 13px;
}

.login-page {
  background:
    radial-gradient(circle at 50% -10%, rgba(34, 211, 238, .14), transparent 30rem),
    radial-gradient(circle at 100% 100%, rgba(37, 99, 235, .16), transparent 28rem),
    #070b14;
}

.login-shell {
  max-width: 440px;
}

.login-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(148, 163, 184, .18);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(18, 30, 49, .98), rgba(9, 16, 28, .98));
  box-shadow: 0 40px 120px rgba(0, 0, 0, .52);
}

.login-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #22d3ee, transparent);
  content: "";
}

.login-brand {
  margin-bottom: 36px;
}

.login-copy h1 {
  margin: 8px 0 22px;
  font-size: 38px;
}

.login-form {
  gap: 16px;
}

.login-form button {
  min-height: 46px;
}

.login-note {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .app-main {
    width: calc(100% - 306px);
    margin-left: 286px;
  }

  .settings-control-row {
    grid-template-columns: minmax(230px, 1fr) 64px 160px 72px 116px;
  }

  .settings-control-row.global-execution-row {
    grid-template-columns: minmax(210px, 1fr) 64px minmax(140px, 180px) 80px;
  }

  .global-execution-row > .status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1000px) {
  .autoscale-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-control-row {
    grid-template-columns: minmax(0, 1fr) 170px 76px auto;
  }

  .settings-control-row > label {
    display: none;
  }

  .settings-control-row.global-execution-row {
    grid-template-columns: minmax(0, 1fr) 80px;
  }

  .global-execution-row .settings-control-copy,
  .global-execution-row > .status {
    grid-column: 1 / -1;
  }

  .global-execution-row > input {
    grid-column: 1;
  }

  .global-execution-row > button {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-backdrop:hover {
    transform: none;
  }

  .page-location {
    display: none;
  }
  .sidebar {
    width: min(288px, 88vw);
  }

  .app-main {
    width: 100%;
    margin: 0;
    padding: 0 24px 64px;
  }

  .mobile-topbar {
    height: 72px;
    margin: 0 -24px 32px;
    padding: 0 24px;
    border-bottom-color: var(--line-soft);
    background: rgba(8, 14, 24, .88);
    backdrop-filter: blur(18px);
  }

  .mobile-topbar strong {
    font-size: 14px;
  }

  .mobile-topbar small,
  .mobile-health {
    font-size: 12px;
  }

  .menu-toggle {
    border-color: var(--line);
    background: #142136;
  }

  .settings-tabs {
    top: 82px;
  }
}

@media (max-width: 700px) {
  .accounts-heading h1 {
    font-size: 34px;
  }

  .panel {
    padding: 19px;
  }

  .settings-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .settings-tab {
    flex: 0 0 auto;
    min-width: 118px;
  }

  .settings-group-head {
    display: block;
  }

  .settings-group-head p {
    margin-top: 7px;
    text-align: left;
  }

  .settings-control-row {
    grid-template-columns: minmax(0, 1fr) 76px;
    padding: 14px;
  }

  .settings-control-copy,
  .settings-control-row > .status {
    grid-column: 1 / -1;
  }

  .settings-control-row > .status {
    justify-self: start;
  }

  .channel-priority-card {
    grid-template-columns: 1fr;
  }

  .channel-priority-toggle,
  .channel-priority-footer {
    justify-content: flex-start;
  }

  .channel-priority-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .autoscale-master-switch,
  .autoscale-log-head,
  .autoscale-save-row,
  .autoscale-node-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .autoscale-threshold-grid,
  .autoscale-key-grid {
    grid-template-columns: 1fr;
  }

  .autoscale-node-labels {
    display: none;
  }

  .autoscale-node-row {
    grid-template-columns: 1fr;
  }

  .autoscale-node-row label > span {
    display: block;
  }

  .autoscale-save-row button {
    width: 100%;
  }

  .autoscale-log-head button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .app-main {
    padding: 0 14px 52px;
  }

  .autoscale-overview {
    grid-template-columns: 1fr;
  }

  .mobile-topbar {
    margin: 0 -14px 24px;
    padding: 0 14px;
  }

  .accounts-heading h1 {
    font-size: 31px;
  }

  .accounts-heading p {
    font-size: 14px;
  }

  .panel {
    padding: 16px;
    border-radius: 15px;
  }

  .login-card {
    padding: 25px 21px;
  }

  .login-copy h1 {
    font-size: 34px;
  }
}

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

.nav-badge {
  min-width: 26px;
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 999px;
  background: rgba(56, 189, 248, .08);
  color: #8bdcf1;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.models-section {
  min-height: calc(100vh - 84px);
}

.models-section-head {
  align-items: center;
}

.models-section-head h2 {
  margin: 4px 0;
  color: #f3f8ff;
  font-size: 20px;
}

#modelsSection {
  min-height: 0;
}

#modelsSection .model-create-surface {
  position: static;
}

.models-page-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.model-search-field {
  width: min(300px, 32vw);
  margin: 0;
}

.model-search-field span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.model-search-field input {
  min-height: 42px;
  margin: 0;
}

.models-layout {
  display: grid;
  grid-template-columns: minmax(320px, .72fr) minmax(520px, 1.5fr);
  gap: 16px;
  align-items: start;
  margin-top: 22px;
}

.model-create-surface,
.model-list-surface {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(17, 29, 47, .84), rgba(8, 17, 30, .88));
}

.model-create-surface {
  position: sticky;
  top: 18px;
}

.model-column-heading,
.model-list-surface > .model-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 2px 12px;
}

.model-column-heading h3 {
  margin: 3px 0 0;
  color: #f3f8ff;
  font-size: 18px;
}

.model-column-heading > span,
.model-list-surface > .model-list-head small,
.model-list-surface > .model-list-head span {
  color: var(--muted);
  font-size: 12px;
}

.model-list-surface > .model-list-head strong {
  color: #f3f8ff;
  font-size: 15px;
}

.model-list-surface > .model-list-head b {
  color: #8bdcf1;
  font-variant-numeric: tabular-nums;
}

.models-layout .model-create-panel,
.models-layout .model-route-list {
  margin-top: 0;
}

.model-create-surface .model-form-grid {
  grid-template-columns: 1fr;
}

.model-create-surface .model-create-body {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.model-create-surface .model-form-actions button:first-of-type {
  width: 100%;
  margin-left: 0;
}

.model-list-surface .model-route-list {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.model-list-surface .model-route-card[hidden] {
  display: none;
}

.model-filter-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  margin-top: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.models-guidance {
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(56, 189, 248, .14);
  border-radius: 12px;
  background: rgba(8, 145, 178, .055);
}

.models-guidance strong {
  color: #a5e7f5;
  font-size: 13px;
}

.models-guidance p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.upstream-layout {
  display: grid;
  grid-template-columns: minmax(310px, .72fr) minmax(520px, 1.28fr);
  gap: 18px;
  align-items: start;
}

.upstream-create-panel {
  position: sticky;
  top: 18px;
}

.upstream-form-grid {
  display: grid;
  gap: 13px;
}

.upstream-create-panel > button {
  margin-top: 16px;
}

.upstream-create-panel .feedback {
  margin: 15px 0 0;
}

.upstream-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.upstream-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #0b1422;
}

.upstream-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.upstream-card > summary::-webkit-details-marker {
  display: none;
}

.upstream-card > summary:hover {
  background: #142034;
}

.upstream-card > summary > div:first-child {
  min-width: 0;
}

.upstream-card > summary strong,
.upstream-card > summary small {
  display: block;
}

.upstream-card > summary strong {
  color: #eef6ff;
  font-size: 14px;
}

.upstream-card > summary small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upstream-summary-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.upstream-summary-meta code {
  color: #91a8c4;
  font-size: 11px;
}

.upstream-balance {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  color: #9caec4;
  font-size: 11px;
  white-space: nowrap;
}

.upstream-balance.is-supported {
  border-color: rgba(52, 211, 153, .24);
  background: rgba(52, 211, 153, .08);
  color: #7ce4bd;
}

.upstream-balance.is-loading {
  color: #8bdcf1;
}

.upstream-balance.is-error {
  border-color: rgba(251, 113, 133, .22);
  color: #fda4af;
}

.stats-log-account {
  min-width: 0;
  overflow: hidden;
  white-space: normal;
}

.stats-log-account-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upstream-card-body {
  padding: 16px;
  border-top: 1px solid var(--line-soft);
  background: #091321;
}

.upstream-card-note {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.upstream-card-note .upstream-error {
  width: 100%;
  color: #fda4af;
}

@media (max-width: 1120px) {
  .models-layout {
    grid-template-columns: minmax(290px, .65fr) minmax(450px, 1.35fr);
  }

  .upstream-layout {
    grid-template-columns: minmax(290px, .65fr) minmax(450px, 1.35fr);
  }
}

@media (max-width: 900px) {
  .models-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .models-page-actions {
    width: 100%;
  }

  .model-search-field {
    flex: 1;
    width: auto;
  }

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

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

  .model-create-surface,
  .upstream-create-panel {
    position: static;
  }

  .model-create-surface .model-create-body,
  .model-list-surface .model-route-list {
    max-height: 68vh;
  }
}

@media (max-width: 520px) {
  .models-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .models-page-actions button,
  .model-search-field {
    width: 100%;
  }

  .model-create-surface,
  .model-list-surface {
    padding: 13px;
    border-radius: 13px;
  }

  .model-route-summary {
    align-items: flex-start;
  }

  .upstream-card > summary,
  .upstream-summary-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Dense, paginated model catalog. The table keeps dozens of models scannable while
   the existing editor remains available as an expandable detail row. */
.models-layout {
  grid-template-columns: minmax(300px, .58fr) minmax(0, 1.7fr);
}

.model-list-surface .model-route-list {
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  border-radius: 12px;
}

.model-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-y: auto;
}

.model-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

.model-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #111d2e;
  color: #8495ad;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-align: left;
  white-space: nowrap;
}

.model-table th:nth-child(1) { width: 21%; }
.model-table th:nth-child(2) { width: 18%; }
.model-table th:nth-child(3) { width: 22%; }
.model-table th:nth-child(4) { width: 17%; }
.model-table th:nth-child(5) { width: 13%; }
.model-table th:nth-child(6) { width: 9%; }

.model-table .model-route-card {
  border: 0;
}

.model-table .model-route-header {
  display: table-row;
  min-height: 0;
}

.model-table .model-route-header > td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #0b1422;
  color: #cbd7e8;
  font-size: 12px;
  vertical-align: middle;
}

.model-table .model-route-card:hover .model-route-header > td {
  background: #101c2e;
}

.model-table .model-route-card.is-open .model-route-header > td {
  background: #132138;
}

.model-name-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
}

.model-name-button:hover,
.model-name-button:active {
  background: transparent;
  box-shadow: none;
  filter: none;
  transform: none;
}

.model-table .model-route-identity code,
.model-upstream-name {
  display: block;
  overflow: hidden;
  color: #eaf3ff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-table .model-route-identity small,
.model-channel-names {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #75869e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-routing-summary {
  display: -webkit-box;
  overflow: hidden;
  color: #9fddeb;
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.model-channel-count {
  color: #d9e6f5;
  font-size: 12px;
}

.model-table .model-enabled-switch {
  min-height: 32px;
  padding: 0 8px;
}

.model-table .model-config-button {
  min-width: 62px;
  min-height: 32px;
  padding: 0 8px;
}

.model-table .model-route-body {
  display: table-row;
  padding: 0;
  border: 0;
  background: transparent;
}

.model-table .model-route-body[hidden] {
  display: none;
}

.model-table .model-route-body > td {
  padding: 0;
  border-bottom: 1px solid rgba(56, 189, 248, .24);
  background: #081321;
}

.model-route-editor {
  padding: 16px;
}

.model-route-editor .model-form-grid {
  margin-top: 0;
}

.model-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.model-pagination > span {
  margin-right: auto;
  font-variant-numeric: tabular-nums;
}

.model-pagination label,
.model-pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.model-pagination select {
  width: auto;
  min-height: 34px;
  padding: 5px 28px 5px 9px;
}

.model-pagination button {
  min-height: 34px;
}

/* Elastic instance inventory is intentionally read-only in System Settings. */
.autoscale-readonly-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 999px;
  background: rgba(56, 189, 248, .08);
  color: #8bdcf1;
  font-size: 11px;
  font-weight: 750;
}

.autoscale-node-labels,
.autoscale-node-row {
  grid-template-columns: minmax(130px, .85fr) minmax(210px, 1.35fr) minmax(145px, .9fr) minmax(90px, .55fr);
  align-items: center;
}

.autoscale-node-row > div {
  min-width: 0;
}

.autoscale-node-row > div > span {
  display: none;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.autoscale-node-row strong,
.autoscale-node-row code {
  display: block;
  overflow: hidden;
  color: #dbeafe;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

@media (max-width: 700px) {
  .autoscale-node-row > div > span {
    display: block;
  }
}

@media (max-width: 520px) {
  .model-pagination {
    align-items: stretch;
  }

  .model-pagination > span {
    width: 100%;
  }
}

/* Wide model management: creation stays above the catalog so the table receives
   the complete settings panel width on desktop. */
.models-layout.models-wide-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.models-wide-layout .model-create-surface,
.models-wide-layout .model-list-surface {
  width: 100%;
}

.models-wide-layout .model-create-surface {
  padding: 14px 16px 16px;
}

.models-wide-layout .model-create-surface .model-column-heading {
  margin-bottom: 10px;
}

.models-wide-layout .model-create-surface .model-create-body {
  max-height: none;
  overflow: visible;
  padding: 16px 18px 18px;
}

.models-wide-layout .model-create-surface .model-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-top: 0;
}

.models-wide-layout .model-create-surface .model-form-actions button:first-of-type {
  width: auto;
  min-width: 150px;
  margin-left: auto;
}

.models-wide-layout .models-guidance {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 13px;
}

.models-wide-layout .models-guidance p {
  margin: 0;
}

.models-wide-layout .model-list-surface {
  padding: 18px;
}

.models-wide-layout .model-list-head {
  min-height: 34px;
}

.models-wide-layout .model-table {
  min-width: 960px;
}

.models-wide-layout .model-table th {
  padding: 12px 16px;
}

.models-wide-layout .model-table .model-route-header > td {
  padding: 13px 16px;
}

.models-wide-layout .model-table th:nth-child(1) { width: 21%; }
.models-wide-layout .model-table th:nth-child(2) { width: 18%; }
.models-wide-layout .model-table th:nth-child(3) { width: 25%; }
.models-wide-layout .model-table th:nth-child(4) { width: 18%; }
.models-wide-layout .model-table th:nth-child(5) { width: 11%; }
.models-wide-layout .model-table th:nth-child(6) { width: 7%; }

.models-wide-layout .model-table .model-route-identity code,
.models-wide-layout .model-upstream-name {
  font-size: 13px;
}

.models-wide-layout .model-routing-summary,
.models-wide-layout .model-channel-names {
  font-size: 11px;
}

.models-wide-layout .model-route-editor {
  padding: 22px 24px 24px;
}

.models-wide-layout .model-route-editor .model-form-grid > label:first-child {
  width: min(440px, 100%);
}

.models-wide-layout .model-capability-row {
  grid-template-columns: minmax(150px, .28fr) minmax(0, 1.72fr);
  gap: 20px;
  padding: 12px 14px;
}

.models-wide-layout .model-capability-settings {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-items: center;
  gap: 10px 22px;
}

.models-wide-layout .model-routing-fields {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .models-wide-layout .model-capability-settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .models-wide-layout .model-create-surface .model-form-grid,
  .models-wide-layout .model-capability-row {
    grid-template-columns: 1fr;
  }

  .models-wide-layout .models-guidance {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .models-wide-layout .model-list-surface {
    padding: 13px;
  }

  .models-wide-layout .model-route-editor {
    padding: 16px;
  }
}

/* Compact model editor: configuration opens as balanced panels instead of one
   oversized horizontal form. */
.models-wide-layout .model-route-editor {
  padding: 20px;
  overflow: visible;
  overscroll-behavior: auto;
}

.models-wide-layout .model-editor-fieldset {
  padding: 16px;
  border-radius: 14px;
  background: rgba(8, 18, 31, .72);
}

.models-wide-layout .model-editor-fieldset > legend {
  padding: 0 8px;
  color: #91a4bd;
  font-size: 12px;
  font-weight: 750;
}

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

.model-editor-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: #0d1929;
}

.model-editor-panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.model-editor-panel-heading strong {
  flex: 0 0 auto;
  color: #e7f0fc;
  font-size: 13px;
}

.model-editor-panel-heading small {
  overflow: hidden;
  margin: 0;
  color: #71849e;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-upstream-field {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
}

.model-upstream-field > span {
  color: #93a5bd;
  font-size: 11px;
  white-space: nowrap;
}

.model-upstream-field input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.models-wide-layout .model-editor-routing-panel .model-routing-inherit {
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
}

.models-wide-layout .model-editor-routing-panel .model-routing-inherit small {
  font-size: 10px;
}

.model-editor-capability-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 2px 10px;
}

.model-editor-capability-heading strong,
.model-editor-capability-heading small {
  display: block;
}

.model-editor-capability-heading strong {
  color: #e7f0fc;
  font-size: 13px;
}

.model-editor-capability-heading small {
  margin-top: 3px;
  color: #71849e;
  font-size: 11px;
}

.model-editor-capability-heading > span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 999px;
  background: rgba(56, 189, 248, .07);
  color: #8bdcf1;
  font-size: 10px;
  white-space: nowrap;
}

.models-wide-layout .model-route-editor .model-capability-matrix {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.models-wide-layout .model-route-editor .model-capability-row {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  min-height: 152px;
  padding: 12px;
}

.models-wide-layout .model-route-editor .model-capability-channel {
  width: 100%;
  min-height: 25px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}

.models-wide-layout .model-route-editor .model-capability-channel span {
  font-size: 12px;
}

.models-wide-layout .model-route-editor .model-capability-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.models-wide-layout .model-route-editor .model-capability-group {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

.models-wide-layout .model-route-editor .model-capability-routing {
  grid-column: 1 / -1;
}

.models-wide-layout .model-route-editor .model-capability-upstream {
  grid-column: 1 / -1;
}

.models-wide-layout .model-route-editor .model-routing-fields,
.models-wide-layout .model-route-editor .model-capability-sizes {
  justify-content: flex-start;
}

.models-wide-layout .model-route-editor .model-routing-fields {
  flex-wrap: nowrap;
}

.models-wide-layout .model-route-editor .model-routing-fields input {
  width: 64px;
}

.model-editor-note {
  margin: 10px 2px 0;
  color: #8496ad;
  font-size: 11px;
}

.models-wide-layout .model-route-editor .model-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 14px;
  padding: 12px 0 4px;
  background: linear-gradient(180deg, rgba(8, 19, 33, 0), #081321 30%);
}

@media (max-width: 1100px) {
  .models-wide-layout .model-route-editor .model-capability-matrix {
    grid-template-columns: 1fr;
  }

  .models-wide-layout .model-route-editor .model-capability-row {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .model-editor-overview,
  .models-wide-layout .model-route-editor .model-capability-settings {
    grid-template-columns: 1fr;
  }

  .model-editor-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .model-editor-panel-heading small {
    text-align: left;
    white-space: normal;
  }

  .model-editor-capability-heading {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .models-wide-layout .model-route-editor,
  .models-wide-layout .model-editor-fieldset {
    padding: 12px;
  }

  .model-upstream-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .model-editor-capability-heading {
    flex-direction: column;
    gap: 7px;
  }

  .models-wide-layout .model-route-editor .model-capability-group {
    grid-template-columns: 1fr;
  }

  .models-wide-layout .model-route-editor .model-routing-fields {
    flex-wrap: wrap;
  }
}

/* Wide, paginated upstream catalog. It mirrors the model catalog so a large
   provider inventory remains easy to scan while editing stays in a detail row. */
.upstream-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.upstream-create-panel {
  position: static;
}

.upstream-create-panel .upstream-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.upstream-page-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.upstream-page-actions .model-search-field {
  width: min(360px, 40vw);
}

.upstream-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  margin-top: 18px;
  color: #dce8f8;
  font-size: 13px;
}

.upstream-list-head > div,
.upstream-list-head > div > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.upstream-list-head > div > span,
.upstream-list-head > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.upstream-list {
  display: block;
  margin-top: 10px;
}

.upstream-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.upstream-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  table-layout: fixed;
}

.upstream-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #111d2e;
  color: #8495ad;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-align: left;
  white-space: nowrap;
}

.upstream-table th:nth-child(1) { width: 19%; }
.upstream-table th:nth-child(2) { width: 32%; }
.upstream-table th:nth-child(3) { width: 10%; }
.upstream-table th:nth-child(4) { width: 15%; }
.upstream-table th:nth-child(5) { width: 12%; }
.upstream-table th:nth-child(6) { width: 12%; }

.upstream-table .upstream-row-header > td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #0b1422;
  color: #cbd7e8;
  font-size: 12px;
  vertical-align: middle;
}

.upstream-table .upstream-row-card:hover .upstream-row-header > td {
  background: #101c2e;
}

.upstream-table .upstream-row-card.is-open .upstream-row-header > td {
  background: #132138;
}

.upstream-name-button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
}

.upstream-name-button:hover,
.upstream-name-button:active {
  background: transparent;
  box-shadow: none;
  filter: none;
  transform: none;
}

.upstream-row-identity strong,
.upstream-row-identity small,
.upstream-url,
.upstream-table td > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upstream-row-identity strong,
.upstream-url {
  color: #eaf3ff;
  font-size: 13px;
}

.upstream-row-identity small,
.upstream-table td > small {
  margin-top: 3px;
  color: #75869e;
  font-size: 10px;
}

.upstream-url {
  color: #9fddeb;
  font-size: 11px;
}

.upstream-concurrency {
  color: #d9e6f5;
  font-size: 13px;
}

.upstream-table .model-config-button {
  min-width: 62px;
  min-height: 32px;
  padding: 0 8px;
}

.upstream-table .upstream-row-body {
  display: table-row;
}

.upstream-table .upstream-row-body[hidden] {
  display: none;
}

.upstream-table .upstream-row-body > td {
  padding: 0;
  border-bottom: 1px solid rgba(56, 189, 248, .24);
  background: #081321;
}

.upstream-row-editor {
  padding: 22px 24px 24px;
}

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

@media (min-width: 1181px) {
  .upstream-table-wrap {
    overflow: visible;
  }
}

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

@media (max-width: 700px) {
  .upstreams-section-head,
  .upstream-page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .upstream-page-actions,
  .upstream-page-actions .model-search-field,
  .upstream-page-actions button {
    width: 100%;
  }

  .upstream-list-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .upstream-create-panel .upstream-form-grid,
  .upstream-row-editor .upstream-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .upstream-row-editor {
    padding: 12px;
  }
}
