/* وطن — «أفُق» نظام بصري واحد.
   ورق بارد فاتح، حبر كحلي، أزرق ملكي لمسة أساسية، وذهب ومرجان للحجز والحركة.
   أسطح هادئة، حواف كبيرة، وحركة ناعمة تشبه هواء الصباح. */

@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/plex-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/plex-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/plex-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/plex-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212;
}

:root {
  color-scheme: light;
  --font: "IBM Plex Sans Arabic", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "IBM Plex Sans Arabic", sans-serif;
  --bg: #eef1f7;
  --bg-deep: #e3e8f2;
  --surface: #ffffff;
  --surface-2: #f5f7fc;
  --surface-3: #e8ecf4;
  --glass: rgba(255, 255, 255, .74);
  --ink: #0f1729;
  --ink-2: #4e5a70;
  --ink-3: #6f7b90;
  --ink-4: #909aac;
  --line: rgba(15, 23, 41, .08);
  --line-2: rgba(15, 23, 41, .05);
  --brand: #003399;
  --brand-deep: #00256e;
  /* Horizon gradients (logo tile, sun to gold, coral): selected states and main actions only */
  --grad-brand: radial-gradient(120% 120% at 20% 0%, #2a5bc7 0%, transparent 55%), linear-gradient(150deg, #003399, #001d52);
  --grad-gold: linear-gradient(160deg, #ffc94a, #e0a21a);
  --on-brand: #fff;
  --grad-coral: linear-gradient(150deg, #d9503f, #8f1f2f);
  --grad-bar: linear-gradient(180deg, color-mix(in srgb, var(--brand) 72%, #fff), color-mix(in srgb, var(--brand) 14%, #fff));
  --glow-brand: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 16px -8px rgba(0, 51, 153, .7);
  --glow-gold: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px -8px rgba(224, 162, 26, .9);
  --brand-mid: #7d9be6;
  --brand-soft: #e8eefb;
  --brand-tint: #f3f6fe;
  --mint: #ffc94a;
  --copper: #c13b2e;
  --copper-soft: #fbeae7;
  --gold: #e0a21a;
  --red: #b3261e;
  --red-soft: #fbeeec;
  --live: #12a150;
  --obsidian: #08122e;
  --obsidian-2: #0d1b3d;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 28px;
  --radius-xl: 34px;
  --shadow-xs: 0 1px 1px rgba(15, 23, 41, .035);
  --shadow-sm: 0 1px 1px rgba(15, 23, 41, .035), 0 14px 34px -22px rgba(15, 23, 41, .24);
  --shadow-md: 0 2px 3px rgba(15, 23, 41, .04), 0 32px 70px -38px rgba(15, 23, 41, .34);
  --ease: cubic-bezier(.22, .9, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070a14;
  --bg-deep: #050810;
  --surface: #10131f;
  --surface-2: #161b2b;
  --surface-3: #1d2436;
  --glass: rgba(16, 19, 31, .72);
  --ink: #f4f2ec;
  --ink-2: #b8bdcc;
  --ink-3: #858b9c;
  --ink-4: #5f6576;
  --line: rgba(255, 255, 255, .095);
  --line-2: rgba(255, 255, 255, .055);
  --brand: #7aa2ff;
  --brand-deep: #a8c4ff;
  --grad-brand: linear-gradient(150deg, #a8c4ff, #5f88f0);
  --on-brand: #06101f;
  --grad-coral: linear-gradient(150deg, #ff9d8a, #e0604c);
  --grad-bar: linear-gradient(180deg, #8fb0ff, color-mix(in srgb, #7aa2ff 22%, #10182c));
  --glow-brand: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 16px -8px rgba(122, 162, 255, .6);
  --brand-mid: #34508f;
  --brand-soft: rgba(122, 162, 255, .14);
  --brand-tint: rgba(122, 162, 255, .07);
  --mint: #ffc94a;
  --copper: #ff8a75;
  --copper-soft: rgba(255, 138, 117, .13);
  --gold: #ffc94a;
  --live: #34d399;
  --obsidian: #070f24;
  --obsidian-2: #0d1a38;
  --red: #ff8478;
  --red-soft: rgba(255, 132, 120, .12);
  --shadow-xs: 0 1px 1px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 1px rgba(0, 0, 0, .4), 0 18px 40px -26px rgba(0, 0, 0, .9);
  --shadow-md: 0 2px 3px rgba(0, 0, 0, .5), 0 38px 80px -40px rgba(0, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(0, 51, 153, .08), transparent 60%),
    radial-gradient(70% 50% at 0% 18%, rgba(193, 59, 46, .06), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(122, 162, 255, .09), transparent 60%),
    radial-gradient(70% 50% at 0% 18%, rgba(255, 138, 117, .05), transparent 55%),
    var(--bg);
}
::selection { color: #fff; background: var(--brand); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
.num, .kpi-value, .hero-num, .hero-stat b, .fact strong, .bubble-label b, .big-figure { font-family: var(--display); font-variant-numeric: tabular-nums; }
.skip-link {
  position: fixed; top: -70px; inset-inline-start: 18px; z-index: 100;
  padding: 11px 18px; border-radius: 999px; color: #fff; background: var(--brand);
  font-weight: 600; transition: top .25s var(--ease);
}
.skip-link:focus { top: 14px; }

/* ---------- الهيكل: شريط علوي عائم ---------- */

.app-shell {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 14px clamp(14px, 2.4vw, 30px) 40px;
}
.chrome {
  position: sticky;
  top: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 9px 12px 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 20% 0%, #2a5bc7 0%, transparent 55%),
    linear-gradient(150deg, #003399 0%, #001d52 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 16px -8px rgba(0, 51, 153, .7);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: grid; gap: 0; line-height: 1.2; }
.brand-text strong { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand-text small { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: .01em; }

.chrome-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-inline: auto;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.chrome-link {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap;
  transition: background-color .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.chrome-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.chrome-link:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.chrome-link[aria-current="page"] {
  color: var(--ink); font-weight: 600;
  background: var(--surface);
  box-shadow: 0 1px 1px rgba(22, 19, 14, .05), 0 6px 14px -8px rgba(22, 19, 14, .3);
}
.chrome-link[aria-current="page"] svg { color: var(--brand); opacity: 1; }

.chrome-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 14%, transparent); }
.live-pill.stale .live-dot { background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 16%, transparent); }
.live-pill.down .live-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 38px; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn:active { transform: scale(.97); }
.icon-btn svg { width: 16px; height: 16px; }
.refresh-label { font-size: 13px; font-weight: 500; }
.icon-btn[disabled] { opacity: .55; cursor: default; }
.topbar-brand { display: none; }

.main { min-width: 0; padding: 0; }

/* ---------- العنوان التحريري ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 6px 26px;
}
.eyebrow {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; letter-spacing: .09em; color: var(--ink-3);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.eyebrow .dot--copper { background: var(--copper); }
.page-head h1 {
  margin-top: 9px;
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 600; line-height: 1.06; letter-spacing: -.035em;
  color: var(--ink);
}
.page-head h1 em { font-style: normal; color: var(--brand); }
.lede { max-width: 560px; margin-top: 12px; font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.meta-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; font-size: 13px; color: var(--ink-3);
}
.meta-line span[aria-hidden] { color: var(--ink-4); }
.head-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.head-stamp {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13px; color: var(--ink-3);
  white-space: nowrap;
}
.head-stamp b { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------- البطل ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  overflow: hidden;
  margin-bottom: 18px;
  padding: clamp(26px, 3.2vw, 44px);
  border-radius: var(--radius-xl);
  color: #f4f1e8;
  background:
    radial-gradient(120% 150% at 92% -20%, #0a47c4 0%, transparent 52%),
    radial-gradient(90% 120% at 0% 110%, #8f1f2f 0%, transparent 55%),
    radial-gradient(55% 70% at 68% 28%, rgba(255, 201, 74, .10), transparent 70%),
    var(--obsidian);
  box-shadow: 0 40px 80px -50px rgba(0, 20, 64, .95), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) .6px, transparent .6px);
  background-size: 5px 5px;
  opacity: .16;
  pointer-events: none;
  mask-image: linear-gradient(120deg, transparent 12%, #000 55%, transparent 92%);
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow { color: rgba(244, 241, 232, .55); }
.hero-copy .eyebrow .dot { background: var(--mint); box-shadow: 0 0 0 4px rgba(255, 201, 74, .14); }
.hero h1 {
  margin-top: 16px;
  font-family: var(--display);
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 600; line-height: 1.02; letter-spacing: -.04em;
  color: #f8f5ee;
}
.hero h1 em { font-style: normal; color: var(--mint); }
.hero .lede { max-width: 460px; margin-top: 16px; color: rgba(244, 241, 232, .64); font-size: 13px; line-height: 1.8; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; color: rgba(244, 241, 232, .46); }
.hero-meta b { color: rgba(244, 241, 232, .82); font-weight: 500; }
.hero-figure {
  position: relative; z-index: 1;
  display: grid; gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hero-figure-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hero-label { font-size: 13px; letter-spacing: .06em; color: rgba(244, 241, 232, .5); }
.hero-num {
  display: block; margin-top: 5px;
  font-size: clamp(46px, 5.6vw, 72px);
  font-weight: 600; line-height: .98; letter-spacing: -.045em;
  color: #fff;
}
.hero-delta {
  display: inline-flex; align-items: center; gap: 6px;
  direction: ltr; unicode-bidi: isolate;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 201, 74, .14); color: var(--mint);
  font-family: var(--display); font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.hero-delta.down { background: rgba(255, 138, 117, .16); color: #ffb3a6; }
.hero-spark { height: 66px; }
.hero-spark svg { width: 100%; height: 100%; overflow: visible; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  overflow: hidden; border-radius: 16px;
  background: rgba(255, 255, 255, .08);
}
.hero-stat { padding: 12px 14px; background: rgba(18, 21, 17, .55); }
.hero-stat span { display: block; font-size: 13px; color: rgba(244, 241, 232, .45); }
.hero-stat b { display: block; margin-top: 3px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: #f8f5ee; }
.hero-stat b i { font-style: normal; font-size: 13px; font-weight: 400; color: rgba(244, 241, 232, .45); }

/* ---------- المؤشرات ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpis--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 132px; padding: 18px 18px 15px;
  overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-xs);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.kpi-lead { color: #f4f1e8; border-color: transparent; background: linear-gradient(155deg, #0a3a9c, #06122e 80%); }
.kpi-lead:hover { border-color: transparent; }
.kpi-label { font-size: 13px; color: var(--ink-3); }
.kpi-lead .kpi-label { color: rgba(244, 241, 232, .52); }
.kpi-value {
  margin-top: 5px;
  font-size: clamp(26px, 2.6vw, 36px); font-weight: 600;
  line-height: 1.1; letter-spacing: -.035em; color: var(--ink);
}
.kpi-lead .kpi-value { color: #fff; }
.kpi-value--text { font-size: 16px; line-height: 1.4; letter-spacing: -.01em; }
.kpi-sub { margin-top: auto; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.kpi-lead .kpi-sub { color: rgba(244, 241, 232, .5); }
.kpi-chip {
  display: inline-flex; align-items: center; align-self: flex-start;
  direction: ltr; unicode-bidi: isolate;
  min-height: 21px; margin-top: 7px; padding: 0 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 600; line-height: 1;
}
.kpi-chip--copper { background: var(--copper-soft); color: var(--copper); }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; }
.kpi-row .kpi-sub { margin-top: 0; }
.spark-mini { flex: none; width: 72px; height: 30px; opacity: .9; }
.spark-mini svg { width: 100%; height: 100%; overflow: visible; }
.kpi[role="button"] { cursor: pointer; }

/* ---------- البطاقات ---------- */

.card {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-xs);
  min-width: 0;
}
.card--flush { overflow: hidden; }
.card--tint { background: linear-gradient(170deg, var(--brand-tint), var(--surface) 65%); }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px 0;
}
.card-title { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); }
.card-sub { margin-top: 3px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.card-body { padding: 16px 22px 20px; }
.card-foot { padding: 0 22px 20px; }
.count-pill {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-3);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.count-pill--brand { background: var(--brand-soft); color: var(--brand); }
.stat-tag { font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.section { margin-top: 34px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 16px; padding-inline: 4px;
}
.section-head h2 { font-family: var(--display); font-size: 25px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.section-head .eyebrow { margin-bottom: 3px; }
.section-sub { margin-top: 4px; max-width: 760px; font-size: 13px; color: var(--ink-2); }
.page-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 30px; padding: 18px 6px 0;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
.page-foot a { font-weight: 500; }
.toast {
  position: fixed; bottom: 26px; inset-inline-start: 26px; z-index: 90;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 18px; border-radius: 16px;
  color: #f8f5ee; background: var(--obsidian); box-shadow: var(--shadow-md);
  font-size: 13px;
}

/* ---------- أدوات التصفية ---------- */

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-xs);
}
.search {
  display: flex; align-items: center; gap: 9px;
  flex: 1 1 260px; min-height: 42px; padding: 0 15px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--surface-2);
  transition: border-color .22s var(--ease), background-color .22s var(--ease), box-shadow .22s var(--ease);
}
.search:focus-within { border-color: var(--brand-mid); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 8%, transparent); }
.search svg { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--ink-4); }
.select {
  min-height: 42px; padding: 0 15px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 13px; cursor: pointer;
  max-width: 210px;
  transition: background-color .2s var(--ease);
}
.select:hover { background: var(--surface-3); }
.select:focus { outline: 2px solid var(--brand-mid); outline-offset: 1px; }
.btn-clear {
  min-height: 42px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn-clear:hover { background: var(--surface-2); color: var(--ink); }
.toolbar-count {
  display: flex; flex-direction: column; gap: 0;
  margin-inline-start: auto; padding-inline: 10px;
  font-size: 13px; color: var(--ink-3); white-space: nowrap;
}
.toolbar-count strong { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink); }
.toolbar-updated { font-size: 13px; color: var(--ink-4); }

/* ---------- الجداول ---------- */

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-3); font-size: 13px; font-weight: 500; text-align: right;
  letter-spacing: .04em; white-space: nowrap;
}
.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2); vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .18s var(--ease); }
.table tbody tr:hover { background: var(--brand-tint); }
.table .num { color: var(--ink); white-space: nowrap; font-size: 13px; }
.table .plot-number { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--ink); }
.table .plot-cell { white-space: nowrap; }
.table .area-name { display: block; font-weight: 500; color: var(--ink); }
.table .area-phase { display: block; max-width: 230px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-3); }
.table .plot-area-inline { display: none; }
.table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px 18px; border-top: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-3);
}
.pager { display: flex; gap: 6px; }
.btn-small {
  min-height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn-small:hover:not([disabled]) { background: var(--surface-2); color: var(--ink); }
.btn-small:active:not([disabled]) { transform: scale(.97); }
.btn-small[disabled] { opacity: .4; cursor: default; }
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 24px; padding: 0 9px;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-3);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.status-badge.open { background: var(--brand-soft); color: var(--brand); }
.status-badge.booked { background: var(--copper-soft); color: var(--copper); }
.status-badge.pending { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.dash-empty, .empty-row { padding: 46px 16px !important; text-align: center; color: var(--ink-3) !important; }
.empty-state { padding: 22px 4px; text-align: center; font-size: 13px; color: var(--ink-3); }
.chart-empty { display: grid; place-items: center; height: 100%; font-size: 13px; color: var(--ink-3); }

/* ---------- تخطيط السوق ---------- */

.market-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 16px;
  align-items: start;
}
.market-side { display: grid; gap: 16px; min-width: 0; }
.market-table { min-width: 780px; }
.market-table th:nth-child(4), .market-table td:nth-child(4) { text-align: right; }

