/* =====================================================
   AurumioUS - Global Stylesheet (Apex Theme)
   Obsidian Gold + Midnight Emerald + Terminal Alpha
   ===================================================== */

/* ---- Design Tokens ---- */
:root {
  --bg-0: #080808;      /* deepest black */
  --bg-1: #0A0A0A;      /* navbar */
  --bg-2: #0B0B0B;      /* sidebar */
  --bg-3: #0E0E0E;
  --bg-4: #111111;      /* cards / panels */
  --bg-5: #161616;      /* elevated cards */
  --bg-card: #161622;   /* spec card bg */

  --gold: #D4AF37;
  --gold-light: #F5D788;
  --gold-dark: #B88A1A;
  --gold-border: #30291A;
  --gold-border-strong: #6B5520;

  --green: #00FF88;     /* gains */
  --red: #FF4466;       /* losses */
  --cyan: #00D4FF;      /* data accents */

  --text-primary: #FFFFFF;
  --text-cream: #EFE9DA;
  --text-muted: #8E8674;
  --text-dim: #7C7460;
  --text-faint: #6C624B;

  --border: #2B2517;
  --border-soft: #252015;

  --radius-xl: 12px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* Top gold accent line (page-wide) */
.gold-line-top {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dark) 20%, var(--gold-light) 55%, transparent);
}

/* ---- Text helpers ---- */
.gold-text {
  background: linear-gradient(110deg, var(--gold), var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-cyan { color: var(--cyan); }
.text-gold { color: var(--gold-light); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }

.gold-glow {
  background: linear-gradient(90deg, rgba(212,175,55,.16), rgba(212,175,55,.02));
  box-shadow: inset 3px 0 var(--gold), 0 0 22px rgba(212,175,55,.08);
}

/* ---- App Shell ---- */
.app-shell {
  min-height: 100vh;
  display: flex;
}

/* ---- Sidebar (Obsidian Gold) ---- */
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  height: 82px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gold);
  background: #17140D;
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  margin-right: 12px;
  box-shadow: 0 0 18px rgba(212,175,55,.14);
  font-size: 15px;
}
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -.3px; color: var(--gold-light); }
.brand-sub { font-size: 9px; text-transform: uppercase; letter-spacing: .22em; color: var(--text-faint); }

.sidebar-nav { padding: 28px 12px 0; flex: 1; }
.nav-label {
  padding: 0 16px; margin-bottom: 12px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--text-faint);
}
.nav-item {
  margin-top: 4px;
  border-radius: var(--radius-lg);
  height: 44px; padding: 0 16px;
  display: flex; align-items: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: color .15s, background .15s;
}
.nav-item i { width: 28px; font-size: 14px; }
.nav-item:hover { color: var(--gold); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(212,175,55,.16), rgba(212,175,55,.02));
  box-shadow: inset 3px 0 var(--gold), 0 0 22px rgba(212,175,55,.08);
  color: var(--gold-light);
}

.sidebar-feed { padding: 24px 4px 8px; }
.feed-row {
  padding: 6px 16px; display: flex; justify-content: space-between;
  font-size: 10px;
}
.live-badge {
  margin: 16px; padding: 12px 14px;
  border-radius: var(--radius-xl);
  border: 1px solid #2D271B;
  background: var(--bg-4);
  display: flex; align-items: center; gap: 10px;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* ---- Main column ---- */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---- Navbar (top header) ---- */
.navbar {
  height: 82px; padding: 0 32px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40;
}
.navbar-title h1 { font-size: 22px; font-weight: 600; margin-top: 2px; }
.navbar-title .eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--text-dim); }
.navbar-actions { display: flex; align-items: center; gap: 16px; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid #332C1E;
  background: var(--bg-4);
  color: #A69A7E;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s;
}
.icon-btn:hover { color: var(--gold-light); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  padding: 1px;
}
.avatar > span {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-4);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--gold-light);
}
.account-menu { position: relative; }
.account-dropdown {
  position: absolute; right: 0; top: 48px;
  width: 200px;
  background: var(--bg-4);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  z-index: 60;
}
.account-dropdown.open { display: block; }
.account-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 13px; color: var(--text-muted);
}
.account-dropdown a:hover { background: rgba(212,175,55,.08); color: var(--gold-light); }

/* ---- Main content ---- */
.content { padding: 24px 32px 60px; flex: 1; }

