:root {
  --page: #f2f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #17233a;
  --muted: #60708a;
  --border: #dbe3ee;
  --line: #e9eef5;
  --blue: #2563d9;
  --blue-dark: #17499f;
  --blue-soft: #eaf1ff;
  --green: #11775f;
  --red: #bb3948;
  --radius: 10px;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 980px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

.shell { min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px; }
.auth-panel { width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 42px; box-shadow: 0 20px 60px rgba(31, 56, 95, .10); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--blue); color: white; font-weight: 700; letter-spacing: .04em; }
.eyebrow { font-size: 12px; color: var(--blue); font-weight: 700; letter-spacing: .08em; margin: 24px 0 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 28px; margin-bottom: 10px; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 14px; margin: 0; }
.muted, .form-hint, .subtle { color: var(--muted); }
.form-hint { min-height: 20px; margin: 16px 0 0; font-size: 13px; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; color: #35435c; }
input, select, textarea { width: 100%; min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: white; padding: 8px 10px; color: var(--ink); outline: none; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 217, .12); }
button { min-height: 36px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: #2b3c58; padding: 0 13px; font-weight: 650; }
button:hover:not(:disabled) { border-color: #aebed4; background: var(--surface-soft); }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.danger { border-color: #efc7cd; color: var(--red); }
.quiet { background: transparent; }

.topbar { height: 68px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 34px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.brand-name { font-size: 16px; font-weight: 750; }
.brand-note { color: var(--muted); font-size: 12px; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22a879; box-shadow: 0 0 0 4px #e4f6ef; }
.layout { max-width: 1440px; margin: 0 auto; padding: 28px 34px 48px; }
.overview { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 24px; }
.overview h1 { margin: 3px 0 5px; font-size: 26px; }
.overview p { margin-bottom: 0; }
.metric-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(105px, 1fr); gap: 10px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; }
.metric .value { display: block; font-size: 20px; font-weight: 750; color: var(--blue-dark); }
.metric .label { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr); gap: 18px; align-items: start; }
.column { display: grid; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.panel-body { padding: 17px 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.field-hint { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: -2px; }
.row { display: flex; gap: 9px; align-items: center; }
.row > * { min-width: 0; }
.row .grow { flex: 1; }
.list { display: grid; }
.list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.item-title { font-size: 14px; font-weight: 720; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 99px; padding: 3px 8px; font-size: 11px; font-weight: 700; background: #eef3fb; color: #4c5d78; }
.badge.gpt { background: #eaf1ff; color: #245bbd; }
.badge.claude { background: #f0edff; color: #5b48a5; }
.badge.good { background: #e7f7ef; color: var(--green); }
.badge.warning { background: #fff4dc; color: #a05a00; }
.badge.disabled { background: #f6ebed; color: var(--red); }
.route-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.route-token { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 99px; padding: 3px 8px; color: #4a5b75; background: var(--surface-soft); font-size: 11px; }
.route-token.good { border-color: #bee7d4; background: #f1fbf6; color: var(--green); }
.route-token.warning { border-color: #f1d59b; background: #fff9ec; color: #a05a00; }
.route-token.disabled { border-color: #edc9cf; background: #fff5f6; color: var(--red); }
.route-error { color: var(--red); }
.item-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.item-actions button { min-height: 30px; padding: 0 9px; font-size: 12px; }
.empty { padding: 24px 18px; color: var(--muted); font-size: 13px; }
.key-reveal { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; background: #f5f8fe; border: 1px solid #cddcf6; padding: 11px; border-radius: 8px; }
.key-reveal code { overflow-wrap: anywhere; color: #173e84; font-size: 12px; }
.note { padding: 10px 12px; border-radius: 8px; border: 1px solid #dbe7fb; background: #f5f8ff; color: #435470; font-size: 12px; line-height: 1.5; }
.log-list { max-height: 490px; overflow: auto; }
.log-item { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.log-item:last-child { border-bottom: 0; }
.log-at { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-main { overflow-wrap: anywhere; }
.log-type { font-weight: 700; color: #374967; }
.toast { position: fixed; top: 22px; right: 24px; z-index: 10; max-width: 460px; padding: 13px 16px; background: #1d365f; color: white; border-radius: 9px; box-shadow: 0 16px 36px rgba(22, 42, 77, .24); font-size: 13px; }
.toast.error { background: #a63141; }
.dialog-backdrop { position: fixed; inset: 0; background: rgba(17, 31, 54, .30); display: grid; place-items: center; z-index: 20; }
.dialog { width: min(560px, calc(100vw - 48px)); background: white; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 22px 70px rgba(20, 35, 61, .25); }
.dialog .panel-body { display: grid; gap: 14px; }
.dialog-footer { display: flex; justify-content: end; gap: 8px; padding: 15px 18px; border-top: 1px solid var(--line); }
.hidden { display: none !important; }

/* Gateway console: a compact control surface, not a marketing dashboard. */
.topnav { display: flex; align-items: stretch; gap: 22px; height: 100%; margin-left: 42px; margin-right: auto; color: var(--muted); font-size: 13px; }
.topnav button { display: grid; place-items: center; min-height: 0; padding: 0; border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.topnav button:hover:not(:disabled) { color: var(--ink); background: transparent; }
.topnav button.active { color: var(--ink); font-weight: 750; border-bottom-color: var(--blue); }
.console { max-width: 1540px; margin: 0 auto; padding: 34px 36px 52px; }
.console-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding: 4px 0 26px; }
.console-heading .eyebrow { margin: 0 0 6px; }
.console-heading h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: 0; }
.console-heading .muted { max-width: 710px; line-height: 1.65; }
.console-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .39fr); gap: 20px; align-items: start; }
.workbench, .side-stack { display: grid; gap: 20px; min-width: 0; }
.section-heading { display: flex; align-items: flex-start; gap: 11px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 17px; line-height: 1.3; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-number { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid #cbd7ea; border-radius: 9px; color: #45618f; background: #f5f8ff; font-size: 11px; font-weight: 800; }
.section-actions { margin-left: auto; display: flex; gap: 8px; }
.channel-toolbar { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fbfcfe; }
.filter-tabs { display: flex; gap: 6px; }
.toolbar-fields { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.group-filter { display: flex; align-items: center; gap: 7px; min-width: 158px; color: var(--muted); font-size: 12px; font-weight: 650; }
.group-filter select { min-height: 34px; padding-top: 0; padding-bottom: 0; }
.filter-tab { min-height: 32px; border-radius: 8px; padding: 0 11px; font-size: 12px; }
.filter-tab span { display: inline-grid; place-items: center; min-width: 17px; height: 17px; border-radius: 99px; margin-left: 4px; background: #e8eef9; color: #5a6f92; font-size: 10px; }
.filter-tab.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.filter-tab.active span { background: rgba(255,255,255,.18); color: #fff; }
.search-field { width: min(390px, 45%); display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.search-field input { min-height: 34px; }
.table-wrap { overflow: auto; }
.channel-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1420px; }
.channel-table th { padding: 12px 14px; background: #fbfcfe; border-bottom: 1px solid var(--line); color: #71809a; text-align: left; font-size: 11px; font-weight: 750; white-space: nowrap; }
.channel-table td { vertical-align: top; padding: 15px 14px; border-bottom: 1px solid var(--line); font-size: 12px; }
.channel-table th:nth-child(1) { width: 4%; }.channel-table th:nth-child(2) { width: 16%; }.channel-table th:nth-child(3) { width: 16%; }.channel-table th:nth-child(4) { width: 11%; }.channel-table th:nth-child(5) { width: 11%; }.channel-table th:nth-child(6) { width: 7%; }.channel-table th:nth-child(7) { width: 7%; }.channel-table th:nth-child(8) { width: 12%; }.channel-table th:nth-child(9) { width: 16%; }
.channel-table tbody tr:hover { background: #fafcff; }
.channel-name { display: flex; gap: 9px; min-width: 0; }
.channel-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.channel-name small, .channel-table td > small { display: block; margin-top: 5px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.channel-id-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 24px; padding: 2px 8px; border: 1px solid #cbd9ee; border-radius: 999px; background: #f3f7fd; color: #315784; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.group-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.group-token { display: inline-flex; align-items: center; min-height: 19px; padding: 1px 7px; border: 1px solid #d6e1f4; border-radius: 999px; background: #f4f7fd; color: #49658d; font-size: 10px; font-weight: 700; }
.kind-mark { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 8px; font-size: 11px; font-weight: 800; }
.kind-mark.gpt { color: #1f5db9; background: #e8f0ff; }.kind-mark.claude { color: #6454a4; background: #f0edff; }
.table-routes { margin: 0; max-width: 100%; }
.table-routes .route-token { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-number { width: 100%; min-width: 54px; min-height: 31px; padding: 0 7px; border-radius: 8px; text-align: center; font-size: 12px; }
.status-control { display: block; min-height: 24px; margin-top: 7px; padding: 0 7px; border-color: #d8e2f2; background: #f7f9fd; color: #526987; font-size: 10px; }
.usage-cell { display: grid; gap: 4px; min-width: 0; }.usage-cell strong { color: #2a456b; font-size: 12px; }.usage-cell small { color: var(--muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-actions button { min-height: 30px; padding: 0 8px; font-size: 11px; }
.table-error { color: var(--red) !important; }
.key-panel .section-heading, .call-panel .section-heading, .activity-panel .section-heading, .profile-panel .section-heading { padding: 16px 17px; }
.key-panel .panel-body, .call-panel .panel-body, .activity-panel .panel-body, .profile-panel .panel-body { padding: 15px 17px; }
.key-create { display: flex; flex-wrap: wrap; gap: 8px; }.key-create .grow { min-width: 220px; flex: 1; }
.request-box { display: grid; gap: 7px; padding: 13px; border: 1px solid #d9e3f5; border-radius: 9px; background: #f5f8ff; color: #466083; font-size: 12px; line-height: 1.5; }
.request-box code { color: #1e4f9c; font-size: 12px; font-weight: 750; }
.activity-panel .log-list { max-height: 444px; }
.view-channels .console-grid { grid-template-columns: minmax(0, 1fr); }
.view-channels .side-stack { display: none; }
.view-channels .routing-tools { grid-template-columns: minmax(0, 1fr); }
.view-channels .warmup-panel { display: none; }
.routing-tools { display: grid; grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr); gap: 20px; }
.compact-setting { display: grid; grid-template-columns: 110px 140px minmax(0, 1fr) auto; align-items: end; gap: 14px; padding: 17px 20px; }
.compact-setting strong, .compact-setting span { display: block; }.compact-setting strong { margin-bottom: 4px; color: #2e466a; font-size: 13px; }.compact-setting span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.warmup-task-list { display: grid; gap: 12px; padding: 0 0 16px; }
.warmup-running-note { padding: 12px 20px 0; }
.warmup-summary { padding: 17px 20px; border-top: 1px solid var(--line); }.warmup-summary-head { display: flex; justify-content: space-between; gap: 16px; }.warmup-summary-head > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 9px; }.warmup-summary-head small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.progress-track { height: 8px; overflow: hidden; margin-top: 15px; border-radius: 999px; background: #e9eff8; }.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .2s ease; }
.warmup-stats { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 10px; color: #526783; font-size: 11px; }.warmup-error { margin-top: 11px; padding: 9px 10px; border: 1px solid #f0cfd4; border-radius: 8px; background: #fff7f8; color: #a72d3e; font-size: 11px; line-height: 1.45; }
.view-warmup .console-grid, .view-profile .console-grid, .view-activity .console-grid { grid-template-columns: minmax(0, 1fr); }
.view-warmup .side-stack { display: none; }
.view-warmup .routing-tools { grid-template-columns: minmax(0, 1fr); }
.view-warmup .reliability-panel, .view-warmup .channels-panel { display: none; }
.quota-panel { display: none; }
.view-quota .console-grid { grid-template-columns: minmax(0, 1fr); }
.view-quota .side-stack, .view-quota .routing-tools, .view-quota .channels-panel { display: none; }
.view-quota .quota-panel { display: block; }
.quota-layout { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: 0; }
.quota-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 17px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.quota-model-list { display: grid; align-content: start; max-height: min(70vh, 760px); overflow: auto; border-right: 1px solid var(--line); }
.quota-model { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.quota-model strong { font-size: 13px; color: var(--ink); }
.quota-model small { color: var(--muted); font-size: 11px; }
.quota-model.selected { background: var(--blue-soft); }
.quota-editor { display: grid; gap: 16px; padding: 18px; }
.quota-metrics { margin: 0; }
.quota-channels { display: flex; flex-wrap: wrap; gap: 6px; }
.view-profile .workbench, .view-activity .workbench { display: none; }
.view-profile .side-stack { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: start; }
.view-profile .activity-panel { display: none; }
.view-profile .profile-panel { grid-column: 1 / -1; }
.view-profile .key-panel { grid-column: 1; }
.view-profile .call-panel { grid-column: 2; }
.profile-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 16px; padding: 18px; }.profile-identity, .profile-token { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid #dbe4f1; border-radius: 10px; background: #fbfcfe; }.profile-token { justify-content: space-between; }.profile-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; background: #e9f1ff; color: #245db8; font-weight: 800; }.profile-identity strong, .profile-token strong { display: block; margin: 3px 0; color: #263f64; font-size: 16px; }.profile-identity small, .profile-token small { color: var(--muted); font-size: 11px; }.admin-token-reveal { margin: 0 18px; grid-template-columns: minmax(0, 1fr) auto; }.admin-token-reveal small { grid-column: 1 / -1; color: var(--red); font-size: 11px; }
.view-activity .side-stack { display: block; }
.view-activity .profile-panel, .view-activity .key-panel, .view-activity .call-panel { display: none; }
.view-activity .activity-panel .log-list { min-height: 440px; max-height: calc(100vh - 280px); padding: 4px 17px 16px; }
.activity-table-wrap { max-height: calc(100vh - 280px); min-height: 440px; overflow: auto; padding: 0 !important; }
.activity-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfe; }
.activity-toolbar form, .activity-pagination { display: flex; align-items: center; gap: 8px; }
.activity-toolbar input { width: min(420px, 42vw); }
.activity-pagination span { min-width: 110px; color: var(--muted); text-align: right; font-size: 12px; }
.activity-table { width: 100%; min-width: 1480px; border-collapse: collapse; table-layout: fixed; }
.activity-table th { position: sticky; top: 0; z-index: 2; padding: 11px 12px; border-bottom: 1px solid var(--line); background: #fbfcfe; color: #71809a; text-align: left; font-size: 11px; font-weight: 750; white-space: nowrap; }
.activity-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: #344965; font-size: 12px; }
.activity-table th:nth-child(1) { width: 11%; }.activity-table th:nth-child(2) { width: 6%; }.activity-table th:nth-child(3) { width: 10%; }.activity-table th:nth-child(4) { width: 9%; }.activity-table th:nth-child(5) { width: 11%; }.activity-table th:nth-child(6) { width: 5%; }.activity-table th:nth-child(7) { width: 11%; }.activity-table th:nth-child(8) { width: 7%; }.activity-table th:nth-child(9) { width: 7%; }.activity-table th:nth-child(10) { width: 23%; }
.activity-table tbody tr:hover { background: #fafcff; }.activity-table tbody tr.has-error { background: #fffafa; }.activity-table tbody tr.has-error:hover { background: #fff5f5; }
.log-time { color: #556781; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-result, .stream-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.log-result.success { background: #eaf8f1; color: #13734e; }.log-result.error { background: #ffebee; color: #ba2437; }.log-result.running { background: #eaf2ff; color: #2663ad; }.log-result.info { background: #eef2f7; color: #53657e; }
.stream-tag.stream { background: #e8f2ff; color: #1767b2; }.stream-tag.non-stream { background: #f1f3f6; color: #66758a; }
.log-channel, .log-credential, .log-tokens, .log-duration { display: grid; gap: 4px; min-width: 0; }.log-channel { justify-items: start; }.log-channel small, .log-credential small, .log-tokens small, .log-duration small { color: var(--muted); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }.log-credential strong, .log-tokens strong, .log-duration strong { color: #314b6e; font-size: 12px; }
.log-model { display: block; overflow-wrap: anywhere; color: #35557f; font-weight: 650; }.log-cost, .log-duration-value { color: #425a79; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-detail-summary { display: -webkit-box; overflow: hidden; max-width: 100%; color: #4c607b; line-height: 1.4; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.log-detail-summary.error { color: #b3283b; font-weight: 650; }
.log-details { margin-top: 6px; }.log-details summary { width: fit-content; color: #2d67ad; cursor: pointer; font-size: 11px; font-weight: 700; }.log-details dl { display: grid; gap: 6px; margin: 9px 0 0; padding: 9px 10px; border: 1px solid #dde6f2; border-radius: 8px; background: #f8faff; }.log-details dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }.log-details dt { color: #71809a; }.log-details dd { margin: 0; color: #344965; overflow-wrap: anywhere; user-select: text; }
.drawer-layer { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(21, 35, 58, .30); }
.drawer { position: relative; z-index: 1; width: min(680px, 92vw); height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; box-shadow: -22px 0 70px rgba(20, 38, 70, .22); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 26px 28px 19px; border-bottom: 1px solid var(--line); }
.drawer-head .eyebrow { margin: 0 0 7px; }.drawer-head h2 { font-size: 23px; }.drawer-head p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; min-height: 34px; padding: 0; border-radius: 10px; font-size: 22px; font-weight: 400; }
.drawer-body { overflow: auto; padding: 8px 28px 26px; }
.drawer-section { padding: 20px 0; border-bottom: 1px solid var(--line); }.drawer-section:last-child { border-bottom: 0; }
.drawer-section h3 { font-size: 15px; }.drawer-section > p { margin: 5px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.model-picker { display: grid; gap: 12px; }
.model-catalog { border: 1px solid #dce5f4; border-radius: 10px; overflow: hidden; background: #fbfcff; }
.catalog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 13px; border-bottom: 1px solid #e3eaf6; background: #f5f8fe; }
.catalog-heading strong, .catalog-heading small { display: block; }.catalog-heading strong { font-size: 13px; color: #243c63; }.catalog-heading small, .catalog-heading span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.model-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.model-choice, .group-choice { display: flex; gap: 8px; align-items: flex-start; min-width: 0; padding: 9px 10px; border: 1px solid #dce4f0; border-radius: 9px; background: #fff; cursor: pointer; }
.model-choice:hover, .group-choice:hover { border-color: #a9c4ef; }.model-choice.selected, .group-choice.selected { border-color: #77a3e6; background: #eef5ff; box-shadow: inset 0 0 0 1px rgba(66, 117, 203, .08); }
.model-choice input, .group-choice input { width: 16px; min-height: 16px; margin: 1px 0 0; flex: 0 0 auto; }.model-choice span { min-width: 0; }.model-choice strong, .model-choice small { display: block; overflow-wrap: anywhere; }.model-choice strong { color: #253c60; font-size: 12px; }.model-choice small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.group-choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }.group-choice { align-items: center; padding: 7px 9px; font-size: 12px; color: #314968; }.new-group-field { display: block; margin-top: 11px; }
.group-channel-grid { display: grid; gap: 9px; }.group-channel-choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #dce4f0; border-radius: 10px; background: #fff; cursor: pointer; }.group-channel-choice:hover { border-color: #a9c4ef; }.group-channel-choice.selected { border-color: #77a3e6; background: #eef5ff; box-shadow: inset 0 0 0 1px rgba(66, 117, 203, .08); }.group-channel-choice input { width: 17px; min-height: 17px; margin: 2px 0 0; flex: 0 0 auto; }.group-channel-choice strong, .group-channel-choice small { display: block; }.group-channel-choice strong { color: #284264; font-size: 12px; }.group-channel-choice small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.proxy-check-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 11px; padding: 10px 11px; border: 1px solid #d7e5f8; border-radius: 9px; background: #f7faff; color: #4b6385; font-size: 12px; }.proxy-check-card strong, .proxy-check-card span { display: block; }.proxy-check-card span { margin-top: 3px; color: var(--muted); font-size: 11px; }.proxy-check-card button { min-height: 32px; flex: 0 0 auto; font-size: 11px; }
.mapping-note { display: grid; gap: 3px; margin-top: 9px; padding: 10px 11px; border: 1px solid #d9e4f6; border-radius: 9px; background: #f6f9ff; color: #4e6488; font-size: 12px; line-height: 1.5; }
.toggle-row { display: flex; align-items: center; grid-auto-flow: column; grid-template-columns: auto 1fr; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: #fbfcfe; }
.toggle-row input { width: 18px; min-height: 18px; }.toggle-row small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
.warmup-channel-grid { display: grid; gap: 9px; }.warmup-channel-choice { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #dce4f0; border-radius: 10px; background: #fff; cursor: pointer; }.warmup-channel-choice:hover { border-color: #a9c4ef; }.warmup-channel-choice.selected { border-color: #77a3e6; background: #eef5ff; box-shadow: inset 0 0 0 1px rgba(66, 117, 203, .08); }.warmup-channel-choice input { width: 17px; min-height: 17px; margin: 2px 0 0; flex: 0 0 auto; }.warmup-channel-choice strong, .warmup-channel-choice small { display: block; }.warmup-channel-choice strong { color: #284264; font-size: 12px; }.warmup-channel-choice small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.drawer-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 28px; border-top: 1px solid var(--line); background: #fff; }
@media (max-width: 1180px) { .console { padding-inline: 24px; }.console-grid { grid-template-columns: 1fr; }.routing-tools { grid-template-columns: 1fr; }.quota-layout { grid-template-columns: 1fr; }.quota-model-list { border-right: 0; border-bottom: 1px solid var(--line); }.side-stack, .view-profile .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }.activity-panel { grid-column: 1 / -1; }.view-profile .profile-panel { grid-column: 1 / -1; }.view-profile .key-panel, .view-profile .call-panel { grid-column: auto; } }
@media (max-width: 760px) { .channel-toolbar, .toolbar-fields { align-items: stretch; flex-direction: column; }.search-field, .group-filter { width: 100%; }.model-choice-grid { grid-template-columns: 1fr; }.proxy-check-card { align-items: flex-start; flex-direction: column; }.compact-setting, .profile-grid { grid-template-columns: 1fr; } }
