/* ============================================================
   XRAY Journal — white theme, black type, grey accents.
   Gains are green, losses red. Prop firm cards stay dark.
   ============================================================ */
:root {
  /* surfaces */
  --bg: #e9e9e9;
  --surface: #ffffff;
  --tile: #f5f5f5;        /* inputs, tiles, soft panels */
  --hover: #ececec;
  --border: #d6d6d6;
  --line: rgba(0,0,0,.07);
  --line-2: rgba(0,0,0,.12);

  /* text */
  --text: #171717;
  --text-2: #515151;
  --text-3: #8c8c8c;

  /* results */
  --gain: #1a9f55; --gain-soft: #e6f6ec;
  --loss: #e5484d; --loss-soft: #fdecec; --loss-line: #f4b9bb;

  /* type scale — one small scale for the whole dashboard */
  --fs-2xs: 9px;
  --fs-xs: 10px;
  --fs-sm: 11px;
  --fs-base: 12px;
  --fs-md: 13px;
  --fs-lg: 15px;
  --fs-xl: 18px;

  /* shape */
  --r-shell: 24px;
  --r-panel: 18px;
  --r-ctl: 10px;
  --r-pill: 999px;
  --h-ctl: 30px;          /* buttons, selects, search */

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: var(--fs-base); line-height: 1.4; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.win-t { color: var(--gain); }
.loss-t { color: var(--loss); }
.gap { height: 10px; }
i[data-icon] { display: inline-flex; width: 14px; height: 14px; flex: none; }
i[data-icon] svg { width: 100%; height: 100%; }

.backdrop {
  position: fixed; inset: 0; z-index: -1;
  background:
    repeating-radial-gradient(ellipse 60% 45% at 18% 22%, transparent 0 16px, rgba(0,0,0,.06) 17px 18px, transparent 19px 34px),
    repeating-radial-gradient(ellipse 50% 60% at 84% 78%, transparent 0 18px, rgba(0,0,0,.05) 19px 20px, transparent 21px 38px),
    linear-gradient(180deg, #ededed, #dcdcdc);
}

/* ---------- shell + top bar ---------- */
.shell { margin: 12px; min-height: calc(100vh - 24px); padding: 12px 16px 20px; background: var(--surface); border-radius: var(--r-shell); box-shadow: 0 30px 70px -30px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.05); }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.brand img { display: block; height: 30px; width: auto; }
.pillnav { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.pillnav::-webkit-scrollbar { display: none; }
.pillnav a { display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); font-size: var(--fs-base); font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background .2s, color .2s; }
.pillnav a:hover:not(.active) { color: var(--text); }
.pillnav a.active { background: var(--text); color: #ffffff; }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search { display: flex; align-items: center; gap: 6px; height: var(--h-ctl); padding: 0 11px; border-radius: var(--r-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); }
.search input { width: 150px; background: none; border: 0; outline: 0; font-size: var(--fs-base); color: var(--text); }
.search input::placeholder { color: var(--text-3); }

/* ---------- context capsule (overview) ---------- */
.context { margin: 10px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 34px; padding: 4px 6px 4px 4px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-base); }
.context .glyph { width: 24px; height: 24px; border-radius: 7px; background: var(--text); color: #ffffff; display: grid; place-items: center; flex: none; }
.context .glyph svg { width: 13px; height: 13px; }
.context .title { font-weight: 600; letter-spacing: -.01em; }
.context .ctx-tag { padding: 2px 7px; border-radius: 6px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); }
.context .sep { width: 1px; height: 12px; background: var(--line-2); }
.context .ctx-date { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); }
.context .ctx-date svg { width: 12px; height: 12px; color: var(--text-3); }
.context .muted { color: var(--text-2); }
.context .right { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: var(--fs-base); color: var(--text-2); }
.context .right > span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }

/* ---------- buttons, pills, selects, segmented ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--h-ctl); padding: 0 12px; border: 0; border-radius: var(--r-pill); background: #f0f0f0; color: var(--text); font-size: var(--fs-base); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #e4e4e4; }
.btn.sm { height: 24px; padding: 0 10px; font-size: var(--fs-sm); }
.btn.sky { background: var(--text); color: #ffffff; font-weight: 600; }
.btn.sky:hover { background: #343434; }
.btn.ghost { background: var(--surface); color: #343434; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: var(--tile); }
.btn.danger { background: var(--surface); color: var(--loss); box-shadow: inset 0 0 0 1px var(--loss-line); }
.btn.danger:hover { background: var(--loss); color: #ffffff; }
.iconbtn { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); color: var(--text-2); padding: 0; }
.iconbtn svg { width: 14px; height: 14px; }
.iconbtn:hover { color: var(--text); border-color: var(--text-3); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: var(--fs-sm); background: #f0f0f0; color: #343434; white-space: nowrap; }
.pill.lime { background: var(--gain-soft); color: var(--gain); }
.pill.coral { background: var(--loss-soft); color: var(--loss); }
.pill.sky { background: #e9e9e9; color: var(--text); }
.pill.amber { background: var(--tile); color: var(--text-2); box-shadow: inset 0 0 0 1px #e2e2e2; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-base); color: var(--text-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
select.sel, .context select { max-width: 190px; text-overflow: ellipsis; height: var(--h-ctl); padding: 0 10px; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-base); color: var(--text); outline: 0; }
.context select { height: 26px; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 10px; }
.page-head h1 { margin: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; }
.page-head .sub { font-size: var(--fs-base); color: var(--text-3); }
.page-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- panels ---------- */
.panel { min-width: 0; padding: 14px; border-radius: var(--r-panel); background: var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 10px 30px -22px rgba(0,0,0,.25); }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-head .ico { width: 24px; height: 24px; border-radius: 50%; background: #f2f2f2; display: grid; place-items: center; flex: none; }
.panel-head h2 { margin: 0; font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; }
.panel-head .tab { padding: 0 0 0 8px; border: 0; border-left: 1px solid var(--line-2); background: none; font-size: var(--fs-base); color: var(--text-3); }
.panel-head .tab + .tab { border-left: 0; padding-left: 0; }
.panel-head .tab.on { color: var(--text); font-weight: 600; }
.panel-head .tools { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); }
.empty { padding: 32px 0; text-align: center; color: var(--text-3); }
.empty.sm { padding: 12px 0; }

/* ---------- overview grid ---------- */
.grid-overview { display: grid; gap: 12px; grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "wallet metrics stats" "wallet route log"; }
.area-wallet { grid-area: wallet; } .area-metrics { grid-area: metrics; } .area-stats { grid-area: stats; } .area-route { grid-area: route; } .area-log { grid-area: log; }

.metric { padding: 2px 0 10px; }
.metric + .metric, .metric.split { border-top: 1px solid var(--line); padding-top: 10px; }
.metric.split { margin-top: 10px; }
.metric-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-base); font-weight: 500; }
.metric-head .ico { color: var(--text-2); display: inline-flex; }
.metric-head .aside { margin-left: auto; font-size: var(--fs-sm); font-weight: 400; color: var(--text-2); }
.metric-head.edge-head { margin: 12px 0 8px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); }

