/* ==========================================================================
   Stocks_V009 · design tokens
   Every colour on the site is a token. Dark mode only redefines tokens.
   ========================================================================== */
:root {
  color-scheme: light;
  --font-ui: "IBM Plex Sans Arabic", "Segoe UI", "Noto Naskh Arabic", Tahoma, system-ui, sans-serif;
  --font-num: "IBM Plex Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --bg: #f3f5f8;
  --bg-2: #e9edf2;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: #d9dfe7;
  --line-soft: #e8ecf1;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #7b8794;
  --ink-on-accent: #ffffff;

  --accent: #0f766e;            /* teal - the site's signature */
  --accent-2: #115e59;
  --accent-tint: #d9f0ec;
  --accent-ink: #0b5c56;

  --up: #15803d;   --up-tint: #dcf5e6;   --up-ink: #0f6a33;
  --dn: #b91c1c;   --dn-tint: #fde3e3;   --dn-ink: #991b1b;
  --warn: #b45309; --warn-tint: #fdebd3; --warn-ink: #92400e;
  --info: #1d4ed8; --info-tint: #dfe8ff; --info-ink: #1e40af;
  --violet: #6d28d9; --violet-tint: #ece4ff; --violet-ink: #5b21b6;
  --pink: #be185d; --pink-tint: #fbe3ef; --pink-ink: #9d174d;
  --gold: #a16207; --gold-tint: #fdf1c9; --gold-ink: #854d0e;
  --neutral-tint: #eef1f5;
  /* [D-154] «خريطة السوق» tiles: saturated so white text reads on them in both themes */
  --heat-dn2: #8f1626; --heat-dn: #c8283a; --heat-mid: #5d6773; --heat-up: #1f9a5c; --heat-up2: #0f6b3c;
  --heat-ink: #ffffff; --heat-gap: #e9edf2; --heat-sig: #f5c518;

  --ma5: #ec4899; --ma10: #f97316; --ma13: #ca8a04; --ma20: #8b5cf6; --ma50: #2563eb; --ma200: #334155;

  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
  --gap: 20px;
  --topbar-h: 62px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1319;
  --bg-2: #141b23;
  --surface: #161e28;
  --surface-2: #1c2632;
  --line: #2a3644;
  --line-soft: #222d39;
  --ink: #e6ebf1;
  --ink-2: #aab5c3;
  --ink-3: #7b8896;
  --accent: #2dd4bf;
  --accent-2: #14b8a6;
  --accent-tint: #123a37;
  --accent-ink: #7fe7db;
  --ink-on-accent: #06201d;
  --up: #34d399;   --up-tint: #12312a;  --up-ink: #6ee7b7;
  --dn: #f87171;   --dn-tint: #3a1c1c;  --dn-ink: #fca5a5;
  --warn: #fbbf24; --warn-tint: #3a2a0f; --warn-ink: #fcd34d;
  --info: #60a5fa; --info-tint: #172a4a; --info-ink: #93c5fd;
  --violet: #a78bfa; --violet-tint: #2a1f4a; --violet-ink: #c4b5fd;
  --pink: #f472b6; --pink-tint: #3d1a2c; --pink-ink: #f9a8d4;
  --gold: #fbbf24; --gold-tint: #3a2f0f; --gold-ink: #fde68a;
  --neutral-tint: #1f2933;
  --heat-dn2: #7d1520; --heat-dn: #b8232f; --heat-mid: #3c4651; --heat-up: #1d8a52; --heat-up2: #0e5c34;
  --heat-ink: #ffffff; --heat-gap: #0e1319; --heat-sig: #ffd84d;
  --ma200: #cbd5e1;
  --shadow: 0 1px 2px rgba(0,0,0,.35);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
}

/* ==========================================================================
   base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15.5px/1.7 var(--font-ui); font-feature-settings: "kern", "liga";
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0; }
.num, .en { direction: ltr; unicode-bidi: isolate; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.mute { color: var(--ink-3); } .dim { color: var(--ink-2); }
.sm { font-size: 12.5px; } .xs { font-size: 11.5px; }
.pos { color: var(--up-ink); } .neg { color: var(--dn-ink); } .warn-txt { color: var(--warn-ink); }
.strong { font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.no-print {} .print-only { display: none; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ==========================================================================
   top bar
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 0 clamp(14px, 3vw, 32px);
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: var(--ink-on-accent); font-family: var(--font-num); font-size: 13px; font-weight: 700; }
.brand small { color: var(--ink-3); font-weight: 500; font-size: 12px; margin-inline-start: 2px; }
.nav { display: flex; gap: 2px; justify-self: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { --c: var(--ink-2); --c-tint: var(--neutral-tint); display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; color: var(--c); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { background: var(--c-tint); text-decoration: none; }
.nav a.active { background: var(--c); color: var(--ink-on-accent); }
.nav a.n-home { --c: var(--accent); --c-tint: var(--accent-tint); }
.nav a.n-live { --c: var(--dn); --c-tint: var(--dn-tint); }
.nav a.n-signals { --c: var(--pink); --c-tint: var(--pink-tint); }
.nav a.n-universe { --c: var(--violet); --c-tint: var(--violet-tint); }
.nav a.n-spx { --c: var(--info); --c-tint: var(--info-tint); }   /* [D-109] */
.nav a.n-heatmap { --c: var(--gold); --c-tint: var(--gold-tint); }   /* [D-154] */
.nav a.n-jobs { --c: var(--info); --c-tint: var(--info-tint); }
.nav a.n-admin { --c: var(--ink-2); --c-tint: var(--neutral-tint); }
:root[data-theme="dark"] .nav a.active { color: #0b1117; }
.topbar-end { display: flex; align-items: center; gap: 8px; justify-self: end; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--ink); border-color: var(--accent); }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }

/* live status pill */
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status-pill.ok { background: var(--up-tint); color: var(--up-ink); border-color: transparent; }
.status-pill.ok .dot { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 25%, transparent); animation: pulse 2s infinite; }
.status-pill.degraded { background: var(--warn-tint); color: var(--warn-ink); border-color: transparent; }
.status-pill.degraded .dot { background: var(--warn); }
.status-pill.stale { background: var(--dn-tint); color: var(--dn-ink); border-color: transparent; }
.status-pill.stale .dot { background: var(--dn); }
.status-pill.closed { background: var(--neutral-tint); color: var(--ink-2); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 25%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--up) 10%, transparent); } }
@media (prefers-reduced-motion: reduce) { .status-pill.ok .dot { animation: none; } }

