/* Design: minimal / Swiss, dense dashboard, amber primary. Day (light) theme is the default; the "Mode malam" switch
   sets html[data-theme=dark] (see theme.js). Fira Sans for text, Fira Code for numbers so digits line up in tables. */
:root {
  --bg: #f8fafc; --card: #ffffff; --muted-bg: #f1f5f9; --text: #0f172a; --muted: #5b6b82; --line: #e2e8f0;
  --primary: #f59e0b; --on-primary: #0f172a; --link: #b45309; --ring: #d97706;
  --pos: #047857; --neg: #b91c1c; --off: #94a3b8;
  --ok-bg: #ecfdf5; --err-bg: #fef2f2;
  --font: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fira Code", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 8px; --ease: 180ms ease-out;
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #0f172a; --card: #1a2133; --muted-bg: #222a3d; --text: #f8fafc; --muted: #94a3b8; --line: #2c374d;
  --primary: #f59e0b; --on-primary: #0f172a; --link: #fbbf24; --ring: #f59e0b;
  --pos: #34d399; --neg: #f87171; --off: #64748b;
  --ok-bg: rgba(52, 211, 153, .12); --err-bg: rgba(248, 113, 113, .14);
  color-scheme: dark;
}
body { transition: background-color 600ms ease, color 600ms ease; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 100%/1.55 var(--font); }   /* 100%: follows the user's text size setting */
body { font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--link); text-decoration: none; transition: color var(--ease); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
/* type scale (1.2 ratio): h1 1.6 / h2 1.15 / h3 1 rem; tight leading and slight negative tracking on headings */
h1 { font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; margin: 1.75rem 0 .6rem; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }   /* no one-word last lines */
.page-head p, .disclaimer, .tg-stats > p { max-width: 75ch; }   /* comfortable line length for running text */
.card h2 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; line-height: 1.45; }
.num, .kpi-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-variant-ligatures: none; }   /* no code ligatures in prices */
.tag, .verdict, .grade, .near-pill { font-variant-numeric: tabular-nums; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap;
  padding: .5rem 16px; background: var(--card); border-bottom: 1px solid var(--line); }
/* "MBG Future" mark: the original mascot + MBG glyphs, plus a Future tag (the logo has no F or r to cut from) */
.brand, .login-brand { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mascot { height: 34px; width: 34px; }
.brand-word { height: 15px; width: auto; margin-left: 2px; }
.brand-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  padding: .3rem .5rem; border-radius: 999px; color: #0f172a; background: var(--primary); }
:root[data-theme=dark] .brand-word { filter: invert(1); }
.login-brand { margin-bottom: 1rem; }
.login-brand .brand-mascot { height: 48px; width: 48px; }
.login-brand .brand-word { height: 21px; }
.top nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.top nav a { color: var(--muted); padding: .55rem .75rem; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--text); background: var(--muted-bg); text-decoration: none; }
.top nav a[aria-current=page] { color: var(--text); background: var(--muted-bg); box-shadow: inset 0 -2px 0 var(--primary); }
.who { color: var(--muted); margin-right: .5rem; font-size: .9rem; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .25rem; }

/* cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; margin-bottom: 1rem; }
.login { width: 100%; max-width: 360px; }
.login h1 { margin-bottom: 1rem; }
.narrow { max-width: 440px; margin-top: 1rem; }
label { display: block; margin-bottom: .9rem; font-size: .9rem; font-weight: 500; }
label input:not([type=checkbox]), select { display: block; width: 100%; margin-top: .3rem; padding: .6rem .7rem; min-height: 44px;
  font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  transition: border-color var(--ease); }
label input:not([type=checkbox]):hover, select:hover { border-color: var(--muted); }
select { cursor: pointer; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; cursor: pointer; min-height: 44px; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 .9rem; padding: .25rem .9rem; }
legend { font-size: .85rem; color: var(--muted); padding: 0 .25rem; }
.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.inline input { width: 9.5rem; padding: .4rem .5rem; font: inherit; font-size: .85rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 1rem; align-items: end; }
.grid-form .btn { margin-bottom: .9rem; }
.grid-form fieldset.ticks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-bottom: .9rem; }   /* page ticks in one long row */
.grid-form fieldset.ticks + .btn { justify-self: start; min-width: 10rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.1rem;
  font: inherit; font-weight: 600; cursor: pointer; background: var(--primary); color: var(--on-primary);
  border: 1px solid var(--primary); border-radius: 6px; transition: filter var(--ease), background var(--ease); }
.btn:hover { filter: brightness(1.08); }
.btn:active { filter: brightness(.95); }
.btn.small { min-height: 36px; padding: .3rem .75rem; font-size: .85rem; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--muted-bg); filter: none; }
.btn.danger { background: transparent; color: var(--neg); border-color: var(--neg); }
.btn.danger:hover { background: var(--err-bg); filter: none; }
.login .btn { width: 100%; margin-top: .25rem; }

.alert { padding: .7rem .9rem; border-radius: 6px; margin: 0 0 1rem; border-left: 3px solid; }
.alert.ok { background: var(--ok-bg); border-color: var(--pos); }
.alert.err { background: var(--err-bg); border-color: var(--neg); }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; background: var(--muted-bg); color: var(--muted); }
.tag.ok { background: var(--ok-bg); color: var(--pos); }

/* home */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.tile { display: flex; flex-direction: column; gap: .35rem; color: var(--text); margin: 0;
  transition: border-color var(--ease), transform var(--ease); }
.tile:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.tile span { color: var(--link); font-size: .9rem; }

/* home page: day = plain white, night = a dark sky with twinkling stars (stars.js) behind everything.
   The logo intro (logo.js) plays on an empty screen (body.intro hides the page), then docks into the header slot. */
