


/* ============================================================ */
/* UI refresh (2026-10)                                          */
/* "Calm terminal": neutral canvas, crisp white surfaces,        */
/* hairline borders, one confident blue accent, quieter chrome.  */
/* This layer intentionally overrides the older gradients.       */
/* ============================================================ */

:root {
  --ui-font-sans: "SF Pro Text", "Inter", "Segoe UI", "PingFang SC",
                  "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ui-ink: #0f172a;
  --ui-text: #334155;
  --ui-muted: #64748b;
  --ui-subtle: #7d8ba0;
  --ui-border: #e7ebf2;
  --ui-border-strong: #d9e1ec;
  --ui-page: #f5f6fa;
  --ui-accent: #2563eb;
  --ui-accent-deep: #1d4ed8;
  --ui-accent-soft: #eff5ff;
  --ui-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.03),
                    0 16px 40px -32px rgba(15, 23, 42, 0.25);
  --ui-ring: 0 0 0 3px rgba(37, 99, 235, 0.14);

  --page-bg: #f5f6fa;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-muted: #f7f9fc;
  --surface-border: #e7ebf2;
  --surface-border-strong: #d9e1ec;
  --surface-shadow: var(--ui-card-shadow);
  --surface-shadow-soft: var(--ui-card-shadow);
  --brand-900: #0b1220;
  --brand-800: #13213c;
  --brand-700: #1d4ed8;
  --brand-600: #2563eb;
  --brand-500: #3b82f6;
  --brand-050: #eff5ff;
  --success-600: #059669;
  --danger-600: #e11d48;
  --warning-600: #b45309;
  --text-900: #0f172a;
  --text-700: #334155;
  --text-500: #64748b;
  --text-inverse: #f8fafc;
  --focus-ring: var(--ui-ring);
  --radius-xl: 18px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --grid-line: #f0f3f8;
  --tape-up: #059669;
  --tape-down: #e11d48;
  --tape-flat: #94a3b8;

  /* Align Bootstrap's own variables with the refreshed palette so
     components we do not style directly still inherit sane colors. */
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-body-color: #0f172a;
  --bs-body-bg: #f5f6fa;
  --bs-border-color: #e7ebf2;
  --bs-secondary-color: #64748b;
}

html[data-theme="dark"] {
  --ui-ink: #e8eefb;
  --ui-text: #c7d2e3;
  --ui-muted: #8b9bb4;
  --ui-subtle: #6b7c96;
  --ui-border: rgba(148, 163, 184, 0.16);
  --ui-border-strong: rgba(148, 163, 184, 0.26);
  --ui-page: #070b14;
  --ui-accent: #60a5fa;
  --ui-accent-deep: #93c5fd;
  --ui-accent-soft: rgba(59, 130, 246, 0.14);
  --ui-card-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset,
                    0 22px 44px -34px rgba(0, 0, 0, 0.9);
  --ui-ring: 0 0 0 3px rgba(96, 165, 250, 0.22);

  --page-bg: #070b14;
  --surface: #0e1626;
  --surface-strong: #111a2b;
  --surface-muted: #0b1322;
  --surface-border: rgba(148, 163, 184, 0.16);
  --surface-border-strong: rgba(148, 163, 184, 0.26);
  --surface-shadow: var(--ui-card-shadow);
  --surface-shadow-soft: var(--ui-card-shadow);
  --brand-900: #f8fafc;
  --brand-800: #dbeafe;
  --brand-700: #93c5fd;
  --brand-600: #60a5fa;
  --brand-500: #3b82f6;
  --brand-050: rgba(59, 130, 246, 0.14);
  --success-600: #34d399;
  --danger-600: #fb7185;
  --warning-600: #fbbf24;
  --text-900: #e8eefb;
  --text-700: #c7d2e3;
  --text-500: #8b9bb4;
  --text-inverse: #0b1220;
  --grid-line: rgba(148, 163, 184, 0.10);
  --tape-up: #34d399;
  --tape-down: #fb7185;

  --bs-body-color: #c7d2e3;
  --bs-body-bg: #070b14;
  --bs-border-color: rgba(148, 163, 184, 0.2);
  --bs-secondary-color: #8b9bb4;
  --bs-emphasis-color: #f8fafc;
}

/* ---------- Canvas + typography ---------- */