.user-menu { position: relative; }
.user-badge { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.user-pop { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
.user-pop a, .user-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; border-radius: 8px; cursor: pointer; text-align: start; }
.user-pop a:hover, .user-pop button:hover { background: var(--surface-2); text-decoration: none; }
.user-pop .danger { color: var(--dn-ink); }

/* signal ticker */
.ticker { display: flex; align-items: center; gap: 12px; padding: 7px clamp(14px, 3vw, 32px); background: var(--surface); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.ticker-label { flex: none; font-size: 12.5px; font-weight: 700; color: var(--pink-ink); display: inline-flex; align-items: center; gap: 6px; }
.ticker-track { flex: 1; overflow: hidden; direction: ltr; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-items { display: inline-flex; gap: 28px; white-space: nowrap; animation: ticker 30s linear infinite; --tk-from: -100%; --tk-to: 100%; }
.ticker-track:hover .ticker-items { animation-play-state: paused; }
.ticker-item { font-family: var(--font-num); font-size: 13px; color: var(--ink-2); }
.ticker-item b { color: var(--ink); }
.ticker-item.up { color: var(--up-ink); } .ticker-item.dn { color: var(--dn-ink); }
/* [D-091] «قوية +N»: the signal strength badge, visually distinct wherever a signal is named */
.badge.b-strong { background: var(--accent); color: var(--ink-on-accent); font-weight: 800; border: 0; }
.badge.b-strong.s-up, .ticker-item .strong-tag.s-up { background: var(--up); }   /* strength follows the signal direction */
.badge.b-strong.s-dn, .ticker-item .strong-tag.s-dn { background: var(--dn); }
.ticker-item .strong-tag { display: inline-block; margin-inline-start: 4px; padding: 0 6px; border-radius: 6px;
  background: var(--accent); color: var(--ink-on-accent); font-weight: 800; }
.ticker-item.more { font-weight: 700; padding: 1px 10px; border-radius: 999px; border: 1px solid currentColor; }
@keyframes ticker { from { transform: translateX(var(--tk-from)); } to { transform: translateX(var(--tk-to)); } }
@media (prefers-reduced-motion: reduce) { .ticker-items { animation: none; } }
/* [D-138] the top strip: chips led by a coloured type tag (model 1, user 2026-10-19). RTL inside the row so its
   right end - the newest item - leads the left -> right run; each chip reads right to left. */
#ticker { padding-block: 9px; }
#ticker .ticker-label { font-size: 14px; }
#ticker .ticker-items { direction: rtl; gap: 14px; align-items: center; }
.tk-newcount { font-size: 12.5px; font-weight: 700; color: var(--ink-on-accent); background: var(--warn); border-radius: 999px; padding: 0 8px; }
.tk { display: inline-flex; align-items: center; gap: 9px; padding: 5px 8px 5px 12px; border-radius: 10px; font-size: 15px;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-soft); text-decoration: none; }
.tk:hover { text-decoration: none; border-color: var(--line); }
.tk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk bdi { unicode-bidi: isolate; }
.tk-t { font-size: 13.5px; font-weight: 700; padding: 2px 10px; border-radius: 7px; color: var(--ink-on-accent); }
.tk-s { font-family: var(--font-num); font-weight: 700; font-size: 16.5px; color: var(--ink); }
.tk-tm { font-family: var(--font-num); font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tk-sig.up .tk-t { background: var(--up); } .tk-sig.dn .tk-t { background: var(--dn); }
.tk-put .tk-t { background: var(--violet); }
.tk-near .tk-t { background: transparent; color: var(--violet-ink); border: 1px dashed var(--violet); }
.tk-an .tk-t { background: var(--accent); color: var(--ink-on-accent); }          /* [D-164] قاعدة أبو ناصر */
.tk-an.up .tk-d { color: var(--up-ink); } .tk-an.dn .tk-d { color: var(--dn-ink); }
/* [D-164] the rule page's bar: five equal filters + reset in one row on desktop, 3 + 3 on tablet, 2 per row on phones */
@media (min-width: 1200px) { .filters.filters-an { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; } }
@media (min-width: 641px) and (max-width: 1199px) { .filters.filters-an { grid-template-columns: repeat(3, minmax(0, 1fr)); } .filters.filters-an .reset { grid-column: 3; } }
.tk-pat.up .tk-t { background: var(--up-tint); color: var(--up-ink); } .tk-pat.dn .tk-t { background: var(--dn-tint); color: var(--dn-ink); }
.tk-d { font-weight: 700; } .tk-pat.up .tk-d { color: var(--up-ink); } .tk-pat.dn .tk-d { color: var(--dn-ink); }
.tk-str { font-size: 12.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; color: var(--ink-on-accent); }
.tk-sig.up .tk-str { background: var(--up); } .tk-sig.dn .tk-str { background: var(--dn); }
.tk-form { font-size: 12.5px; color: var(--warn-ink); background: var(--warn-tint); border-radius: 6px; padding: 1px 7px; }
.tk-newtag { font-size: 12.5px; font-weight: 700; color: var(--ink-on-accent); background: var(--warn); border-radius: 5px; padding: 1px 8px; }
.tk-isnew { border-color: var(--warn); animation: tk-pulse 1.4s ease-out infinite; }
.tk-empty { font-size: 14px; color: var(--ink-3); }
@keyframes tk-pulse { 0% { box-shadow: 0 0 0 0 var(--warn); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .tk-isnew { animation: none; } }
/* [D-139] after the close: the session's results, big cards (model 2); the total boxed apart from its parts */
#ticker.tk-summary .ticker-items { gap: 26px; }
.tk-sum { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 13px; border-radius: 11px; font-size: 14.5px;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-2); text-decoration: none; }
.tk-sum:hover { text-decoration: none; }
.tk-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk-sum.sig { border-color: var(--accent); } .tk-sum.sig .tk-t { background: var(--accent); }
.tk-sum.put { border-color: var(--violet); } .tk-sum.put .tk-t { background: var(--violet); }
.tk-sum.pat .tk-t { background: var(--ink-2); color: var(--surface); }
.tk-sum.spx { border-color: var(--info); } .tk-sum.spx .tk-t { background: var(--info); }
.tk-sum.an { border-color: var(--gold); } .tk-sum.an .tk-t { background: var(--gold); color: var(--surface); } .tk-sum.an .tk-tot { border-color: var(--gold); }   /* [D-164] */
.tk-sum .tk-t { font-size: 12.5px; padding: 1px 9px; }
.tk-tot { display: inline-flex; align-items: baseline; gap: 5px; padding: 1px 8px; border-radius: 7px; background: var(--neutral-tint); border: 1px solid var(--line); }
.tk-tot span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tk-tot bdi, .tk-part bdi { font-family: var(--font-num); font-weight: 700; unicode-bidi: isolate; }
.tk-tot bdi { font-size: 18px; color: var(--ink); }
.tk-sum.sig .tk-tot { border-color: var(--accent); } .tk-sum.put .tk-tot { border-color: var(--violet); } .tk-sum.spx .tk-tot { border-color: var(--info); }
.tk-vl { width: 1px; align-self: stretch; background: var(--line); margin: 2px; }
.tk-part { display: inline-flex; gap: 4px; align-items: center; }
.tk-part bdi { font-size: 17px; }
.tk-part.ok bdi { color: var(--up-ink); } .tk-part.no bdi { color: var(--dn-ink); } .tk-part.wait bdi { color: var(--warn-ink); } .tk-part.none bdi { color: var(--ink-3); }
.tk-part small { color: var(--ink-3); font-size: 11.5px; }
.tk-rate { width: 84px; height: 8px; border-radius: 999px; background: var(--dn-tint); overflow: hidden; display: inline-flex; }
.tk-rate i { display: block; height: 100%; background: var(--up); } .tk-rate i.w { background: var(--warn); } .tk-rate i.n { background: var(--line); }
.tk-sub { display: inline-flex; align-items: center; gap: 8px; }
.tk-sub > span:first-child { font-weight: 700; color: var(--ink); }

/* ==========================================================================
   layout & surfaces
   ========================================================================== */
main { max-width: 1280px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 32px) 90px; }
main.wide { max-width: min(96vw, 1800px); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--ink-2); font-size: 14px; max-width: 70ch; margin-top: 4px; }
.section { margin-bottom: 30px; }
.section > .head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section > .head .hint { color: var(--ink-3); font-size: 12.5px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-pad { padding: 18px 20px; }
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; border: 1px solid transparent; }
.flash.ok { background: var(--up-tint); color: var(--up-ink); }
.flash.err { background: var(--dn-tint); color: var(--dn-ink); }
.flash.run { background: var(--info-tint); color: var(--info-ink); }
.crumbs { color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.foot { max-width: 1280px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 32px) 30px; color: var(--ink-3); font-size: 12.5px; }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); }
.empty b { color: var(--ink-2); }

/* stat cards */
/* 10 stat cards: two full rows of five on desktop/tablet, five rows of two on phones — never a ragged last row */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* home: two rows [user 2026-09-29] - top row (إجمالي/القيادية/QQQ) 3 across, second row
   (المفضّلة، الاختراقات، اتجاه صاعد، قناة صاعدة) 4 in one row; 2x2 on phones [D-091: the two
   warning cards were removed with the early warning] */
.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.stats.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) { .stats.stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 560px) { .stats.stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .stats.stats-4 { gap: 8px; } }
@media (max-width: 560px) { .stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* smaller footprint on the home page [user 2026-09-29]: was taking too much vertical space */
.stats.stats-sm { gap: 8px; margin-bottom: 16px; }
.stats.stats-sm .stat { padding: 7px 10px; gap: 8px; }
.stats.stats-sm .stat .ic { width: 28px; height: 28px; border-radius: 8px; }
.stats.stats-sm .stat .ic svg { width: 14px; height: 14px; }
.stats.stats-sm .stat .k { font-size: 10.5px; }
.stats.stats-sm .stat .v { font-size: 15px; }
/* Home summary: all ten filters stay compact in two rows; total is only subtly larger. */
.home-stats { grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:7px;margin-bottom:14px }
.home-stats .stat { min-height:48px;padding:6px 9px }
.home-stats .stat.stat-total { min-height:56px;padding:9px 12px;border-width:1.5px }
.home-stats .stat.stat-total .ic { width:32px;height:32px }
.home-stats .stat.stat-total .k { font-size:11.5px }
.home-stats .stat.stat-total .v { font-size:18px }
@media(max-width:900px){.home-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* إجمالي الأسهم / القيادية / QQQ أكبر قليلاً من باقي البطاقات المصغّرة [user 2026-09-29] */
.stats.stats-sm .stat.stat-lg { padding: 10px 12px; gap: 10px; }
.stats.stats-sm .stat.stat-lg .ic { width: 34px; height: 34px; border-radius: 9px; }
.stats.stats-sm .stat.stat-lg .ic svg { width: 17px; height: 17px; }
.stats.stats-sm .stat.stat-lg .k { font-size: 12px; }
.stats.stats-sm .stat.stat-lg .v { font-size: 18px; }
.stat > span:last-child { min-width: 0; }
.stat .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat { --c: var(--accent); --c-tint: var(--accent-tint); display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; transition: transform .12s, border-color .15s; }
.stat:hover { text-decoration: none; border-color: var(--c); transform: translateY(-1px); }
.stat.on { border-color: var(--c); background: var(--c-tint); }
.stat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--c-tint); color: var(--c); flex: none; }
.stat.on .ic { background: var(--c); color: var(--ink-on-accent); }
.stat .ic svg { width: 19px; height: 19px; }
.stat .k { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.stat .v { font-size: 21px; font-weight: 800; font-family: var(--font-num); line-height: 1.15; color: var(--ink); }
.stat .v .pct { font-size: 0.72em; font-weight: 700; color: var(--c, var(--ink-2)); margin-inline-start: 4px; }   /* [D-082] share next to the count */
.stat.c-up { --c: var(--up); --c-tint: var(--up-tint); }
.stat.c-warn { --c: var(--warn); --c-tint: var(--warn-tint); }
.stat.c-gold { --c: var(--gold); --c-tint: var(--gold-tint); }
.stat.c-violet { --c: var(--violet); --c-tint: var(--violet-tint); }
.stat.c-info { --c: var(--info); --c-tint: var(--info-tint); }
.stat.c-pink { --c: var(--pink); --c-tint: var(--pink-tint); }
.stat.c-dn { --c: var(--dn); --c-tint: var(--dn-tint); }
.put-near-row > td { background: color-mix(in srgb, var(--gold) 12%, var(--surface)) !important; }
.put-near-row > td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.put-near-row:hover > td { background: color-mix(in srgb, var(--gold) 18%, var(--surface)) !important; }
.put-near-badge { color: var(--gold); background: var(--gold-tint); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 9%, transparent); }

/* ==========================================================================
   controls
   ========================================================================== */