/* ---- Cards ---- */
.card {
  position: relative;
  overflow: hidden;
  background: var(--bg-4);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
}
.card.elevated { background: var(--bg-card); }
.card .accent-top {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
.card-head {
  min-height: 60px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #292318;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-sub { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.card-body { padding: 20px; }

/* ---- Buttons ---- */
.btn {
  height: 40px; padding: 0 18px;
  border-radius: var(--radius-lg);
  font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent;
  transition: transform .1s, box-shadow .15s, background .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: var(--gold); color: #080808;
  box-shadow: 0 0 20px rgba(212,175,55,.18);
}
.btn-gold:hover { background: var(--gold-light); }
.btn-outline-gold {
  background: transparent; color: var(--gold-light);
  border-color: #3D3422;
}
.btn-outline-gold:hover { background: var(--gold); color: #080808; }
.btn-outline-cyan {
  background: transparent; color: var(--cyan);
  border-color: rgba(0,212,255,.4);
}
.btn-outline-cyan:hover { background: rgba(0,212,255,.12); }
.btn-disabled {
  background: #1a1a1a; color: #555; border-color: #2a2a2a;
  cursor: not-allowed; box-shadow: none;
}
.btn-sm { height: 32px; padding: 0 14px; font-size: 12px; border-radius: 999px; }
.btn-block { width: 100%; justify-content: center; }

/* pill outline buttons (account management bar) */
.pill-btn {
  height: 34px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--gold-border-strong);
  background: transparent; color: var(--gold-light);
  font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s, color .15s;
}
.pill-btn:hover { background: var(--gold); color: #080808; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.badge-green { background: rgba(0,255,136,.1); color: var(--green); }
.badge-blue { background: rgba(0,212,255,.1); color: var(--cyan); }
.badge-gold { background: rgba(212,175,55,.1); color: var(--gold-light); }

/* level pills */
.level-pill { padding: 4px 14px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.level-1 { background: linear-gradient(135deg, #c0c0c0, #8a8a8a); color: #1a1a1a; }
.level-2 { background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); color: #1a1a1a; }
.level-3 { background: linear-gradient(135deg, #e5e4e2, #b0c4de, #8f9db5); color: #1a1a1a; }

/* ---- Tables ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 12px 14px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim); border-bottom: 1px solid #292318;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid #201c12; }
.data-table tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }
.data-table tbody tr:hover { background: rgba(212,175,55,.06); }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted);
}
.form-control {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-3);
  border: 1px solid #2C2618;
  border-radius: var(--radius-lg);
  color: var(--text-primary); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; padding: 12px 14px; resize: vertical; min-height: 100px; }
.form-control:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,.12);
}
.form-control::placeholder { color: #5a5344; }
select.form-control { appearance: none; cursor: pointer; }
.input-wrap { position: relative; }
.input-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); font-size: 14px;
}
.input-toggle:hover { color: var(--gold-light); }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--bg-4);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: modalIn .2s ease;
}
.modal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-head {
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #292318;
}
.modal-head h3 { font-size: 16px; font-weight: 600; color: var(--gold-light); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; }
.modal-close:hover { color: var(--red); }
.modal-body { padding: 20px; }
.modal-foot { padding: 16px 20px; border-top: 1px solid #292318; display: flex; justify-content: flex-end; gap: 10px; }

/* ---- Grid utilities ---- */
.grid { display: grid; gap: 20px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mb-5 { margin-bottom: 20px; } .mt-2 { margin-top: 8px; }
.hidden { display: none; }

/* ---- Header summary ---- */
.summary-value { font-size: 30px; font-weight: 600; letter-spacing: -.5px; color: #F1E7CD; }
.welcome-line { font-size: 26px; font-weight: 600; }

/* ---- OHLC strip (Terminal Alpha) ---- */
.ohlc-strip {
  display: flex; gap: 16px; font-size: 11px; color: var(--text-dim);
  padding: 10px 14px; background: #0C0C0C; border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.ohlc-strip b { font-weight: 600; }

/* ---- Watchlist ---- */
.crypto-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid #201c12;
  cursor: pointer; transition: background .15s;
}
.crypto-row:hover { background: rgba(212,175,55,.05); }
.crypto-icon { width: 28px; height: 28px; border-radius: 50%; }
.crypto-name { font-size: 13px; font-weight: 500; }
.crypto-sym { font-size: 10px; color: var(--text-dim); }
.crypto-expand {
  padding: 16px; background: #0C0C0C; border-bottom: 1px solid #201c12;
  display: none;
}
.crypto-expand.open { display: block; }
.chart-box { width: 100%; height: 280px; }

/* ---- PNL list ---- */
.pnl-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #201c12;
}
.pnl-pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; min-width: 74px; text-align: center; }
.pnl-pos { background: rgba(0,255,136,.12); color: var(--green); }
.pnl-neg { background: rgba(255,68,102,.12); color: var(--red); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state .coin-ico {
  font-size: 42px; color: var(--gold); opacity: .5; margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(212,175,55,.3));
}

/* ---- Toast notification ---- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 120; display: flex; flex-direction: column; gap: 12px; }
.toast {
  min-width: 300px; max-width: 360px;
  background: var(--bg-4);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  transform: translateX(400px); opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-logo {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  border: 1px solid var(--gold);
  background: #17140D; color: var(--gold-light);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.toast-text { font-size: 12px; color: var(--text-cream); }

/* ---- Tooltip ---- */
.tooltip-wrap { position: relative; display: inline-block; }
.tooltip-wrap .tooltip {
  position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
  background: #000; color: var(--gold-light);
  border: 1px solid var(--gold-border);
  padding: 6px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 50;
}
.tooltip-wrap:hover .tooltip { opacity: 1; }

/* ---- Sparkline ---- */
.sparkline { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.sparkline .bar { width: 5px; border-radius: 1px; background: var(--green); opacity: .8; }

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page { display: flex; min-height: 100vh; }
.login-left {
  flex: 1; position: relative; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #16130a, var(--bg-0) 70%);
  border-right: 1px solid var(--border);
}
.login-left canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-brand {
  position: absolute; top: 40px; left: 44px; z-index: 5;
  display: flex; align-items: center; gap: 14px;
}
.login-brand .brand-logo { width: 48px; height: 48px; font-size: 18px; }
.login-brand-name { font-size: 32px; font-weight: 700; }
.login-tagline {
  position: absolute; bottom: 44px; left: 44px; z-index: 5;
  color: var(--text-muted); font-size: 13px; max-width: 320px;
}
.login-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg-1); padding: 40px;
}
.login-card {
  position: relative; width: 100%; max-width: 400px;
  background: var(--bg-4);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
.login-logo-mark {
  width: 52px; height: 52px; border-radius: var(--radius-xl);
  border: 1px solid var(--gold); background: #17140D;
  color: var(--gold-light); display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 16px;
  box-shadow: 0 0 22px rgba(212,175,55,.18);
}
.login-wordmark { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-welcome { text-align: center; font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }
.login-error {
  background: rgba(255,68,102,.1); border: 1px solid rgba(255,68,102,.3);
  color: var(--red); padding: 10px 14px; border-radius: var(--radius-md);
  font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.login-forgot { display: block; text-align: right; font-size: 12px; color: var(--gold-light); margin-top: -6px; margin-bottom: 20px; }
.login-forgot:hover { text-decoration: underline; }
.login-demo {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid #201c12;
  font-size: 11px; color: var(--text-dim); text-align: center; line-height: 1.7;
}

/* =====================================================
   NEW COMPONENTS
   ===================================================== */

/* Aurumio X status pill (non-clickable) */
.bot-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent; cursor: default; user-select: none;
}
.bot-pill.bot-on { background: rgba(0,255,136,.12); color: var(--green); border-color: rgba(0,255,136,.35); }
.bot-pill.bot-off { background: rgba(255,68,102,.12); color: var(--red); border-color: rgba(255,68,102,.35); }

/* Menu toggle (hamburger) - hidden on desktop */
.menu-toggle { display: none; }

/* Mobile sidebar backdrop */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 44;
}
.sidebar-backdrop.show { display: block; }

/* Notification bell dropdown */
.notif-menu { position: relative; }
.notif-dropdown {
  position: absolute; right: 0; top: 48px;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--bg-4);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  z-index: 60; overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #292318;
  font-size: 13px; font-weight: 600; color: var(--gold-light);
}
.notif-markread {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; cursor: pointer;
}
.notif-markread:hover { color: var(--gold-light); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  padding: 12px 14px; border-bottom: 1px solid #201c12;
  position: relative;
}
.notif-item.unread { background: rgba(212,175,55,.06); }
.notif-item.unread::before {
  content: ''; position: absolute; left: 5px; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-cream); }
.notif-msg { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.notif-time { font-size: 10px; color: var(--text-dim); margin-top: 5px; }
.notif-empty { padding: 24px 14px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* PnL source badge */
.src-badge {
  display: inline-block; margin-left: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(0,212,255,.12); color: var(--cyan);
  vertical-align: middle;
}

/* New global trade row fade-in */
.trade-row-new { animation: tradeIn .5s ease; }
@keyframes tradeIn {
  from { background: rgba(212,175,55,.16); opacity: .2; }
  to { background: transparent; opacity: 1; }
}

/* =====================================================
   RESPONSIVE / MOBILE
   ===================================================== */

/* Tablet & down: collapse sidebar into an off-canvas drawer */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 45;
    height: 100vh; width: 250px;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0,0,0,.7); }
  .navbar { padding: 0 16px; height: 70px; }
  .navbar-title h1 { font-size: 18px; }
  .content { padding: 18px 16px 48px; }
  /* Stack two-column grids */
  .two-col { grid-template-columns: 1fr !important; }
  /* Portfolio holdings: stack table above chart */
  #portfolio .grid { grid-template-columns: 1fr !important; }
}

/* Phones */
@media (max-width: 560px) {
  .navbar-title .eyebrow { font-size: 9px; }
  .summary-value { font-size: 24px; }
  .welcome-line { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr !important; }
  .card-head { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .card-body { padding: 16px; }
  .btn { height: 42px; }
  .modal { max-width: 100%; }
  .toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: 100%; }
  .notif-dropdown { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
  .account-dropdown { position: fixed; top: 64px; right: 12px; width: 220px; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

/* =====================================================
   LOGIN RESPONSIVE
   Keep the floating-coins canvas as a full-screen
   background with the card centered on top.
   ===================================================== */
@media (max-width: 860px) {
  .login-page { position: relative; display: block; min-height: 100vh; }
  .login-left {
    position: fixed; inset: 0; z-index: 0;
    border-right: none; flex: none;
  }
  .login-left .login-brand { top: 28px; left: 24px; }
  .login-left .login-tagline { display: none; }
  .login-right {
    position: relative; z-index: 1;
    min-height: 100vh; background: transparent;
    padding: 96px 20px 40px;
    align-items: center;
  }
  .login-card {
    background: rgba(17,17,17,.92);
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
  }
}
@media (max-width: 400px) {
  .login-left .login-brand .login-brand-name { font-size: 24px; }
  .login-card { padding: 28px 22px; }
}

/* =====================================================
   PNL LIST — scrollable, max 10 visible rows
   ===================================================== */
#pnlList {
  max-height: 440px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-border) transparent;
}
#pnlList::-webkit-scrollbar { width: 4px; }
#pnlList::-webkit-scrollbar-track { background: transparent; }
#pnlList::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 4px; }

/* =====================================================
   NAVBAR — account value display
   ===================================================== */
.navbar-account-val {
  text-align: right;
  line-height: 1.3;
  padding-right: 4px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}
@media (max-width: 560px) {
  .navbar-account-val { display: none; }
}

/* =====================================================
   RESPONSIVE TABLES — no horizontal scroll on mobile
   .table-responsive-wrap replaces overflow-x:auto wrappers
   .mobile-card-table switches to card layout on phones
   ===================================================== */
.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
}

/* On phones, flip table rows into mini-cards */
@media (max-width: 560px) {
  .table-responsive-wrap {
    overflow-x: visible;
  }
  .mobile-card-table thead {
    display: none;
  }
  .mobile-card-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #201c12;
    background: transparent;
  }
  .mobile-card-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,.015);
  }
  .mobile-card-table tbody tr:hover {
    background: rgba(212,175,55,.06);
  }
  .mobile-card-table tbody td {
    display: flex;
    flex-direction: column;
    border: none;
    padding: 2px 0;
    font-size: 13px;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .mobile-card-table tbody td::before {
    content: attr(data-label);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .10em;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 1px;
  }
  /* Let certain columns span full width for emphasis */
  .mobile-card-table tbody td[data-label="Price"],
  .mobile-card-table tbody td[data-label="Value"],
  .mobile-card-table tbody td[data-label="Time"] {
    text-align: right;
  }
}
