/* Chakravyuh: emerald-black and gold, from the brand icon. Dark by design (a trading console). */
:root {
  color-scheme: dark;
  --bg: #040a08;
  --bg-2: #081310;
  --surface: rgba(14, 30, 24, .66);
  --surface-2: rgba(22, 44, 36, .62);
  --surface-solid: #0c1a15;
  --border: rgba(226, 184, 92, .14);
  --border-strong: rgba(226, 184, 92, .42);
  --text: #f4efe2;
  --text-2: #bdb6a4;
  --muted: #7f7a6d;
  --gold: #e2b85c;
  --gold-hi: #f7dc92;
  --gold-lo: #a8741f;
  --gold-grad: linear-gradient(135deg, #f7dc92 0%, #e2b85c 38%, #b98428 72%, #8e5d16 100%);
  --profit: #2fd392;
  --profit-dim: rgba(47, 211, 146, .13);
  --loss: #ff5f6f;
  --loss-dim: rgba(255, 95, 111, .13);
  --warn: #f5b93d;
  --warn-dim: rgba(245, 185, 61, .13);
  --grid: rgba(255, 255, 255, .06);
  --series-1: #e2b85c;
  --neg: #ff5f6f;
  --pos-bar: #2fd392;
  --radius: 16px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--border) inset;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(47, 211, 146, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(226, 184, 92, .09), transparent 55%),
    radial-gradient(800px 800px at 50% 120%, rgba(18, 70, 52, .35), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  padding-bottom: 96px;
}
a { color: var(--gold); text-decoration: none; }
::selection { background: rgba(226, 184, 92, .35); }

/* ---------- smooth page transitions (View Transitions API, graceful fallback) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@keyframes rise { from { transform: translateY(14px) scale(.985); } to { transform: none; } }  /* no opacity: content can never get stuck hidden */
@keyframes shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(226, 184, 92, .25)); } 50% { filter: drop-shadow(0 0 22px rgba(226, 184, 92, .5)); } }
@keyframes flash-up { 0% { background: var(--profit-dim); } 100% { background: transparent; } }
@keyframes flash-down { 0% { background: var(--loss-dim); } 100% { background: transparent; } }

.rise { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* ---------- layout ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px var(--border-strong), 0 6px 18px -6px rgba(226, 184, 92, .5); }
.brand-name {
  font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 19px; letter-spacing: .12em;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { display: block; font-size: 10px; letter-spacing: .32em; color: var(--muted); margin-top: -3px; }
.top-right { display: flex; align-items: center; gap: 8px; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px;
  margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0;
  backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .8), 0 0 0 1px var(--border-strong) inset; }
.card h2 {
  font-size: 11.5px; font-weight: 700; color: var(--text-2); margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: .14em; display: flex; align-items: center; gap: 8px;
}
.card h2::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--gold-grad); }
.card.glow { box-shadow: var(--shadow), 0 0 60px -30px rgba(226, 184, 92, .55); }

.hero-card { overflow: hidden; }
.hero-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(247, 220, 146, .07) 45%, transparent 60%);
  background-size: 250% 100%; animation: shine 7s linear infinite;
}
.hero { font-size: clamp(38px, 9vw, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.hero small { font-size: .45em; font-weight: 600; color: var(--text-2); margin-right: 4px; }
.sub { color: var(--text-2); font-size: 13px; }
.muted { color: var(--muted); }

.pos { color: var(--profit); }
.neg { color: var(--loss); }
.flat { color: var(--text-2); }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  position: relative; overflow: hidden; background: var(--surface); border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow); min-width: 0; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .9), 0 0 0 1px var(--border-strong) inset; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border-strong); }
.tile.up::before { background: var(--profit); box-shadow: 0 0 16px var(--profit); }
.tile.down::before { background: var(--loss); box-shadow: 0 0 16px var(--loss); }
.tile .label { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .1em; }
.tile .value { font-size: 22px; font-weight: 750; letter-spacing: -.01em; margin-top: 2px; white-space: nowrap; }
.tile .sub { font-size: 12px; margin-top: 2px; }