button, .btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s, color .12s; }
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.btn-primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); }
.btn-primary:hover, button.primary:hover { filter: brightness(1.07); color: var(--ink-on-accent); }
.btn-danger, button.danger { color: var(--dn-ink); border-color: color-mix(in srgb, var(--dn) 40%, transparent); background: var(--dn-tint); }
.btn-ghost { background: transparent; }
.btn-sm, button.mini { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 8px 11px; border-radius: 9px; font: inherit; font-size: 13.5px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="search"] { direction: ltr; text-align: start; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
label.field input { font-size: 15px; font-weight: 500; color: var(--ink); padding: 10px 12px; }

/* settings page */
.settings-sec-head { display: flex; align-items: flex-start; gap: 12px; }
.settings-sec-head .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); flex: none; }
.settings-sec-head .ic svg { width: 20px; height: 20px; }
.settings-sec-head h2 { font-size: 15px; font-weight: 800; margin: 0 0 2px; }
.settings-sec-head p { margin: 0; }
.settings-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed var(--line); }
.preview-label { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

/* segmented */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg > a, .seg > button { padding: 6px 12px; border-radius: 8px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg > .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg > a:hover { text-decoration: none; color: var(--ink); }

/* filter bar */
/* filter bar: a real grid so rows are always full — 2 cols (4 rows) on phones, 4 cols (2 rows) on tablets, one row on desktop */
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 16px; }
@media (min-width: 641px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .filters { grid-template-columns: 1.1fr 1.45fr 0.9fr 0.9fr 1fr 1.15fr 1fr auto; } }
@media (min-width: 641px) { .filters.filters-put { grid-template-columns: minmax(180px, 1.35fr) minmax(180px, 1fr) minmax(160px, .85fr) auto; } }
@media (min-width: 1200px) {
  .filters.filters-put { grid-template-columns: 1.1fr 1.45fr 0.9fr 0.9fr 1fr 1.15fr 1fr auto; }
  .filters-put > :nth-child(2) { grid-column: 2 / 4; }
  .filters-put > :nth-child(3) { grid-column: 4 / 8; }
  .filters-put > .reset { grid-column: 8; }
}
.filters .f { --c: var(--accent); --c-tint: var(--accent-tint); display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: var(--c-tint); border-radius: 11px; min-width: 0; }
.filters .f > span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--c); white-space: nowrap; }
.filters .f select, .filters .f input { width: 100%; min-width: 0; }
.filters .f.f-warning { --c: var(--gold); --c-tint: var(--gold-tint); }
.filters .f.f-dir { --c: var(--up); --c-tint: var(--up-tint); }
.filters .f.f-pattern { --c: var(--pink); --c-tint: var(--pink-tint); }
/* [D-100] the home bar has 9 cells with «الابتلاع الصاعد آخر يوم»: one row on desktop, 3x3 on tablet,
   2 per row on the phone with the reset button across the last row - rows stay complete */
