/* ======================================================================
   OKTOMBO — theme-r14.css
   R14: Night theme (deep-sea neural) + new user chrome.
   Loads AFTER tokens.css/user.css and only overrides — nothing removed.
   Day = the existing token set, untouched.
   ====================================================================== */

/* ---------------- NIGHT — variable overrides ---------------- */
[data-theme="night"]{
  --bg:#070A0F; --bg-grid:rgba(120,200,255,.028);
  --surface:#0E141C; --surface-2:#131B25; --sunken:#0A0F16;
  --ink:#EAF1F6; --ink-2:#B7C2CF; --ink-3:#828E9D; --ink-4:#5A6675; --ink-5:#414C5A;
  --line:rgba(150,200,240,.09); --line-2:rgba(150,200,240,.15); --line-3:rgba(150,200,240,.24);
  --built:#1FD98F; --built-bg:rgba(31,217,143,.13); --built-line:rgba(31,217,143,.34);
  --running:#22C7EE; --running-bg:rgba(34,199,238,.13); --running-line:rgba(34,199,238,.32);
  --danger:#FF5F6D; --danger-bg:rgba(255,95,109,.13); --danger-line:rgba(255,95,109,.32);
  --stub-bg:rgba(224,185,94,.13); --stub-line:rgba(224,185,94,.34);
  --gated-bg:rgba(130,142,157,.10); --gated-line:rgba(130,142,157,.28);
  --planned-bg:rgba(147,124,255,.12); --planned-line:rgba(147,124,255,.30);
  --afferent:#3DA9FF;
  --sh-1:0 1px 2px rgba(0,0,0,.4);
  --sh-2:0 2px 4px rgba(0,0,0,.4),0 14px 40px rgba(0,0,0,.5);
  --sh-3:0 18px 50px rgba(0,0,0,.6),0 4px 12px rgba(0,0,0,.4);
  --okt-hairglow:rgba(31,217,143,.18);
  --okt-liveglow:0 0 14px rgba(31,217,143,.45);
}
:root{ --okt-hairglow:transparent; --okt-liveglow:none; }

html{ scroll-behavior:smooth; }
body, .card, .statusbar, .rail, .ubar, .topbar, .login, .usheet__box{
  transition:background-color .45s cubic-bezier(.4,0,.2,1), border-color .45s cubic-bezier(.4,0,.2,1), color .45s cubic-bezier(.4,0,.2,1);
}
@media (prefers-reduced-motion:reduce){ *{ transition:none!important; animation:none!important; } }

/* Night: cool the shell background grid + login */
[data-theme="night"] body{ background:var(--bg); }
[data-theme="night"] .login{ background:
  radial-gradient(1200px 600px at 50% -10%, rgba(34,199,238,.05), transparent 60%), var(--bg); }