body.home { background: #ffffff; }
:root[data-theme=dark] body.home { background: linear-gradient(#050816, #0b1026 60%, #0f172a) fixed; }
.night-sky { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none;
  opacity: 0; transition: opacity 900ms ease; }
:root[data-theme=dark] .night-sky { opacity: 1; }
body.intro { overflow: hidden; }
.home-top { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 64px; padding-right: 200px;
  transition: opacity 600ms ease, background-color 600ms ease; }
:root[data-theme=dark] .home-top { background: rgba(15, 23, 42, .72); backdrop-filter: blur(8px); }
.spacer { flex: 1; }
.brand-slot { display: block; height: 40px; flex: none; }
.home-main { position: relative; z-index: 1; padding-top: 96px; transition: opacity 600ms ease; }
body.intro .home-main, body.intro .home-top { opacity: 0; }
.theme-toggle.on-home { position: fixed; top: 10px; right: 16px; z-index: 70; }
/* the original logo, animated piece by piece; fixed so it can fly from the middle into the header */
.brand-logo { position: fixed; z-index: 60; left: 0; top: 0; pointer-events: none; }
.lp { position: absolute; left: 0; top: 0; max-width: none; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity;
  user-select: none; }
.lp-mascot { filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .28)); }
.lp-text { filter: drop-shadow(0 3px 6px rgba(15, 23, 42, .18)); }
/* night: white wordmark, a soft moonlit glow so the black badge stands out from the dark sky */
:root[data-theme=dark] .lp-text { filter: invert(1) drop-shadow(0 0 10px rgba(0, 0, 0, .25)); }
:root[data-theme=dark] .lp-mascot { filter: drop-shadow(0 0 2px rgba(226, 232, 240, .9)) drop-shadow(0 0 22px rgba(148, 163, 184, .45)); }
.lp { transition: filter 800ms ease; }
.section-title { font-size: 1.5rem; margin: 0 0 .5rem; }

/* day / night switch */
.theme-toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .25rem .4rem .25rem .8rem;
  font: inherit; font-size: .85rem; font-weight: 500; color: var(--text); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; transition: background var(--ease), border-color var(--ease); }
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle.on-hero { position: absolute; top: 16px; right: 16px; z-index: 3; color: #0f172a;
  background: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); }
