/* HawkX design tokens. Dark terminal is the default; a light theme is kept for daytime use. */
:root {
  /* surfaces */
  --bg: #050709;          /* page */
  --bg-2: #090D12;        /* sections, insets */
  --panel: #0B1016;       /* cards */
  --panel-2: #101720;     /* elevated / active */
  --line: #1B2830;        /* separators */
  --line-2: #27363F;      /* hover / emphasis borders */
  --grid: #142019;        /* chart grid, technical outlines */
  /* text */
  --text: #E6EDF4;
  --muted: #8C9AAA;
  --faint: #526171;
  /* signals */
  --bull: #00F5A0;
  --bull-2: #00A870;
  --bull-bg: rgba(0, 245, 160, .09);
  --bull-surface: #0C3025;
  --bear: #FF3158;
  --bear-2: #B91D41;
  --bear-bg: rgba(255, 49, 88, .09);
  --bear-surface: #30121C;
  --blue: #4285FF;        /* reference lines, neutral technical info */
  --vwap: #4285FF;
  --brand: #4285FF;       /* selection, primary buttons */
  --brand-2: #7AA8FF;
  --accent: #8277FF;      /* secondary actions, learning */
  --liq: #F5B841;         /* support/resistance markers, caution */
  --liq-bg: rgba(245, 184, 65, .12);
  /* shape */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 0 0 1px rgba(255,255,255,.015) inset, 0 10px 30px rgba(0,0,0,.45);
  --glow-bull: 0 0 0 1px rgba(0,245,160,.35), 0 0 18px -4px rgba(0,245,160,.45);
  --glow-bear: 0 0 0 1px rgba(255,49,88,.35), 0 0 18px -4px rgba(255,49,88,.45);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F5F8; --bg-2: #EBEFF3; --panel: #FFFFFF; --panel-2: #F6F8FA; --line: #DDE3EA; --line-2: #C9D2DC; --grid: #E7ECEF;
  --text: #0C141D; --muted: #566475; --faint: #8592A2;
  --bull: #00976A; --bull-2: #00805A; --bull-bg: rgba(0,151,106,.09); --bull-surface: #E3F5EE;
  --bear: #D81E47; --bear-2: #B91D41; --bear-bg: rgba(216,30,71,.08); --bear-surface: #FBE6EB;
  --blue: #2F6FE6; --vwap: #2F6FE6; --brand: #2F6FE6; --brand-2: #1F56BF; --accent: #6A5EE8;
  --liq: #B47A05; --liq-bg: rgba(180,122,5,.12);
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --glow-bull: 0 0 0 1px rgba(0,151,106,.4); --glow-bear: 0 0 0 1px rgba(216,30,71,.4);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.up { color: var(--bull); }
.down { color: var(--bear); }
.muted { color: var(--muted); }
.tag-label { font: 700 10px var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }

.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
/* HawkX logo: PNGs in /assets/brand, white for the dark theme and near-black for the light one (the X stays red) */
.logo img { display: block; width: auto; }
.logo-mark { height: 24px; }
.logo-word { height: 16px; }
.logo .on-light { display: none; }
:root[data-theme="light"] .logo .on-dark { display: none; }
:root[data-theme="light"] .logo .on-light { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel); text-decoration: none;
  font-weight: 600; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: transparent; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel);
  display: inline-grid; place-items: center; cursor: pointer; transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- account menu (account.js) ---------- */
.acct-wrap { position: relative; }
.acct-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); cursor: pointer; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 22%, var(--panel)); color: var(--text); font: 700 12.5px var(--font); letter-spacing: .02em; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--brand); }
.acct-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 260px; padding: 14px; display: flex; flex-direction: column; gap: 12px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.acct-panel[hidden] { display: none; }
.acct-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-plan { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-2);
  border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.acct-plan b { color: var(--text); }
.acct-out, .acct-admin, .acct-plans, .acct-pw { width: 100%; }
.acct-plans { border-color: color-mix(in srgb, var(--bull) 45%, var(--line-2)); }
.acct-panel [hidden] { display: none; }
.acct-admin { border-color: color-mix(in srgb, var(--brand) 45%, var(--line-2)); }
/* change-password dialog (account.js) */
.hx-dlg { width: min(400px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.hx-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.hx-dlg form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.hx-dlg h3 { margin: 0; font-size: 18px; }
.hx-dlg-sub { margin: -6px 0 0; color: var(--muted); font-size: 13.5px; }
.hx-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.hx-field input { padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 500 14px var(--font); outline: 0; }
.hx-field input:focus { border-color: var(--brand); }
.hx-field em { font-style: normal; font-weight: 400; color: var(--faint); font-size: 12px; }
.hx-dlg-msg { padding: 9px 11px; border-radius: var(--radius-sm); font-size: 13px; background: var(--bear-bg); border: 1px solid color-mix(in srgb, var(--bear) 40%, transparent); }
.hx-dlg-msg.good { background: var(--bull-bg); border-color: color-mix(in srgb, var(--bull) 40%, transparent); }
.hx-dlg-msg[hidden] { display: none; }
.hx-dlg-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.hx-dlg-forgot { margin-right: auto; font-size: 12.5px; color: var(--brand-2); text-decoration: none; }