@media (min-width: 1200px) { #filters { grid-template-columns: 1fr 1.35fr 1.1fr 0.85fr 0.8fr 1.05fr 0.95fr auto; } }
.filters .f.f-chan { --c: var(--violet); --c-tint: var(--violet-tint); }
.filters .f.f-analyst { --c: var(--info); --c-tint: var(--info-tint); }   /* the signals page's group filter */
.filters .f.f-industry { --c: var(--warn); --c-tint: var(--warn-tint); }
.filters .f.f-order { --c: var(--ink-2); --c-tint: var(--neutral-tint); }
.filters .reset { align-self: end; justify-self: stretch; margin-bottom: 8px; min-height: 38px; padding-inline: 16px; white-space: nowrap; }
/* [D-073] signals page: session, symbol search, direction, status, verdict, group + reset in one row on desktop */
@media (min-width: 1200px) { .filters.filters-sig { grid-template-columns: 1fr 1.2fr 0.9fr 0.9fr 0.9fr 1.4fr auto; } }
@media (min-width: 641px) and (max-width: 1199px) { .filters.filters-sig { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* [D-149] audit log filter bar: 5 fields + one cell holding «تصفية» and «إعادة تعيين» (always there, so the row never
   moves) - one row on desktop, 3 x 2 on tablets, 2 x 3 on phones: rows always complete */
#audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 641px) { #audit-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #audit-filters { grid-template-columns: 1.5fr 1fr 1.1fr 0.9fr 0.9fr auto; } }
#audit-filters .f-btns { display: flex; gap: 8px; align-self: end; margin-bottom: 8px; }
#audit-filters .f-btns > * { flex: 1 1 auto; min-height: 38px; margin: 0; white-space: nowrap; }
#audit-filters input[type="date"] { direction: ltr; text-align: end; }
/* [D-151] «سجل نتائج فرص PUT»: session, symbol, result, status, bounce, group, TP + reset - one row on desktop,
   4 x 2 on tablets, 2 x 4 on phones (rows always complete); its table keeps fixed columns like the audit log */
@media (min-width: 641px) and (max-width: 1199px) { #put-h-filters, #pat-h-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { #put-h-filters { grid-template-columns: 1fr 1.2fr 0.85fr 0.85fr 0.95fr 1.35fr 0.95fr auto; } }
/* [D-153] the SPX page's three tables: signals 4 + reset (5), PUT 5 + reset (6), patterns 6 + reset (7) - one row on
   desktop; tablets and phones in complete rows (the reset takes the leftover width) */
@media (min-width: 641px) { #idx-sig-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  #idx-put-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #idx-pat-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } #idx-pat-filters .reset { grid-column: span 2; } }
@media (min-width: 1200px) { #idx-put-filters { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; }
  #idx-pat-filters { grid-template-columns: 1fr 0.8fr 0.8fr 1.4fr 1.2fr 0.8fr auto; } #idx-pat-filters .reset { grid-column: auto; } }
@media (max-width: 640px) { #idx-sig-filters .reset, #idx-pat-filters .reset { grid-column: 1 / -1; } }
@media (min-width: 641px) {
  #idx-put-table, #idx-pat-table, #idx-signals #sig-table { table-layout: fixed; width: 100%; }
  #idx-put-table td, #idx-pat-table td, #idx-signals #sig-table td { overflow-wrap: anywhere; }
  #idx-signals #sig-table th:nth-child(1) { width: 6%; } #idx-signals #sig-table th:nth-child(2) { width: 14%; }
  #idx-signals #sig-table th:nth-child(3) { width: 7%; } #idx-signals #sig-table th:nth-child(4) { width: 9%; }
  #idx-signals #sig-table th:nth-child(5) { width: 9%; } #idx-signals #sig-table th:nth-child(6) { width: 8%; }
  #idx-signals #sig-table th:nth-child(7) { width: 8%; } #idx-signals #sig-table th:nth-child(8) { width: 11%; }
  #idx-signals #sig-table th:nth-child(9) { width: 11%; } #idx-signals #sig-table th:nth-child(10) { width: 8%; }
  #idx-signals #sig-table th:nth-child(11) { width: 9%; }
}
/* [D-152] «سجل الأنماط»: session, symbol, direction, pattern, result, group, target + reset - the same layout */
@media (min-width: 1200px) { #pat-h-filters { grid-template-columns: 1.2fr 1fr 0.75fr 1.35fr 1.15fr 1.2fr 0.8fr auto; } }
@media (min-width: 641px) { #put-history { table-layout: fixed; width: 100%; } #put-history td { overflow-wrap: anywhere; } }
/* [D-149] fixed columns: sorting or paging never moves or resizes a column */
@media (min-width: 641px) { #audit-table { table-layout: fixed; width: 100%; } #audit-table td { overflow-wrap: anywhere; white-space: normal; } }
/* results count: centred in its own row, big number in an accent pill, hairlines on both sides */
.result-line { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 20px; color: var(--ink); font-size: 18px; font-weight: 800; }
.result-line::before, .result-line::after { content: ""; flex: 1 1 0; height: 2px; border-radius: 2px; background: linear-gradient(to left, transparent, var(--line) 30%, var(--line) 70%, transparent); }
.result-line b { font-family: var(--font-num); font-size: 32px; font-weight: 800; line-height: 1.1; color: var(--ink-on-accent); background: var(--accent); padding: 6px 28px; border-radius: 999px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); letter-spacing: .02em; }
.result-line .mute { font-weight: 600; font-size: 14px; color: var(--ink-2); }

/* typeahead */
.ac { position: fixed; z-index: 50; min-width: 300px; max-width: 380px; max-height: 340px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.ac-item:hover, .ac-item.on { background: var(--surface-2); text-decoration: none; }
.ac-item .name { flex: 1; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   badges
   ========================================================================== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.v-confirmed { background: var(--up-tint); color: var(--up-ink); }
.v-unconfirmed { background: var(--warn-tint); color: var(--warn-ink); }
.v-none { background: var(--neutral-tint); color: var(--ink-2); }
.b-up { background: var(--up-tint); color: var(--up-ink); } .b-dn { background: var(--dn-tint); color: var(--dn-ink); }
.b-mixed, .b-flat { background: var(--neutral-tint); color: var(--ink-2); }
.b-info { background: var(--info-tint); color: var(--info-ink); } .b-violet { background: var(--violet-tint); color: var(--violet-ink); }
.b-gold { background: var(--gold-tint); color: var(--gold-ink); } .b-pink { background: var(--pink-tint); color: var(--pink-ink); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--neutral-tint); color: var(--ink-2); }
.pill.running, .pill.queued { background: var(--info-tint); color: var(--info-ink); }
.pill.done { background: var(--up-tint); color: var(--up-ink); }
.pill.error { background: var(--dn-tint); color: var(--dn-ink); }
.chip-dir { font-weight: 700; }

/* ==========================================================================
   breakout cards
   ========================================================================== */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
/* breakout card: five stacked zones — identity · price · evidence · levels · context */
.bo { --accent-c: var(--ink-3); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent-c); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; transition: transform .12s, box-shadow .15s; }
.bo:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bo.v-confirmed { --accent-c: var(--up); } .bo.v-unconfirmed { --accent-c: var(--warn); }
.bo-top { display: flex; align-items: flex-start; gap: 12px; padding-inline-end: 80px; min-height: 60px; }
.bo-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bo-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.bo-meta { margin-top: 2px; }
.bo-sym { font-family: var(--font-num); font-size: 20px; font-weight: 800; letter-spacing: .01em; line-height: 1.1; }
.bo-name { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.badge.xs { font-size: 10.5px; padding: 1px 7px; }
/* hidden-divergence signal states [D-023] */
.badge.b-forming { background: var(--warn-tint); color: var(--warn-ink); border: 1px dashed var(--warn); }
.badge.b-cancel { background: var(--neutral-tint); color: var(--ink-3); text-decoration: line-through; }
.c-hd { white-space: nowrap; } .hd-cell { display: inline-flex; gap: 4px; align-items: center; }
tr.hd-cancelled td { opacity: .55; }
#hd-sec .head { flex-wrap: wrap; gap: 8px 14px; }
.ma-legend b { font-family: var(--font-num); }
.chart-toolbar .overlays { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ring { width: 58px; height: 58px; flex: none; }
.ring .bg { fill: none; stroke: var(--line-soft); stroke-width: 6; }
.ring .fg { fill: none; stroke: var(--accent-c); stroke-width: 6; stroke-linecap: round; }
.ring text { font-family: var(--font-num); font-size: 15px; font-weight: 700; fill: var(--ink); }
.bo-price { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
.bo-px { display: inline-flex; align-items: baseline; gap: 8px; }
.bo-price .px { font-family: var(--font-num); font-size: 22px; font-weight: 800; line-height: 1; }
.bo-price .chg { font-family: var(--font-num); font-weight: 700; font-size: 13.5px; padding: 1px 8px; border-radius: 6px; }
.bo-when { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.chg.pos { background: var(--up-tint); color: var(--up-ink); } .chg.neg { background: var(--dn-tint); color: var(--dn-ink); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.ev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ev span { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--neutral-tint); color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span.on { background: var(--up-tint); color: var(--up-ink); text-decoration: none; }
.ev .ev-score { background: transparent; border: 1px dashed var(--line); color: var(--ink-2); text-decoration: none; }
.ev .ev-score b { font-family: var(--font-num); color: var(--ink); margin-inline-start: 4px; }
.range { position: relative; height: 6px; border-radius: 999px; background: linear-gradient(to left, var(--dn-tint), var(--neutral-tint) 25%, var(--neutral-tint) 75%, var(--up-tint)); }
.range i { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); transform: translate(50%, -50%); transition: inset-inline-start .4s; }
.range i.above { background: var(--up); } .range i.below { background: var(--dn); } .range i.inside { background: var(--warn); }
.bo-lvls { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 8px; border: 1px solid var(--line-soft); border-radius: 10px; }
.lvls { display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.lvls span + span { border-inline-start: 1px solid var(--line-soft); }
.lvls b { display: block; font-family: var(--font-num); font-size: 14px; color: var(--ink); margin-top: 2px; }
.multi-levels { display: grid; gap: 5px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); }
.level-row { display: grid; grid-template-columns: minmax(92px, 1.15fr) 1fr 1fr; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-3); }
.level-row + .level-row { border-top: 1px solid var(--line-soft); padding-top: 5px; }
.level-row > span:first-child { font-weight: 700; color: var(--ink-2); }
.level-row .sup, .level-row .res { white-space: nowrap; }
.level-row .sup { color: var(--up-ink); }
.level-row .res { color: var(--dn-ink); }
.level-row b { display: inline; margin-inline-start: 3px; font-family: var(--font-num); font-size: 12.5px; color: currentColor; }
.levels-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 12px 0 7px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-weight: 700; }
.levels-head small { color: var(--ink-3); font-weight: 400; }
/* [D-117] a fund's top holdings: a compact two-column list */
.fund-holdings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.fund-holdings > span { display: flex; justify-content: space-between; gap: 6px; }
.fund-holdings b { color: var(--ink); }
.detail-levels .level-row { grid-template-columns: minmax(120px, 1.2fr) 1fr 1fr; font-size: 12px; }
.detail-levels .level-row b { font-size: 14px; }
.bo-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.fav-wrap { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 6px; z-index: 2; }
.fav-btn, .list-caret { width: 34px; height: 34px; padding: 0; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; line-height: 1; }
.fav-btn { font-size: 21px; }
.fav-btn.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-tint); }
.fav-btn:hover, .list-caret:hover { border-color: var(--accent); color: var(--accent); }
.list-caret { font-size: 19px; font-weight: 800; }
.list-menu { position: fixed; z-index: 60; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.lm-item { display: flex; align-items: center; gap: 4px; }
.lm-row { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.lm-row:hover { background: var(--surface-2); }
.lm-icon { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 6px; border-radius: 6px; }
.lm-icon:hover { background: var(--surface-2); color: var(--ink); }
.lm-new { border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 6px; }
.lm-new input { width: 100%; }

/* pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.pager .grp { display: flex; gap: 4px; }
.pager a, .pager span.p { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-family: var(--font-num); font-size: 13px; }
.pager a:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.pager span.p.cur { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); font-weight: 700; }
.pager span.p.off { opacity: .4; }

/* table pager (client-side, SV.paginate) */
.tpager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 2px 0; }
.tpager .grp { display: flex; gap: 4px; }
.tpager button { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 9px; font-family: var(--font-num); font-size: 13px; color: var(--ink-2); }
.tpager button.cur { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); font-weight: 700; }
.tpager .dots { align-self: center; color: var(--ink-3); padding: 0 4px; }
.tpager select.per { padding: 4px 8px; font-size: 12.5px; }
td.wrap, th.wrap { white-space: normal; }
td.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   tables
   ========================================================================== */
.tablewrap { overflow-x: auto; }

#group-table { table-layout: fixed; width: 990px; }
#group-table td { white-space: normal; overflow-wrap: anywhere; border-bottom: 2px solid color-mix(in srgb, var(--line) 75%, var(--ink-3) 25%); }
#group-table td.num { white-space: nowrap; }
#group-table th { white-space: normal; }
#group-table .group-live-row td { background: color-mix(in srgb, var(--up-tint) 40%, var(--surface) 60%); }
#group-table .group-live-row:hover td { background: color-mix(in srgb, var(--up-tint) 65%, var(--surface) 35%); }
#group-table .group-live-row td:first-child { box-shadow: inset -4px 0 var(--up); }
#group-table .group-favorite-row td { background: color-mix(in srgb, var(--violet-tint) 40%, var(--surface) 60%); }
#group-table .group-favorite-row:hover td { background: color-mix(in srgb, var(--violet-tint) 65%, var(--surface) 35%); }
#group-table .group-favorite-row td:first-child { box-shadow: inset -4px 0 var(--violet); }
.group-color-key { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 16px 0 8px; }
.group-color-key span { display: inline-flex; align-items: center; gap: 8px; }
.group-color-key span::before { content: ""; width: 18px; height: 18px; border: 1px solid var(--up); background: var(--up-tint); border-radius: 4px; flex-shrink: 0; }
.group-color-key .favorite-key::before { border-color: var(--violet); background: var(--violet-tint); }
table { width: 100%; border-collapse: collapse; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 12px; text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
td.num, th.num { text-align: left; direction: ltr; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable.sorted { color: var(--accent-ink); }
table.compact td, table.compact th { padding: 8px 12px; font-size: 13px; }
td.sym a { font-family: var(--font-num); font-weight: 700; font-size: 14.5px; }
.live-col { background: color-mix(in srgb, var(--accent-tint) 45%, transparent); }
thead th.live-col { color: var(--accent-ink); }
.zebra tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
/* session reports table [D-069] */
.reports-table thead th { background: var(--accent-tint); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--accent); }
.reports-table thead th .i { width: 14px; height: 14px; margin-inline-end: 6px; vertical-align: -2px; color: var(--accent); }
.reports-table td { vertical-align: middle; }
.reports-table .rt-date { font-size: 13px; padding: 3px 12px; }
.reports-table .rt-file { font-size: 12.5px; padding: 2px 8px; border-radius: 6px; background: var(--neutral-tint); color: var(--ink-2); direction: ltr; display: inline-block; }
.reports-table .rt-size small { color: var(--ink-3); font-weight: 400; margin-inline-start: 2px; }
.reports-table .rt-act { text-align: center; width: 120px; }
.reports-table .rt-dl { display: inline-flex; align-items: center; gap: 6px; }
.reports-table .rt-dl .i { width: 14px; height: 14px; }
.meter { height: 6px; border-radius: 999px; background: var(--neutral-tint); overflow: hidden; min-width: 80px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--ink-3); transition: width .3s; }
.meter i.ok { background: var(--up); } .meter i.warn { background: var(--warn); } .meter i.bad { background: var(--dn); }
.sticky-first td:first-child, .sticky-first th:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 2; }
.sticky-first thead th:first-child { z-index: 3; background: var(--surface-2); }

/* ==========================================================================
   symbol page
   ========================================================================== */
.sym-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; margin-bottom: 20px; }
.sym-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sym-title h1 { font-family: var(--font-num); font-size: 30px; }
.sym-meta { color: var(--ink-2); font-size: 14px; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tag { padding: 2px 9px; border-radius: 6px; background: var(--neutral-tint); color: var(--ink-2); font-size: 12px; }
.sym-price { text-align: end; }
.sym-price .px { font-family: var(--font-num); font-size: 34px; font-weight: 800; line-height: 1.1; }
.sym-price .when { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.sym-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kv .k { font-size: 12px; color: var(--ink-3); }
.kv .v { font-family: var(--font-num); font-size: 16px; font-weight: 700; }
.kv .v.t-up { color: var(--up-ink); } .kv .v.t-dn { color: var(--dn-ink); } .kv .v.t-warn { color: var(--warn-ink); } .kv .v.t-accent { color: var(--accent-ink); }
.ev-list { display: grid; gap: 6px; }
.ev-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.ev-row .mk { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ev-row.on .mk { background: var(--up-tint); color: var(--up-ink); } .ev-row.off .mk { background: var(--dn-tint); color: var(--dn-ink); }
.ev-row.off { color: var(--ink-3); }
.targets { display: flex; gap: 10px; flex-wrap: wrap; }
.tgt { --c: var(--ink-2); --c-tint: var(--neutral-tint); padding: 8px 12px; border-radius: 10px; background: var(--c-tint); min-width: 110px; }
.tgt i { display: block; font-style: normal; font-size: 11.5px; color: var(--c); font-weight: 700; }
.tgt b { font-family: var(--font-num); font-size: 16px; }
.tgt.up { --c: var(--up-ink); --c-tint: var(--up-tint); } .tgt.dn { --c: var(--dn-ink); --c-tint: var(--dn-tint); }
.tgt.res { --c: var(--pink-ink); --c-tint: var(--pink-tint); } .tgt.sup { --c: var(--info-ink); --c-tint: var(--info-tint); }
.analyst-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.analyst-bar span { height: 100%; }
.ab-sb { background: var(--up); } .ab-b { background: color-mix(in srgb, var(--up) 55%, var(--surface)); } .ab-h { background: var(--ink-3); }
.ab-s { background: color-mix(in srgb, var(--dn) 55%, var(--surface)); } .ab-ss { background: var(--dn); }
.legend-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: middle; }
/* universe page: add basket (typeahead + status chips) [user 2026-09-25] */
.ab-wrap { display: grid; gap: 10px; }
.ab-inputwrap { position: relative; max-width: 420px; }
.ab-inputwrap input { width: 100%; font-size: 16px; padding: 9px 12px; }
.ab-sugg { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); overflow: hidden; max-height: 320px; overflow-y: auto; }
.ab-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.ab-item:last-child { border-bottom: 0; }
.ab-item:hover, .ab-item.on { background: var(--surface-2); }
.ab-item span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-item i { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--neutral-tint); color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.chip b { font-size: 14px; }
.chip small { color: var(--ink-3); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip i { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--neutral-tint); color: var(--ink-2); }
.chip-x { border: 0; background: transparent; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 0 2px; }
.chip-x:hover { color: var(--dn-ink); }
.st-new i { background: var(--up-tint); color: var(--up-ink); }
.st-exists i { background: var(--warn-tint); color: var(--warn-ink); }
.st-inactive i { background: var(--info-tint); color: var(--info-ink); }
.st-notfound i, .st-invalid i { background: var(--dn-tint); color: var(--dn-ink); }
.chip.st-notfound, .chip.st-invalid { border-color: var(--dn-tint); }
.chip.st-exists { opacity: .75; }
/* symbol page: the three analysis cards as small as possible, side by side (user 2026-09-25) */
.cards-compact { grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; align-items: start; }
.cards-compact.cards-two { grid-template-columns: 1.3fr 1fr; }   /* [D-122] no analysts card */
.cards-compact .panel-pad { padding: 10px 12px; }
.cards-compact .head { margin-bottom: 6px !important; }
.cards-compact h2 { font-size: 15px; }
.cards-compact .hint, .cards-compact .dim { font-size: 11px; }
.cards-compact .ring { width: 46px !important; height: 46px !important; }
.cards-compact .ring text { font-size: 13px; }
.cards-compact .row { margin-bottom: 6px !important; gap: 10px !important; }
.cards-compact .kv { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 4px 8px; }
.cards-compact .kv .k { font-size: 10.5px; }
.cards-compact .kv .v { font-size: 13px; }
.cards-compact .ev-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 3px; }
.cards-compact .ev-row { padding: 2px 6px; font-size: 12px; gap: 6px; border-radius: 6px; }
.cards-compact .ev-row .mk { width: 16px; height: 16px; font-size: 11px; border-radius: 4px; }
.cards-compact .targets { gap: 6px; flex-wrap: nowrap; }
.cards-compact .tgt { padding: 4px 8px; min-width: 0; flex: 1; border-radius: 8px; }
.cards-compact .tgt i { font-size: 10.5px; }
.cards-compact .tgt b { font-size: 13.5px; }
.cards-compact .badge { font-size: 12px !important; padding: 2px 10px !important; }
.cards-compact .analyst-bar { height: 8px; margin: 6px 0 4px; }
.cards-compact .legend-row { font-size: 11px; gap: 8px; }
.cards-compact .empty { padding: 8px; font-size: 12px; }
.cards-compact p.xs { margin-top: 4px !important; font-size: 10.5px; }
@media (max-width: 1100px) { .cards-compact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .cards-compact { grid-template-columns: 1fr; } }

/* charts */
.chartbox { position: relative; }
.chart-toolbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
.chart-toolbar .grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.chk input { accent-color: var(--accent); }
.chart-key { display:inline-flex; align-items:center; gap:5px; color:var(--ink-2); font:700 11px var(--font-num); white-space:nowrap; }
.chart-key input { accent-color:var(--ma50); }
.chart-key i { width:18px; height:3px; border-radius:99px; background:var(--ma50); box-shadow:0 0 0 1px color-mix(in srgb,var(--ma50) 20%,transparent); }
.chk.ma { --ma: var(--ink-2); padding: 2px 8px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--ma) 45%, transparent); color: var(--ma); font-weight: 700; font-family: var(--font-num); font-size: 12px; }
.chk.ma input { accent-color: var(--ma); }
.seg.zoom > button { min-width: 30px; padding: 4px 8px; font-family: var(--font-num); font-size: 14px; }
/* the + and − zoom buttons twice their size (user 2026-10-16: «اجعله اكبر مرتين») */
.seg.zoom { align-items: center; }
.seg.zoom > button[data-zoom="in"], .seg.zoom > button[data-zoom="out"] { min-width: 60px; min-height: 56px; padding: 8px 16px; font-size: 28px; line-height: 1; }
.chart { width: 100%; height: 480px; }
.chart.sm { height: 300px; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px 11px; font-size: 12.5px; min-width: 150px; direction: ltr; text-align: left; font-family: var(--font-num); }
.chart-tip .d { color: var(--ink-3); font-size: 11.5px; margin-bottom: 4px; }
.chart-tip .g { display: grid; grid-template-columns: auto auto; gap: 1px 12px; }
.chart-tip .g span { color: var(--ink-3); } .chart-tip .g b { text-align: right; }
.chart-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; background: color-mix(in srgb, var(--surface) 80%, transparent); z-index: 3; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 14px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line-soft); }
.chart-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-inline-end: 5px; vertical-align: middle; }

/* options */
.opt-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.opt-chip { --c: var(--ink-2); --c-tint: var(--neutral-tint); display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-radius: 10px; background: var(--c-tint); }
.opt-chip .l { font-size: 10.5px; color: var(--ink-3); font-weight: 600; display: block; }
.opt-chip .v { font-family: var(--font-num); font-size: 14.5px; font-weight: 800; color: var(--c); }
.opt-chip.c-violet { --c: var(--violet-ink); --c-tint: var(--violet-tint); } .opt-chip.c-up { --c: var(--up-ink); --c-tint: var(--up-tint); }
.opt-chip.c-info { --c: var(--info-ink); --c-tint: var(--info-tint); } .opt-chip.c-gold { --c: var(--gold-ink); --c-tint: var(--gold-tint); }
/* options chain: grouped columns with vertical separators, one colour per greek, ATM row boxed */
#opt-table th.sep, #opt-table td.sep { border-inline-start: 2px solid var(--line); }
#opt-table td.c-delta { color: var(--info); font-weight: 700; }
#opt-table td.c-vega { color: var(--violet); font-weight: 700; }
#opt-table td.c-theta { color: var(--dn); font-weight: 700; }
#opt-table td.c-iv { color: var(--warn-ink); font-weight: 700; }
tr.opt-otm td { background: color-mix(in srgb, var(--warn-tint) 30%, transparent); }
tr.opt-itm td { background: color-mix(in srgb, var(--up-tint) 45%, transparent); }
tr.opt-top td { background: color-mix(in srgb, var(--gold-tint) 80%, transparent); }
tr.opt-atm td { background: color-mix(in srgb, var(--warn-tint) 90%, transparent); border-top: 2px solid var(--warn); border-bottom: 2px solid var(--warn); }
tr.opt-atm td:first-child { border-inline-start: 2px solid var(--warn); }
tr.opt-atm td:last-child { border-inline-end: 2px solid var(--warn); }
.atm-tag { font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--ink-3); margin-inline-start: 6px; white-space: nowrap; }
.why-btn { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; }
.why-btn.top { background: var(--warn); border-color: var(--warn); color: #fff; font-weight: 700; box-shadow: 0 2px 8px color-mix(in srgb, var(--warn) 40%, transparent); }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,12,18,.55); backdrop-filter: blur(3px); }
.modal { width: min(880px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal.sm { width: min(520px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { flex: 1; font-size: 16px; }
.modal-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 2px 6px; }
.modal-x:hover { color: var(--dn); }
.modal-body { padding: 16px 18px 18px; }
.why-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; margin-bottom: 6px; }
.why-row b { color: var(--up-ink); font-family: var(--font-num); }
.why-row small { display: block; color: var(--ink-3); font-size: 11.5px; }
.why-total { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 10px; background: var(--gold-tint); color: var(--gold-ink); font-weight: 800; margin-bottom: 10px; }

/* market clock */
.clock { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 14px; border-inline-start: 4px solid var(--line); }
.clock .t { font-family: var(--font-num); font-weight: 700; font-size: 15px; }
.clock.open { border-inline-start-color: var(--up); } .clock.closed { border-inline-start-color: var(--dn); }
/* user 2026-09-25: the label AND the date/time green while the market is open, red when closed */
.clock.open #mkt-label, .clock.open #mkt-time { color: var(--up-ink); }
.clock.closed #mkt-label, .clock.closed #mkt-time { color: var(--dn-ink); }
.asof { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--neutral-tint); color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.asof.fresh { background: var(--up-tint); color: var(--up-ink); } .asof.warm { background: var(--warn-tint); color: var(--warn-ink); } .asof.stale { background: var(--dn-tint); color: var(--dn-ink); }

/* live page */
.lv-price { font-family: var(--font-num); font-size: 16px; font-weight: 800; }
td.lv-up { background: var(--up-tint) !important; } td.lv-dn { background: var(--dn-tint) !important; }
.state-arrow { font-size: 18px; font-weight: 800; }
/* [D-087] «سجلّ الحركات»: each column centred under its own header, with set shares of the width */
.mv-grid { table-layout: fixed; width: 100%; }
.mv-grid th, .mv-grid td { text-align: center; vertical-align: middle; }
.mv-grid th:first-child, .mv-grid td:first-child { text-align: start; }
.mv-grid th .sort-ic { margin-inline-start: 4px; }
.mv-grid col.c-sym { width: 10%; } .mv-grid col.c-px { width: 11%; } .mv-grid col.c-pos { width: 15%; }
.mv-grid col.c-zone { width: 20%; } .mv-grid col.c-rng { width: 17%; } .mv-grid col.c-span { width: 9%; }
.mv-grid col.c-cnt { width: 9%; } .mv-grid col.c-btn { width: 9%; }
.mv-grid td.m-zone > div { white-space: nowrap; }
@media (max-width: 900px) { .mv-grid { table-layout: auto; min-width: 760px; } }
.mv { direction: ltr; font-family: var(--font-num); line-height: 1.35; padding: 6px 10px; border-radius: 8px; text-align: center; min-width: 96px; }
.mv b { display: block; font-size: 15px; } .mv span { display: block; font-size: 12px; font-weight: 700; } .mv time { display: block; font-size: 11px; color: var(--ink-3); }
.mv.up { background: var(--up-tint); } .mv.up span { color: var(--up-ink); } .mv.dn { background: var(--dn-tint); } .mv.dn span { color: var(--dn-ink); }
.zone { font-size: 12px; line-height: 1.5; }
.zone .en { font-weight: 700; }

/* signals page */
/* scan-coverage card [user request 2026-09-26]: a visually distinct banner above the
   results, so it never gets mistaken for one of the plain sig-summary cards below it */
.scan-coverage { border-radius: 16px; padding: 14px 18px 16px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent-tint), transparent 65%), var(--surface);
  border: 1px solid var(--accent); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 12%, transparent); }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sc-title { font-weight: 800; font-size: 15px; color: var(--accent-ink); }
.sc-total { font-family: var(--font-num); font-weight: 800; font-size: 20px; color: var(--ink); }
.sc-of { font-family: var(--font-base); font-weight: 600; font-size: 12px; color: var(--ink-2); margin-inline-start: 4px; }
.sc-stats.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
@media (max-width: 700px) { .sc-stats.stats { grid-template-columns: repeat(1, minmax(0, 1fr)); } }
/* these three are plain counts, not filters [user 2026-09-26: "لا أريدها قابلة للضغط"] */
.sc-stats.stats .stat { cursor: default; }
.sc-stats.stats .stat:hover { transform: none; border-color: var(--line); background: var(--surface); }
.sc-note { margin: 10px 2px 0; }
.sig-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sig-card { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sig-card .k { font-size: 12px; color: var(--ink-2); } .sig-card .v { font-family: var(--font-num); font-size: 22px; font-weight: 800; }
.verdict-ok { background: var(--up-tint); color: var(--up-ink); } .verdict-partial { background: var(--warn-tint); color: var(--warn-ink); } .verdict-bad { background: var(--dn-tint); color: var(--dn-ink); }
th.g-sig, td.g-sig { background: color-mix(in srgb, var(--pink-tint) 40%, transparent); }
th.g-low, td.g-low { background: color-mix(in srgb, var(--dn-tint) 35%, transparent); }
th.g-high, td.g-high { background: color-mix(in srgb, var(--up-tint) 35%, transparent); }
th.gs, td.gs { border-inline-start: 2px solid var(--line); }
/* signals results table [user 2026-10-04: «واضحة بصريًا… لا أريد أتعب حتى أقرأ»، صفوف أضيق]:
   tight rows, bigger headers, every value on a bold main line with its time / % on a small sub-line,
   and the dollar difference as a large green / red pill */
#sig-table thead th { font-size: 13px; color: var(--ink); padding: 8px 10px; }
#sig-table tbody td { padding: 4px 10px; vertical-align: middle; }
/* [D-179] the SPX page's 5m signals table shares the signals table's cells */
#sig-table .cell-main, #idx-up5-table .cell-main { display: block; font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
#sig-table .cell-sub, #idx-up5-table .cell-sub { display: block; font-family: var(--font-num); font-size: 11.5px; color: var(--ink-3); line-height: 1.25; }
#sig-table .diff-pill, #idx-up5-table .diff-pill { display: inline-block; padding: 1px 8px; border-radius: 7px; font-family: var(--font-num); font-size: 15.5px; font-weight: 800; line-height: 1.45; }
#sig-table .diff-pill.up, #idx-up5-table .diff-pill.up { background: var(--up-tint); color: var(--up-ink); }
#sig-table .diff-pill.dn, #idx-up5-table .diff-pill.dn { background: var(--dn-tint); color: var(--dn-ink); }
#sig-table td.diff .cell-sub, #idx-up5-table td.diff .cell-sub { font-weight: 700; }
#sig-table td.diff .cell-sub.pos, #idx-up5-table td.diff .cell-sub.pos { color: var(--up-ink); }
#sig-table td.diff .cell-sub.neg, #idx-up5-table td.diff .cell-sub.neg { color: var(--dn-ink); }
#sig-table td.sym a { font-size: 15px; }
/* «الفرق ($)» is its own column: its own tint and a clear rule on both sides, so it never reads as part of «النتيجة» */
#sig-table th.g-diff, #sig-table td.g-diff { background: color-mix(in srgb, var(--accent-tint) 55%, transparent);
  border-inline-start: 2px solid var(--line); border-inline-end: 2px solid var(--line); text-align: center; }
#sig-table th.g-diff { color: var(--accent-ink); }

/* jobs */
/* jobs page: launcher cards in groups sized so every row is full (4 | 3), icon + chips + full-width button */
.job-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.job-grid[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .job-grid, .job-grid[data-n="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } .job-grid[data-n="3"] .job-card:last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .job-grid, .job-grid[data-n="3"] { grid-template-columns: 1fr; } .job-grid[data-n="3"] .job-card:last-child { grid-column: auto; } }
.job-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.job-card .jc-head { display: flex; align-items: center; gap: 10px; }
.job-card .jc-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); flex: none; }
.job-card .jc-ic svg { width: 21px; height: 21px; }
.job-card b { font-size: 15.5px; line-height: 1.3; }
.job-card .jc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.job-card p { color: var(--ink-2); font-size: 13px; line-height: 1.6; flex: 1; margin: 0; }
.job-card button { width: 100%; padding-block: 9px; font-weight: 700; }
/* user 2026-10-18: the Arabic job log was unreadable - the monospace font has no Arabic shaping and the LTR box
   reversed a line's words around its numbers. The site's Arabic font, and each line takes its own direction from its
   first letter (an Arabic line reads right to left with its numbers in place; an English traceback stays LTR). */
.log { margin: 0; padding: 14px 16px; background: #0d1117; color: #d7e0ea; font: 14px/1.85 var(--font-ui); direction: rtl; text-align: start; unicode-bidi: plaintext; max-height: 520px; overflow: auto; white-space: pre-wrap; border-radius: 0 0 var(--radius) var(--radius); }
:root[data-theme="dark"] .log { background: #0a0f14; }
.log .log-line { display: block; unicode-bidi: isolate; text-align: start; min-height: 1em; }
.log .log-ltr { direction: ltr; unicode-bidi: isolate; }
.log.rtl { direction: rtl; text-align: right; font: 13.5px/1.75 var(--font-ui); unicode-bidi: plaintext; border-radius: var(--radius); }
/* collector heartbeat: 8 tiles in two full rows of four (two columns on phones), colour = health */
.hb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .hb { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hb-panel { border-inline-start: 4px solid var(--line); }
.hb-panel.ok { border-inline-start-color: var(--up); } .hb-panel.warn { border-inline-start-color: var(--warn); } .hb-panel.bad { border-inline-start-color: var(--dn); }
.hb-panel .head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; } .hb-panel .head h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; } .hb-panel .head .hint { color: var(--ink-3); font-size: 12.5px; }
.hb-state { font-size: 13px; padding: 4px 12px; }
.hb-tile { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); min-width: 0; }
.hb-tile .k { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-tile .v { font-family: var(--font-num); font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-tile .v small { font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--ink-3); margin-inline-start: 5px; }
.hb-tile.ok .v { color: var(--up-ink); } .hb-tile.warn .v { color: var(--warn-ink); } .hb-tile.bad .v { color: var(--dn-ink); }
.hb-msg { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--neutral-tint); font-family: var(--font-num); font-size: 12px; color: var(--ink-2); word-break: break-word; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% -10%, var(--accent-tint), transparent), var(--bg); }
.login-card { width: min(400px, 100%); padding: 30px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.login-card h1 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.login-card input { width: 100%; }

/* admin */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; font-size: 13.5px; }

