/* Customer-workspace visual layer. Loaded after legacy layout rules so all
   authenticated pages and dialogs use the same public-site design tokens. */
html[data-theme="light"] {
  --bg: var(--ui-canvas);
  --bg-deep: #edf2fa;
  --surface: #fff;
  --surface-solid: #fff;
  --surface-raised: #fff;
  --surface-soft: #f3f7fd;
  --surface-hover: #edf3ff;
  --border: var(--ui-border);
  --border-strong: #c1d4f5;
  --text: var(--ui-ink);
  --text-soft: #4e647f;
  --text-muted: var(--ui-muted);
  --accent: var(--ui-blue);
  --accent-bright: #2058c6;
  --accent-rgb: 36, 101, 232;
  --accent-2: #4b88df;
  --accent-2-rgb: 75, 136, 223;
  --shadow: var(--ui-shadow);
  --shadow-soft: var(--ui-shadow-small);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
}
html, body { min-width: 0; }
body { font-family: var(--ui-font); background: var(--ui-canvas) !important; }
:focus-visible { outline: 3px solid #7ba7ff; outline-offset: 3px; }
#app-view.app-shell { grid-template-columns: 248px minmax(0,1fr); grid-template-rows: 76px auto; background: var(--ui-canvas); }
#app-view .customer-header { height: 76px; padding: 0 32px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); box-shadow: none; }
#app-view .brand-mark { background: transparent; box-shadow: none; border-radius: 0; }
#app-view .customer-brand .brand-mark { width: 35px; height: 35px; }
#app-view .customer-brand .brand-copy strong { color: #142b48; font-size: 25px; letter-spacing: -.9px; }
#app-view .customer-brand .brand-copy small { color: #66748b; font-size: 13px; font-weight: 500; }
#app-view .customer-public-nav { gap: 40px; }
#app-view .customer-public-nav a { color: var(--text-muted); font-size: 14px; font-weight: 600; }
#app-view .customer-public-nav a:hover, #app-view .customer-console-link { color: var(--accent); }
#app-view .customer-console-link::after { bottom: -26px; height: 3px; background: var(--accent); }
#app-view > .sidebar { top: 100px; margin: 24px 0 40px 24px; padding: 16px 12px; max-height: calc(100vh - 124px); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-soft); }
#app-view > .sidebar .sidebar-nav { gap: 6px; order: 1; }
#app-view > .sidebar .sidebar-nav::before { display: none; }
#app-view > .sidebar .sidebar-nav > p { display: block; margin: 12px 12px 6px; color: #7b8ba1; font-size: 11px; font-weight: 550; letter-spacing: .8px; }
#app-view > .sidebar .nav-item { min-height: 46px; padding: 0 12px; gap: 11px; color: #516680; font-size: 14px !important; font-weight: 500; border: 1px solid transparent; border-radius: 9px; }
#app-view > .sidebar .nav-item .icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
#app-view > .sidebar .nav-item:hover { color: var(--accent); background: #f5f8ff; }
#app-view > .sidebar .nav-item.is-active { color: var(--accent); background: #edf3ff; border-color: #dbe7ff; font-weight: 650; box-shadow: none; }
#app-view > .sidebar .nav-badge { font-size: 10px; background: #dce8ff; }
#app-view > .sidebar .sidebar-account { display: grid; width: 100%; order: 3; margin: 20px 0 0; padding: 18px 4px 4px; border-left: 0; border-top: 1px solid var(--border); }
#app-view > .sidebar .sidebar-account strong { font-size: 12px; }
#app-view > .sidebar .sidebar-account small { font-size: 10px; }
#app-view .topbar { position: static; height: 68px; padding: 0 32px 0 28px; backdrop-filter: none; }
#app-view .topbar-left { display: flex; }
#app-view .breadcrumb small { font-size: 11px; letter-spacing: 0; }
#app-view .breadcrumb strong { font-size: 13px; font-weight: 550; }
#app-view .balance-pill { background: #fff; border-color: var(--border); }
#app-view .balance-pill span { font-size: 11px; }
#app-view .balance-pill strong { font-size: 13px; font-variant-numeric: tabular-nums; }
#app-view .main-content { width: min(100%,1600px); margin: 0 auto; padding: 0 32px 64px 28px; }
#app-view #main-content:focus { outline: none; }
#app-view .page-view { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#app-view .page-hero { min-height: 0; flex-direction: row; align-items: center; gap: 24px; margin-bottom: 28px; padding: 4px 0 0; border: 0; }
#app-view .page-hero h1 { margin-top: 10px; font-size: clamp(26px,2.6vw,34px) !important; line-height: 1.4; font-weight: 700; letter-spacing: -.7px; }
#app-view .page-hero p { max-width: 680px; margin-top: 10px; color: var(--text-muted); line-height: 1.8; font-size: 13px !important; }
#app-view .page-hero > .primary-button { flex: 0 0 auto; }
#app-view .page-view h2 { font-size: 20px !important; font-weight: 650; line-height: 1.5; letter-spacing: -.4px; }
#app-view .eyebrow { color: #5475a4; font-size: 10px; letter-spacing: 1.4px; }
#app-view .eyebrow i { width: 6px; height: 6px; background: #348e7a; box-shadow: none; }
#app-view .section-kicker, .modal .section-kicker { color: #77879d; font-size: 10px; letter-spacing: 1px; }
#app-view .glass-card { border-color: var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); }
#app-view .metric-grid { gap: 16px; }
#app-view .metric-card { position: relative; min-height: 150px; padding: 22px; transition: border-color .2s; }
#app-view .metric-card:hover { border-color: #bccff0; transform: none; }
#app-view .metric-card::after { display: none; }
#app-view .metric-card .metric-icon { width: 36px; height: 36px; border-radius: 10px; box-shadow: none; }
#app-view .metric-card small { color: var(--text-muted); font-size: 12px; }
#app-view .metric-card strong { margin: 9px 0 7px; color: #1a365c; font-size: 27px; font-weight: 700; line-height: 1.4; letter-spacing: -.5px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#app-view #metric-balance, #app-view #metric-spend, #app-view #usage-cost { font-size: clamp(18px,1.6vw,24px); }
#app-view .metric-card span:not(.metric-icon) { font-size: 11px; color: #728198; white-space: normal; }
#app-view .panel { padding: 24px; }
#app-view .panel-head { gap: 16px; margin-bottom: 22px; }
#app-view .panel-head h2 { margin-top: 6px; }
#app-view .overview-grid, #app-view .lower-grid { gap: 20px; margin-top: 20px; }
#app-view .chart-line { filter: none; }
#app-view .chart-summary strong { font-size: 28px; font-weight: 700; }
#app-view .chart-summary span, #app-view .chart-summary small { font-size: 11px; }
#app-view .chart-labels { font-size: 10px; }
#app-view .segmented { border-color: var(--border); background: #f3f6fb; border-radius: 9px; }
#app-view .segmented button { min-height: 32px; font-size: 12px; }
#app-view .segmented button.is-active { color: var(--accent); background: #fff; box-shadow: 0 1px 4px #172d4c0d; }
#app-view .quick-steps { gap: 14px; }
#app-view .quick-steps li strong { font-size: 13px; }
#app-view .quick-steps li small { font-size: 11px; line-height: 1.7; }
#app-view .quick-steps li button { min-height: 32px; padding: 0 10px; font-size: 12px; }
#app-view .secure-note small { font-size: 11px; line-height: 1.7; }
#app-view .secure-note strong { font-size: 12px; }
#app-view .compact-list strong { font-size: 13px; }
#app-view .compact-list small { font-size: 11px; }
#app-view .primary-button, .modal .primary-button, .auth-card .primary-button { min-height: 42px; padding-inline: 17px; border-radius: 10px; background: var(--accent) !important; font-size: 13px; box-shadow: 0 6px 18px -10px #2465e866; }
#app-view .primary-button:hover:not(:disabled), .modal .primary-button:hover:not(:disabled) { background: var(--ui-blue-hover) !important; }
#app-view .secondary-button, .modal .secondary-button { min-height: 40px; padding-inline: 15px; font-size: 13px; border-radius: 9px; background: #fff; }
#app-view .text-button { font-size: 12px; }
#app-view .icon-button { min-width: 36px; min-height: 36px; border-radius: 9px; }
#app-view .table-scroll { position: relative; width: 100%; margin-inline: 0; padding-inline: 0; overflow-x: auto; }
#app-view .data-table th { padding-block: 14px; color: #63758e; background: #f6f8fc; font-size: 12px !important; font-weight: 550; }
#app-view .data-table td { padding-block: 17px; font-size: 13px !important; }
#app-view .data-table tbody tr:hover { background: #fafcff; }
#app-view .status-badge { font-size: 11px; }
#app-view .security-banner, #app-view .payment-notice { padding: 18px 20px; border-radius: 13px; box-shadow: none; }
#app-view .security-banner strong, #app-view .payment-notice strong { font-size: 13px; }
#app-view .security-banner p, #app-view .payment-notice p { font-size: 12px !important; line-height: 1.8; }
#app-view .search-box, #app-view .select-shell, .modal .input-shell, #app-view .input-shell { min-height: 42px; border-color: #d3ddec; border-radius: 9px; }
#app-view .search-box input, #app-view .select-shell select, #app-view .input-shell input, .modal .input-shell input, .modal .input-shell select { font-size: 13px; }
#app-view .filter-chips button { min-height: 34px; padding-inline: 12px; font-size: 12px; }
/* Model catalog: compact identity, readable pricing and a quiet provider footer. */
#models-refresh { flex-shrink: 0; white-space: nowrap; }
#app-view .model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
#app-view .model-card { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 0; padding: 22px 22px 0; background: #fff; border: 1px solid #dce5f2; border-radius: 12px; box-shadow: 0 3px 12px rgba(31, 63, 110, .035); transition: border-color .2s, box-shadow .2s; }
#app-view .model-card:hover { transform: none; border-color: #aac5ef; box-shadow: 0 8px 24px rgba(31, 63, 110, .08); }
#app-view .model-card::after { display: none; }
#app-view .model-card-head { justify-content: flex-start; align-items: flex-start; gap: 13px; }
#app-view .model-logo { width: 42px; height: 46px; flex: 0 0 42px; background: transparent; border: 0; border-radius: 0; color: #6385be; }
#app-view .model-logo img { display: block; width: 36px; height: 36px; object-fit: contain; }
#app-view .model-logo .icon { width: 32px; height: 32px; }
#app-view .model-identity { display: grid; flex: 1; min-width: 0; gap: 8px; }
#app-view .model-card h3 { margin: 0; color: #162f53; font-size: 16px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
#app-view .model-capabilities { display: flex; gap: 5px; flex-wrap: wrap; }
#app-view .model-capabilities .chip { min-height: 0; padding: 2px 6px; color: #386bce; background: #f3f7ff; border: 1px solid #dce7fc; border-radius: 4px; font-size: 10px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
#app-view .model-id { display: block; margin-top: 15px; color: #7d8da4; font-size: 11px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app-view .model-card .model-description { display: -webkit-box; min-height: 44px; margin: 8px 0 18px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #748196; font-size: 12px !important; line-height: 22px; overflow-wrap: anywhere; }
#app-view .model-pricing { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: auto; padding: 14px 16px; background: #f7f9fd; border: 1px solid #edf1f8; border-radius: 8px; }
#app-view .model-pricing > span { flex: 1 1 95px; min-width: 0; gap: 5px; }
#app-view .model-pricing > span + span { padding-left: 16px; border-left: 1px solid #e2e9f4; }
#app-view .model-pricing small { color: #7b8ba2; font-size: 10px; font-weight: 400; line-height: 1.5; }
#app-view .model-pricing strong { color: #234b84; font-size: 19px; font-weight: 650; line-height: 1.35; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#app-view .model-pricing .model-price-dynamic strong { font-size: 13px; line-height: 1.8; }
#app-view .model-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 0; border-top: 1px solid #e9eef6; font-size: 11px; line-height: 1.5; }
#app-view .model-provider { flex-shrink: 0; color: #405b7d; font-weight: 550; }
#app-view .model-endpoint { overflow: hidden; color: #8b98ad; text-align: right; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 1250px) { #app-view .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { #app-view .model-card { transition: none; } }
#app-view .balance-card { padding: 28px; border: 1px solid #c8dafa; border-radius: 16px; background: linear-gradient(125deg,#f0f6ff,#e5efff); box-shadow: none; }
#app-view .balance-card strong { color: #194687; font-size: clamp(26px,3vw,38px); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#app-view .balance-card .section-kicker { color: #5b7daa; }
#app-view .balance-card p, #app-view .balance-card small, #app-view .balance-card-foot { color: #526e96; }
#app-view .balance-card-foot { border-color: #cdddf5; }
#app-view .balance-card-glow { display: none; }
#app-view .balance-card small, #app-view .balance-card-foot, #app-view .billing-summary dt { font-size: 12px; }
#app-view .billing-summary dd { font-size: 22px; }
#app-view .account-profile-card { padding: 28px 22px; }
#app-view .account-profile-card dt, #app-view .account-profile-card dd { font-size: 12px; }
#app-view .field > span, .modal .field > span { font-size: 13px; }
#app-view .field-pair, .modal .field-pair { align-items: start; }
#app-view .field small, .modal .field small { font-size: 11px; line-height: 1.7; }
#app-view .setting-row strong { font-size: 13px; }
#app-view .setting-row small { font-size: 11px; line-height: 1.7; }
#app-view .buysr-config-banner { padding: 26px; border: 1px solid #ceddfa; background: linear-gradient(110deg,#ecf3ff,#e3edff); color: #244c86; border-radius: 16px; box-shadow: none; }
#app-view .buysr-config-banner::after { display: none; }
#app-view .buysr-config-banner .section-kicker { color: #587cae; }
#app-view .buysr-config-banner p { color: #607da5; font-size: 13px !important; }
#app-view .buysr-config-button { border: 1px solid #c2d5f8; border-radius: 9px; background: #fff; color: #245db7; font-size: 13px; }
.modal { border-radius: 18px; border-color: var(--border); box-shadow: 0 24px 80px #172d4c26; }
.modal-head { min-height: 82px; padding: 22px 26px; }
.modal-head h2 { font-size: 22px; }
.modal-body { padding: 26px; }
.modal .check-row, .modal .form-status, .modal .secret-warning, .modal #confirm-copy { font-size: 13px; line-height: 1.8; }
.modal .modal-note strong, .modal .modal-note span { font-size: 12px; line-height: 1.7; }
.modal .permission-list { background: #f8fafd; border-color: var(--border); padding: 8px; }
.modal .permission-item { padding: 12px; border-radius: 8px; }
.modal .permission-item strong { font-size: 13px; }
.modal .permission-item small { font-size: 11px; line-height: 1.7; }
.modal .permission-item:has(input:checked) { background: #edf3ff; }
.modal .guide-body li strong { font-size: 14px; }
.modal .guide-body li p, .modal .legal-copy { font-size: 13px; }
.modal .secret-box code, .modal .guide-endpoint code { font-size: 12px; }
.modal .copy-button { min-height: 36px; font-size: 12px; }
.toast strong { font-size: 13px; }
.toast span { font-size: 12px; }

@media (min-width: 961px) and (max-width: 1250px) {
  #app-view.app-shell { grid-template-columns: 224px minmax(0,1fr); }
  #app-view > .sidebar { margin-left: 18px; padding-inline: 10px; }
  #app-view .main-content { padding-inline: 22px; }
  #app-view .overview-grid { grid-template-columns: 1fr; }
  #app-view .lower-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #app-view .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #app-view .account-layout { grid-template-columns: 1fr; }
  #app-view .account-profile-card { position: static; }
}
@media (max-width: 960px) {
  #app-view.app-shell { display: block; padding-top: 66px; }
  #app-view .customer-header { height: 66px; padding: 0 20px; }
  #app-view .customer-brand .brand-copy strong { font-size: 22px; }
  #app-view .customer-brand .brand-mark { width: 30px; height: 30px; }
  #app-view > .sidebar { z-index: 180; top: 66px; bottom: 0; width: min(286px,86vw); height: calc(100dvh - 66px); max-height: none; margin: 0; padding: 20px 16px; border-radius: 0 16px 16px 0; visibility: hidden; transition: transform .24s ease, visibility .24s; }
  #app-view > .sidebar.is-open { visibility: visible; }
  #app-view .mobile-scrim { z-index: 170; }
  #app-view > .sidebar .sidebar-head { width: 100%; margin-bottom: 14px; justify-content: space-between; }
  #app-view .topbar { height: 64px; padding: 0 20px; }
  #app-view .main-content { padding: 6px 20px 44px; }
  #app-view .page-view { padding: 0; }
  #app-view .page-hero { margin-bottom: 22px; }
  #app-view .overview-grid, #app-view .lower-grid { grid-template-columns: 1fr; }
  #app-view .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  #app-view .main-content { padding-inline: 16px; }
  #app-view .topbar { padding-inline: 16px; }
  #app-view .page-hero { align-items: flex-start; gap: 14px; }
  #app-view .page-hero h1 { font-size: 26px !important; }
  #app-view .page-hero p { font-size: 12px !important; }
  #app-view .page-hero > .primary-button { margin-top: 24px; min-width: 42px; padding-inline: 12px; }
  #app-view .page-hero > .primary-button span { display: none; }
  #app-view .metric-grid { gap: 12px; }
  #app-view .metric-card { padding: 16px; min-height: 150px; }
  #app-view .metric-card strong { font-size: 24px; }
  #app-view #metric-balance, #app-view #metric-spend, #app-view #usage-cost { font-size: 18px; }
  #app-view .panel { padding: 20px 16px; }
  #app-view .panel-head { gap: 12px; }
  #app-view .page-view h2 { font-size: 18px !important; }
  #app-view .model-grid { grid-template-columns: 1fr; }
  #app-view .table-tools { align-items: stretch; flex-direction: column; }
  #app-view .table-tools .search-box { width: 100%; }
  #app-view .buysr-config-banner { display: block; padding: 22px; }
  #app-view .buysr-config-button { margin-top: 18px; }
  .modal-body { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .modal { border-radius: 20px 20px 0 0; }
  .modal-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* API credentials: readable rows, compact controls and mobile cards. */
#app-view #view-keys .page-hero { margin-bottom: 26px; }
#app-view #view-keys .keys-security { margin-bottom: 24px; padding: 14px 18px; background: #edf4ff; border: 1px solid #dce8fa; border-radius: 12px; }
#app-view #view-keys .keys-security > span { width: 32px; height: 32px; flex: 0 0 32px; background: transparent; }
#app-view #view-keys .keys-security > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; }
#app-view #view-keys .keys-security strong { font-size: 13px; white-space: nowrap; color: #365a91; }
#app-view #view-keys .keys-security p { margin: 0; font-size: 12px; line-height: 1.7; color: #617797; }
#app-view #view-keys .table-panel { padding: 0; overflow: hidden; border: 1px solid #e3eaf4; box-shadow: 0 5px 22px #264b8310; }
#app-view #view-keys .table-tools { padding: 25px 26px 19px; margin: 0; }
#app-view #view-keys .section-kicker { letter-spacing: .15em; font-size: 10px; }
#app-view #view-keys #key-total { margin-left: 8px; color: #7a8ba5; font-size: 12px; font-weight: 500; }
#app-view #view-keys .search-box { width: 270px; background: #f8fafd; box-shadow: none; border-color: #e5ebf3; }
#app-view #view-keys .search-box:focus-within { border-color: #789eef; box-shadow: 0 0 0 3px #2563eb12; }
#app-view #view-keys .keys-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 26px 20px; }
#app-view #view-keys .keys-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; background: #f2f5fa; border-radius: 10px; }
#app-view #view-keys .keys-filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 13px; border: 0; border-radius: 7px; background: transparent; color: #708098; font: inherit; font-size: 12px; cursor: pointer; }
#app-view #view-keys .keys-filters button.is-active { background: #fff; color: #2563eb; box-shadow: 0 2px 5px #1e3a5f0d; font-weight: 650; }
#app-view #view-keys .keys-filters button span { min-width: 18px; padding: 1px 4px; border-radius: 4px; background: #e7edf5; color: #697d98; font-size: 11px; text-align: center; }
#app-view #view-keys .keys-filters button.is-active span { background: #eaf1ff; color: #2563eb; }
#app-view #view-keys #keys-result-count { color: #8291a7; font-size: 11px; }
#app-view #view-keys .keys-refresh-actions { display: flex; align-items: center; gap: 12px; }
#app-view #view-keys .table-scroll { padding: 0 12px 12px; }
#app-view #keys-table { width: 100%; min-width: 900px; }
#app-view #keys-table th { padding: 13px 14px; background: #f7f9fc; font-size: 11px !important; font-weight: 550; color: #7a8aa2; border-block: 1px solid #edf1f6; }
#app-view #keys-table td { padding: 22px 14px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
#app-view #keys-table tr:last-child td { border-bottom: 0; }
#app-view #keys-table tbody tr:hover { background: #fafcff; }
#app-view #keys-table .table-primary { gap: 6px; }
#app-view #keys-table .table-primary strong { font-size: 13px; font-weight: 600; line-height: 1.5; color: #283b58; }
#app-view #keys-table .table-primary small { font-size: 10px; line-height: 1.5; color: #8593a8; }
#app-view #keys-table .key-usage { font-variant-numeric: tabular-nums; white-space: nowrap; }
#app-view #keys-table .key-usage small { color: #5f7495; font-size: 11px; }
#app-view #keys-table .key-identity { display: flex; gap: 12px; align-items: flex-start; }
#app-view #keys-table .key-identity .table-primary { min-width: 0; }
#app-view #keys-table .key-identity strong { max-width: 230px; overflow-wrap: anywhere; white-space: normal; }
#app-view #keys-table .key-row-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border: 1px solid #e2eafd; border-radius: 10px; background: #f0f5ff; color: #437be0; }
#app-view #keys-table .key-row-icon .icon { width: 18px; height: 18px; }
#app-view #keys-table .key-prefix { display: block; width: fit-content; padding: 0; background: transparent; border: 0; color: #7b8aa0; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
#app-view #keys-table .chip { padding: 5px 10px; border: 1px solid #e5eaf3; border-radius: 6px; background: #f6f8fc; font-size: 11px; font-weight: 550; color: #596b86; }
#app-view #keys-table .key-dates strong { font-size: 11px; font-weight: 500; }
#app-view #keys-table .key-quota-progress { display: block; width: 118px; height: 4px; margin-top: 3px; border: 0; border-radius: 9px; overflow: hidden; appearance: none; background: #edf1f7; color: #5c8df2; }
#app-view #keys-table .key-quota-progress::-webkit-progress-bar { background: #edf1f7; }
#app-view #keys-table .key-quota-progress::-webkit-progress-value { background: #5c8df2; border-radius: 9px; }
#app-view #keys-table .key-quota-progress::-moz-progress-bar { background: #5c8df2; }
#app-view #keys-table .key-quota-progress.is-exhausted::-webkit-progress-value { background: #d89b60; }
#app-view #keys-table .key-quota-progress.is-exhausted::-moz-progress-bar { background: #d89b60; }
#app-view #keys-table .status-badge { font-size: 11px; padding: 5px 9px; white-space: nowrap; }
#app-view #keys-table .table-actions { display: grid; grid-template-columns: repeat(2,auto); gap: 5px 9px; }
#app-view #keys-table .table-action { min-height: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; white-space: nowrap; color: #5f7495; }
#app-view #keys-table .table-action:hover { background: #edf3ff; color: #2563eb; border-color: #dfe9ff; }
#app-view #keys-table .table-action.danger { color: #b17779; }
#app-view #keys-table .table-action.danger:hover { background: #fff1f1; border-color: #f6dddd; color: #cc555b; }
#app-view #view-keys .empty-state { padding: 45px 24px 55px; }
#app-view #view-keys .buysr-config-banner { padding: 23px 26px; margin-top: 22px; background: linear-gradient(110deg,#f0f5ff,#f8fbff); border: 1px solid #e0e9fa; border-radius: 14px; }
#app-view #view-keys .buysr-config-banner h2 { font-size: 16px !important; }
#app-view #view-keys .buysr-config-banner p { font-size: 12px; color: #7586a1; }
#key-modal { width: min(600px,calc(100vw - 32px)); }
#key-modal .modal-head { background: #f8faff; border-bottom: 1px solid #e7edf7; padding: 23px 26px; }
#key-modal .key-modal-heading { display: flex; align-items: center; gap: 14px; }
#key-modal .key-modal-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #dce6fd; border-radius: 12px; background: #edf3ff; color: #3976e5; }
#key-modal .key-modal-icon .icon { width: 22px; height: 22px; }
#key-modal .section-kicker { font-size: 9px; color: #7a91b2; letter-spacing: .16em; }
#key-modal .modal-head h2 { margin-top: 5px; font-size: 21px; }
#key-modal .modal-body { gap: 23px; }
#key-modal .field > span:first-child, #key-modal legend { font-size: 13px; color: #344865; font-weight: 600; }
#key-modal .field > small, #key-modal .permission-field > small { color: #8290a6; font-size: 11px; line-height: 1.7; }
#key-modal .input-shell, #key-modal .field-select { min-height: 46px; border-radius: 9px; background: #fbfcff; }
#key-modal .permission-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-height: 220px; padding: 2px; background: transparent; border: 0; }
#key-modal .permission-item { min-width: 0; padding: 13px; border: 1px solid #e1e7f1; border-radius: 10px; background: #fff; }
#key-modal .permission-item:has(input:checked) { border-color: #739cf0; background: #f3f7ff; box-shadow: 0 0 0 1px #739cf030; }
#key-modal .permission-item strong { font-size: 13px; }
#key-modal .permission-item small { font-size: 10px; overflow-wrap: anywhere; }
#key-modal .modal-note { padding: 14px; border-radius: 10px; background: #f5f8fd; border: 1px solid #e7edf6; }
#key-modal .modal-note strong { font-size: 12px; }
#key-modal .modal-note span { font-size: 11px; color: #7889a2; line-height: 1.7; }
#key-modal .modal-actions { border-top: 1px solid #edf1f6; padding-top: 20px; }
#key-modal .form-status:empty { display: none; }
@media (max-width: 1100px) {
  #app-view #keys-table { min-width: 900px; }
  #app-view #keys-table .key-row-icon { display: none; }
  #app-view #keys-table td { padding-inline: 10px; }
}
@media (max-width: 720px) {
  #app-view #view-keys .page-hero { flex-wrap: wrap; }
  #app-view #view-keys .page-hero > .primary-button { margin-top: 0; min-height: 40px; padding-inline: 16px; }
  #app-view #view-keys .page-hero > .primary-button span { display: inline; }
  #app-view #view-keys .table-tools { flex-direction: column; align-items: stretch; gap: 18px; padding: 22px 18px 16px; }
  #app-view #view-keys .search-box { width: 100%; }
  #app-view #view-keys .keys-filter-bar { flex-wrap: wrap; padding: 0 18px 18px; gap: 10px; }
  #app-view #view-keys .keys-refresh-actions { width: 100%; justify-content: space-between; }
  #app-view #view-keys .keys-filters { width: 100%; justify-content: space-between; gap: 2px; }
  #app-view #view-keys .keys-filters button { justify-content: center; padding: 7px; gap: 5px; font-size: 11px; flex: 1; }
  #app-view #view-keys .table-scroll { padding: 0 16px 16px; overflow: visible; }
  #app-view #keys-table { min-width: 0; display: block; }
  #app-view #keys-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #app-view #keys-table tbody { display: grid; gap: 14px; }
  #app-view #keys-table tr { display: grid; grid-template-columns: minmax(0,1fr); padding: 18px; border: 1px solid #e3eaf4; border-radius: 12px; background: #fff; }
  #app-view #keys-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border: 0; white-space: normal; }
  #app-view #keys-table td::before { content: attr(data-label); flex: 0 0 80px; color: #8593a8; font-size: 11px; }
  #app-view #keys-table .key-identity-cell { padding: 0 0 16px; margin-bottom: 8px; border-bottom: 1px solid #edf1f6; }
  #app-view #keys-table .key-identity-cell::before, #app-view #keys-table .key-actions-cell::before { display: none; }
  #app-view #keys-table .key-row-icon { display: grid; }
  #app-view #keys-table .key-identity strong { max-width: none; font-size: 14px; }
  #app-view #keys-table td:not(.key-identity-cell) .table-primary { text-align: right; align-items: flex-end; }
  #app-view #keys-table .key-actions-cell { padding-top: 14px; margin-top: 10px; border-top: 1px solid #edf1f6; }
  #app-view #keys-table .table-actions { width: 100%; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  #app-view #keys-table .table-action { min-height: 38px; padding: 6px; border-color: #e8edf5; background: #f9fbfe; }
  #app-view #view-keys .buysr-config-banner { padding: 22px; }
}
@media (max-width: 520px) {
  #key-modal { width: 100%; }
  #key-modal .modal-head { padding: 20px; }
  #key-modal .modal-head h2 { font-size: 19px; }
  #key-modal .field-pair { grid-template-columns: 1fr; gap: 20px; }
}
#key-modal .permission-item small { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 520px) {
  #key-modal .permission-list { grid-template-columns: 1fr; }
}

/* One-click setup destination. */
#view-setup .page-hero > .secondary-button { flex-shrink: 0; font-size: 12px; gap: 8px; }
#view-setup .setup-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; padding: 38px 42px; overflow: hidden; border: 1px solid #dce6fa; border-radius: 20px; background: radial-gradient(ellipse at 90% 10%,#dce9ff 0,transparent 65%),linear-gradient(115deg,#f2f7ff,#eaf2ff); }
#view-setup .setup-badge { display: inline-flex; align-items: center; gap: 7px; color: #4675bf; font-size: 12px; font-weight: 600; }
#view-setup .setup-badge .icon { width: 17px; height: 17px; }
#app-view #view-setup #setup-tool-title { margin: 20px 0 16px; font-size: 36px !important; line-height: 1.45; letter-spacing: -.035em; color: #203f6d; }
#view-setup .setup-hero-copy > p { color: #6e82a1; font-size: 13px; line-height: 1.9; margin: 0; }
#view-setup .setup-download-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 25px; }
#view-setup .setup-download { min-height: 44px; gap: 9px; text-decoration: none; padding: 11px 20px; }
#app-view #view-setup .setup-download:disabled { opacity: 1; background: #e0e8f5 !important; color: #788ba9; box-shadow: none; border-color: #d3deed; cursor: not-allowed; }
#view-setup .setup-package { font-size: 11px; color: #7e90aa; }
#view-setup .setup-hero-copy .setup-download-status { margin-top: 12px; max-width: 390px; font-size: 11px; }
#view-setup .setup-retry { border: 0; background: transparent; color: #396cc0; padding: 7px 0 0; font-size: 11px; cursor: pointer; }
#view-setup .setup-retry:hover { text-decoration: underline; }
#view-setup .setup-flow { align-self: center; width: 100%; max-width: 365px; justify-self: end; padding: 24px; border: 1px solid #fff; border-radius: 18px; background: #ffffffb8; box-shadow: 0 18px 45px #2c559514; }
#view-setup .setup-flow-caption { display: flex; align-items: center; gap: 8px; color: #8999b0; font-size: 9px; letter-spacing: .15em; margin-bottom: 20px; }
#view-setup .setup-flow-caption > span { width: 6px; height: 6px; border-radius: 50%; background: #81a7e6; }
#view-setup .setup-flow-row { display: flex; align-items: center; gap: 13px; }
#view-setup .setup-flow-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 11px; border: 1px solid #dce7fa; background: #f0f5ff; color: #5482cf; }
#view-setup .setup-flow-icon .icon { width: 20px; height: 20px; }
#view-setup .setup-flow-row > div { display: grid; gap: 5px; flex: 1; }
#view-setup .setup-flow-row small { font-size: 8px; color: #8b9cb6; letter-spacing: .1em; }
#view-setup .setup-flow-row strong { font-size: 13px; color: #39577f; font-weight: 550; }
#view-setup .setup-flow-row > .icon { width: 16px; height: 16px; color: #7e9fcc; }
#view-setup .setup-flow-line { height: 24px; width: 1px; margin-left: 21px; background: #d6e3f6; }
#view-setup .setup-flow > p { padding-top: 18px; margin: 19px 0 0; border-top: 1px solid #e3ebf7; color: #8c9bb0; font-size: 10px; text-align: center; }
#view-setup .setup-content-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; margin-top: 24px; }
#view-setup .setup-content-grid .panel { padding: 26px; min-width: 0; }
#view-setup .setup-content-grid .panel-head { margin-bottom: 24px; }
#view-setup .section-kicker { font-size: 9px; letter-spacing: .15em; }
#app-view #view-setup .setup-content-grid h2 { font-size: 18px !important; }
#view-setup .setup-section-tag { padding: 5px 9px; border-radius: 6px; background: #f2f6fc; color: #8293ad; font-size: 10px; white-space: nowrap; }
#view-setup .setup-step-list { display: grid; gap: 25px; list-style: none; margin: 0; padding: 0; }
#view-setup .setup-step-list li { display: flex; gap: 15px; }
#view-setup .setup-step-list li > span { display: grid; place-items: center; flex: 0 0 31px; height: 31px; color: #6991d2; border: 1px solid #e2eafa; border-radius: 50%; font-size: 11px; background: #f5f8ff; }
#view-setup h3 { margin: 0 0 7px; font-size: 13px; font-weight: 600; color: #3a506f; }
#view-setup .setup-step-list p, #view-setup .setup-key-callout p { margin: 0; font-size: 12px; line-height: 1.8; color: #7d8da5; }
#view-setup .setup-help-note { display: flex; align-items: flex-start; gap: 9px; border-top: 1px solid #edf1f7; margin-top: 24px; padding-top: 17px; color: #8797af; }
#view-setup .setup-help-note .icon { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
#view-setup .setup-help-note p { margin: 0; font-size: 11px; line-height: 1.8; }
#view-setup .setup-field-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 550; color: #506684; }
#view-setup .setup-field-label span { color: #95a2b6; font-size: 10px; font-weight: 400; }
#view-setup .setup-endpoint { display: flex; align-items: center; border: 1px solid #e0e8f5; border-radius: 9px; background: #f7faff; padding: 5px 7px 5px 13px; margin-top: 11px; }
#view-setup .setup-endpoint:focus-within { outline: 2px solid #abc6f8; outline-offset: 2px; }
#view-setup .setup-endpoint input { width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; color: #4e709f; font-family: ui-monospace,monospace; font-size: 12px; }
#view-setup .setup-endpoint .icon-button { width: 34px; height: 34px; flex: 0 0 34px; box-shadow: none; }
#view-setup .setup-field-help { color: #91a0b5; font-size: 11px; line-height: 1.8; margin: 9px 0 0; }
#view-setup #setup-copy-status:empty { display: none; }
#view-setup .setup-key-callout { display: flex; gap: 13px; margin: 25px 0 20px; padding-top: 23px; border-top: 1px solid #edf1f7; }
#view-setup .setup-key-callout > span { display: grid; place-items: center; flex: 0 0 37px; height: 37px; background: #edf4ff; color: #668fce; border-radius: 10px; }
#view-setup .setup-manage-keys { width: 100%; justify-content: space-between; color: #4b77bb; font-size: 12px; }
#view-setup .setup-faq { margin-top: 30px; }
#app-view #view-setup .setup-faq h2 { font-size: 17px !important; margin-bottom: 16px; }
#view-setup .setup-faq details { border-top: 1px solid #e0e8f3; padding: 16px 0; }
#view-setup .setup-faq summary { font-size: 13px; color: #596f8e; cursor: pointer; }
#view-setup .setup-faq details p { margin: 12px 0 0; color: #7a8da8; font-size: 12px; line-height: 1.9; max-width: 800px; }
#view-setup .setup-faq a, #view-setup .setup-faq button { color: #3b73cb; }
#view-setup .setup-faq button { margin-top: 10px; font-size: 12px; }
@media (max-width: 1100px) {
  #view-setup .setup-hero { gap: 24px; padding: 30px; }
  #view-setup .setup-flow { padding: 20px; }
}
@media (max-width: 760px) {
  #view-setup .setup-hero { grid-template-columns: 1fr; padding: 28px; }
  #view-setup .setup-flow { justify-self: stretch; max-width: none; }
  #view-setup .setup-content-grid { grid-template-columns: 1fr; gap: 18px; }
  #view-setup .page-hero { flex-wrap: wrap; }
  #app-view #view-setup #setup-tool-title { font-size: 30px !important; }
  #view-setup .setup-content-grid .panel { padding: 23px; }
  #view-setup .setup-step-list { gap: 22px; }
}
@media (max-width: 380px) {
  #view-setup .setup-hero { padding: 23px; }
  #view-setup .setup-content-grid .panel { padding: 20px; }
  #view-setup .setup-flow { padding: 17px; }
}

/* Account settings share one aligned workspace instead of scattered cards. */
#app-view #view-account .account-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 22px; }
#app-view #view-account .account-profile-card { position: static; justify-items: stretch; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 28px; text-align: left; border: 1px solid #e0e8f4; border-radius: 16px; box-shadow: 0 4px 20px #2b4a7c08; }
#view-account .account-identity { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
#view-account .account-identity-copy { min-width: 0; }
#view-account .account-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#app-view #view-account .account-profile-card h2 { margin: 0; font-size: 19px !important; color: #304a70; overflow-wrap: anywhere; }
#view-account .account-identity .avatar-large { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 16px; font-size: 22px; background: #edf3ff; border: 1px solid #dce7fb; color: #487bcb; box-shadow: none; }
#view-account .account-identity p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: #8292aa; overflow-wrap: anywhere; }
#view-account .verified-badge { margin: 0; padding: 4px 7px; font-size: 9px; white-space: nowrap; }
#app-view #view-account .account-profile-card dl { display: grid; grid-template-columns: auto auto auto; width: auto; gap: 25px; margin: 0; padding-left: 24px; border-left: 1px solid #e8edf5; }
#app-view #view-account .account-profile-card dl div { display: grid; justify-content: start; gap: 8px; padding: 0; border: 0; }
#app-view #view-account .account-profile-card dt { color: #92a0b4; font-size: 10px; }
#app-view #view-account .account-profile-card dd { color: #59708f; font-size: 11px; line-height: 1.5; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
#app-view #view-account .account-signout { width: auto; flex-shrink: 0; min-height: 36px; gap: 7px; padding: 7px 11px; font-size: 11px; color: #8291a6; border-color: #e5ebf3; background: #fafcff; }
#app-view #view-account .account-signout:hover { color: #b35d65; border-color: #f0d5d8; background: #fff7f7; }
#app-view #view-account .account-forms { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; overflow: hidden; background: #fff; border: 1px solid #e0e8f4; border-radius: 16px; box-shadow: 0 5px 24px #24497509; }
#app-view #view-account .settings-form { display: flex; flex-direction: column; gap: 0; padding: 28px; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#app-view #view-account #password-form { border-left: 1px solid #e8edf5; }
#view-account .account-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
#view-account .account-section-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 11px; background: #f0f5ff; border: 1px solid #e3ebfb; color: #6b91cf; }
#view-account .account-section-icon .icon { width: 18px; height: 18px; }
#app-view #view-account .account-section-head h2 { margin: 0; color: #344d70; font-size: 17px !important; }
#view-account .account-section-head p { color: #8b9ab0; font-size: 11px; line-height: 1.7; margin: 5px 0 0; }
#view-account .account-form-fields { display: grid; gap: 20px; }
#app-view #view-account .field { gap: 9px; }
#app-view #view-account .field > span:first-child { color: #59708e; font-size: 12px; font-weight: 550; }
#view-account .account-field-label { display: flex; align-items: center; justify-content: space-between; }
#app-view #view-account .account-field-label small { font-weight: 400; font-size: 10px; line-height: inherit; color: #a0acbd; }
#app-view #view-account .field > small { color: #93a1b5; font-size: 10px; line-height: 1.7; font-weight: 400; }
#app-view #view-account .input-shell { height: 44px; border: 1px solid #dfe7f2; border-radius: 9px; background: #fff; box-shadow: none; }
#app-view #view-account .input-shell:has(input[readonly]) { background: #f5f7fb; border-color: #e9edf4; }
#app-view #view-account .input-shell:focus-within { border-color: #85a9eb; box-shadow: 0 0 0 3px #4c83df0d; }
#app-view #view-account .input-shell input { font-size: 12px; color: #425f83; padding-inline: 13px; }
#app-view #view-account .input-shell input[readonly] { color: #8c9bb0; cursor: default; }
#view-account .input-shell input::placeholder { color: #a7b3c4; }
#app-view #view-account .form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: auto; padding-top: 25px; }
#app-view #view-account .form-status { flex: 1; font-size: 11px; line-height: 1.7; }
#view-account .form-status:empty { display: none; }
#app-view #view-account .form-actions button { min-height: 39px; min-width: 104px; font-size: 12px; border-radius: 8px; flex-shrink: 0; }
#app-view #view-account .security-settings { grid-column: 1 / -1; padding: 23px 28px 25px; border-top: 1px solid #e8edf5; background: #fbfcff; }
#view-account .account-security-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 17px; }
#app-view #view-account .account-security-head h2 { font-size: 14px !important; color: #5a708f; margin: 0; }
#view-account .account-security-head p { font-size: 10px; color: #98a6ba; margin: 5px 0 0; }
#view-account .account-security-mark { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #91a3bb; }
#view-account .account-security-mark .icon { width: 14px; height: 14px; }
#view-account .account-security-rows { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
#app-view #view-account .setting-row { min-width: 0; min-height: 74px; padding: 13px 15px; background: #fff; border: 1px solid #e8edf6; border-radius: 10px; gap: 11px; }
#app-view #view-account .setting-row strong { font-size: 12px; font-weight: 550; color: #58708f; }
#app-view #view-account .setting-row small { font-size: 10px; color: #96a4b8; line-height: 1.7; }
#view-account .setting-icon { width: 32px; height: 32px; background: #f3f6fc; border-color: #e8edf6; color: #8ca4ca; border-radius: 9px; }
#view-account .setting-row .status-badge { font-size: 10px; white-space: nowrap; }
#view-account .switch { opacity: .55; }
@media (max-width: 1250px) {
  #app-view #view-account .account-profile-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; }
  #app-view #view-account .account-profile-card dl { grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 18px 0 0; border-left: 0; border-top: 1px solid #e8edf5; }
  #view-account .account-signout { grid-column: 2; grid-row: 1; }
}
@media (max-width: 760px) {
  #app-view #view-account .account-layout { gap: 18px; }
  #app-view #view-account .account-profile-card { padding: 22px; gap: 18px; }
  #app-view #view-account .account-forms { grid-template-columns: minmax(0,1fr); }
  #app-view #view-account .settings-form { padding: 24px; }
  #app-view #view-account #password-form { border-left: 0; border-top: 1px solid #e8edf5; }
  #view-account .account-security-rows { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #app-view #view-account .security-settings { padding: 23px; }
  #view-account .account-section-head { margin-bottom: 24px; }
}
@media (max-width: 520px) {
  #app-view #view-account .account-profile-card { grid-template-columns: minmax(0,1fr); }
  #app-view #view-account .account-profile-card dl { gap: 13px; }
  #view-account .account-signout { grid-row: 3; grid-column: 1; justify-self: start; }
  #view-account .account-identity { gap: 13px; }
  #view-account .account-name-line { gap: 6px 10px; }
  #view-account .account-identity .avatar-large { width: 48px; height: 48px; flex-basis: 48px; border-radius: 13px; font-size: 20px; }
  #app-view #view-account .account-profile-card dd { font-size: 10px; }
  #app-view #view-account .settings-form { padding: 22px; }
  #app-view #view-account .security-settings { padding: 22px; }
  #app-view #view-account .setting-row { padding: 12px; gap: 9px; }
}

/* One-time credential handoff: readable key, clear save confirmation. */
#secret-modal { width: min(580px,calc(100vw - 32px)); border-radius: 20px; }
#secret-modal .modal-head { padding: 26px 28px; background: linear-gradient(120deg,#f4faf8,#f8faff); border-bottom: 1px solid #e5edf2; }
#secret-modal .secret-heading { display: flex; align-items: center; gap: 16px; }
#secret-modal .success-emblem { flex: 0 0 48px; width: 48px; height: 48px; margin: 0; border-radius: 15px; color: #199b71; background: #e9f6ef; border-color: #cde9dc; box-shadow: 0 4px 12px #199b7108; }
#secret-modal .section-kicker { font-size: 9px; letter-spacing: .15em; color: #7b92a4; }
#secret-modal .modal-head h2 { margin: 5px 0 6px; font-size: 22px; color: #243e60; }
#secret-modal .secret-heading p { margin: 0; font-size: 12px; line-height: 1.7; color: #7d8fa5; }
#secret-modal .modal-body { gap: 20px; padding: 24px 28px 26px; }
#secret-modal .secret-notice { display: flex; align-items: flex-start; gap: 10px; }
#secret-modal .secret-notice > .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: #ba8745; }
#secret-modal .secret-warning { display: grid; gap: 3px; text-align: left; }
#secret-modal .secret-warning strong { margin: 0; font-size: 13px; color: #7f623f; font-weight: 600; }
#secret-modal .secret-warning span { font-size: 12px; color: #8390a2; }
#secret-modal .secret-credential { min-width: 0; padding: 16px; border: 1px solid #dce6f6; border-radius: 13px; background: #f6f9ff; }
#secret-modal .secret-credential-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
#secret-modal .secret-credential-head > span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #5c7290; }
#secret-modal .secret-credential-head .icon { width: 15px; height: 15px; }
#secret-modal .copy-button { min-height: 33px; padding: 0 12px; border: 1px solid #dbe5f7; background: #fff; color: #306bce; font-size: 11px; box-shadow: 0 2px 5px #214a8010; }
#secret-modal .copy-button:hover { background: #edf3ff; border-color: #bbcff1; }
#secret-modal .secret-box { display: block; padding: 15px; border: 1px solid #e1e9f5; border-radius: 9px; background: #fff; }
#secret-modal .secret-box code { display: block; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: 13px; line-height: 1.85; letter-spacing: .2px; color: #294c79; overflow-wrap: anywhere; user-select: all; }
#secret-modal .secret-box:focus-within { border-color: #92b4ed; box-shadow: 0 0 0 3px #2465e80d; }
#secret-modal .secret-credential-help { margin: 11px 0 0; font-size: 11px; line-height: 1.6; color: #8a99ad; }
#secret-modal .confirm-saved { align-items: flex-start; gap: 11px; margin: 0; padding: 15px; background: #fff; border-color: #e4eaf3; border-radius: 11px; cursor: pointer; transition: background .2s,border-color .2s; }
#secret-modal .confirm-saved:has(input:checked) { border-color: #b9dcca; background: #f4faf7; }
#secret-modal .confirm-saved input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; accent-color: #268c69; }
#secret-modal .confirm-saved > span { display: grid; gap: 2px; }
#secret-modal .confirm-saved strong { font-size: 13px; color: #455e7c; font-weight: 550; }
#secret-modal .confirm-saved small { font-size: 11px; line-height: 1.7; color: #8797ab; }
#secret-modal .form-status { margin: -7px 0; padding: 10px 12px; border-radius: 8px; font-size: 12px; }
#secret-modal .form-status:empty { display: none; }
#secret-modal .form-status.is-error { color: #996c30; background: #fff8eb; border: 1px solid #f0e2c8; }
#secret-modal .form-status.is-success { color: #268662; background: #eff9f3; border: 1px solid #d9ecdf; }
#secret-modal .modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 0; padding-top: 19px; border-top: 1px solid #eaf0f6; }
#secret-modal .secret-footer-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #8c9bae; }
#secret-modal .secret-footer-hint .icon { width: 14px; height: 14px; }
#secret-modal #close-secret-button { min-height: 40px; padding: 0 19px; border-radius: 9px; font-size: 12px; }
@media (max-width: 520px) {
  #secret-modal { width: 100%; border-radius: 20px 20px 0 0; }
  #secret-modal .modal-head { padding: 22px 20px; }
  #secret-modal .modal-body { padding: 20px; gap: 18px; }
  #secret-modal .secret-heading { gap: 12px; }
  #secret-modal .modal-head h2 { font-size: 20px; }
  #secret-modal .secret-credential { padding: 12px; }
  #secret-modal .secret-box { padding: 12px; }
  #secret-modal .modal-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  #secret-modal .secret-footer-hint { justify-content: center; }
}

#view-usage .usage-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Usage: period-wide analytics above a paginated request ledger. */
#view-usage .usage-section-note { margin: 7px 0 0; color: #8797ac; font-size: 12px; line-height: 1.65; }
#view-usage .usage-detail-panel { padding: 25px 28px; }
#view-usage #usage-chart { overflow-x: auto; justify-content: flex-start; gap: 8px; }
#view-usage #usage-chart .bar-group { position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 28px; flex: 1 0 28px; }
#view-usage #usage-chart .bar { width: min(100%,38px); }
#view-usage #usage-chart .bar-label { position: absolute; bottom: -20px; left: 50%; width: 44px; font-size: 10px; transform: translateX(-50%); }
#view-usage .usage-records { padding: 0; overflow: hidden; border: 1px solid #e0e8f5; }
#view-usage .usage-records > .panel-head { padding: 25px 28px 20px; margin: 0; }
#view-usage .usage-records-tag { flex-shrink: 0; padding: 5px 10px; border-radius: 6px; background: #f2f6fc; color: #7890af; font-size: 11px; }
#view-usage #usage-table { min-width: 760px; }
#view-usage #usage-table th { background: #f7f9fd; color: #8191a8; font-size: 11px; font-weight: 500; border-block: 1px solid #eaf0f7; }
#view-usage #usage-table td { padding-block: 17px; font-size: 12px; font-variant-numeric: tabular-nums; }
#view-usage #usage-table td:first-child, #view-usage #usage-table th:first-child { padding-left: 28px; }
#view-usage #usage-table td:last-child, #view-usage #usage-table th:last-child { padding-right: 28px; text-align: right; }
#view-usage #usage-table .usage-time { color: #788ba6; white-space: nowrap; }
#view-usage #usage-table .usage-charge { color: #285eac; font-weight: 600; }
#view-usage #usage-table .table-primary strong { font-size: 12px; overflow-wrap: anywhere; }
#view-usage #usage-table .table-primary small { color: #91a0b6; margin-top: 5px; }
#view-usage #usage-table[aria-busy="true"] tbody { opacity: .4; }
#view-usage .usage-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 18px 28px; border-top: 1px solid #e8eef7; background: #fbfcff; }
#view-usage .usage-pagination > p { margin: 0; color: #8091a9; font-size: 12px; }
#view-usage .usage-page-controls, #view-usage .usage-page-controls nav, #view-usage .usage-page-size { display: flex; align-items: center; gap: 10px; }
#view-usage .usage-page-controls { gap: 20px; }
#view-usage .usage-page-size { color: #8091a9; font-size: 12px; }
#view-usage .usage-page-size select { width: auto; padding: 7px 9px; background: #fff; border: 1px solid #dce6f5; border-radius: 7px; color: #47638a; font-size: 12px; }
#view-usage .usage-pagination .secondary-button { min-height: 32px; padding: 0 12px; font-size: 12px; border-radius: 7px; }
#view-usage #usage-page-number { min-width: 45px; text-align: center; color: #526e96; font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  #view-usage .usage-detail-panel, #view-usage .usage-records > .panel-head { padding: 20px; }
  #view-usage .usage-records-tag { display: none; }
  #view-usage .usage-pagination { padding: 16px 20px; gap: 13px; }
  #view-usage .usage-page-controls { width: 100%; justify-content: space-between; gap: 8px; }
  #view-usage .usage-page-controls nav { gap: 6px; }
  #view-usage .usage-pagination .secondary-button { padding: 0 9px; }
}

/* Platform-specific downloads. Keep both operating systems visible. */
#view-setup .setup-platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0; }
#view-setup .setup-platform-card { min-width: 0; padding: 24px; border: 1px solid #dce6f7; border-radius: 16px; background: #fff; box-shadow: 0 6px 22px #244e8c04; }
#view-setup .setup-platform-card > header { display: flex; gap: 12px; align-items: center; }
#view-setup .setup-platform-card h2 { margin: 0; font-size: 19px; color: #233f69; }
#view-setup .setup-platform-card header p { font-size: 11px; color: #788ba6; margin: 5px 0 0; }
#view-setup .setup-platform-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: #edf4ff; color: #3c77dc; }
#view-setup .setup-platform-icon svg { width: 24px; height: 24px; fill: currentColor; }
#view-setup .setup-platform-card .setup-section-tag { margin-left: auto; white-space: nowrap; }
#view-setup .setup-platform-help, #view-setup .setup-platform-note { color: #70839f; font-size: 12px; line-height: 1.8; margin: 18px 0 0; }
#view-setup .setup-platform-note { font-size: 11px; padding-top: 12px; border-top: 1px solid #edf1f8; }
#view-setup .setup-platform-card .setup-download-actions { margin-top: 18px; gap: 10px; }
#view-setup .setup-platform-card .setup-download-status { color: #7388a6; margin: 10px 0 0; font-size: 11px; line-height: 1.7; min-height: 19px; }
#view-setup .setup-mac-choice { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
#view-setup .setup-mac-choice label { color: #5f7597; font-size: 12px; flex-shrink: 0; }
#view-setup .setup-mac-choice select { min-width: 0; flex: 1; max-width: 280px; padding: 9px 11px; border: 1px solid #d4e0f4; border-radius: 8px; background: #f8faff; color: #294d80; font: inherit; font-size: 12px; }
#view-setup .setup-mac-choice select:focus-visible { outline: 2px solid #5b8fff; outline-offset: 2px; }
#view-setup .setup-platform-card [hidden] { display: none !important; }
@media (max-width: 760px) { #view-setup .setup-platforms { grid-template-columns: 1fr; } }
@media (max-width: 420px) { #view-setup .setup-platform-card { padding: 18px; } #view-setup .setup-mac-choice { align-items: stretch; flex-direction: column; gap: 8px; } }

#key-modal .permission-list.group-picker { display: block; max-height: none; overflow: visible; }
#key-modal .key-group-select { display: flex; width: 100%; }
#key-modal .key-group-select select { width: 100%; min-width: 0; font-size: 13px; text-overflow: ellipsis; }

/* ---------- One-click setup: visual refresh (overrides the rules above) ---------- */

/* Hero: brand gradient, soft glows and a gradient headline. */
#view-setup .setup-hero { position: relative; isolation: isolate; border-color: #d4e2fa; border-radius: 22px; background: linear-gradient(135deg, #f5f9ff 0%, #edf4ff 48%, #ecfaf6 100%); box-shadow: 0 26px 60px -40px rgba(36, 101, 232, .55); }
#view-setup .setup-hero::before, #view-setup .setup-hero::after { position: absolute; z-index: -1; content: ""; border-radius: 50%; pointer-events: none; }
#view-setup .setup-hero::before { top: -190px; right: -140px; width: 460px; height: 460px; background: radial-gradient(circle, rgba(36, 101, 232, .17), transparent 66%); }
#view-setup .setup-hero::after { bottom: -230px; left: -120px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(32, 233, 186, .16), transparent 66%); }
#view-setup .setup-badge { padding: 6px 12px 6px 9px; color: #2465e8; background: rgba(255, 255, 255, .85); border: 1px solid #d6e4fb; border-radius: 999px; box-shadow: 0 6px 16px -12px rgba(36, 101, 232, .6); }
#app-view #view-setup #setup-tool-title { width: fit-content; color: #10294f; background: linear-gradient(100deg, #10294f 0%, #1f55c9 55%, #109e86 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#view-setup .setup-hero-copy > p { color: #5f7393; }
#view-setup .setup-flow { background: rgba(255, 255, 255, .86); border-color: rgba(255, 255, 255, .95); box-shadow: 0 24px 50px -30px rgba(31, 78, 160, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#view-setup .setup-flow-caption > span { background: #20c997; box-shadow: 0 0 0 4px rgba(32, 201, 151, .15); }
#view-setup .setup-flow-icon { color: #fff; background: linear-gradient(135deg, #2465e8, #3fa2f0); border: 0; box-shadow: 0 10px 18px -10px rgba(36, 101, 232, .75); }
#view-setup .setup-flow-row:nth-of-type(4) .setup-flow-icon { background: linear-gradient(135deg, #3b6fe0, #21b4c6); }
#view-setup .setup-flow-row:last-of-type .setup-flow-icon { background: linear-gradient(135deg, #14a38b, #2fd0a5); box-shadow: 0 10px 18px -10px rgba(20, 163, 139, .75); }
#view-setup .setup-flow-row strong { color: #1f3b63; font-weight: 600; }
#view-setup .setup-flow-row > .icon { color: #19a383; }
#view-setup .setup-flow-line { width: 2px; margin-left: 20px; background: linear-gradient(#9cc0f8, #9fe3d0); border-radius: 2px; }

/* Download cards: a colour per platform, lift on hover. */
#view-setup .setup-platform-card { position: relative; overflow: hidden; padding: 26px; border-color: #dfe7f3; border-radius: 18px; box-shadow: 0 1px 2px rgba(23, 45, 76, .04), 0 12px 30px -24px rgba(23, 45, 76, .4); transition: transform .22s var(--ui-ease), box-shadow .22s, border-color .22s; }
#view-setup .setup-platform-card::before { position: absolute; inset: 0 0 auto; height: 3px; content: ""; background: linear-gradient(90deg, #2b7de9, #59c2ff); }
#view-setup .setup-platform-card[data-setup-download="mac"]::before { background: linear-gradient(90deg, #1f2937, #8a96a8); }
#view-setup .setup-platform-card:hover { transform: translateY(-2px); border-color: #c9d9f2; box-shadow: 0 1px 2px rgba(23, 45, 76, .04), 0 22px 40px -28px rgba(23, 45, 76, .5); }
#view-setup .setup-platform-icon { width: 48px; height: 48px; color: #fff; background: linear-gradient(135deg, #2b7de9, #45b6fe); border-radius: 14px; box-shadow: 0 10px 20px -12px rgba(43, 125, 233, .8); }
#view-setup .setup-platform-card[data-setup-download="mac"] .setup-platform-icon { background: linear-gradient(135deg, #1f2937, #5f6d80); box-shadow: 0 10px 20px -12px rgba(31, 41, 55, .8); }
#view-setup .setup-platform-card h2 { color: #142b4d; font-size: 20px; }
#view-setup .setup-platform-card .setup-section-tag { color: #2465e8; font-weight: 600; background: #eef4ff; border-radius: 999px; }
#view-setup .setup-platform-card[data-setup-download="mac"] .setup-section-tag { color: #3b4657; background: #f0f2f5; }
#view-setup .setup-platform-help { color: #62758f; }
#view-setup .setup-download { border-radius: 11px; }
#app-view #view-setup .setup-platform-card[data-setup-download="mac"] .setup-download:not(:disabled) { background: #1f2937 !important; box-shadow: 0 8px 18px -10px rgba(31, 41, 55, .7); }
#app-view #view-setup .setup-platform-card[data-setup-download="mac"] .setup-download:not(:disabled):hover { background: #111827 !important; }
#view-setup .setup-package { padding: 3px 8px; background: #f3f6fa; border-radius: 999px; }
#view-setup .setup-mac-choice select { max-width: 300px; padding: 10px 12px; background: #fff; border-color: #d6e0ee; border-radius: 10px; }
#view-setup .setup-platform-note { padding: 10px 12px; color: #6a7c95; background: #f7f9fc; border: 0; border-radius: 10px; }

/* Steps as a timeline with numbered gradient badges. */
#view-setup .setup-step-list { gap: 0; }
#view-setup .setup-step-list li { position: relative; padding-bottom: 24px; }
#view-setup .setup-step-list li:last-child { padding-bottom: 0; }
#view-setup .setup-step-list li:not(:last-child)::before { position: absolute; top: 38px; bottom: 6px; left: 16px; width: 2px; content: ""; background: linear-gradient(#cddff9, #d3f1e8); border-radius: 2px; }
#view-setup .setup-step-list li > span { position: relative; z-index: 1; flex: 0 0 34px; height: 34px; color: #fff; font-size: 12px; font-weight: 700; background: linear-gradient(135deg, #2465e8, #3fa2f0); border: 0; box-shadow: 0 8px 16px -10px rgba(36, 101, 232, .8); }
#view-setup .setup-step-list li:nth-child(2) > span { background: linear-gradient(135deg, #3b6fe0, #21b4c6); }
#view-setup .setup-step-list li:nth-child(3) > span { background: linear-gradient(135deg, #14a38b, #2fd0a5); box-shadow: 0 8px 16px -10px rgba(20, 163, 139, .8); }
#view-setup .setup-step-list h3 { margin-top: 6px; color: #1f3b63; font-size: 14px; }
#view-setup .setup-help-note { padding: 12px 14px; color: #5f7393; background: #f5f8ff; border: 0; border-radius: 12px; }
#view-setup .setup-help-note .icon { color: #2465e8; }

/* Connection details: a code pill and a tinted call-out card. */
#view-setup .setup-endpoint { padding: 6px 6px 6px 14px; background: linear-gradient(180deg, #f9fbff, #f2f6fe); border-color: #d6e3f8; border-radius: 12px; }
#view-setup .setup-endpoint input { color: #1d4f9e; font-weight: 600; }
#view-setup .setup-endpoint .icon-button { background: #fff; border: 1px solid #dbe5f4; }
#view-setup .setup-key-callout { margin: 22px 0 16px; padding: 16px; background: linear-gradient(135deg, #f3f7ff, #eefaf6); border: 1px solid #dfe9f8; border-radius: 14px; }
#view-setup .setup-key-callout > span { color: #fff; background: linear-gradient(135deg, #2465e8, #3fa2f0); border-radius: 11px; box-shadow: 0 8px 16px -10px rgba(36, 101, 232, .8); }
#view-setup .setup-key-callout h3 { color: #1f3b63; }
#view-setup .setup-manage-keys { border-radius: 11px; }

/* FAQ: cards with a rotating chevron. */
#view-setup .setup-faq details { margin-bottom: 12px; padding: 0; background: #fff; border: 1px solid #e1e8f2; border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
#view-setup .setup-faq details:hover { border-color: #cddcf2; }
#view-setup .setup-faq details[open] { border-color: #c6d8f6; box-shadow: 0 14px 30px -24px rgba(36, 101, 232, .55); }
#view-setup .setup-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: #1f3b63; font-weight: 600; list-style: none; }
#view-setup .setup-faq summary::-webkit-details-marker { display: none; }
#view-setup .setup-faq summary::after { width: 8px; height: 8px; flex: 0 0 auto; margin-top: -4px; content: ""; border-right: 2px solid #8aa0bf; border-bottom: 2px solid #8aa0bf; transform: rotate(45deg); transition: transform .2s; }
#view-setup .setup-faq details[open] summary::after { margin-top: 4px; transform: rotate(-135deg); }
#view-setup .setup-faq details p { margin: 0; padding: 0 18px; }
#view-setup .setup-faq details > button { margin: 10px 18px 16px; }

@media (max-width: 760px) {
  #view-setup .setup-platform-card { padding: 22px; }
  #view-setup .setup-platform-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #view-setup .setup-platform-card, #view-setup .setup-faq details, #view-setup .setup-faq summary::after { transition: none; }
  #view-setup .setup-platform-card:hover { transform: none; }
}

/* ---------- Wallet: recharge state while it is still being checked ---------- */
#app-view .payment-notice.is-loading { color: #4b6285; background: linear-gradient(90deg, #f6f9fd 0%, #edf3fc 50%, #f6f9fd 100%); background-size: 200% 100%; border-color: #e1e8f3; animation: payment-notice-shimmer 1.6s ease-in-out infinite; }
#app-view .payment-notice.is-loading > span { background: #fff; border: 1px solid #e1e8f3; }
#app-view .payment-notice.is-loading > span .icon { display: none; }
#app-view .payment-notice.is-loading > span::after { width: 16px; height: 16px; content: ""; border: 2px solid #d3e0f5; border-top-color: var(--accent); border-radius: 50%; animation: payment-spin .8s linear infinite; }
#app-view .payment-notice.is-loading strong { color: #2b4469; }
#app-view #recharge-button[aria-busy="true"] .icon { display: none; }
#app-view #recharge-button[aria-busy="true"]::before { width: 14px; height: 14px; flex: 0 0 auto; content: ""; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: payment-spin .8s linear infinite; }
@keyframes payment-spin { to { transform: rotate(360deg); } }
@keyframes payment-notice-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
  #app-view .payment-notice.is-loading, #app-view .payment-notice.is-loading > span::after, #app-view #recharge-button[aria-busy="true"]::before { animation: none; }
}

/* ---------- Models: group tabs and a price table per group ---------- */
#app-view .model-catalog { display: grid; gap: 14px; }
#app-view .model-catalog[hidden] { display: none; }
#app-view .model-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
#app-view .model-tabs::-webkit-scrollbar { display: none; }
#app-view .model-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 42px; padding: 0 8px 0 10px; color: #3d5374; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; border: 1px solid #e1e8f2; border-radius: 12px; transition: border-color .18s, background-color .18s, color .18s, box-shadow .18s; }
#app-view .model-tab:hover { border-color: #c9d8ee; box-shadow: 0 6px 16px -12px rgba(23, 45, 76, .35); }
#app-view .model-tab:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .45); outline-offset: 2px; }
#app-view .model-tab.is-active { color: var(--accent-bright); background: #f2f7ff; border-color: #a9c4f6; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }
#app-view .model-tab.is-empty:not(.is-active) { opacity: .5; }
#app-view .model-tab .model-brand-logo { width: 24px; height: 24px; background: #fff; border-radius: 7px; }
#app-view .model-tab .model-brand-logo img { width: 16px; height: 16px; }
#app-view .model-tab-rate { padding: 2px 7px; color: #5c7090; font-size: 11px; font-weight: 600; background: #f1f4f9; border-radius: 999px; font-variant-numeric: tabular-nums; }
#app-view .model-tab.is-active .model-tab-rate { color: #fff; background: var(--accent); }
#app-view .model-brand-logo { display: inline-grid; flex: 0 0 auto; place-items: center; }
#app-view .model-brand-logo .icon { width: 16px; height: 16px; color: #8a99ad; }

#app-view .model-panel { overflow: hidden; background: #fff; border: 1px solid #e1e8f2; border-radius: 16px; box-shadow: 0 1px 2px rgba(23, 45, 76, .04), 0 12px 30px -26px rgba(23, 45, 76, .4); }
#app-view .model-panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 18px 22px; border-bottom: 1px solid #edf1f7; }
#app-view .model-panel-title h2 { margin: 0; color: #142b4d; font-size: 17px; font-weight: 700; }
#app-view .model-panel-title p { margin: 4px 0 0; color: #6b7c93; font-size: 12px; line-height: 1.6; }
#app-view .model-panel-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
#app-view .model-fact { padding: 4px 10px; color: #5c7090; font-size: 12px; white-space: nowrap; background: #f5f7fb; border-radius: 999px; }
#app-view .model-fact.is-rate { color: #1f3b63; }
#app-view .model-fact.is-rate strong { color: var(--accent-bright); font-weight: 700; }
#app-view .model-fact.is-rate s { color: #9aa7b8; }
#app-view .model-fact.is-exclusive { color: #7448d6; background: #f4efff; }
#app-view .model-panel-peak { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 22px; color: #a86405; font-size: 12px; background: #fffaf0; border-bottom: 1px solid #f6ead2; }
#app-view .model-panel-peak .icon { width: 14px; height: 14px; }

#app-view .model-price-table { width: 100%; border-collapse: collapse; }
#app-view .model-price-table th { padding: 10px 22px; color: #7a8ca4; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; background: #fafbfd; border-bottom: 1px solid #edf1f7; }
#app-view .model-price-table th small { margin-left: 4px; color: #a3b0c2; font-weight: 400; }
#app-view .model-price-table th.is-price, #app-view .model-price-table td.model-price-cell { text-align: right; }
#app-view .model-price-table td { padding: 13px 22px; border-bottom: 1px solid #f0f3f8; }
#app-view .model-price-table tbody tr:last-child td { border-bottom: 0; }
#app-view .model-price-table tbody tr { transition: background-color .15s; }
#app-view .model-price-table tbody tr:hover { background: #f8fafd; }
#app-view .model-name { display: inline-flex; min-width: 0; align-items: center; gap: 10px; }
#app-view .model-name .model-brand-logo { width: 30px; height: 30px; background: #f7f9fc; border: 1px solid #edf1f7; border-radius: 9px; }
#app-view .model-name .model-brand-logo img { width: 18px; height: 18px; }
#app-view .model-name code { color: #142b4d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
#app-view .model-price-cell { color: #142b4d; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
#app-view .model-price-cell.is-wide { color: #4e647f; font-weight: 500; }
#app-view .model-action-cell { width: 60px; text-align: right; }
#app-view .model-copy { width: 32px; height: 32px; min-width: 32px; min-height: 32px; color: #8a99ad; background: transparent; border-color: transparent; box-shadow: none; }
#app-view .model-copy .icon { width: 15px; height: 15px; }
#app-view .model-price-table tr:hover .model-copy, #app-view .model-copy:focus-visible { color: var(--accent); background: #fff; border-color: #e1e8f2; }
#app-view .model-panel-empty { display: grid; gap: 4px; padding: 34px 22px; color: #748196; font-size: 12px; text-align: center; }
#app-view .model-panel-empty strong { color: #1f3b63; font-size: 14px; }

@media (max-width: 640px) {
  #app-view .model-panel-head { padding: 16px; }
  #app-view .model-panel-peak { padding: 10px 16px; }
  #app-view .model-price-table thead { display: none; }
  #app-view .model-price-table, #app-view .model-price-table tbody { display: block; }
  #app-view .model-price-table tbody tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid #f0f3f8; }
  #app-view .model-price-table tbody tr:last-child { border-bottom: 0; }
  #app-view .model-price-table td { display: block; padding: 0; border: 0; }
  #app-view .model-name-cell { grid-column: 1 / 3; }
  #app-view .model-action-cell { grid-column: 3; grid-row: 1; width: auto; }
  #app-view .model-price-table td.model-price-cell { grid-row: 2; text-align: left; }
  #app-view .model-price-table td.model-price-cell.is-wide { grid-column: 1 / 3; }
  #app-view .model-price-cell::before { display: block; margin-bottom: 2px; color: #8a99ad; font-size: 11px; font-weight: 500; content: attr(data-label) " · 百万 Token"; }
  #app-view .model-price-cell.is-wide::before { content: attr(data-label); }
}
@media (prefers-reduced-motion: reduce) {
  #app-view .model-tab, #app-view .model-price-table tbody tr { transition: none; }
}

/* One destination for installation and connection setup. */
#view-setup .setup-welcome { display:flex; align-items:center; justify-content:space-between; gap:32px; padding:30px 34px; border:1px solid #dce6f5; border-radius:20px; background:linear-gradient(120deg,#f3f7ff,#f0faf7); }
#app-view #view-setup .setup-welcome #setup-tool-title { margin:14px 0 10px; font-size:30px !important; line-height:1.35; color:#17365d; background:none; -webkit-text-fill-color:initial; }
#view-setup .setup-welcome p { margin:0; font-size:13px; line-height:1.85; color:#667c97; }
#view-setup .setup-shortcuts { display:grid; gap:10px; min-width:245px; }
#view-setup .setup-shortcuts button { justify-content:space-between; gap:16px; }
#view-setup .setup-stage { margin-top:36px; }
#view-setup .setup-stage-head { display:flex; align-items:center; gap:14px; }
#view-setup .setup-stage-head > div { flex:1; min-width:0; }
#app-view #view-setup .setup-stage-head h2 { margin:0 0 6px; font-size:20px !important; color:#1f3b63; scroll-margin-top:100px; }
#view-setup .setup-stage-head h2:focus-visible { outline:2px solid #2465e8; outline-offset:6px; border-radius:4px; }
#view-setup .setup-stage-head p { margin:0; color:#7185a0; font-size:12px; line-height:1.75; }
#view-setup .setup-stage-number { flex:0 0 38px; height:38px; display:grid; place-items:center; color:#2465e8; font-size:13px; font-weight:700; border-radius:12px; border:1px solid #d8e5fb; background:#edf4ff; }
#view-setup .setup-platforms { margin-top:18px; }
#view-setup .setup-platform-card.is-recommended { border-color:#8fb6f4; }
#view-setup .setup-recommendation { display:inline-block; vertical-align:middle; margin-left:5px; padding:3px 7px; border-radius:6px; color:#2465e8; background:#edf4ff; font-size:10px; font-weight:600; }
#view-setup .setup-recommendation[hidden] { display:none; }
#view-setup .setup-client-tags { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0 52px; }
#view-setup .setup-client-tags span { padding:5px 10px; border:1px solid #dce6f3; background:#fff; border-radius:7px; font-size:11px; color:#506f91; }
#view-setup .setup-content-grid { margin-top:18px; }
#view-setup .setup-faq { margin-top:36px; }
@media(max-width:760px) {
 #view-setup .setup-welcome { flex-direction:column; align-items:stretch; padding:24px; gap:22px; }
 #view-setup .setup-shortcuts { min-width:0; }
 #app-view #view-setup .setup-welcome #setup-tool-title { font-size:25px !important; }
 #view-setup .setup-stage { margin-top:28px; }
 #view-setup .setup-stage-head > .setup-section-tag { display:none; }
 #view-setup .setup-client-tags { margin-left:0; }
}