/* ---------- buttons & chips ---------- */
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font: 600 14px/1 "Inter", sans-serif; letter-spacing: .01em;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(226, 184, 92, .6); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary {
  background: var(--gold-grad); color: #1b1305; border-color: transparent;
  background-size: 160% 160%; box-shadow: 0 8px 24px -10px rgba(226, 184, 92, .8);
}
.btn.primary:hover { background-position: 100% 0; }
.btn.danger { background: var(--loss-dim); color: var(--loss); border-color: rgba(255, 95, 111, .4); }
.btn.block { display: flex; width: 100%; }
.filters { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding: 2px 0 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface); color: var(--text-2); box-shadow: 0 0 0 1px var(--border) inset;
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--text); box-shadow: 0 0 0 1px var(--border-strong) inset; }
.chip.on { background: var(--gold-grad); color: #1b1305; box-shadow: 0 6px 18px -8px rgba(226, 184, 92, .9); }

/* ---------- badges & status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2);
  box-shadow: 0 0 0 1px var(--border) inset; text-transform: uppercase;
}
.badge.live { background: var(--loss-dim); color: var(--loss); box-shadow: 0 0 0 1px rgba(255, 95, 111, .45) inset; }
.badge.paper { background: rgba(226, 184, 92, .12); color: var(--gold); box-shadow: 0 0 0 1px var(--border-strong) inset; }
.badge.ok { background: var(--profit-dim); color: var(--profit); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.ok { background: var(--profit); color: rgba(47, 211, 146, .6); animation: pulse 1.8s infinite; }
.dot.bad { background: var(--loss); color: rgba(255, 95, 111, .6); animation: pulse 1.8s infinite; }
.dot.idle { background: var(--muted); }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; overflow-wrap: anywhere; }
.alert.warn { background: var(--warn-dim); color: var(--warn); box-shadow: 0 0 0 1px rgba(245, 185, 61, .3) inset; }
.alert.bad { background: var(--loss-dim); color: var(--loss); box-shadow: 0 0 0 1px rgba(255, 95, 111, .3) inset; }
.alert.good { background: var(--profit-dim); color: var(--profit); box-shadow: 0 0 0 1px rgba(47, 211, 146, .3) inset; }

/* ---------- position card ---------- */
.position {
  margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border) inset; border-left: 3px solid var(--gold);
}
.position.up { border-left-color: var(--profit); }
.position.down { border-left-color: var(--loss); }
.position .big { font-size: 22px; font-weight: 800; }

/* ---------- forms ---------- */
select, input[type=text], input[type=number], input[type=date], input[type=password], input[type=file] {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 0; font: 15px "Inter", sans-serif;
  background: rgba(0, 0, 0, .35); color: var(--text); box-shadow: 0 0 0 1px var(--border) inset;
  transition: box-shadow .2s;
}
select:focus, input:focus { outline: none; box-shadow: 0 0 0 1px var(--gold) inset, 0 0 0 4px rgba(226, 184, 92, .15); }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 18px; height: 18px; }
label.field { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-2); }
label.field span { display: block; margin-bottom: 5px; }
label.field.row span { display: inline; margin: 0; }
details summary { cursor: pointer; color: var(--gold); font-size: 13px; }

/* ---------- charts & tables ---------- */
.chart-box { position: relative; height: 230px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(226, 184, 92, .05); }
td.num, th.num { text-align: right; }
tr.win td:first-child { box-shadow: 3px 0 0 var(--profit) inset; }
tr.loss td:first-child { box-shadow: 3px 0 0 var(--loss) inset; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 12.5px; }
.pill.pos { background: var(--profit-dim); }
.pill.neg { background: var(--loss-dim); }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--text-2); }
.kv div:nth-child(even) { text-align: right; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }

.events { padding: 0; margin: 0; }
.events li { list-style: none; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.events .t { color: var(--muted); margin-right: 8px; font-size: 12px; }
.events .error { color: var(--loss); } .events .warn { color: var(--warn); }

.grid2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 > *, .tiles > *, main { min-width: 0; }

/* ---------- bottom nav: floating glass pill ---------- */
nav.bottom {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 24px)); display: flex; justify-content: space-around; gap: 4px; padding: 6px;
  border-radius: 20px; z-index: 30; background: rgba(8, 19, 16, .78);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .9), 0 0 0 1px var(--border-strong) inset;
  view-transition-name: bottom-nav;
}
nav.bottom a {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted);
  padding: 7px 0 6px; border-radius: 14px; transition: all .3s var(--ease);
}
nav.bottom a:hover { color: var(--text); }
nav.bottom a.on { color: #1b1305; background: var(--gold-grad); box-shadow: 0 6px 18px -6px rgba(226, 184, 92, .9); }
nav.bottom svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; }