:root[data-theme=dark] .theme-toggle.on-hero { color: #f8fafc; background: rgba(15, 23, 42, .6); border-color: rgba(148, 163, 184, .35); }
.tt-track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1; transition: background 300ms ease; }
.tt-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #f59e0b; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform 300ms cubic-bezier(.3, 1.4, .5, 1); }
.tt-moon { display: none; }
.tt-state::before { content: "OFF"; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.theme-toggle[aria-checked=true] .tt-track { background: #f59e0b; }
.theme-toggle[aria-checked=true] .tt-knob { transform: translateX(20px); color: #1e293b; }
.theme-toggle[aria-checked=true] .tt-sun { display: none; }
.theme-toggle[aria-checked=true] .tt-moon { display: block; }
.theme-toggle[aria-checked=true] .tt-state::before { content: "ON"; color: #f59e0b; }
.on-hero .tt-state::before { color: inherit; opacity: .7; }
.theme-toggle[aria-checked=true].on-hero .tt-state::before { color: #fbbf24; opacity: 1; }
@media (max-width: 480px) { .tt-label { display: none; } }
/* only rendered for logged-in users: the public home page shows nothing but the scene */
.member-pill { position: absolute; top: 16px; left: 16px; z-index: 3; display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: #0f172a;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); backdrop-filter: blur(8px); }
.member-pill:hover { text-decoration: none; background: rgba(255, 255, 255, .9); }
:root[data-theme=dark] .member-pill { color: #f8fafc; background: rgba(15, 23, 42, .6); border-color: rgba(148, 163, 184, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.empty { text-align: center; padding: 2.5rem 1rem; margin-top: 1.25rem; }
.empty p { margin: .35rem 0 0; }

/* signals */
.live { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px var(--ok-bg); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin: 1.25rem 0 .5rem; }
.kpi { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); }
.kpi-label { font-size: .8rem; color: var(--muted); }
.kpi-value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.kpi-sub { font-size: .8rem; color: var(--muted); }

.filters { display: flex; gap: .75rem 1.25rem; flex-wrap: wrap; align-items: end; margin: 1rem 0 0; }
.filters label { margin: 0; min-width: 150px; }
.filters label.check { min-width: 0; }

/* tables */
.scroll { overflow: auto; max-height: 70vh; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.card .scroll { border: 0; max-height: none; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--card); font-family: var(--font); font-size: .72rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }   /* small caps-style labels: sans, wider tracking */
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: var(--muted-bg); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
thead th.num { font-family: var(--font); font-variant-numeric: normal; }   /* numeric columns: digits mono, header label sans */
.pos { color: var(--pos); } .neg { color: var(--neg); }
tr.off td { color: var(--off); }
.side { display: inline-block; min-width: 3.6rem; text-align: center; padding: .05rem .4rem; border-radius: 4px;
  font-size: .75rem; font-weight: 600; letter-spacing: .03em; }
.side.long { color: var(--pos); background: var(--ok-bg); }
.side.short { color: var(--neg); background: var(--err-bg); }
/* Akun > Daftar user: name (opens the page ticks) · new password · delete */
.ulist { list-style: none; margin: 0; padding: 0; }
.urow { display: grid; grid-template-columns: minmax(0, 1fr) auto 5.5rem; gap: .5rem 1rem; align-items: center;
  padding: .5rem 0; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: 0; }
.urow.off .uname strong { color: var(--off); }
.uname { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .25rem; background: none; border: 0;
  color: inherit; font: inherit; cursor: pointer; text-align: left; justify-self: start; }
.uname::after { content: "\25BE"; color: var(--muted); transition: transform .15s; }
.uname[aria-expanded=true]::after { transform: rotate(180deg); }
.upw input { width: 11rem; }
.urow .udel { justify-self: end; }   /* Hapus alone at the far right, in a fixed column */
.uaccess { grid-column: 1 / -1; padding: .5rem .75rem .75rem; border: 1px solid var(--line); border-radius: var(--r); }
.uaccess fieldset { display: flex; flex-wrap: wrap; gap: 0 1.25rem; border: 0; margin: 0; padding: 0; }
.uaccess legend { font-weight: 600; margin-bottom: .25rem; }
.uflags { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin-top: .25rem;
  border-top: 1px dashed var(--line); padding-top: .25rem; }
.uflags .btn { margin-left: auto; }
@media (max-width: 640px) {
  .urow { grid-template-columns: minmax(0, 1fr) 5.5rem; }
  .upw { grid-column: 1 / -1; grid-row: 2; display: flex; gap: .5rem; }
  .upw input { flex: 1; width: auto; min-width: 0; }
  .urow > span:empty { display: none; }   /* your own row: no password / delete cells */
}
.tag.bad { background: var(--err-bg); color: var(--neg); }
.tag.weak { opacity: .5; }   /* F&F: vetoed or rejected signal, shown but not counted as "Ada sinyal" */

/* admin sub-menu */
.subnav { display: flex; gap: .25rem; margin: .75rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.subnav a { padding: .6rem .9rem; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a[aria-current=page] { color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }

/* member signal cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.signal { display: flex; flex-direction: column; gap: .75rem; margin: 0; }
.sig-head { display: flex; align-items: center; justify-content: space-between; }
.sig-coin { font-size: 1.25rem; font-family: var(--mono); }
.sig-levels { display: grid; gap: .3rem; margin: 0; }
.sig-levels div { display: flex; justify-content: space-between; align-items: baseline; }
.sig-levels dt { color: var(--muted); font-size: .85rem; }
.sig-levels dd { margin: 0; }
.sig-bar { position: relative; height: 6px; margin: .9rem 0 .4rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--err-bg), var(--muted-bg) 50%, var(--ok-bg)); }
.sig-bar-entry { position: absolute; top: -4px; width: 2px; height: 14px; margin-left: -1px; background: var(--muted); }
.sig-bar-px { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 2px solid var(--card); background: var(--pos); }
.sig-bar-px.down { background: var(--neg); }
.sig-bar-sl, .sig-bar-tp { position: absolute; top: 10px; font-size: .7rem; color: var(--muted); }
.sig-bar-sl { left: 0; } .sig-bar-tp { right: 0; }
.sig-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.sig-meta { margin-top: auto; }

/* weekly results chart (colours validated with the dataviz palette checker, light and dark) */
:root { --gain: #047857; --loss: #b91c1c; }
:root[data-theme=dark] { --gain: #0ea5a0; --loss: #e5484d; }
.chart-card h2 { margin-bottom: .75rem; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .bar.gain { fill: var(--gain); }
.chart .bar.loss { fill: var(--loss); }
.chart .hit { fill: transparent; }
.chart .bar-g { cursor: pointer; outline: none; }
.chart .bar-g:hover .hit, .chart .bar-g:focus .hit { fill: var(--muted-bg); opacity: .6; }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); padding: .35rem .6rem; border-radius: 6px; font-size: .8rem;
  white-space: nowrap; pointer-events: none; color: var(--text); background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.chart-note { margin: .5rem 0 0; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.key.gain { background: var(--gain); } .key.loss { background: var(--loss); }
.table-view { margin-top: .75rem; }
.table-view summary { cursor: pointer; color: var(--link); font-size: .9rem; min-height: 32px; }

@media (max-width: 640px) {
  .who { display: none; }
  .top .theme-toggle .tt-label { display: none; }
  h1 { font-size: 1.3rem; }
  .kpi-value { font-size: 1.25rem; }
  .filters label { min-width: 0; flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .tt-knob { transition: none; }
  .tile:hover { transform: none; }
}

/* ======================= MBG Future member area ======================= */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; vertical-align: -3px; }
.i.lg { width: 36px; height: 36px; stroke-width: 1.5; color: var(--muted); }

/* app bar: top bar on wide screens, the same nav becomes a bottom tab bar on phones */
.app-top { position: sticky; top: 0; z-index: 20; gap: .75rem; padding: .5rem 16px; }
.main-nav { display: flex; gap: .25rem; flex: none; }
.main-nav a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .8rem; border-radius: 8px;
  color: var(--muted); font-weight: 500; transition: color var(--ease), background var(--ease); }
.main-nav a:hover { color: var(--text); background: var(--muted-bg); text-decoration: none; }
.main-nav a[aria-current=page] { color: var(--text); background: var(--muted-bg); box-shadow: inset 0 -2px 0 var(--primary); }
.icon-btn { gap: .4rem; }
@media (max-width: 720px) {
  .app-top { gap: .5rem; }
  .main-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; justify-content: space-around; gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
  .main-nav a { flex: 1; flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 0; font-size: .72rem;
    justify-content: center; border-radius: 10px; }
  .main-nav a .i { width: 22px; height: 22px; }
  .main-nav a[aria-current=page] { box-shadow: none; color: var(--link); background: transparent; }
  .main-nav a[aria-current=page] .i { stroke-width: 2.4; }
  body:has(.main-nav) main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .hide-sm { display: none; }
  .theme-toggle .tt-state { display: none; }
}

.page-head { align-items: flex-start; margin-bottom: 1rem; }
.page-head p { margin: .25rem 0 0; }
.live { white-space: nowrap; padding-top: .35rem; }
.live.stale .dot { background: var(--primary); box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }

/* chips: filters (buttons / links with aria-pressed) and static labels */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .9rem; border-radius: 999px; font: inherit;
  font-size: .85rem; font-weight: 500; color: var(--text); background: var(--card); border: 1px solid var(--line);
  cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease); }
.chip:hover { border-color: var(--muted); text-decoration: none; }
.chip[aria-pressed=true] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.static { min-height: 24px; padding: 0 .55rem; font-size: .75rem; cursor: default; background: var(--muted-bg); border-color: transparent; color: var(--muted); }
@media (pointer: coarse) { .chip:not(.static) { min-height: 44px; } }

/* signal cards */
.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 0; }
.signal { gap: .9rem; padding: 1.1rem; transition: border-color var(--ease), box-shadow var(--ease), opacity var(--ease); }
.signal:hover { border-color: var(--muted); box-shadow: 0 6px 20px rgba(15, 23, 42, .06); }
.signal.closed { opacity: .55; }
.signal[hidden] { display: none; }
[hidden] { display: none !important; }   /* components that set display (e.g. .card.empty) must still hide */
.sig-coin { font-size: 1.2rem; margin-right: 2px; }
.side-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 6px; font-size: .75rem;
  font-weight: 700; letter-spacing: .03em; }
.side-pill .i { width: 14px; height: 14px; vertical-align: 0; }
.side-pill.long { color: var(--pos); background: var(--ok-bg); }
.side-pill.short { color: var(--neg); background: var(--err-bg); }
.sig-hero { display: flex; flex-direction: column; gap: .15rem; }
.sig-move { font-size: 1.9rem; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.sig-bar { height: 8px; margin: .25rem 0 0; background: var(--muted-bg); }
.sig-bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--pos); opacity: .35; }
.sig-bar-fill.down { background: var(--neg); }
.sig-bar-entry { top: -3px; height: 14px; width: 2px; background: var(--text); opacity: .5; }
.sig-bar-px { width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line);
  transition: left 600ms ease; }
.sig-bar-labels { display: flex; justify-content: space-between; margin-top: -.5rem; font-size: .7rem; }
.sig-levels { gap: 0; border-top: 1px solid var(--line); }
.sig-levels div { padding: .15rem 0; border-bottom: 1px solid var(--line); }
.sig-levels dt { font-size: .8rem; }
.sig-levels dt span { font-family: var(--mono); font-size: .75rem; margin-left: .25rem; }
.copy { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .25rem 0 .5rem; margin-right: -.25rem;
  font-size: .95rem; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer;
  transition: background var(--ease); }
.copy .i { width: 15px; height: 15px; color: var(--muted); }
.copy:hover { background: var(--muted-bg); }
.copy.copied .i { color: var(--pos); }
.sig-meta { display: flex; align-items: center; gap: .4rem; }
.sig-meta time { margin-left: auto; }
.disclaimer { margin-top: 1.5rem; }

/* empty states */
.empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }

/* history */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: 1rem; }
.toolbar .chips { margin: 0; }
.search { display: flex; gap: .4rem; margin-left: auto; }
.search input { min-height: 36px; width: 12rem; padding: 0 .7rem; font: inherit; font-size: .9rem; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.summary-strip { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: .7rem 1rem; margin-bottom: 1rem; border-radius: var(--r);
  background: var(--muted-bg); font-size: .9rem; color: var(--muted); }
.summary-strip strong { color: var(--text); font-size: 1rem; }
.tag { display: inline-flex; align-items: center; gap: .25rem; }
.tag .i { width: 13px; height: 13px; vertical-align: 0; }
@media (max-width: 720px) {
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; width: auto; min-height: 44px; }
  /* table rows become cards on phones: coin + result + ROI on top, the rest as label/value pairs */
  .scroll:has(table.responsive) { background: none; border: 0; overflow: visible; max-height: none; }
  table.responsive thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.responsive tbody { display: grid; gap: .75rem; }
  table.responsive tr { display: grid; grid-template-columns: 1fr 1fr; gap: .1rem 1rem; padding: .9rem 1rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
  table.responsive td { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; border: 0; white-space: normal; text-align: right; }
  table.responsive td::before { content: attr(data-label); color: var(--muted); font-family: var(--font); font-size: .78rem; text-align: left; }
  table.responsive td.cell-coin { grid-column: 1 / -1; order: -2; font-size: 1.05rem; }
  table.responsive td.cell-coin::before, table.responsive td.cell-roi::before { display: none; }
  table.responsive td.cell-roi { grid-column: 1 / -1; order: -1; justify-content: flex-start; font-size: 1.35rem; font-weight: 600; }
}

/* toast (copy feedback) */
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: .6rem 1rem; border-radius: 999px; font-size: .85rem; color: var(--bg); background: var(--text);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
@media (max-width: 720px) { body:has(.main-nav) .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* login */
.login-page .theme-toggle { position: fixed; top: 12px; right: 16px; z-index: 5; }
.login h1 { margin: 0 0 .25rem; }
.login > label { margin: 1rem 0 .3rem; }
.login input { display: block; width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; transition: border-color var(--ease), box-shadow var(--ease); }
.login input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); }
.login input[aria-invalid=true] { border-color: var(--neg); }
.pw { position: relative; }
.pw input { padding-right: 3rem; }
.pw-toggle { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { color: var(--text); }
.field-error { display: flex; align-items: center; gap: .35rem; margin: .5rem 0 0; color: var(--neg); font-size: .85rem; }
.field-error .i { width: 15px; height: 15px; }
.btn.block { width: 100%; min-height: 48px; margin-top: 1.25rem; }
.btn.busy { opacity: .75; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .sig-bar-px { transition: none; } }
.app-top .main-nav { flex: 0 1 auto; flex-wrap: nowrap; }
@media (min-width: 721px) and (max-width: 1100px) { .app-top .who { display: none; } .main-nav a { padding: 0 .6rem; } }

/* pre-delivery fixes (ui-ux-pro-max checklist) */
/* touch targets >= 44px on touch screens */
@media (pointer: coarse) {
  .copy { min-height: 44px; }
  .app-top .icon-btn { min-height: 44px; min-width: 44px; }
}
/* pressed feedback without shifting layout */
.chip:active, .copy:active, .main-nav a:active, .btn:active, .theme-toggle:active { opacity: .7; }
/* keep keyboard focus clear of the sticky header and the phone tab bar */
html { scroll-padding-top: 80px; }
@media (max-width: 720px) { html { scroll-padding-bottom: 96px; } }
/* readable line length for prose */
.page-head p, .disclaimer, .chart-note, .login p { max-width: 70ch; }
/* large text: tab items share the width evenly and long labels truncate instead of pushing items off-screen */
@media (max-width: 720px) {
  .main-nav a { flex: 1 1 0; min-width: 0; }
  .main-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* the older ".top nav a" padding outranks ".main-nav a"; reset it for the phone tab bar */
@media (max-width: 720px) { .app-top .main-nav a { padding: 4px 2px; } }
@media (min-width: 721px) and (max-width: 1100px) { .app-top .tt-label { display: none; } }

/* ======================= login (3D card) ======================= */
body.login-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: radial-gradient(60% 50% at 50% 30%, rgba(245, 158, 11, .14), transparent 70%),
              radial-gradient(40% 40% at 85% 90%, rgba(14, 165, 160, .08), transparent 70%), var(--bg); }
:root[data-theme=dark] body.login-page {
  background: radial-gradient(60% 50% at 50% 28%, rgba(245, 158, 11, .16), transparent 70%),
              radial-gradient(45% 45% at 80% 95%, rgba(91, 143, 249, .12), transparent 70%), #0b1020; }
.login-page .theme-toggle { position: static; }   /* undo the earlier floating placement */
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 20px; }
.login-top .brand-mascot { height: 40px; width: 40px; }
.login-top .brand-word { height: 17px; }
.login-stage { flex: 1; display: grid; place-items: center; padding: 16px 16px 48px; }
.login-scene { perspective: 1200px; width: 100%; max-width: 400px; }
.login-card { position: relative; display: block; padding: 3.25rem 1.75rem 1.5rem; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .88)) padding-box,
              linear-gradient(160deg, rgba(255, 255, 255, 1), rgba(226, 232, 240, .9) 40%, rgba(245, 158, 11, .45)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(15, 23, 42, .06), 0 8px 16px rgba(15, 23, 42, .06),
              0 24px 48px -12px rgba(15, 23, 42, .18), 0 48px 80px -24px rgba(180, 83, 9, .18);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform 400ms cubic-bezier(.2, .8, .2, 1), box-shadow 400ms ease; }
:root[data-theme=dark] .login-card {
  background: linear-gradient(180deg, rgba(30, 38, 58, .96), rgba(20, 27, 44, .92)) padding-box,
              linear-gradient(160deg, rgba(148, 163, 184, .45), rgba(51, 65, 85, .6) 40%, rgba(245, 158, 11, .5)) border-box;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 8px 16px rgba(0, 0, 0, .3), 0 32px 64px -16px rgba(0, 0, 0, .6),
              0 40px 90px -30px rgba(245, 158, 11, .25); }
.login-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;   /* moving sheen */
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .35), transparent 45%);
  opacity: .6; mix-blend-mode: soft-light; }