/* wallet panel (soft grey sheet so the dark card pops) */
.paper { padding: 14px; border-radius: var(--r-panel); background: var(--tile); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.paper .eyebrow { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.paper h2 { display: flex; align-items: center; margin: 10px 0 8px; font-size: var(--fs-md); font-weight: 600; }
.paper h2 .dots { margin-left: auto; display: flex; gap: 5px; }
.paper h2 .dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #d0d0d0; }
.paper h2 .dots button.on { background: var(--text); }
.paper h3 { margin: 12px 0 6px; font-size: var(--fs-base); font-weight: 600; }
.wl-pocket .chg { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; background: var(--gain); color: #ffffff; }
.wl-pocket .chg.neg { background: var(--loss); }
.rules { display: grid; gap: 7px; margin: 10px 0 4px; padding: 10px 0; border-top: 1px dashed #d4d4d4; border-bottom: 1px dashed #d4d4d4; }
.rule { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; font-size: var(--fs-sm); }
.rule .lbl { color: var(--text-2); font-weight: 500; }
.rule .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 5px; border-radius: 99px; background: #e2e2e2; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--text); }
.bar.amber > span { background: var(--text-2); }
.bar.coral > span { background: var(--loss); }

/* trade rows (wallet + journal day) */
.txn { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 8px 18px -14px rgba(0,0,0,.25); cursor: pointer; }
.txn + .txn { margin-top: 5px; }
.txn .tico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: #f0f0f0; font-size: var(--fs-2xs); font-weight: 700; }
.txn .tbody { min-width: 0; }
.txn .tname, .txn .tmeta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn .tname { font-size: var(--fs-base); font-weight: 600; }
.txn .tmeta { font-size: var(--fs-xs); color: var(--text-3); }
.txn .tamt { margin-left: auto; display: flex; gap: 4px; align-items: center; font-size: var(--fs-base); font-weight: 600; font-variant-numeric: tabular-nums; }
.txn .tamt.win, .txn .tamt.win .arr { color: var(--gain); }
.txn .tamt.loss, .txn .tamt.loss .arr { color: var(--loss); }
.day-trades { display: grid; gap: 5px; margin-bottom: 12px; }
.day-trades .txn { margin: 0; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.day-trades .txn .tico { background: var(--surface); }

/* setups + mini kpis */
.setups { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 4px; }
.setup { padding: 9px; border-radius: 12px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.setup .top { display: flex; align-items: center; justify-content: space-between; }
.setup .dot { width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.06); display: grid; place-items: center; }
.setup .dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.setup .iconbtn { width: 20px; height: 20px; border: 0; }
.setup .nm { margin: 7px 0; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup .blk { padding: 7px; border-radius: 8px; background: var(--text); }
.setup .blk .bar { height: 4px; background: #343434; }
.setup .blk .bar > span { background: #ffffff; }
.setup .blk .ft { display: flex; justify-content: space-between; margin-top: 5px; font-size: var(--fs-xs); color: #b6b6b6; font-variant-numeric: tabular-nums; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.mini-kpis span { display: block; font-size: var(--fs-xs); color: var(--text-3); }
.mini-kpis b { display: block; margin-top: 2px; font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; }

/* journal log */
.log-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; }
.log-item:first-of-type { border-top: 0; }
.log-item .badge { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: var(--fs-xs); font-weight: 700; background: var(--text); color: #ffffff; }
.log-item .badge.lime { background: var(--gain); }
.log-item .badge.amber { background: var(--text-3); }
.log-item .badge.coral { background: var(--loss); }
.log-item .tbody { min-width: 0; }
.log-item .t { font-size: var(--fs-base); font-weight: 500; }
.log-item .s { margin-top: 1px; font-size: var(--fs-sm); color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.log-item .chip-r { margin-left: auto; flex: none; padding: 3px 8px; border-radius: var(--r-pill); font-size: var(--fs-sm); background: var(--tile); color: #343434; font-variant-numeric: tabular-nums; }
.log-item .chip-r.win-t { background: var(--gain-soft); color: var(--gain); }
.log-item .chip-r.loss-t { background: var(--loss-soft); color: var(--loss); }
.quick { display: flex; gap: 6px; margin-top: 10px; }
.quick input { flex: 1; min-width: 0; height: var(--h-ctl); padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-base); color: var(--text); outline: 0; }
.quick input:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--text); }

/* ---------- prop firm card (stays dark on the white theme) ---------- */
.pcard {
  position: relative; aspect-ratio: 1.586 / 1; width: 100%; border-radius: 14px; overflow: hidden; isolation: isolate; user-select: none; color: #ffffff;
  background:
    radial-gradient(80% 120% at 88% 115%, rgba(140,140,140,.55) 0%, transparent 60%),
    radial-gradient(60% 80% at 60% 70%, rgba(120,120,120,.22) 0%, transparent 70%),
    linear-gradient(135deg, #1d1d1d 0%, #121212 60%, #0b0b0b 100%);
  box-shadow: 0 28px 40px -22px rgba(0,0,0,.6), 0 2px 0 rgba(255,255,255,.04) inset;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .3s;
}
.pcard:hover { transform: translateY(-2px) rotate(-.3deg); }
.pcard.off { filter: grayscale(1) brightness(.75); }
.pcard .art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: 0; }
.pcard .shade { position: absolute; inset: 0; z-index: -1; opacity: 0; }
.pcard .rings { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; background: repeating-radial-gradient(circle at 115% 120%, transparent 0 22px, rgba(255,255,255,.06) 23px 24px); }
.pcard .wordmark { position: absolute; right: 5%; top: 30%; z-index: -1; max-width: 70%; overflow: hidden; white-space: nowrap; pointer-events: none; text-align: right; font-size: 28px; font-weight: 700; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.12); }
.pcard .in { position: absolute; inset: 0; padding: 6% 7%; display: flex; flex-direction: column; }
.pcard .row { display: flex; align-items: flex-start; }
.pcard .row > div { min-width: 0; padding-right: 10px; }
.pcard .lbl { font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.pcard .name { margin-top: 2px; font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .toggle { margin-left: auto; width: 34px; height: 19px; padding: 2px; border: 0; border-radius: 99px; display: flex; background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: background .2s; }
.pcard .toggle::after { content: ""; width: 15px; height: 15px; border-radius: 50%; background: #ffffff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .25s; }
.pcard .toggle[aria-pressed="true"]::after { transform: translateX(15px); }
.pcard .toggle[aria-pressed="false"] { background: rgba(0,0,0,.4); }
.pcard .chip { position: relative; width: 24px; height: 18px; margin-top: auto; margin-bottom: 8px; border-radius: 5px; background: linear-gradient(135deg, #e6e6e6, #9a9a9a 50%, #d6d6d6); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.pcard .chip::before, .pcard .chip::after { content: ""; position: absolute; }
.pcard .chip::before { left: 33%; right: 33%; top: 0; bottom: 0; border-left: 1px solid rgba(0,0,0,.2); border-right: 1px solid rgba(0,0,0,.2); }
.pcard .chip::after { top: 50%; left: 0; right: 0; height: 1px; background: rgba(0,0,0,.22); }
.pcard .acct { display: none; }
.pcard .pan { display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); font-weight: 500; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.pcard .pan b { font-size: var(--fs-base); font-weight: 600; letter-spacing: .06em; }
.pcard .meta { display: flex; gap: 14px; margin-top: 7px; align-items: flex-end; }
.pcard .meta .v { margin-top: 1px; font-size: var(--fs-xs); font-weight: 600; }
.pcard .stamp { margin-left: auto; padding: 3px 7px; border-radius: 99px; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.pcard .stamp.funded { background: #ffffff; color: #171717; box-shadow: none; }
/* with firm art: art on top, details on a dark fade at the bottom */
.pcard.has-art .art, .pcard.has-art .shade { opacity: 1; }
.pcard.has-art .shade { background: linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,0) 34%, rgba(8,8,8,.85) 52%, rgba(8,8,8,.97) 66%, #080808 100%); }
.pcard.has-art .rings, .pcard.has-art .wordmark, .pcard.has-art .id, .pcard.has-art .chip { display: none; }
.pcard.has-art .row { justify-content: flex-end; }
.pcard.has-art .band { margin-top: auto; }
.pcard.has-art .acct { display: block; margin-bottom: 3px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.7); }
.pcard.has-art .pan { text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* ---------- journal ---------- */
.journal-grid { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 12px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-head .m { margin-right: auto; font-size: var(--fs-md); font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { padding-bottom: 3px; text-align: center; font-size: var(--fs-2xs); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cal .d { position: relative; min-width: 0; overflow: hidden; aspect-ratio: 1; padding: 4px; border: 0; border-radius: 8px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; font-size: var(--fs-xs); background: var(--tile); color: var(--text-2); }
.cal .d .p { font-size: 8px; white-space: nowrap; letter-spacing: -.02em; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal .d.out { opacity: .3; }
.cal .d.win { background: var(--gain-soft); color: var(--gain); }
.cal .d.win.big { background: var(--gain); color: #ffffff; }
.cal .d.loss { background: var(--loss-soft); color: var(--loss); }
.cal .d.loss.big { background: var(--loss); color: #ffffff; }
.cal .d.today { box-shadow: inset 0 0 0 1px var(--text-3); }
.cal .d.sel, .cal .d.today.sel { box-shadow: inset 0 0 0 2px var(--text); }
.cal .d.has-note::after { content: ""; position: absolute; top: 5px; right: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--text); }
.cal .d.big.has-note::after { background: #ffffff; }
.entries { margin-top: 10px; max-height: 360px; overflow: auto; }
.entry-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--r-ctl); cursor: pointer; }
.entry-row:hover { background: var(--tile); }
.entry-row.on { background: #ededed; }
.entry-row .dt { width: 32px; flex: none; text-align: center; }
.entry-row .dt b { display: block; font-size: var(--fs-lg); line-height: 1; }
.entry-row .dt span { font-size: var(--fs-2xs); text-transform: uppercase; color: var(--text-3); }
.entry-row .tt { min-width: 0; }
.entry-row .tt .h, .entry-row .tt .x { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-row .tt .h { font-size: var(--fs-base); font-weight: 500; }
.entry-row .tt .x { font-size: var(--fs-sm); color: var(--text-3); }
.editor-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-top #saved { margin-left: auto; }
.date-big { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.01em; }
.editor .day-stats { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0 12px; }
.editor-actions { display: flex; justify-content: flex-end; }

/* ---------- form fields ---------- */
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field > span { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.field textarea, .field input, .field select { width: 100%; padding: 7px 10px; border: 0; border-radius: var(--r-ctl); outline: 0; resize: vertical; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-base); color: var(--text); }
.field input, .field select { height: var(--h-ctl); }
.field textarea { min-height: 64px; line-height: 1.5; }
.field textarea.short { min-height: 52px; }
.field textarea:focus, .field input:focus, .field select:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--text); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scale { display: flex; gap: 5px; }
.scale button { flex: 1; height: 26px; border: 0; border-radius: 8px; background: var(--tile); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); }
.scale button.on { background: var(--text); color: #ffffff; font-weight: 600; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tags button { padding: 4px 9px; border: 0; border-radius: var(--r-pill); background: var(--tile); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); }
.tags button.on { background: var(--text); color: #ffffff; }
.tags button.on.bad { background: var(--loss); }

/* wheel time picker (trade form) */
.timefield { width: 100%; height: var(--h-ctl); display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; border: 0; border-radius: var(--r-ctl); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-base); color: var(--text); text-align: left; }
.timefield svg { width: 14px; height: 14px; color: var(--text-2); flex: none; }
.timefield:hover, .timefield:focus-visible { background: var(--surface); box-shadow: inset 0 0 0 1px var(--text); outline: 0; }
.tp { position: fixed; z-index: 200; width: 216px; padding: 12px 10px 10px; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 24px 60px -18px rgba(0,0,0,.35); animation: pop .18s cubic-bezier(.2,.8,.2,1); }
.tp-title { margin: 0 2px 4px; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tp-wheels { position: relative; height: 140px; display: flex; justify-content: center; gap: 2px; }
.tp-band { position: absolute; left: -10px; right: -10px; top: 56px; height: 28px; border-top: 1px solid #e4e4e4; border-bottom: 1px solid #e4e4e4; pointer-events: none; }
.tp-col { width: 46px; height: 140px; padding: 56px 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.tp-col::-webkit-scrollbar { display: none; }
.tp-col.tp-ap { width: 50px; }
.tp-item { height: 28px; line-height: 28px; text-align: center; scroll-snap-align: center; font-size: var(--fs-lg); color: var(--text-3); cursor: pointer; font-variant-numeric: tabular-nums; user-select: none; transition: color .12s; }
.tp-item.on { color: var(--text); font-weight: 500; }
.tp-sep { align-self: center; font-size: var(--fs-lg); font-weight: 600; }
.tp-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.tp-foot button { height: 30px; border: 0; border-radius: 9px; font-size: var(--fs-base); font-weight: 600; }
.tp-now { width: 30px; flex: none; display: grid; place-items: center; background: transparent; color: var(--text-3); }
.tp-now svg { width: 15px; height: 15px; }
.tp-now:hover { color: var(--text); }
.tp-cancel { flex: 1; background: #ececec; color: var(--text); }
.tp-cancel:hover { background: #e2e2e2; }
.tp-apply { flex: 1.4; background: var(--text); color: #ffffff; }
.tp-apply:hover { background: #000000; }

/* ---------- trades table ---------- */
.search-tag { margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.t th { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.t td { padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: var(--fs-base); color: var(--text-2); }
.t tr { cursor: pointer; }
.t tr:hover td { background: #fafafa; }
.t td.strong { color: var(--text); font-weight: 500; }
.t td.win-t { color: var(--gain); }
.t td.loss-t { color: var(--loss); }
.t td.note { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- analytics ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { padding: 11px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 10px 30px -22px rgba(0,0,0,.25); }
.kpi .k { font-size: var(--fs-sm); color: var(--text-3); }
.kpi .v { margin-top: 3px; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .h { margin-top: 2px; font-size: var(--fs-xs); color: var(--text-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 120px) 1fr 56px; gap: 8px; align-items: center; padding: 4px 0; font-size: var(--fs-base); }
.hbar .n { line-height: 1.25; }
.hbar .n small { display: block; font-size: var(--fs-xs); color: var(--text-3); }
.hbar .track { position: relative; height: 7px; border-radius: 99px; background: #f0f0f0; overflow: hidden; }
.hbar .track span { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- accounts ---------- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.acc { padding: 11px; border-radius: var(--r-panel); background: var(--tile); color: var(--text); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.acc .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding: 0 3px; }
.acc .foot .amt { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.acc .foot .sub { font-size: var(--fs-xs); color: var(--text-3); }
.acc .btns { display: flex; gap: 5px; }
.acc .btns button { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.acc .btns button svg { width: 13px; height: 13px; }
.acc .btns button:hover { background: var(--text); color: #ffffff; }
.acc .btns button.del:hover { background: var(--loss-soft); color: var(--loss); box-shadow: 0 0 0 1px var(--loss-line); }
.acc .btns button.armed, .acc .btns button.armed:hover { background: var(--loss); color: #ffffff; box-shadow: 0 0 0 4px var(--loss-soft); animation: arm-pulse .9s ease-in-out infinite; }
@keyframes arm-pulse { 50% { box-shadow: 0 0 0 6px var(--loss-soft); } }
.acc .rules { margin: 9px 2px 2px; padding: 9px 0 0; border-bottom: 0; }
.acc.add { min-height: 200px; display: grid; place-items: center; border: 2px dashed #d0d0d0; background: transparent; box-shadow: none; color: var(--text-3); cursor: pointer; }
.acc.add:hover { border-color: var(--text); color: var(--text); }
.add-in { display: grid; justify-items: center; gap: 6px; font-weight: 500; }

/* ---------- notebook + OneNote media ---------- */
.media { display: grid; gap: 8px; min-width: 0; }
.editor .media, .modal .media { margin-bottom: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.thumb { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #e9e9e9; cursor: zoom-in; aspect-ratio: 16 / 10; box-shadow: inset 0 0 0 1px var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.thumb:hover img { transform: scale(1.04); }
.links { display: flex; flex-wrap: wrap; gap: 5px; }
.links a { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 9px; border-radius: var(--r-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links a svg { width: 12px; height: 12px; flex: none; }
.links a:hover { background: var(--hover); }
.orig { border-radius: var(--r-ctl); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.orig summary { padding: 7px 11px; cursor: pointer; font-size: var(--fs-sm); color: var(--text-3); }
.orig pre { margin: 0; padding: 0 11px 11px; max-height: 380px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: var(--fs-base)/1.55 var(--font); color: var(--text-2); }
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 16px 76px; background: rgba(0,0,0,.92); cursor: zoom-out; }
.lb img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 8px; cursor: default; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); cursor: default; }
.lb-bar .num { min-width: 46px; text-align: center; font-size: var(--fs-base); }

/* ---------- link button ---------- */
.linkbtn { justify-self: start; padding: 0; border: 0; background: none; font-size: var(--fs-sm); color: var(--loss); }

/* ---------- modal + toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(240,240,240,.7); backdrop-filter: blur(6px); animation: fade .2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 40px 80px -30px rgba(0,0,0,.35); animation: pop .25s cubic-bezier(.2,.8,.2,1); }
.modal h2 { display: flex; align-items: center; margin: 0 0 12px; font-size: var(--fs-lg); font-weight: 600; }
.modal h2 .iconbtn { margin-left: auto; }
.modal .foot { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.modal .foot .left { margin-right: auto; }
#preview { max-width: 250px; margin: 0 auto 14px; }
#toast { position: fixed; bottom: 22px; left: 50%; translate: -50% 0; z-index: 60; padding: 7px 14px; border-radius: var(--r-pill); background: var(--text); color: #ffffff; font-size: var(--fs-base); font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .grid-overview { grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); grid-template-areas: "wallet metrics" "wallet stats" "route log"; }
}
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .journal-grid, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .grid-overview { grid-template-columns: minmax(0, 1fr); grid-template-areas: "wallet" "metrics" "stats" "route" "log"; }
  .shell { margin: 8px; padding: 12px 12px 18px; border-radius: 20px; }
  .context { border-radius: 18px; padding: 8px 12px; }
  .context .sep { display: none; }
  .context .right { margin-left: 0; }
  .topbar-right { margin-left: 0; width: 100%; }
  .search { display: none; }
}
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .two, .three { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .mini-kpis, .setups { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Secure uploader (journal + trade form) ---------- */
.up { display: grid; gap: 8px; min-width: 0; }
.up-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 14px 16px; border-radius: 14px; border: 1.5px dashed #c9c9c9; background: var(--surface); color: var(--text-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; outline: 0; }
.up-drop:hover, .up-drop:focus-visible { border-color: var(--text-3); background: #fafafa; }
.up.over .up-drop, body.dragging .up .up-drop { border-color: var(--text); background: #f6f6f6; }
.up.over .up-drop { box-shadow: 0 0 0 4px rgba(0,0,0,.05); }
.up-plus { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1.8px solid var(--text); color: var(--text); margin-bottom: 4px; }
.up-plus svg { width: 16px; height: 16px; stroke-width: 2.2; }
.up-drop b { font-size: var(--fs-md); font-weight: 500; color: var(--text-2); }
.up-drop small { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-3); }
.up-drop small svg { width: 11px; height: 11px; }
.up-drop .up-safe { color: var(--gain); }
.up-list { display: grid; gap: 6px; }
.up-list:empty { display: none; }
.up-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 8px 7px 7px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.up-thumb { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--tile); color: var(--text-3); cursor: zoom-in; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-thumb svg { width: 18px; height: 18px; }
.up-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.up-info b { font-size: var(--fs-base); font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-info small { display: flex; align-items: center; gap: 3px; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-info small svg { width: 10px; height: 10px; flex: none; color: var(--gain); }
.up-row .iconbtn { flex: none; width: 28px; height: 28px; border: 0; background: var(--tile); }
.up-row .iconbtn:hover { background: #e6e6e6; }
.up-row .iconbtn.armed { background: var(--loss); color: #ffffff; }
.up-row.pending .up-thumb { cursor: default; }
.up-bar { display: block; height: 3px; border-radius: 3px; background: var(--tile); overflow: hidden; position: relative; margin-top: 3px; }
.up-bar::after { content: ""; position: absolute; inset: 0 60% 0 0; border-radius: 3px; background: var(--text); animation: upbar 1s ease-in-out infinite; }
@keyframes upbar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.up-row.bad { background: var(--loss-soft); box-shadow: inset 0 0 0 1px var(--loss-line); }
.up-row.bad .up-thumb { background: #ffffff; color: var(--loss); cursor: default; }
.up-row.bad .up-info small { color: var(--loss); }
.up-row.missing .up-thumb, .thumb.missing { opacity: .4; }
.up-clear { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--h-ctl); border: 0; border-radius: var(--r-ctl); background: var(--tile); color: var(--text); font-size: var(--fs-base); font-weight: 500; cursor: pointer; }
.up-clear svg { width: 13px; height: 13px; }
.up-clear:hover { background: #e9e9e9; }
.up-links { display: flex; flex-wrap: wrap; gap: 6px; }
.up-chip, .up-addlink { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; height: 26px; padding: 0 4px 0 9px; border-radius: var(--r-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); color: var(--text-2); }
.up-chip svg, .up-addlink svg { width: 12px; height: 12px; flex: none; }
.up-chip a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.up-chip button { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; }
.up-chip button:hover { background: #e3e3e3; color: var(--text); }
.up-addlink { flex: 1 1 220px; padding-right: 9px; }
.field .up-addlink input { flex: 1; min-width: 0; height: 24px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: var(--fs-sm); }
.field .up-addlink input:focus { background: transparent; box-shadow: none; }
.up-addlink:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--text); }

/* ---------- Journal trade block ---------- */
.jt { padding: 10px 12px 2px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.jt-head { display: flex; align-items: center; gap: 8px; min-height: 26px; margin-bottom: 8px; }
.jt-head > b { font-size: var(--fs-md); font-weight: 600; }
.jt-calc { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.jt-grid { display: grid; grid-template-columns: .8fr .75fr 1fr 1fr 1fr 1.3fr; gap: 8px; }
.jt-grid input[data-jfield=time], input[data-hhmm] { font-variant-numeric: tabular-nums; }
.pnl-in { display: flex; align-items: center; gap: 3px; height: var(--h-ctl); padding: 0 3px; border-radius: var(--r-ctl); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.pnl-in:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--text); }
.pnl-in button { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; }
.pnl-in.pos button[data-v=pos] { background: var(--gain); color: #ffffff; }
.pnl-in.neg button[data-v=neg] { background: var(--loss); color: #ffffff; }
.field .pnl-in input { flex: 1; min-width: 0; height: 100%; padding: 0 6px; background: transparent; box-shadow: none; font-weight: 600; }
.field .pnl-in input:focus { background: transparent; box-shadow: none; }
.pnl-in.pos input { color: var(--gain); }
.pnl-in.neg input { color: var(--loss); }
.up-drop.sm { padding: 12px 14px; gap: 3px; }
.up-drop.sm .up-plus { width: 24px; height: 24px; margin-bottom: 2px; }
.up-drop.sm .up-plus svg { width: 13px; height: 13px; }
.up-row.big .up-thumb { width: 132px; height: 76px; border-radius: 10px; }
@media (max-width: 760px) { .jt-grid { grid-template-columns: 1fr 1fr; } .jt-head { flex-wrap: wrap; } }

/* ---------- Compact journal layout (overrides) ---------- */
.seg.sm { padding: 2px; }
.seg.sm button { padding: 3px 9px; font-size: var(--fs-sm); }
.jt { padding: 10px 12px 0; }
.jt-head { flex-wrap: wrap; gap: 6px 8px; }
.jt-head > b { margin-right: 2px; }
.jt-calc .pill { font-size: var(--fs-xs); }
.up-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.up-pair > .field { min-width: 0; }
.up { gap: 6px; }
.up-drop, .up-drop.sm { display: flex; align-items: center; justify-items: start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed #d2d2d2; text-align: left; }
.up-plus, .up-drop.sm .up-plus { flex: none; width: 28px; height: 28px; margin: 0; border: 0; background: var(--tile); }
.up-plus svg, .up-drop.sm .up-plus svg { width: 14px; height: 14px; }
.up-drop:hover .up-plus { background: var(--text); color: #ffffff; }
.up-txt { display: grid; gap: 1px; min-width: 0; }
.up-drop b { font-size: var(--fs-base); font-weight: 600; color: var(--text); }
.up-drop small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-drop .up-safe { display: inline-flex; align-items: center; gap: 2px; color: var(--gain); }
.up-drop .up-safe svg { width: 10px; height: 10px; }
.up-row { padding: 5px 6px 5px 5px; gap: 8px; border-radius: 10px; }
.up-thumb { width: 34px; height: 34px; }
.up-row.big .up-thumb { width: 96px; height: 56px; }
.up-row .iconbtn { width: 24px; height: 24px; }
.up-row .iconbtn svg { width: 12px; height: 12px; }
.up-clear { height: 26px; font-size: var(--fs-sm); }
.up-addlink { flex: 1 1 160px; }
.editor .scale button { height: 24px; }
@media (max-width: 760px) { .up-pair { grid-template-columns: 1fr; } }

/* ---------- Journal save bar ---------- */
.editor-actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 6px -14px -14px; padding: 10px 14px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-panel, 18px) var(--r-panel, 18px); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }
.save-hint { margin-left: auto; font-size: var(--fs-xs); color: var(--text-3); }
.save-hint kbd { display: inline-block; min-width: 16px; padding: 0 3px; margin-left: 2px; border-radius: 4px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: var(--fs-2xs); text-align: center; color: var(--text-2); }
.btn.done { background: var(--gain); color: #ffffff; }
@media (max-width: 760px) { .save-hint { display: none; } .editor-actions .btn.sky { margin-left: auto; } }

/* calc badges live in the day summary row */
.day-stats .jt-calc { display: contents; }
.jt-head .seg.sm { margin-right: auto; }

/* ---------- Trades: mistake filter ---------- */
select.sel.active { box-shadow: inset 0 0 0 1px var(--loss-line); background: var(--loss-soft); color: var(--loss); }

/* ===== COMPACT OVERVIEW (strip style) — delete this block to undo ===== */
.grid-overview { gap: 10px; grid-template-columns: minmax(240px, 270px) minmax(0, 1fr) minmax(0, 1fr); }
.grid-overview .panel, .grid-overview .paper { padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.grid-overview .paper { background: var(--tile); }
.grid-overview .panel-head { gap: 6px; margin-bottom: 6px; min-height: 24px; }
.grid-overview .panel-head .ico { width: 22px; height: 22px; border-radius: 7px; background: var(--text); color: #ffffff; }
.grid-overview .panel-head .ico svg { width: 12px; height: 12px; }
.grid-overview .panel-head h2 { font-size: var(--fs-base); }
.grid-overview .panel-head .tab { font-size: var(--fs-sm); }
.grid-overview .panel-head .tools { font-size: var(--fs-xs); }
.grid-overview .panel-head .tools .iconbtn { width: 22px; height: 22px; }
.grid-overview .metric { padding: 0 0 8px; }
.grid-overview .metric + .metric, .grid-overview .metric.split { padding-top: 8px; }
.grid-overview .metric.split { margin-top: 6px; }
.grid-overview .metric-head { font-size: var(--fs-sm); }
.grid-overview .metric-head .aside { font-size: var(--fs-xs); }
.grid-overview .metric-head.edge-head { margin: 8px 0 6px; }
.grid-overview .paper h2 { margin: 6px 0 6px; font-size: var(--fs-base); }
.grid-overview .paper h3 { margin: 8px 0 4px; font-size: var(--fs-sm); }
.grid-overview .pcard { border-radius: 11px; box-shadow: 0 16px 26px -18px rgba(0,0,0,.55); }
.grid-overview .grid-overview .grid-overview .grid-overview .rules { gap: 5px; margin: 8px 0 2px; padding: 8px 0; }
.grid-overview .rule { grid-template-columns: 66px 1fr auto; font-size: var(--fs-xs); }
.grid-overview .bar { height: 4px; }
.grid-overview .txn { padding: 5px 7px; gap: 7px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.grid-overview .txn + .txn { margin-top: 4px; }
.grid-overview .txn .tico { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
.grid-overview .txn .tname, .grid-overview .txn .tamt { font-size: var(--fs-sm); }
.grid-overview .txn .tmeta { font-size: var(--fs-2xs); }
.grid-overview .setups { gap: 6px; }
.grid-overview .setup { padding: 7px; border-radius: 10px; }
.grid-overview .setup .nm { margin: 5px 0; font-size: var(--fs-xs); }
.grid-overview .setup .blk { padding: 6px; border-radius: 7px; }
.grid-overview .setup .blk .ft { font-size: var(--fs-2xs); }
.grid-overview .mini-kpis { gap: 6px; margin-top: 8px; padding-top: 8px; }
.grid-overview .mini-kpis span { font-size: var(--fs-2xs); }
.grid-overview .mini-kpis b { font-size: var(--fs-base); }
.grid-overview .log-item { gap: 7px; padding: 5px 0; }
.grid-overview .log-item .badge { width: 18px; height: 18px; font-size: 9px; }
.grid-overview .log-item .t { font-size: var(--fs-sm); }
.grid-overview .log-item .s { font-size: var(--fs-xs); -webkit-line-clamp: 1; }
.grid-overview .log-item .chip-r { padding: 2px 7px; font-size: var(--fs-xs); }
.grid-overview .quick { margin-top: 8px; }
.grid-overview .quick input, .grid-overview .quick .btn { height: 28px; font-size: var(--fs-sm); }
/* ===== END COMPACT OVERVIEW ===== */

/* ---------- Chart crosshair, tooltip, compare ---------- */
svg.chart[data-pts] { cursor: crosshair; touch-action: pan-y; }
#chart-tip { position: fixed; z-index: 150; display: grid; gap: 1px; min-width: 90px; padding: 6px 9px; border-radius: 9px; background: #171717; color: #ffffff; font-size: var(--fs-xs); line-height: 1.35; pointer-events: none; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); white-space: nowrap; }
#chart-tip.below { transform: translate(-50%, 0); }
#chart-tip.show { opacity: 1; }
#chart-tip b { font-weight: 500; color: rgba(255,255,255,.7); }
#chart-tip .v { font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
#chart-tip .v.up, #chart-tip .vs.up { color: #4ade80; }
#chart-tip .v.down, #chart-tip .vs.down { color: #ff7b7f; }
#chart-tip small { color: rgba(255,255,255,.6); font-size: var(--fs-2xs); }
#chart-tip .vs { margin-top: 2px; padding-top: 3px; border-top: 1px solid rgba(255,255,255,.15); font-weight: 600; }
.chart-cmp { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; margin-top: 6px; padding: 5px 8px; border-radius: 9px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); }
.chart-cmp .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-cmp .muted { color: var(--text-3); }
.chart-cmp .arrow { color: var(--text-3); }
.chart-cmp .cdot { width: 8px; height: 8px; border-radius: 50%; border: 2px solid #171717; background: #ffffff; flex: none; }
.chart-cmp .cdot.b { border-color: #3b6cf0; }
.chart-cmp .cpill { padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-cmp .cpill.up { background: var(--gain-soft); color: var(--gain); box-shadow: none; }
.chart-cmp .cpill.down { background: var(--loss-soft); color: var(--loss); box-shadow: none; }
.chart-cmp .linkbtn { margin-left: auto; }

/* ---------- Weekly statistics (analytics) ---------- */
.span-2 { grid-column: 1 / -1; }
.wk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; align-items: start; }
.wk-chart { min-width: 0; }
.wk-side { padding: 12px; border-radius: 12px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.wk-title { display: grid; font-size: var(--fs-base); font-weight: 600; }
.wk-title span { font-size: var(--fs-xs); font-weight: 400; color: var(--text-3); }
.wk-net { margin: 6px 0 10px; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wk-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.wk-cell span { display: block; font-size: var(--fs-2xs); color: var(--text-3); }
.wk-cell b { display: block; margin-top: 1px; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel-head .tools .iconbtn[disabled] { opacity: .35; cursor: default; }
@media (max-width: 900px) { .wk-grid { grid-template-columns: 1fr; } }

/* ---------- Wallet: cards drop into a pocket ---------- */
.wallet { position: relative; margin: 4px 0 14px; }
.wl-stack { position: relative; margin: 0 10px; padding-top: calc((var(--n) - 1) * 15px); }
.wl-card { position: absolute; left: 0; right: 0; top: calc(var(--i) * 15px); z-index: calc(var(--i) + 1); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.wl-card:not(.front) { cursor: pointer; }
.wl-card:not(.front):hover { transform: translateY(-7px); }
.wl-card .pcard:hover { transform: none; }
.wl-sizer { aspect-ratio: 1.586 / 1; }
.wl-pocket {
  position: absolute; z-index: 60; left: -10px; right: -10px; top: calc((var(--n) - 1) * 15px + 50%); bottom: -14px;
  display: grid; justify-items: center; align-content: center; gap: 1px; border-radius: 16px; color: #ffffff; text-align: center;
  background: linear-gradient(180deg, rgba(58,62,70,.86) 0%, rgba(32,34,40,.96) 55%, #1d1f24 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.06), 0 18px 30px -16px rgba(0,0,0,.55);
}
.wl-pocket::after { content: ""; position: absolute; bottom: 7px; left: 50%; width: 12px; height: 7px; translate: -50% 0; border-radius: 4px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.wl-amt { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.02em; }
.wl-sub { font-size: var(--fs-2xs); color: rgba(255,255,255,.55); }
.wl-pocket .chg { margin-top: 3px; }
/* motion */
@keyframes wl-drop { 0% { transform: translateY(-150%) rotate(-3deg); opacity: 0; } 35% { opacity: 1; } 78% { transform: translateY(7%) rotate(0); } 100% { transform: none; opacity: 1; } }
@keyframes wl-pocket-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.wallet.play .wl-pocket { animation: wl-pocket-in .45s cubic-bezier(.2,.8,.2,1) both; }
.wallet.play .wl-card { animation: wl-drop .75s cubic-bezier(.2,.8,.25,1) both; animation-delay: calc(var(--i) * .28s + .25s); }
.wl-card.swap { animation: wl-drop .6s cubic-bezier(.2,.8,.25,1) both; }
@media (prefers-reduced-motion: reduce) { .wallet.play .wl-card, .wallet.play .wl-pocket, .wl-card.swap { animation: none; } }

/* ---------- Trade cards (Trades → Cards) ---------- */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tc { padding: 10px; border-radius: 22px; background: #eef0f4; box-shadow: 8px 8px 18px rgba(163,170,184,.38), -8px -8px 18px rgba(255,255,255,.9); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tc-photo { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; background: #1d1f24; }
.tc-img { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tc-photo:hover .tc-img img { transform: scale(1.04); }
.tc-img.none { display: grid; place-content: center; text-align: center; color: rgba(255,255,255,.75); cursor: default; background: linear-gradient(135deg, #2a2d34, #15161a); }
.tc-img.none span { font-size: 28px; font-weight: 700; letter-spacing: -.02em; } .tc-img.none small { font-size: var(--fs-2xs); opacity: .6; }
.tc-photo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.tc-top { position: absolute; top: 9px; left: 9px; right: 9px; display: flex; justify-content: space-between; z-index: 1; pointer-events: none; }
.tc-glass { padding: 3px 9px; border-radius: 99px; font-size: var(--fs-2xs); font-weight: 600; color: #fff; background: rgba(20,22,28,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tc-glass.res-win { background: rgba(47,158,68,.75); } .tc-glass.res-loss { background: rgba(229,72,77,.8); }
.tc-cap { position: absolute; left: 14px; right: 12px; bottom: 11px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; color: #fff; pointer-events: none; }
.tc-title { font-size: var(--fs-md, 15px); font-weight: 600; line-height: 1.2; }
.tc-sub { font-size: var(--fs-2xs); color: rgba(255,255,255,.72); margin-top: 2px; }
.tc-pnl { flex: none; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: var(--fs-sm); background: rgba(255,255,255,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tc.loss .tc-pnl { background: rgba(229,72,77,.55); } .tc.win .tc-pnl { background: rgba(47,158,68,.5); }
.tc-body { padding: 12px 14px; border-radius: 16px; background: #eef0f4; box-shadow: inset 4px 4px 9px rgba(163,170,184,.35), inset -4px -4px 9px rgba(255,255,255,.85); display: grid; gap: 10px; }
.tc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-acc { font-size: var(--fs-base); font-weight: 600; color: #3a4150; } .tc-acc span { font-weight: 400; color: #8a92a3; }
.tc-meta { margin-top: 3px; font-size: var(--fs-xs); color: #6b7384; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tc-stars { color: #e0a100; letter-spacing: 1px; } .tc-stars i { font-style: normal; color: #cfd4dc; }
.tc-go { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #4a5263; cursor: pointer; background: #eef0f4; box-shadow: 5px 5px 11px rgba(163,170,184,.5), -5px -5px 11px rgba(255,255,255,.95); transition: box-shadow .2s, transform .2s; }
.tc-go:hover { transform: translateY(-1px); } .tc-go:active { box-shadow: inset 3px 3px 7px rgba(163,170,184,.5), inset -3px -3px 7px rgba(255,255,255,.95); }
.tc-go svg { width: 17px; height: 17px; }
.tc-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding-top: 9px; border-top: 1px solid #d9dde4; }
.tc-stat b { display: block; font-size: var(--fs-sm); font-weight: 600; color: #3a4150; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-stat span { display: block; font-size: 10px; color: #8a92a3; margin-top: 1px; }
.tc-story .tc-k { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8a92a3; }
.tc.loss .tc-story .tc-k { color: #c9474b; } .tc.win .tc-story .tc-k { color: #2f8a40; }
.tc-story p { margin: 3px 0 0; font-size: var(--fs-xs); line-height: 1.45; color: #4f5768; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 520px) { .tc-grid { grid-template-columns: 1fr; } .tc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* trade cards: date badge, numbering, month groups */
.tc-top { align-items: flex-start; }
.tc-top-r { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.tc-date { display: grid; justify-items: center; min-width: 52px; padding: 5px 8px 6px; border-radius: 12px; background: rgba(255,255,255,.92); color: #1d1f24; box-shadow: 0 6px 14px -6px rgba(0,0,0,.45); line-height: 1; }
.tc-date b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.tc-date span { margin-top: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7384; }
.tc-month { display: flex; align-items: baseline; gap: 12px; margin: 22px 4px 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tc-month:first-of-type { margin-top: 4px; }
.tc-month h3 { margin: 0; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; }
.tc-month span { font-size: var(--fs-xs); color: var(--text-3); }
.tsort { white-space: nowrap; }

/* trade cards: compact size */
.tc-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tc { padding: 7px; gap: 7px; border-radius: 16px; box-shadow: 5px 5px 12px rgba(163,170,184,.35), -5px -5px 12px rgba(255,255,255,.9); }
.tc-photo { border-radius: 11px; aspect-ratio: 16 / 9; }
.tc-top { top: 6px; left: 6px; right: 6px; }
.tc-top-r { gap: 3px; }
.tc-glass { padding: 2px 6px; font-size: 9.5px; }
.tc-date { min-width: 38px; padding: 3px 6px 4px; border-radius: 9px; }
.tc-date b { font-size: 15px; }
.tc-date span { font-size: 8px; margin-top: 2px; }
.tc-cap { left: 9px; right: 8px; bottom: 7px; gap: 6px; }
.tc-title { font-size: var(--fs-sm); }
.tc-sub { font-size: 9.5px; }
.tc-pnl { padding: 3px 8px; font-size: var(--fs-xs); }
.tc-body { padding: 8px 10px; gap: 7px; border-radius: 11px; }
.tc-acc { font-size: var(--fs-xs); }
.tc-meta { font-size: 10.5px; margin-top: 2px; }
.tc-meta .pill { padding: 1px 6px; font-size: 10px; }
.tc-go { width: 32px; height: 32px; box-shadow: 3px 3px 8px rgba(163,170,184,.5), -3px -3px 8px rgba(255,255,255,.95); }
.tc-go svg { width: 13px; height: 13px; }
.tc-stats { gap: 4px; padding-top: 6px; }
.tc-stat b { font-size: var(--fs-xs); }
.tc-stat span { font-size: 8.5px; }
.tc-story .tc-k { font-size: 9px; }
.tc-story p { font-size: 10.5px; line-height: 1.4; -webkit-line-clamp: 3; }
.tc-tags .pill { padding: 1px 6px; font-size: 10px; }
.tc-month { margin: 16px 2px 9px; padding-bottom: 6px; }
.tc-month h3 { font-size: var(--fs-base); }

/* trade cards: smooth scrolling (no live blur, fixed image boxes) */
.tc-glass, .tc-pnl { -webkit-backdrop-filter: none; backdrop-filter: none; }
.tc-glass { background: rgba(20,22,28,.72); }
.tc-pnl { background: rgba(20,22,28,.6); }
.tc.loss .tc-pnl { background: rgba(214,58,63,.92); } .tc.win .tc-pnl { background: rgba(43,145,62,.92); }
.tc-photo { contain: paint; background: linear-gradient(135deg, #d9dde4, #c9ced7); transform: translateZ(0); }
.tc-img img { background: transparent; will-change: auto; }
.tc { contain: layout paint; }
.tc-photo::after { inset: 40% 0 0; }
/* pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 2px 4px; flex-wrap: wrap; }
.pg-info { font-size: var(--fs-xs); color: var(--text-3); }
.pg-btns { display: flex; gap: 6px; align-items: center; }
.pg-n { min-width: 32px; height: 32px; padding: 0 9px; border: 0; border-radius: 10px; display: grid; place-items: center; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: #4a5263; cursor: pointer; background: #eef0f4; box-shadow: 3px 3px 7px rgba(163,170,184,.45), -3px -3px 7px rgba(255,255,255,.95); }
.pg-n svg { width: 14px; height: 14px; }
.pg-n:hover:not([disabled]):not(.on) { color: #171717; }
.pg-n.on { color: #fff; background: #171717; box-shadow: none; }
.pg-n[disabled] { opacity: .35; cursor: default; }
.pg-gap { color: var(--text-3); padding: 0 2px; }

@media (min-width: 1240px) { .tc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- Broker accounts ---------- */
.pcard.broker { background: radial-gradient(90% 120% at 90% 110%, color-mix(in srgb, var(--bc) 75%, transparent) 0%, transparent 62%), radial-gradient(60% 80% at 15% 0%, color-mix(in srgb, var(--bc) 35%, transparent) 0%, transparent 70%), linear-gradient(135deg, #1b1d22 0%, #111216 60%, #0a0a0c 100%); }
.pcard.broker .wordmark { -webkit-text-stroke-color: rgba(255,255,255,.16); }
.acc-kind { display: inline-flex; margin-bottom: 4px; }
form.is-broker .prop-only { display: none; }

/* ---------- Track record ---------- */
.rec-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .rec-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-list { display: grid; gap: 8px; max-height: 330px; overflow: auto; padding-right: 4px; }
.an { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: start; padding: 9px 10px; border-radius: 10px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.an .pill { justify-self: start; }
.an b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.an p { margin: 2px 0 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-2); }
.rg { width: 100%; border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.rg th { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 4px; text-align: center; }
.rg tbody th { text-align: left; color: var(--text); font-size: var(--fs-sm); letter-spacing: 0; }
.rg td { padding: 6px 4px; border-radius: 7px; text-align: center; min-width: 54px; }
.rg td b { display: block; font-size: var(--fs-xs); font-weight: 600; color: #171717; }
.rg td span { display: block; font-size: 9.5px; color: rgba(0,0,0,.55); }
.rg td.rg-empty { color: var(--text-3); background: var(--tile); }
.rg td.rg-tot { background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.rg td.rg-tot.win-t b { color: #2f9e44; } .rg td.rg-tot.loss-t b { color: #e5484d; }

/* track record: month calendar */
.rec-cal .panel-head .tools { display: flex; align-items: center; gap: 6px; }
.mc-year { font-size: var(--fs-base); font-weight: 700; min-width: 38px; text-align: center; }
.mc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mc { display: grid; gap: 2px; align-content: center; min-height: 74px; padding: 9px 10px; border: 0; border-radius: 12px; text-align: left; font: inherit; color: #171717; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.mc:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -10px rgba(0,0,0,.35); }
.mc.empty { background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); cursor: default; }
.mc.empty:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line); }
.mc-m { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.mc b { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mc small { font-size: 10px; opacity: .65; font-variant-numeric: tabular-nums; }
.mc-foot { margin-top: 10px; font-size: var(--fs-2xs); color: var(--text-3); }
@media (max-width: 520px) { .mc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Track record v2 ---------- */
.rec-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; margin-bottom: 12px; padding: 22px 24px; border-radius: 20px; overflow: hidden; color: #fff;
  background: radial-gradient(70% 120% at 100% 0%, rgba(47,158,68,.32) 0%, transparent 60%), radial-gradient(50% 80% at 0% 100%, rgba(255,255,255,.07) 0%, transparent 70%), linear-gradient(135deg, #1b1d22 0%, #111215 55%, #0a0a0c 100%);
  box-shadow: 0 24px 40px -26px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.08); }
.rec-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.rh-l, .rh-r { position: relative; min-width: 0; }
.rh-eye { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.rh-eye img { height: 16px; width: auto; opacity: .9; }
.rh-ret { margin-top: 10px; font-size: 46px; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: #9ff0b5; }
.rh-ret.neg { color: #ff9b9e; }
.rh-sub { margin-top: 8px; font-size: var(--fs-sm); color: rgba(255,255,255,.6); }
.rh-sub b { color: #fff; font-weight: 600; }
.rh-ms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.rh-m span { display: block; font-size: var(--fs-2xs); color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; }
.rh-m b { display: block; margin: 3px 0 6px; font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.rh-m i { display: block; height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.rh-m i em { display: block; height: 100%; border-radius: inherit; background: #9ff0b5; }
.rh-m i.red em { background: #ff8a8e; }
.rh-r { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.rh-spark { width: 100%; height: 130px; display: block; }
.rh-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rh-tags span { padding: 4px 10px; border-radius: 99px; font-size: var(--fs-xs); color: rgba(255,255,255,.6); background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rh-tags b { color: #fff; font-weight: 600; margin-left: 3px; font-variant-numeric: tabular-nums; }
.rec-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rs { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 14px; background: var(--surface, #fff); box-shadow: inset 0 0 0 1px var(--line), 0 6px 16px -14px rgba(0,0,0,.4); min-width: 0; }
.rs-i { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tile); color: var(--text-2); }
.rs-i svg { width: 15px; height: 15px; }
.rs > div { min-width: 0; }
.rs span:not(.rs-i) { display: block; font-size: var(--fs-2xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.rs b { display: block; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs small { display: block; font-size: var(--fs-2xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.rec-grid .panel-head .tools b { font-weight: 600; }
/* month tiles v2 */
.mc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; padding: 9px 12px; border-radius: 12px; background: var(--tile); }
.mc-sum span { display: block; font-size: var(--fs-2xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.mc-sum b { font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.mc-grid { gap: 7px; }
.mc, .mc.empty { position: relative; min-height: 70px; padding: 9px 10px 12px; border-radius: 12px; background: var(--surface, #fff); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.mc.up { background: linear-gradient(180deg, rgba(47,158,68,.07), rgba(47,158,68,.02)); box-shadow: inset 0 0 0 1px rgba(47,158,68,.22); }
.mc.down { background: linear-gradient(180deg, rgba(229,72,77,.08), rgba(229,72,77,.02)); box-shadow: inset 0 0 0 1px rgba(229,72,77,.22); }
.mc.up b { color: #2b8a3e; } .mc.down b { color: #d6363b; }
.mc.now { box-shadow: inset 0 0 0 1.5px #171717; }
.mc-m { display: flex; justify-content: space-between; gap: 4px; opacity: 1; color: var(--text-3); }
.mc-m em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; }
.mc b { font-size: var(--fs-lg); }
.mc small { opacity: 1; color: var(--text-3); }
.mc-bar { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 3px; border-radius: 99px; background: rgba(0,0,0,.05); overflow: hidden; }
.mc-bar span { display: block; height: 100%; width: var(--a); border-radius: inherit; background: #2f9e44; }
.mc.down .mc-bar span { background: #e5484d; }
.mc.empty b { color: var(--text-3); }
.mc-foot { display: none; }
/* R distribution */
.rd { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; align-items: end; height: 190px; padding-top: 6px; }
.rd-col { display: grid; grid-template-rows: 16px 1fr 16px; height: 100%; text-align: center; }
.rd-col b { font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.rd-bar { align-self: end; width: 100%; border-radius: 7px 7px 3px 3px; background: #2f9e44; }
.rd-bar.neg { background: #e5484d; } .rd-bar.be { background: #b6b6b6; }
.rd-col small { font-size: var(--fs-2xs); color: var(--text-3); align-self: end; }
/* best / worst days */
.dl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl { display: grid; grid-template-columns: 82px 1fr 64px; gap: 8px; align-items: center; width: 100%; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--text-2); cursor: pointer; text-align: left; }
.dl:hover { background: var(--tile); border-radius: 8px; }
.dl span { font-size: var(--fs-xs); white-space: nowrap; }
.dl i { height: 6px; border-radius: 99px; background: var(--tile); overflow: hidden; }
.dl i em { display: block; height: 100%; border-radius: inherit; background: #2f9e44; }
.dl i em.neg { background: #e5484d; }
.dl b { text-align: right; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .rec-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rec-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .rec-hero { grid-template-columns: 1fr; } .rh-ms { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rec-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dl-cols { grid-template-columns: 1fr; } }

/* track record: slim layout */
.rec-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: stretch; }
.rec-grid > .panel { display: flex; flex-direction: column; }
.rec-grid .dl-cols { grid-template-columns: 1fr; gap: 10px; }
.dl-h { margin: 2px 4px 4px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dl { grid-template-columns: 96px 1fr 70px; padding: 5px 4px; }
.rec-stats { margin-top: 2px; }
@media (max-width: 1100px) { .rec-grid { grid-template-columns: 1fr; } }
.rec-cal .mc-grid { flex: 1; grid-auto-rows: 1fr; }

/* track record: equity route + full-width months */
.rec-route .chart { flex: 1; }
.rec-cal.span-2 .mc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rec-cal.span-2 .mc-sum { grid-template-columns: repeat(4, minmax(0, 160px)); }
@media (max-width: 900px) { .rec-cal.span-2 .mc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* track record: compact size */
.rec-stats { gap: 8px; margin-bottom: 8px; }
.rs { padding: 7px 9px; gap: 8px; border-radius: 11px; }
.rs-i { width: 24px; height: 24px; border-radius: 7px; }
.rs-i svg { width: 12px; height: 12px; }
.rs span:not(.rs-i) { font-size: 8px; }
.rs b { font-size: var(--fs-md); }
.rs small { font-size: 8.5px; }
.rec-grid { gap: 8px; }
.rec-grid > .panel { padding: 10px 12px; }
.rec-grid .panel-head { margin-bottom: 4px; }
.rec-grid .panel-head h2 { font-size: var(--fs-base); }
.rec-grid .panel-head .tools, .rec-grid .tab { font-size: var(--fs-xs); }
.rec-grid .panel-head .ico { width: 20px; height: 20px; }
.rec-route .chart { max-height: 210px; width: 100%; }
.dl-h { font-size: 8px; margin: 0 4px 2px; }
.dl { grid-template-columns: 84px 1fr 58px; padding: 3px 4px; }
.dl span { font-size: 9.5px; }
.dl i { height: 4px; }
.dl b { font-size: var(--fs-xs); }
.rec-grid .dl-cols { gap: 6px; }
.mc-sum { padding: 6px 10px; margin-bottom: 7px; border-radius: 9px; }
.mc-sum span { font-size: 8px; }
.mc-sum b { font-size: var(--fs-sm); }
.mc, .mc.empty { min-height: 0; padding: 6px 8px 9px; border-radius: 9px; gap: 1px; }
.mc-grid, .rec-cal .mc-grid { gap: 6px; }
.mc-m { font-size: 8px; }
.mc b { font-size: var(--fs-md); }
.mc small { font-size: 8.5px; }
.mc-bar { bottom: 4px; left: 8px; right: 8px; height: 2px; }
.mc-year { font-size: var(--fs-sm); }
.rec-cal .iconbtn { width: 20px; height: 20px; }
.rec-route .chart { max-height: none; }
.rec-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* ---------- Track record: neumorphic calendar ---------- */
.rec-neu { --nb: #eceef3; background: var(--nb) !important; box-shadow: 10px 10px 24px rgba(166,171,189,.45), -10px -10px 24px rgba(255,255,255,.9) !important; border: 0; padding: 18px 20px !important; }
.nc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.nc-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #3b3f4a; background: var(--nb);
  box-shadow: 5px 5px 11px rgba(166,171,189,.55), -5px -5px 11px rgba(255,255,255,.95); transition: box-shadow .15s; }
.nc-btn svg { width: 15px; height: 15px; }
.nc-btn:active { box-shadow: inset 3px 3px 7px rgba(166,171,189,.55), inset -3px -3px 7px rgba(255,255,255,.95); }
.nc-pill { position: relative; display: flex; align-items: center; height: 40px; padding: 0 16px 0 22px; border-radius: 99px; background: var(--nb); color: #2b2f38;
  box-shadow: 5px 5px 11px rgba(166,171,189,.55), -5px -5px 11px rgba(255,255,255,.95); cursor: pointer; }
.nc-pill select { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; font-size: var(--fs-lg); font-weight: 500; color: inherit; cursor: pointer; outline: 0; padding-right: 26px; }
.nc-pill svg { position: absolute; right: 14px; width: 15px; height: 15px; pointer-events: none; }
.nc-month { margin-left: 10px; min-width: 170px; } .nc-month select { width: 100%; text-align: center; }
.nc-sum { margin-left: auto; display: grid; justify-items: end; line-height: 1.25; }
.nc-sum span { font-size: var(--fs-lg); font-weight: 700; }
.nc-sum em { font-style: normal; font-size: var(--fs-xs); color: #8a90a0; }
.nc-card { padding: 14px 16px 10px; border-radius: 18px; background: var(--nb); box-shadow: 8px 8px 18px rgba(166,171,189,.45), -8px -8px 18px rgba(255,255,255,.9); }
.nc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.nc-dow { text-align: center; padding: 4px 0 8px; font-size: var(--fs-sm); font-weight: 500; letter-spacing: .06em; color: #3b3f4a; }
.nc-day { position: relative; justify-self: center; display: grid; justify-items: center; align-content: center; width: 52px; height: 46px; border: 0; border-radius: 50%; background: none; font: inherit; color: #2b2f38; cursor: pointer; transition: box-shadow .15s; }
.nc-n { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.nc-day.out { color: #c3c7d1; }
.nc-day:hover:not(.out) { box-shadow: 4px 4px 9px rgba(166,171,189,.45), -4px -4px 9px rgba(255,255,255,.95); border-radius: 14px; }
.nc-day.today { border-radius: 50%; width: 46px; box-shadow: inset 3px 3px 7px rgba(166,171,189,.55), inset -3px -3px 7px rgba(255,255,255,.95); font-weight: 600; }
.nc-dot { width: 5px; height: 5px; margin-top: 3px; border-radius: 50%; background: #b6b6b6; }
.nc-day.win .nc-dot { background: #3fbf5f; } .nc-day.loss .nc-dot { background: #f2a33a; }
.nc-day.loss .nc-dot { background: #e5484d; }
.nc-day small { position: absolute; bottom: -4px; font-size: 8.5px; font-weight: 600; white-space: nowrap; }
.nc-day.win small { color: #2f9e44; } .nc-day.loss small { color: #e5484d; } .nc-day.be small { color: #8a90a0; }
.nc-day.win .nc-n, .nc-day.loss .nc-n { font-weight: 600; }
@media (max-width: 640px) { .nc-day { width: 38px; height: 40px; } .nc-month { min-width: 130px; margin-left: 0; } .nc-sum { margin-left: 0; } }

/* track record calendar: compact + same colours as the dashboard */
.rec-neu { --nb: var(--surface, #ffffff); background: var(--surface, #ffffff) !important; box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.04)), inset 0 0 0 1px var(--line) !important; padding: 10px 12px !important; display: flex; flex-direction: column; }
.rec-neu .nc { display: flex; flex-direction: column; flex: 1; }
.nc-top { gap: 7px; margin-bottom: 8px; }
.nc-btn { width: 26px; height: 26px; background: var(--tile); box-shadow: 2px 2px 5px rgba(0,0,0,.08), -2px -2px 5px #ffffff; }
.nc-btn svg { width: 12px; height: 12px; }
.nc-btn:active { box-shadow: inset 2px 2px 4px rgba(0,0,0,.1), inset -2px -2px 4px #ffffff; }
.nc-pill { height: 28px; padding: 0 10px 0 13px; background: var(--tile); box-shadow: 2px 2px 5px rgba(0,0,0,.08), -2px -2px 5px #ffffff; }
.nc-pill select { font-size: var(--fs-base); padding-right: 20px; }
.nc-pill svg { right: 9px; width: 12px; height: 12px; }
.nc-month { margin-left: 4px; min-width: 112px; }
.nc-sum span { font-size: var(--fs-md); }
.nc-sum em { font-size: 9px; color: var(--text-3); }
.nc-card { flex: 1; padding: 6px 8px 4px; border-radius: 12px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.nc-grid { row-gap: 1px; }
.nc-dow { padding: 2px 0 4px; font-size: 8.5px; color: var(--text-3); }
.nc-day { width: 34px; height: 30px; color: var(--text); }
.nc-n { font-size: var(--fs-sm); }
.nc-day.out { color: #c9c9c9; }
.nc-day:hover:not(.out) { border-radius: 9px; background: #ffffff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.nc-day.today { width: 30px; background: #ffffff; box-shadow: inset 2px 2px 4px rgba(0,0,0,.1), inset -2px -2px 4px #ffffff; }
.nc-dot { width: 4px; height: 4px; margin-top: 1px; }
.nc-day small { bottom: -3px; font-size: 7.5px; }
.rec-days .dl-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .rec-days .dl-cols { grid-template-columns: 1fr; } }
.nc-card { display: flex; }
.nc-grid { flex: 1; grid-template-rows: auto repeat(6, 1fr); }
.nc-day { height: 100%; min-height: 30px; align-content: center; gap: 0; }
.nc-day small { position: static; margin-top: 1px; line-height: 1; }
.nc-dot { display: none; }

/* ---------- one trade on several accounts ---------- */
.jt-accs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; }
.jt-accs-l { display: inline-flex; align-items: center; gap: 4px; margin-right: 2px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.jt-accs-l svg { width: 12px; height: 12px; }
.acc-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border: 0; border-radius: 99px; font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.acc-chip span { color: var(--text-3); font-weight: 400; }
.acc-chip svg { width: 12px; height: 12px; }
.acc-chip:hover { color: var(--text); }
.acc-chip.on { background: #171717; color: #ffffff; box-shadow: none; }
.acc-chip.on span { color: rgba(255,255,255,.65); }
.acc-chip.all { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2, rgba(0,0,0,.14)); }
.acc-chip.all.on { background: #171717; color: #fff; }
.jt-accs-n { font-style: normal; font-size: var(--fs-xs); color: #2f9e44; font-weight: 600; margin-left: 4px; }
.acc-tags button.on { background: #171717; color: #fff; }
.tc-glass svg { width: 10px; height: 10px; vertical-align: -1px; }

/* account picker popup */
.ap-sub { margin: -4px 0 12px; font-size: var(--fs-sm); color: var(--text-3); }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; max-height: 52vh; overflow: auto; padding: 4px; }
.ap-card { position: relative; display: grid; gap: 7px; padding: 7px; border: 0; border-radius: 16px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: box-shadow .15s, transform .15s; }
.ap-card:hover { transform: translateY(-2px); }
.ap-card .pcard { pointer-events: none; }
.ap-card.on { background: #ffffff; box-shadow: inset 0 0 0 2px #171717, 0 10px 20px -14px rgba(0,0,0,.5); }
.ap-check { position: absolute; top: 13px; left: 13px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.25); color: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.ap-check svg { width: 13px; height: 13px; }
.ap-card.on .ap-check { background: #2f9e44; color: #fff; box-shadow: none; }
.ap-name { padding: 0 4px 2px; font-size: var(--fs-xs); color: var(--text-3); }
.ap-name b { display: block; font-size: var(--fs-sm); color: var(--text); font-weight: 600; }
.jt-accs-l { border: 0; background: none; cursor: pointer; padding: 0; font: inherit; font-size: var(--fs-2xs); }
.jt-accs-l:hover { color: var(--text); }
.ap-card:focus:not(:focus-visible) { outline: none; }

/* ---------- journal: account selector (v2) ---------- */
.jta { margin: -2px 0 12px; padding: 8px; border-radius: 14px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.jta-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 8px; }
.jta-t { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.jta-t svg { width: 12px; height: 12px; }
.jta-count { font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.jta-count b { color: var(--text); font-weight: 700; }
.jta-all { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); cursor: pointer; padding: 0; }
.jta-all i { position: relative; width: 28px; height: 16px; border-radius: 99px; background: #d4d4d4; transition: background .2s; }
.jta-all i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.jta-all.on i { background: #2f9e44; } .jta-all.on i::after { transform: translateX(12px); }
.jta-more { width: 24px; height: 24px; border: 0; border-radius: 8px; display: grid; place-items: center; background: #fff; color: var(--text-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.jta-all + .jta-more { margin-left: 4px; } .jta-count + .jta-more { margin-left: auto; }
.jta-more svg { width: 13px; height: 13px; }
.jta-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.jta-acc { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 6px 30px 6px 6px; border: 0; border-radius: 11px; background: transparent; font: inherit; text-align: left; color: var(--text); cursor: pointer; box-shadow: inset 0 0 0 1px transparent; transition: background .15s, box-shadow .15s, opacity .15s; opacity: .62; }
.jta-acc:hover { opacity: 1; background: rgba(255,255,255,.6); }
.jta-acc.on { opacity: 1; background: #ffffff; box-shadow: inset 0 0 0 1.5px #171717, 0 6px 14px -10px rgba(0,0,0,.45); }
.pcard.jta-art { flex: none; width: 46px; height: 29px; aspect-ratio: auto; border-radius: 6px; box-shadow: 0 3px 8px -4px rgba(0,0,0,.5); display: grid; place-items: center; }
.pcard.jta-art:hover { transform: none; }
.pcard.jta-art em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .02em; color: rgba(255,255,255,.85); }
.pcard.jta-art.has-art em { display: none; }
.jta-txt { min-width: 0; display: grid; line-height: 1.25; }
.jta-txt b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jta-txt small { font-size: var(--fs-2xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jta-ck { position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px #c9c9c9; color: transparent; background: #fff; }
.jta-ck svg { width: 10px; height: 10px; }
.jta-acc.on .jta-ck { background: #2f9e44; box-shadow: none; color: #fff; }

/* one trade on several accounts: shown once with account badges */
.acc-stack { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.pcard.jta-art.mini { width: 26px; height: 17px; border-radius: 4px; box-shadow: 0 0 0 1.5px #fff, 0 2px 5px -2px rgba(0,0,0,.5); }
.acc-stack .pcard.jta-art.mini + .pcard.jta-art.mini { margin-left: -8px; }
.pcard.jta-art.mini em { font-size: 7px; }
.acc-more { margin-left: 3px; font-size: var(--fs-2xs); font-weight: 600; color: var(--text-3); align-self: center; }
.txn-accs { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: 12px; padding: 3px 9px 3px 5px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.txn-accs b { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.tamt small { display: block; font-size: 9px; font-weight: 500; color: var(--text-3); text-align: right; }
.acc-cell { display: inline-flex; align-items: center; font-weight: 600; color: var(--text); }
.tc-acc .acc-stack { margin-right: 6px; }
.tc-pnl small { font-size: .78em; opacity: .85; }

/* per-account P&L */
.jta-acc { padding: 0; flex-direction: column; align-items: stretch; gap: 0; }
.jta-acc.has-pnl { padding-bottom: 6px; }
.jta-hit { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; padding: 6px 30px 6px 6px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.jta-acc .jta-ck { right: 8px; top: 21px; translate: 0 -50%; }
.jta-pnl { display: flex; align-items: center; gap: 6px; margin: 0 6px; padding: 0 8px; height: 28px; border-radius: 8px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); cursor: text; }
.jta-pnl span { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .04em; color: var(--text-3); white-space: nowrap; }
.jta-pnl input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font: inherit; font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }
.jta-pnl.pos { box-shadow: inset 0 0 0 1.5px rgba(47,158,68,.45); } .jta-pnl.pos input { color: #2f9e44; }
.jta-pnl.neg { box-shadow: inset 0 0 0 1.5px rgba(229,72,77,.45); } .jta-pnl.neg input { color: #e5484d; }
.jta-pnl:focus-within { box-shadow: inset 0 0 0 1.5px #171717; }
.jta-hint { display: block; font-style: normal; font-size: var(--fs-2xs); color: var(--text-3); margin-top: 1px; }
.jta-head { align-items: flex-start; }
.tc-split { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-split span { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 7px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px #d9dde4; font-size: 10px; }
.tc-split i { font-style: normal; color: #8a92a3; } .tc-split b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* entry / SL / TP that look like typos */
input[data-jfield].bad, input[data-hhmm].bad { box-shadow: inset 0 0 0 1.5px #e5484d !important; background: #fff5f5 !important; color: #c92a2a; }
.pill.lvl-warn { background: #fff4e5; color: #b35c00; box-shadow: inset 0 0 0 1px #ffd8a8; }
.lvl-bad { color: #b35c00; font-weight: 600; }

/* card top row: one aligned line */
.tc-top { align-items: center; gap: 6px; }
.tc-top-r { flex-wrap: nowrap; align-items: center; min-width: 0; }
.tc-glass { white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; line-height: 1.3; }
.tc-date { flex: none; }
.tc-date span { white-space: nowrap; }

/* trade row: multi-account, tidy */
.txn .tbody { flex: 1; }
.txn .tname { display: flex; align-items: center; gap: 6px; }
.txn .tname > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.txn .txn-accs { flex: none; margin: 0; padding: 1px 6px 1px 3px; gap: 1px; font-size: var(--fs-2xs); font-weight: 600; color: var(--text-2); }
.txn .txn-accs .acc-stack { margin-right: 3px; }
.txn .txn-accs .pcard.jta-art.mini { width: 20px; height: 13px; border-radius: 3px; }
.txn .txn-accs .pcard.jta-art.mini + .pcard.jta-art.mini { margin-left: -7px; }
.txn .tamt { flex: none; flex-direction: column; align-items: flex-end; gap: 0; }
.txn .tamt .tv { display: inline-flex; align-items: center; gap: 4px; }
.txn .tamt small { font-size: 9px; font-weight: 500; color: var(--text-3); white-space: nowrap; line-height: 1.2; }

.txn .tamt small { display: inline-flex; align-items: center; gap: 3px; margin-top: 1px; }
.txn .tamt small .acc-stack { margin-right: 1px; }
.txn .tamt small .pcard.jta-art.mini { width: 16px; height: 11px; border-radius: 3px; box-shadow: 0 0 0 1px #fff; }
.txn .tamt small .pcard.jta-art.mini + .pcard.jta-art.mini { margin-left: -6px; }
.txn .tamt small .pcard.jta-art.mini em { font-size: 5px; }

/* ---------- firm rules in the account form ---------- */
.acc-rules { margin-top: 4px; padding: 10px 12px 2px; border-radius: 12px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.acc-rules-h { margin-bottom: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--text); }
.acc-rules-h small { margin-left: 6px; font-weight: 400; color: var(--text-3); }
form.is-broker .acc-rules { display: none; }

/* ---------- costs & payouts ---------- */
.panel.money { margin-top: 16px; }
.money-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.money-head h2 { margin: 0; font-size: var(--fs-md); }
.money-head .sub { font-size: var(--fs-xs); color: var(--text-3); }
.money-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.money-kpis > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.money-kpis span { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.money-kpis b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.money-kpis small { font-size: var(--fs-2xs); color: var(--text-3); }
.money-kpis .big { background: #171717; box-shadow: none; } .money-kpis .big span, .money-kpis .big small { color: #a3a3a3; }
.money-kpis .big b.win-t { color: #5fd37a; } .money-kpis .big b.loss-t { color: #ff6b6f; } .money-kpis .big b:not(.win-t):not(.loss-t) { color: #fff; }
.money-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.money-acc span { display: inline-flex; gap: 6px; align-items: baseline; padding: 3px 9px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); }
.money-acc i { font-style: normal; color: var(--text-3); } .money-acc b { font-weight: 600; font-variant-numeric: tabular-nums; }
.money-list { margin-top: 10px; display: grid; gap: 4px; }
.money-row { display: grid; grid-template-columns: 58px auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--tile); font-size: var(--fs-sm); }
.money-row .mr-date { color: var(--text-3); font-size: var(--fs-xs); }
.money-row .mr-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-row .mr-what i { font-style: normal; color: var(--text-3); }
.money-row b { font-weight: 600; }
.mr-btns { display: flex; gap: 2px; }
.mr-btns button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--text-3); cursor: pointer; }
.mr-btns button:hover { background: #fff; color: var(--text); } .mr-btns button.del.armed { background: #e5484d; color: #fff; }
.mr-btns svg { width: 13px; height: 13px; }
.pill.mint { background: #e6f6ea; color: #2f9e44; }
@media (max-width: 640px) { .money-kpis { grid-template-columns: 1fr; } .money-row { grid-template-columns: auto 1fr auto; } .money-row .pill, .money-row .mr-date { display: none; } }

/* ---------- auto-backup ---------- */
.bk-dot { width: 7px; height: 7px; border-radius: 50%; background: #a3a3a3; flex: none; }
.bk-btn { display: inline-flex; align-items: center; gap: 7px; }
.bk-btn.on .bk-dot, .bk-status.on .bk-dot { background: #2f9e44; box-shadow: 0 0 0 3px rgba(47,158,68,.18); }
.bk-btn.paused .bk-dot, .bk-status.paused .bk-dot, #bk-bar .bk-dot { background: #f59f00; box-shadow: 0 0 0 3px rgba(245,159,0,.2); }
#bk-bar { position: fixed; left: 50%; bottom: 18px; translate: -50% 0; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 7px 7px 7px 14px; border-radius: 99px; background: #171717; color: #fff; font-size: var(--fs-sm); box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); }
#bk-bar button { border: 0; border-radius: 99px; padding: 5px 12px; background: #fff; color: #171717; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
#bk-bar .bk-x { padding: 0; width: 24px; height: 24px; display: grid; place-items: center; background: transparent; color: #a3a3a3; }
#bk-bar .bk-x svg { width: 12px; height: 12px; }
.bk-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.bk-status > div { flex: 1; display: grid; } .bk-status b { font-size: var(--fs-sm); } .bk-status small { font-size: var(--fs-xs); color: var(--text-3); }
.bk-p { margin: 12px 0 0; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }
.bk-p.muted { color: var(--text-3); font-size: var(--fs-xs); }
.bk-ul { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.6; }

/* ---------- costs & payouts v2 ---------- */
.panel.mny { margin-top: 16px; display: grid; grid-template-columns: 300px 1fr; gap: 14px; padding: 12px; }
.mny-sum { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: #171717; color: #fff; }
.mny-h h2 { margin: 0; font-size: var(--fs-md); color: #fff; }
.mny-h span { font-size: var(--fs-2xs); color: #8a8a8a; }
.mny-net { display: grid; gap: 2px; }
.mny-net small { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8a8a8a; }
.mny-net b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.1; }
.mny-net b.win-t { color: #5fd37a; } .mny-net b.loss-t { color: #ff6b6f; }
.mny-net em { font-style: normal; font-size: var(--fs-xs); color: #a3a3a3; }
.mny-bar { display: flex; gap: 3px; height: 6px; }
.mny-bar i { min-width: 6px; border-radius: 99px; } .mny-bar .out { background: #ff6b6f; } .mny-bar .in { background: #5fd37a; }
.mny-io { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.mny-io > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
.mny-io small { font-size: var(--fs-2xs); color: #a3a3a3; }
.mny-io b { grid-column: 1 / -1; font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.mny .dot { width: 6px; height: 6px; border-radius: 50%; } .mny .dot.out { background: #ff6b6f; } .mny .dot.in { background: #5fd37a; }
.mny-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 2px 0; }
.mny-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.mq { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px 0 9px; border: 0; border-radius: 99px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--text); cursor: pointer; transition: background .15s, box-shadow .15s; }
.mq svg { width: 13px; height: 13px; color: #e5484d; }
.mq.in svg { color: #2f9e44; }
.mq:hover { background: #fff; box-shadow: inset 0 0 0 1px #171717; }
.mny-acc { display: flex; flex-wrap: wrap; gap: 6px; }
.mny-acc span { display: inline-flex; gap: 6px; padding: 2px 9px; border-radius: 99px; background: var(--tile); font-size: var(--fs-xs); }
.mny-acc i { font-style: normal; color: var(--text-3); } .mny-acc b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mny-list { display: grid; gap: 4px; max-height: 236px; overflow: auto; }
.mny-row { display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--tile); }
.mr-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.mr-ic.out { background: #fdecec; color: #e5484d; } .mr-ic.in { background: #e6f6ea; color: #2f9e44; }
.mr-t { min-width: 0; display: grid; line-height: 1.3; }
.mr-t b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-t b i { font-style: normal; font-weight: 400; color: var(--text-3); }
.mr-t small { font-size: var(--fs-2xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-v { font-size: var(--fs-sm); font-weight: 600; }
.mny-empty { flex: 1; display: grid; place-content: center; gap: 4px; padding: 18px; border-radius: 12px; border: 1.5px dashed var(--line); text-align: center; }
.mny-empty b { font-size: var(--fs-sm); } .mny-empty span { max-width: 420px; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.5; }
@media (max-width: 760px) { .panel.mny { grid-template-columns: 1fr; } }

/* ---------- costs & payouts v3 — monochrome ---------- */
.mny3 { margin-top: 16px; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: stretch; }
.mny-card { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 16px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 90% at 85% 10%, #262626 0%, #121212 55%, #0b0b0b 100%); box-shadow: 0 18px 40px -22px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.06); }
.mny-card::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 380px; height: 380px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(255,255,255,.05) 0 1px, transparent 1px 34px); }
.mny-top { position: relative; display: flex; align-items: center; gap: 10px; }
.mny-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(160deg, #2b2b2b, #161616); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.mny-ico svg { width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.6)); }
.mny-top > div { flex: 1; display: grid; line-height: 1.25; }
.mny-top b { font-size: var(--fs-md); font-weight: 600; } .mny-top small { font-size: var(--fs-xs); color: #8f8f8f; }
.mny-eye { width: 34px; height: 30px; border: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.mny-eye:hover { background: rgba(255,255,255,.14); } .mny-eye svg { width: 16px; height: 16px; }
.mny-big { position: relative; margin-top: 18px; font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(255,255,255,.35); }
.mny-big span { font-size: 22px; font-weight: 600; color: #cfcfcf; margin-left: 2px; }
.mny-chg { position: relative; margin-top: 8px; font-size: var(--fs-sm); font-weight: 600; color: #e5e5e5; }
.mny-chg span { color: #bdbdbd; }
.mny-line { position: relative; display: block; width: calc(100% + 32px); height: 92px; margin: 6px -16px 0; overflow: visible; }
.mny-line .ln { filter: drop-shadow(0 0 4px rgba(255,255,255,.9)) drop-shadow(0 0 10px rgba(255,255,255,.45)); }
.mny-line .end { filter: drop-shadow(0 0 6px #fff); }
.mny-tiles { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mny-tiles > div { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.mny-tiles .t-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.mny-tiles .t-ic svg { width: 14px; height: 14px; color: #fff; }
.mny-tiles small { display: block; font-size: var(--fs-2xs); color: #9a9a9a; } .mny-tiles b { font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; }
.mny-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mny-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.mny-tab, .mny-add { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px 0 13px; border: 0; border-radius: 99px; background: #fff; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--text); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px -12px rgba(0,0,0,.4); transition: background .15s, box-shadow .15s; }
.mny-tab svg, .mny-add svg { width: 15px; height: 15px; }
.mny-tab em { font-style: normal; font-size: var(--fs-2xs); font-weight: 600; min-width: 18px; padding: 1px 6px; border-radius: 99px; background: var(--tile); color: var(--text-3); text-align: center; }
.mny-tab.on { background: #171717; color: #fff; box-shadow: 0 8px 18px -10px rgba(0,0,0,.6); } .mny-tab.on em { background: rgba(255,255,255,.15); color: #fff; }
.mny-tab:not(.on):hover { box-shadow: inset 0 0 0 1px #171717; }
.mny-add { margin-left: auto; background: #171717; color: #fff; box-shadow: 0 8px 18px -10px rgba(0,0,0,.6); }
.mny-add:hover { background: #000; }
.mny-box { flex: 1; display: flex; flex-direction: column; padding: 14px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -24px rgba(0,0,0,.5); }
.mny-box-h { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.mny-box-h b { display: block; font-size: var(--fs-md); } .mny-box-h small { font-size: var(--fs-xs); color: var(--text-3); }
.mny-rows { display: grid; max-height: 260px; overflow: auto; }
.mny-r { display: grid; grid-template-columns: 38px 1fr auto auto 24px 16px; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.mny-r + .mny-r { box-shadow: 0 -1px 0 var(--line); }
.mny-r:hover { background: var(--tile); box-shadow: none; } .mny-r:hover + .mny-r { box-shadow: none; }
.r-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; background: #ededed; color: #3a3a3a; }
.r-ic.in { background: #171717; color: #fff; box-shadow: 0 0 0 3px rgba(23,23,23,.08), 0 6px 14px -6px rgba(0,0,0,.6); }
.r-t { min-width: 0; display: grid; line-height: 1.3; }
.r-t b { font-size: var(--fs-base); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .r-t b i { font-style: normal; font-weight: 400; color: var(--text-3); }
.r-t small { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; }
.r-t small svg { width: 12px; height: 12px; flex: none; }
.r-st { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.r-st svg { width: 12px; height: 12px; }
.r-v { min-width: 84px; text-align: right; font-size: var(--fs-md); font-weight: 600; color: #8a8a8a; }
.r-v.in { color: #111; font-weight: 700; }
.r-del { width: 24px; height: 24px; border: 0; border-radius: 7px; display: grid; place-items: center; background: none; color: var(--text-3); cursor: pointer; opacity: 0; transition: opacity .15s; }
.mny-r:hover .r-del { opacity: 1; } .r-del:hover { background: #fff; color: var(--text); } .r-del.armed { opacity: 1; background: #171717; color: #fff; }
.r-del svg { width: 12px; height: 12px; }
.r-go svg { width: 14px; height: 14px; color: var(--text-3); }
.mny-none { flex: 1; display: grid; place-items: center; padding: 22px; border-radius: 14px; border: 1.5px dashed var(--line); font-size: var(--fs-sm); color: var(--text-3); text-align: center; }
@media (max-width: 900px) { .mny3 { grid-template-columns: 1fr; } .r-st { display: none; } .mny-r { grid-template-columns: 38px 1fr auto 24px; } .r-go { display: none; } }

.r-st { min-width: 96px; justify-content: center; }

/* ---------- XRAY STUDIO link ---------- */
.editor-top { gap: 8px; }
.editor-top .date-big { margin-right: auto; }
.st-send { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 4px; border: 0; border-radius: 99px; background: #171717; color: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; box-shadow: 0 6px 14px -8px rgba(0,0,0,.6); transition: background .15s; }
.st-send:hover { background: #000; }
.st-send svg { width: 12px; height: 12px; }
.st-send.sent { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.st-send.sent .st-logo { background: #171717; color: #fff; }
.st-logo { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #171717; font-size: 11px; font-weight: 800; letter-spacing: -.02em; }
.st-logo.big { width: 40px; height: 40px; border-radius: 12px; background: #171717; color: #fff; font-size: 18px; box-shadow: 0 0 18px rgba(0,0,0,.25); }
.st-hero { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.st-hero > div { flex: 1; display: grid; } .st-hero b { font-size: var(--fs-md); } .st-hero small { font-size: var(--fs-xs); color: var(--text-3); }
.st-chip { padding: 3px 10px; border-radius: 99px; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #e5e5e5; color: var(--text-2); }
.st-chip.on { background: #171717; color: #fff; }
.st-modal code { font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--tile); }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.st-grid > div { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--tile); }
.st-grid small { font-size: var(--fs-2xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; } .st-grid b { font-size: 20px; }
.st-auto { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.st-auto input { width: 16px; height: 16px; accent-color: #171717; }
.st-auto span { display: grid; } .st-auto b { font-size: var(--fs-sm); } .st-auto small { font-size: var(--fs-xs); color: var(--text-3); }

.editor-top { display: flex; align-items: center; }
.editor-top .date-big { margin-right: 0; }
.editor-top .st-send { margin-left: auto; }
.editor-top .st-send + #saved { margin-left: 0; }

/* ---------- login ---------- */
#login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.lg-card { width: min(380px, 100%); display: grid; gap: 12px; padding: 28px 26px; border-radius: 22px; background: #fff; box-shadow: 0 30px 60px -30px rgba(0,0,0,.35), inset 0 0 0 1px var(--line); }
.lg-logo { height: 34px; width: auto; justify-self: start; margin-bottom: 6px; }
.lg-card h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.lg-sub, .lg-foot { margin: 0; font-size: var(--fs-sm); color: var(--text-3); }
.lg-foot { font-size: var(--fs-xs); text-align: center; }
.lg-err { margin: 0; min-height: 1.2em; font-size: var(--fs-sm); color: #c92a2a; }
.lg-btn { width: 100%; justify-content: center; height: 42px; }

/* ---------- welcome + account in the top bar ---------- */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.who { display: flex; align-items: center; gap: 8px; }
.who:empty { display: none; }
.who-hi { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.who-hi b { color: var(--text); font-weight: 600; }
.who-sync { width: 8px; height: 8px; border-radius: 50%; background: #171717; }
.who-sync.saving { background: #a3a3a3; animation: whoPulse 1s ease-in-out infinite; }
.who-sync.offline { background: #f59f00; }
@keyframes whoPulse { 50% { opacity: .35; } }
.who-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border: 0; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.who-btn svg { width: 12px; height: 12px; }
.who-btn:hover, .who-btn.on { background: #171717; color: #fff; box-shadow: none; }
@media (max-width: 1100px) { .who-hi { display: none; } }

/* ---------- clients (admin) ---------- */
.cl-grid { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.cl-new { display: grid; gap: 10px; }
.cl-new h2, .cl-listp h2 { margin: 0; font-size: var(--fs-md); }
.cl-new .sub { margin: 0; font-size: var(--fs-xs); color: var(--text-3); }
.cl-pw { display: flex; gap: 6px; } .cl-pw input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; }
.cl-err { margin: 0; min-height: 1em; font-size: var(--fs-sm); color: #c92a2a; }
.cl-done { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: #171717; color: #fff; font-size: var(--fs-sm); }
.cl-done code { font-family: ui-monospace, Menlo, monospace; background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 5px; user-select: all; }
.cl-done small { color: #a3a3a3; }
.cl-listp { display: grid; gap: 10px; min-width: 0; }
#cl-list { display: grid; gap: 6px; }
.cl-row { display: grid; grid-template-columns: 36px minmax(0, 1.4fr) 90px 90px 70px auto; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; background: var(--tile); }
.cl-row.off { opacity: .6; }
.cl-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #171717; color: #fff; font-size: 12px; font-weight: 700; }
.cl-t { min-width: 0; display: grid; } .cl-t b { font-size: var(--fs-sm); } .cl-t small { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-m { display: grid; font-size: var(--fs-xs); color: var(--text-2); } .cl-m small { font-size: var(--fs-2xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.cl-st { justify-self: start; padding: 2px 8px; border-radius: 99px; font-size: var(--fs-2xs); font-weight: 600; background: #171717; color: #fff; }
.cl-row.off .cl-st { background: #e5e5e5; color: var(--text-2); }
.cl-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1000px) { .cl-grid { grid-template-columns: 1fr; } .cl-row { grid-template-columns: 36px 1fr auto; } .cl-m { display: none; } .cl-btns { grid-column: 1 / -1; justify-content: flex-start; } }

/* clients form: icon size + hidden result box */
.btn > svg { width: 16px; height: 16px; flex: none; }
.cl-done[hidden] { display: none; }
.cl-new > .btn.sky { margin-top: 4px; }

/* trade result: TP / SL / BE */
.out-seg button.on.o-tp { background: var(--gain); color: #fff; }
.out-seg button.on.o-sl { background: var(--loss); color: #fff; }
.out-seg button.on.o-be { background: var(--text); color: #fff; }
.modal .out-seg, form .field > .out-seg { display: flex; } form .field > .out-seg button { flex: 1; padding: 7px 10px; }
.pill.out-tp { background: var(--gain-soft, #e9f7ef); color: var(--gain); }
.pill.out-sl { background: var(--loss-soft, #fdeceb); color: var(--loss); }
.pill.out-be { background: var(--text); color: #fff; }
.jt-head { flex-wrap: wrap; row-gap: 8px; }
.jt-head .seg.sm:not(.out-seg) { margin-right: 0; }
.jt-head .out-seg { margin-right: auto; }
.jt-head .out-lbl { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-left: 6px; }