.plot-cards { display: none; gap: 10px; padding: 14px 16px 6px; }
.plot-card {
  padding: 15px 16px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface);
}
.plot-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plot-card-plot { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink); }
.plot-card-place { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.plot-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.plot-card-meta strong { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--ink); }
.plot-card-sub { margin-top: 3px; font-size: 13px; color: var(--ink-4); }

/* ---------- أعمدة المدن ---------- */

.stat-bars { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.stat-bars li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label value" "track track";
  gap: 4px 8px; padding: 2px; border-radius: 8px;
}
.stat-bars li[data-name] { cursor: pointer; }
.stat-bars li[data-name]:hover .stat-bar-fill { filter: brightness(1.08); }
.stat-bar-label { grid-area: label; overflow: hidden; font-size: 13px; font-weight: 500; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.stat-bar-value { grid-area: value; font-family: var(--display); font-size: 13px; color: var(--ink-3); }
.stat-bar-track { grid-area: track; display: block; height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.stat-bar-fill {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-mid), var(--brand));
  transition: width .9s var(--ease), filter .2s var(--ease);
}
.stat-bars li:nth-child(2n) .stat-bar-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 55%, var(--surface)), var(--gold)); }

/* ---------- سجل الحجز ---------- */

.feed-list { display: grid; gap: 0; }
.feed-item {
  position: relative;
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line-2);
}
.feed-item:last-child { border-bottom: 0; }
.feed-icon {
  position: relative; width: 9px; height: 9px; margin-top: 6px;
  border-radius: 50%; background: var(--copper);
  box-shadow: 0 0 0 4px var(--copper-soft);
}
.feed-item.status .feed-icon { background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 14%, transparent); }
.feed-icon::after {
  content: ""; position: absolute; inset-inline-start: 50%; top: 15px;
  width: 1px; height: calc(100% + 12px); transform: translateX(-50%);
  background: var(--line); 
}
.feed-item:last-child .feed-icon::after { display: none; }
.feed-title { font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.feed-body { margin-top: 1px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.feed-meta { margin-top: 2px; font-family: var(--display); font-size: 13px; color: var(--ink-4); }
.feed-text { font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ---------- الرسوم ---------- */

.vchart { padding: 0 0 2px; }
.vchart-bars { display: flex; align-items: flex-end; gap: 7px; height: 200px; padding-top: 10px; }
.vchart-bars .vbar {
  position: relative;
  flex: 1 1 0; min-width: 3px; max-width: 76px;
  height: 0;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 72%, var(--surface)), var(--brand-soft));
  transition: height 1s var(--ease), background-color .2s var(--ease), filter .2s var(--ease);
}
html[data-theme="dark"] .vchart-bars .vbar { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 60%, #000), rgba(91, 217, 180, .12)); }
.vchart-bars .vbar.peak { background: linear-gradient(180deg, var(--brand), var(--brand-deep)); }
.vchart-bars .vbar.zero { background: var(--line-2); }
.vchart-bars .vbar:hover { filter: brightness(1.1); }
.vchart-labels { display: flex; gap: 7px; margin-top: 9px; }
.vchart-labels span {
  flex: 1 1 0; min-width: 0; text-align: center;
  font-family: var(--display); font-size: 13px; color: var(--ink-4); white-space: nowrap;
}
.open-chart { height: 148px; padding-top: 6px; }
.open-chart svg { width: 100%; height: 100%; overflow: visible; }
.balance-body { display: flex; align-items: center; gap: 18px; padding: 18px 22px 0; }
.donut {
  position: relative; display: grid; place-items: center; flex: none;
  width: 124px; height: 124px; border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--surface) 78%, transparent 79%),
    conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--copper) 0);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