.login-badge { position: absolute; top: 0; left: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%) translateZ(40px);
  border-radius: 50%; background: var(--card); padding: 5px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .22), 0 0 0 1px var(--line); }
.login-badge img { width: 100%; height: 100%; display: block; }
.login-card h1 { margin: .25rem 0 .2rem; text-align: center; font-size: 1.6rem; }
.login-card > .muted { text-align: center; margin: 0 0 1.25rem; }
.login-card > label { display: block; margin: 1rem 0 .35rem; font-size: .85rem; font-weight: 600; }
.login-card input { display: block; width: 100%; min-height: 50px; padding: .65rem .9rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, .06); transition: border-color var(--ease), box-shadow var(--ease); }
:root[data-theme=dark] .login-card input { background: rgba(8, 12, 24, .6); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
.login-card input:focus { outline: none; border-color: var(--ring);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, .06), 0 0 0 4px rgba(245, 158, 11, .22); }
.login-card input[aria-invalid=true] { border-color: var(--neg); }
.login-card .pw-toggle { top: 3px; right: 3px; }
/* the button sits on a darker "base" and sinks into it when pressed */
.btn-3d { position: relative; display: block; width: 100%; min-height: 52px; margin-top: 1.5rem; font: inherit; font-weight: 700;
  font-size: 1rem; letter-spacing: .02em; color: #1c1206; cursor: pointer; border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #fbbf24, #f59e0b); box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 5px 0 #b45309,
  0 12px 20px -6px rgba(180, 83, 9, .55); transform: translateY(0); transition: transform 120ms ease, box-shadow 120ms ease, filter 160ms ease; }