/* ---------- login ---------- */
.login-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; }
.login-card { width: min(400px, 100%); text-align: center; padding: 26px 22px; }
.login-card .avatar {
  width: 190px; height: 190px; border-radius: 50%; margin: -4px auto 14px; display: block; object-fit: cover;
  box-shadow: 0 0 0 2px var(--gold), 0 0 50px -6px rgba(226, 184, 92, .6); animation: glow 4s ease-in-out infinite;
}
.login-card p { margin: 0 0 18px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -30px); opacity: 0; z-index: 50;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--surface-solid); box-shadow: 0 14px 40px -12px #000, 0 0 0 1px var(--border-strong) inset;
  transition: all .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.good { color: var(--profit); } .toast.bad { color: var(--loss); }

.flash-up { animation: flash-up 1.4s var(--ease); }
.flash-down { animation: flash-down 1.4s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}

/* ================= app shell: sidebar (desktop) + topbar ================= */
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; background: linear-gradient(180deg, rgba(4, 10, 8, .94), rgba(4, 10, 8, .72));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  view-transition-name: topbar;
}
.topbar .brand img { width: 32px; height: 32px; }
.topbar .brand-name { font-size: 16px; }
.page-title { margin: 0; font: 700 20px/1.2 "Inter", sans-serif; letter-spacing: -.01em; }
.top-right { display: flex; align-items: center; gap: 8px; }
.desktop-only { display: none !important; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.danger-solid { background: linear-gradient(135deg, #ff7a86, #e23a4d); color: #fff; border-color: transparent;
  box-shadow: 0 8px 24px -10px rgba(255, 95, 111, .9); }
.chip-status { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  padding: 6px 10px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--border) inset; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .4); box-shadow: 0 0 0 1px var(--border) inset; }
.seg form { display: contents; }
.seg button { border: 0; background: transparent; color: var(--text-2); font: 700 12.5px "Inter", sans-serif; letter-spacing: .04em;
  padding: 7px 12px; border-radius: 9px; cursor: pointer; transition: all .25s var(--ease); }
.seg button:hover:not([disabled]) { color: var(--text); }
.seg button.on { background: var(--gold-grad); color: #1b1305; cursor: default; }
.seg button.live.on { background: linear-gradient(135deg, #ff7a86, #e23a4d); color: #fff; box-shadow: 0 0 18px -4px rgba(255, 95, 111, .8); }
.seg a { padding: 7px 12px; border-radius: 9px; font: 700 12.5px "Inter", sans-serif; color: var(--text-2); transition: all .25s var(--ease); }
.seg a.on { background: var(--gold-grad); color: #1b1305; }

.live-banner { margin: 8px 0 12px; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 13px; letter-spacing: .04em;
  color: #fff; background: linear-gradient(90deg, rgba(226, 58, 77, .85), rgba(226, 58, 77, .35)); }
body.mode-live .topbar { border-bottom-color: rgba(255, 95, 111, .5); }

@media (min-width: 1024px) {
  body.authed { padding-left: 240px; padding-bottom: 24px; }
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 30; padding: 18px 14px;
    background: linear-gradient(180deg, rgba(8, 19, 16, .96), rgba(4, 10, 8, .96)); border-right: 1px solid var(--border); }
  .sidebar .brand { margin: 2px 6px 26px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2);
    font-weight: 600; font-size: 14px; transition: all .25s var(--ease); }
  .side-nav a svg { width: 20px; height: 20px; }
  .side-nav a:hover { color: var(--text); background: rgba(226, 184, 92, .06); }
  .side-nav a.on { color: var(--gold-hi); background: linear-gradient(90deg, rgba(226, 184, 92, .16), rgba(226, 184, 92, .02));
    box-shadow: 3px 0 0 var(--gold) inset; }
  .side-foot { margin-top: auto; display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--surface);
    box-shadow: 0 0 0 1px var(--border) inset; }
  .mobile-only { display: none !important; }
  .desktop-only { display: inline-flex !important; }
  h1.desktop-only { display: block !important; }
  nav.bottom { display: none; }
  main.shell { max-width: 1240px; padding: 16px 28px; }
  .topbar { padding: 14px 28px; }
}

/* ================= dashboard grid ================= */
.dash { display: grid; gap: 14px; }
@media (min-width: 1100px) { .dash { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; } }
.dash > * { min-width: 0; }
.section-title { font: 700 12px "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin: 22px 2px 10px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }

/* filter bar: one row, sticky under the topbar */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px;
  padding: 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.filterbar select { width: auto; min-width: 150px; padding: 8px 32px 8px 12px; font-size: 13px; font-weight: 600; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }

/* empty states */
.empty { display: grid; place-items: center; text-align: center; gap: 6px; padding: 34px 16px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--gold); opacity: .55; }
.empty b { color: var(--text-2); }
.chart-box.tall { height: 300px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px); height: 2px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--grid); border-radius: 12px; overflow: hidden; }
.kpis > div { background: var(--surface-solid); padding: 10px 12px; }
.kpis .label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpis .value { font-weight: 750; font-size: 16px; margin-top: 2px; }