[data-theme="night"] .ticker{ background:#03060A; border-bottom:1px solid var(--line); }
[data-theme="night"] .badge--real i{ box-shadow:var(--okt-liveglow); }

/* ---------------- Theme toggle (topbar + login) ---------------- */
.theme-toggle{ width:38px;height:38px;border-radius:11px;border:1px solid var(--line);
  background:var(--surface); color:var(--ink-3); display:grid;place-items:center; cursor:pointer;
  transition:.18s; box-shadow:var(--sh-1); padding:0; }
.theme-toggle:hover{ color:var(--ink); border-color:var(--line-2); }
.theme-toggle:focus-visible{ outline:2px solid var(--built); outline-offset:2px; }
.theme-toggle svg{ width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round; }
.login__theme{ display:flex; justify-content:center; gap:2px; margin:14px 0 0;
  background:var(--sunken); border:1px solid var(--line); border-radius:10px; padding:3px; }
.login__theme button{ flex:1; border:0; background:transparent; color:var(--ink-3); font:inherit;
  font-size:12px; padding:7px 0; border-radius:8px; cursor:pointer; transition:.15s; }
.login__theme button.on{ background:var(--surface); color:var(--ink); box-shadow:var(--sh-1); }

/* ---------------- R14 user status bar (3 cells) ---------------- */
.sbar14{ display:grid; grid-template-columns:1.25fr 0.9fr 1.15fr; margin:0 0 4px;
  background:var(--surface); border:1px solid var(--line); border-radius:16px;
  box-shadow:var(--sh-1); overflow:hidden; }
.sbar14 .sc{ padding:13px 16px; min-width:0; }
.sbar14 .sc + .sc{ border-left:1px solid var(--line); }
.sbar14 .sc__l{ font-family:var(--mono); font-size:9.5px; font-weight:600; letter-spacing:.11em;
  text-transform:uppercase; color:var(--ink-4); display:flex; align-items:center; gap:6px; }
.sbar14 .sc__v{ font-family:var(--display); font-weight:700; font-size:18px; margin-top:6px;
  letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sbar14 .sc__v small{ font-family:var(--mono); font-weight:500; font-size:10.5px; color:var(--ink-4); margin-left:3px; }
.sbar14 .sc--btn{ cursor:pointer; transition:background .18s; border:0; background:transparent;
  text-align:left; font:inherit; color:inherit; }
.sbar14 .sc--btn:hover{ background:var(--surface-2); }
.sbar14 .sc--btn:focus-visible{ outline:2px solid var(--built); outline-offset:-2px; }
.sbar14 .sc--btn .sc__v{ display:flex; align-items:center; gap:7px; }
.sbar14 .chev{ width:14px;height:14px;stroke:var(--ink-4);fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round; flex:0 0 auto; }
.sbar14 .sc--soon .sc__v{ color:var(--ink-5); }
.badge-soon{ font-family:var(--mono); font-size:8.5px; font-weight:600; letter-spacing:.09em;
  color:var(--ink-4); border:1px solid var(--line-2); border-radius:99px; padding:2px 7px; text-transform:uppercase; }
.lc-dot{ width:6px;height:6px;border-radius:50%;background:var(--built);display:inline-block;
  box-shadow:var(--okt-liveglow); animation:lcp 2.2s ease-in-out infinite; }
@keyframes lcp{ 0%,100%{opacity:.55} 50%{opacity:1} }
@keyframes capUp{ 0%{color:var(--built)} 100%{color:inherit} }
@keyframes capDn{ 0%{color:var(--danger)} 100%{color:inherit} }
.sc__v.up{ animation:capUp 1.1s ease-out; }
.sc__v.dn{ animation:capDn 1.1s ease-out; }
@media (max-width:560px){
  .sbar14 .sc{ padding:11px 12px; }
  .sbar14 .sc__v{ font-size:15.5px; }
}

/* ---------------- User: hide rail, anchors in topbar (desktop one-pager) ---------------- */
body.role-user .rail{ display:none; }
body.role-user .topbar #tbCrumb{ display:none; }
.uanchors{ display:none; }
@media (min-width:861px){
  body.role-user .uanchors{ display:flex; gap:2px; margin-left:14px; }
}
.uanchors button{ border:0; background:transparent; font-family:var(--mono); font-size:11.5px;
  font-weight:600; letter-spacing:.05em; color:var(--ink-4); padding:8px 12px; border-radius:9px;
  cursor:pointer; transition:.15s; }
.uanchors button:hover{ color:var(--ink); background:var(--surface); }

/* ---------------- Bottom tab bar R14 (mobile, user) ---------------- */
body.role-user .ubar{ display:none; }
@media (max-width:860px){
  body.role-user .ubar{ position:sticky; bottom:0; z-index:40;
    display:grid; grid-template-columns:repeat(3,1fr);
    background:var(--surface); border-top:1px solid var(--line);
    padding:7px 10px calc(7px + env(safe-area-inset-bottom));
    box-shadow:0 -6px 24px rgba(11,14,20,.06); }
  [data-theme="night"] body.role-user .ubar{ box-shadow:0 -8px 30px rgba(0,0,0,.5); }
}
.ubar button{ border:0; background:transparent; cursor:pointer; display:flex; flex-direction:column;
  align-items:center; gap:3px; padding:5px 0; color:var(--ink-4); transition:.15s; font:inherit; }
.ubar button.active{ color:var(--ink); }
.ubar button.active svg{ filter:drop-shadow(0 0 6px var(--okt-hairglow)); }
.ubar button[disabled]{ color:var(--ink-5); cursor:not-allowed; }
.ubar button svg{ width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round; }
.ubar button span{ font-family:var(--mono); font-size:10px; font-weight:600; letter-spacing:.04em; }
.ubar button .soon{ font-size:7.5px; letter-spacing:.08em; color:var(--ink-5); margin-top:-1px; }
.ubar button:focus-visible{ outline:2px solid var(--built); outline-offset:-2px; border-radius:8px; }

/* ---------------- Today view · R14 deck + components ---------------- */
.udeck, .ucol{ display:contents; }
/* The stock .app grid keeps a rail track (grid-template-columns:
   var(--rail-w) 1fr) even when the rail is display:none — .main then sits
   in the 78px rail track. For role-user the app is single-column. */
body.role-user .app{ grid-template-columns:1fr; }
body.role-user .main{ min-width:0; }
@media (min-width:861px){
  body.role-user .udeck{ display:grid; grid-template-columns:minmax(0,1fr) 372px; column-gap:14px; align-items:start; }
  body.role-user .ucol{ display:block; min-width:0; }
  body.role-user .ucol--main{ order:0; }
  body.role-user .ucol--side{ order:1; }
}
.ut-tiles{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ut-tile{ position:relative; background:var(--surface-2); border:1px solid var(--line); border-radius:14px;
  padding:13px 14px; cursor:pointer; transition:.18s; display:flex; flex-direction:column; gap:7px;
  min-height:106px; text-align:left; font:inherit; color:inherit; }
.ut-tile:hover{ border-color:var(--built-line); transform:translateY(-1px); box-shadow:var(--sh-1); }
[data-theme="night"] .ut-tile:hover{ box-shadow:0 8px 40px rgba(31,217,143,.06); }
.ut-tile:focus-visible{ outline:2px solid var(--built); outline-offset:2px; }
.ut-tile__h{ display:flex; align-items:center; gap:8px; }
.ut-tile__ic{ width:17px;height:17px;stroke:var(--ink-3);fill:none;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round; flex:0 0 auto; }
.ut-tile__t{ font-family:var(--mono); font-size:10px; font-weight:600; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-3); }
.ut-tile__dot{ margin-left:auto; min-width:17px; height:17px; padding:0 5px; border-radius:99px;
  background:var(--built); color:#fff; font-family:var(--mono); font-size:10px; font-weight:700;
  line-height:17px; text-align:center; box-shadow:var(--okt-liveglow); }
[data-theme="night"] .ut-tile__dot{ color:#04120C; }
.ut-tile__big{ font-family:var(--display); font-weight:700; font-size:22px; letter-spacing:-.02em; line-height:1; }
.ut-tile__big.pos{ color:var(--built); }
.ut-tile__big.neg{ color:var(--danger); }
.ut-tile__sm{ font-size:12px; color:var(--ink-3); line-height:1.45; }
.ut-tile__x{ display:flex; align-items:center; gap:5px; font-family:var(--mono); font-size:12px;
  font-weight:600; color:var(--ink-2); }
.ut-tile__foot{ margin-top:auto; font-family:var(--mono); font-size:10px; font-weight:500;
  color:var(--ink-4); display:flex; align-items:center; gap:5px; }
.ut-tile .arr{ width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round; }

/* equity hero */
.ut-eq{ position:relative; }
.ut-eq__foot{ display:flex; flex-wrap:wrap; align-items:center; gap:7px 16px; margin-top:12px;
  font-family:var(--mono); font-size:12px; color:var(--ink-3); }
.ut-eq__foot .v{ font-family:var(--display); font-weight:700; font-size:17px; color:var(--ink); letter-spacing:-.01em; }
.ut-eq__foot .lab{ color:var(--ink-4); font-size:10px; letter-spacing:.06em; text-transform:uppercase; }
.ut-eq__foot .pos{ color:var(--built); } .ut-eq__foot .neg{ color:var(--danger); }
.ut-uwlab{ font-family:var(--mono); font-size:8.5px; font-weight:600; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-4); margin:14px 0 3px; }
.ut-axis{ position:absolute; top:0; right:2px; height:100%; display:flex; flex-direction:column;
  justify-content:space-between; padding:2px 0; pointer-events:none;
  font-family:var(--mono); font-size:9px; font-weight:600; color:var(--ink-4); text-align:right; }

/* compact position rows */
.ut-prow{ display:grid; grid-template-columns:1fr auto; gap:3px 12px; align-items:center;
  padding:12px 4px; border-bottom:1px solid var(--line); cursor:pointer; transition:background .15s;
  border-left:0; border-right:0; border-top:0; background:transparent; width:100%; text-align:left;
  font:inherit; color:inherit; }
.ut-prow:last-child{ border-bottom:0; }
.ut-prow:hover{ background:var(--surface-2); }
.ut-prow:focus-visible{ outline:2px solid var(--built); outline-offset:-2px; }
.ut-prow__lead{ display:flex; align-items:center; gap:9px; min-width:0; }
.ut-prow__coin{ font-family:var(--display); font-weight:700; font-size:15px; }
.ut-prow__mtm{ font-family:var(--display); font-weight:700; font-size:15.5px; text-align:right;
  color:var(--ink-2); white-space:nowrap; }
.ut-prow__scale{ grid-column:1/2; display:flex; align-items:center; gap:7px; margin-top:2px; }
.ut-prow__cap{ font-family:var(--mono); font-size:8px; font-weight:700; letter-spacing:.06em; color:var(--ink-4); }
.ut-track{ position:relative; flex:1; height:4px; border-radius:99px;
  background:linear-gradient(90deg,var(--danger) 0,var(--line) 22%,var(--line) 78%,var(--built) 100%); opacity:.85; }
[data-theme="night"] .ut-track{ opacity:.7; }
.ut-track__e{ position:absolute; top:-3px; width:2px; height:10px; background:var(--ink-4);
  border-radius:1px; transform:translateX(-50%); }
.ut-track__d{ position:absolute; top:50%; width:11px; height:11px; border-radius:50%;
  background:var(--surface); border:2.5px solid var(--ink-2); transform:translate(-50%,-50%);
  transition:left .9s cubic-bezier(.3,.7,.3,1); box-shadow:var(--sh-1); }
[data-theme="night"] .ut-track__d{ border-color:var(--built); box-shadow:var(--okt-liveglow); }
.ut-prow__meta{ grid-column:2/3; justify-self:end; font-family:var(--mono); font-size:10.5px;
  font-weight:500; color:var(--ink-4); display:flex; gap:9px; align-items:center; margin-top:3px; }
.ut-prow__meta .mine{ color:var(--built); }

/* account rows (shared: desktop card + account view header) */
.ut-arow{ display:flex; align-items:baseline; gap:10px; padding:11px 0; border-bottom:1px solid var(--line); }
.ut-arow:last-child{ border-bottom:0; }
.ut-arow b{ font-family:var(--mono); font-size:9.5px; font-weight:600; letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-4); flex:0 0 112px; }
.ut-arow span{ font-size:13px; color:var(--ink-2); }
.ut-arow .mono-v{ font-family:var(--mono); font-size:12.5px; }
.ut-arow .note{ font-size:11px; color:var(--ink-4); }

/* inbox message rows (sheet) */
.ut-msg{ padding:12px 0; border-bottom:1px solid var(--line); }
.ut-msg:last-child{ border-bottom:0; }
.ut-msg__top{ display:flex; align-items:baseline; gap:8px; }
.ut-msg__from{ font-family:var(--mono); font-size:11px; font-weight:600; color:var(--built); }
.ut-msg__time{ margin-left:auto; font-family:var(--mono); font-size:10px; color:var(--ink-4); }
.ut-msg__sub{ font-weight:600; font-size:13.5px; margin:5px 0 3px; }
.ut-msg__body{ font-size:12.5px; color:var(--ink-3); line-height:1.55; }
.ut-msg__unread{ width:7px; height:7px; border-radius:50%; background:var(--built);
  box-shadow:var(--okt-liveglow); display:inline-block; }

/* desktop equity taller */
@media (min-width:861px){ body.role-user .ut-eqsvg{ height:220px!important; } }