.btn-3d:hover { filter: brightness(1.05); }
.btn-3d:active, .btn-3d.busy { transform: translateY(4px); box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 1px 0 #b45309,
  0 4px 10px -4px rgba(180, 83, 9, .5); }
.btn-3d:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.btn-3d.busy { cursor: progress; filter: saturate(.8); }
.login-foot { display: flex; align-items: center; justify-content: center; gap: .35rem; margin: 1.1rem 0 0; text-align: center; }
.login-foot .i { width: 14px; height: 14px; }
@media (max-width: 480px) {
  .login-top { padding: 12px 16px; }
  .login-card { padding: 3rem 1.25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .login-card, .btn-3d { transition: none; } }
.login-card .login-foot { margin-top: 1.6rem; }   /* clear the button's 5px base */
/* "Future" tag in a geometric face that matches the logo's MBG glyphs (Fira Sans read as slanted beside them) */
.brand-tag { font-family: "Outfit", var(--font); font-weight: 700; font-style: normal; letter-spacing: .08em;
  line-height: 1; padding: .32rem .6rem .3rem; display: inline-flex; align-items: center; align-self: center; }
/* password fields with show/hide eye (account page; the login card has its own look) */
.pw-form label { display: block; margin: 1rem 0 .3rem; font-size: .9rem; font-weight: 500; }
.pw-form .pw input { display: block; width: 100%; min-height: 44px; padding: .55rem 3rem .55rem .7rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; transition: border-color var(--ease), box-shadow var(--ease); }
.pw-form .pw input:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(245, 158, 11, .22); }
.pw-form .pw input[aria-invalid=true] { border-color: var(--neg); }
.pw-form .pw-toggle { top: 0; right: 0; }
.pw-toggle[aria-pressed=true] { color: var(--link); }
.pw-form .hint { margin: .3rem 0 0; }
.pw-form .btn { margin-top: 1.25rem; }
details.fold > summary { display: flex; align-items: center; gap: .75rem; cursor: pointer; list-style: none; min-height: 44px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::after { content: "BE"; color: var(--muted); margin-left: auto; transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold .fold-hint::before { content: "tampilkan"; }
details.fold[open] .fold-hint::before { content: "sembunyikan"; }
.pw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; align-items: start; }
.pw-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.pw-foot p { margin: 1.25rem 0 0; }


/* Sinyal (scanner AUTO): score row, grade, confluence list, market lines */
.sig-score { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: .1rem 0 .4rem; }
.score-num { font: 600 1.05rem/1 var(--mono); }
.score-num.long { color: var(--pos); } .score-num.short { color: var(--neg); }
.verdict, .grade { display: inline-block; padding: .1rem .45rem; border-radius: 6px; font-size: .72rem; font-weight: 600;
  background: var(--muted-bg); color: var(--muted); }
.verdict.ok, .grade.gA { background: var(--ok-bg); color: var(--pos); }
.verdict.wa, .grade.gB { background: rgba(245, 158, 11, .15); color: var(--link); }
.grade.gC { background: var(--err-bg); color: var(--neg); }
details.chk { margin: .5rem 0 .25rem; font-size: .82rem; }
details.chk summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
details.chk ul { list-style: none; margin: .25rem 0 0; padding: 0; }
details.chk li { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .35rem; padding: .2rem 0; border-top: 1px dashed var(--line); }
details.chk li .muted { text-align: right; }
.regime-line { margin: .6rem 0 .2rem; font-size: .88rem; font-weight: 600; }
.dom-line { margin: 0 0 .6rem; }

/* Sinyal rows, left to right: the signal, its live TradingView chart, its liquidity heatmap */
.sig-rows { display: grid; gap: .75rem; margin-top: .75rem; }
.sig-row { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; padding: .85rem; scroll-margin-top: 80px; }
.sig-row .row-info { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.sig-row .sig-coin { font-size: 1.05rem; }
/* a token name anywhere opens it on the Scanner page */
.coin-link { color: inherit; text-decoration: none; }
.coin-link:hover, .coin-link:focus-visible { color: var(--accent, #2563eb); text-decoration: underline; }
.sig-row .sig-score { margin: 0; }
.sig-row .sig-hero { flex-direction: row; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.sig-row .sig-move { font-size: 1.25rem; }
.sig-row .sig-bar { margin: .1rem 0; height: 6px; }
.sig-levels.compact { gap: .1rem; font-size: .8rem; }
.sig-levels.compact div { gap: .5rem; min-width: 0; }
.sig-levels.compact dt { font-size: .75rem; white-space: nowrap; }
.sig-levels.compact .copy { font-size: .8rem; }
.sig-row .sig-meta { margin-top: 0; flex-wrap: wrap; }
.sig-row details.chk { margin: 0; }
.row-panel { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.panel-title { margin: 0; font-size: .78rem; font-weight: 600; color: var(--muted); }
.row-chart { height: 320px; border-radius: 6px; overflow: hidden; background: var(--muted-bg);
  display: flex; align-items: center; justify-content: center; }
.row-chart .tradingview-widget-container { width: 100%; height: 100%; align-self: stretch; }
.row-chart .tradingview-widget-container__widget { height: 100%; }
.row-heat { position: relative; }
.row-heat canvas { display: block; width: 100%; height: 320px; border-radius: 6px; background: var(--card); cursor: crosshair; }
.heat-xh, .heat-xv { position: absolute; pointer-events: none; border: 0 dashed rgba(15, 23, 42, .45); }
.heat-xh { border-top-width: 1px; }
.heat-xv { border-left-width: 1px; }
:root[data-theme=dark] .heat-xh, :root[data-theme=dark] .heat-xv { border-color: rgba(255, 255, 255, .55); }
.heat-tip { position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: .15rem;
  padding: .5rem .65rem; border-radius: var(--r); background: var(--card); color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3); font-size: .75rem; line-height: 1.35; white-space: nowrap; }
.heat-tip span { display: flex; align-items: center; gap: .4rem; }
.heat-tip span b { margin-left: auto; padding-left: 1rem; }
.heat-tip small { color: var(--muted); font-size: .68rem; }
.heat-tip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.heat-tip .dot.hot { background: #f5c542; }
.heat-tip .dot.up { background: var(--neg); }
.heat-tip .dot.down { background: #3b82f6; }
.heat-tip[hidden], .heat-xh[hidden], .heat-xv[hidden], .heat-sum[hidden] { display: none; }
.heat-sum { display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; align-items: center; gap: .2rem .5rem;
  margin-bottom: .35rem; font-size: .75rem; }
.heat-sum .up { color: var(--neg); font-weight: 600; }
.heat-sum .down { color: #3b82f6; font-weight: 600; text-align: right; }
.heat-sum small { color: var(--muted); font-weight: 400; }
.heat-sum .bar { height: 8px; border-radius: 4px; background: #3b82f6; overflow: hidden; }
.heat-sum .bar i { display: block; height: 100%; background: var(--neg); }
.heat-sum .verdict { grid-column: 1 / -1; color: var(--muted); font-size: .72rem; }
.heat-note { margin: .3rem 0 0; }
@media (max-width: 1100px) {   /* signal on top, chart and heatmap side by side under it */
  .sig-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sig-row .row-info { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .sig-row { grid-template-columns: minmax(0, 1fr); }
  .row-chart, .row-heat canvas { height: 260px; }
}
.row-chart { background: var(--card); }
.chart-legend { margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .6rem; font-size: .72rem; }
.live-badge { margin-left: .35rem; font-size: .68rem; font-weight: 700; color: var(--muted); }
.live-badge.on { color: #00c853; }
.lg-bb { color: #94a3b8; } .lg-mid { color: #d4a100; } .lg-mfh { color: #c026d3; } .lg-msh { color: #dc2626; }
.lg-mfl { color: #0891b2; } .lg-msl { color: #2563eb; } .lg-e50 { color: #16a34a; }
[data-theme=dark] .lg-bb { color: #cbd5e1; } [data-theme=dark] .lg-mid { color: #ffeb3b; } [data-theme=dark] .lg-mfh { color: #e040fb; }
[data-theme=dark] .lg-msh { color: #f23645; } [data-theme=dark] .lg-mfl { color: #00bcd4; } [data-theme=dark] .lg-msl { color: #3d7bff; }
[data-theme=dark] .lg-e50 { color: #00e676; }
.range-chips { display: inline-flex; gap: 2px; margin-left: .4rem; vertical-align: middle; }
.range-chips button { font: inherit; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; min-height: 24px; border-radius: 5px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.range-chips button[aria-pressed=true] { background: var(--muted-bg); color: var(--text); border-color: var(--primary); }

/* Scanner (manual check): one row that fits the screen, checklist always open */
.scan-form { margin: .25rem 0 .75rem; }
.scan-label { display: block; font-size: 1.15rem; font-weight: 700; margin-bottom: .45rem; }
.scan-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.scan-bar input[name=sym] { flex: 1 1 220px; min-height: 44px; padding: 0 .8rem; font: inherit; font-size: 1rem; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--text); }
.scan-bar .chips { margin: 0; }
.scan-bar .chip { margin: 0; }   /* chips are <label>s: drop the form-label bottom margin that lifted them */
.scan-bar .chip input { position: absolute; opacity: 0; pointer-events: none; width: 0; min-height: 0; margin: 0; padding: 0; }
.scan-bar .chip:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }
.scan-form .muted.small { margin: .35rem 0 0; }
@media (max-width: 600px) { .scan-bar input[name=sym] { flex-basis: 100%; } }   /* phone: timeframe chips + Scan on their own row */
.scan-page .sig-row { grid-template-columns: 300px minmax(0, 1fr) minmax(0, 1fr); }
.scan-page .row-chart, .scan-page .row-heat canvas { height: 400px; }
.scan-page details.chk { font-size: .74rem; }
.scan-page details.chk li { padding: .12rem 0; }
@media (max-width: 1100px) { .scan-page .sig-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) { .scan-page .sig-row { grid-template-columns: minmax(0, 1fr); } .scan-page .row-chart, .scan-page .row-heat canvas { height: 280px; } }

/* L/S (taker buy vs sell, MEXC) next to the coin name */
.sig-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; min-width: 0; }
.ls { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font: 600 .68rem/1 var(--mono); white-space: nowrap; }
.ls-bar { position: relative; width: 26px; height: 4px; border-radius: 999px; background: var(--neg); opacity: .8; overflow: hidden; }
.ls-bar i { position: absolute; inset: 0 auto 0 0; background: var(--pos); }

/* Heatmap page */
.notif-card { display: grid; gap: 1rem; }
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.notif-row h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.notif-row p { margin: 0; }
.tg-row { border-top: 1px solid var(--line); padding-top: 1rem; }
.tg-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.notif-btn[aria-pressed=false] { background: transparent; color: var(--text); border-color: var(--line); }
.heat-board { margin-bottom: 1rem; max-height: none; }
.heat-board tr.hot td { background: var(--err-bg); }
.near-pill { display: inline-block; min-width: 4.2em; padding: .1rem .45rem; border-radius: 999px; background: var(--muted-bg);
  font: 600 .78rem/1.4 var(--mono); text-align: center; }
.near-pill.hot { background: var(--neg); color: #fff; }
.recent-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.tg-code { margin: .35rem 0; font-size: 1.4rem; letter-spacing: .12em; }

/* Telegram signals page */
.tg-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.tg-verdict { margin: .6rem 0 .9rem; padding: .55rem .75rem; border-radius: 10px; background: var(--muted-bg); font-size: .92rem; }
.tg-verdict.pos { background: var(--ok-bg); } .tg-verdict.neg { background: var(--err-bg); }
.tg-row-card .tg-verdict { margin: .5rem 0; }
.tg-note { margin: .3rem 0; }
.src-tag:not(.vip-tag) { background: var(--muted-bg); color: var(--text); }
.tg-replaced { padding: .35rem .55rem; border-radius: 6px; background: rgba(245, 158, 11, .12); }
.tg-stats .panel-title { margin-bottom: .6rem; font-size: .85rem; }
.tg-stats .scroll { max-height: none; }
.tg-stats p { margin: .6rem 0 0; }
.lg-e9 { color: #ea580c; } .lg-e21 { color: #7c3aed; }
[data-theme=dark] .lg-e9 { color: #ff9800; } [data-theme=dark] .lg-e21 { color: #b388ff; }

/* F&F page (favorit & filter) */
.ff-sub { font-size: 1rem; font-weight: 500; margin-left: .35rem; }
.ff-fav h2, .ff-filter h2 { display: flex; align-items: center; gap: .4rem; }
.ff-fav h2 .i { color: var(--primary); fill: var(--primary); }
.ff-search { position: relative; max-width: 420px; }
.ff-search .i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ff-search input { width: 100%; min-height: 44px; padding: 0 .9rem 0 2.4rem; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px; transition: border-color var(--ease); }
.ff-search input:hover { border-color: var(--muted); }
.ff-results { list-style: none; margin: .6rem 0 0; padding: .25rem; max-width: 420px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.ff-results li { display: flex; align-items: center; gap: .45rem; padding: .25rem .4rem; border-radius: 6px; }
.ff-results li:hover { background: var(--muted-bg); }
.ff-results .num { margin-left: auto; }
.ff-empty { margin: 1rem 0 .25rem; }
.ff-fav .ff-table { margin-top: 1rem; }
.ff-star { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--off); background: none;
  border: 0; border-radius: 6px; cursor: pointer; vertical-align: middle; transition: color var(--ease), background-color var(--ease); }
.ff-star:hover { color: var(--primary); background: var(--muted-bg); }
.ff-star[aria-pressed=true] { color: var(--primary); }
.ff-star[aria-pressed=true] .i { fill: var(--primary); }
.ff-star:active { opacity: .7; }
@media (pointer: coarse) { .ff-star { width: 44px; height: 44px; } }
.ff-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.ff-filter-head h2 { margin: 0; }
.ff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1rem; }
.ff-grid fieldset { padding: .4rem .9rem .7rem; }
.ff-grid .chips { margin: .25rem 0 .5rem; }
.ff-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ff-row select { width: auto; margin: 0; }
.ff-inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; font-size: .9rem; }
.ff-inline { white-space: nowrap; }
.ff-inline input:not([type=checkbox]), .ff-inline select { display: inline-block; width: 6rem; min-height: 40px; margin: 0; padding: .35rem .55rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.ff-inline select { width: auto; }
.ff-hint { margin: .4rem 0 0; }
.ff-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; margin-top: .25rem; }
.ff-count { margin: 0 0 .5rem; color: var(--muted); }
.ff-count strong { color: var(--text); }
.ff-table { max-height: none; }
.ff-table td .tag { margin: 1px 0; }
@media (max-width: 720px) {
  .ff-grid { grid-template-columns: minmax(0, 1fr); }
  .ff-search, .ff-results { max-width: none; }
}
/* F&F tables become one card per coin up to tablet width (the full table needs ~1150px), two cards a row from 721px.
   Same look as table.responsive on phones, but cells may shrink and long cells (clusters, signals) take a full row. */
@media (max-width: 1100px) {
  .ff-table.scroll { background: none; border: 0; overflow: visible; max-height: none; }
  .ff-table table { display: block; width: 100%; }
  .ff-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ff-table tbody { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
  .ff-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .1rem 1rem; padding: .9rem 1rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
  .ff-fav .ff-table tr { background: var(--bg); }
  .ff-table td { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem; min-width: 0;
    padding: .2rem 0; border: 0; white-space: normal; text-align: right; }
  .ff-table td::before { content: attr(data-label); color: var(--muted); font-family: var(--font); font-size: .78rem; text-align: left; }
  .ff-table td.cell-coin { grid-column: 1 / -1; order: -2; justify-content: flex-start; font-size: 1.05rem; }
  .ff-table td.cell-coin::before { display: none; }
  .ff-table td:is([data-label^="▲"], [data-label^="▼"], [data-label="Sinyal BBMA"]) { grid-column: 1 / -1; }
  .ff-table td[colspan] { grid-column: 1 / -1; text-align: left; }
  .ff-table td[colspan]::before { display: none; }
}


/* Light behind the mascot (templates/_glow.html): sun rays in day mode, moonlight in night mode. The layers crossfade
   here; motion-ui.js turns the rays, breathes the moon and springs the new one in on a theme switch. */
.sigil { position: relative; display: inline-grid; place-items: center; isolation: isolate; margin: 0 14px 0 10px; }
.sigil > img { position: relative; z-index: 1; }
/* the light hugs the round mascot only: the mascot fills the middle ~50%, the light lives in the ring 26%..50% */
.glow { --g: 195%; position: absolute; width: var(--g); height: var(--g); left: calc((100% - var(--g)) / 2); top: calc((100% - var(--g)) / 2);
  pointer-events: none; z-index: 0; }   /* centred without transform: Motion owns the transform */
.glow > i { position: absolute; inset: 0; border-radius: 50%; transition: opacity 700ms ease; }
.glow-sun {
  background: radial-gradient(circle, rgba(255, 221, 120, 1) 0 27%, rgba(251, 191, 36, .7) 33%, rgba(251, 191, 36, 0) 48%),
              repeating-conic-gradient(from 0deg, rgba(245, 158, 11, .9) 0deg 7deg, rgba(245, 158, 11, 0) 10deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 27%, rgba(0, 0, 0, .85) 38%, transparent 50%);
          mask: radial-gradient(circle, #000 27%, rgba(0, 0, 0, .85) 38%, transparent 50%); }
.glow-moon { opacity: 0;
  background: radial-gradient(circle, rgba(240, 245, 255, 1) 0 27%, rgba(191, 210, 255, .6) 33%, rgba(129, 140, 248, .2) 42%, rgba(129, 140, 248, 0) 50%); }
.glow-moon::after { content: ""; position: absolute; inset: 17%; border-radius: 50%; border: 1px solid rgba(214, 226, 255, .4);
  box-shadow: 0 0 8px rgba(191, 210, 255, .4); }
:root[data-theme=dark] .glow-sun { opacity: 0; }
:root[data-theme=dark] .glow-moon { opacity: 1; }
/* login: a bigger light rising behind the badge, only above the card edge so it never sits behind the text */
.login-glow { position: absolute; top: 0; left: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  pointer-events: none; clip-path: inset(-200% -200% 50% -200%); }
.login-glow .glow { --g: 205%; }
/* entrance animation: content waits for motion-ui.js (theme.js adds m-pre, never for reduced motion) */
.m-pre body:not(.home) main > *, .m-pre body:not(.home) .login-scene { opacity: 0; }
/* nine menu items: keep the header on one row on laptop screens */
@media (min-width: 721px) and (max-width: 1340px) { .app-top .who, .app-top .tt-label { display: none; } .app-top .main-nav a { padding: 0 .55rem; } }

/* XAU page (admin): plan card, live badge (green Valetax / orange fallback / red no source), Fibonacci table */
.alert.warn { background: rgba(245, 158, 11, .12); border-color: var(--primary); }
.xau-live { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.xau-price { font-size: 1.5rem; font-weight: 600; }
.xau-badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; color: var(--muted);
  padding: .25rem .6rem; border-radius: 999px; background: var(--muted-bg); max-width: 100%; }
.xau-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--off); flex: none; }
.xau-badge.live { color: #00a844; } .xau-badge.live i { background: #00c853; box-shadow: 0 0 0 3px rgba(0, 200, 83, .2); animation: xau-pulse 1.6s ease-in-out infinite; }
.xau-badge.idle { color: #d97706; } .xau-badge.idle i { background: #f59e0b; }
.xau-badge.dead { color: var(--neg); } .xau-badge.dead i { background: #ef4444; }
@keyframes xau-pulse { 50% { box-shadow: 0 0 0 6px rgba(0, 200, 83, 0); } }
@media (prefers-reduced-motion: reduce) { .xau-badge.live i { animation: none; } }
.xau-plan { border-left: 4px solid var(--off); }
.xau-plan.now.long { border-left-color: var(--pos); } .xau-plan.now.short { border-left-color: var(--neg); }
.xau-plan.ready { border-left-color: var(--primary); }
.xau-plan-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.xau-plan-head h2 { margin: 0; font-size: 1.35rem; }
.xau-levels { max-width: 460px; }
.ob-star { color: #ef4444; font-size: 1.25em; margin-left: 2px; }
.xau-ob { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 3; }
.xau-chart { height: 440px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.xau-sub { height: 130px; border-radius: 0; }
.xau-sub.xau-last { height: 150px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.xau-page .row-heat canvas { height: 420px; }
@media (max-width: 700px) { .xau-page .row-heat canvas { height: 300px; } }
.xau-panel-title { margin: 0; padding: 4px 8px 0; background: var(--card); border-top: 1px solid var(--border, rgba(127,127,127,.25)); font-weight: 600; }
.xau-lg-line { color: #dc2626; font-weight: 600; }
@media (max-width: 640px) { .xau-chart { height: 340px; } .xau-sub { height: 110px; } .xau-sub.xau-last { height: 130px; } }
.xau-lg-fib { color: #2f6fdb; } .xau-lg-gp { color: var(--ring); font-weight: 600; }
.xau-fib td, .xau-fib th { padding: .35rem .5rem; }
.xau-fib tr.zone { background: rgba(245, 158, 11, .10); }
.xau-fib tr.zone td:first-child { font-weight: 700; color: var(--ring); }
.xau-fib tr.here { outline: 2px solid var(--ring); outline-offset: -2px; }
.xau-fib tr.ext td { color: var(--muted); }
.xau-fib .gp { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .35rem;
  border-radius: 4px; background: var(--primary); color: var(--on-primary); margin-left: .25rem; }
.xau-explain { margin-top: 1rem; } .xau-explain summary { cursor: pointer; font-weight: 600; }
.xau-explain li { margin: .3rem 0; }
/* Telegram page: one WITA day at a time */
.tg-days { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: 1rem 0; }
.tg-day { flex: 1 1 200px; text-align: center; }
.tg-day h2 { margin: 0; font-size: 1.15rem; }
.tg-day p { margin: .15rem 0 0; }
.tg-days .btn[aria-disabled=true] { opacity: .4; pointer-events: none; }
.tg-day-pick { flex: 1 1 100%; display: flex; justify-content: center; }
.tg-day-pick select { width: auto; max-width: 100%; margin: 0; }
/* Rekomendasi page: Binance gainers tables */
.gainers h2 { margin: 0 0 .6rem; }
.gainers-table td { vertical-align: top; }
.gainers-table td.cell-read { white-space: normal; }
.gainers-table td.cell-read .muted { display: block; margin-top: .2rem; }
@media (min-width: 721px) { .gainers-table td.cell-read { min-width: 260px; } }
@media (max-width: 720px) {   /* phone cards: the reading spans the card, label above it */
  .gainers-table td.cell-read { grid-column: 1 / -1; display: block; text-align: left; }
  .gainers-table td.cell-read::before { display: block; margin-bottom: .2rem; }
}

/* ---------- phone fixes (2026-10-25) ---------- */
.nav-short { display: none; }
@media (max-width: 720px) {
  .main-nav .nav-long { display: none; }
  .main-nav .nav-short { display: inline; }
}
.ff-grid fieldset { min-width: 0; }   /* fieldsets default to min-content width and burst out of the card */
@media (max-width: 720px) {
  .ff-inline { white-space: normal; flex-wrap: wrap; }
  .ff-inline input:not([type=checkbox]) { width: 5rem; }
  .tg-day { order: -1; flex-basis: 100%; }   /* date on top, both buttons on one row under it */
  .tg-days > .btn { flex: 1 1 0; }
}
.xau-fib td.small { white-space: normal; }

/* admins: Akun (with the admin sections) sits in the top bar, not in the menu */
.top-account { color: var(--text); }
.top-account[aria-current=page] { border-color: var(--primary); }
.section-title { margin-top: 2rem; }
@media (max-width: 720px) {   /* phone: logo, theme switch, Akun and log out stay on one row */
  .app-top { flex-wrap: nowrap; gap: .4rem; }
  .app-top .brand { min-width: 0; }
  .app-top .spacer { flex: 1 1 0; min-width: 0; }
  .app-top .logout { flex: none; }
}
@media (max-width: 400px) { .app-top .brand-word { display: none; } }   /* phones: mascot + FUTURE tag only, so the bar stays on one row */

.main-nav a:focus:not(:focus-visible) { outline: none; }   /* no ring after a mouse click / tap; keyboard focus keeps it */

/* PC header in two rows (owner, 2026-10-25): logo + theme switch + Akun + Keluar on top, the channels under them */
@media (min-width: 721px) {
  .app-top { flex-wrap: wrap; row-gap: 0; padding-bottom: 0; }
  .app-top .brand { order: 0; }
  .app-top .spacer { order: 1; flex: 1 1 auto; }
  .app-top .theme-toggle { order: 2; }
  .app-top .top-account { order: 3; }
  .app-top .logout { order: 4; }
  .app-top .main-nav { order: 10; flex: 1 1 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto;
    margin: .35rem -16px 0; padding: .3rem 16px .25rem; border-top: 1px solid var(--line); scrollbar-width: none; }
  .app-top .main-nav::-webkit-scrollbar { display: none; }
  .app-top .main-nav a { padding: 0 .8rem; }
}
