html{--tn-accent:#93f52f;--tn-accent-2:#35d07f;--tn-glow:rgba(147,245,47,.24);--tn-glow-2:rgba(53,208,127,.16);--tn-rgb:147,245,47}
html[data-palette="sunrise"]{--tn-accent:#ff6b35;--tn-accent-2:#ffd166;--tn-glow:rgba(255,107,53,.24);--tn-glow-2:rgba(255,209,102,.16);--tn-rgb:255,107,53}
html[data-palette="mint"]{--tn-accent:#86efac;--tn-accent-2:#2dd4bf;--tn-glow:rgba(134,239,172,.24);--tn-glow-2:rgba(45,212,191,.16);--tn-rgb:134,239,172}
html[data-palette="graphite"]{--tn-accent:#e5e7eb;--tn-accent-2:#94a3b8;--tn-glow:rgba(229,231,235,.20);--tn-glow-2:rgba(148,163,184,.14);--tn-rgb:229,231,235}
html[data-palette="berry"]{--tn-accent:#fb7185;--tn-accent-2:#c084fc;--tn-glow:rgba(251,113,133,.24);--tn-glow-2:rgba(192,132,252,.16);--tn-rgb:251,113,133}
html[data-palette="sand"]{--tn-accent:#facc15;--tn-accent-2:#fb923c;--tn-glow:rgba(250,204,21,.22);--tn-glow-2:rgba(251,146,60,.15);--tn-rgb:250,204,21}
html[data-palette="sky"]{--tn-accent:#7dd3fc;--tn-accent-2:#60a5fa;--tn-glow:rgba(125,211,252,.24);--tn-glow-2:rgba(96,165,250,.16);--tn-rgb:125,211,252}
body.trader-dashboard{
  background:
    radial-gradient(circle at 18% 0%,var(--tn-glow),transparent 28%),
    radial-gradient(circle at 82% 8%,var(--tn-glow-2),transparent 30%),
    linear-gradient(135deg,#20252e 0%,#111418 45%,#080a0d 100%)!important;
  color:#f4f7fb;
}
body.trader-dashboard:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:radial-gradient(circle,rgba(255,255,255,.18) 1px,transparent 1.5px);background-size:120px 120px;opacity:.18;z-index:0}
body.trader-dashboard .app-shell{max-width:1500px;padding:28px;position:relative;z-index:1}
body.trader-dashboard .surface,
body.trader-dashboard .surface-subtle,
body.trader-dashboard .metric,
body.trader-dashboard .section-card,
body.trader-dashboard .account-card,
body.trader-dashboard .session-card,
body.trader-dashboard .position-card{
  background:linear-gradient(180deg,rgba(28,31,35,.92),rgba(17,19,23,.94))!important;
  border:1px solid rgba(255,255,255,.075)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.035)!important;
  color:#f4f7fb;
}
body.trader-dashboard .hero{overflow:hidden;border-radius:34px;padding:22px;background:
  radial-gradient(circle at 72% 8%,var(--tn-glow),transparent 24%),
  linear-gradient(145deg,rgba(28,31,35,.96),rgba(13,15,18,.98))!important}
body.trader-dashboard .hero:after{content:"";position:absolute;right:-70px;top:-100px;width:280px;height:280px;border-radius:999px;background:radial-gradient(circle,var(--tn-glow),transparent 66%);pointer-events:none}
body.trader-dashboard .title{font-size:clamp(2.15rem,4vw,4.5rem);line-height:.92;letter-spacing:-.075em;color:#fff}
body.trader-dashboard .caption,
body.trader-dashboard .metric-note,
body.trader-dashboard .position-meta,
body.trader-dashboard .account-meta{color:rgba(226,232,240,.68)!important}
body.trader-dashboard .eyebrow{color:var(--tn-accent);letter-spacing:.18em}
body.trader-dashboard .pill,
body.trader-dashboard .filter-chip,
body.trader-dashboard .app-switch,
body.trader-dashboard .app-switch-link,
body.trader-dashboard .mini-btn{
  background:rgba(255,255,255,.055)!important;
  border:1px solid rgba(255,255,255,.09)!important;
  color:rgba(244,247,251,.82)!important;
}
body.trader-dashboard .app-switch-link.active,
body.trader-dashboard .filter-chip.active,
body.trader-dashboard .btn-primary{
  background:linear-gradient(135deg,var(--tn-accent),var(--tn-accent-2))!important;
  color:#071009!important;
  border-color:transparent!important;
  box-shadow:0 14px 34px var(--tn-glow)!important;
}
body.trader-dashboard .btn-ghost{background:rgba(255,255,255,.06)!important;color:#f4f7fb!important;border:1px solid rgba(255,255,255,.1)!important}
body.trader-dashboard .hero-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:12px}
body.trader-dashboard .hero-stat{background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:10px 14px}
body.trader-dashboard .hero-stat-value,
body.trader-dashboard .metric-value{font-variant-numeric:tabular-nums;color:#fff;text-shadow:0 0 28px rgba(var(--tn-rgb),.12)}
body.trader-dashboard .metric{border-radius:22px;padding:12px 13px}
body.trader-dashboard .metric:before{height:3px;background:linear-gradient(90deg,var(--tn-accent),var(--tn-accent-2))}
body.trader-dashboard .metric-label{color:rgba(226,232,240,.58);font-weight:800;text-transform:uppercase;letter-spacing:.12em;font-size:11px}
body.trader-dashboard .main-grid{grid-template-columns:minmax(290px,.82fr) minmax(0,2.2fr);gap:18px}
body.trader-dashboard .section-card{border-radius:28px;padding:20px}
body.trader-dashboard .trader-settings-panel{position:sticky;top:18px;align-self:start}
body.trader-dashboard .trade-win{background:linear-gradient(135deg,rgba(21,128,61,.20),rgba(17,19,23,.94))!important}
body.trader-dashboard .trade-loss{background:linear-gradient(135deg,rgba(185,28,28,.20),rgba(17,19,23,.94))!important}
body.trader-dashboard .trade-open{background:linear-gradient(135deg,var(--tn-glow-2),rgba(17,19,23,.94))!important}
body.trader-dashboard .pnl-positive{color:#86efac!important}.pnl-negative{color:#fb7185!important}
body.trader-dashboard .field{background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.1)!important;color:#f4f7fb!important}
body.trader-dashboard .empty{background:rgba(255,255,255,.055)!important;border-color:rgba(255,255,255,.09)!important;color:rgba(226,232,240,.7)!important}
body.trader-dashboard .app-shell{
  max-width:1680px;
  min-height:100vh;
  display:grid;
  grid-template-columns:292px minmax(0,1fr);
  grid-template-areas:"side top" "side main";
  gap:18px;
  padding:22px;
}
body.trader-dashboard .hero{
  grid-area:top;
  min-height:0;
  padding:18px 20px;
}
body.trader-dashboard .hero .row.between.wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:start;
}
body.trader-dashboard .hero .title{
  max-width:760px;
  font-size:clamp(1.7rem,2.6vw,3rem);
}
body.trader-dashboard .hero .caption{
  display:none;
}
body.trader-dashboard .hero .pill{
  padding:8px 11px;
  border-radius:14px;
}
body.trader-dashboard .hero .row.wrap[style*="align-items:flex-start"]{
  justify-content:flex-end;
  gap:10px;
}
body.trader-dashboard .hero-stats{
  max-width:none;
  grid-template-columns:repeat(4,minmax(130px,1fr));
  gap:8px;
  margin-top:10px;
}
body.trader-dashboard .hero-stat{
  min-height:0;
  padding:10px 14px;
  border-radius:16px;
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.035));
}
body.trader-dashboard .hero-stat-value{
  font-size:clamp(1.22rem,1.7vw,1.55rem);
}
body.trader-dashboard .main-grid{
  display:contents;
}
body.trader-dashboard .trader-settings-panel{
  grid-area:side;
  position:sticky;
  top:18px;
  height:calc(100vh - 44px);
  min-height:720px;
  display:block;
}
body.trader-dashboard .trader-settings-panel>.section-card{
  height:100%;
  display:flex;
  flex-direction:column;
  border-radius:34px;
  padding:18px;
  overflow:hidden;
}
body.trader-dashboard .trader-settings-panel>.section-card:before{
  content:"Journal";
  display:flex;
  align-items:center;
  justify-content:center;
  width:58px;
  height:58px;
  margin-bottom:18px;
  border-radius:20px;
  background:linear-gradient(135deg,var(--tn-accent),var(--tn-accent-2));
  color:#071009;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
  box-shadow:0 16px 36px var(--tn-glow);
}
body.trader-dashboard .account-filter-shell{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  min-height:0;
}
body.trader-dashboard .account-list{
  overflow:visible;
  padding-right:0;
  max-height:none;
}
body.trader-dashboard .account-card{
  border-radius:20px;
  padding:14px;
}
body.trader-dashboard .account-actions{
  display:grid;
  grid-template-columns:1fr;
}
body.trader-dashboard .mini-btn{
  width:100%;
  justify-content:center;
}
body.trader-dashboard .trader-settings-panel .detail-box,
body.trader-dashboard .trader-column-settings .detail-box{
  order:initial;
  border-radius:22px;
}
body.trader-dashboard .trader-main-panel{
  grid-area:main;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:18px;
  align-items:start;
}
body.trader-dashboard .metrics{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:1.2fr .9fr 1.35fr;
  gap:12px;
}
body.trader-dashboard .metrics .metric:first-child{
  min-height:0;
  background:
    radial-gradient(circle at 78% 15%,var(--tn-glow),transparent 36%),
    linear-gradient(180deg,rgba(34,38,44,.96),rgba(15,17,21,.96))!important;
}
body.trader-dashboard .metric-money{
  font-size:clamp(2.05rem,2.95vw,2.95rem);
}
body.trader-dashboard .metric-open{
  font-size:clamp(1.92rem,2.72vw,2.62rem);
}
body.trader-dashboard .metrics .metric{
  min-height:0;
}
body.trader-dashboard .metrics .metric .row.between{
  align-items:flex-start;
}
body.trader-dashboard .metrics .metric .metric-note{
  margin-top:6px;
}
body.trader-dashboard .metrics .metric-combo{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  align-items:start;
}
body.trader-dashboard .metrics .direction-winrates{
  gap:6px;
  margin-top:6px;
}
body.trader-dashboard .metrics .direction-winrate{
  padding:5px 7px;
  font-size:12px;
}
body.trader-dashboard .metrics .session-trigger{
  margin-top:8px;
  padding:8px 10px;
  font-size:12px;
  border-radius:12px;
}
body.trader-dashboard .trader-columns{
  display:grid;
  grid-template-columns:minmax(300px,.88fr) minmax(380px,1.1fr) minmax(300px,.82fr);
  gap:18px;
  align-items:start;
}
body.trader-dashboard .trader-column{
  min-width:0;
}
body.trader-dashboard .trader-column-settings{
  position:sticky;
  top:18px;
}
body.trader-dashboard .trader-column .section-card{
  border-radius:28px;
}
body.trader-dashboard .trader-column-settings .section-card{
  padding:18px;
  max-height:calc(100vh - 120px);
  overflow:auto;
}
body.trader-dashboard .position-list{
  gap:10px;
}
body.trader-dashboard .position-card{
  border-radius:20px;
  padding:16px;
}
body.trader-dashboard #openPositionsTable{
  max-height:420px;
  overflow:auto;
  padding-right:4px;
}
body.trader-dashboard #closedPositionsTable{
  max-height:720px;
  overflow:auto;
  padding-right:4px;
}
.trade-calendar-shell{display:grid;gap:12px;margin-top:14px;--tc-bg:rgba(255,255,255,.86);--tc-cell:rgba(248,250,252,.92);--tc-muted:rgba(96,114,142,.82);--tc-border:rgba(148,163,184,.28);--tc-profit:rgba(16,185,129,.13);--tc-loss:rgba(239,68,68,.12);--tc-selected:rgba(37,99,235,.13)}
.trade-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:0 2px}
.trade-calendar-title{display:grid;gap:3px;min-width:180px}
.trade-calendar-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.trade-calendar-title strong{font-size:1rem;font-weight:900;color:var(--text)}
.trade-calendar-title span{font-size:.75rem;font-weight:800;color:var(--muted)}
.trade-calendar-nav{display:flex;align-items:center;gap:7px}
.trade-calendar-nav .mini-btn{min-height:30px;padding:0 10px}
.trade-calendar-month-pnl{font:900 .88rem/1 var(--tn-font-mono,'JetBrains Mono Slashed',monospace)}
.trade-calendar-month-switch{display:inline-grid;grid-template-columns:30px minmax(120px,max-content) 30px;align-items:center;gap:6px}
.trade-calendar-month-switch .mini-btn{min-height:30px;width:30px;padding:0;border-radius:10px;font-size:18px}
.trade-calendar-month-name{min-height:30px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;border-radius:10px;background:rgba(255,255,255,.76);border:1px solid rgba(148,163,184,.2);font-weight:950;text-transform:capitalize}
.trade-calendar-title .trade-calendar-month-pnl{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border-radius:999px;background:rgba(255,255,255,.72);border:1px solid rgba(148,163,184,.18)}
.trade-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--tc-border);border-radius:16px;overflow:hidden;background:var(--tc-bg)}
.trade-calendar-weekday{min-height:28px;display:grid;place-items:center;border-right:1px solid var(--tc-border);border-bottom:1px solid var(--tc-border);font-size:.64rem;font-weight:900;color:var(--tc-muted);text-transform:uppercase;background:rgba(148,163,184,.06)}
.trade-calendar-weekday:nth-child(7n){border-right:0}
.trade-calendar-day{position:relative;min-height:92px;padding:8px;border:0;border-right:1px solid var(--tc-border);border-bottom:1px solid var(--tc-border);background:var(--tc-cell);color:var(--text);text-align:left;cursor:pointer;transition:background .18s ease,border-color .18s ease,transform .18s ease}
.trade-calendar-day:nth-child(7n){border-right:0}
.trade-calendar-day.is-empty{background:rgba(148,163,184,.07);cursor:default}
.trade-calendar-day.has-trades{background:linear-gradient(180deg,var(--tc-profit),var(--tc-cell) 74%)}
.trade-calendar-day.is-loss{background:linear-gradient(180deg,var(--tc-loss),var(--tc-cell) 74%)}
.trade-calendar-day.is-selected{outline:2px solid rgba(37,99,235,.62);outline-offset:-2px;background:linear-gradient(180deg,var(--tc-selected),var(--tc-cell) 72%)}
.trade-calendar-day:active{transform:scale(.985)}
.trade-calendar-day-num{font:850 .72rem/1 var(--tn-font-mono,'JetBrains Mono Slashed',monospace);color:var(--tc-muted)}
.trade-calendar-day-pnl{margin-top:22px;font:950 .94rem/1 var(--tn-font-mono,'JetBrains Mono Slashed',monospace)}
.trade-calendar-day-count{margin-top:4px;font-size:.65rem;font-weight:800;color:var(--tc-muted)}
.trade-calendar-day-mark{position:absolute;top:8px;right:8px;width:6px;height:6px;border-radius:999px;background:#f59e0b;opacity:.75}
.trade-day-panel{display:grid;gap:10px;padding:12px;border:1px solid var(--tc-border);border-radius:16px;background:var(--tc-bg)}
.trade-day-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.trade-day-panel-title{font-size:.88rem;font-weight:900;color:var(--text)}
.trade-day-list{display:grid;gap:8px;max-height:360px;overflow:auto;padding-right:4px}
html.dark .trade-calendar-shell,body.trader-dashboard .trade-calendar-shell{--tc-bg:rgba(10,14,22,.58);--tc-cell:rgba(15,23,42,.50);--tc-muted:rgba(203,213,225,.62);--tc-border:rgba(148,163,184,.18);--tc-profit:rgba(22,163,74,.18);--tc-loss:rgba(220,38,38,.16);--tc-selected:rgba(56,189,248,.18)}
@media(max-width:760px){.trade-calendar-grid{border-radius:14px}.trade-calendar-day{min-height:76px;padding:6px}.trade-calendar-day-pnl{margin-top:14px;font-size:.78rem}.trade-calendar-day-count{font-size:.58rem}.trade-calendar-weekday{font-size:.56rem}.trade-day-list{max-height:none}}
body.trader-dashboard .session-trigger{
  background:rgba(var(--tn-rgb),.12)!important;
  color:var(--tn-accent)!important;
  border-color:rgba(var(--tn-rgb),.22)!important;
}
@media(max-width:980px){body.trader-dashboard .app-shell{padding:14px}body.trader-dashboard .main-grid{grid-template-columns:1fr}body.trader-dashboard .trader-settings-panel{position:static}body.trader-dashboard .hero-stats,.metrics{grid-template-columns:1fr!important}}
@media(max-width:1120px){
  body.trader-dashboard .app-shell{
    grid-template-columns:1fr;
    grid-template-areas:"top" "side" "main";
    padding:14px;
  }
  body.trader-dashboard .hero .row.between.wrap{
    grid-template-columns:1fr;
  }
  body.trader-dashboard .trader-settings-panel{
    position:static;
    height:auto;
    min-height:0;
  }
  body.trader-dashboard .trader-settings-panel>.section-card{
    height:auto;
  }
  body.trader-dashboard .account-list{
    max-height:none;
  }
  body.trader-dashboard .trader-main-panel{
    grid-template-columns:1fr;
  }
  body.trader-dashboard .trader-columns{
    grid-template-columns:1fr;
  }
  body.trader-dashboard #openPositionsTable,
  body.trader-dashboard #closedPositionsTable{
    max-height:none;
  }
  body.trader-dashboard .trader-column-settings{
    position:static;
  }
}