/* admin users page [user request 2026-09-26]: one compact row per user (avatar,
   name, role/permission badges, edit toggle) - no raw table, no horizontal
   scroll, the whole list fits without scrolling to the last account */
.au-add > summary { cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; align-items: center; gap: 8px; }
.au-add > summary::before { content: '+'; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-tint); color: var(--accent); font-weight: 800; }
.au-add[open] > summary::before { content: '−'; }
.au-add > summary::-webkit-details-marker { display: none; }
.au-add[open] > summary { margin-bottom: 14px; }
.au-edit-form { display: grid; gap: 12px; }
.au-cancel-btn { background: none; border: 1px solid var(--line); }

.au-list { padding: 6px; }
.au-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; transition: background .12s; }
.au-row:hover, .au-row.open { background: var(--surface-2); }
.au-row + .au-row, .au-row:not(:first-child) { border-top: 1px solid var(--line-soft); }
.au-list > div:first-child .au-row { border-top: 0; }
.au-avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); font-weight: 800; font-size: 15px; }
.au-avatar.gold { background: var(--gold-tint); color: var(--gold-ink); }
.au-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.au-id b { font-size: 14.5px; }
.au-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: none; }
.au-edit-btn { display: flex; align-items: center; gap: 6px; flex: none; }
.au-edit-btn svg { width: 14px; height: 14px; transition: transform .15s; }
.au-row.open .au-edit-btn svg { transform: rotate(180deg); }
.au-edit-panel { padding: 16px 18px 18px; margin: 0 2px 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 640px) { .au-row { flex-wrap: wrap; } .au-id { flex-basis: 100%; order: -1; } .au-avatar { display: none; } }

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  /* two-row top bar: brand + controls first, the full-width scrolling nav below */
  .topbar { grid-template-columns: auto 1fr; grid-template-rows: auto auto; height: auto; padding: 8px 14px 6px; row-gap: 6px; }
  .brand { grid-row: 1; grid-column: 1; }
  .topbar-end { grid-row: 1; grid-column: 2; }
  .nav { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; min-width: 0; }
  .nav a { flex: none; padding: 7px 10px; }
  .status-pill .txt { display: none; }
  .sym-head { grid-template-columns: 1fr; } .sym-price { text-align: start; } .sym-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { padding: 8px 12px 6px; }
  .brand small { display: none; }
  main { padding: 16px 12px 70px; }
  .chart { height: 360px; }
  .grid-cards { grid-template-columns: 1fr; }
  .stat { padding: 10px 12px; gap: 10px; }
}