html[data-theme="dark"] .donut {
  background:
    radial-gradient(closest-side, var(--surface) 78%, transparent 79%),
    conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--copper) 0);
}
.donut-center { position: relative; display: grid; justify-items: center; gap: 0; line-height: 1.1; }
.donut-center b { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -.03em; }
.donut-center small { font-size: 13px; color: var(--ink-3); }
.balance-legend { display: grid; gap: 11px; min-width: 0; font-size: 13px; color: var(--ink-2); }
.balance-legend span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.balance-legend b { margin-inline-start: auto; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.legend-dot--brand { background: var(--brand); }
.legend-dot--green { background: var(--copper); }
.open-mini { padding: 16px 22px 0; }
.open-mini .open-chart { height: 52px; padding: 0; }
.open-mini .stat-note { margin-top: 4px; font-size: 13px; }
.stat-note { margin-top: 12px; font-size: 13px; line-height: 1.65; color: var(--ink-3); }

.trend-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 16px; }
.trend-grid .card { min-width: 0; }
.trend-wide { grid-column: 1 / -1; }
.trend-panel { display: flex; flex-direction: column; padding-bottom: 18px; }
.trend-panel .vchart { padding: 8px 22px 0; }
.trend-panel > .stat-note { padding: 0 22px; }
.stat-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  margin-top: 16px;
}
.fact {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.fact:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.fact strong { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.fact-label { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.fact-sub { margin-top: auto; font-size: 13px; font-weight: 400; color: var(--ink-4); }
.fact-city { display: inline-block; margin-inline-end: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.fact-city b { color: var(--brand); font-weight: 600; }

/* ---------- حقل القطع: نقطة لكل مجموعة قطع ---------- */

.field-card { overflow: hidden; margin-bottom: 16px; }
.field-card .card-head { padding-bottom: 2px; }
.field-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field-key { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.field-key i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.field-key:nth-child(2) i { background: var(--copper); }
.field-key:nth-child(3) i { background: var(--gold); }
.field-key:nth-child(4) i { background: var(--brand-mid); }
.field {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 20px 22px 22px;
  max-height: 220px; overflow: hidden;
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.field-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand-mid);
  opacity: .58;
  transform: scale(.2);
  animation: dot-in .6s var(--ease) forwards;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.field-dot:nth-child(3n) { background: var(--brand); }
.field-dot:nth-child(5n) { background: var(--copper); opacity: .45; }
.field-dot:nth-child(7n) { background: var(--gold); opacity: .4; }
.field-dot:hover { transform: scale(1.9); opacity: 1; z-index: 2; }
.field-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 22px 16px; border-top: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-3);
}
.field-foot b { font-family: var(--display); color: var(--ink); font-weight: 600; }
@keyframes dot-in { to { transform: scale(1); } }

/* ---------- المناطق الساخنة ---------- */

.hot-table { min-width: 700px; }
.rank-cell { width: 40px; color: var(--ink-3); font-family: var(--display); font-size: 13px; }
.rank-cell b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.hot-table tr:first-child .rank-cell b { background: var(--brand); color: #fff; }
html[data-theme="dark"] .hot-table tr:first-child .rank-cell b { color: #0b0c09; }
.hot-zone a { font-size: 13px; font-weight: 500; color: var(--ink); }
.hot-zone a:hover { color: var(--brand); }
.hot-zone .area-phase { margin-top: 1px; }
.heat-cell { display: flex; align-items: center; gap: 8px; }
.heat-track { display: block; width: 72px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.heat-fill { display: block; height: 100%; border-radius: 999px; }
.heat-fill.hot { background: linear-gradient(90deg, var(--gold), var(--copper)); }
.heat-fill.warm { background: linear-gradient(90deg, var(--brand-mid), var(--gold)); }
.heat-fill.cold { background: var(--brand-mid); }
.heat-cell b { font-family: var(--display); font-size: 13px; color: var(--ink); }
.trend-badge {
  display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px;
  border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-3);
}
.trend-badge.rising { background: var(--copper-soft); color: var(--copper); }
.trend-badge.steady { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.hot-panel { overflow: hidden; }

/* ---------- سجل الحجوزات ---------- */

.records-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start;
}
.records-table { min-width: 760px; }
.scope-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.scope-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13px; color: var(--ink-3);
}
.scope-chip strong { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink); }
.scope-sub { font-size: 13px; color: var(--ink-3); }

/* ---------- لوحة الإيقاع والسجل ---------- */

.hot-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.hot-layout > * { min-width: 0; }
.head-aside .scope-chips { margin-bottom: 0; }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .7fr); gap: 0; }
.ledger-grid > div:first-child { padding-top: 10px; }
.ledger-aside {
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px; border-inline-start: 1px solid var(--line-2);
  background: linear-gradient(160deg, var(--brand-tint), transparent 70%);
}
.ledger-figure { font-family: var(--display); font-size: 38px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; color: var(--ink); }
.ledger-spark { height: 46px; margin-top: auto; }
.ledger-spark svg { width: 100%; height: 100%; }
.clock svg line { transition: opacity .3s var(--ease); }
@keyframes clock-grow { from { transform: scale(0); opacity: 0; } }
@keyframes clock-pulse { 50% { stroke-width: 8.5; } }
.clock svg { display: block; width: 100%; max-width: 260px; margin: 0 auto; }
.clock svg line { transform-box: view-box; transform-origin: 110px 110px; animation: clock-grow .7s var(--ease) backwards; }
.clock svg line.clock-now { animation: clock-grow .7s var(--ease) backwards, clock-pulse 2.4s ease-in-out 1s infinite; }
@media (prefers-reduced-motion: reduce) { .clock svg line, .clock svg line.clock-now { animation: none; } }
.clock-now { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--copper) 40%, transparent)); }
.clock-peak { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--brand) 35%, transparent)); }

