
:root {
  --bg: #0a0a0f;
  --surface: #0f0f18;
  --surface2: #13131e;
  --border: rgba(255,255,255,0.06);
  --accent: #00e5a0;
  --accent2: #00b8ff;
  --green: #00e5a0;
  --red: #ff4d6d;
  --gold: #f5c842;
  --text: #e8e8f0;
  --muted: #6b6b80;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content:'';position:fixed;inset:0;
  background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size:48px 48px;opacity:0.5;pointer-events:none;z-index:0;
}

/* ── TOP NAV ── */
.dash-nav {
  position:sticky;top:0;z-index:200;
  background:rgba(10,10,15,.95);
  backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(255,50,50,0.15);
  padding:0 32px;height:56px;
  display:flex;align-items:center;justify-content:space-between;
  box-shadow:0 0 20px rgba(255,40,40,0.06);
}
.dash-nav-logo {
  font-family:Bebas Neue,sans-serif,sans-serif;
  font-size:18px;letter-spacing:2px;color:#00e5a0;
  text-decoration:none;
}
.dash-nav-right { display:flex;align-items:center;gap:10px; }
#userEmail {
  font-family:DM Mono,monospace,monospace;
  font-size:11px;color:#6b6b80;
  max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#planBadge { display:none; }
#currentDate {
  font-family:DM Mono,monospace,monospace;
  font-size:11px;color:#6b6b80;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.06);
  padding:6px 12px;border-radius:6px;
}
.btn-logout-dash {
  font-family:DM Sans,sans-serif,sans-serif;
  font-size:12px;font-weight:600;
  color:#6b6b80;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.06);
  padding:7px 14px;border-radius:6px;cursor:pointer;
  transition:all .2s;
}
.btn-logout-dash:hover { color:#e8e8f0;border-color:rgba(255,77,109,0.3); }

/* ── ORIGINAL DASHBOARD CSS MAPPED TO NEW THEME ── */
.app{position:relative;z-index:1;padding:24px;max-width:1440px;margin:0 auto;padding-bottom:40px;}
header{display:none;} /* hidden - we use dash-nav instead */
.tagline{
  text-align:center;font-family:DM Mono,monospace,monospace;font-size:11px;
  letter-spacing:3px;padding:10px 24px;margin-bottom:20px;border-radius:8px;
  background:linear-gradient(90deg,transparent,rgba(0,229,160,.04),transparent);
  border-top:1px solid rgba(0,229,160,.1);border-bottom:1px solid rgba(0,229,160,.1);
  color:#00e5a0;text-transform:uppercase;
}
.tabs-sticky-wrap{
  position:sticky;top:56px;z-index:200;
  background:rgba(10,10,15,.95);backdrop-filter:blur(12px);
  padding:8px 0;margin-bottom:20px;
  border-bottom:1px solid rgba(255,255,255,.04);
  overflow:visible;
}
.tabs { overflow:visible !important; }
.tabs{
  display:flex;gap:4px;background:#0f0f18;padding:4px;
  border-radius:10px;border:1px solid rgba(255,255,255,0.06);
  width:fit-content;overflow-x:auto;scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none;}
.tab{
  padding:10px 20px;border-radius:7px;border:none;
  background:transparent;color:#6b6b80;
  font-family:DM Sans,sans-serif,sans-serif;font-size:12px;font-weight:600;
  cursor:pointer;transition:all .2s;letter-spacing:.5px;white-space:nowrap;
}
.tab.active{background:#00e5a0;color:#000;font-weight:700;box-shadow:0 0 16px rgba(0,229,160,.3);}
.tab:hover:not(.active){color:#e8e8f0;background:rgba(255,255,255,0.04);}
.view{display:none;}.view.active{display:block;}

/* BUTTONS */
.btn{padding:10px 20px;border-radius:8px;border:none;cursor:pointer;font-family:DM Sans,sans-serif,sans-serif;font-weight:700;font-size:13px;transition:all .2s;letter-spacing:.5px;min-height:44px;}
.btn-primary{background:#00e5a0;color:#000;box-shadow:0 0 20px rgba(0,229,160,.25);}
.btn-primary:hover{opacity:.9;transform:translateY(-1px);}
.btn-success{background:#00e5a0;color:#000;box-shadow:0 0 20px rgba(0,229,160,.25);}
.btn-success:hover{opacity:.9;transform:translateY(-1px);}
.btn-ghost{background:rgba(255,255,255,0.04);color:#6b6b80;border:1px solid rgba(255,255,255,0.06);}
.btn-ghost:hover{color:#e8e8f0;border-color:rgba(255,255,255,0.15);}
.btn-logout{font-family:DM Sans,sans-serif,sans-serif;font-size:11px;font-weight:600;color:#6b6b80;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);padding:6px 14px;border-radius:6px;cursor:pointer;}

/* CAPITAL BANNER */
.capital-banner{
  background:linear-gradient(135deg,#0d1a12,#0f1f16);
  border:1px solid rgba(0,229,160,0.3);border-radius:14px;
  padding:24px 32px;margin-bottom:24px;
  display:flex;align-items:center;justify-content:space-between;
  position:relative;overflow:hidden;
  box-shadow:0 0 40px rgba(0,229,160,.06);
}
.capital-banner::after{content:'';position:absolute;right:-40px;top:-40px;width:160px;height:160px;background:radial-gradient(circle,rgba(0,229,160,.08),transparent 70%);pointer-events:none;}
.capital-label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:3px;margin-bottom:8px;}
.capital-amount{font-family:DM Mono,monospace,monospace;font-size:42px;font-weight:400;color:#00e5a0;text-shadow:0 0 30px rgba(0,229,160,.3);}
.capital-amount small{font-size:22px;}
.capital-input-group{display:flex;gap:10px;align-items:center;}
.capital-input{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);color:#e8e8f0;padding:10px 14px;border-radius:8px;font-family:DM Mono,monospace,monospace;font-size:14px;width:160px;transition:border-color .2s;outline:none;}
.capital-input:focus{border-color:rgba(0,229,160,.4);}

/* STATS */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px;}
.stat-card{background:#0f0f18;border:1px solid rgba(255,50,50,0.2);border-radius:12px;padding:20px;position:relative;overflow:hidden;transition:all .2s;box-shadow:0 0 14px rgba(255,40,40,.05);}
.stat-card:hover{border-color:rgba(255,50,50,0.4);transform:translateY(-2px);}
.stat-card::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;border-radius:12px 12px 0 0;background:linear-gradient(90deg,rgba(255,40,40,0.6),transparent);}
.stat-card.green::before,.stat-card.red::before,.stat-card.gold::before,.stat-card.blue::before{background:linear-gradient(90deg,rgba(255,40,40,0.6),transparent);}
.stat-label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:2px;margin-bottom:10px;}
.stat-value{font-family:DM Mono,monospace,monospace;font-size:24px;font-weight:400;}
.stat-value.positive{color:#00e5a0;}.stat-value.negative{color:#ff4d6d;}.stat-value.neutral{color:#00e5a0;}
.stat-sub{font-size:11px;color:#6b6b80;margin-top:4px;font-family:DM Mono,monospace,monospace;}
.pips-large{font-family:DM Mono,monospace,monospace;font-size:26px;font-weight:400;}
.pips-large.positive{color:#00e5a0;}.pips-large.negative{color:#ff4d6d;}.pips-large.neutral{color:#00e5a0;}

/* FORM */
.trade-form-card{background:#0f0f18;border:1px solid rgba(255,50,50,0.2);border-radius:14px;padding:28px;margin-bottom:16px;box-shadow:0 0 16px rgba(255,40,40,.05);}
.form-title{font-family:DM Mono,monospace,monospace;font-size:10px;color:#6b6b80;text-transform:uppercase;letter-spacing:2px;margin-bottom:20px;display:flex;align-items:center;gap:8px;}
.form-title .dot{width:6px;height:6px;background:#00e5a0;border-radius:50%;box-shadow:0 0 8px #00e5a0;animation:pulse 2s infinite;}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
.form-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:12px;align-items:end;}
.form-group label{display:block;font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:1.5px;margin-bottom:6px;}
.form-control{width:100%;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);color:#e8e8f0;padding:10px 12px;border-radius:8px;font-family:DM Mono,monospace,monospace;font-size:13px;transition:border-color .2s;min-height:42px;outline:none;}
.form-control:focus{border-color:rgba(0,229,160,.4);}
select.form-control option{background:#0f0f18;color:#e8e8f0;}
select.form-control optgroup{background:#0f0f18;color:#00e5a0;font-style:normal;}
.form-control.auto-pnl{border-color:rgba(0,229,160,.3);background:rgba(0,229,160,.03);}
.form-control.auto-pnl.pos{border-color:rgba(0,229,160,.5);background:rgba(0,229,160,.06);color:#00e5a0;}
.form-control.auto-pnl.neg{border-color:rgba(255,77,109,.5);background:rgba(255,77,109,.04);color:#ff4d6d;}
.auto-badge{display:inline-block;font-size:9px;background:rgba(0,229,160,.15);color:#00e5a0;border-radius:4px;padding:2px 5px;margin-left:4px;letter-spacing:1px;}
.calc-preview{margin-top:10px;font-family:DM Mono,monospace,monospace;font-size:11px;color:#6b6b80;min-height:18px;padding:0 4px;}
input[type="date"].form-control::-webkit-calendar-picker-indicator{filter:invert(.4);cursor:pointer;}

/* PSYCH */
.psych-panel{margin-top:18px;border:1px solid rgba(255,255,255,.05);border-radius:12px;padding:18px 20px;background:#0f0f18;}
.psych-row{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:14px;}
.psych-title{font-family:DM Mono,monospace,monospace;font-size:10px;font-weight:400;color:#00e5a0;letter-spacing:2px;margin-bottom:10px;text-transform:uppercase;}
.psych-chips{display:flex;flex-wrap:wrap;gap:7px;}
.chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:6px;border:1px solid rgba(255,255,255,.06);background:rgba(255,255,255,.02);color:#6b6b80;font-size:12px;font-family:DM Mono,monospace,monospace;cursor:pointer;transition:all .18s;user-select:none;}
.chip:hover{border-color:rgba(0,229,160,.3);color:#00e5a0;}
.chip input[type=checkbox]{display:none;}
.chip.active{background:rgba(0,229,160,.1);border-color:rgba(0,229,160,.3);color:#00e5a0;font-weight:700;}
.chip.active-red{background:rgba(255,77,109,.1);border-color:rgba(255,77,109,.3);color:#ff4d6d;font-weight:700;}
.chip.active-green{background:rgba(0,229,160,.1);border-color:rgba(0,229,160,.3);color:#00e5a0;font-weight:700;}
.psych-tags-cell{display:flex;flex-wrap:wrap;gap:4px;max-width:220px;}
.psych-tag{font-size:10px;padding:2px 7px;border-radius:6px;white-space:nowrap;font-family:DM Mono,monospace,monospace;}
.tag-emotion{background:rgba(0,229,160,.1);color:#00e5a0;border:1px solid rgba(0,229,160,.2);}
.tag-entry{background:rgba(0,184,255,.1);color:#00b8ff;border:1px solid rgba(0,184,255,.2);}
.tag-loss{background:rgba(255,77,109,.1);color:#ff4d6d;border:1px solid rgba(255,77,109,.2);}

/* FILTER + TABLE */
.filter-bar{display:flex;gap:10px;align-items:center;margin-bottom:16px;flex-wrap:wrap;}
.filter-bar label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:1.5px;}
.filter-control{background:#0f0f18;border:1px solid rgba(255,255,255,.06);color:#e8e8f0;padding:7px 12px;border-radius:7px;font-family:DM Mono,monospace,monospace;font-size:12px;cursor:pointer;outline:none;}
.filter-control:focus{border-color:rgba(0,229,160,.3);}
input[type="date"].filter-control::-webkit-calendar-picker-indicator{filter:invert(.4);cursor:pointer;}
.table-card{background:#0f0f18;border:1px solid rgba(255,50,50,.2);border-radius:14px;overflow:hidden;box-shadow:0 0 20px rgba(255,40,40,.05);}
.table-header{padding:14px 20px;border-bottom:1px solid rgba(255,255,255,.04);display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.015);}
.table-title{font-family:DM Mono,monospace,monospace;font-size:10px;color:#6b6b80;text-transform:uppercase;letter-spacing:2px;}
table{width:100%;border-collapse:collapse;}
th{padding:10px 16px;text-align:left;font-family:DM Mono,monospace,monospace;font-size:9px;color:rgba(255,255,255,.25);text-transform:uppercase;letter-spacing:1.5px;background:rgba(255,255,255,.02);border-bottom:1px solid rgba(255,255,255,.04);}
td{padding:13px 16px;font-family:DM Mono,monospace,monospace;font-size:13px;border-bottom:1px solid rgba(255,255,255,.03);}
tr:last-child td{border-bottom:none;}
tr:hover td{background:rgba(0,229,160,.02);}
.badge{display:inline-block;padding:3px 10px;border-radius:6px;font-size:10px;font-weight:700;font-family:DM Mono,monospace,monospace;letter-spacing:.5px;}
.badge-buy{background:rgba(0,229,160,.1);color:#00e5a0;border:1px solid rgba(0,229,160,.25);}
.badge-sell{background:rgba(255,77,109,.1);color:#ff4d6d;border:1px solid rgba(255,77,109,.25);}
.badge-xauusd{background:rgba(245,200,66,.1);color:#f5c842;border:1px solid rgba(245,200,66,.25);}
.badge-btc{background:rgba(247,147,26,.1);color:#f7931a;border:1px solid rgba(247,147,26,.25);}
.badge-eth{background:rgba(98,126,234,.1);color:#627eea;border:1px solid rgba(98,126,234,.25);}
.badge-nifty{background:rgba(0,229,160,.1);color:#00e5a0;border:1px solid rgba(0,229,160,.2);}
.badge-banknifty{background:rgba(255,80,180,.1);color:#ff50b4;border:1px solid rgba(255,80,180,.2);}
.badge-eurusd{background:rgba(0,184,255,.1);color:#00b8ff;border:1px solid rgba(0,184,255,.2);}
.badge-gbpusd{background:rgba(0,180,120,.1);color:#00b478;border:1px solid rgba(0,180,120,.2);}
.badge-usdjpy{background:rgba(255,100,100,.1);color:#ff6464;border:1px solid rgba(255,100,100,.2);}
.badge-sol{background:rgba(153,69,255,.1);color:#9945ff;border:1px solid rgba(153,69,255,.2);}
.pnl-pos{color:#00e5a0;}.pnl-neg{color:#ff4d6d;}
.delete-btn{background:none;border:none;color:#3a3a4a;cursor:pointer;font-size:14px;padding:3px 7px;border-radius:4px;transition:all .2s;}
.delete-btn:hover{color:#ff4d6d;background:rgba(255,77,109,.1);}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.asset-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.03);}
.asset-row:last-child{border-bottom:none;}
.asset-icon{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;background:rgba(255,255,255,.04);}
.asset-name{font-weight:700;font-size:14px;font-family:DM Sans,sans-serif,sans-serif;}
.asset-sub2{font-size:11px;color:#6b6b80;font-family:DM Mono,monospace,monospace;}
.asset-right{margin-left:auto;text-align:right;}
.asset-pips{font-family:DM Mono,monospace,monospace;font-size:15px;}
.asset-pnl-s{font-family:DM Mono,monospace,monospace;font-size:12px;color:#6b6b80;}
.month-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px;}
.month-card{background:#0f0f18;border:1px solid rgba(255,50,50,.15);border-radius:12px;padding:20px;transition:all .2s;}
.month-card:hover{border-color:rgba(255,50,50,.3);transform:translateY(-2px);}
.month-card.has-data{border-color:rgba(0,229,160,.2);}
.month-name{font-size:15px;font-weight:700;font-family:DM Sans,sans-serif,sans-serif;margin-bottom:12px;}
.month-stat{display:flex;justify-content:space-between;font-family:DM Mono,monospace,monospace;font-size:11px;margin-bottom:6px;color:#6b6b80;}
.month-pnl{font-family:DM Mono,monospace,monospace;font-size:20px;margin-top:12px;}
.year-bar{background:#0f0f18;border:1px solid rgba(255,50,50,.15);border-radius:14px;padding:28px;margin-bottom:24px;}
.progress-wrap{margin-top:14px;}
.progress-label{display:flex;justify-content:space-between;font-family:DM Mono,monospace,monospace;font-size:11px;color:#6b6b80;margin-bottom:6px;}
.progress-bar{height:4px;background:rgba(255,255,255,.05);border-radius:4px;overflow:hidden;margin-bottom:10px;}
.progress-fill{height:100%;border-radius:4px;transition:width .6s ease;}
.fill-green{background:linear-gradient(90deg,#00e5a0,#00b878);}.fill-red{background:linear-gradient(90deg,#ff4d6d,#cc1a35);}
.section-title{font-family:DM Mono,monospace,monospace;font-size:9px;font-weight:400;color:#6b6b80;text-transform:uppercase;letter-spacing:3px;margin-bottom:16px;margin-top:28px;}
.empty-state{text-align:center;padding:50px 20px;color:#6b6b80;}
.empty-state .big{font-size:36px;margin-bottom:10px;}
.empty-state p{font-size:13px;font-family:DM Mono,monospace,monospace;}
.toast{position:fixed;bottom:24px;right:24px;background:#0f0f18;border:1px solid #00e5a0;color:#00e5a0;padding:14px 22px;border-radius:10px;font-family:DM Mono,monospace,monospace;font-size:13px;box-shadow:0 4px 30px rgba(0,0,0,.4);z-index:10000;transform:translateY(100px);opacity:0;transition:all .3s;}
.toast.show{transform:translateY(0);opacity:1;}
/* ANALYTICS */
.analytics-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:22px;padding:14px 18px;background:#0f0f18;border:1px solid rgba(255,50,50,.15);border-radius:12px;}
.analytics-range-btns{display:flex;gap:6px;flex-wrap:wrap;}
.range-btn{padding:7px 16px;border-radius:6px;border:1px solid rgba(255,255,255,.06);background:rgba(255,255,255,.02);color:#6b6b80;font-size:12px;font-family:DM Mono,monospace,monospace;cursor:pointer;transition:all .18s;}
.range-btn:hover{border-color:rgba(0,229,160,.3);color:#00e5a0;}
.range-btn.active{background:rgba(0,229,160,.1);border-color:rgba(0,229,160,.3);color:#00e5a0;font-weight:700;}
.charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.chart-card{background:#0f0f18;border:1px solid rgba(255,50,50,.15);border-radius:12px;padding:20px 22px;}
.chart-card.full-width{grid-column:1/-1;}
.chart-title{font-family:DM Sans,sans-serif,sans-serif;font-size:13px;font-weight:700;color:#e8e8f0;margin-bottom:16px;letter-spacing:.3px;}
.chart-sub{font-size:11px;color:#6b6b80;font-family:DM Mono,monospace,monospace;font-weight:400;margin-left:6px;}
.pnl-kpi-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:24px;}
.pnl-kpi{background:#0f0f18;border:1px solid rgba(255,50,50,.15);border-radius:10px;padding:14px 16px;}
.pnl-kpi-label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:2px;margin-bottom:6px;}
.pnl-kpi-val{font-family:DM Mono,monospace,monospace;font-size:20px;}
.pnl-kpi-sub{font-family:DM Mono,monospace,monospace;font-size:11px;color:#6b6b80;margin-top:3px;}
/* LEADERBOARD */
#myLbBadge{background:rgba(0,229,160,.08);border:1px solid rgba(0,229,160,.2);color:#00e5a0;font-family:DM Mono,monospace,monospace;font-size:11px;padding:4px 12px;border-radius:6px;}
/* WITHDRAWAL */
.withdrawal-panel{background:#0f0f18;border:1px solid rgba(255,50,50,.25);border-radius:14px;padding:28px;margin-bottom:24px;box-shadow:0 0 20px rgba(255,40,40,.06);}
.withdrawal-title{font-family:DM Mono,monospace,monospace;font-size:10px;text-transform:uppercase;letter-spacing:2px;color:#6b6b80;margin-bottom:20px;display:flex;align-items:center;gap:8px;}
.withdrawal-title::before{content:'●';color:#ff4d6d;font-size:8px;animation:pulse 2s infinite;}
.withdrawal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px;}
.w-stat{background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.04);border-radius:10px;padding:16px;}
.w-stat-label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:2px;margin-bottom:8px;}
.w-stat-val{font-family:DM Mono,monospace,monospace;font-size:22px;color:#e8e8f0;}
.w-input-row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;}
.w-input-wrap{flex:1;min-width:150px;}
.w-input-wrap label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:1.5px;display:block;margin-bottom:8px;}
.w-input{width:100%;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.06);color:#e8e8f0;padding:12px 14px;border-radius:8px;font-family:DM Mono,monospace,monospace;font-size:15px;outline:none;transition:border-color .2s;}
.w-input:focus{border-color:rgba(255,77,109,.4);}
.w-history{margin-top:20px;}
.w-history-title{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:2px;margin-bottom:12px;}
.w-history-row{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.03);font-family:DM Mono,monospace,monospace;font-size:12px;}
.w-history-row:last-child{border-bottom:none;}
.daily-pnl-bar{display:flex;align-items:center;justify-content:space-between;background:rgba(0,229,160,.04);border:1px solid rgba(0,229,160,.15);border-radius:10px;padding:14px 20px;margin-bottom:16px;flex-wrap:wrap;gap:12px;}
.daily-pnl-bar.loss-day{background:rgba(255,77,109,.04);border-color:rgba(255,77,109,.15);}
.dpnl-item{text-align:center;}
.dpnl-label{font-family:DM Mono,monospace,monospace;font-size:9px;color:#6b6b80;text-transform:uppercase;letter-spacing:1.5px;}
.dpnl-val{font-family:DM Mono,monospace,monospace;font-size:18px;margin-top:4px;}
/* RESPONSIVE */
@media(max-width:1100px){.form-grid{grid-template-columns:repeat(4,1fr);}}
@media(max-width:900px){.stats-grid{grid-template-columns:repeat(2,1fr);}
  .form-grid{grid-template-columns:repeat(2,1fr);}
  .month-grid{grid-template-columns:repeat(2,1fr);}
  .two-col{grid-template-columns:1fr;}
  .charts-grid{grid-template-columns:1fr;}
  .pnl-kpi-strip{grid-template-columns:repeat(2,1fr);}
  .withdrawal-grid{grid-template-columns:1fr;}
}
@media(max-width:600px){
  .app{padding:12px;}
  .stats-grid{grid-template-columns:repeat(2,1fr);gap:10px;}
  .form-grid{grid-template-columns:1fr 1fr;gap:10px;}
  .form-grid .form-group:last-child,.form-group-submit{grid-column:1/-1;}
  .capital-banner{flex-direction:column;gap:14px;padding:16px;}
  .capital-amount{font-size:28px;}
  .capital-input-group{width:100%;}
  .capital-input{width:100%;}
  .two-col{grid-template-columns:1fr;}
  .month-grid{grid-template-columns:repeat(2,1fr);}
  .table-card table{display:block;overflow-x:auto;}
  .psych-row{grid-template-columns:1fr;}
  .w-input-row{flex-direction:column;}
}


/* ══ GLOBAL TEXT SYSTEM — Final override ══ */
body, .app, .app * {
  font-family: 'DM Sans', sans-serif;
  color: #e8e8f0;
  -webkit-font-smoothing: antialiased;
}
/* Numbers and data always DM Mono */
input, select, textarea,
[class*="stat-"], [class*="pnl"], [class*="pip"],
[class*="capital"], td, th,
[class*="month-p"], [class*="asset-p"],
[class*="badge"], [class*="chip"],
[class*="filter-"], [class*="calc"],
[class*="dpnl"], [class*="w-stat"],
[class*="w-his"], [class*="withdrawal-title"],
.date-display, #currentDate, #userEmail,
#analyticsRangeLabel {
  font-family: 'DM Mono', monospace !important;
}
/* Section headings always Bebas */
.capital-amount,
.stat-value,
.pips-large,
.month-pnl,
.pnl-kpi-val {
  font-family: 'Bebas Neue', sans-serif !important;
  letter-spacing: 2px !important;
}
/* Muted color consistent */
.stat-label, .pnl-kpi-label, .capital-label,
.table-title, .form-title, .chart-sub,
.withdrawal-title, .w-stat-label, .dpnl-label,
.filter-bar label, .form-group label,
.stat-sub, .pnl-kpi-sub {
  color: #6b6b80 !important;
  font-family: 'DM Mono', monospace !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
}
/* Accent stays green */
.psych-title, .range-btn.active,
.tab.active, .chip.active,
.chip.active-green, #myLbBadge {
  color: #00e5a0 !important;
}
/* Loss stays red */
.chip.active-red, .pnl-neg,
.stat-value.negative, .pips-large.negative {
  color: #ff4d6d !important;
}

/* ══ RED NEON BORDERS — Applied to everything ══ */
.stat-card,
.trade-form-card,
.table-card,
.month-card,
.year-bar,
.chart-card,
.pnl-kpi,
.analytics-controls,
.psych-panel,
.withdrawal-panel,
.daily-pnl-bar,
.w-stat {
  border: 1px solid rgba(255, 40, 40, 0.35) !important;
  box-shadow: 0 0 8px rgba(255, 30, 30, 0.12), 0 0 20px rgba(255, 30, 30, 0.05) !important;
  transition: border-color .25s, box-shadow .25s !important;
}
.stat-card:hover,
.trade-form-card:hover,
.table-card:hover,
.month-card:hover,
.year-bar:hover,
.chart-card:hover,
.pnl-kpi:hover,
.psych-panel:hover,
.withdrawal-panel:hover {
  border-color: rgba(255, 40, 40, 0.65) !important;
  box-shadow: 0 0 12px rgba(255, 30, 30, 0.25), 0 0 32px rgba(255, 30, 30, 0.1) !important;
}
/* Tabs */
.tabs {
  border: 1px solid rgba(255, 40, 40, 0.25) !important;
  box-shadow: 0 0 10px rgba(255, 30, 30, 0.08) !important;
}
/* Capital banner keeps green but adds subtle red outer */
.capital-banner {
  box-shadow: 0 0 30px rgba(0,229,160,.06), 0 0 0 1px rgba(255,40,40,0.15) !important;
}
/* Filter bar inputs */
.filter-control, .form-control {
  border-color: rgba(255, 40, 40, 0.2) !important;
}
.filter-control:focus, .form-control:focus {
  border-color: rgba(0, 229, 160, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(0,229,160,0.08) !important;
}
/* Month card active */
.month-card.has-data {
  border-color: rgba(0,229,160,0.3) !important;
  box-shadow: 0 0 12px rgba(0,229,160,0.08) !important;
}
/* Leaderboard cards */
#lbPodium > div,
#myRankCard,
#lbJoinPrompt {
  border: 1px solid rgba(255,40,40,0.3) !important;
  box-shadow: 0 0 10px rgba(255,30,30,0.08) !important;
}
/* Profile modal */
#profileModal > div {
  border: 1px solid rgba(255,40,40,0.35) !important;
  box-shadow: 0 0 40px rgba(255,30,30,0.1) !important;
}


/* ══ FINAL FONT OVERRIDE — catches every text element ══ */

/* Everything DM Sans by default */
body, html, div, span, p, a, button, input, select, textarea, label,
li, ul, ol, h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', sans-serif !important;
}

/* Numbers, data, code → DM Mono */
input[type="number"],
input[type="date"],
input[type="text"],
select,
td, th,
.mono,
code, pre {
  font-family: 'DM Mono', monospace !important;
}

/* ── ALL TEXT SIZE STANDARDIZATION ── */

/* Large display numbers */
.capital-amount       { font-family: 'Bebas Neue', sans-serif !important; font-size: 52px !important; letter-spacing: 3px !important; }
.stat-value           { font-family: 'Bebas Neue', sans-serif !important; font-size: 28px !important; letter-spacing: 2px !important; }
.pips-large           { font-family: 'Bebas Neue', sans-serif !important; font-size: 28px !important; letter-spacing: 2px !important; }
.month-pnl            { font-family: 'Bebas Neue', sans-serif !important; font-size: 24px !important; letter-spacing: 2px !important; }
.pnl-kpi-val          { font-family: 'Bebas Neue', sans-serif !important; font-size: 24px !important; letter-spacing: 2px !important; }

/* ALL labels — DM Mono small caps */
.stat-label, .capital-label, .form-group label, label,
.pnl-kpi-label, .w-stat-label, .w-input-wrap label,
.withdrawal-title, .form-title, .table-title,
.psych-title, .section-title, .filter-bar label,
.dpnl-label, .w-history-title, .chart-sub {
  font-family: 'DM Mono', monospace !important;
  font-size: 10px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}

/* Tabs */
.tab {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  text-transform: none !important;
}

/* ALL buttons */
.btn, .btn-primary, .btn-success, .btn-ghost, button {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
#addTradeBtn { font-size: 15px !important; letter-spacing: 1.5px !important; }

/* Form inputs */
.form-control, .filter-control, .capital-input, .w-input {
  font-family: 'DM Mono', monospace !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Table */
th {
  font-family: 'DM Mono', monospace !important;
  font-size: 9px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.25) !important;
  font-weight: 400 !important;
}
td {
  font-family: 'DM Mono', monospace !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Badges */
.badge {
  font-family: 'DM Mono', monospace !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
}

/* Chips */
.chip {
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
}

/* Stat sub */
.stat-sub {
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
  color: #6b6b80 !important;
}

/* Month card */
.month-name {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #e8e8f0 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.month-stat {
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
}

/* Tagline */
.tagline {
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
}

/* Empty state */
.empty-state p {
  font-family: 'DM Mono', monospace !important;
  font-size: 13px !important;
}

/* Filter bar */
.filter-bar label {
  font-family: 'DM Mono', monospace !important;
  font-size: 10px !important;
  letter-spacing: 1.5px !important;
}

/* Asset breakdown */
.asset-name {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.asset-sub2, .asset-pips, .asset-pnl-s {
  font-family: 'DM Mono', monospace !important;
}

/* Calc preview */
.calc-preview {
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
}

/* Withdrawal */
.w-stat-val {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 26px !important;
  letter-spacing: 2px !important;
  color: #e8e8f0 !important;
}
.dpnl-val {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: 20px !important;
  letter-spacing: 1px !important;
}
.w-history-row {
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
}

/* Analytics range label */
#analyticsRangeLabel {
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
  color: #00e5a0 !important;
}

/* Range buttons */
.range-btn {
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
}

/* Chart titles */
.chart-title {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  text-transform: none !important;
  color: #e8e8f0 !important;
}

/* Toast */
.toast {
  font-family: 'DM Mono', monospace !important;
  font-size: 13px !important;
}

/* User email + date in nav */
#userEmail, #currentDate {
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
  color: #6b6b80 !important;
}

/* Psych tags */
.psych-tag {
  font-family: 'DM Mono', monospace !important;
  font-size: 10px !important;
}

/* Auto badge */
.auto-badge {
  font-family: 'DM Mono', monospace !important;
  font-size: 9px !important;
  letter-spacing: 1px !important;
}

/* Section titles (yearly, monthly headers) */
.section-title {
  font-family: 'DM Mono', monospace !important;
  font-size: 10px !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: #6b6b80 !important;
  font-weight: 400 !important;
}

/* Year bar */
.progress-label {
  font-family: 'DM Mono', monospace !important;
  font-size: 12px !important;
}

/* Leaderboard */
#lbCount, #lbUpdated {
  font-family: 'DM Mono', monospace !important;
  font-size: 11px !important;
}


/* ── BUTTON TEXT COLORS — always visible ── */
.btn-primary, .btn-success, #addTradeBtn { color: #000 !important; }
.btn-ghost { color: #e8e8f0 !important; }
.btn-logout-dash { color: #6b6b80 !important; }
.tab.active { color: #000 !important; }
.tab:not(.active) { color: #6b6b80 !important; }
.tab:not(.active):hover { color: #e8e8f0 !important; }

/* ── FIX: Green accent text always visible ── */
.pnl-pos { color: #00e5a0 !important; }
.pnl-neg { color: #ff4d6d !important; }
.stat-value.positive, .pips-large.positive { color: #00e5a0 !important; }
.stat-value.negative, .pips-large.negative { color: #ff4d6d !important; }
.stat-value.neutral,  .pips-large.neutral  { color: #00e5a0 !important; }

/* ── FIX: Table text readable ── */
td { color: #6b6b80 !important; }
.jp-td.symbol, td:first-child + td { color: #e8e8f0 !important; }
.jp-td.win { color: #00e5a0 !important; }
.jp-td.loss { color: #ff4d6d !important; }

/* ── FIX: Form control text always white ── */
.form-control, .filter-control, .capital-input, .w-input,
input, select, textarea { color: #e8e8f0 !important; }
input::placeholder, select::placeholder, textarea::placeholder { color: #3a3a4a !important; }

/* ── FIX: Chip colors ── */
.chip { color: #6b6b80 !important; }
.chip.active, .chip.active-green { color: #00e5a0 !important; }
.chip.active-red { color: #ff4d6d !important; }
.chip:hover { color: #00e5a0 !important; }

/* ── FIX: Badge text always readable ── */
.badge-buy  { color: #00e5a0 !important; }
.badge-sell { color: #ff4d6d !important; }

/* ── FIX: Month card text ── */
.month-name { color: #e8e8f0 !important; }
.month-stat { color: #6b6b80 !important; }
.month-pnl.pnl-pos { color: #00e5a0 !important; }
.month-pnl.pnl-neg { color: #ff4d6d !important; }

/* ── FIX: Capital amount always green ── */
.capital-amount { color: #00e5a0 !important; }
.capital-label  { color: #6b6b80 !important; }

/* ── FIX: Stat labels and subs ── */
.stat-label { color: #6b6b80 !important; }
.stat-sub   { color: #6b6b80 !important; }

/* ── FIX: Section titles ── */
.section-title { color: #6b6b80 !important; }

/* ── FIX: Table headers ── */
th { color: rgba(255,255,255,0.3) !important; }

/* ── FIX: Tagline ── */
.tagline { color: #00e5a0 !important; }

/* ── FIX: Asset names ── */
.asset-name { color: inherit !important; }
.asset-sub2 { color: #6b6b80 !important; }

/* ── FIX: Progress bar labels ── */
.progress-label { color: #6b6b80 !important; }

/* ── FIX: withdrawal stats ── */
.w-stat-val { color: #e8e8f0 !important; }
.w-stat-label { color: #6b6b80 !important; }

/* ── FIX: Daily PNL bar ── */
.dpnl-label { color: #6b6b80 !important; }

/* ── FIX: Chart titles ── */
.chart-title { color: #e8e8f0 !important; }
.chart-sub   { color: #6b6b80 !important; }

/* ── FIX: Psych titles ── */
.psych-title { color: #00e5a0 !important; }

/* ── FIX: Form title ── */
.form-title { color: #6b6b80 !important; }

/* ── FIX: Table title ── */
.table-title { color: #6b6b80 !important; }

/* ── FIX: Calc preview ── */
.calc-preview { color: #6b6b80 !important; }

/* ── FIX: Auto badge ── */
.auto-badge { color: #00e5a0 !important; }

/* ── FIX: Empty state ── */
.empty-state p { color: #6b6b80 !important; }

/* ── FIX: Delete button ── */
.delete-btn { color: #3a3a4a !important; }
.delete-btn:hover { color: #ff4d6d !important; }

/* ── FIX: Range buttons ── */
.range-btn { color: #6b6b80 !important; }
.range-btn.active { color: #00e5a0 !important; }
.range-btn:hover  { color: #00e5a0 !important; }

/* ── FIX: PNL KPI ── */
.pnl-kpi-label { color: #6b6b80 !important; }
.pnl-kpi-sub   { color: #6b6b80 !important; }

/* ── FIX: User email ── */
#userEmail, #currentDate { color: #6b6b80 !important; }

/* ── FIX: Analytics range label ── */
#analyticsRangeLabel { color: #00e5a0 !important; }


/* ══ BOLD TEXT EVERYWHERE — Professional UI ══ */

/* ALL text bold by default */
* { font-weight: 600 !important; }

/* Display numbers — heavy weight */
.capital-amount, .stat-value, .pips-large,
.month-pnl, .pnl-kpi-val, .w-stat-val, .dpnl-val {
  font-weight: 400 !important; /* Bebas Neue has no bold - 400 is its heaviest */
}

/* Tabs */
.tab { font-weight: 700 !important; }
.tab.active { font-weight: 800 !important; }

/* Buttons */
.btn, .btn-primary, .btn-success, .btn-ghost, button { font-weight: 700 !important; }
#addTradeBtn { font-weight: 800 !important; font-size: 15px !important; letter-spacing: 2px !important; }

/* Table headers */
th { font-weight: 700 !important; letter-spacing: 2px !important; }

/* Table data */
td { font-weight: 600 !important; }

/* Chips */
.chip { font-weight: 700 !important; font-size: 12px !important; }

/* Labels */
label, .stat-label, .capital-label, .form-group label,
.pnl-kpi-label, .psych-title, .form-title,
.table-title, .section-title, .w-stat-label,
.withdrawal-title, .dpnl-label, .w-history-title { 
  font-weight: 700 !important;
  letter-spacing: 2px !important;
}

/* Psych chips text */
.psych-title { font-weight: 800 !important; font-size: 11px !important; }

/* Form controls */
.form-control, input, select { font-weight: 600 !important; }

/* Chart titles */
.chart-title { font-weight: 800 !important; font-size: 14px !important; }

/* Month name */
.month-name { font-weight: 800 !important; }

/* Asset name */
.asset-name { font-weight: 800 !important; }

/* Stat sub */
.stat-sub { font-weight: 600 !important; }

/* Badge */
.badge { font-weight: 800 !important; }

/* Range buttons */
.range-btn { font-weight: 700 !important; }
.range-btn.active { font-weight: 800 !important; }

/* Section label */
.section-title { font-weight: 700 !important; }

/* Tagline */
.tagline { font-weight: 700 !important; letter-spacing: 3px !important; }

/* Calc preview */
.calc-preview { font-weight: 600 !important; }

/* Leaderboard username */
#lbTableBody td:nth-child(2) { font-weight: 800 !important; color: #e8e8f0 !important; }


/* ══ PREMIUM DROPDOWN — Psychology Panel ══ */
.psych-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.psych-dropdown-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.custom-select-wrap {
  position: relative;
  width: 100%;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,40,40,0.3);
  border-radius: 10px;
  cursor: pointer;
  font-family: DM Sans, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #6b6b80;
  transition: all .2s;
  user-select: none;
  min-height: 46px;
}
.custom-select-trigger:hover {
  border-color: rgba(255,40,40,0.6);
  background: rgba(255,255,255,0.05);
  color: #e8e8f0;
  box-shadow: 0 0 12px rgba(255,30,30,0.15);
}
.custom-select-trigger.open {
  border-color: rgba(0,229,160,0.5);
  color: #e8e8f0;
  background: rgba(0,229,160,0.04);
  box-shadow: 0 0 12px rgba(0,229,160,0.1);
  border-radius: 10px 10px 0 0;
}
.custom-select-trigger.has-value {
  color: #e8e8f0;
  border-color: rgba(0,229,160,0.4);
}
.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #0f0f18;
  border: 1px solid rgba(0,229,160,0.3);
  border-top: none;
  border-radius: 0 0 10px 10px;
  z-index: 500;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 20px rgba(0,229,160,0.08);
  animation: dropDown .15s ease;
}
@keyframes dropDown {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}
.dropdown-item {
  padding: 12px 16px;
  font-family: DM Sans, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #6b6b80;
  cursor: pointer;
  transition: all .15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover {
  background: rgba(0,229,160,0.08);
  color: #e8e8f0;
  padding-left: 22px;
}
.dropdown-item.selected {
  background: rgba(0,229,160,0.12);
  color: #00e5a0;
  font-weight: 700;
}
.dropdown-item.selected::after {
  content: "✓";
  margin-left: auto;
  color: #00e5a0;
  font-size: 12px;
}
/* Emotion multi-select tags */
#emotionTags .etag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 12px;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.3);
  border-radius: 20px;
  font-family: DM Mono, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #00e5a0;
  cursor: pointer;
  transition: all .15s;
}
#emotionTags .etag:hover { background: rgba(255,77,109,0.1); border-color: rgba(255,77,109,0.3); color: #ff4d6d; }
#emotionTags .etag .etag-x { font-size: 10px; opacity: .7; }
/* Entry tag */
#entryTag .rtag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(0,184,255,0.1);
  border: 1px solid rgba(0,184,255,0.3);
  border-radius: 8px;
  font-family: DM Mono, monospace;
  font-size: 11px; font-weight: 700;
  color: #00b8ff;
}
/* Loss tag */
#lossTag .ltag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(255,77,109,0.1);
  border: 1px solid rgba(255,77,109,0.3);
  border-radius: 8px;
  font-family: DM Mono, monospace;
  font-size: 11px; font-weight: 700;
  color: #ff4d6d;
}
@media(max-width:900px) { .psych-row-3 { grid-template-columns: 1fr; } }
@media(max-width:600px) { .psych-row-3 { grid-template-columns: 1fr; } }


.neon-box {
  background: #0f0f18;
  border: 1px solid rgba(255,40,40,0.35);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(255,30,30,0.12), 0 0 20px rgba(255,30,30,0.05);
  transition: box-shadow .3s, border-color .3s;
}
.neon-box:hover {
  border-color: rgba(255,40,40,0.65);
  box-shadow: 0 0 14px rgba(255,30,30,0.25), 0 0 32px rgba(255,30,30,0.1);
}
.widget-hdr {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: DM Mono, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #6b6b80;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,30,30,0.02);
}
.widget-hdr::before {
  content: "●";
  color: #00e5a0;
  font-size: 7px;
  animation: pulse 2s infinite;
}


/* ══ PREMIUM ANALYTICS CHARTS ══ */
.analytics-section-label {
  font-family: DM Mono, monospace;
  font-size: 10px;
  font-weight: 800;
  color: #00e5a0;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.analytics-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,229,160,0.3), transparent);
}
.premium-chart-card {
  background: #0c0c14;
  border: 1px solid rgba(255,40,40,0.25);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
  box-shadow:
    0 0 0 1px rgba(255,40,40,0.05),
    0 4px 24px rgba(0,0,0,0.4),
    0 0 20px rgba(255,30,30,0.06);
}
.premium-chart-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,160,0.4), transparent);
}
.premium-chart-card:hover {
  border-color: rgba(255,40,40,0.5);
  box-shadow:
    0 0 0 1px rgba(255,40,40,0.1),
    0 8px 32px rgba(0,0,0,0.5),
    0 0 30px rgba(255,30,30,0.1);
}
.premium-chart-card.full-width { grid-column: 1 / -1; }
.pcc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pcc-title {
  font-family: Bebas Neue, sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: #e8e8f0;
  line-height: 1;
}
.pcc-sub {
  font-family: DM Mono, monospace;
  font-size: 10px;
  color: #6b6b80;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
}
.pcc-badge {
  margin-left: auto;
  font-family: Bebas Neue, sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
}

/* Premium KPI cards */
#pnlKpiStrip .pnl-kpi {
  background: #0c0c14 !important;
  border: 1px solid rgba(255,40,40,0.2) !important;
  border-radius: 14px !important;
  padding: 20px !important;
  position: relative;
  overflow: hidden;
}
#pnlKpiStrip .pnl-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-color, #00e5a0), transparent);
}
#pnlKpiStrip .pnl-kpi:nth-child(1)::before { background: linear-gradient(90deg,#00e5a0,transparent); }
#pnlKpiStrip .pnl-kpi:nth-child(2)::before { background: linear-gradient(90deg,#00b8ff,transparent); }
#pnlKpiStrip .pnl-kpi:nth-child(3)::before { background: linear-gradient(90deg,#9945ff,transparent); }
#pnlKpiStrip .pnl-kpi:nth-child(4)::before { background: linear-gradient(90deg,#ff4d6d,transparent); }
.pnl-kpi-label {
  font-family: DM Mono, monospace !important;
  font-size: 9px !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: #6b6b80 !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
}
.pnl-kpi-val {
  font-family: Bebas Neue, sans-serif !important;
  font-size: 32px !important;
  letter-spacing: 2px !important;
  line-height: 1 !important;
}
.pnl-kpi-sub {
  font-family: DM Mono, monospace !important;
  font-size: 11px !important;
  color: #6b6b80 !important;
  margin-top: 6px !important;
}

@media(max-width:900px) {
  .premium-chart-card { padding: 16px; }
  .pcc-title { font-size: 18px; }
  #view-analytics .charts-3col { grid-template-columns: 1fr !important; }
}


/* ── All stat card top borders = same red neon ── */
.stat-card.green::before,
.stat-card.red::before,
.stat-card.gold::before,
.stat-card.blue::before,
.stat-card::before {
  background: linear-gradient(90deg, rgba(255,40,40,0.55), transparent) !important;
}
/* Remove any pnl-kpi coloured borders — all red */
#pnlKpiStrip .pnl-kpi::before,
#pnlKpiStrip .pnl-kpi:nth-child(1)::before,
#pnlKpiStrip .pnl-kpi:nth-child(2)::before,
#pnlKpiStrip .pnl-kpi:nth-child(3)::before,
#pnlKpiStrip .pnl-kpi:nth-child(4)::before,
#pnlKpiStrip .pnl-kpi:nth-child(5)::before,
#pnlKpiStrip .pnl-kpi:nth-child(6)::before,
#pnlKpiStrip .pnl-kpi:nth-child(7)::before,
#pnlKpiStrip .pnl-kpi:nth-child(8)::before {
  background: linear-gradient(90deg, rgba(255,40,40,0.5), transparent) !important;
}


/* ══ TRADES DROPDOWN TAB ══ */
.tab-dropdown-wrap {
  position: relative;
}
.tab-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #0f0f18;
  border: 1px solid rgba(255,40,40,0.35);
  border-radius: 12px;
  overflow: hidden;
  z-index: 9999;
  min-width: 200px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 24px rgba(255,30,30,0.1);
  animation: dropDown .15s ease;
}
.tab-drop-item {
  padding: 12px 18px;
  font-family: DM Sans, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #6b6b80;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tab-drop-item:hover {
  background: rgba(0,229,160,0.06);
  color: #e8e8f0;
  padding-left: 24px;
}
.tab-drop-item.active-item {
  color: #00e5a0;
  background: rgba(0,229,160,0.06);
}
.tab-drop-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}
.log-item {
  color: #00e5a0 !important;
  font-weight: 800 !important;
  background: rgba(0,229,160,0.05) !important;
  border-top: 1px solid rgba(0,229,160,0.1);
}
.log-item:hover {
  background: rgba(0,229,160,0.12) !important;
  padding-left: 24px !important;
}

/* ══ LOG PANEL DRAWER ══ */
#logPanel.open #logPanelDrawer { transform: translateX(0) !important; }
#logPanel.open { display: block !important; }

/* Trades view label */
.trades-view-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.trades-view-title {
  font-family: Bebas Neue, sans-serif;
  font-size: 32px;
  letter-spacing: 3px;
  color: #e8e8f0;
}
.trades-view-title span { color: #00e5a0; }
.log-trade-btn {
  font-family: DM Sans, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #000;
  background: #00e5a0;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0,229,160,0.3);
  transition: all .2s;
  letter-spacing: 0.5px;
}
.log-trade-btn:hover { opacity: .9; transform: translateY(-1px); }


/* ══ AI REVIEW TAB — Ultra Premium ══ */
.ai-tab {
  position: relative;
  background: linear-gradient(135deg, #0a0a0f, #0f0f18) !important;
  border: 1px solid rgba(138,43,226,0.5) !important;
  border-radius: 8px !important;
  overflow: visible !important;
  padding: 10px 20px !important;
}
.ai-tab::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  background: linear-gradient(135deg, #b06aff, #00e5a0, #00b8ff, #b06aff);
  background-size: 300% 300%;
  z-index: -1;
  animation: aiGradient 3s ease infinite;
  opacity: 0.7;
}
.ai-tab::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background: #0a0a0f;
  z-index: -1;
}
@keyframes aiGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.ai-tab-inner {
  background: linear-gradient(135deg, #b06aff, #00e5a0, #00b8ff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800 !important;
  letter-spacing: 1px;
  animation: aiGradient 3s ease infinite;
  font-size: 13px;
}
.ai-tab.active .ai-tab-inner {
  filter: brightness(1.2);
}
.ai-tab:hover {
  box-shadow: 0 0 20px rgba(176,106,255,0.3), 0 0 40px rgba(0,229,160,0.1) !important;
  transform: translateY(-1px);
}
.ai-tab.active {
  box-shadow: 0 0 24px rgba(176,106,255,0.4), 0 0 48px rgba(0,229,160,0.15) !important;
  background: linear-gradient(135deg, rgba(176,106,255,0.08), rgba(0,229,160,0.05)) !important;
}

/* ══ AI REVIEW PAGE ══ */
#view-ai-review {
  padding-bottom: 40px;
}
.ai-hero {
  text-align: center;
  padding: 32px 20px 36px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(176,106,255,0.05), rgba(0,229,160,0.03), rgba(0,184,255,0.05));
  border: 1px solid rgba(176,106,255,0.2);
  border-radius: 16px;
}
.ai-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(176,106,255,0.12), transparent);
  pointer-events: none;
}
.ai-hero-label {
  font-family: DM Mono, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #b06aff;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ai-hero-title {
  font-family: Bebas Neue, sans-serif;
  font-size: clamp(36px,5vw,64px);
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #e8e8f0, #b06aff, #00e5a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-hero-sub {
  font-family: DM Sans, sans-serif;
  font-size: 15px;
  color: #6b6b80;
  max-width: 460px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.ai-mode-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.ai-mode-btn {
  padding: 16px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.ai-mode-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(176,106,255,0.4);
  box-shadow: 0 8px 24px rgba(176,106,255,0.12);
}
.ai-mode-btn.selected {
  border-color: rgba(176,106,255,0.6);
  background: rgba(176,106,255,0.08);
  box-shadow: 0 0 20px rgba(176,106,255,0.15);
}
.ai-mode-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.ai-mode-title {
  font-family: DM Sans, sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #e8e8f0;
  margin-bottom: 4px;
}
.ai-mode-desc {
  font-family: DM Mono, monospace;
  font-size: 10px;
  color: #6b6b80;
  letter-spacing: 0.5px;
}
.ai-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: DM Sans, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: all .25s;
  background: linear-gradient(135deg, #b06aff, #6a0fff);
  color: #fff;
  box-shadow: 0 0 30px rgba(176,106,255,0.4), 0 0 60px rgba(176,106,255,0.15);
}
.ai-generate-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.15);
  transform: skewX(-20deg);
  transition: left .5s;
}
.ai-generate-btn:hover::before { left: 120%; }
.ai-generate-btn:hover {
  box-shadow: 0 0 40px rgba(176,106,255,0.6), 0 0 80px rgba(176,106,255,0.2);
  transform: translateY(-2px);
}
.ai-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.ai-roast-btn {
  background: linear-gradient(135deg, #ff4d6d, #cc1a35);
  box-shadow: 0 0 30px rgba(255,77,109,0.35);
  color: #fff;
}
.ai-roast-btn:hover {
  box-shadow: 0 0 40px rgba(255,77,109,0.6) !important;
}

/* AI Response card */
.ai-response-card {
  background: #0f0f18;
  border: 1px solid rgba(176,106,255,0.3);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(176,106,255,0.08);
}
.ai-response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(176,106,255,0.04);
}
.ai-response-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #b06aff;
  box-shadow: 0 0 8px #b06aff;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}
.ai-response-title {
  font-family: DM Mono, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #b06aff;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.ai-response-body {
  padding: 24px 22px;
  font-family: DM Sans, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #e8e8f0;
}
.ai-response-body .ai-section-title {
  font-family: Bebas Neue, sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: #b06aff;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-response-body .ai-section-title:first-child { margin-top: 0; }
.ai-highlight {
  display: inline-block;
  background: rgba(176,106,255,0.12);
  border: 1px solid rgba(176,106,255,0.25);
  border-radius: 6px;
  padding: 2px 8px;
  color: #b06aff;
  font-weight: 700;
  font-size: 13px;
}
.ai-highlight.green {
  background: rgba(0,229,160,0.1);
  border-color: rgba(0,229,160,0.25);
  color: #00e5a0;
}
.ai-highlight.red {
  background: rgba(255,77,109,0.1);
  border-color: rgba(255,77,109,0.25);
  color: #ff4d6d;
}
.ai-roast-card {
  border-color: rgba(255,77,109,0.4) !important;
  box-shadow: 0 0 30px rgba(255,77,109,0.1) !important;
}
.ai-roast-header {
  background: rgba(255,77,109,0.06) !important;
}
.ai-roast-dot {
  background: #ff4d6d !important;
  box-shadow: 0 0 8px #ff4d6d !important;
}
.ai-roast-title { color: #ff4d6d !important; }

/* Typing animation */
.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 20px 0;
}
.ai-typing span {
  width: 6px; height: 6px;
  background: #b06aff;
  border-radius: 50%;
  animation: typingDot 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; background: #7a3fff; }
.ai-typing span:nth-child(3) { animation-delay: .4s; background: #00e5a0; }
@keyframes typingDot {
  0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
  40%          { transform: scale(1.2); opacity: 1; }
}

/* Stats summary strip */
.ai-stats-strip {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.ai-stat-card {
  background: #0f0f18;
  border: 1px solid rgba(255,40,40,0.25);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ai-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(176,106,255,0.6), transparent);
}
.ai-stat-val {
  font-family: Bebas Neue, sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.ai-stat-label {
  font-family: DM Mono, monospace;
  font-size: 9px;
  color: #6b6b80;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@media(max-width:900px) {
  .ai-mode-grid { grid-template-columns: 1fr; }
  .ai-stats-strip { grid-template-columns: repeat(2,1fr); }
}


/* ══ MARKETS TAB — RESPONSIVE LAYOUT ══ */
#view-markets {
  padding-bottom: 32px;
}
/* Stack on mobile */
@media(max-width:768px) {
  .markets-bottom-grid {
    grid-template-columns: 1fr !important;
  }
  #view-markets .tradingview-widget-container[style*="min-height"] {
    min-height: 400px !important;
    height: 70vw !important;
    max-height: 500px !important;
  }
}


/* Trades arrow always visible */
#tradesArrow { stroke: #000 !important; }
#tradesTab:not(.active) #tradesArrow { stroke: #6b6b80 !important; }
#tradesTab.active #tradesArrow { stroke: #000 !important; }


/* ══ MARKETS — RESPONSIVE ══ */
#view-markets .neon-box { overflow: hidden; }
#view-markets .tradingview-widget-container { display: block !important; }
#view-markets .tradingview-widget-container__widget { display: block !important; }

@media(max-width: 768px) {
  #view-markets > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #view-markets [style*="height:500px"] { height: 380px !important; }
  #view-markets [style*="height:550px"] { height: 480px !important; }
  #view-markets [style*="height:300px"] { height: 260px !important; }
  #view-markets [style*="height:600px"] { height: 480px !important; }
}
@media(max-width: 480px) {
  #view-markets [style*="height:500px"] { height: 320px !important; }
  #view-markets [style*="height:550px"] { height: 400px !important; }
  #view-markets [style*="height:300px"] { height: 240px !important; }
  #view-markets [style*="height:600px"] { height: 420px !important; }
}


/* Period selector buttons */
.period-btn {
  font-family: DM Sans, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #6b6b80;
  background: transparent;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.period-btn:hover { color: #e8e8f0; background: rgba(255,255,255,0.05); }
.period-btn.active-period {
  background: #00e5a0;
  color: #000;
  font-weight: 800;
}


/* ══════════════════════════════════════════
   ANALYTICS — PREMIUM NEON DARK UI
   ══════════════════════════════════════════ */

/* KPI Cards */
.an-kpi {
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px 18px 12px;
  position: relative;
  overflow: hidden;
  transition: all .2s;
}
.an-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(0,229,160,0.8), rgba(0,184,255,0.4), transparent);
  border-radius: 14px 14px 0 0;
}
.an-kpi:hover {
  border-color: rgba(0,229,160,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,229,160,0.08);
}
.an-kpi-label {
  font-family: DM Mono, monospace;
  font-size: 9px;
  color: #6b6b80;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.an-kpi-val {
  font-family: Bebas Neue, sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  color: #e8e8f0;
  line-height: 1;
  margin-bottom: 4px;
}
.an-kpi-val.positive { color: #00e5a0; text-shadow: 0 0 20px rgba(0,229,160,0.4); }
.an-kpi-val.negative { color: #ff4d6d; text-shadow: 0 0 20px rgba(255,77,109,0.4); }
.an-kpi-sub {
  font-family: DM Mono, monospace;
  font-size: 10px;
  color: #4a4a5a;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.an-kpi-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.an-kpi-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px currentColor;
}

/* Analytics Cards (chart containers) */
.an-card {
  background: linear-gradient(145deg, #0d0d18, #0f0f1e);
  border: 1px solid rgba(255,40,40,0.2);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.an-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,160,0.3), rgba(0,184,255,0.2), transparent);
}
.an-card:hover {
  border-color: rgba(255,40,40,0.4);
  box-shadow: 0 0 30px rgba(0,229,160,0.05), 0 4px 20px rgba(0,0,0,0.3);
}
.an-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.an-card-title {
  font-family: DM Mono, monospace;
  font-size: 10px;
  color: #8888a0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}
.an-card-badge {
  font-family: DM Mono, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.an-chart-wrap {
  position: relative;
  width: 100%;
}
.an-chart-wrap canvas {
  width: 100% !important;
}

/* Responsive analytics grid */
@media(max-width: 900px) {
  #analyticsKpiGrid { grid-template-columns: repeat(2,1fr) !important; }
}
@media(max-width: 600px) {
  #analyticsKpiGrid { grid-template-columns: 1fr 1fr !important; }
  #view-analytics > div[style*="grid-template-columns:2fr 1fr"],
  #view-analytics > div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}


/* ══ INDIAN INDEX OPTIONS ══ */
#optionsFieldsWrap {
  background: linear-gradient(135deg, rgba(245,200,66,0.03), rgba(0,229,160,0.02));
  border: 1px solid rgba(245,200,66,0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
#optionsFieldsWrap::before {
  content: '🇮🇳 INDIAN INDEX OPTIONS';
  display: block;
  font-family: DM Mono, monospace;
  font-size: 9px;
  color: #f5c842;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245,200,66,0.1);
}
#btnCE, #btnPE {
  text-align: center;
  line-height: 1.3;
}
#btnCE:hover { opacity: 0.9; transform: translateY(-1px); }
#btnPE:hover { opacity: 0.9; transform: translateY(-1px); }
#tradeStrike, #tradeStrikeCustom {
  font-family: DM Mono, monospace;
  font-size: 12px;
}
#optionsPnlPreview {
  transition: all 0.2s;
}


/* ══ MODE SWITCHER ══ */
#modeSwitcher {
  transition: border-color .3s, box-shadow .3s;
}
body.inr-mode #modeSwitcher {
  border-color: rgba(255,140,0,0.5);
  box-shadow: 0 0 20px rgba(255,140,0,0.15);
}
/* INR mode accent overrides */
body.inr-mode .capital-banner,
body.inr-mode #capitalCard {
  border-color: rgba(255,140,0,0.4) !important;
  box-shadow: 0 0 40px rgba(255,140,0,0.08) !important;
}
body.inr-mode .an-kpi::before {
  background: linear-gradient(90deg, rgba(255,140,0,0.8), rgba(245,200,66,0.4), transparent);
}
/* Hide USD-only assets in INR mode asset dropdown */
body.inr-mode .usd-only-asset { display: none !important; }
body.usd-mode .inr-only-asset { display: none !important; }



/* ══════════════════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE — Trading App Feel (Zerodha/Robinhood)
   Breakpoint: 768px and below
   Desktop layout is UNTOUCHED — all changes inside media queries
   ══════════════════════════════════════════════════════════════ */

/* ── TABLET (≤768px) ── */
@media (max-width: 768px) {

  /* ── BASE LAYOUT ── */
  .app {
    padding: 16px !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  body {
    overflow-x: hidden !important;
  }

  /* ── TOP NAV — compact mobile bar ── */
  .dash-nav {
    padding: 0 16px !important;
    height: 50px !important;
    gap: 8px !important;
  }
  .dash-nav-logo {
    font-size: 14px !important;
    letter-spacing: 1.5px !important;
  }
  .dash-nav-right {
    gap: 6px !important;
  }
  #modeSwitcher {
    padding: 3px !important;
    border-radius: 8px !important;
  }
  #modeSwitcher button,
  #modeUSD, #modeINR {
    font-size: 10px !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    letter-spacing: 0.5px !important;
  }
  #currentDate {
    display: none !important;
  }

  /* ── USER HEADER BAR ── */
  .app > div[style*="display:flex"][style*="justify-content:space-between"][style*="padding:14px 24px"] {
    padding: 10px 16px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  #userProfileBadge {
    padding: 4px 10px 4px 6px !important;
    border-radius: 8px !important;
  }
  #userProfileBadge > div:first-child {
    width: 24px !important;
    height: 24px !important;
    font-size: 14px !important;
  }
  #headerUsername {
    font-size: 11px !important;
  }
  #headerRank {
    font-size: 8px !important;
  }
  #userEmail {
    max-width: 120px !important;
    font-size: 10px !important;
  }

  /* ── TABS — horizontally scrollable on mobile ── */
  .tabs-sticky-wrap {
    top: 50px !important;
    padding: 6px 0 !important;
    margin-bottom: 14px !important;
  }
  .tabs {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 3px !important;
    gap: 3px !important;
  }
  .tab {
    font-size: 11px !important;
    padding: 8px 12px !important;
    white-space: nowrap !important;
    min-height: 38px !important;
    flex-shrink: 0 !important;
  }
  .ai-tab {
    padding: 8px 12px !important;
  }
  .ai-tab-inner {
    font-size: 11px !important;
  }

  /* ── TRADE JOURNAL HEADER ── */
  .app > div[style*="font-size:48px"],
  div[style*="font-family:Bebas Neue"][style*="font-size:48px"] {
    font-size: 32px !important;
  }
  .tagline {
    font-size: 9px !important;
    letter-spacing: 2px !important;
    padding: 8px 12px !important;
    margin-bottom: 14px !important;
  }
  #modeTagline {
    font-size: 9px !important;
    letter-spacing: 1.5px !important;
  }

  /* ── TICKER TAPE ── */
  .app > div[style*="margin-bottom:20px"][style*="border-radius:12px"] {
    margin-bottom: 12px !important;
    border-radius: 8px !important;
  }

  /* ── STAT CARDS — 2 columns on mobile ── */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .stat-card {
    padding: 14px !important;
    border-radius: 10px !important;
  }
  .stat-value {
    font-size: 22px !important;
  }
  .pips-large {
    font-size: 22px !important;
  }
  .stat-label {
    font-size: 8px !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 8px !important;
  }
  .stat-sub {
    font-size: 10px !important;
    margin-top: 3px !important;
  }

  /* ── CAPITAL CARD ── */
  #capitalCard {
    padding: 18px 16px !important;
    border-radius: 14px !important;
  }
  #capitalCard > div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 14px !important;
  }
  #capitalCard div[style*="font-size:52px"],
  .capital-amount {
    font-size: 36px !important;
  }
  #capitalCard div[style*="font-size:28px"] {
    font-size: 20px !important;
  }
  #capitalCard div[style*="display:flex"][style*="flex-direction:column"][style*="align-items:flex-end"] {
    align-items: stretch !important;
    width: 100% !important;
  }
  #capitalCard div[style*="display:flex"][style*="gap:8px"][style*="align-items:center"] {
    flex-direction: column !important;
    width: 100% !important;
  }
  .capital-input {
    width: 100% !important;
    min-height: 44px !important;
  }
  #capitalSummaryBar {
    gap: 12px !important;
  }
  #capitalSummaryBar > div {
    min-width: 0 !important;
  }
  #capitalSummaryBar div[style*="font-size:22px"] {
    font-size: 18px !important;
  }

  /* ── P&L NEON BAR ── */
  #pnlNeonBar {
    padding: 12px 14px !important;
    border-radius: 8px !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  #pnlNeonAmount {
    font-size: 22px !important;
  }

  /* ── TWO COLUMN LAYOUTS → single column ── */
  .two-col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ── TABLES — horizontal scroll with card-like feel ── */
  .table-card {
    border-radius: 10px !important;
    overflow: hidden !important;
  }
  .table-card > div[style*="overflow-x:auto"] {
    -webkit-overflow-scrolling: touch !important;
  }
  table {
    min-width: 600px !important;
  }
  th {
    font-size: 8px !important;
    padding: 8px 10px !important;
    letter-spacing: 1.5px !important;
  }
  td {
    font-size: 11px !important;
    padding: 10px !important;
  }
  .table-header {
    padding: 12px 16px !important;
  }

  /* ── LOG PANEL — full screen on mobile ── */
  #logPanelDrawer {
    width: 100vw !important;
    top: 0 !important;
    border-radius: 0 !important;
    border: none !important;
  }
  #logPanelDrawer > div[style*="padding:20px 24px"] {
    padding: 16px !important;
  }
  #logPanelDrawer > div[style*="position:sticky"] {
    padding: 14px 16px !important;
  }
  #logPanelDrawer div[style*="display:grid"][style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .form-control {
    min-height: 44px !important;
    font-size: 14px !important;
    padding: 12px 14px !important;
  }
  select.form-control {
    min-height: 44px !important;
  }
  #addTradeBtn {
    min-height: 52px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }

  /* ── PSYCHOLOGY PANEL ── */
  .psych-panel {
    padding: 14px !important;
    border-radius: 10px !important;
  }
  .psych-row-3 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .custom-select-trigger {
    min-height: 44px !important;
    font-size: 13px !important;
    padding: 10px 14px !important;
  }
  .custom-select-dropdown {
    max-height: 220px !important;
    overflow-y: auto !important;
  }
  .dropdown-item {
    padding: 12px 14px !important;
    min-height: 44px !important;
  }
  .chip {
    padding: 8px 14px !important;
    font-size: 11px !important;
    min-height: 36px !important;
  }

  /* ── OPTIONS FIELDS (Indian indices) ── */
  #optionsFieldsWrap {
    padding: 14px !important;
  }
  #optionsFieldsWrap > div[style*="display:grid"][style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  #btnCE, #btnPE {
    padding: 14px 8px !important;
    font-size: 13px !important;
    min-height: 52px !important;
  }

  /* ── WITHDRAWAL / ADD FUNDS PANELS ── */
  .withdrawal-panel,
  #addFundsPanel {
    padding: 18px !important;
    border-radius: 12px !important;
  }
  .withdrawal-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .w-input-row {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .w-input {
    min-height: 44px !important;
    font-size: 14px !important;
  }

  /* ── MONTHLY VIEW ── */
  .month-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .month-card {
    padding: 14px !important;
    border-radius: 10px !important;
  }
  .month-name {
    font-size: 14px !important;
  }
  .month-pnl {
    font-size: 18px !important;
  }

  /* ── YEARLY VIEW ── */
  .year-bar {
    padding: 18px !important;
    border-radius: 10px !important;
  }

  /* ── ANALYTICS ── */
  #view-analytics > div[style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column !important;
    gap: 12px !important;
  }
  #view-analytics div[style*="font-size:48px"] {
    font-size: 32px !important;
  }
  .analytics-controls {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
  .range-btn {
    font-size: 10px !important;
    padding: 6px 10px !important;
    min-height: 34px !important;
  }
  #analyticsKpiGrid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .an-kpi {
    padding: 12px 14px 10px !important;
    border-radius: 10px !important;
  }
  .an-kpi-val {
    font-size: 22px !important;
  }
  .an-kpi-label {
    font-size: 8px !important;
  }

  /* Analytics chart grids → single column */
  #view-analytics > div[style*="grid-template-columns:2fr 1fr"],
  #view-analytics > div[style*="grid-template-columns:1fr 1fr"],
  #view-analytics > div[style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .an-card {
    padding: 16px !important;
    border-radius: 12px !important;
  }
  .an-chart-wrap {
    height: 160px !important;
  }

  /* ── LEADERBOARD ── */
  #view-leaderboard > div[style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column !important;
    gap: 12px !important;
  }
  #view-leaderboard div[style*="font-size:42px"] {
    font-size: 28px !important;
  }
  #lbPodium {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  /* Leaderboard table scroll */
  #view-leaderboard .table-card {
    overflow: hidden !important;
  }
  #view-leaderboard .table-card > div[style*="overflow-x:auto"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #view-leaderboard table {
    min-width: 550px !important;
  }
  /* Leaderboard mode toggle */
  #view-leaderboard div[style*="display:flex"][style*="gap:6px"][style*="background:#0f0f18"] {
    width: 100% !important;
  }
  #view-leaderboard div[style*="display:flex"][style*="gap:6px"][style*="background:#0f0f18"] button {
    flex: 1 !important;
  }

  /* ── MARKETS ── */
  #view-markets > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .neon-box {
    border-radius: 10px !important;
  }
  .widget-hdr {
    font-size: 10px !important;
    padding: 10px 14px !important;
  }
  #view-markets div[style*="font-size:42px"] {
    font-size: 28px !important;
  }

  /* ── AI REVIEW ── */
  .ai-hero {
    padding: 24px 16px 28px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
  }
  .ai-hero-title {
    font-size: 32px !important;
    letter-spacing: 3px !important;
  }
  .ai-hero-sub {
    font-size: 13px !important;
  }
  .ai-stats-strip {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .ai-stat-card {
    padding: 14px 12px !important;
    border-radius: 10px !important;
  }
  .ai-stat-val {
    font-size: 22px !important;
  }
  .ai-mode-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .ai-mode-btn {
    padding: 14px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
  }
  .ai-mode-icon {
    font-size: 22px !important;
    margin-bottom: 0 !important;
  }
  .ai-generate-btn {
    padding: 14px 24px !important;
    font-size: 13px !important;
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
  }
  .ai-roast-btn {
    width: 100% !important;
  }
  #view-ai-review > div[style*="display:flex"][style*="gap:14px"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .ai-response-card {
    border-radius: 12px !important;
  }
  .ai-response-header {
    padding: 12px 16px !important;
  }
  .ai-response-body {
    padding: 16px !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
  }
  .ai-response-body .ai-section-title {
    font-size: 16px !important;
  }

  /* ── WEEKLY VIEW ── */
  .trades-view-label {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .trades-view-title {
    font-size: 24px !important;
  }

  /* ── TRADE JOURNAL HEADER ── */
  #view-journal > div[style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  #view-journal div[style*="font-size:36px"] {
    font-size: 26px !important;
  }
  #view-journal button[onclick="openLogPanel()"] {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
  }

  /* ── TOAST ── */
  .toast {
    right: 12px !important;
    left: 12px !important;
    bottom: 16px !important;
    font-size: 12px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    text-align: center !important;
  }

  /* ── AUTH SCREEN ── */
  #authScreen > div {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
  #authScreen div[style*="font-size:54px"] {
    font-size: 36px !important;
    letter-spacing: 3px !important;
  }
  #authScreen button[onclick="signInWithGoogle()"] {
    padding: 16px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    min-height: 52px !important;
  }
  #authScreen div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* ── ONBOARD SCREEN ── */
  #onboardScreen > div {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
  #onboardScreen div[style*="font-size:40px"] {
    font-size: 28px !important;
  }
  #onboardAvatarGrid {
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 5px !important;
  }
  #onboardSaveBtn {
    min-height: 52px !important;
    font-size: 14px !important;
  }

  /* ── GENERAL — prevent horizontal overflow ── */
  img, video, iframe, canvas, svg {
    max-width: 100% !important;
  }
  * {
    -webkit-text-size-adjust: 100% !important;
  }
}


/* ── SMALL PHONES (≤480px) ── */
@media (max-width: 480px) {

  .app {
    padding: 12px !important;
  }

  /* Even smaller stat cards */
  .stats-grid {
    gap: 8px !important;
  }
  .stat-card {
    padding: 12px !important;
  }
  .stat-value {
    font-size: 20px !important;
  }
  .pips-large {
    font-size: 20px !important;
  }

  /* Capital card */
  #capitalCard div[style*="font-size:52px"],
  .capital-amount {
    font-size: 30px !important;
  }

  /* Tabs even more compact */
  .tab {
    font-size: 10px !important;
    padding: 7px 10px !important;
  }

  /* Monthly grid single column */
  .month-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Analytics KPI */
  .an-kpi-val {
    font-size: 18px !important;
  }

  /* AI hero */
  .ai-hero-title {
    font-size: 26px !important;
  }

  /* Log panel form — full single column */
  #logPanelDrawer div[style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }

  /* Avatar grid smaller */
  #onboardAvatarGrid {
    grid-template-columns: repeat(7, 1fr) !important;
  }

  /* Auth title */
  #authScreen div[style*="font-size:54px"] {
    font-size: 28px !important;
    letter-spacing: 2px !important;
  }

  /* Leaderboard */
  #view-leaderboard div[style*="font-size:42px"] {
    font-size: 24px !important;
  }
}