/* ================= modal ================= */
dialog.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(520px, calc(100% - 24px)); width: 100%; }
dialog.modal::backdrop { background: rgba(2, 6, 5, .72); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: modal-in .35s var(--ease); }
@keyframes modal-in { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.modal-body { background: var(--surface-solid); border-radius: 20px; padding: 20px;
  box-shadow: 0 30px 80px -20px #000, 0 0 0 1px rgba(255, 95, 111, .45) inset; }
.modal-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.modal-head h3 { margin: 0 0 4px; font-size: 18px; }
.live-icon { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--loss);
  background: var(--loss-dim); font-size: 18px; animation: pulse 1.8s infinite; }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13.5px; padding: 9px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, .3); }
.checklist .ic { font-weight: 800; }
.checklist .ok .ic { color: var(--profit); } .checklist .no .ic { color: var(--loss); } .checklist .info .ic { color: var(--warn); }
.checklist small { display: block; color: var(--muted); }
.modal-actions { margin-top: 6px; }

/* ================= strategy editor ================= */
.param-group { border-top: 1px solid var(--grid); padding-top: 14px; margin-top: 14px; }
.param-group:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.param-grid { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.param-grid .hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--text-2); padding: 8px 0; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: rgba(0, 0, 0, .45); box-shadow: 0 0 0 1px var(--border) inset;
  position: relative; transition: background .25s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-2); transition: transform .25s var(--ease), background .25s; }
.switch input:checked + .track { background: var(--gold-grad); }
.switch input:checked + .track::after { transform: translateX(18px); background: #1b1305; }
.sticky-save { position: sticky; bottom: 90px; z-index: 5; }
@media (min-width: 1024px) { .sticky-save { bottom: 16px; } }

.sidebar .brand-name { font-size: 17px; letter-spacing: .1em; }
.sidebar .brand-sub { letter-spacing: .22em; font-size: 9px; white-space: nowrap; }
.mobile-only.row { display: flex; }
@media (min-width: 1024px) { .mobile-only.row { display: none !important; } }

.slots { display: grid; gap: 10px; margin-top: 12px; }
.slots .position { margin-top: 0; }

.side-signout { display: none; }
@media (min-width: 1024px) {
  .side-signout { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px;
    color: var(--muted); font-weight: 600; font-size: 13.5px; transition: all .25s var(--ease); }
  .side-signout svg { width: 18px; height: 18px; }
  .side-signout:hover { color: var(--loss); background: var(--loss-dim); }
}
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text-2);
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--border) inset; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.mobile-only { display: inline-grid; }
@media (min-width: 1024px) { .icon-btn.mobile-only { display: none !important; } }

/* table tools */
.table-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
.table-tools input[type=search] { flex: 1 1 180px; width: auto; padding: 8px 12px; font-size: 13px; }
.table-tools select { width: auto; padding: 8px 10px; font-size: 13px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--gold); }
th.sortable::after { content: " ↕"; opacity: .35; font-size: 10px; }
th[data-dir="asc"]::after { content: " ▲"; opacity: 1; color: var(--gold); }
th[data-dir="desc"]::after { content: " ▼"; opacity: 1; color: var(--gold); }

.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: inline-block; padding: 7px 12px; border-radius: 9px; font: 700 12.5px "Inter", sans-serif; color: var(--text-2); }
.seg-opt input:checked + span { background: linear-gradient(135deg, #ff7a86, #e23a4d); color: #fff; }
.seg-opt input:disabled + span { opacity: .45; }