/* ---------- ملاحظات ---------- */

.dash-note {
  padding: 17px 19px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--ink-3); font-size: 13px; line-height: 1.75;
}
.dash-note strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 13px; }
.live-status {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--glass);
  font-size: 13px; color: var(--ink-3);
}
.live-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.live-status[data-state="stale"] .live-status-dot { background: var(--gold); }
.live-status[data-state="down"] .live-status-dot { background: var(--red); }
.live-status-copy { display: grid; gap: 1px; }
.live-status-copy strong { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------- ساعة الحجز: 24 عمودًا حول دائرة ---------- */

.clock-wrap { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 22px; align-items: center; flex: 1; padding: 12px 22px 6px; }
.clock { position: relative; width: 100%; aspect-ratio: 1; max-width: 220px; justify-self: center; }
.clock svg { width: 100%; height: 100%; }
.clock-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1px; text-align: center; }
.clock-center b { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.clock-center span { font-size: 13px; color: var(--ink-3); }
.clock-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-width: 360px; }
.clock-legend-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--surface-2);
}
.clock-legend-row span { font-size: 13px; color: var(--ink-3); }
.clock-legend-row b { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }

/* ---------- فقاعات المدن ---------- */

.bubbles { position: relative; width: 100%; height: 260px; overflow: hidden; border-radius: 18px; background: linear-gradient(180deg, var(--brand-tint), transparent); }
.bubbles svg { width: 100%; height: 100%; }
.bubble-label { font-family: var(--font); font-size: 13px; fill: var(--ink-2); }
.bubble-axis { stroke: var(--line); stroke-width: 1; }
.bubble-dot { transition: opacity .2s var(--ease); }
.bubble-dot:hover { opacity: .85; }
.bubble-note { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

/* ---------- شريط الأيام ---------- */

.day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 8px 22px 4px; }
.day-cell { display: grid; gap: 6px; justify-items: center; }
.day-bar { display: flex; align-items: flex-end; width: 100%; height: 78px; }
.day-bar i {
  display: block; width: 100%; min-height: 3px; border-radius: 7px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 72%, var(--surface)), var(--brand-soft));
  height: 0; transition: height .9s var(--ease);
}
.day-cell.peak .day-bar i { background: linear-gradient(180deg, var(--brand), var(--brand-deep)); }
.day-cell span { font-family: var(--display); font-size: 13px; color: var(--ink-4); }
.day-cell b { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ---------- حركات الظهور ---------- */

.reveal { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- الاستجابة ---------- */

@media (max-width: 1320px) {
  .kpis--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  .app-shell { padding-inline: 16px; }
  .chrome { gap: 10px; }
  .brand-text small { display: none; }
  .chrome-link { padding: 0 12px; }
  /* dot only; the label stays for screen readers */
  .live-pill { width: 38px; padding: 0; justify-content: center; gap: 0; }
  .live-pill > :not(.live-dot) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .market-layout, .records-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-figure { max-width: none; }
  .hero-stats { max-width: 520px; }
}
@media (max-width: 960px) {
  .app-shell { padding-top: 10px; }
  .chrome {
    position: sticky; top: 8px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 22px;
  }
  .brand { order: 1; }
  .chrome-actions { order: 2; margin-inline-start: auto; }
  .chrome-nav {
    order: 3; width: 100%; margin: 0;
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chrome-nav::-webkit-scrollbar { display: none; }
  .chrome-link { flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; }
  .chrome-link svg { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 26px; }
  .head-aside { align-items: flex-start; }
  .market-layout, .records-layout { grid-template-columns: minmax(0, 1fr); }
  .market-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-grid { grid-template-columns: minmax(0, 1fr); }
  .trend-wide { grid-column: auto; }
  .hot-layout { grid-template-columns: minmax(0, 1fr); }
  .stat-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock-wrap { grid-template-columns: minmax(0, 190px) minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .kpis--six { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
  .market-layout .table-wrap, .records-layout .table-wrap { display: none; }
  .market-layout .plot-cards, .records-layout .booking-cards { display: grid; }
  .market-layout .table-foot, .records-layout .table-foot { border-top: 0; }
}
@media (max-width: 760px) {
  .icon-btn { min-width: 44px; min-height: 44px; }
  .chrome-link { min-height: 42px; }
  .kpis, .kpis--six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 118px; padding: 15px 15px 13px; }
  .kpi-value { font-size: 26px; }
  .hero { padding: 24px 20px; border-radius: 26px; }
  .hero-figure { padding: 18px; }
  .hero-num { font-size: 50px; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-stat { padding: 10px; }
  .hero-stat b { font-size: 16px; }
  .topbar-actions .refresh-label { display: none; }
  .toolbar { border-radius: 22px; }
  .search { flex-basis: 100%; }
  .select { flex: 1 1 calc(50% - 5px); max-width: none; min-width: 0; }
  .toolbar-count { margin-inline-start: 0; }
  .market-side { grid-template-columns: minmax(0, 1fr); }
  .market-layout .table-wrap { display: none; }
  .records-layout .table-wrap { display: none; }
  .records-layout .booking-cards { display: grid; }
  .plot-cards { display: grid; }
  .market-layout .table-foot, .records-layout .table-foot { border-top: 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .trend-panel .vchart { height: auto; }
  .vchart-bars { height: 150px; }
  .vchart-labels span { font-size: 13px; }
  .stat-facts { grid-template-columns: minmax(0, 1fr); }
  .page-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .market-table { min-width: 560px; }
  .market-table th:nth-child(5), .market-table td:nth-child(5),
  .market-table th:nth-child(6), .market-table td:nth-child(6) { display: none; }
  .records-table th:nth-child(4), .records-table td:nth-child(4),
  .records-table th:nth-child(6), .records-table td:nth-child(6) { display: none; }
  .hot-table th:nth-child(4), .hot-table td:nth-child(4),
  .hot-table th:nth-child(5), .hot-table td:nth-child(5) { display: none; }
  .clock-wrap { grid-template-columns: minmax(0, 1fr); }
  .clock { max-width: 210px; }
  .field { max-height: 180px; }
  .field-dot { width: 8px; height: 8px; }
  .ledger-grid { grid-template-columns: minmax(0, 1fr); }
  .ledger-aside { border-inline-start: 0; border-top: 1px solid var(--line-2); }
}
@media (max-width: 460px) {
  .kpi-value { font-size: 23px; }
  .kpi-chip { font-size: 13px; }
  .chrome-link { font-size: 13px; }
  .page-head h1 { font-size: 34px; }
  .hero h1 { font-size: 38px; }
  .hero-num { font-size: 44px; }
  .market-table { min-width: 420px; }
  .market-table th:nth-child(7), .market-table td:nth-child(7) { display: none; }
  .records-table { min-width: 480px; }
  .toolbar-count { width: 100%; }
  .brand-text strong { font-size: 17px; }
}

/* ---------- WatanViz: donut, stackBar, hbars, columns (token colours; dark follows the tokens) ---------- */
.viz-donut { display: block; width: 100%; max-width: 140px; height: auto; }
.viz-donut-track { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.viz-donut-arc { fill: none; stroke: var(--brand); stroke-width: 10; stroke-linecap: round; }
.viz-donut-num { font-family: var(--display); font-size: 20px; font-weight: 600; fill: var(--ink); }
.viz-stack { display: flex; height: 12px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.viz-seg { display: block; height: 100%; background: var(--brand); }
.viz-seg.is-gold { background: var(--gold); }
.viz-seg.is-coral { background: var(--copper); }
.viz-seg.is-muted { background: var(--ink-4); }
.viz-hbars { display: grid; gap: 4px; }
.viz-hbar { display: grid; grid-template-columns: minmax(70px, 28%) 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: start; text-decoration: none; cursor: pointer; }
.viz-hbar:hover { background: var(--surface-3); }
.viz-hbar:focus-visible, .viz-col:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.viz-hbar-track { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.viz-hbar-fill { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--brand); transform-origin: right; animation: viz-grow-x .6s var(--ease, ease) both; }
.viz-hbar-fill.is-gold { background: var(--gold); }
.viz-hbar-fill.is-coral { background: var(--copper); }
.viz-hbar-val { font-family: var(--display); font-size: 13px; font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.viz-cols { position: relative; display: flex; align-items: stretch; gap: 3px; height: 140px; }
.viz-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; cursor: default; }
button.viz-col { cursor: pointer; }
.viz-col-bar { position: relative; flex: 1; display: flex; align-items: flex-end; }
.viz-col-bar i { display: block; width: 100%; min-height: 2px; border-radius: 7px 7px 3px 3px; background: var(--grad-bar); transform-origin: bottom; animation: viz-grow-y .6s var(--ease, ease) both; }
.viz-col:hover .viz-col-bar i { background: var(--grad-gold); }
.viz-col-label { margin-top: 4px; font-size: 13px; text-align: center; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.viz-col-val { position: absolute; inset-inline: -4px; margin-bottom: 2px; text-align: center; font-family: var(--display); font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink-2); pointer-events: none; font-variant-numeric: tabular-nums; }
.viz-cols.has-y { padding-inline-start: 30px; }
.viz-yaxis { position: absolute; inset-block: 0 0; inset-inline: 0; pointer-events: none; }
.viz-cols.has-labels .viz-yaxis, .viz-cols.has-labels .viz-overlay { bottom: 17px; }
.viz-ytick { position: absolute; inset-inline: 0; height: 0; border-top: 1px dashed var(--line); }
.viz-ytick em { position: absolute; inset-inline-start: 0; bottom: 2px; font-style: normal; font-size: 13px; color: var(--ink-4); direction: ltr; unicode-bidi: isolate; }
.viz-overlay { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; inset-inline-start: 0; pointer-events: none; }
.viz-cols.has-y .viz-overlay { inset-inline-start: 30px; }
.viz-col-line { display: block; width: 100%; height: 100%; overflow: visible; }
.viz-col-line polyline { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.viz-line-pt { position: absolute; width: 0; height: 0; }
.viz-line-pt i { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--surface); }
.viz-line-pt b { position: absolute; bottom: 7px; padding: 1px 5px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.viz-line-pt.is-below b { bottom: auto; top: 7px; }
.viz-line-pt.is-l b { left: -4px; }
.viz-line-pt.is-r b { right: -4px; }
@keyframes viz-grow-x { from { transform: scaleX(0); } }
@keyframes viz-grow-y { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .viz-hbar-fill, .viz-col-bar i { animation: none; } }
