/* TraderMemo journal app */
body.app {
  display: grid; grid-template-columns: 248px 1fr; min-height: 100vh;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(143, 124, 255, .10), transparent 60%),
    radial-gradient(700px 400px at 20% -10%, rgba(90, 169, 255, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.side svg, .icon-btn svg, svg.i, .search svg, .drop svg, .ico-line {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
svg.i { width: 18px; height: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pos { color: var(--win); } .neg { color: var(--loss); }
kbd {
  font: 600 11.5px/1 var(--font); padding: 3px 6px; border-radius: 6px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; background: rgba(255, 255, 255, .05); color: var(--text);
}

/* ---------- sidebar ---------- */
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 22px 16px; border-right: 1px solid var(--line);
  background: rgba(8, 12, 38, .6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.side .brand { padding: 4px 10px 26px; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tabs button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border-radius: 11px; border: 1px solid transparent;
  background: none; color: var(--muted); font-weight: 500; font-size: 14.5px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.tabs button svg { width: 19px; height: 19px; flex: none; }
.tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.tabs button.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(90, 169, 255, .16), rgba(194, 123, 255, .12));
  border-color: rgba(148, 163, 255, .22);
}
.tabs button.active svg { stroke: #B9C2FF; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.backup-nudge {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--muted); transition: border-color .15s, background .15s;
}
.backup-nudge:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .05); }
.backup-nudge svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.backup-nudge span { display: flex; flex-direction: column; min-width: 0; }
.backup-nudge b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backup-nudge small { font-size: 11.5px; color: #B9C2FF; font-weight: 600; }
.backup-nudge.due { border-color: rgba(255, 196, 87, .4); background: rgba(255, 196, 87, .08); color: #FFD27A; }
.backup-nudge.due small { color: #FFE2A6; }
.backup-strip { display: none; }
.me {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: border-color .15s, background .15s;
}
.me:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .06); }
.me-text { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.me-text b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.me-text small svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad) center / cover no-repeat; color: #fff; font: 700 14px/1 var(--display); letter-spacing: .02em;
  box-shadow: 0 0 0 2px rgba(6, 10, 34, .9), 0 0 0 3px rgba(148, 163, 255, .35);
}
.avatar.has-img { background-color: var(--surface); background-size: cover; }
.avatar.blank::before { content: ""; width: 45%; height: 45%; background: rgba(255, 255, 255, .85);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="8" r="4.5"/><path d="M3 22c0-5 4-8 9-8s9 3 9 8z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="8" r="4.5"/><path d="M3 22c0-5 4-8 9-8s9 3 9 8z"/></svg>') center / contain no-repeat; }
.avatar-lg { width: 76px; height: 76px; font-size: 26px; }
.profile-row { display: flex; align-items: center; gap: 20px; margin: 4px 0 20px; flex-wrap: wrap; }
.profile-row .btn-row { margin: 0; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.settings .field select { width: 100%; min-width: 0; }
.settings .field > span em { font-style: normal; color: var(--dim); font-weight: 400; }
.card.soon { border-style: dashed; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); cursor: pointer; }
.switch-row b { display: block; font-size: 14.5px; }
.switch-row small { color: var(--muted); font-size: 12.5px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, .12); cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .2s; }
.switch:checked { background: var(--grad); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.switch:disabled { cursor: not-allowed; }
.badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.4 var(--font);
  background: linear-gradient(135deg, rgba(90, 169, 255, .2), rgba(194, 123, 255, .2)); border: 1px solid rgba(148, 163, 255, .3); color: #C9CEFF; }
.rule-banner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 255, .28);
  background: linear-gradient(90deg, rgba(90, 169, 255, .12), rgba(194, 123, 255, .08));
}
.rule-banner svg { width: 22px; height: 22px; color: #B9C2FF; flex: none; }
.rule-banner span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rule-banner small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.rule-banner b { font: 600 15px/1.4 var(--display); }

/* ---------- Personal / Prop switch ---------- */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin: 0 4px 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.mode-switch button { height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 13.5px/1 var(--display); cursor: pointer; }
.mode-switch button:hover { color: var(--text); }
.mode-switch button.on { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px rgba(143, 124, 255, .9); }
body.prop .mode-switch button.on { background: linear-gradient(135deg, #F5C451, #FF8A5B); color: #1A1206; box-shadow: 0 6px 16px -8px rgba(245, 160, 80, .9); }
.mode-switch.mobile-only { display: none; }
body.no-prop .mode-switch { display: none !important; }
body.prop #viewTitle::after { content: "PROP"; margin-left: 10px; vertical-align: middle; padding: 3px 8px; border-radius: 999px; font: 700 11px/1.4 var(--font); letter-spacing: .1em; color: #1A1206; background: linear-gradient(135deg, #F5C451, #FF8A5B); }

/* ---------- prop accounts ---------- */
#propPanel { margin-bottom: 14px; }
body.prop #propPanel { margin: 14px 0 0; }
.stats-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 14px; padding: 13px 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02)); color: var(--text); cursor: pointer; text-align: left;
}
.stats-toggle:hover { border-color: var(--line-2); }
.stats-toggle > b { font: 600 15px/1 var(--display); }
.stats-toggle span { margin-left: auto; color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.stats-toggle span b { font-weight: 700; }
.stats-toggle.open .chev { transform: none; }
.prop-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.prop-head h3 { margin: 0 auto 0 0; font: 600 16px/1.3 var(--display); }
.prop-head .btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
.prop-head .view-toggle { margin-left: 0; }
.acct-list { margin-bottom: 14px; }
.arow { display: grid; grid-template-columns: minmax(180px, 1.7fr) 86px 1fr .9fr 1fr 1fr 1fr 52px 40px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.arow.head { border-top: 0; padding-top: 12px; padding-bottom: 10px; background: rgba(255, 255, 255, .02); color: var(--dim); font-size: 12px; font-weight: 500; }
.arow:not(.head):hover { background: rgba(143, 124, 255, .05); }
.arow.blown, .arow.closed { opacity: .6; }
.arow .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.arow .days { text-align: center; }
.arow-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arow-link { padding: 0; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; }
.arow-link b, .ql-name { display: flex; min-width: 0; font: 600 14px/1.3 var(--display); white-space: nowrap; }
.arow-link .nm, .ql-name .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.arow-link .nmn, .ql-name .nmn { flex: none; white-space: pre; }
/* Trades tab: quick log card */
#quickLog { margin-bottom: 14px; }
.ql-groups { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 0; border-top: 1px solid var(--line); }
.gchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.gchip:hover { color: var(--text); border-color: rgba(148, 163, 255, .35); }
.gchip span { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: 11.5px; }
.gchip.on { color: #1A1206; border-color: transparent; background: linear-gradient(135deg, #F5C451, #FF8A5B); }
.gchip.on span { background: rgba(0, 0, 0, .15); }
.gchip.edit { width: 32px; padding: 0; justify-content: center; }
.gchip.edit svg { width: 15px; height: 15px; }
.gchip.add { border-style: dashed; }
.gpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; padding: 4px 2px; }
.gpick .check { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text); font-weight: 500; }
.gpick .check span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-check { margin-top: 6px; color: var(--text); }
.qbar { border-top: 0; }
.ql-card { border-color: rgba(245, 196, 81, .28); }
.ql-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; border: 0; background: linear-gradient(90deg, rgba(245, 196, 81, .08), rgba(255, 138, 91, .03)); cursor: pointer; text-align: left; color: var(--text); }
.ql-toggle b { font: 600 15px/1 var(--display); }
.ql-toggle span { color: var(--muted); font-size: 13px; }
.ql-toggle em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--dim); }
.ql-card.open .ql-toggle .chev { transform: none; }
.ql-row { display: grid; grid-template-columns: minmax(180px, 1.6fr) 1fr .8fr 1fr 180px; gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ql-row.head { padding-top: 10px; padding-bottom: 8px; color: var(--dim); font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .02); }
.ql-row .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.arow-link:hover b { color: #B9C2FF; }
.arow-name small { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-note { font-size: 12px; font-weight: 500; }
.row-note .link-btn { font-size: 12px; color: inherit; text-decoration: underline; }
.row-note.warn { color: #F7D58A; } .row-note.bad { color: #FF9AAA; } .row-note.good { color: #8FF0C4; }
.arow .icon-btn { width: 32px; height: 32px; }
.mini { display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }
.mini.none { color: var(--dim); }
.mini-track { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.mini-track i { display: block; height: 100%; border-radius: 3px; }
.mini.target i { background: linear-gradient(90deg, #3DDC97, #5AA9FF); }
.mini.risk i { background: linear-gradient(90deg, #5AA9FF, #8F7CFF); }
.mini.risk.warm i { background: linear-gradient(90deg, #F5C451, #FFB547); }
.mini.risk.hot i { background: linear-gradient(90deg, #FF8A5B, #FF6B81); }
.mini.risk.hot span { color: var(--loss); }
.acct-none { margin-bottom: 14px; }
.qbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); }
.qbar > b { font: 600 14px/1 var(--display); }
.qsym { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.qsym input { width: 96px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(6, 10, 34, .6); outline: 0; font-weight: 700; text-transform: uppercase; }
.qsym input:focus { border-color: var(--indigo); }
.qsym input.bad { border-color: var(--loss); }
.qcount { flex: 1; font-size: 12.5px; color: var(--muted); }
.qbar .btn { height: 36px; padding: 0 16px; font-size: 13.5px; }
.qbar .btn:disabled { opacity: .45; cursor: default; filter: none; box-shadow: none; }
.qlog { display: flex; align-items: center; gap: 4px; }
.qside { width: 30px; height: 32px; flex: none; border-radius: 8px; border: 0; cursor: pointer; font: 700 12px/1 var(--display); }
.qside.long { background: rgba(90, 169, 255, .18); color: #8EC5FF; }
.qside.short { background: rgba(194, 123, 255, .2); color: #D6A8FF; }
.qlog input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(6, 10, 34, .6); outline: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.qlog input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(143, 124, 255, .2); }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.acct { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); display: flex; flex-direction: column; gap: 12px; }
.acct.blown, .acct.closed { opacity: .65; }
.acct.passed { border-color: rgba(61, 220, 151, .35); }
.acct-head { display: flex; align-items: center; gap: 10px; }
.acct-name { flex: 1; min-width: 0; }
.acct-name b { display: block; font: 600 16px/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-name small { color: var(--muted); font-size: 12.5px; }
.acct-head .icon-btn { width: 32px; height: 32px; }
.status-pill { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.status-pill.active { background: rgba(90, 169, 255, .15); color: #8EC5FF; }
.status-pill.passed { background: var(--win-bg); color: var(--win); }
.status-pill.blown { background: var(--loss-bg); color: var(--loss); }
.status-pill.closed { background: rgba(255, 255, 255, .06); color: var(--muted); }
.acct-bal { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.acct-bal small { display: block; color: var(--dim); font-size: 12px; }
.acct-bal b { font: 700 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.acct-bal .r { text-align: right; }
.meters { display: grid; gap: 11px; }
.meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 5px; }
.meter-top span { color: var(--muted); }
.meter-top b { font-variant-numeric: tabular-nums; font-weight: 600; }
.meter-track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: 4px; transition: width .5s ease; }
.meter.target i { background: linear-gradient(90deg, #3DDC97, #5AA9FF); }
.meter.days i { background: var(--grad); }
.meter.risk i { background: linear-gradient(90deg, #5AA9FF, #8F7CFF); }
.meter.risk.warm i { background: linear-gradient(90deg, #F5C451, #FFB547); }
.meter.risk.hot i { background: linear-gradient(90deg, #FF8A5B, #FF6B81); }
.meter.risk.hot b { color: var(--loss); }
.acct-floor { font-size: 12.5px; color: var(--dim); }
.acct-floor b { color: var(--muted); font-variant-numeric: tabular-nums; }
.acct-alert { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.acct-alert.warn { background: rgba(245, 196, 81, .12); border: 1px solid rgba(245, 196, 81, .35); color: #F7D58A; }
.acct-alert.bad { background: var(--loss-bg); border: 1px solid rgba(255, 107, 129, .35); color: #FF9AAA; }
.acct-alert.good { background: var(--win-bg); border: 1px solid rgba(61, 220, 151, .35); color: #8FF0C4; }
.acct-alert .link-btn { white-space: nowrap; color: inherit; text-decoration: underline; }
.acct-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; font-size: 12.5px; color: var(--dim); }
.prop-empty { text-align: center; padding: 48px 24px; }
.prop-empty-ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(245, 196, 81, .2), rgba(255, 138, 91, .2)); border: 1px solid rgba(245, 196, 81, .35); }
.prop-empty-ico svg { width: 30px; height: 30px; color: #F5C451; }
.prop-empty h2 { font: 700 24px/1.2 var(--display); margin: 0 0 8px; }
.prop-empty p { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }
.money-card { margin-bottom: 14px; }
.money-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.money-kpis div { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.money-kpis div.up { border-color: rgba(61, 220, 151, .35); }
.money-kpis div.down { border-color: rgba(255, 107, 129, .35); }
.money-kpis small { display: block; color: var(--muted); font-size: 12px; }
.money-kpis b { font: 700 20px/1.3 var(--display); font-variant-numeric: tabular-nums; }
.firm-table { margin-bottom: 12px; }
.ledger { border-top: 1px solid var(--line); }
.ledger-row { display: grid; grid-template-columns: 120px 1fr auto auto 28px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ltype { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; justify-self: start; background: var(--loss-bg); color: #FF9AAA; }
.ltype.payout { background: var(--win-bg); color: var(--win); }
.lwho { color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ldate { color: var(--dim); font-size: 12.5px; }
.ledger-row b { font-variant-numeric: tabular-nums; }
#acctField select { width: 100%; min-width: 0; }
.btn-blown { border-color: rgba(255, 138, 91, .45); color: #FFB08A; }
.btn-blown:hover { background: rgba(255, 138, 91, .14); border-color: #FF8A5B; }
.btn-blown svg { width: 17px; height: 17px; }
.foot-gap { margin-right: auto; }
.demo-gate { width: min(440px, 100%); text-align: center; }
/* account: trial pill, banner, sign-in screen, settings card */
.plan-pill { display: block; width: calc(100% - 8px); margin: 0 4px 12px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(148, 163, 255, .3);
  background: rgba(143, 124, 255, .1); color: var(--muted); font-size: 12.5px; text-align: center; cursor: pointer; }
.plan-pill b { color: var(--text); }
.plan-pill.soon { border-color: rgba(245, 196, 81, .45); background: rgba(245, 196, 81, .1); }
.plan-pill.ended { border-color: rgba(255, 107, 129, .45); background: var(--loss-bg); }
.plan-banner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0 -32px; padding: 10px 16px; font-size: 13.5px;
  background: linear-gradient(90deg, rgba(245, 196, 81, .16), rgba(255, 138, 91, .12)); border-bottom: 1px solid rgba(245, 196, 81, .35); }
.plan-banner.ended { background: linear-gradient(90deg, rgba(255, 107, 129, .16), rgba(143, 124, 255, .14)); border-color: rgba(255, 107, 129, .35); }
.plan-banner .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.boot-splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); }
.boot-splash img { width: 64px; height: 64px; filter: drop-shadow(0 0 22px rgba(143, 124, 255, .5)); animation: bootPulse 1.6s ease-in-out infinite; }
.boot-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(148, 163, 255, .2); border-top-color: var(--indigo); animation: bootSpin .8s linear infinite; }
.boot-splash p { margin: 0; color: var(--muted); font-size: 14px; text-align: center; max-width: 320px; }
.boot-splash.failed .boot-spin { display: none; }
.boot-splash.failed p { color: #FF9AAA; }
@keyframes bootSpin { to { transform: rotate(360deg); } }
@keyframes bootPulse { 50% { opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .boot-splash img, .boot-spin { animation: none; } }
.auth-screen { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: radial-gradient(800px 500px at 20% 0%, rgba(90, 169, 255, .14), transparent 60%), radial-gradient(700px 500px at 90% 100%, rgba(194, 123, 255, .12), transparent 60%), var(--bg); }
.auth-box { width: min(440px, 100%); text-align: center; }
.auth-box > img { width: 60px; height: 60px; margin: 0 auto 14px; filter: drop-shadow(0 0 20px rgba(143, 124, 255, .45)); }
.auth-box h1 { font: 700 26px/1.2 var(--display); letter-spacing: -.02em; margin: 0 0 8px; }
.auth-box > p { color: var(--muted); margin: 0 0 18px; }
#clerkMount { display: flex; justify-content: center; min-height: 120px; }
.auth-fine { font-size: 12.5px; color: var(--dim) !important; margin-top: 16px !important; }
.auth-fine a { color: #B9C2FF; }
.account-card .acct-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.account-card .btn-row { margin-top: 14px; }
.acct-delete { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.acct-delete p { margin: 0; font-size: 13px; }
.acct-plan { display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.acct-plan.active { background: var(--win-bg); color: var(--win); }
.acct-plan.trial { background: rgba(90, 169, 255, .15); color: #8EC5FF; }
.acct-plan.ended { background: var(--loss-bg); color: var(--loss); }
.demo-gate .modal-body { padding-top: 30px; }
.demo-gate img { width: 56px; height: 56px; margin: 0 auto 14px; filter: drop-shadow(0 0 18px rgba(143, 124, 255, .45)); }
.demo-gate h2 { font: 700 22px/1.2 var(--display); margin: 0 0 10px; }
.demo-gate p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.demo-gate .modal-foot { justify-content: center; }
.settings [disabled] { opacity: .55; cursor: not-allowed; }
.qty-field { grid-column: 1 / -1; }
.qty { display: inline-flex; align-items: center; width: max-content; border: 1px solid var(--line-2); border-radius: 11px; background: rgba(6, 10, 34, .6); overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: rgba(255, 255, 255, .04); color: var(--text); font-size: 20px; cursor: pointer; }
.qty button:hover { background: rgba(143, 124, 255, .18); }
.field .qty input { width: 64px; height: 44px; border: 0; border-radius: 0; text-align: center; font: 700 17px var(--display); background: none; box-shadow: none; }
.qty-field small { font-size: 12.5px; }
.field select[name="size"] { width: 100%; min-width: 0; }
/* trade form: one trade → several prop accounts */
.multi-box { margin: 0 0 16px; padding: 14px; border-radius: 14px; border: 1px solid rgba(245, 196, 81, .3); background: linear-gradient(135deg, rgba(245, 196, 81, .06), rgba(255, 138, 91, .04)); }
.multi-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.multi-head b { display: block; font: 600 14.5px/1.3 var(--display); }
.multi-head small { color: var(--muted); font-size: 12.5px; }
.multi-fill { display: flex; gap: 6px; }
.multi-fill input { width: 130px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(6, 10, 34, .6); outline: 0; }
.multi-fill input:focus { border-color: var(--indigo); }
.multi-fill .btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
.multi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.mtile { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(6, 10, 34, .55); transition: opacity .15s, border-color .15s; }
.mtile.off { opacity: .45; }
.mtile-top { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.mtile-top input { width: 16px; height: 16px; accent-color: #F5C451; flex: none; }
.mtile-top b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtile small { color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtile .mpnl { height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); outline: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.mtile .mpnl:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(143, 124, 255, .2); }
.mtile .mpnl.bad { border-color: var(--loss); }
.multi-total { margin-top: 10px; font-size: 13px; color: var(--muted); }
#multiToggle button.on { background: linear-gradient(135deg, rgba(245, 196, 81, .25), rgba(255, 138, 91, .2)); color: #F7D58A; }
.form-sub { margin: 4px 0 12px; font: 600 14px/1.3 var(--display); }
.form-sub em { font: 400 12.5px var(--font); color: var(--dim); font-style: normal; }

/* ---------- main ---------- */
.main { min-width: 0; padding: 0 32px 64px; }
.demo-banner {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  margin: 0 -32px; padding: 9px 16px; font-size: 13.5px;
  background: linear-gradient(90deg, rgba(90, 169, 255, .18), rgba(194, 123, 255, .18));
  border-bottom: 1px solid var(--line-2);
}
.demo-banner a { color: #fff; font-weight: 600; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 24px; flex-wrap: wrap; }
.topbar h1 { font: 700 28px/1.15 var(--display); letter-spacing: -.025em; margin: 0; }
.topbar .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.no-range #range { display: none; }

.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; color: var(--muted); padding: 7px 12px; border-radius: 8px;
  font-weight: 600; font-size: 13px; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 8px rgba(0, 0, 0, .3); }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, .06); }
.icon-btn svg { width: 18px; height: 18px; }
.link-btn { border: 0; background: none; color: #B9C2FF; font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; }
.link-btn:hover { color: #fff; }
.btn-danger { border-color: rgba(255, 107, 129, .4); color: #FF9AAA; }
.btn-danger:hover { background: var(--loss-bg); border-color: var(--loss); }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card h3 { font: 600 15px/1.3 var(--display); margin: 0; letter-spacing: -.005em; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head .muted { font-size: 13px; }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.kpi.hero-kpi { border-color: rgba(148, 163, 255, .3); background: linear-gradient(135deg, rgba(90, 169, 255, .14), rgba(194, 123, 255, .1)); }
.kpi small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; margin-bottom: 6px; }
.kpi b { display: block; font: 600 23px/1.15 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .kpi-sub { display: block; margin-top: 6px; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid-2 { display: grid; grid-template-columns: 2.2fr 1fr; gap: 14px; margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 14px; }
/* bottom row kept compact: 5 weekdays, top 4 setups, 3 recent trades */
.grid-3 .card { padding: 16px 18px; }
.grid-3 .card-head { margin-bottom: 10px; }
#setupTable .setups td { padding: 7px 0; }
#recentList .recent-item { padding: 7px 0; gap: 10px; }
#recentList .thumb { width: 44px; height: 30px; border-radius: 6px; }

/* charts */
.chart { position: relative; height: 260px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -115%);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 7px 10px; font-size: 12.5px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.chart .tip b { font-variant-numeric: tabular-nums; }
.axis text { fill: var(--dim); font-size: 11px; font-family: var(--font); }

.ring { display: grid; place-items: center; padding: 6px 0 4px; }
.ring-wrap { position: relative; width: 168px; height: 168px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font: 700 32px/1 var(--display); letter-spacing: -.03em; }
.ring-center small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.ring-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; text-align: center; }
.ring-legend div { padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.ring-legend b { display: block; font: 600 17px/1.2 var(--display); }
.ring-legend span { font-size: 11.5px; color: var(--muted); }
.mini-stats { margin-top: 14px; }
.mini-stats div { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.mini-stats span { color: var(--muted); }
.mini-stats b { font-variant-numeric: tabular-nums; font-weight: 600; }

.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 34px 1fr 78px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row > span:first-child { color: var(--muted); }
.bar-track { position: relative; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .03); }
.bar-track::before { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px; background: var(--line-2); }
.bar-fill { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; transition: width .5s ease; }
.bar-fill.pos { background: linear-gradient(90deg, rgba(61, 220, 151, .5), var(--win)); }
.bar-fill.neg { background: linear-gradient(270deg, rgba(255, 107, 129, .5), var(--loss)); }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.setups { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.setups th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; padding: 0 0 8px; }
.setups th:not(:first-child), .setups td:not(:first-child) { text-align: right; }
.setups td { padding: 9px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.setups td:first-child { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.recent-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.recent-item:first-child { border-top: 0; padding-top: 0; }
.recent-item:hover .sym { color: #fff; }
.thumb {
  width: 52px; height: 36px; border-radius: 7px; flex: none; object-fit: cover;
  border: 1px solid var(--line); background: var(--surface);
}
.thumb.ph { display: grid; place-items: center; color: var(--dim); }
.thumb.ph svg { width: 16px; height: 16px; }
.recent-item .meta { flex: 1; min-width: 0; }
.sym { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.recent-item small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item b { font-variant-numeric: tabular-nums; font-size: 14px; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pill.long { background: rgba(90, 169, 255, .14); color: #8EC5FF; }
.pill.short { background: rgba(194, 123, 255, .14); color: #D6A8FF; }

.empty-hero { text-align: center; padding: 70px 20px 40px; max-width: 560px; margin: 0 auto; }
.empty-hero img { width: 84px; height: 84px; margin: 0 auto 22px; filter: drop-shadow(0 0 24px rgba(143, 124, 255, .45)); }
.empty-hero h2 { font: 700 30px/1.15 var(--display); letter-spacing: -.025em; margin: 0 0 10px; }
.empty-hero p { color: var(--muted); margin: 0 0 26px; }
.empty-hero .hint { margin-top: 24px; font-size: 13.5px; color: var(--dim); }
.empty-small { color: var(--dim); font-size: 13.5px; padding: 18px 0; text-align: center; }

/* this-week strip (7D range) */
.week-card { margin-top: 14px; }
body.prop .week-card { margin: 0 0 14px; }
.week-card .card-head b { font-variant-numeric: tabular-nums; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px 12px; border-radius: 14px; }
.wd.has { cursor: pointer; transition: background .15s; }
.wd.has:hover { background: rgba(143, 124, 255, .08); }
.wd-name { font-size: 13px; font-weight: 600; color: var(--text); }
.wd-num {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  font: 600 16px/1 var(--display); font-variant-numeric: tabular-nums;
}
.wd.other .wd-num { color: var(--dim); }
.wd.today .wd-num { background: var(--grad); color: #fff; box-shadow: 0 6px 20px -6px rgba(143, 124, 255, .8); }
.wd-pnl { min-height: 16px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- trades table ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  flex: 1; min-width: 220px; max-width: 420px; display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.search:focus-within { border-color: var(--indigo); }
.search svg { width: 17px; height: 17px; color: var(--dim); flex: none; }
.search input { flex: 1; border: 0; background: none; outline: 0; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(143, 124, 255, .16); border: 1px solid rgba(143, 124, 255, .35); font-size: 13px; font-weight: 600; }
.chip button { border: 0; background: rgba(255, 255, 255, .1); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }

.table .tr {
  display: grid; grid-template-columns: 64px 1.1fr 1.2fr 1.4fr .8fr 1fr; gap: 14px; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--line); font-size: 14px;
}
.table .tr.th { border-top: 0; padding-top: 14px; padding-bottom: 10px; color: var(--dim); font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .02); }
.table .tr:not(.th) { cursor: pointer; transition: background .12s; }
.table .tr:not(.th):hover { background: rgba(143, 124, 255, .06); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table .setup-cell { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .date-cell { color: var(--muted); font-size: 13px; }
.table .date-cell b { display: block; color: var(--text); font-weight: 500; font-size: 14px; }
.stars-ro { color: #F5C451; letter-spacing: 1px; font-size: 12px; }
.stars-ro i { font-style: normal; color: rgba(255, 255, 255, .12); }
.table-foot { padding: 14px 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; display: flex; justify-content: space-between; }

/* trades: list / grid toggle + grid cards */
.view-toggle { margin-left: auto; }
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; }
.view-toggle svg { width: 16px; height: 16px; }
.tgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tcard {
  border-radius: 14px; overflow: hidden; cursor: pointer; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tcard:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .7); }
.tcard.win { box-shadow: inset 0 -2px 0 rgba(61, 220, 151, .55); }
.tcard.loss { box-shadow: inset 0 -2px 0 rgba(255, 107, 129, .55); }
.tcard-shot { position: relative; aspect-ratio: 16 / 10; background: #070B22; border-bottom: 1px solid var(--line); }
.tcard-shot img { width: 100%; height: 100%; object-fit: cover; }
.tcard-ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--dim); font-size: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(143, 124, 255, .08), transparent 70%); }
.tcard-ph svg { width: 26px; height: 26px; }
.tcard-count { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  background: rgba(6, 10, 34, .82); font-size: 11.5px; font-weight: 700; }
.tcard-count svg { width: 13px; height: 13px; }
.tcard-pnl { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 8px; background: rgba(6, 10, 34, .85);
  font: 700 13.5px/1.2 var(--display); font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tcard-body { padding: 10px 12px 12px; }
.tcard-top { display: flex; align-items: center; gap: 8px; }
.tcard-top b { font: 700 15px/1.2 var(--display); }
.tcard-top .stars-ro { margin-left: auto; font-size: 11px; }
.tcard-body small { display: block; margin-top: 5px; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgrid-foot { display: flex; justify-content: space-between; padding: 14px 4px 0; color: var(--dim); font-size: 13px; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-head h3 { font-size: 20px; min-width: 170px; text-align: center; }
.cal-total { margin-left: auto; font-size: 14px; color: var(--muted); }
.cal-total b { font: 600 18px var(--display); margin-left: 6px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr) 1.05fr; gap: 8px; }
.cal .dow { font-size: 12px; color: var(--dim); font-weight: 500; padding: 0 4px 2px; }
.day {
  min-height: 96px; border-radius: 12px; padding: 9px 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02); display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums;
}
.day.out { opacity: .3; }
.day.has { cursor: pointer; transition: transform .12s, border-color .12s; }
.day.has:hover { transform: translateY(-1px); border-color: var(--line-2); }
.day.win { background: linear-gradient(180deg, rgba(61, 220, 151, .2), rgba(61, 220, 151, .07)); border-color: rgba(61, 220, 151, .35); }
.day.loss { background: linear-gradient(180deg, rgba(255, 107, 129, .2), rgba(255, 107, 129, .07)); border-color: rgba(255, 107, 129, .35); }
.day.today .dn { color: #fff; background: var(--grad); border-radius: 6px; padding: 0 6px; }
.day .dn { font-size: 12px; color: var(--muted); align-self: flex-start; }
.day b { margin-top: auto; font: 600 15px/1.2 var(--display); }
.day small { font-size: 11.5px; color: var(--muted); }
.week { border-radius: 12px; padding: 9px 10px; background: rgba(143, 124, 255, .07); border: 1px solid rgba(143, 124, 255, .18); display: flex; flex-direction: column; justify-content: center; gap: 2px; font-variant-numeric: tabular-nums; }
.week small { font-size: 11.5px; color: var(--muted); }
.week b { font: 600 15px/1.2 var(--display); }

/* ---------- events ---------- */
.ev-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 10px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.ev-switch button {
  height: 46px; border: 0; border-radius: 11px; background: none; cursor: pointer;
  font: 600 15px/1 var(--display); color: var(--muted); transition: background .15s, color .15s;
}
.ev-switch button:hover { color: var(--text); }
.ev-switch button.on {
  color: var(--text);
  background: linear-gradient(135deg, rgba(90, 169, 255, .2), rgba(194, 123, 255, .16));
  box-shadow: inset 0 0 0 1px rgba(148, 163, 255, .3);
}
.ev-switch span { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); font: 600 12px/1.4 var(--font); }
.ev-switch span:empty { display: none; }
.ev-links { display: flex; align-items: center; gap: 16px; min-height: 28px; margin: 0 2px 10px; }
.ev-links #evWeekLink { margin-left: auto; }
.select-sm {
  height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  font-size: 13px; font-weight: 600; color: var(--text); outline: 0; cursor: pointer;
}
.select-sm:focus { border-color: var(--indigo); }
#monthSel.on { border-color: rgba(143, 124, 255, .55); background: rgba(143, 124, 255, .14); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--indigo); }
.ev-next {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid rgba(255, 107, 129, .3); background: linear-gradient(90deg, rgba(255, 107, 129, .12), rgba(143, 124, 255, .08));
}
.ev-next-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-next small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.ev-next-txt b { font: 600 15px/1.4 var(--display); }
.ev-next-when { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.ev-next-when b { font: 700 18px/1.2 var(--display); }
.ev-next-when small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.impact { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.impact i { width: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.impact i:nth-child(1) { height: 6px; } .impact i:nth-child(2) { height: 10px; } .impact i:nth-child(3) { height: 14px; }
.impact.high i { background: #FF6B81; }
.impact.medium i:nth-child(-n+2) { background: #FFB547; }
.impact.low i:nth-child(1) { background: #E8D36B; }
.impact.holiday i { background: var(--dim); }
.you { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--grad); color: #fff; }

.ev-empty { text-align: center; padding: 40px 20px; }
.ev-empty h3 { margin-bottom: 6px; }
.ev-skel { display: grid; gap: 14px; }
.skel { height: 160px; background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .07) 50%, rgba(255, 255, 255, .03) 70%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.ev-source { font-size: 12.5px; color: var(--dim); margin: 6px 0 0; }
.ev-source a { color: var(--muted); }

/* MarketWatch-style US News table */
.mw { overflow: hidden; }
.mw-head, .mw-row { display: grid; grid-template-columns: 36px 96px 1fr 110px 110px; align-items: center; gap: 0 8px; padding: 0 20px 0 12px; }
.mw-head { height: 40px; font-size: 12px; font-weight: 500; color: var(--dim); background: rgba(255, 255, 255, .02); border-bottom: 1px solid var(--line); }
.mw-head .r { text-align: right; }
.mw-day + .mw-day { border-top: 1px solid var(--line); }
.mw-day-head {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 52px; padding: 0 20px 0 18px;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--text); font: 600 15px/1 var(--display);
  transition: background .12s;
}
.mw-day-head:hover { background: rgba(255, 255, 255, .03); }
.mw-day.open .mw-day-head { background: rgba(143, 124, 255, .07); }
.mw-day.past .mw-day-head > span:first-of-type { color: var(--muted); }
.mw-day-head em { margin-left: auto; font: 500 12.5px var(--font); color: var(--dim); font-style: normal; }
.mw-day-head .badge { margin: 0; }
.chev { width: 18px; height: 18px; color: var(--dim); flex: none; transition: transform .2s; transform: rotate(-90deg); }
.mw-day.open .mw-day-head .chev, .mw-row.open .chev { transform: none; }
.mw-row { min-height: 48px; border-top: 1px solid var(--line); font-size: 14.5px; }
.mw-row[data-mw-row] { cursor: pointer; }
.mw-row[data-mw-row]:hover { background: rgba(255, 255, 255, .025); }
.mw-row > span:first-child { display: grid; place-items: center; }
.mw-time { color: var(--text); font-variant-numeric: tabular-nums; }
.mw-title { font-weight: 500; padding: 12px 0; }
.mw-num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--win); }
.mw-row.done .mw-time, .mw-row.done .mw-title { color: var(--dim); }
.mw-row.done .mw-num { color: rgba(61, 220, 151, .55); }
.mw:not(.mw-earn) .mw-title { color: #C3C8EA; }
.mw:not(.mw-earn) .mw-row.hi .mw-title { color: var(--text); font-weight: 700; }
.mw:not(.mw-earn) .mw-row.done .mw-title { color: var(--dim); }
.mw-empty { padding: 14px 20px 16px 66px; font-size: 13.5px; color: var(--dim); border-top: 1px solid var(--line); }
.mw-info { grid-column: 3 / -1; padding: 0 0 14px; font-size: 13.5px; color: var(--muted); }
.mw-earn .mw-head, .mw-earn .mw-row { grid-template-columns: 36px 104px 150px 1fr 96px 96px; }
.mw-sym { display: flex; align-items: center; gap: 8px; font: 700 14.5px/1 var(--display); }
.mw-earn .mw-title { color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-earn .mw-time { font-size: 13px; color: var(--muted); }
.mw-row.mine { background: linear-gradient(90deg, rgba(143, 124, 255, .1), transparent 60%); }
.mw-more { display: block; width: 100%; height: 44px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; color: #B9C2FF; font-weight: 600; font-size: 13.5px; }
.mw-more:hover { background: rgba(255, 255, 255, .03); color: #fff; }

/* ---------- settings ---------- */
.settings { display: grid; gap: 14px; max-width: 760px; }
.settings h3 { font-size: 17px; margin-bottom: 6px; }
.settings p { margin: 0 0 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card.danger { border-color: rgba(255, 107, 129, .22); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: #C3C8EA; }
.field > span em { font-style: normal; color: var(--dim); }
.field input, .field textarea, .field select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: rgba(6, 10, 34, .6); outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field select { width: auto; min-width: 200px; }
.field textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(143, 124, 255, .2); }
.field input.bad { border-color: var(--loss); }
input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 3px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(6, 10, 34, .6); height: 44px; }
.toggle button { border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.toggle button.on.long { background: rgba(90, 169, 255, .2); color: #A9D2FF; }
.toggle button.on.short { background: rgba(194, 123, 255, .2); color: #DDB5FF; }
.stars { display: flex; gap: 4px; margin-bottom: 14px; }
.stars button { border: 0; background: none; font-size: 26px; line-height: 1; color: rgba(255, 255, 255, .14); cursor: pointer; padding: 0 2px; transition: color .1s, transform .1s; }
.stars button.on { color: #F5C451; }
.stars button:hover { transform: scale(1.12); }
.modal-body > .field { margin-bottom: 14px; }
.drop {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; text-align: center;
  border-radius: 14px; border: 1.5px dashed rgba(148, 163, 255, .3); background: rgba(143, 124, 255, .04);
  color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop b { color: var(--text); }
.drop u { color: #B9C2FF; text-decoration: none; font-weight: 600; }
.drop svg { width: 26px; height: 26px; color: #B9C2FF; flex: none; }
.drop:hover, .drop.over { border-color: var(--indigo); background: rgba(143, 124, 255, .1); }
.shots { display: grid; gap: 10px; margin-top: 10px; }
.shots:empty { display: none; }
.shot-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.shot-row textarea {
  width: 100%; min-height: 100%; padding: 10px 12px; border-radius: 10px; resize: vertical; line-height: 1.5; font-size: 14px;
  border: 1px solid var(--line-2); background: rgba(6, 10, 34, .6); outline: 0;
}
.shot-row textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(143, 124, 255, .2); }
.shot { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); align-self: start; }
.shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.drop > div { display: flex; flex-direction: column; gap: 2px; }
.drop-sub { color: var(--dim); font-size: 12.5px; }
.shot button {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(6, 10, 34, .8); color: #fff; cursor: pointer; font-size: 15px; line-height: 1;
}
.shot button:hover { background: var(--loss); }
.form-error { color: var(--loss); font-size: 13.5px; margin: 4px 0 0; min-height: 1em; }

/* ---------- modal / drawer ---------- */
.modal, .drawer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal[hidden], .drawer[hidden], .lightbox[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 20, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal-panel {
  position: relative; width: min(680px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  border-radius: 20px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #111948, #0B1236);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 6px; }
.modal-head h2 { font: 700 21px/1.2 var(--display); margin: 0; letter-spacing: -.02em; }
.modal-body { padding: 16px 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--line); }

.drawer { place-items: stretch end; padding: 0; }
.drawer-panel {
  position: relative; width: min(620px, 100%); height: 100%; overflow-y: auto;
  background: linear-gradient(180deg, #0F1742, #0A1034); border-left: 1px solid var(--line-2);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .5); animation: slide .26s cubic-bezier(.2, .8, .2, 1);
}
.dw-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: rgba(15, 23, 66, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.dw-head h2 { font: 700 22px/1.2 var(--display); margin: 0; letter-spacing: -.02em; }
.dw-head .grow { flex: 1; }
.dw-body { padding: 22px 24px 40px; }
.dw-result { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px; border-radius: 16px; margin-bottom: 18px; border: 1px solid var(--line); }
.dw-result.win { background: linear-gradient(135deg, rgba(61, 220, 151, .16), rgba(61, 220, 151, .04)); border-color: rgba(61, 220, 151, .3); }
.dw-result.loss { background: linear-gradient(135deg, rgba(255, 107, 129, .16), rgba(255, 107, 129, .04)); border-color: rgba(255, 107, 129, .3); }
.dw-result small { display: block; color: var(--muted); font-size: 12.5px; }
.dw-result b { font: 700 34px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dw-result .r-mult { font: 600 18px var(--display); text-align: right; }
.dw-shots { display: grid; gap: 14px; margin-bottom: 18px; }
.dw-shots figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); }
.dw-shots img { width: 100%; cursor: zoom-in; background: var(--surface); }
.dw-shots .cap {
  display: block; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: transparent;
  font-size: 14px; line-height: 1.5; color: #C9CEEE; resize: none; outline: 0; overflow: hidden;
}
.dw-shots .cap:focus { background: rgba(143, 124, 255, .07); box-shadow: inset 0 0 0 2px var(--indigo); }
.dw-shots .cap::placeholder { color: var(--dim); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); border: 1px solid var(--line); margin-bottom: 18px; }
.facts div { background: #0D1440; padding: 12px 14px; }
.facts small { display: block; color: var(--dim); font-size: 12px; margin-bottom: 2px; }
.facts span { font-weight: 600; font-variant-numeric: tabular-nums; }
.notes-box {
  display: block; width: 100%; min-height: 110px; padding: 16px; border-radius: 14px; resize: none; outline: 0; overflow: hidden;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: #C9CEEE; font-size: 14.5px; line-height: 1.55;
  transition: border-color .15s, box-shadow .15s;
}
.notes-box:hover { border-color: var(--line-2); }
.notes-box:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(143, 124, 255, .2); }
.notes-box::placeholder { color: var(--dim); }
.dw-section-row { display: flex; align-items: baseline; justify-content: space-between; }
.voice-head { margin-top: 24px; }
.voice { display: grid; gap: 8px; }
.vrec-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1.5px dashed rgba(148, 163, 255, .3); background: rgba(143, 124, 255, .05); transition: border-color .15s, background .15s;
}
.vrec-btn:hover { border-color: var(--indigo); background: rgba(143, 124, 255, .1); }
.vrec-btn svg { width: 40px; height: 40px; padding: 9px; flex: none; border-radius: 50%; color: #fff; background: var(--grad); box-shadow: 0 6px 18px -6px rgba(143, 124, 255, .8); }
.vrec-btn b { display: block; font-size: 14.5px; }
.vrec-btn small { color: var(--muted); font-size: 12.5px; }
.vrec { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 107, 129, .4); background: rgba(255, 107, 129, .08); }
.vrec b { font: 600 16px/1 var(--display); font-variant-numeric: tabular-nums; margin-right: auto; }
.vrec .btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--loss); box-shadow: 0 0 0 0 rgba(255, 107, 129, .6); animation: recPulse 1.4s ease-out infinite; }
.rec-wave { display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.rec-wave i { width: 3px; height: 6px; border-radius: 2px; background: #FF9AAA; animation: recWave 1s ease-in-out infinite; }
.rec-wave i:nth-child(2) { animation-delay: .15s; } .rec-wave i:nth-child(3) { animation-delay: .3s; } .rec-wave i:nth-child(4) { animation-delay: .45s; } .rec-wave i:nth-child(5) { animation-delay: .6s; }
@keyframes recPulse { 70% { box-shadow: 0 0 0 10px rgba(255, 107, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 129, 0); } }
@keyframes recWave { 50% { height: 18px; } }
.vnote { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.vplay { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: var(--grad); }
.vplay svg { width: 16px; height: 16px; fill: currentColor; }
.vplay .i-pause, .vnote.playing .vplay .i-play { display: none; }
.vnote.playing .vplay .i-pause { display: block; }
.vmain { flex: 1; min-width: 0; }
.vbar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-bottom: 6px; }
.vbar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .25s linear; }
.vmain small { color: var(--dim); font-size: 12px; }
.vtime { font: 600 13.5px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--muted); }
.vdel { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 16px; }
.vdel:hover { background: var(--loss-bg); color: var(--loss); }
@media (prefers-reduced-motion: reduce) { .rec-dot, .rec-wave i { animation: none; } }
.save-state { font-size: 12.5px; color: var(--dim); }
.dw-section { font: 600 13px var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 10px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(2, 3, 14, .94); display: grid; place-items: center; animation: fade .18s ease; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .08); width: 46px; height: 46px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; }
.lb-next { right: 18px; top: 50%; }
.lb-note {
  position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 40px));
  padding: 12px 16px; border-radius: 12px; background: rgba(13, 20, 56, .92); border: 1px solid var(--line-2);
  font-size: 14px; color: #DDE1FF; white-space: pre-wrap; max-height: 30vh; overflow-y: auto;
}
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-size: 14px; font-weight: 500; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .tgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  /* narrower sidebar, still with full labels */
  body.app { grid-template-columns: 196px 1fr; }
  .side { padding: 20px 12px; }
  .side .brand { padding: 4px 8px 22px; }
  .side .brand span { font-size: 17px; }
  .tabs button { padding: 10px; gap: 10px; }
  .main { padding: 0 20px 64px; }
  .demo-banner, .plan-banner { margin: 0 -20px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-3 > :last-child { grid-column: auto; }
  .shot-row { grid-template-columns: 130px 1fr; }
  .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .table .tr { grid-template-columns: 52px 1fr 1fr; padding: 12px 14px; }
  .table .tr > :nth-child(4), .table .tr > :nth-child(5) { display: none; }
  .table .tr > :nth-child(6) { grid-column: 3; }
}
@media (max-width: 640px) {
  /* phones: tabs move to a bottom bar */
  body.app { grid-template-columns: 1fr; }
  .side {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 40;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line);
    background: rgba(8, 12, 38, .92); align-items: stretch;
  }
  .side .brand, .side-foot { display: none; }
  /* phones: the backup reminder moves to a slim strip at the top, only when a backup is due */
  .backup-strip:not([hidden]) {
    display: flex; align-items: center; gap: 8px; width: calc(100% + 40px); margin: 0 -20px; padding: 10px 20px; cursor: pointer; text-align: left;
    border: 0; border-bottom: 1px solid rgba(255, 196, 87, .3); background: rgba(255, 196, 87, .1); color: #FFD27A; font-size: 13px;
  }
  .backup-strip svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .backup-strip span { flex: 1; min-width: 0; }
  .backup-strip b { white-space: nowrap; color: #FFE2A6; }
  .tabs { flex-direction: row; justify-content: space-around; }
  .tabs button { flex-direction: column; font-size: 11px; padding: 7px 4px; gap: 3px; align-items: center; text-align: center; }
  .shot-row { grid-template-columns: 1fr; }
  .mode-switch.mobile-only { display: grid; margin: 14px 0 0; }
  .side .mode-switch { display: none; }
  .money-kpis { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 1fr auto 28px; }
  .ledger-row .lwho, .ledger-row .ldate { display: none; }
  .acct-grid { grid-template-columns: 1fr; }
  .arow { grid-template-columns: 1fr auto 32px; gap: 6px 10px; padding: 12px 14px; }
  .arow.head { display: none; }
  .arow > :nth-child(2), .arow > :nth-child(3), .arow > :nth-child(5), .arow > :nth-child(6), .arow > :nth-child(8) { display: none; }
  .arow > :nth-child(7) { grid-column: 1 / -1; grid-row: 2; }
  .ql-row { grid-template-columns: 1fr 150px; gap: 6px 10px; padding: 10px 14px; }
  .ql-row.head { display: none; }
  .ql-row > :nth-child(2), .ql-row > :nth-child(3), .ql-row > :nth-child(4) { display: none; }
  .ql-toggle span { display: none; }
  .qcount { flex-basis: 100%; order: 3; }
  .prop-head .view-toggle button span { display: none; }
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .view-toggle button span { display: none; }
  .tcard-top .stars-ro { display: none; }
  .main { padding: 0 16px 100px; }
  .demo-banner, .plan-banner { margin: 0 -16px; }
  .side .plan-pill { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 19px; }
  .grid-3 { grid-template-columns: 1fr; }
  .topbar { padding: 20px 0 16px; }
  .topbar h1 { font-size: 24px; }
  .top-actions { width: 100%; justify-content: space-between; }
  .no-range .topbar { flex-wrap: nowrap; }
  .no-range .top-actions { width: auto; }
  .seg button { padding: 7px 9px; }
  #newTradeBtn span { display: none; }
  #newTradeBtn { width: 44px; padding: 0; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-panel { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .cal { gap: 4px; grid-template-columns: repeat(7, 1fr); }
  .cal .week, .cal .dow.wk { display: none; }
  .day { min-height: 58px; padding: 5px; border-radius: 8px; }
  .day b { font-size: 10.5px; white-space: nowrap; letter-spacing: -.02em; }
  .day small { display: none; }
  .ev-next { flex-wrap: wrap; }
  .ev-links { flex-wrap: wrap; gap: 8px 16px; }
  .mw-head, .mw-row { grid-template-columns: 26px 64px 1fr 62px 62px; padding: 0 12px 0 6px; font-size: 13.5px; }
  .mw-head span:nth-child(4) { font-size: 0; } .mw-head span:nth-child(4)::after { content: "Fcst"; font-size: 12px; }
  .mw-head span:nth-child(5) { font-size: 0; } .mw-head span:nth-child(5)::after { content: "Prev"; font-size: 12px; }
  .mw-day-head { padding: 0 12px; font-size: 14px; }
  .mw-info { grid-column: 2 / -1; }
  .mw-earn .mw-head, .mw-earn .mw-row { grid-template-columns: 22px 58px 1fr 58px 58px; }
  .mw-earn .mw-head span:nth-child(4), .mw-earn .mw-row .mw-title { display: none; }
  .mw-earn .mw-time { font-size: 11.5px; }
  .mw-empty { padding-left: 44px; }
  .mw-sym .you { display: none; }
  .mw-head.earn span:nth-child(5) { font-size: 0; } .mw-head.earn span:nth-child(5)::after { content: "EPS"; font-size: 12px; }
  .mw-head.earn span:nth-child(6) { font-size: 0; } .mw-head.earn span:nth-child(6)::after { content: "Last yr"; font-size: 12px; }
  .ev-next-when { align-items: flex-start; text-align: left; }
  .wd-num { width: 34px; height: 34px; font-size: 14px; }
  .wd-pnl { font-size: 10.5px; letter-spacing: -.02em; }
  .cal-head h3 { min-width: 0; flex: 1; }
  .cal-total { width: 100%; margin: 0; text-align: center; }
  .facts { grid-template-columns: 1fr; }
  .dw-head, .dw-body { padding-left: 16px; padding-right: 16px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); border-radius: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; }
}

.prop-note { margin: 12px 2px 0; font-size: 12px; color: var(--dim); }
.prop-note a { color: var(--muted); }
.paid-out { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--dim); }
.qdate input { width: 150px; text-transform: none; color-scheme: dark; }
.qdate input.bad { border-color: var(--loss); }
.accts-toggle + .prop-head { justify-content: flex-end; }

/* prop accounts: choose which list columns to show */
.accts-toggle + .prop-head:has(.cols-menu) { justify-content: flex-start; }
.cols-menu { position: relative; margin-right: auto; }
.cols-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 190px; display: grid; gap: 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: #111948; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7); }
.cols-pop .check { padding: 6px 8px; border-radius: 8px; }
.cols-pop .check:hover { background: rgba(255, 255, 255, .05); }
@media (min-width: 641px) { .acct-list .arow { grid-template-columns: var(--acols); } }
.acct-list.hide-c5 .arow > :nth-child(5), .acct-list.hide-c6 .arow > :nth-child(6),
.acct-list.hide-c7 .arow > :nth-child(7), .acct-list.hide-c8 .arow > :nth-child(8) { display: none; }

/* Settings: motivation card beside the form */
.settings-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(280px, 380px); gap: 20px; align-items: start; }
.motivation { position: sticky; top: 20px; }
.motivation h3 { margin: 0 0 4px; font: 600 17px/1.3 var(--display); }
.motivation p { margin: 0 0 14px; }
.mot-rows { display: grid; gap: 6px; margin-bottom: 16px; }
.mot-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); font-variant-numeric: tabular-nums; }
.mot-row span { font-weight: 600; }
.mot-row b { font: 600 16px/1.2 var(--display); color: var(--win); }
.mot-row em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--dim); }
.mot-row.on { border-color: rgba(143, 124, 255, .55); background: rgba(143, 124, 255, .1); }
.mot-goal { margin-bottom: 10px; }
.mot-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mot-out:empty { display: none; }
.mot-out div { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.mot-out span { display: block; font-size: 11.5px; color: var(--muted); }
.mot-out b { font-variant-numeric: tabular-nums; }
.mot-pace { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.mot-pace small { color: var(--muted); font-size: 12px; }
.mot-pace b { font: 600 18px/1.2 var(--display); }
.mot-fine { margin: 14px 0 0 !important; font-size: 11.5px; color: var(--dim); }
@media (max-width: 1180px) { .settings-layout { grid-template-columns: minmax(0, 760px); } .motivation { position: static; } }
