: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 {
  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;
}

.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 {
  padding: 16px;
  border-top-color: var(--line-soft);
  background: rgba(7, 12, 21, .48);
}

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

.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-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;
}

.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);
}

.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;
}

.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-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;
}

.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;
}

.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;
  }
}

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

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

@media (max-width: 980px) {
  .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;
  }
}

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

  .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 h3 {
  margin: 4px 0;
  color: #f3f8ff;
  font-size: 20px;
}

#settingsModelsPanel {
  min-height: 0;
}

#settingsModelsPanel .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;
}

@media (max-width: 1120px) {
  .models-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;
  }

  .model-create-surface {
    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;
  }
}