/* ==========================================================================
   print (symbol report)
   ========================================================================== */
@media print {
  .no-print, .topbar, .ticker, .foot, .filters, .fav-wrap, .sym-actions { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; color: #000; font-size: 12px; }
  main { padding: 0; max-width: none; }
  .panel, .bo { box-shadow: none; break-inside: avoid; }
  /* symbol page [D-070]: ONE page = the print sheet only (header + breakout card + daily chart image) */
  @page { size: A4 portrait; margin: 10mm 12mm; }
  body:has(#print-sheet) main > *:not(#print-sheet) { display: none !important; }
  .print-sheet { display: flex; flex-direction: column; gap: 6px; height: 270mm; overflow: hidden; color: var(--ink); }
  .print-sheet .ps-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
  .print-sheet .ps-sym { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
  .print-sheet .ps-name { font-size: 12px; color: var(--ink-2); }
  .print-sheet .ps-right { text-align: left; }
  .print-sheet .ps-price { font-size: 24px; font-weight: 800; }
  .print-sheet .ps-when { font-size: 11px; color: var(--ink-2); }
  .print-sheet .ps-title { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-top: 4px; }
  .print-sheet .ps-bo { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 11px; }
  .print-sheet .ps-bo .ring { width: 56px !important; height: 56px !important; }
  .print-sheet .ps-bo .ev-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 10px; }
  .print-sheet .ps-bo .targets { display: flex; gap: 14px; }
  .print-sheet .ps-bo .mute.xs { display: none; }
  .print-sheet #ps-chart { width: 100%; max-height: 128mm; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
  .print-sheet .ps-foot { margin-top: auto; font-size: 9.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 4px; }
}

/* PUT filter cards: emphasize the complete stock universe. */
.stats.put-stats { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); align-items: center; }
.put-stats button.stat { cursor: pointer; text-align: start; font: inherit; width: 100%; position: relative; }
.put-stats button.stat[data-put-filter="all"] { min-height: 100px; padding: 20px; }
.put-stats [data-put-filter="all"] .v { font-size: 30px; }
.put-stats [data-put-filter="all"] .k { font-size: 16px; }
.put-stats .stat .k { white-space: normal; }
.put-stats .stat.on::after { content: '\2713'; position: absolute; inset-inline-end: 7px; top: 3px; color: var(--c); font-size: 12px; }
.put-stats button:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
@media (max-width: 900px) {
  .stats.put-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .put-stats [data-put-filter="all"] { grid-column: 1 / -1; }
}

/* «الأنماط» page [D-102]: the «فرص PUT» card row (a large «كل الأسهم» + 3) */
.stats.pat-stats { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); align-items: center; }
.pat-stats button.stat { cursor: pointer; text-align: start; font: inherit; width: 100%; position: relative; }
.pat-stats button.stat[data-pat-filter="all"] { min-height: 100px; padding: 20px; }
.pat-stats [data-pat-filter="all"] .v { font-size: 30px; }
.pat-stats [data-pat-filter="all"] .k { font-size: 16px; }
.pat-stats .stat .k { white-space: normal; }
.pat-stats .stat.on::after { content: '\2713'; position: absolute; inset-inline-end: 7px; top: 3px; color: var(--c); font-size: 12px; }
.pat-stats button:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
@media (max-width: 900px) {
  .stats.pat-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pat-stats [data-pat-filter="all"] { grid-column: 1 / -1; }
}
/* «نتائج الإشارات» filter cards [D-105]: the home-page cards (same size, one active card); 7 in one row, and
   below 900px «كل الإشارات» spans the row and the six fill three complete rows of two */
