:root {
    --bg: #050505;
    --panel: #0b0c0e;
    --panel-2: #101114;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --ink: #ffffff;
    --ink-2: rgba(255, 255, 255, 0.72);
    --ink-3: rgba(255, 255, 255, 0.45);
    --ink-4: rgba(255, 255, 255, 0.28);
    --blue: #60a5fa;
    --blue-soft: rgba(96, 165, 250, 0.14);
    --series-1: #3b82f6;
    --series-2: #d97706;
    --series-3: #8b5cf6;
    --good: #4ade80;
    --bad: #f87171;
    --warn: #fbbf24;
    --radius: 16px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { background-image: radial-gradient(ellipse 60% 40% at 60% -10%, rgba(96, 165, 250, 0.08), transparent 70%); background-attachment: fixed; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(96, 165, 250, 0.35); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.2em; font-size: 10px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(11, 12, 14, 0.7); backdrop-filter: blur(10px); padding: 20px 14px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; text-decoration: none; }
.brand svg { width: 30px; height: 26px; flex-shrink: 0; }
.brand b { display: block; font-size: 12px; letter-spacing: 0.32em; font-weight: 600; }
.brand span { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; color: var(--ink-3); margin-top: 3px; text-transform: uppercase; }
.nav-label { padding: 14px 10px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; border: 1px solid transparent; transition: background 0.15s, color 0.15s; }
.nav a:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, 0.06); border-color: var(--line); color: #fff; box-shadow: 0 10px 40px rgba(96, 165, 250, 0.1); }
.nav a { position: relative; }
.nav-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--ink-3); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.nav a:hover .nav-ico { color: #fff; }
.nav a.on .nav-ico { color: var(--blue); background: var(--blue-soft); border-color: rgba(96, 165, 250, 0.35); box-shadow: 0 0 18px rgba(96, 165, 250, 0.25); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.nav-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-ext { color: var(--ink-4); font-size: 12px; }
.nav a { padding: 6px 8px; }
.side-scrim { display: none; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #1f2937, #0f172a); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 600; font-size: 13px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { min-width: 0; flex: 1; }
.who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 11px; color: var(--ink-3); }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 9px; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); text-decoration: none; flex-shrink: 0; }
.icon-btn:hover { color: #fff; border-color: var(--line-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: rgba(5, 5, 5, 0.75); backdrop-filter: blur(12px); }
.crumb { color: var(--ink-3); }
.crumb b { color: var(--blue); font-weight: 400; }
.topbar-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.clocks { display: flex; align-items: center; gap: 8px; }
.clk { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.clk .mono { font-size: 9px; }
.clk b { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.menu-btn { display: none; }
.top-logo { display: none; }
.content { padding: 28px 32px 64px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.page-head p { margin: 6px 0 0; color: var(--ink-3); max-width: 620px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; position: relative; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.stat .mono { display: block; margin-bottom: 8px; }
.stat .big { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.stat .sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.bar.blue i { background: var(--blue); }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 14px; }
.row .s { font-size: 12px; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.bullish { color: var(--good); border-color: rgba(74, 222, 128, 0.35); }
.chip.bearish { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); }
.chip.high { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); }
.chip.medium { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); }
.chip.blue { color: var(--blue); border-color: rgba(96, 165, 250, 0.4); }
.empty { color: var(--ink-3); font-size: 13px; padding: 18px 0 6px; }
.empty b { color: var(--ink-2); font-weight: 500; }
.prose { white-space: pre-wrap; color: var(--ink-2); line-height: 1.65; font-size: 14px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: #fff; cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn.primary { background: #fff; color: #000; border-color: #fff; }
.btn.primary:hover { background: rgba(255, 255, 255, 0.86); }
.btn.small { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-3); }
.btn.ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.btn.danger:hover { color: var(--bad); border-color: rgba(248, 113, 113, 0.4); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.form { display: grid; gap: 12px; }
.form .cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); }
.input, select.input, textarea.input { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: #fff; outline: none; width: 100%; font-size: 14px; }
textarea.input { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: rgba(96, 165, 250, 0.6); background: rgba(255, 255, 255, 0.05); }
select.input option { background: #111; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--ink-3); padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600; }
.seg button.on { background: rgba(255, 255, 255, 0.1); color: #fff; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.msg { font-size: 13px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--good); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: rgba(255, 255, 255, 0.025); }
table.t tr.sel td { background: rgba(96, 165, 250, 0.06); }
td.note { white-space: normal; color: var(--ink-3); min-width: 180px; max-width: 360px; }

/* ---------- Charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.chart .zero-line { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.chart .axis-text { fill: rgba(255, 255, 255, 0.4); font-size: 10px; font-family: var(--mono); }
.chart .hover-line { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: #16181c; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); z-index: 5; transform: translate(-50%, -100%); margin-top: -10px; }
.tip .k { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }

/* COT index meter */
.meter { position: relative; height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgba(248, 113, 113, 0.35), rgba(255, 255, 255, 0.08) 50%, rgba(74, 222, 128, 0.35)); min-width: 70px; }
.meter i { position: absolute; top: -3px; width: 2px; height: 12px; background: #fff; border-radius: 2px; transform: translateX(-1px); }

/* Courses */
.phase { display: grid; grid-template-columns: 64px 1fr; gap: 18px; }
.phase-num { font-family: var(--mono); font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; height: 44px; display: grid; place-items: center; }
.phase.on .phase-num { color: var(--blue); border-color: rgba(96, 165, 250, 0.45); box-shadow: 0 0 30px rgba(96, 165, 250, 0.15); }
.lesson { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.check { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--line-2); background: none; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; color: transparent; }
.check.on { background: var(--blue); border-color: var(--blue); color: #000; }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal-box { width: min(960px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; }
.modal-box .video { aspect-ratio: 16 / 9; background: #000; }
.modal-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: 0 50px 160px rgba(0, 0, 0, 0.8), 0 0 120px rgba(96, 165, 250, 0.08); }
.login-card h1 { font-size: 26px; margin: 22px 0 8px; letter-spacing: -0.02em; }
.login-card p { color: var(--ink-3); margin: 0 0 24px; }
.login-card .btn { width: 100%; height: 48px; border-radius: 16px; font-size: 14px; }
.notice { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 16px; background: rgba(255, 255, 255, 0.02); }
.notice.err { border-color: rgba(248, 113, 113, 0.35); }
.splash { min-height: 60vh; display: grid; place-items: center; }

/* ---------- Icons ---------- */
.ico { display: block; flex-shrink: 0; }
a.card { text-decoration: none; color: inherit; transition: border-color 0.15s; }
a.card:hover { border-color: var(--line-2); }
.card-head a.mono { text-decoration: none; }
.card-head a.mono:hover { color: #fff; }

/* ---------- KPI tiles ---------- */
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 16px; overflow: hidden; }
.kpi > div:first-child { min-width: 0; }
.kpi .mono { display: block; margin-bottom: 8px; white-space: nowrap; }
.kpi .big { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.spark { flex-shrink: 1; min-width: 40px; max-width: 96px; height: auto; opacity: 0.9; align-self: flex-end; }
.gauge { flex-shrink: 0; }
.dots { display: grid; grid-template-columns: repeat(5, 7px); gap: 4px; flex-shrink: 0; }
.dots i { width: 7px; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.dots i.on { background: #fff; }
.rr { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; width: 76px; }
.rr span { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.rr div { width: 100%; height: 5px; border-radius: 5px; background: rgba(248, 113, 113, 0.55); overflow: hidden; }
.rr i { display: block; height: 100%; background: var(--good); }
.ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--panel); }
.ring span { position: relative; font-family: var(--mono); font-size: 11px; }

/* ---------- Dashboard layout ---------- */
.g-dash { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 14px; min-width: 0; }
.today .mono { display: block; margin-bottom: 6px; }
.today-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.today-row:first-of-type { border-top: 0; }
.today-row > .ico { margin-top: 2px; color: var(--blue); width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--blue-soft); box-sizing: border-box; }
.today-row .grow { flex: 1; min-width: 0; }
.today-row .t { font-size: 14px; font-weight: 600; }
.today-row .s { font-size: 12px; color: var(--ink-3); }
.today-row .s a { color: var(--blue); text-decoration: none; }
a.today-row:hover .t, a.row:hover .t { color: var(--blue); }
a.row { text-decoration: none; color: inherit; }
.cd { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sym { width: 52px; font-family: var(--mono); font-size: 12px; flex-shrink: 0; }
.row.col { flex-direction: column; align-items: flex-start; gap: 6px; }
.prose.clamp { max-height: 170px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }

/* P&L calendar */
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav b { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; font-weight: 500; min-width: 84px; text-align: center; }
.month-nav .icon-btn { width: 28px; height: 28px; }
.pc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.15fr); gap: 5px; }
.pc-h { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding: 2px 0 4px; }
.pc-day { aspect-ratio: 1 / 0.82; min-height: 52px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.015); padding: 6px 7px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left; cursor: default; color: inherit; overflow: hidden; }
.pc-day .n { font-size: 11px; color: var(--ink-3); }
.pc-day .v { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-day .t { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.pc-day.out { opacity: 0.3; }
.pc-day.today { border-color: rgba(96, 165, 250, 0.7); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35); }
.pc-day.today .n { color: var(--blue); font-weight: 600; }
.pc-day.has { cursor: pointer; }
.pc-day.has:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pc-week { border: 1px dashed var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; min-height: 52px; }
.pc-week b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-week span { font-size: 10px; color: var(--ink-3); }
.pc-week.pos b { color: var(--good); }
.pc-week.neg b { color: var(--bad); }
.pc-foot { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.pc-foot div { display: flex; flex-direction: column; gap: 2px; }
.pc-foot span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.pc-foot b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Weekday bars */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 190px; padding-top: 6px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; min-width: 0; }
.bar-track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; border-radius: 7px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.bar-track i { display: block; width: 100%; border-radius: 7px; background: linear-gradient(180deg, #4ade80, rgba(74, 222, 128, 0.35)); }
.bar-track i.neg { background: linear-gradient(180deg, #f87171, rgba(248, 113, 113, 0.35)); }
.bar-v { font-size: 10px; font-variant-numeric: tabular-nums; min-height: 14px; white-space: nowrap; }
.bar-l { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.day-filter { cursor: pointer; background: var(--blue-soft); }

/* ---------- Impact colours (strong) ---------- */
.imp { display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; white-space: nowrap; border: 1px solid transparent; min-width: 58px; }
.imp-high { background: #ef4444; color: #fff; box-shadow: 0 0 14px rgba(239, 68, 68, 0.35); }
.imp-medium { background: #f97316; color: #fff; box-shadow: 0 0 12px rgba(249, 115, 22, 0.3); }
.imp-low { background: #0ea5e9; color: #fff; box-shadow: 0 0 10px rgba(14, 165, 233, 0.25); }
.imp-holiday { background: rgba(255, 255, 255, 0.08); color: var(--ink-2); border-color: var(--line-2); }
.row .imp { min-width: 44px; }

/* ---------- Economic calendar ---------- */
.live-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--good); border: 1px solid rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.06); padding: 6px 11px; border-radius: 999px; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: pulse 1.8s infinite; }
.live-badge.off { color: var(--ink-3); border-color: var(--line-2); background: none; }
.live-badge.off i { background: var(--ink-4); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.cal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-label { display: flex; flex-direction: column; align-items: center; min-width: 190px; line-height: 1.25; }
.week-label b { font-size: 14px; font-weight: 600; }
.week-label span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue); }
.imp-seg button { display: inline-flex; align-items: center; gap: 7px; }
.dot-imp { width: 9px; height: 9px; border-radius: 3px; padding: 0; min-width: 0; box-shadow: none; }
.imp-seg button:not(.on) .dot-imp { opacity: 0.35; }
.next-up { width: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-align: left; cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; color: inherit; font-size: 14px; }
.next-up:hover { border-color: var(--line-2); }
.imp-border-high { border-left-color: #ef4444; background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), var(--panel) 45%); }
.imp-border-medium { border-left-color: #f97316; background: linear-gradient(90deg, rgba(249, 115, 22, 0.1), var(--panel) 45%); }
.imp-border-low { border-left-color: #0ea5e9; }
.ccy { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.nt { font-weight: 600; flex: 1; min-width: 160px; }
.cd-big { font-family: var(--mono); font-size: 15px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.next-up .cd-big { margin-left: auto; }
.card.day-card { padding: 0; overflow: hidden; margin-bottom: 14px; }
.day-card.is-today { border-color: rgba(96, 165, 250, 0.4); box-shadow: 0 0 40px rgba(96, 165, 250, 0.06); }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.day-head h2 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; }
.day-head h2 span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.ev-head, .ev-row { display: grid; grid-template-columns: 62px 48px 78px minmax(0, 1fr) 84px 84px 84px 20px; align-items: center; gap: 10px; padding: 0 18px 0 14px; }
.ev-head { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.ev-head span:nth-child(n + 5):not(:last-child) { text-align: right; }
.ev-row { width: 100%; min-height: 50px; padding-top: 9px; padding-bottom: 9px; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; background: none; color: inherit; text-align: left; cursor: pointer; font-size: 13px; transition: background 0.12s; }
.ev-row:last-child { border-bottom: 0; }
.ev-row:hover { background: rgba(255, 255, 255, 0.035); }
.ev-row:hover .ev-go { color: #fff; transform: translateX(2px); }
.imp-row-high { border-left-color: #ef4444; background: linear-gradient(90deg, rgba(239, 68, 68, 0.14), transparent 45%); }
.imp-row-medium { border-left-color: #f97316; background: linear-gradient(90deg, rgba(249, 115, 22, 0.1), transparent 40%); }
.imp-row-low { border-left-color: #0ea5e9; background: linear-gradient(90deg, rgba(14, 165, 233, 0.07), transparent 35%); }
.imp-row-holiday { border-left-color: rgba(255, 255, 255, 0.2); }
/* Released events: text is dimmed a little, impact colours stay at full strength. */
.ev-row.past .ev-time, .ev-row.past .ev-title, .ev-row.past .ev-ccy { color: var(--ink-3); }
.ev-row.past:hover .ev-title { color: #fff; }
.ev-time { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.ev-ccy { font-family: var(--mono); font-size: 12px; font-weight: 700; }
.ev-title { font-weight: 500; min-width: 0; }
.ev-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ev-num small { display: none; }
.ev-num b { font-weight: 700; color: #fff; }
.ev-num b.pos { color: var(--good); }
.ev-num b.neg { color: var(--bad); }
.ev-go { color: var(--ink-4); transition: transform 0.12s, color 0.12s; display: grid; place-items: center; }
.now-line { position: relative; height: 0; border-top: 2px solid var(--blue); margin: 0; box-shadow: 0 0 10px rgba(96, 165, 250, 0.6); }
.now-line span { position: absolute; left: 14px; top: -10px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; background: var(--blue); color: #000; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.foot-note { font-size: 12px; margin-top: 4px; }

/* Event drawer */
body.no-scroll { overflow: hidden; }
.drawer-wrap { position: fixed; inset: 0; z-index: 120; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); animation: fade 0.18s ease; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(500px, 100%); background: #0c0d10; border-left: 1px solid var(--line-2); padding: 22px 24px 32px; overflow-y: auto; box-shadow: -30px 0 80px rgba(0, 0, 0, 0.6); animation: slide 0.22s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.d-tags { display: flex; align-items: center; gap: 10px; }
.drawer h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.d-when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-2); margin: 14px 0 16px; }
.d-when .ico { color: var(--ink-3); }
.d-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.d-nums div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255, 255, 255, 0.02); }
.d-nums small { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.d-nums b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.verdict { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px; border: 1px solid var(--line-2); }
.verdict.pos { color: var(--good); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.07); }
.verdict.neg { color: var(--bad); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.07); }
.d-sec { border-top: 1px solid var(--line); padding: 14px 0 2px; }
.d-sec h3 { margin: 0 0 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.d-sec p { margin: 0; color: var(--ink-2); line-height: 1.65; }
.effect { display: flex; gap: 14px; align-items: flex-start; }
.eff-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, 0.05); color: var(--ink-2); border: 1px solid var(--line-2); margin-top: 2px; }
.eff-ico.pos { background: rgba(74, 222, 128, 0.08); color: var(--good); border-color: rgba(74, 222, 128, 0.35); }

/* ---------- Markets board ---------- */
.mk-upd { display: inline-flex; align-items: center; gap: 7px; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--good); display: inline-block; animation: pulse 1.8s infinite; }
.mk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mk { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px 10px; background: rgba(255, 255, 255, 0.015); min-width: 0; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; transition: border-color 0.15s; }
.mk:hover { border-color: var(--line-2); }
.mk.skel { min-height: 138px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.mk-top { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.mk-top b { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.mk-top span { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-px { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; border-radius: 5px; padding: 0 3px; margin-left: -3px; align-self: flex-start; }
.mk-chg { font-size: 12px; font-weight: 600; }
.mk-chg span { margin-left: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; }
.mk.up .mk-chg { color: var(--good); }
.mk.up .mk-chg span { background: rgba(74, 222, 128, 0.12); }
.mk.down .mk-chg { color: var(--bad); }
.mk.down .mk-chg span { background: rgba(248, 113, 113, 0.12); }
.mk-spark { width: 100%; height: 34px; display: block; margin: 6px 0 4px; }
.mk-range { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; font-size: 9px; color: var(--ink-3); }
.mk-range div { height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(248, 113, 113, 0.45), rgba(74, 222, 128, 0.45)); position: relative; }
.mk-range i { position: absolute; top: -3px; width: 3px; height: 9px; border-radius: 2px; background: #fff; transform: translateX(-1px); }
.flash-up { animation: flashUp 1.2s ease; }
.flash-down { animation: flashDown 1.2s ease; }
@keyframes flashUp { 0% { background: rgba(74, 222, 128, 0.45); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: rgba(248, 113, 113, 0.45); } 100% { background: transparent; } }

/* ---------- Deals ---------- */
.deal-sec { margin-bottom: 24px; }
.deal-sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.deal-sec-head h2 { margin: 0; font-size: 16px; }
.deal-sec-head .muted { font-size: 13px; }
.deal-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.deal { display: flex; flex-direction: column; gap: 12px; transition: border-color 0.15s, transform 0.15s; }
.deal:hover { border-color: rgba(96, 165, 250, 0.35); transform: translateY(-1px); }
.deal-top { display: flex; align-items: center; gap: 12px; }
.deal-top .grow { flex: 1; min-width: 0; }
.deal-top h3 { margin: 0 0 4px; font-size: 16px; }
.deal-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 13px; background: linear-gradient(145deg, rgba(96, 165, 250, 0.25), rgba(96, 165, 250, 0.05)); border: 1px solid rgba(96, 165, 250, 0.35); color: var(--blue); flex-shrink: 0; }
.deal-offer { display: inline-block; font-size: 11px; font-weight: 700; color: #04210f; background: var(--good); padding: 2px 8px; border-radius: 6px; }
.deal-desc { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; flex: 1; }
.deal-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.deal-code { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px dashed rgba(96, 165, 250, 0.55); background: var(--blue-soft); color: #fff; cursor: pointer; }
.deal-code b { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; }
.deal-code .ico { color: var(--blue); }
.deal-code.copied { border-color: var(--good); background: rgba(74, 222, 128, 0.12); }
.deal-code.copied .mono { color: var(--good); }

/* ---------- Calendar: refresh, live row countdown, history ---------- */
.btn.ghost-b { background: none; }
.btn .ico { flex-shrink: 0; }
#refresh.spin .ico { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cd-row { display: inline-block; font-family: var(--mono); font-weight: 700; color: #fff; background: rgba(96, 165, 250, 0.18); border: 1px solid rgba(96, 165, 250, 0.5); padding: 1px 6px; border-radius: 6px; font-size: 11px; }
.ev-row.soon { background-color: rgba(96, 165, 250, 0.05); }
.ev-row.imminent .cd-row { background: #ef4444; border-color: #ef4444; animation: blink 1s steps(2, start) infinite; }
.ev-row.imminent { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.45); }
.ev-row.dropping .cd-row { background: var(--good); border-color: var(--good); color: #04210f; }
@keyframes blink { 50% { opacity: 0.55; } }
.d-actions { display: flex; gap: 8px; margin: -4px 0 14px; flex-wrap: wrap; }
.d-hist { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: rgba(255, 255, 255, 0.02); }
.h-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.h-bars i { flex: 1; max-width: 26px; background: rgba(255, 255, 255, 0.35); border-radius: 3px 3px 0 0; }
.h-bars i.pos { background: var(--good); }
.h-bars i.neg { background: var(--bad); }
.h-bars i.none { height: 2px; background: var(--line-2); }
.h-table { font-size: 12px; }
.h-table th, .h-table td { padding: 7px 6px; }
.h-table sup { color: var(--ink-3); margin-left: 2px; }
.d-links { display: flex; flex-direction: column; gap: 6px; }
.d-links a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 13px; }
.d-links a span { flex: 1; }
.d-links a:hover { border-color: var(--line-2); color: #fff; }

.btn.this-week.on { border-color: rgba(96, 165, 250, 0.55); color: var(--blue); background: var(--blue-soft); opacity: 1; cursor: default; }

/* Forecast vs previous */
.fc { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.fc i { font-style: normal; font-size: 9px; }
.fc-pos { color: var(--good); }
.fc-neg { color: var(--bad); }
.fc-flat { color: var(--ink-2); }
.fc-flat i { color: var(--ink-3); }

/* Related news cards */
.news-list { display: flex; flex-direction: column; gap: 8px; }
.news { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: rgba(255, 255, 255, 0.02); transition: border-color 0.15s, background 0.15s; }
.news:hover { border-color: rgba(96, 165, 250, 0.45); background: rgba(96, 165, 250, 0.05); }
.news-img { position: relative; width: 112px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: linear-gradient(145deg, #16233a, #0e1117); display: grid; place-items: center; color: var(--ink-4); }
.news-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.news-body b { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-body span { font-size: 11px; color: var(--ink-3); }
.d-more { margin-top: 10px; font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.d-more a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.d-more a:hover { color: #fff; }

/* Coaching – Calendly embed */
.coach-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.coach-cal { padding-bottom: 8px; }
.cal-embed { position: relative; border-radius: 12px; overflow: hidden; background: #0b0c0e; }
.cal-embed iframe { display: block; width: 100%; height: 720px; border: 0; }

/* Responsive */
@media (max-width: 1180px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g-main, .g3, .g-dash, .coach-grid { grid-template-columns: 1fr; }
    .mk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform 0.2s ease; background: #0b0c0e; }
    .side.open { transform: none; box-shadow: 0 0 80px rgba(0, 0, 0, 0.8); }
    .menu-btn { display: grid; }
    .topbar { padding: 12px 16px; }
    .content { padding: 20px 16px 48px; }
    .g2 { grid-template-columns: 1fr; }
    .clocks .clk:nth-child(2) { display: none; }
    .clk { padding: 5px 10px; }
    .side-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 15; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
    .side.open + .side-scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 760px) {
    .mk-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -14px; padding: 0 14px 4px; scrollbar-width: none; }
    .mk-grid::-webkit-scrollbar { display: none; }
    .mk { flex: 0 0 148px; scroll-snap-align: start; }
    .mk-px { font-size: 16px; }
    #refresh span { display: none; }
    .ev-head { display: none; }
    .ev-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 18px; grid-template-areas: "time ccy imp go" "title title title title" "a f p ."; row-gap: 8px; padding: 12px 14px 12px 12px; }
    .ev-time { grid-area: time; }
    .ev-ccy { grid-area: ccy; }
    .ev-row > .imp { grid-area: imp; justify-self: start; }
    .ev-title { grid-area: title; font-size: 14px; }
    .ev-row > .ev-num:nth-of-type(5) { grid-area: a; }
    .ev-row > .ev-num:nth-of-type(6) { grid-area: f; }
    .ev-row > .ev-num:nth-of-type(7) { grid-area: p; }
    .ev-go { grid-area: go; }
    .ev-num { text-align: left; }
    .ev-num small { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
    .week-label { min-width: 0; flex: 1; }
    .cal-bar { flex-direction: column; align-items: stretch; }
    .week-nav { justify-content: space-between; }
    .next-up .cd-big { margin-left: 0; }
    .pc-grid { gap: 3px; }
    .pc-day { min-height: 40px; padding: 4px; border-radius: 7px; aspect-ratio: auto; }
    .pc-day .t { display: none; }
    .pc-day .v { font-size: 10px; }
    .pc-week { min-height: 40px; border-radius: 7px; font-size: 10px; }
    .pc-week span { display: none; }
    .drawer { padding: 18px 18px 28px; }
}
@media (max-width: 520px) {
    .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .kpi .big { font-size: 20px; }
    .kpi .sub { white-space: normal; }
    .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
    .spark { align-self: stretch; max-width: none; width: 100%; height: 36px; }
    .rr { width: 100%; align-items: flex-start; }
    .crumb .pre { display: none; }
    .top-logo { display: flex; align-items: center; flex-shrink: 0; }
    .top-logo svg { width: 24px; height: 21px; }
    .clk .mono { display: none; }
    .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat .big { font-size: 18px; }
    .card { padding: 14px; }
    .table-wrap { margin: 0 -14px -14px; }
    .phase { grid-template-columns: 1fr; gap: 10px; }
    .phase-num { width: 56px; height: 36px; }
}

/* ---------- Journal ---------- */
.j-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.j-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
select.input.j-sel { width: auto; height: 34px; max-width: 180px; font-size: 13px; }
.j-tabs button { padding: 7px 14px; white-space: nowrap; }
.j-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.j-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
table.t tr.clickable { cursor: pointer; transition: background 0.12s; }
table.t tr.clickable:hover { background: rgba(255, 255, 255, 0.03); }
table.t td.go { color: var(--ink-4); width: 24px; padding-left: 0; }
table.t tr.clickable:hover td.go { color: #fff; }
.tags-cell .tag { margin-right: 4px; }
.tag { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255, 255, 255, 0.03); white-space: nowrap; }
.tag.bad { color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.07); }
.tag.emo { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.4); background: rgba(139, 92, 246, 0.08); }
.tag.more { color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.adh { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); }
.adh.full { color: var(--good); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.07); }
.adh.mid { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); }
.adh.low { color: var(--bad); border-color: rgba(248, 113, 113, 0.4); }
.stars { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; white-space: nowrap; }
.stars svg { display: block; width: 14px; height: 14px; fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.4; stroke-linejoin: round; transition: fill 0.15s, stroke 0.15s, transform 0.15s, filter 0.15s; }
.stars .on svg { fill: #fbbf24; stroke: #f59e0b; filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.45)); }
.stars.in { gap: 4px; }
.stars.in svg { width: 26px; height: 26px; }
.stars.in label { cursor: pointer; line-height: 0; }
.stars.in input { position: absolute; opacity: 0; pointer-events: none; }
.stars.in:hover label svg { fill: #fde68a; stroke: #fbbf24; filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.35)); }
.stars.in label:hover ~ label svg { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.22); filter: none; }
.stars.in label:hover svg { transform: scale(1.18); }
.stars.in label:active svg { transform: scale(0.92); }
.stars.in input:focus-visible + span svg { stroke: var(--blue); }
.stars-clear { background: none; border: 0; color: var(--ink-4); cursor: pointer; margin-left: 6px; padding: 4px; display: grid; place-items: center; }
.stars-clear:hover { color: #fff; }

/* checklist impact */
.cl-sums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.cl-sum { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.cl-sum span { font-size: 12px; color: var(--ink-2); }
.cl-sum b { font-size: 18px; font-weight: 600; }
.cl-sum small { font-size: 11px; color: var(--ink-3); }
.cl-sum.ok { border-color: rgba(74, 222, 128, 0.25); }
.cl-sum.bad { border-color: rgba(248, 113, 113, 0.25); }
.cl-rules { display: grid; gap: 8px; }
.cl-rule { display: grid; grid-template-columns: minmax(0, 1fr) 70px 36px; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-2); }
.cl-rule span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-rule div { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.cl-rule div i { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.cl-rule div i.mid { background: var(--warn); }
.cl-rule div i.low { background: var(--bad); }
.cl-rule b { text-align: right; font-weight: 500; font-size: 11px; }

/* breakdown tables */
.bd { display: grid; gap: 2px; }
.bd-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px 46px 90px; column-gap: 10px; row-gap: 5px; align-items: center; padding: 7px 0 8px; font-size: 13px; border-bottom: 1px solid var(--line); }
.bd-row .bd-bar { grid-column: 1 / -1; grid-row: 2; height: 3px; }
.bd-row:last-child { border-bottom: 0; }
.bd-headrow { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding-top: 0; }
.bd-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-n, .bd-w { text-align: right; color: var(--ink-2); }
.bd-v { text-align: right; font-weight: 600; }
.bd-bar { border-radius: 3px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: var(--good); border-radius: 3px; opacity: 0.85; }
.bd-bar i.neg { background: var(--bad); }

/* recent days */
.rd { display: grid; gap: 4px; }
.rd-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; margin: 0 -10px; background: none; border: 0; border-radius: 10px; text-align: left; cursor: pointer; font-size: 13px; }
.rd-row:hover { background: rgba(255, 255, 255, 0.04); }
.rd-meta { font-size: 11px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.rd-meta em { color: var(--warn); font-style: normal; }
.rd-row b { font-weight: 600; }

/* key/value stat lists */
.kvs { display: grid; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-2); }
.kv b { font-weight: 600; text-align: right; }
.kv small { color: var(--ink-3); font-weight: 400; margin-left: 6px; font-size: 11px; }

/* daily journal */
.j-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; border-color: rgba(96, 165, 250, 0.3); background: linear-gradient(90deg, rgba(96, 165, 250, 0.07), transparent 70%), var(--panel); }
.j-cta p { margin: 2px 0 0; font-size: 13px; }
.card.jd { padding: 0; overflow: hidden; margin-bottom: 14px; scroll-margin-top: 80px; }
.jd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.jd-head b { font-size: 15px; font-weight: 600; display: block; }
.jd-sub { font-size: 12px; color: var(--ink-3); }
.jd-net { font-size: 20px; font-weight: 600; }
.jd-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.jd-trades { border-right: 1px solid var(--line); min-width: 0; }
.jd-trades .table-wrap { margin: 0; }
.jd-trades .empty { padding: 18px; }
.jd-trades table.t td { padding: 10px 14px; }
.jd-review { padding: 16px 18px; min-width: 0; }
.rv-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rv-empty p { margin: 0; font-size: 13px; }
.rv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-top .btn { margin-left: auto; }
.rv-rate { font-size: 12px; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; }
.plan { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 7px; border: 1px solid; }
.plan-yes { color: var(--good); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.07); }
.plan-partly { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.06); }
.plan-no { color: var(--bad); border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.07); }
.rv-b { margin-top: 10px; }
.rv-b h4 { margin: 0 0 3px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.rv-b p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; white-space: normal; }
.rv-form textarea.input { min-height: 64px; }
.rv-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.lbl { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.plan-seg label { cursor: pointer; }
.plan-seg input { position: absolute; opacity: 0; pointer-events: none; }
.plan-seg span { display: block; padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.plan-seg input:checked + span { background: rgba(255, 255, 255, 0.1); color: #fff; }
.plan-seg input:focus-visible + span { outline: 2px solid var(--blue); }
.center { display: flex; justify-content: center; margin: 4px 0 14px; }

/* trade drawer + form */
.drawer.wide { width: min(620px, 100%); }
.d-nums b { word-break: break-all; }
.ck { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.ck li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.ck li .ico { flex-shrink: 0; margin-top: 2px; }
.ck li.yes { color: var(--ink); }
.ck li.yes .ico { color: var(--good); }
.ck li.no { color: var(--ink-3); }
.ck li.no .ico { color: var(--bad); opacity: 0.8; }
.shot { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line-2); margin: 4px 0 10px; }
.j-form fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.j-form legend { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding: 0 6px; }
.j-form legend .muted { letter-spacing: 0.05em; }
.j-form .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc { margin: -4px 0 0; font-size: 12px; min-height: 0; }
.calc:empty { display: none; }
.picks { display: flex; flex-wrap: wrap; gap: 7px; }
.picks.col { flex-direction: column; gap: 6px; }
.pick { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255, 255, 255, 0.02); transition: all 0.12s; user-select: none; }
.pick:hover span { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.pick.rule span { display: flex; font-size: 13px; padding: 9px 12px; }
.pick.rule span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--ink-4); flex-shrink: 0; }
.pick.rule input:checked + span { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.07); color: #fff; }
.pick.rule input:checked + span::before { background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat; border-color: var(--good); }
.pick.bad input:checked + span { color: #fca5a5; border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.1); }
.pick.emo input:checked + span { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.55); background: rgba(139, 92, 246, 0.12); }
.sticky-save { position: sticky; bottom: -32px; background: linear-gradient(transparent, #0c0d10 30%); padding: 18px 0 14px; margin-bottom: -14px; }
.hint { display: block; font-size: 11px; color: var(--ink-3); margin: -2px 0 2px; }

@media (max-width: 1180px) {
    .j-g3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .j-g2, .j-g3 { grid-template-columns: 1fr; }
    .jd-body { grid-template-columns: 1fr; }
    .jd-trades { border-right: 0; border-bottom: 1px solid var(--line); }
    .j-bar { align-items: stretch; }
    .j-tabs { width: 100%; }
    .j-tabs button { flex: 1; }
    .j-form .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bd-row { grid-template-columns: minmax(0, 1fr) 40px 42px 80px; column-gap: 8px; }
    .j-filters { width: 100%; }
    select.input.j-sel { flex: 1; max-width: none; min-width: 0; }
    .j-tabs button { padding: 7px 8px; }
    .j-cta { flex-direction: column; align-items: flex-start; }
}
div.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); }
.j-ro { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border-color: rgba(96, 165, 250, 0.35); background: var(--blue-soft); font-size: 13px; color: var(--ink-2); }
.j-ro .ico { color: var(--blue); flex-shrink: 0; }
.j-ro .btn { margin-left: auto; }
select.input.j-who { width: auto; max-width: 240px; height: 38px; font-size: 13px; }
@media (max-width: 860px) { select.input.j-who { max-width: none; width: 100%; } .j-ro { flex-wrap: wrap; } }
/* trade import */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 26px 16px; cursor: pointer; text-align: center; color: var(--ink-2); background: rgba(255, 255, 255, 0.015); transition: border-color 0.15s, background 0.15s; margin-bottom: 14px; }
.drop:hover, .drop.over { border-color: rgba(96, 165, 250, 0.6); background: var(--blue-soft); }
.drop input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.drop span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.drop .ico { color: var(--blue); }
.drop small { color: var(--ink-3); font-size: 12px; }
.imp-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 12px; }
.imp-opts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 10px; }
.imp-chk { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 12px; cursor: pointer; }
.imp-warn { font-size: 12px; color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.35); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.imp-err { border: 1px solid rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.06); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.imp-err p { margin: 4px 0 0; }
.imp-table { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 12px; max-height: 340px; overflow: auto; }
.imp-table table.t td, .imp-table table.t th { padding: 8px 12px; }
.how { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.how summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.how-list { display: grid; gap: 12px; margin-top: 12px; font-size: 13px; }
.how-list p { margin: 3px 0 0; color: var(--ink-2); line-height: 1.55; }
.j-done { border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.j-done .ico { color: var(--good); }
.drawer.xwide { width: min(780px, 100%); }
.imp-opts label.f .muted { font-size: 11px; }
/* AI morning brief */
.brief { margin-bottom: 14px; border-color: rgba(96, 165, 250, 0.28); background: radial-gradient(ellipse 70% 60% at 0% 0%, rgba(96, 165, 250, 0.08), transparent 70%), var(--panel); }
.brief.is-hidden { opacity: 0.7; border-style: dashed; }
.brief-top { align-items: flex-start; flex-wrap: wrap; }
.brief-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.brief-h { font-size: 22px; line-height: 1.3; margin: 2px 0 8px; letter-spacing: -0.01em; }
.brief-ov { color: var(--ink-2); line-height: 1.7; margin: 0 0 16px; max-width: 900px; }
.brief-mk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.bm { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.bm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.bm-top b { font-family: var(--mono); letter-spacing: 0.06em; font-size: 13px; }
.bm p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.brief-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 14px; }
.brief h3 { margin: 0 0 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.brief-ev { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.brief-ev li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 13px; }
.brief-ev li > span { color: var(--blue); font-family: var(--mono); font-size: 12px; padding-top: 1px; }
.brief-ev p { margin: 2px 0 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.brief-lv { width: 100%; border-collapse: collapse; font-size: 13px; }
.brief-lv td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.brief-lv td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.brief-lv td:last-child { color: var(--ink-2); }
.brief-risk ul { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.brief-plan { border: 1px solid rgba(96, 165, 250, 0.3); background: var(--blue-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.brief-plan p { margin: 0; font-size: 13.5px; line-height: 1.6; }
.brief-foot { font-size: 11px; color: var(--ink-4); margin: 6px 0 0; }
.brief-writing { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); padding: 10px 0; }
.brief-writing .spin .ico, .brief-writing .spin { display: inline-flex; animation: spin 0.9s linear infinite; color: var(--blue); }
.brief-setup p { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 0 0 8px; }
.brief-setup code { font-family: var(--mono); font-size: 12px; background: rgba(255, 255, 255, 0.06); padding: 1px 6px; border-radius: 5px; }
.brief-form textarea.input { min-height: 60px; font-size: 13px; }
@media (max-width: 1180px) { .brief-mk { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .brief-cols { grid-template-columns: 1fr; } .brief-mk { grid-template-columns: 1fr; } .brief-h { font-size: 19px; } }
.side-ver { margin-top: auto; padding: 14px 10px 10px; font-size: 9px; color: var(--ink-4); letter-spacing: 0.18em; }
.side-ver + .side-foot { margin-top: 0; }
/* AI Market Watch (dashboard, NQ) */
.card.nqw { border-color: rgba(96, 165, 250, 0.28); background: radial-gradient(ellipse 80% 70% at 100% 0%, rgba(96, 165, 250, 0.08), transparent 70%), var(--panel); }
.nqw .empty code { font-family: var(--mono); font-size: 11px; }
.nqw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.nqw-sum { margin: 0 0 12px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.nqw-lv { display: grid; gap: 0; margin-bottom: 12px; }
.nqw-lv div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.nqw-lv b { font-weight: 600; }
.nqw-lv span { color: var(--ink-2); }
.nqw-watch { border: 1px solid rgba(96, 165, 250, 0.3); background: var(--blue-soft); border-radius: 12px; padding: 10px 12px; }
.nqw-watch .mono { display: block; margin-bottom: 4px; }
.nqw-watch p { margin: 0; font-size: 13px; line-height: 1.55; }
.nqw-foot { font-size: 10.5px; color: var(--ink-4); margin: 10px 0 0; }
.brief-nq-edit { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; }
.brief-nq-edit legend { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding: 0 6px; }
/* Dashboard layout v2: P&L graph + weekday bars | AI Market Watch, then Today / events / announcements */
.g-dash.dash-main { margin-top: 14px; align-items: stretch; }
.dash-left { display: grid; gap: 14px; grid-template-rows: auto 1fr; min-width: 0; }
.dash-bars { display: flex; flex-direction: column; }
.dash-bars .bars { flex: 1; height: auto; min-height: 150px; }
.dash-row { margin-top: 14px; align-items: stretch; }
.dash-row .card { min-width: 0; }
.pg-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pg-stats div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-stats span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.pg-stats b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-bar { fill: rgba(74, 222, 128, 0.75); }
.pg-bar.neg { fill: rgba(248, 113, 113, 0.75); }
.pg-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); align-items: center; }
.pg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pg-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pg-legend .sw.bar { background: linear-gradient(90deg, #4ade80 50%, #f87171 50%); }
.pg-legend .sw.line { height: 2px; border-radius: 2px; background: #60a5fa; }
.pg-legend a { color: var(--ink-2); }
.nqw { display: flex; flex-direction: column; }
/* AI market analysis extras */
.brief-opt { margin-bottom: 14px; }
.brief-opt th { text-align: left; font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; padding: 0 8px 6px 0; border-bottom: 1px solid var(--line); }
.brief-opt td { white-space: nowrap; }
.brief-opt td .muted { font-size: 11px; }
.brief-hist { margin-top: 14px; }
.brief-hist .row { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; cursor: pointer; font: inherit; display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.brief-hist .row:first-child { border-top: 0; }
.brief-hist .row:hover, .brief-hist .row.on { background: rgba(255, 255, 255, 0.03); }
.brief-hist .brief-hd { width: 92px; flex: none; font-size: 12px; color: var(--ink-3); }
.brief-hist .t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-meta button.chip { cursor: pointer; background: none; }
@media (max-width: 1180px) { .dash-row { grid-template-columns: 1fr 1fr; } .dash-row > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .pg-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-row { grid-template-columns: 1fr; } .brief-hist .brief-hd { width: 70px; } }
.pg-card { display: flex; flex-direction: column; min-width: 0; }
.pg-chart { position: relative; flex: 1; min-height: 240px; }
.pg-chart svg { position: absolute; inset: 0; }
.today .card-head { margin-bottom: 6px; }
.today-ev { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.today .card-head + .today-row { border-top: 0; }
.brief-opt .table-wrap { margin: 0; }
.brief-opt .brief-lv { min-width: 560px; }
/* Dashboard: market sessions strip */
.sess { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sess-i { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; }
.sess-i > i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.sess-i.on > i { background: var(--good); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15); }
.sess-i.on { border-color: rgba(74, 222, 128, 0.25); }
.sess-i div { display: flex; flex-direction: column; min-width: 0; }
.sess-i b { font-size: 13px; font-weight: 600; }
.sess-i span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
/* Dashboard: market news */
.nwc { margin-top: 14px; }
.nw-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.nw { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; background: rgba(255, 255, 255, 0.02); min-width: 0; transition: border-color 0.15s, transform 0.15s; }
.nw:hover { border-color: var(--line-2); transform: translateY(-1px); }
.nw-img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(255, 255, 255, 0.03)); display: grid; place-items: center; overflow: hidden; }
.nw-img span { font-family: var(--mono); font-size: 22px; color: rgba(255, 255, 255, 0.25); }
.nw-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nw-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nw-src { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.nw-body b { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-body p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw.lead { grid-column: span 2; grid-row: span 2; }
.nw.lead .nw-img { aspect-ratio: auto; flex: 1; min-height: 200px; }
.nw.lead .nw-body b { font-size: 17px; }
@media (max-width: 1180px) { .sess { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sess { grid-template-columns: 1fr 1fr; } .nw-grid { grid-template-columns: 1fr; } .nw.lead { grid-column: auto; grid-row: auto; } .nw.lead .nw-img { aspect-ratio: 16 / 9; min-height: 0; } }
/* Sessions: 4 items; Key news next to AI Market Watch */
.sess { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-top { margin-top: 14px; align-items: stretch; }
.knc { display: flex; flex-direction: column; min-width: 0; }
.kn-list { display: flex; flex-direction: column; flex: 1; gap: 10px; }
.kn { display: grid; grid-template-columns: 132px 1fr; gap: 12px; flex: 1; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.02); min-height: 96px; transition: border-color 0.15s; }
.kn:hover { border-color: var(--line-2); }
.kn-img { position: relative; background: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(255, 255, 255, 0.03)); display: grid; place-items: center; overflow: hidden; }
.kn-img span { font-family: var(--mono); font-size: 20px; color: rgba(255, 255, 255, 0.25); }
.kn-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kn-body { padding: 10px 12px 10px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; justify-content: center; }
.kn-body b { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kn-body p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1180px) { .sess { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-top { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .kn { grid-template-columns: 96px 1fr; } }
/* Collapsible sidebar (desktop) */
.shell { transition: grid-template-columns 0.2s ease; }
.side-toggle { position: absolute; top: 26px; right: -13px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); background: #111317; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; z-index: 25; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); padding: 0; }
.side-toggle:hover { color: #fff; border-color: rgba(96, 165, 250, 0.5); }
@media (min-width: 861px) {
    .shell.collapsed { grid-template-columns: 76px 1fr; }
    .shell.collapsed .side { padding: 20px 12px; }
    .shell.collapsed .brand { justify-content: center; padding: 4px 0 22px; }
    .shell.collapsed .brand > div, .shell.collapsed .nav-t, .shell.collapsed .nav-ext, .shell.collapsed .side-ver, .shell.collapsed .who { display: none; }
    .shell.collapsed .nav-label { font-size: 0; padding: 10px 0 6px; border-top: 1px solid var(--line); margin: 6px 6px 0; }
    .shell.collapsed .nav a { justify-content: center; padding: 6px 0; }
    .shell.collapsed .nav a.on::before { left: -12px; }
    .shell.collapsed .side-foot { flex-direction: column; gap: 8px; }
}
@media (max-width: 860px) { .side-toggle { display: none; } }
/* Live FinancialJuice feed (third column next to Key news) */
.dash-top { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.85fr); }
.fjc { display: flex; flex-direction: column; min-width: 0; }
.fjc .card-head .mono { display: inline-flex; align-items: center; gap: 8px; }
.fj-list { flex: 1 1 0; min-height: 320px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.fj { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.fj:first-child { border-top: 0; }
.fj:hover { color: #fff; }
.fj-t { font-family: var(--mono); font-size: 11px; color: var(--ink-4); padding-top: 1px; }
.fj.hi .fj-h { color: #fff; font-weight: 600; }
.fj-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 8px rgba(248, 113, 113, 0.7); }
.fj.new { animation: fjnew 2.5s ease; }
@keyframes fjnew { from { background: rgba(96, 165, 250, 0.18); } to { background: transparent; } }
.dash-top .kn { grid-template-columns: 104px 1fr; }
@media (max-width: 1400px) { .dash-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dash-top .fjc { grid-column: 1 / -1; } .fj-list { flex: none; max-height: 340px; min-height: 0; } }
@media (max-width: 1180px) { .dash-top { grid-template-columns: 1fr; } }
/* Compact top row (AI Market Watch | Key news | Live feed) + NQ/ES switch + live news window */
.seg-sm button { padding: 4px 10px; font-size: 11px; }
.nqw .card-head { margin-bottom: 10px; }
.nqw-sum { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; font-size: 13px; line-height: 1.55; }
.nqw-lv div { padding: 5px 0; font-size: 12px; grid-template-columns: 76px 1fr; }
.nqw-lv span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nqw-watch { padding: 8px 10px; }
.nqw-watch p { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nqw-more { display: block; margin-top: 10px; text-decoration: none; font-size: 10px; }
.nqw-more:hover { color: #fff; }
.dash-top .kn { min-height: 0; grid-template-columns: 96px 1fr; }
.dash-top .kn-body { padding: 8px 10px 8px 0; }
.dash-top .kn-body p { display: none; }
.dash-top .kn-list { gap: 8px; }
.fj-list { min-height: 240px; }
button.fj { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; font-size: 12.5px; }
button.fj:first-child { border-top: 0; }
.linkish { background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 0; }
.linkish:hover { color: #fff; }
.fjm-back { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade 0.15s ease; }
.fjm { width: min(760px, 100%); max-height: min(80vh, 760px); display: flex; flex-direction: column; background: #0e1013; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); overflow: hidden; }
.fjm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fjm-head .mono { display: inline-flex; align-items: center; gap: 8px; }
.fjm-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.fjm-tools { display: flex; align-items: center; gap: 10px; }
.fjm-list { overflow-y: auto; padding: 6px 18px 14px; }
.fjm-row { display: grid; grid-template-columns: 92px 1fr 22px; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); align-items: start; }
.fjm-row:first-child { border-top: 0; }
.fjm-row.hi .fjm-h { color: #fff; font-weight: 600; }
.fjm-row.focus { background: rgba(96, 165, 250, 0.12); margin: 0 -10px; padding: 10px; border-radius: 10px; }
.fjm-src { color: var(--ink-4); text-decoration: none; text-align: right; }
.fjm-src:hover { color: #fff; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 760px) { .fjm-row { grid-template-columns: 64px 1fr 18px; font-size: 13px; } }
/* Live news refresh button */
.fj-tools { display: flex; align-items: center; gap: 10px; }
.fj-ref { width: 26px; height: 26px; border-radius: 8px; }
.fj-ref.spinning svg { animation: spin 0.8s linear infinite; }

/* Terminal: stat tiles next to weekday performance (Tradezella-style Win Rate % + Avg win/loss) */
.g-dash.dash-main.dash-3 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.78fr); }
.dash-stats { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-tile { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 15px 18px; min-width: 0; color: inherit; text-decoration: none; }
.st-tile .mono { display: block; white-space: nowrap; }
.st-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-width: 0; }
.st-tile .big { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-tile .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.st-tile .spark { max-width: 90px; }
.wg { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.wg-svg { display: block; }
.wl-pills { display: flex; gap: 4px; }
.wl-pills span { font-family: var(--mono); font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 6px; }
.wl-pills .g { color: var(--good); background: rgba(74, 222, 128, 0.12); }
.wl-pills .b { color: var(--blue); background: var(--blue-soft); }
.wl-pills .r { color: var(--bad); background: rgba(248, 113, 113, 0.12); }
.awl { display: grid; gap: 6px; }
.awl-bar { height: 6px; border-radius: 6px; background: var(--bad); overflow: hidden; }
.awl-bar i { display: block; height: 100%; background: var(--good); border-right: 2px solid var(--panel); }
.awl-l { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.awl-l .pos { color: var(--good); }
.awl-l .neg { color: var(--bad); }
.learn-prog { margin-bottom: 14px; }
.learn-prog-r { display: flex; align-items: center; gap: 18px; flex: 1; justify-content: flex-end; }
.learn-prog-r .bar { width: min(320px, 40vw); }
@media (max-width: 1400px) {
    .g-dash.dash-main.dash-3 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
    .dash-stats { grid-column: 1 / -1; flex-direction: row; }
    .dash-stats > * { flex: 1 1 0; }
}
@media (max-width: 1180px) {
    .g-dash.dash-main.dash-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .dash-stats { flex-direction: column; }
    .learn-prog-r .bar { display: none; }
}

/* Journal: select trades for bulk delete. Checkboxes appear on hover or once something is selected; the action bar pops up at the bottom. */
table.t .pick-cell { width: 34px; padding-right: 0; cursor: pointer; }
table.t input.pick { appearance: none; -webkit-appearance: none; margin: 0; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.03); cursor: pointer; vertical-align: middle; display: inline-grid; place-items: center; opacity: 0; transition: opacity 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s; }
table.t input.pick::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform 0.15s cubic-bezier(0.3, 1.6, 0.5, 1); }
table.t input.pick:hover { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12); }
table.t input.pick:active { transform: scale(0.9); }
table.t input.pick:checked, table.t input.pick:indeterminate { background: linear-gradient(135deg, #60a5fa, #3b82f6); border-color: transparent; box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16), 0 2px 8px rgba(59, 130, 246, 0.45); }
table.t input.pick:checked::after { transform: rotate(-45deg) scale(1); }
table.t input.pick:indeterminate::after { width: 8px; height: 0; border-left: 0; border-bottom: 2px solid #fff; transform: none; margin-top: 0; }
table.j-trades tbody tr:hover input.pick, table.j-trades thead:hover input.pick, table.j-trades.selecting input.pick, table.t input.pick:focus-visible { opacity: 1; }
@media (hover: none) { table.t input.pick { opacity: 1; } }
table.t tr.picked td { background: rgba(96, 165, 250, 0.07); }
.bulk-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 32px auto 0; width: fit-content; max-width: 100%; padding: 8px 8px 8px 16px; border: 1px solid rgba(96, 165, 250, 0.35); border-radius: 14px; background: #10141c; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); font-size: 13px; animation: bulkIn 0.18s ease-out; }
.bulk-bar[hidden] { display: none; }
.bulk-bar > span:first-child { margin-right: 8px; }
.btn.danger-solid { background: linear-gradient(135deg, #f87171, #dc2626); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35); }
.btn.danger-solid:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45); }
.bulk-bar #bulkN { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-right: 6px; border-radius: 11px; background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
@keyframes bulkIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Sessions strip: 3 sessions (Asia, London, New York) */
.sess { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .sess { grid-template-columns: 1fr; } }

/* Daily journal: Tradezella-style day summary (intraday P&L curve + stats) */
.jd-sum { display: grid; grid-template-columns: minmax(200px, 0.9fr) minmax(0, 2fr); gap: 18px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.jd-chart { height: 96px; border-radius: 10px; background: rgba(255, 255, 255, 0.015); overflow: hidden; }
.jd-curve { display: block; width: 100%; height: 100%; }
.jd-zero { stroke: rgba(255, 255, 255, 0.14); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.jd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.jd-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jd-stat span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.jd-stat b { font-size: 15px; font-weight: 600; white-space: nowrap; }
.jd-stat i { font-style: normal; }
.jd-stat .pos { color: var(--good); }
.jd-stat .neg { color: var(--bad); }
@media (max-width: 900px) { .jd-sum { grid-template-columns: 1fr; } .jd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Daily journal: month calendar on the right (Tradezella-style) */
.jd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.jd-main { min-width: 0; }
.jd-side { position: sticky; top: 84px; }
.jcal { padding: 14px; }
.jc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.jc-head b { font-size: 14px; font-weight: 600; }
.jc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.jc-w { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--ink-4); text-align: center; padding-bottom: 2px; }
.jc-c { position: relative; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.015); color: var(--ink-3); font: inherit; padding: 0; cursor: pointer; min-width: 0; transition: border-color 0.12s, transform 0.12s; }
.jc-c.empty { border: 0; background: none; cursor: default; }
.jc-c:not(.empty):hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
.jc-c b { font-size: 11px; font-weight: 600; line-height: 1; }
.jc-c span { font-size: 8.5px; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.jc-c.win { background: rgba(74, 222, 128, var(--a, 0.25)); border-color: rgba(74, 222, 128, 0.45); color: #eafff1; }
.jc-c.loss { background: rgba(248, 113, 113, var(--a, 0.25)); border-color: rgba(248, 113, 113, 0.45); color: #fff0f0; }
.jc-c.flat { background: rgba(96, 165, 250, 0.16); border-color: rgba(96, 165, 250, 0.4); color: #fff; }
.jc-c.today { box-shadow: inset 0 0 0 1px var(--blue); }
.jc-c.sel { outline: 2px solid #fff; outline-offset: 1px; }
.jc-dot { position: absolute; top: 3px; right: 3px; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0.8; }
.jc-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.jc-foot div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jc-foot span { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.jc-foot b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.jc-all { width: 100%; margin-top: 10px; justify-content: center; }
@media (max-width: 1180px) { .jd-wrap { grid-template-columns: 1fr; } .jd-side { position: static; order: -1; } .jcal { max-width: 420px; } }

/* Trading accounts (Journal + Terminal) */
.acct-strip { display: flex; align-items: center; gap: 22px; margin-bottom: 14px; padding: 14px 18px; flex-wrap: wrap; }
.as-name { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.as-name b { display: block; font-size: 15px; font-weight: 600; }
.as-name > div > span { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 3px; }
.as-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); border: 1px solid rgba(96, 165, 250, 0.3); }
.as-grid { flex: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.as-i { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-i span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.as-i b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.acct-type { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); }
.acct-type.t-evaluation { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.acct-type.t-funded { color: var(--good); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); }
.acct-type.t-live { color: var(--blue); border-color: rgba(96, 165, 250, 0.35); background: var(--blue-soft); }
.acct-type.t-personal { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.35); background: rgba(196, 181, 253, 0.08); }
.acct-tag { display: inline-block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink-2); }
.acc-list { display: grid; gap: 8px; margin-bottom: 18px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.015); }
.acc-row.on { border-color: rgba(96, 165, 250, 0.45); }
.acc-row b { display: block; font-size: 14px; }
.acc-row .muted { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 3px; flex-wrap: wrap; }
.acc-h { font-size: 14px; margin: 6px 0 12px; }
.bulk-move { height: 32px; padding: 0 10px; font-size: 12.5px; width: auto; }
.dash-acct { width: auto; min-width: 170px; }
@media (max-width: 1180px) { .as-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Custom dropdowns (dropdown.js): styled button + floating menu; the native <select> stays hidden in the page. */
select.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.dd-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line-2); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; font-weight: 500; }
.dd-btn:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); }
.dd-btn:focus-visible, .dd-btn.dd-open { outline: none; border-color: rgba(96, 165, 250, 0.7); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18); }
.dd-btn:disabled { opacity: 0.5; cursor: default; }
.dd-btn .dd-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn.dd-empty .dd-val { color: var(--ink-2); }
.dd-chev { flex: none; color: var(--ink-3); transition: transform 0.18s, color 0.15s; }
.dd-btn:hover .dd-chev, .dd-btn.dd-open .dd-chev { color: #fff; }
.dd-btn.dd-open .dd-chev { transform: rotate(180deg); }
.dd-btn.j-sel { width: auto; min-width: 128px; max-width: 200px; height: 34px; font-size: 13px; padding: 0 10px 0 12px; }
.dd-btn.j-who { width: auto; max-width: 260px; height: 38px; font-size: 13px; }
.dd-btn.dash-acct { width: auto; min-width: 180px; }
.dd-btn.bulk-move { width: auto; height: 32px; font-size: 12.5px; padding: 0 10px; }
.dd-menu { position: fixed; z-index: 1000; max-width: min(360px, calc(100vw - 16px)); overflow-y: auto; padding: 6px; border-radius: 14px; background: #101216; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top; transition: opacity 0.12s, transform 0.12s; scrollbar-width: thin; }
.dd-menu.up { transform-origin: bottom; transform: translateY(4px) scale(0.98); }
.dd-menu.in { opacity: 1; transform: none; }
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 10px 9px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.dd-opt span { overflow: hidden; text-overflow: ellipsis; }
.dd-opt.hi { background: rgba(255, 255, 255, 0.06); color: #fff; }
.dd-opt.on { color: #fff; font-weight: 600; background: rgba(96, 165, 250, 0.14); }
.dd-opt.on svg { color: var(--blue); flex: none; }
.dd-opt.off { opacity: 0.4; cursor: default; }
@media (max-width: 860px) { .dd-btn.j-sel { flex: 1; max-width: none; min-width: 0; } .dd-btn.j-who { max-width: none; width: 100%; } }

/* Economic calendar: central bank interest rates */
.card.rates { margin-bottom: 14px; padding: 14px 16px; }
.rates-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rates-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.rt { border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; background: rgba(255, 255, 255, 0.015); min-width: 0; }
.rt.soon { border-color: rgba(249, 115, 22, 0.45); background: linear-gradient(180deg, rgba(249, 115, 22, 0.08), transparent); }
.rt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--ink-3); }
.rt-top .ccy { color: #fff; font-size: 12px; }
.rt-rate { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 6px; }
.rt-foot { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--ink-3); }
.rt-next, .rt-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-last { display: flex; align-items: center; gap: 5px; }
.rt-chg { align-self: flex-start; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--ink-2); }
.rt-chg.up { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.rt-chg.down { background: rgba(74, 222, 128, 0.12); color: var(--good); }
.rates-t td, .rates-t th { padding: 9px 10px; }
@media (max-width: 1280px) { .rates-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rates-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Page subtitle on one line (Economic Calendar) */
.page-head.one-line p { max-width: none; white-space: nowrap; }
.live-badge[hidden] { display: none; }
@media (max-width: 900px) { .page-head.one-line p { white-space: normal; } }
/* Released events: faded (badge, border and text), full colour again on hover. Upcoming events stay at full strength. */
.ev-row.past { background: none; }
.ev-row.past .ev-time, .ev-row.past .ev-title, .ev-row.past .ev-ccy, .ev-row.past .ev-num, .ev-row.past .ev-num b { color: var(--ink-4); }
.ev-row.past > .imp { opacity: 0.45; box-shadow: none; }
.ev-row.past.imp-row-high { border-left-color: rgba(239, 68, 68, 0.4); }
.ev-row.past.imp-row-medium { border-left-color: rgba(249, 115, 22, 0.4); }
.ev-row.past.imp-row-low { border-left-color: rgba(14, 165, 233, 0.4); }
.ev-row.past .ev-num b.pos { color: rgba(74, 222, 128, 0.6); }
.ev-row.past .ev-num b.neg { color: rgba(248, 113, 113, 0.6); }
.ev-row.past:hover .ev-time, .ev-row.past:hover .ev-title, .ev-row.past:hover .ev-ccy, .ev-row.past:hover .ev-num { color: var(--ink-2); }
.ev-row.past:hover > .imp { opacity: 1; }
.ev-row.past .ev-num { opacity: 0.6; }
.ev-row.past:hover .ev-num { opacity: 1; }
.rates-grid > .muted { grid-column: 1 / -1; }
