/* Shared palette for gateway, customer pages and authentication documents.
   Loaded by the shared shell/auth head. html:root deliberately has higher
   specificity than :root, so this remains a single light-theme authority.
   Only colors/surfaces change; structure, motion and the dark theme do not. */
@media (prefers-color-scheme: light) {
  html:root {
    color-scheme: light;
    --bg: #f4f7fb; --side: #ffffff; --panel: #ffffff; --panel2: #f6f8fc;
    --line: #ced8e5; --line2: #e0e7f0; --text: #192c43; --muted: #506580;
    --accent: #245fca; --blue: #245fca; --green: #117649; --ok: #117649;
    --yellow: #85600e; --red: #ad2942; --danger: #ad2942; --info: #235aa8; --focus: #174da5;
    --shadow: 0 18px 50px rgba(29, 54, 86, .08);
  }
  html:root body, html:root .auth-page { background: var(--bg); }
  html:root a { color: #205bb4; }
  html:root a:hover { color: #153e82; }
  html:root .auth-brand, html:root .brand, html:root .brand:hover { color: var(--text); }
  html:root .auth-intro { border-color: var(--line); background: radial-gradient(circle at 20% 15%, #e4efd0, transparent 35%), radial-gradient(circle at 80% 82%, #dce9fc, transparent 40%), #f2f6fb; }
  html:root .auth-intro:after { background-image: linear-gradient(rgba(36, 75, 117, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(36, 75, 117, .09) 1px, transparent 1px); }
  html:root .eyebrow { color: #526b18; }

  html:root input, html:root select, html:root textarea,
  html:root .field input, html:root .field select, html:root .field textarea,
  html:root .plan-picker-options, html:root .routing-json-file { background: #fff; color: var(--text); border-color: #b6c4d6; }
  html:root .field label, html:root .users-tools label,
  html:root .metric .s, html:root th, html:root .table-menu,
  html:root .status-text.off { color: var(--muted); }
  html:root input::placeholder, html:root textarea::placeholder { color: #5c6f88; opacity: 1; }
  html:root input:disabled, html:root select:disabled, html:root textarea:disabled { color: #65748b; background: #e7edf5; }
  html:root input:focus, html:root select:focus, html:root textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(36, 95, 202, .12); }
  html:root .btn, html:root .btn:hover, html:root a.button-link, html:root .skip-link { color: #fff; }
  html:root .btn.alt, html:root .btn.secondary { color: var(--text); background: var(--panel); border-color: #7895bb; }
  html:root .btn.danger, html:root .table-menu-danger:hover { color: #9a2338; background: #fff0f2; border-color: #dda4ad; }
  html:root .btn.service-start { color: #12653e; background: #e9f8ef; border-color: #9bceb0; }
  html:root .btn:disabled, html:root .btn:disabled:hover, html:root .btn:disabled:active { color: #65748b; background: #e7edf5; border-color: var(--line); }
  html:root .release-bundle-field input[type="file"]::file-selector-button,
  html:root .app-publish-file input[type="file"]::file-selector-button,
  html:root .app-publish-approval input[type="file"]::file-selector-button,
  html:root .routing-json-file::file-selector-button { color: var(--text); background: var(--panel2); border-color: #7895bb; }
  html:root .release-bundle-field input[type="file"]::file-selector-button:hover,
  html:root .app-publish-file input[type="file"]::file-selector-button:hover,
  html:root .app-publish-approval input[type="file"]::file-selector-button:hover,
  html:root .routing-json-file:hover::file-selector-button { background: #e5efff; border-color: var(--blue); }

  html:root .top { background: #f4f7fbf2; border-color: var(--line); }
  html:root .breadcrumb span:first-child { color: var(--muted); }
  html:root .side, html:root .brand, html:root .side-account { border-color: var(--line); }
  html:root .side-group { color: #235aa8; }
  html:root .side-group::after { background: var(--line); }
  html:root .side-nav a, html:root .side-nav button,
  html:root .account-nav a, html:root .account-nav button { color: var(--text); }
  html:root .side-nav a:hover, html:root .side-nav button:hover,
  html:root .account-nav a:hover, html:root .account-nav button:hover,
  html:root .top-link:hover { background: #edf3fc; }
  html:root .side-nav a.active, html:root .account-nav a.active, html:root .account-nav button.active { color: #184d9c; background: #e5efff; }
  html:root .side-nav .count { color: var(--muted); background: var(--panel2); border-color: var(--line); }
  html:root .avatar { background: #edf3fb; border-color: var(--line); }
  html:root .mobile-nav-toggle span { background: var(--muted); }
  html:root .mobile-tabs { background: #fffffff5; border-color: var(--line); box-shadow: 0 -8px 24px rgba(29, 54, 86, .09); }
  html:root .mobile-tabs a, html:root .mobile-tabs button { color: var(--muted); }
  html:root .mobile-tabs a.active { color: #184d9c; background: #e5efff; }

  html:root .status.ok, html:root .badge.ok { color: #11663f; background: #e2f5e9; border-color: #9bceb0; }
  html:root .status.warn { color: #795707; background: #fff4d9; }
  html:root .status.err, html:root .badge.danger { color: #9a2338; background: #fff0f2; }
  html:root .status.off, html:root .badge.off { color: #506580; background: #e8edf4; }
  html:root .flash-error, html:root .routing-import-validation.is-error,
  html:root .result-error .result-icon, html:root .auth-result-icon.error { color: #9a2338; border-color: #dda4ad; background: #fff0f2; }
  html:root .flash-success, html:root .ok-notice, html:root .routing-import-validation.is-valid,
  html:root .result-success .result-icon, html:root .auth-result-icon.success { color: #12653e; border-color: #9bceb0; background: #e9f8ef; }
  html:root .flash-info, html:root .mail-verification, html:root .support-live-notice { color: #24538d; border-color: #a7c5eb; background: #edf5ff; }
  html:root .notice, html:root .refresh-stale, html:root .routing-import-atomic { color: #795707; border-color: #d7be77; background: #fff7e4; }
  html:root .refresh-stale-copy span, html:root .routing-import-atomic b { color: #795707; }
  html:root .danger-zone, html:root .modal-section.danger-zone { border-color: #dda4ad; background: #fff0f2; }
  html:root .danger-zone b { color: #9a2338; }
  html:root .danger-zone span { color: #825361; }
  html:root .role-badge, html:root .routing-mode-badge, html:root .mail-step { color: #235aa8; background: #e5efff; border-color: #a7c5eb; }

  html:root .empty { border-color: #b6c4d6; }
  html:root .bar { background: #dce5ef; }
  html:root pre, html:root .monitor-node, html:root .mini-chart,
  html:root .referral-access-card { background: var(--panel2); }
  html:root .network-card { border-color: #9bceb0; background: #e9f8ef; }
  html:root .session-transfer .transfer-down { color: #235aa8; }
  html:root .session-transfer .transfer-up { color: #117649; }
  html:root dialog.modal { border-color: #b6c4d6; box-shadow: 0 28px 80px rgba(29, 54, 86, .25); }
  html:root dialog.modal::backdrop { background: rgba(29, 44, 63, .45); }
  html:root .support-message { background: var(--panel2); }
  html:root .support-message.admin { border-color: #a7c5eb; background: #edf5ff; }
  html:root .support-screenshot { background: #e8edf4; }
}