.stats.home-stats.sig-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .stats.home-stats.sig-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sig-stats [data-sig-card="all"] { grid-column: 1 / -1; }
}
/* «الأنماط» first table: fixed column widths (colgroup), so sorting never moves the columns [user 2026-10-14] */
@media (min-width: 641px) { #pat-table, #pat-history { table-layout: fixed; width: 100%; } #pat-table td, #pat-history td { overflow-wrap: anywhere; } }
/* phones: every column stays visible - each row is a 3 x 3 block with the column name above its value */
@media (max-width: 640px) {
  .pat-table thead { display: none; }
  .pat-table, .pat-table tbody { display: block; }
  .pat-table tr[data-symbol] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .pat-table tr[data-symbol][hidden] { display: none; }
  .pat-table tr[data-symbol] td { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0; border: 0; min-width: 0; text-align: start; }
  .pat-table tr[data-symbol] td::before { content: attr(data-label); font-size: 10.5px; font-weight: 700; color: var(--ink-3); font-family: inherit; }
  .pat-table tr[data-symbol] td .badge { white-space: normal; }
}

.group-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0;align-items:start}.group-filters label{display:flex;flex-direction:column;gap:8px}.group-filters input,.group-filters select{width:100%;min-height:42px}.group-filter-actions{grid-column:1/-1;display:flex;align-items:center;gap:16px}.group-filter-actions small{line-height:1.7}@media(max-width:900px){.group-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:540px){.group-filters{grid-template-columns:1fr}.group-filter-actions{align-items:stretch;flex-direction:column}}

/* ===================================================================== [D-145] «المراقبة» (/monitor) */
.mn-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; }
.mn-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.mn-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mn-day { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.mn-day select, #mn-a-src { font: inherit; font-size: 13px; padding: 5px 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.mn-svc { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.mn-svc b { color: var(--up); } .mn-svc b.off { color: var(--dn); } .mn-svc b.idle { color: var(--ink-2); }
.mn-toggle { font: inherit; font-size: 14px; font-weight: 700; border-radius: var(--radius-sm); padding: 7px 14px; cursor: pointer; border: 1px solid var(--dn); background: var(--dn-tint); color: var(--dn-ink); }
.mn-toggle.start { border-color: var(--accent); background: var(--accent); color: var(--ink-on-accent); }
.mn-overall { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-sm); background: var(--neutral-tint); color: var(--ink-2); }
.mn-overall.ok { background: var(--up-tint); color: var(--up-ink); } .mn-overall.warn { background: var(--warn-tint); color: var(--warn-ink); }
.mn-overall.bad { background: var(--dn-tint); color: var(--dn-ink); }
.mn-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.mn-bar { border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }
.mn-bar.bad { background: var(--dn-tint); color: var(--dn-ink); } .mn-bar.info { background: var(--accent-tint); color: var(--accent-ink); }
.mn-page { display: grid; gap: 20px; min-width: 0; }
.mn-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.mn-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
.mn-sec-head h2 { font-size: 17px; margin: 0; }
.mn-sp { flex: 1; }
.mn-sec-body { padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
.mn-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.mn-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; background: var(--up); }
.mn-legend i.warn { background: var(--warn); } .mn-legend i.bad { background: var(--dn); } .mn-legend i.idle { background: var(--neutral-tint); border: 1px solid var(--line); }
.mn-legend i.forming { background: var(--accent-tint); border: 1px solid var(--accent); }
.mn-legend i.off, .mn-tl-track span.off { background: repeating-linear-gradient(135deg, var(--line) 0 4px, var(--surface-2) 4px 8px); }

/* process cards */
.mn-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .mn-cards { grid-template-columns: minmax(0, 1fr); } .mn-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } .mn-card .mn-hb { grid-row: span 4; align-self: end; } }
@media (max-width: 640px) { .mn-card { grid-template-columns: minmax(0, 1fr); } .mn-card .mn-hb { grid-row: auto; } }
.mn-card { border: 1px solid var(--line); border-top: 4px solid var(--up); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 7px; background: var(--surface-2); min-width: 0; cursor: pointer; }
.mn-card.warn { border-top-color: var(--warn); } .mn-card.bad { border-top-color: var(--dn); }
.mn-card.off { opacity: .55; border-top-color: var(--line); }
.mn-card[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.mn-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mn-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mn-card-top b { font-size: 16px; }
.mn-state { font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--up-tint); color: var(--up-ink); white-space: nowrap; }
.mn-card.warn .mn-state { background: var(--warn-tint); color: var(--warn-ink); } .mn-card.bad .mn-state { background: var(--dn-tint); color: var(--dn-ink); }
.mn-card.off .mn-state, .mn-card.sleep .mn-state { background: var(--neutral-tint); color: var(--ink-2); }
.mn-last { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mn-last .num { font-size: 25px; font-weight: 600; line-height: 1.1; }
.mn-last small, .mn-kv { color: var(--ink-2); font-size: 12.5px; }
.mn-kv { display: flex; justify-content: space-between; gap: 8px; }
.mn-kv b { color: var(--ink); font-weight: 600; }
.mn-meter { position: relative; height: 6px; border-radius: 6px; background: var(--neutral-tint); overflow: hidden; direction: ltr; }
.mn-meter i { position: absolute; inset: 0 auto 0 0; background: var(--up); width: 0; }
.mn-meter s { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink-3); }
.mn-card.warn .mn-meter i { background: var(--warn); } .mn-card.bad .mn-meter i { background: var(--dn); }
.mn-msg { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mn-hb { display: flex; align-items: flex-end; gap: 2px; height: 34px; direction: ltr; border-bottom: 1px solid var(--line); min-width: 0; }
.mn-hb span { flex: 1 1 0; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--up); }
.mn-hb span.warn { background: var(--warn); } .mn-hb span.bad { background: var(--dn); }
@media (prefers-reduced-motion: no-preference) { .mn-card.flash { animation: mn-flash .6s ease-out; } @keyframes mn-flash { from { background: var(--accent-tint); } } }

/* tiles */
.mn-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 960px) { .mn-pair { grid-template-columns: minmax(0, 1fr); } }
.mn-tiles { display: grid; gap: 10px; }
.mn-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mn-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mn-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .mn-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mn-tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }                                   /* [D-164] results: five tiles */
@media (max-width: 900px) { .mn-tiles.five { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .mn-tiles.three, .mn-tiles.two { grid-template-columns: minmax(0, 1fr); } }
.mn-tile { border: 1px solid var(--line); border-inline-start: 4px solid var(--up); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); display: grid; gap: 3px; min-width: 0; }
.mn-tile.warn { border-inline-start-color: var(--warn); } .mn-tile.bad { border-inline-start-color: var(--dn); } .mn-tile.na { border-inline-start-color: var(--line); }
.mn-tile small, .mn-tile .sub { color: var(--ink-2); font-size: 12.5px; }
.mn-tile .v { font-size: 21px; font-weight: 600; line-height: 1.2; }
.mn-spark { width: 100%; height: 34px; display: block; }
.mn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-chip { font-family: var(--font-num); font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: var(--warn-tint); color: var(--warn-ink); }
.mn-chip.none { background: var(--up-tint); color: var(--up-ink); font-family: var(--font-ui); }