html body {
  font-family: var(--ui-font-sans);
  color: var(--ui-ink);
  background-color: var(--ui-page);
  background-image:
    radial-gradient(920px 460px at 5% -8%, rgba(37, 99, 235, 0.07), transparent 62%),
    radial-gradient(780px 420px at 100% -2%, rgba(13, 148, 136, 0.05), transparent 58%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme="dark"] body {
  background-color: #070b14;
  background-image:
    radial-gradient(920px 500px at 6% -10%, rgba(59, 130, 246, 0.15), transparent 62%),
    radial-gradient(800px 460px at 100% 0%, rgba(14, 116, 144, 0.12), transparent 58%);
}

html body .app-main {
  padding-top: 0.55rem;
  padding-bottom: 1.5rem;
}

html body .app-shell {
  max-width: 1480px;
}

html body .workbench-grid {
  align-items: start;
}

html body .page-section + .page-section {
  margin-top: 0.7rem;
}

/* ---------- Top navigation ---------- */

html body .navbar {
  background: rgba(255, 255, 255, 0.82) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

html[data-theme="dark"] body .navbar {
  background: rgba(8, 13, 24, 0.82) !important;
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

html body .navbar-compact {
  min-height: 54px;
}

html body .navbar-compact .container-fluid.app-shell {
  padding-block: 0.34rem;
}

html body .navbar-brand {
  color: var(--ui-ink) !important;
  gap: 0.5rem;
}

html body .brand-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

html body .brand-name {
  color: var(--ui-ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

html body .mobile-brand-title,
html body .mobile-brand-date {
  color: var(--ui-ink);
}

html body .navbar-compact .nav-link {
  min-height: 32px;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: transparent !important;
  color: #5b6a80;
  font-size: 0.86rem;
  font-weight: 600;
}

html body .navbar-compact .nav-link:hover,
html body .navbar-compact .nav-link:focus-visible {
  background: #f1f4f9 !important;
  color: var(--ui-ink);
}

html body .navbar-compact .nav-link.active {
  background: #eaf1ff !important;
  color: var(--ui-accent-deep);
  font-weight: 600;
  box-shadow: none;
}

html body .navbar-compact .nav-link::after {
  display: none;
}

html[data-theme="dark"] body .navbar-compact .nav-link {
  color: #9fb0c7;
}

html[data-theme="dark"] body .navbar-compact .nav-link:hover,
html[data-theme="dark"] body .navbar-compact .nav-link:focus-visible {
  background: rgba(148, 163, 184, 0.10) !important;
  color: #e8eefb;
}

html[data-theme="dark"] body .navbar-compact .nav-link.active {
  background: rgba(96, 165, 250, 0.16) !important;
  color: #bfdbfe;
}

html body .navbar-compact .btn-account-switch,
html body .navbar-compact .btn-theme-icon,
html body .navbar-compact .btn-logout-icon {
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--ui-border);
  background: #ffffff;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html body .navbar-compact .btn-account-switch {
  padding: 0 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

html body .navbar-compact .btn-theme-icon,
html body .navbar-compact .btn-logout-icon {
  width: 30px;
  min-width: 30px;
  border-radius: 999px;
}

html body .navbar-compact .btn-account-switch:hover,
html body .navbar-compact .btn-account-switch:focus-visible,
html body .navbar-compact .btn-theme-icon:hover,
html body .navbar-compact .btn-theme-icon:focus-visible,
html body .navbar-compact .btn-logout-icon:hover,
html body .navbar-compact .btn-logout-icon:focus-visible {
  border-color: var(--ui-border-strong);
  background: #f8fafc;
  color: var(--ui-ink);
}

html[data-theme="dark"] body .navbar-compact .btn-account-switch,
html[data-theme="dark"] body .navbar-compact .btn-theme-icon,
html[data-theme="dark"] body .navbar-compact .btn-logout-icon {
  border-color: rgba(148, 163, 184, 0.22);
  background: #101a2b;
  color: #c7d2e3;
  box-shadow: none;
}

html[data-theme="dark"] body .navbar-compact .btn-account-switch:hover,
html[data-theme="dark"] body .navbar-compact .btn-theme-icon:hover,
html[data-theme="dark"] body .navbar-compact .btn-logout-icon:hover {
  border-color: rgba(148, 163, 184, 0.36);
  background: #16223a;
  color: #ffffff;
}

/* Market status bar: quiet meta line, no longer steals the sticky top slot */
html body .market-statusbar-wrap {
  position: relative;
  top: auto;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="dark"] body .market-statusbar-wrap {
  background: rgba(8, 13, 24, 0.70);
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

html body .market-statusbar {
  gap: 0.7rem;
  padding: 0.32rem 0;
  color: var(--ui-muted);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

html body .market-statusbar__label {
  color: var(--ui-subtle);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

html body .market-statusbar__value {
  color: var(--ui-text);
  font-weight: 600;
}

html body .market-statusbar__sep {
  height: 12px;
  background: var(--ui-border);
}

html body .status-pill {
  padding: 0.15rem 0.5rem;
  border: 0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

html body .status-pill--closed {
  background: #fff7ed;
  color: #b45309;
}

html body .status-pill--after {
  background: #f1f5f9;
  color: #475569;
}

html body .density-switch {
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #f1f4f9;
}

html body .density-switch__btn {
  border-radius: 6px;
  color: var(--ui-subtle);
}

html body .density-switch__btn.is-active {
  background: #ffffff;
  color: var(--ui-accent-deep);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] body .density-switch {
  background: rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] body .density-switch__btn.is-active {
  background: #1b2942;
  color: #bfdbfe;
}

html[data-theme="dark"] body .status-pill {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

html[data-theme="dark"] body .status-pill--closed {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

html[data-theme="dark"] body .status-pill--after {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}