/* Shikhar Signals website. Colours follow the Android app (ui/theme/Theme.kt). */

:root {
  --brand: #168657;
  --brand-2: #36b880;
  --brand-soft: #ddf5e7;
  --on-brand: #ffffff;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --surface-3: #e6eaf0;
  --text: #121821;
  --muted: #5b6676;
  --faint: #8a94a3;
  --border: #e1e6ed;
  --up: #12955a;
  --up-bg: #e3f6ec;
  --down: #d33a3f;
  --down-bg: #fde8e8;
  --flat: #8a94a3;
  --warn: #b7820f;
  --warn-bg: #fdf3dc;
  --info: #3b72c9;
  --info-bg: #e5eefb;
  --a-strong-buy: #0e8f54;
  --a-buy: #2fae6c;
  --a-hold: #c98f12;
  --a-sell: #e35d4f;
  --a-strong-sell: #c02f2f;
  --q-leading: #22b573;
  --q-weakening: #e0a526;
  --q-lagging: #e5484d;
  --q-improving: #4f86d9;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 252px;
  --topbar: 60px;
  --bottombar: 64px;
  --content: 1280px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --brand: #36b880;
  --brand-2: #3fe394;
  --brand-soft: #173d30;
  --on-brand: #04140d;
  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1c222b;
  --surface-3: #262d37;
  --text: #e6eaf0;
  --muted: #aeb7c4;
  --faint: #7d8796;
  --border: #262d37;
  --up: #35d07f;
  --up-bg: #12301f;
  --down: #ff6b6b;
  --down-bg: #3a1618;
  --warn: #f2c14e;
  --warn-bg: #3a2c0b;
  --info: #7aa7ee;
  --info-bg: #15253d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

:root[data-theme="black"] {
  --brand: #36b880;
  --brand-2: #3fe394;
  --brand-soft: #0f2a20;
  --on-brand: #04140d;
  --bg: #000000;
  --surface: #0b0d10;
  --surface-2: #13161b;
  --surface-3: #1d2128;
  --text: #e6eaf0;
  --muted: #a3acb9;
  --faint: #737d8c;
  --border: #1d2128;
  --up: #35d07f;
  --up-bg: #0d2617;
  --down: #ff6b6b;
  --down-bg: #2d1012;
  --warn: #f2c14e;
  --warn-bg: #2b2108;
  --info: #7aa7ee;
  --info-bg: #0f1c30;
  --shadow: none;
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.55rem; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: .98rem; font-weight: 650; }
p { margin: 0; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .84rem; }
.tiny { font-size: .75rem; }
.strong { font-weight: 650; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }

/* ------------------------------------------------------------------ shell */

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px 20px; display: flex; flex-direction: column; gap: 4px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { font-size: 1.05rem; letter-spacing: -.01em; display: block; line-height: 1.1; }
.brand span { font-size: .72rem; color: var(--muted); display: block; }
.nav-group { margin-top: 10px; }
.nav-group > .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 6px 12px; font-weight: 650; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 520; font-size: .93rem;
}
.nav-link svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.active { background: var(--brand-soft); color: var(--brand); }
.nav-link.active svg { color: var(--brand); }
.nav-link .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; font-size: .74rem; color: var(--faint); line-height: 1.45; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.topbar .mobile-brand { display: none; }
.search-box { flex: 1; max-width: 520px; position: relative; }
.search-box input {
  width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); padding: 0 12px 0 38px; outline: none;
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-box > svg { position: absolute; left: 11px; top: 10px; width: 20px; height: 20px; color: var(--faint); pointer-events: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  max-height: min(70vh, 460px); overflow-y: auto; z-index: 60; padding: 6px;
}
.search-results a, .search-results .item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.sel { background: var(--surface-2); text-decoration: none; }
.search-results .sym { font-weight: 700; min-width: 74px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flat); }
.status-chip.open .dot { background: var(--up); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up) 22%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--up) 0%, transparent); } }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--text); position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot-badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--down); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; }