/* timeline */
.mn-tl { display: grid; gap: 7px; }
.mn-tl-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; }
.mn-tl-name { font-weight: 600; font-size: 14px; }
.mn-tl-track { position: relative; height: 24px; border-radius: 6px; background: var(--neutral-tint); direction: ltr; overflow: hidden; }
.mn-tl-track span { position: absolute; top: 0; bottom: 0; }
.mn-tl-track span.ok { background: var(--up); } .mn-tl-track span.warn { background: var(--warn); } .mn-tl-track span.bad { background: var(--dn); }
.mn-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.mn-ticks { position: relative; height: 18px; direction: ltr; font-size: 11.5px; color: var(--ink-2); }
.mn-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.mn-ticks span:first-child { transform: none; } .mn-ticks span:last-child { transform: translateX(-100%); }
@media (max-width: 600px) { .mn-tl-row { grid-template-columns: 70px minmax(0, 1fr); } .mn-tl-name { font-size: 12.5px; } }

/* closing */
.mn-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .mn-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .mn-steps { grid-template-columns: minmax(0, 1fr); } }
.mn-step { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); display: grid; gap: 6px; min-width: 0; }
.mn-step .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.mn-mark { font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 999px; white-space: nowrap; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.mn-mark.ok { background: var(--up-tint); color: var(--up-ink); border-color: transparent; }
.mn-mark.run { background: var(--warn-tint); color: var(--warn-ink); border-color: transparent; }
.mn-prog { height: 6px; border-radius: 6px; background: var(--neutral-tint); overflow: hidden; direction: ltr; }
.mn-prog i { display: block; height: 100%; background: var(--accent); width: 0; }

/* candle grid */
.mn-seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.mn-seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; color: var(--ink-2); padding: 3px 10px; border-radius: 6px; cursor: pointer; }
.mn-seg button[aria-pressed="true"] { background: var(--accent); color: var(--ink-on-accent); }
.mn-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mn-n.ok { color: var(--up); } .mn-n.warn { color: var(--warn); } .mn-n.bad { color: var(--dn); }
.mn-q { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 150px; direction: ltr; text-align: right; }
.mn-grid-box { max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.mn-grid { display: grid; grid-template-columns: 62px repeat(26, minmax(13px, 1fr)) 44px; gap: 2px; padding: 8px; direction: ltr; min-width: 560px; }
.mn-grid.f5 { grid-template-columns: 62px repeat(78, minmax(6px, 1fr)) 44px; min-width: 900px; gap: 1px; }
.mn-grid.f60 { grid-template-columns: 62px repeat(7, minmax(40px, 1fr)) 44px; min-width: 0; }
.mn-grid .hdr { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-family: var(--font-num); font-size: 9.5px; color: var(--ink-2); text-align: center; height: 30px; writing-mode: vertical-rl; transform: rotate(180deg); }
.mn-grid .hdr.now { color: var(--accent); font-weight: 600; } .mn-grid .hdr.blank { color: transparent; }
.mn-grid .lbl { font-family: var(--font-num); font-size: 11px; text-align: right; padding-right: 6px; line-height: 14px; }
.mn-grid .tot { font-family: var(--font-num); font-size: 10.5px; color: var(--ink-2); line-height: 14px; padding-left: 4px; }
.mn-grid .c { height: 14px; border-radius: 2px; background: var(--neutral-tint); }
.mn-grid .c.o { background: var(--up); } .mn-grid .c.w { background: var(--warn); } .mn-grid .c.b { background: var(--dn); }
.mn-grid .c.f { background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.mn-grid .hide { display: none; }
.mn-empty { padding: 18px; color: var(--ink-2); text-align: center; }

/* tables, alerts, settings */
.mn-table td { vertical-align: top; }
.mn-table tr.new td { background: var(--accent-tint); }
.mn-st { font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.mn-st.open { background: var(--dn-tint); color: var(--dn-ink); } .mn-st.done { background: var(--up-tint); color: var(--up-ink); }
.mn-st.fixed { background: var(--warn-tint); color: var(--warn-ink); }
.mn-yes { color: var(--up); font-weight: 700; } .mn-no { color: var(--dn); font-weight: 700; }
.mn-badge { min-width: 22px; text-align: center; font-size: 12.5px; font-weight: 600; padding: 0 7px; border-radius: 999px; background: var(--dn); color: var(--ink-on-accent); }
.mn-badge.zero { background: var(--up-tint); color: var(--up-ink); }
.mn-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.mn-pager button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 3px 10px; cursor: pointer; }
.mn-pager button:disabled { opacity: .4; cursor: default; }
.mn-settings > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.mn-settings[open] > summary { border-bottom: 1px solid var(--line-soft); }
.mn-lim input, .mn-lim-grid input { font: inherit; width: 90px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); direction: ltr; }
.mn-lim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
@media (max-width: 760px) { .mn-lim-grid { grid-template-columns: minmax(0, 1fr); } }
.mn-lim-grid label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; }
#mn-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px; padding: 6px 10px; border-radius: 8px; max-width: 300px; line-height: 1.5; white-space: pre-line; }

/* ==========================================================================
   [D-154] «خريطة السوق»: search + reset; the map from Massive's snapshot; the stock card
   ========================================================================== */
/* everything above the map in one compact strip (user: «باصغر مكان») - it wraps on narrow screens */
.hm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 10px; margin-bottom: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 12.5px; line-height: 1.4; }
.hm-title { margin: 0; font-size: 16px; font-weight: 800; }
.hm-when { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--accent-tint); border: 1px solid var(--accent); }
.hm-when b { font-size: 14px; color: var(--ink); }
.hm-now { padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--ink-on-accent); font-weight: 700; font-size: 11.5px; }
.hm-now.off { background: var(--neutral-tint); color: var(--ink-2); }
.hm-pchips { display: flex; flex-wrap: wrap; gap: 4px; }
.hm-pc { padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.hm-pc i { font-style: normal; }
.hm-pc.on { background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; outline: 1px solid var(--accent); }
.hm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-inline-start: auto; }
.hm-tools input { width: 120px; padding: 2px 8px; font-size: 12.5px; min-height: 0; }
.hm-tools .btn { padding: 2px 10px; min-height: 0; }
.hm-legend { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.hm-scale { width: 80px; height: 8px; border-radius: 4px; direction: ltr; }
.hm-scale-l { font-size: 11px; }
.hm-err { margin: 0 0 8px; color: var(--dn); font-weight: 700; }
.hm-box { position: relative; background: var(--heat-gap); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
#hm-map { position: relative; width: 100%; height: 640px; }
@media (max-width: 700px) { #hm-map { height: 900px; } }
.hm-t { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; color: var(--heat-ink);
  text-align: center; cursor: pointer; outline: 1px solid var(--heat-gap); outline-offset: -1px; transition: opacity .15s; }
.hm-t:hover { outline: 2px solid var(--ink); outline-offset: -2px; z-index: 2; }
.hm-t .sy { font-weight: 700; line-height: 1.05; font-family: var(--font-num); direction: ltr; }
.hm-t .pc { font-family: var(--font-num); line-height: 1.1; direction: ltr; unicode-bidi: isolate; }
.hm-t .pt { font-family: var(--font-num); line-height: 1.1; opacity: .85; direction: ltr; unicode-bidi: isolate; }
/* [D-157] SPX in one line, and beside the map the narrowest column of the ten stocks that took the most SPX points
   (red) and the ten that added the most (green) */
.hm-spx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 5px 10px; margin-bottom: 8px; background: var(--surface);
  border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); border-radius: var(--radius); font-size: 12.5px; }
.hm-spx-v { font-size: 15px; } .hm-spx-v b { font-weight: 800; }
.hm-spx .pos { color: var(--up); } .hm-spx .neg { color: var(--dn); }
.hm-dir { padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; white-space: nowrap; }  /* [D-162] */
.hm-dir.up { background: var(--up-tint); color: var(--up-ink); } .hm-dir.dn { background: var(--dn-tint); color: var(--dn-ink); }
.hm-dir.flat { background: var(--neutral-tint); color: var(--ink-2); }
.hm-wrap { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px; }
.hm-movers { display: flex; flex-direction: column; gap: 8px; }
.hm-movers[hidden] { display: none; }
.hm-wrap:has(.hm-movers[hidden]) { grid-template-columns: minmax(0, 1fr); }
.hm-mv { flex: 1; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c); background: var(--c-tint); }
.hm-mv.dn { --c: var(--dn); --c-tint: var(--dn-tint); --c-ink: var(--dn-ink); }
.hm-mv.up { --c: var(--up); --c-tint: var(--up-tint); --c-ink: var(--up-ink); }
.hm-mv h3 { margin: 0; padding: 4px 8px; background: var(--c); color: var(--heat-ink); font-size: 12px; font-weight: 800; text-align: center; }
.hm-mv ol { list-style: none; margin: 0; padding: 2px 0; flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.hm-mv li { position: relative; display: flex; justify-content: space-between; gap: 6px; padding: 2px 8px; font-size: 12px; color: var(--c-ink); cursor: pointer; }
.hm-mv li:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.hm-mv li .s { font-weight: 700; direction: ltr; } .hm-mv li .v { font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.hm-mv li i { position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; background: var(--c); }
@media (max-width: 700px) {
  .hm-wrap { grid-template-columns: minmax(0, 1fr); }
  .hm-movers { flex-direction: row; }
}
.hm-t.dim { opacity: .18; }
.hm-t.hit { outline: 3px solid var(--heat-sig); outline-offset: -3px; z-index: 3; }
@media (prefers-reduced-motion: reduce) { .hm-t { transition: none; } }
.hm-tip { position: fixed; z-index: 60; pointer-events: none; min-width: 230px; max-width: 290px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-lg); font-size: 12.5px; line-height: 1.55; }
.hm-tip h3, #hm-card h3 { margin: 0; font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.hm-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; }
.hm-kv dt { color: var(--ink-3); } .hm-kv dd { margin: 0; text-align: end; }
.hm-kv .hm-sub { grid-column: 1 / -1; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.hm-card { margin-top: 16px; max-width: 460px; }
.hm-card h2 { margin: 0 0 10px; font-size: 16px; }