.view { width: 100%; max-width: var(--content); margin: 0 auto; padding: 22px 20px 48px; min-width: 0; }
.view:focus { outline: none; }
.footer { max-width: var(--content); margin: 0 auto; width: 100%; padding: 8px 20px 30px; color: var(--faint); font-size: .78rem; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer a { color: var(--muted); }

.bottom-nav { display: none; }
.scrim { display: none; }

/* ------------------------------------------------------------------ page parts */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: .82rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.mt { margin-top: 12px; }
.mt-s { margin-top: 6px; }
.mb { margin-bottom: 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card > .card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; min-height: 44px; }
.card > .card-head h2, .card > .card-head h3 { flex: 1; min-width: 0; }
.card > .card-body { padding: 12px 16px 16px; }
.card.pad { padding: 16px; }
.card.flush > .card-body { padding: 8px 0 8px; }
.card.hero {
  background: linear-gradient(135deg, #0c2b47 0%, #0a3a3e 55%, #11553f 100%); color: #f1f6fb; border: none; overflow: hidden; position: relative;
}
.card.hero .muted { color: #b9c9d8; }
.card.hero .up { color: #6ff0ad; }
.card.hero .down { color: #ff9b9b; }
.card-link { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.hero-side { text-align: right; }
@media (max-width: 600px) { .hero-side { text-align: left; width: 100%; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; } .hero-side > * { margin: 0 !important; } }

.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: .9rem; }
.kv > :nth-child(odd) { color: var(--muted); }
.kv > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 560; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.stat .label { font-size: .74rem; color: var(--muted); }
.stat .value { font-size: 1.05rem; font-weight: 680; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .note { font-size: .74rem; color: var(--faint); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: .76rem; font-weight: 650; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); line-height: 1.6;
}
.pill.solid { color: #fff; }
.pill.up { background: var(--up-bg); color: var(--up); }
.pill.down { background: var(--down-bg); color: var(--down); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--down); color: #fff; font-size: .7rem; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; font-size: .92rem;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.06); background: var(--brand); }
.btn.danger { color: var(--down); }
.btn.danger.primary { background: var(--down); border-color: var(--down); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { height: 32px; padding: 0 12px; font-size: .84rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: .84rem; font-weight: 560; white-space: nowrap; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"], .chip.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 650; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: none; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2.5px solid transparent; white-space: nowrap; font-size: .92rem; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .84rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: .8rem; color: var(--muted); font-weight: 560; }
.input, select.input, textarea.input {
  height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 0 12px; outline: none; width: 100%; min-width: 0;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .9rem; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 13px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.setting { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.setting:first-child { border-top: none; }
.setting .text { flex: 1; min-width: 0; }
.setting .text b { display: block; font-weight: 600; }
.setting .text small { color: var(--muted); font-size: .82rem; display: block; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .89rem; }
table.data th { text-align: left; font-weight: 650; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .r, table.data th.r { text-align: right; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); }
table.data tr.clickable { cursor: pointer; }
table.data .sym { font-weight: 700; color: var(--text); }
table.data .name { color: var(--muted); font-size: .8rem; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

/* lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 10px 16px; color: var(--text); border-top: 1px solid var(--border); min-width: 0; }
.list-item:first-child { border-top: none; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); text-decoration: none; }
button.list-item { width: 100%; border: none; border-top: 1px solid var(--border); background: none; text-align: left; cursor: pointer; }
.list-item .main-col { flex: 1; min-width: 0; }
.list-item .main-col b { display: block; font-weight: 680; }
.list-item .main-col small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .end { text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.list-item .end b { display: block; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; font-weight: 750; font-size: .72rem; color: var(--muted); flex: none; letter-spacing: -.02em; overflow: hidden; }

/* bars, meters */
.bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; position: relative; }
.bar > i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; background: var(--brand); }
.breadth { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-3); }
.breadth i { display: block; height: 100%; }
.range-bar { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--down), var(--warn), var(--up)); margin: 12px 0 4px; opacity: .85; }
.range-bar b { position: absolute; top: -5px; width: 4px; height: 16px; border-radius: 2px; background: var(--text); transform: translateX(-50%); }
.score-bar { display: grid; grid-template-columns: 1fr 1fr; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.score-bar > div { position: relative; }
.score-bar > div i { position: absolute; top: 0; bottom: 0; }
.score-bar > div:first-child i { right: 0; background: var(--down); }
.score-bar > div:last-child i { left: 0; background: var(--up); }

.action-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 10px; font-weight: 750; color: #fff; font-size: .9rem; white-space: nowrap; }
.action-big { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }

.callout { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); font-size: .9rem; }
.callout.warn { background: var(--warn-bg); color: var(--text); }
.callout.info { background: var(--info-bg); }
.callout.up { background: var(--up-bg); }
.callout.down { background: var(--down-bg); }
.notice { display: flex; gap: 10px; align-items: flex-start; }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.reasons { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.reasons li { display: flex; gap: 8px; }
.reasons li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: .55em; flex: none; background: var(--faint); }
.reasons.bull li::before { background: var(--up); }
.reasons.bear li::before { background: var(--down); }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty > svg { width: 44px; height: 44px; margin: 0 auto 10px; color: var(--faint); }
.empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--muted); }

/* heat map */
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.heat a { border-radius: 12px; padding: 12px; color: #fff; min-height: 86px; display: flex; flex-direction: column; justify-content: space-between; }
.heat a:hover { text-decoration: none; filter: brightness(1.08); }
.heat b { font-size: .9rem; line-height: 1.2; }
.heat .v { font-size: 1.15rem; font-weight: 750; }

/* modal + toast */
.modal-root { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 10, 18, .5); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(560px, 100%); max-height: min(88vh, 900px); overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 8px 18px 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { background: #1d232c; color: #f1f4f8; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .9rem; pointer-events: auto; animation: rise .2s; display: flex; gap: 12px; align-items: center; }
.toast.error { background: #7d1d22; }
.toast button { border: none; background: none; color: #8ef0bd; font-weight: 700; cursor: pointer; padding: 0; }

/* charts */
.mini-chart { height: 220px; width: 100%; position: relative; }
.chart-frame { width: 100%; border: none; display: block; background: var(--surface); }
.chart-page { display: flex; flex-direction: column; gap: 10px; }
.chart-page .chart-box { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.chart-page.full { position: fixed; inset: 0; z-index: 70; background: var(--bg); padding: 8px; }
.chart-page.full .chart-box { flex: 1; }
.chart-page.full .chart-box iframe { height: 100% !important; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.menu { position: absolute; z-index: 65; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 240px; max-height: 70vh; overflow-y: auto; }
.menu h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 8px 4px; }
.menu label, .menu button.opt { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: .88rem; width: 100%; border: none; background: none; text-align: left; }
.menu label:hover, .menu button.opt:hover { background: var(--surface-2); }
.menu input[type="checkbox"], .menu input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; }
.levels-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.levels-strip .pill { font-variant-numeric: tabular-nums; }
svg.rrg { width: 100%; height: auto; touch-action: manipulation; user-select: none; }
svg.rrg text { font: 600 11px var(--font); }
.spark { width: 100%; height: 40px; }

.index-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.index-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.index-card b { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.index-card .v { font-weight: 720; font-size: 1.02rem; font-variant-numeric: tabular-nums; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .8rem; font-weight: 600; text-align: center; }
.quick a:hover { text-decoration: none; background: var(--surface-2); }
.quick a i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.quick a i svg { width: 22px; height: 22px; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.service { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.service:hover { background: var(--surface-2); text-decoration: none; }
.service i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.service i svg { width: 22px; height: 22px; }
.service b { display: block; font-size: .92rem; }
.service small { color: var(--muted); font-size: .78rem; display: block; line-height: 1.35; }

.lock-screen { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 20px; }
.lock-screen .box { width: min(360px, 100%); text-align: center; }
.lock-screen img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 14px; }
.privacy-blur { filter: blur(7px); user-select: none; }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
    padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 10, 18, .45); z-index: 35; }
  .topbar { padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar) + env(safe-area-inset-top)); gap: 6px; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .mobile-brand { display: flex; align-items: center; gap: 8px; font-weight: 750; color: var(--text); white-space: nowrap; }
  .topbar .mobile-brand img { width: 30px; height: 30px; border-radius: 8px; }
}

@media (max-width: 767px) {
  body { font-size: 14.5px; }
  h1 { font-size: 1.3rem; }
  .view { padding: 14px 16px calc(var(--bottombar) + 28px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(var(--bottombar) + 24px + env(safe-area-inset-bottom)); }
  .search-box { display: none; }
  .search-box.open { display: block; position: fixed; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); max-width: none; z-index: 61; }
  .search-box.open input { height: 46px; box-shadow: var(--shadow-lg); }
  .search-box.open > svg { top: 13px; }
  .search-box.open .search-results { top: 52px; }
  .status-chip .txt { display: none; }
  .status-chip { padding: 5px 8px; }
  .hide-mobile { display: none !important; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--bottombar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .7rem; font-weight: 600; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav a.center i { width: 50px; height: 50px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; margin-top: -14px; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent); }
  .bottom-nav a.center i svg { width: 26px; height: 26px; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .quick a { padding: 10px 2px; font-size: .72rem; }
  .card > .card-head { padding: 12px 14px 0; }
  .card > .card-body { padding: 10px 14px 14px; }
  .list-item { padding: 10px 14px; }
  .modal-root { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  table.data td, table.data th { padding: 8px 10px; }
  .toasts { bottom: calc(var(--bottombar) + 16px + env(safe-area-inset-bottom)); }
  .mini-chart { height: 190px; }
  .page-head { margin-bottom: 14px; }
}

@media (min-width: 768px) {
  .show-mobile { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .sidebar, .topbar, .bottom-nav, .footer, .toasts { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ------------------------------------------------------------------ TradingView Chart & Indicators Modal */

.trading-view-page {
  position: relative;
  width: 100%;
  height: calc(100vh - 12px);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.tv-header {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.tv-sidebar {
  border-bottom-left-radius: var(--radius);
}

.tv-tool-btn {
  transition: all .15s ease;
}

.tv-tool-btn:hover {
  background: var(--surface-2) !important;
}

.tv-tool-btn.active {
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

.ind-cat-btn:hover {
  background: var(--surface-2) !important;
}

.ind-cat-btn.active {
  background: var(--surface-3) !important;
  color: var(--brand) !important;
}

.ind-row:hover {
  background: var(--surface-2) !important;
}

/* ------------------------------------------------------------------ Festive Banner & Ad Container */

.festive-banner {
  background: linear-gradient(135deg, #b71c1c 0%, #e65100 50%, #f57f17 100%);
  color: #ffffff;
  padding: 10px 18px;
  box-shadow: 0 4px 14px rgba(183, 28, 28, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: all .25s ease;
  position: relative;
  z-index: 20;
}

.festive-banner.slide-up {
  opacity: 0;
  transform: translateY(-100%);
  margin-top: -60px;
}

.festive-banner-inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.festive-badge {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.festive-body {
  flex: 1;
  min-width: 0;
}

.festive-headline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.3;
}

.festive-tag {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
}

.festive-sub {
  font-size: 12px;
  opacity: 0.96;
  margin-top: 2px;
  line-height: 1.4;
}

.festive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.festive-cta {
  background: #ffffff !important;
  color: #b71c1c !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  cursor: pointer;
}

.festive-close-btn {
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background .15s;
}

.festive-close-btn:hover {
  background: rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {
  .festive-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .festive-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Ad Unit Container */
.ad-container-wrap {
  margin: 24px auto 12px;
  max-width: 728px;
  width: calc(100% - 32px);
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px dashed var(--border);
  text-align: center;
  overflow: hidden;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

.ad-card-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  color: var(--text) !important;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
}

.ad-card-banner:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

.ad-card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  color: #d35400;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ad-card-body {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.ad-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.ad-card-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}

.ad-card-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.festive-deal-btn {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .15s;
}

.festive-deal-btn:hover {
  background: rgba(255, 255, 255, 0.4) !important;
}

@media (max-width: 768px) {
  .ad-card-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .ad-card-btn {
    width: 100%;
    text-align: center;
  }
}

/* Auth modal & topbar button */
.auth-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}
.auth-topbar-btn.logged-in {
  background: var(--surface-2);
  border-color: var(--primary);
  color: var(--primary);
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.auth-modal-card .close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

.auth-logo {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-sub {
  margin: 0 0 16px;
  font-size: 0.85rem;
}

.auth-oauth-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--fg);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.oauth-btn:hover {
  background: var(--surface-3, rgba(255, 255, 255, 0.08));
  border-color: var(--border-strong, #888);
}

.oauth-btn .oauth-icon {
  font-size: 1.1rem;
  font-weight: bold;
}

.oauth-btn.google .oauth-icon {
  color: #4285F4;
}

.oauth-btn.microsoft .oauth-icon {
  color: #00A4EF;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 10px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--fg);
  font-size: 0.88rem;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
}

.auth-error {
  padding: 8px 12px;
  background: rgba(229, 72, 77, 0.15);
  border: 1px solid #e5484d;
  color: #e5484d;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.auth-toggle {
  margin-bottom: 14px;
}

.auth-toggle-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.auth-guest-note {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.auth-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 12px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 181, 115, 0.15);
  color: #22B573;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.auth-actions-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}



