/* iQlinic product design system — same stylesheet as the clinic app, so the public demo looks exactly like the product. */
@font-face{font-family:"Vazirmatn";font-style:normal;font-display:swap;font-weight:300;src:url(/assets/fonts/vazirmatn-arabic-300-normal.woff2) format("woff2")}
@font-face{font-family:"Vazirmatn";font-style:normal;font-display:swap;font-weight:400;src:url(/assets/fonts/vazirmatn-arabic-400-normal.woff2) format("woff2")}
@font-face{font-family:"Vazirmatn";font-style:normal;font-display:swap;font-weight:500;src:url(/assets/fonts/vazirmatn-arabic-500-normal.woff2) format("woff2")}
@font-face{font-family:"Vazirmatn";font-style:normal;font-display:swap;font-weight:600;src:url(/assets/fonts/vazirmatn-arabic-600-normal.woff2) format("woff2")}
@font-face{font-family:"Vazirmatn";font-style:normal;font-display:swap;font-weight:700;src:url(/assets/fonts/vazirmatn-arabic-700-normal.woff2) format("woff2")}
@font-face{font-family:"Vazirmatn";font-style:normal;font-display:swap;font-weight:800;src:url(/assets/fonts/vazirmatn-arabic-800-normal.woff2) format("woff2")}
/* iQlinic — design system (v2). Logical properties throughout so RTL (fa) and LTR (en/tr) share one stylesheet. */

:root {
  color-scheme: light;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Vazirmatn", sans-serif;
  --font-fa: "Vazirmatn", "Inter", ui-sans-serif, system-ui, sans-serif;

  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --surface-3: #f2f2ef;
  --border: rgba(17, 17, 26, 0.08);
  --border-strong: rgba(17, 17, 26, 0.14);
  --text: #0c0c10;
  --text-2: #55555f;
  --text-3: #8a8a94;
  --ring: rgba(47, 111, 235, 0.35);

  --accent: #2f6feb;
  --accent-hover: #255fd6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 111, 235, 0.09);
  --accent-text: #1f56c9;

  --green: #067647; --green-soft: #ecfdf3; --green-dot: #12b76a;
  --amber: #a15c07; --amber-soft: #fffaeb; --amber-dot: #f79009;
  --red: #b42318;   --red-soft: #fef3f2;   --red-dot: #f04438;
  --violet: #5b3fc4; --violet-soft: #f4f1fe; --violet-dot: #7a5af8;
  --blue: #1f56c9;  --blue-soft: #eef4ff;  --blue-dot: #2f6feb;
  --neutral: #55555f; --neutral-soft: #f2f2ef; --neutral-dot: #a3a3ad;

  /* chart roles (validated reference palette, light) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --grid: #e8e7e1; --axis: #c3c2b7;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.18);

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --sidebar-w: 252px;
  --topbar-h: 60px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0c;
  --surface: #121215;
  --surface-2: #17171b;
  --surface-3: #1e1e23;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-2: #a8a8b3;
  --text-3: #71717c;
  --ring: rgba(99, 145, 255, 0.45);
  --accent: #5b8cff;
  --accent-hover: #759dff;
  --accent-ink: #0a0a0c;
  --accent-soft: rgba(91, 140, 255, 0.13);
  --accent-text: #8fb0ff;
  --green: #47cd89; --green-soft: rgba(18, 183, 106, 0.12); --green-dot: #32d583;
  --amber: #fdb022; --amber-soft: rgba(247, 144, 9, 0.12); --amber-dot: #fdb022;
  --red: #f97066;   --red-soft: rgba(240, 68, 56, 0.12);  --red-dot: #f97066;
  --violet: #a48afb; --violet-soft: rgba(122, 90, 248, 0.14); --violet-dot: #a48afb;
  --blue: #8fb0ff;  --blue-soft: rgba(91, 140, 255, 0.13); --blue-dot: #5b8cff;
  --neutral: #a8a8b3; --neutral-soft: rgba(255, 255, 255, 0.06); --neutral-dot: #71717c;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --grid: #26262b; --axis: #3a3a40;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 56px -12px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
html[lang="fa"] body { font-family: var(--font-fa); font-feature-settings: "ss01"; }
#root { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3 { letter-spacing: 0; }
p { margin: 0; }

/* ---------- utilities ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.row-top { display: flex; align-items: flex-start; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.stack > * + * { margin-block-start: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); } }
.flip-rtl { }
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- icons ---------- */
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-weight: 550; font-size: 13.5px; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:active:not(:disabled) { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.12); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover:not(:disabled) { filter: brightness(0.97); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; border-radius: 7px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-block { width: 100%; }
.icon-btn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.link { color: var(--accent-text); font-weight: 550; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 550; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.label .opt { font-weight: 400; color: var(--text-3); }
.hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-xs); transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.select { appearance: none; padding-inline-end: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
html[dir="rtl"] .select { background-position: left 10px center; }
.select:disabled, .input:disabled { opacity: 0.6; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; inset-inline-start: 12px; color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-inline-start: 36px; }
.input-wrap > .trail { position: absolute; inset-inline-end: 6px; }
.input-lg { height: 44px; font-size: 15px; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 9px; border: 1px solid var(--border); }
.seg button { height: 28px; padding: 0 12px; border: 0; background: none; border-radius: 7px; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--text); }
.seg .count { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { display: flex; gap: 20px; border-block-end: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 10px 0; border: 0; background: none; font-weight: 550; color: var(--text-3); cursor: pointer; white-space: nowrap; font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text-2); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: -1px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-h h3 { font-size: 14.5px; }
.card-h .sub { font-size: 12.5px; color: var(--text-3); margin-block-start: 2px; }
.card-b { padding: 16px 18px 18px; }
.card-f { padding: 12px 18px; border-block-start: 1px solid var(--border); background: var(--surface-2); border-end-start-radius: var(--r-lg); border-end-end-radius: var(--r-lg); }
.card.flat { box-shadow: none; }
.card.inset { background: var(--surface-2); box-shadow: none; }
.card.interactive { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.card.interactive:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* ---------- badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.lg { height: 26px; padding: 0 10px; font-size: 12.5px; }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-neutral { background: var(--neutral-soft); color: var(--neutral); }
.badge.outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.chip b { color: var(--text); font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.45); } 70% { box-shadow: 0 0 0 6px rgba(18, 183, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); } }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.alert .icon { margin-block-start: 2px; }
.alert b { display: block; font-weight: 600; margin-block-end: 2px; color: var(--text); }
.alert.tone-amber { border-color: transparent; }
.alert.tone-red { border-color: transparent; }
.alert.tone-green { border-color: transparent; }
.alert.tone-blue { border-color: transparent; }
.alert .alert-body { color: var(--text-2); }

/* ---------- kpi ---------- */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .kpi-label { font-size: 12.5px; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 8px; }
.kpi .kpi-value { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
html[lang="fa"] .kpi .kpi-value { letter-spacing: 0; }
.kpi .kpi-sub { font-size: 12px; color: var(--text-3); }
.kpi-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.hero-num { font-size: 44px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; }
html[lang="fa"] .hero-num { letter-spacing: 0; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: start; font-weight: 550; font-size: 12px; color: var(--text-3); padding: 10px 12px; border-block-end: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.table td { padding: 11px 12px; border-block-end: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-block-end: 0; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.is-selected td { background: var(--accent-soft); }
.table .num { text-align: end; }
.table th.num { text-align: end; }
.table.clickable tbody tr { cursor: pointer; }

/* ---------- misc ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 650; font-size: 13px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 11px; color: var(--text-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin 0.7s linear infinite; flex: none; opacity: 0.8; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 36px 20px; color: var(--text-2); }
.empty .empty-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); margin-block-end: 4px; }
.empty h4 { color: var(--text); font-size: 14.5px; }
.empty p { font-size: 13px; max-width: 360px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 550; text-align: end; font-variant-numeric: tabular-nums; }
.section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
html[lang="fa"] .section-title { text-transform: none; letter-spacing: 0; }
.fade-in { animation: fadeIn 0.25s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border); padding: 14px 12px; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #1b2a4a, #2f6feb); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), var(--shadow-sm); }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; direction: ltr; }
.brand-name span { color: var(--accent); }
.brand-sub { font-size: 11px; color: var(--text-3); line-height: 1.2; }
.nav-group { padding: 12px 10px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
html[lang="fa"] .nav-group { text-transform: none; letter-spacing: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-weight: 550; font-size: 13.5px; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav-item .icon { opacity: 0.9; }
.sidebar-foot { margin-block-start: auto; display: flex; flex-direction: column; gap: 8px; padding-block-start: 12px; border-block-start: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-block-end: 1px solid var(--border); }
.cmd-trigger { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; min-width: 260px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3); cursor: pointer; box-shadow: var(--shadow-xs); font-size: 13px; }
.cmd-trigger:hover { border-color: var(--text-3); }
.cmd-trigger .kbd { margin-inline-start: auto; }
.page { padding: 28px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-block-end: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -0.02em; }
html[lang="fa"] .page-head h1 { letter-spacing: 0; }
.page-head p { color: var(--text-2); margin-block-start: 4px; font-size: 13.5px; }
.mobile-only { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 60; transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  html[dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.open { transform: none !important; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .cmd-trigger { min-width: 0; flex: 1; }
  .page { padding: 18px 16px; }
}
.scrim { position: fixed; inset: 0; background: rgba(10, 10, 14, 0.4); z-index: 55; }

/* ---------- menus, modal, palette, toast ---------- */
.menu { position: absolute; z-index: 80; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--text); text-align: start; }
.menu-item:hover, .menu-item[aria-selected="true"] { background: var(--surface-3); }
.menu-label { padding: 8px 10px 4px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.overlay { position: fixed; inset: 0; background: rgba(10, 10, 14, 0.45); z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; animation: fadeIn 0.12s ease both; }
.dialog { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px; }
.palette { width: 100%; max-width: 580px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette input { width: 100%; height: 52px; border: 0; border-block-end: 1px solid var(--border); padding: 0 18px; background: transparent; outline: none; font-size: 15px; }
.palette .list { max-height: 360px; overflow-y: auto; padding: 6px; }
.toasts { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 260px; max-width: 380px; background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: fadeIn 0.2s ease both; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-hero { position: relative; overflow: hidden; background: #0b1020; color: #e7ecff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 15% 10%, rgba(47, 111, 235, 0.45), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(27, 175, 122, 0.22), transparent 60%); }
.auth-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 30%, #000 30%, transparent 75%); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -0.03em; max-width: 520px; color: #fff; }
html[lang="fa"] .auth-hero h1 { letter-spacing: 0; line-height: 1.35; font-size: 36px; }
.auth-hero p { color: rgba(231, 236, 255, 0.72); font-size: 15px; max-width: 480px; margin-block-start: 14px; line-height: 1.7; }
.auth-point { display: flex; align-items: center; gap: 12px; color: rgba(231, 236, 255, 0.88); font-size: 14px; }
.auth-point .ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); display: inline-flex; align-items: center; justify-content: center; }
.auth-mock { margin-block-start: 34px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px; max-width: 460px; backdrop-filter: blur(6px); }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.auth-form-inner { width: 100%; max-width: 380px; margin: 0 auto; }
.auth-top { position: absolute; inset-block-start: 20px; inset-inline-end: 24px; display: flex; gap: 8px; z-index: 5; }
@media (max-width: 960px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-hero { display: none; } .auth-form { padding: 80px 20px 32px; } }

/* ---------- reception specifics ---------- */
.reception-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sticky-col { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1380px) { .reception-grid { grid-template-columns: 320px minmax(0, 1fr); } .reception-grid > .booking-col { grid-column: 1 / -1; } .booking-col .sticky-col { position: static; } }
@media (max-width: 960px) { .reception-grid { grid-template-columns: minmax(0, 1fr); } .sticky-col { position: static; } }
.patient-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; width: 100%; background: none; text-align: start; }
.patient-row:hover { background: var(--surface-2); }
.patient-row[aria-selected="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.visit-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; text-align: start; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.choice:hover { border-color: var(--text-3); }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--ring); }
.choice .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex: none; }
.choice[aria-pressed="true"] .ic { background: var(--accent); color: var(--accent-ink); }
.choice .t { font-weight: 600; font-size: 13.5px; }
.choice .d { font-size: 12px; color: var(--text-3); margin-block-start: 2px; }
@media (max-width: 640px) { .visit-choice { grid-template-columns: 1fr; } }
.rec-primary { position: relative; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface) 60%); padding: 18px; box-shadow: var(--shadow-md); }
.rec-time { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
html[lang="fa"] .rec-time { letter-spacing: 0; }
.score-ring { position: relative; width: 64px; height: 64px; flex: none; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .v { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.slot-chip { height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot-chip:hover { border-color: var(--accent); color: var(--accent-text); }
.slot-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- schedule grid ---------- */
.sched { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .sched { grid-template-columns: minmax(0, 1fr); } }
.date-strip { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)) auto; gap: 6px; align-items: stretch; }
.date-cell { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 4px; text-align: center; cursor: pointer; position: relative; min-width: 0; }
.date-cell:hover { border-color: var(--border-strong); }
.date-cell[aria-selected="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.date-cell .wd { font-size: 11px; color: var(--text-3); }
.date-cell[aria-selected="true"] .wd { color: inherit; opacity: 0.7; }
.date-cell .dn { font-size: 15px; font-weight: 650; }
.date-cell .cnt { position: absolute; inset-block-start: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red-dot); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.hour-grid { display: grid; grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; }
.hour-label { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.q { height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 12px; font-variant-numeric: tabular-nums; border: 1px dashed var(--border-strong); color: var(--text-3); }
.q.booked { border: 1px solid transparent; background: var(--red-soft); color: var(--red); font-weight: 600; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .axis-text { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); padding: 8px 10px; font-size: 12px; min-width: 140px; z-index: 5; }
.chart-tip .tt { color: var(--text-3); margin-block-end: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.rank-bar { grid-column: 1 / -1; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 999px; }

/* ---------- print (PDF export) ---------- */
@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- bidi: Persian server text inside LTR (en/tr) layouts ---------- */
.col > .badge, .col > .chip { align-self: flex-start; }
[dir="ltr"] :is(.chip > span, .badge, .kv dd, .row > span, .strong, .truncate, .table td, .small, h2, h3) { unicode-bidi: plaintext; }
[dir="ltr"] :is(.strong, .truncate, .table td, .small, h2, h3) { text-align: left; }
[dir="ltr"] .table td.num { text-align: right; }
.table td.num { white-space: nowrap; }

/* ---------- responsive layout helpers ---------- */
html, body { overflow-x: clip; }
.split-hero { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 3fr); }
.split-2-1 { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.reception-grid.two { grid-template-columns: minmax(0, 1fr) 340px; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 1100px) { .split-hero, .split-2-1 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1380px) { .reception-grid.two > .booking-col { grid-column: auto; } }
@media (max-width: 960px) {
  .reception-grid.two { grid-template-columns: minmax(0, 1fr); }
  .sidebar:not(.open) { visibility: hidden; }
  .cmd-trigger .kbd { display: none; }
  .page-head h1 { font-size: 20px; }
  .hero-num { font-size: 36px; }
  .date-strip { grid-template-columns: auto repeat(7, minmax(38px, 1fr)) auto; overflow-x: auto; }
  .hour-grid { grid-template-columns: 44px repeat(4, minmax(0, 1fr)); gap: 4px; }
  .q { padding: 0 6px; font-size: 11px; }
  .q .xs { display: none; }
}

/* ---------- brand mark & effects ---------- */
.bm { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.bm-tile { border-radius: 26%; overflow: hidden; background: linear-gradient(160deg, #1d3a7a 0%, #10245a 55%, #0a1638 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), inset 0 0 0 1px rgba(255,255,255,0.06), 0 1px 2px rgba(10,20,50,0.25), 0 4px 12px -4px rgba(16,36,90,0.45); }
.bm-inner { position: relative; display: inline-block; line-height: 0; }
.bm-inner img { display: block; width: auto; user-select: none; }
.bm-bare .bm-inner img { filter: drop-shadow(0 0 18px rgba(120, 160, 255, 0.35)); }
/* signal waves from the ear sensor */
.bm-ear { position: absolute; left: 44.5%; top: 25%; width: 0; height: 0; pointer-events: none; }
.bm-ear i { position: absolute; left: 0; top: 0; width: 26%; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(160, 196, 255, 0.9); transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
.bm-tile .bm-ear i { width: 14px; border-width: 1px; }
.bm-bare .bm-ear i { width: 64px; border-width: 2px; }
.bm-live .bm-ear i, .bm-tile:hover .bm-ear i, .brand:hover .bm-ear i { animation: bm-wave 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; }
.bm-ear i:nth-child(2) { animation-delay: 0.8s !important; }
.bm-ear i:nth-child(3) { animation-delay: 1.6s !important; }
@keyframes bm-wave { 0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; } }
/* light sweep across the tile */
.bm-sheen { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.28) 48%, transparent 62%); transform: translateX(-120%); pointer-events: none; }
.bm-tile:hover .bm-sheen, .brand:hover .bm-sheen, .bm-live .bm-sheen { animation: bm-sheen 1.1s ease; }
.bm-live .bm-sheen { animation: bm-sheen 3.2s ease-in-out infinite; }
@keyframes bm-sheen { to { transform: translateX(120%); } }
/* hero: gentle breathing */
.bm-bare.bm-live .bm-inner { animation: bm-breathe 6s ease-in-out infinite; }
@keyframes bm-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.wordmark { font-weight: 300; letter-spacing: 0.08em; font-family: "Inter", ui-sans-serif, system-ui, sans-serif; color: var(--text); line-height: 1; }
.wordmark b { font-weight: 500; color: var(--accent); }
.wordmark.light { color: #fff; }
.wordmark.light b { color: #9fbcff; }
.brand-loader { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 72px 0; }
.auth-hero .hero-mark { position: absolute; inset-inline-end: 56px; top: 110px; opacity: 0.95; z-index: 1; }
.auth-hero .hero-mark::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(circle at 45% 30%, rgba(80, 130, 255, 0.35), transparent 60%); filter: blur(10px); z-index: -1; }
@media (max-width: 1280px) { .auth-hero .hero-mark { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .bm-ear i, .bm-sheen, .bm-bare.bm-live .bm-inner, .pulse, .skeleton, .fade-in { animation: none !important; }
}

/* =====================================================================
   Brand atmosphere — "signal" identity drawn from the logo's ear sensor
   ===================================================================== */
:root { --navy-1: #0f1f47; --navy-2: #0b1733; --navy-3: #070f24; --aurora-a: rgba(47, 111, 235, 0.13); --aurora-b: rgba(27, 175, 122, 0.08); --dots: rgba(17, 17, 26, 0.07); --rings: rgba(47, 111, 235, 0.10); }
:root[data-theme="dark"] { --aurora-a: rgba(91, 140, 255, 0.16); --aurora-b: rgba(25, 158, 112, 0.10); --dots: rgba(255, 255, 255, 0.05); --rings: rgba(120, 160, 255, 0.10); }

/* page atmosphere: soft aurora + fading dot grid */
.main { position: relative; isolation: isolate; }
.main::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 360px at 78% -80px, var(--aurora-a), transparent 70%),
    radial-gradient(700px 320px at 12% -120px, var(--aurora-b), transparent 70%),
    radial-gradient(circle, var(--dots) 1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
}
html[dir="rtl"] .main::before { transform: scaleX(-1); }

/* page header: concentric "signal" rings echoing the logo */
.page-head { position: relative; isolation: isolate; }
.page-head::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-inline-end: -40px; top: -150px; width: 420px; height: 420px; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, var(--rings) 0 1px, transparent 1.5px 26px);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, rgba(0,0,0,.6) 35%, transparent 70%);
  mask-image: radial-gradient(circle at center, #000 0%, rgba(0,0,0,.6) 35%, transparent 70%);
}
.topbar { background: color-mix(in srgb, var(--bg) 70%, transparent); }

/* brand sidebar: deep navy in both themes, ring texture, glowing active item */
.sidebar {
  --text: #eef2fc; --text-2: rgba(226, 233, 250, 0.74); --text-3: rgba(226, 233, 250, 0.46);
  --surface: #131f42; --surface-2: #17244b; --surface-3: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.14);
  --accent-soft: rgba(120, 160, 255, 0.16); --accent-text: #c9d8ff; --accent: #7fa2ff;
  color: var(--text);
  background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.sidebar::before {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
  width: 520px; height: 520px; inset-inline-start: -260px; bottom: -260px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(160, 190, 255, 0.07) 0 1px, transparent 1.5px 24px);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); mask-image: radial-gradient(circle, #000 20%, transparent 70%);
}
.sidebar::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0; inset: 0 0 auto 0; height: 220px;
  background: radial-gradient(260px 160px at 30% 0%, rgba(90, 140, 255, 0.28), transparent 70%);
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar .brand-sub { color: var(--text-3); }
.sidebar .wordmark { color: #fff; }
.sidebar .wordmark b { color: #9fbcff; }
.sidebar .nav-item { color: var(--text-2); transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.sidebar .nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar .nav-item[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(120, 160, 255, 0.24), rgba(120, 160, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(160, 190, 255, 0.18), 0 6px 18px -8px rgba(90, 140, 255, 0.6);
}
html[dir="rtl"] .sidebar .nav-item[aria-current="page"] { background: linear-gradient(270deg, rgba(120, 160, 255, 0.24), rgba(120, 160, 255, 0.08)); }
.sidebar .nav-item[aria-current="page"] .icon { color: #9fbcff; }
.sidebar .btn-ghost:hover:not(:disabled), .sidebar .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar .avatar { background: rgba(160, 190, 255, 0.18); color: #dbe6ff; }
.sidebar .menu { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6); }

/* cards: faint top highlight for depth */
.card { background-image: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 40px); }
:root[data-theme="dark"] .card { background-image: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0) 40px); }
.card.inset, .card.flat { background-image: none; }
.kpi-icon.tone-blue { background: linear-gradient(135deg, var(--blue-soft), color-mix(in srgb, var(--blue-dot) 22%, transparent)); }
@media print { .main::before, .page-head::after { display: none; } }
.main { overflow-x: clip; }

/* =====================================================================
   Auth v2 — cinematic sign-in
   ===================================================================== */
.auth2 {
  --a-text: #f3f6ff; --a-text-2: rgba(226, 233, 255, 0.72); --a-text-3: rgba(226, 233, 255, 0.46);
  --a-line: rgba(255, 255, 255, 0.09); --a-field: rgba(255, 255, 255, 0.035); --a-accent: #7fa2ff; --a-mint: #6ee7c8;
  position: relative; min-height: 100vh; overflow: hidden; color: var(--a-text); color-scheme: dark;
  display: grid; grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(1100px 700px at 72% 38%, rgba(46, 88, 214, 0.34), transparent 62%),
    radial-gradient(800px 600px at 8% 110%, rgba(16, 150, 120, 0.16), transparent 60%),
    radial-gradient(600px 400px at 100% 0%, rgba(120, 90, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #060914 0%, #04060e 100%);
}
.auth2-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.auth2-grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.auth2 > * { position: relative; z-index: 1; }
.auth2-top { display: flex; align-items: center; justify-content: space-between; padding: 28px 48px 0; }
.auth2-tag { font-size: 11.5px; color: var(--a-text-3); letter-spacing: 0.04em; }
.auth2-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--a-line); backdrop-filter: blur(10px); }
.auth2-lang button { height: 28px; min-width: 42px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--a-text-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; cursor: pointer; transition: color .2s, background .2s; }
.auth2-lang button:hover { color: var(--a-text); }
.auth2-lang button[aria-checked="true"] { background: rgba(255,255,255,0.12); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); }

.auth2-grid { display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: 24px 48px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* form panel: glass with gradient hairline */
.auth2-panel {
  border-radius: 24px; padding: 36px 34px 28px;
  background:
    linear-gradient(180deg, rgba(20, 28, 54, 0.78), rgba(10, 14, 30, 0.72)) padding-box,
    linear-gradient(150deg, rgba(160, 190, 255, 0.5), rgba(255, 255, 255, 0.07) 35%, rgba(255, 255, 255, 0.04) 70%, rgba(110, 231, 200, 0.28)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: auth2-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes auth2-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.auth2-panel.shake { animation: auth2-shake 0.45s cubic-bezier(.36,.07,.19,.97); }
@keyframes auth2-shake { 20%, 80% { transform: translateX(-3px); } 40%, 60% { transform: translateX(5px); } 50% { transform: translateX(-5px); } }
.auth2-form { display: flex; flex-direction: column; gap: 20px; }
.auth2-form-head h2 { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; color: #fff; }
html[lang="fa"] .auth2-form-head h2 { letter-spacing: 0; font-size: 24px; }
.auth2-form-head p { margin-block-start: 6px; color: var(--a-text-2); font-size: 14px; line-height: 1.6; }

/* floating-label field */
.ff { position: relative; }
.ff input {
  width: 100%; height: 56px; padding: 22px 44px 6px; border-radius: 14px; outline: none;
  border: 1px solid var(--a-line); background: var(--a-field); color: #fff; font-size: 15px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
html[dir="rtl"] .ff input { text-align: right; }
.ff input:hover { border-color: rgba(255,255,255,0.16); }
.ff input:focus { border-color: rgba(127, 162, 255, 0.8); background: rgba(127, 162, 255, 0.06); box-shadow: 0 0 0 4px rgba(127, 162, 255, 0.16); }
.ff label { position: absolute; inset-inline-start: 44px; top: 18px; color: var(--a-text-3); font-size: 14.5px; pointer-events: none; transition: all .18s ease; transform-origin: 0 0; }
html[dir="rtl"] .ff label { transform-origin: 100% 0; }
.ff input:focus + label, .ff input:not(:placeholder-shown) + label { top: 9px; font-size: 11.5px; color: var(--a-text-2); letter-spacing: 0.02em; }
.ff input:focus + label { color: var(--a-accent); }
.ff-icon { position: absolute; inset-inline-start: 16px; top: 20px; color: var(--a-text-3); transition: color .2s; }
.ff:focus-within .ff-icon { color: var(--a-accent); }
.ff-trail { position: absolute; inset-inline-end: 8px; top: 10px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--a-text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ff-trail:hover { background: rgba(255,255,255,0.07); color: #fff; }
.ff.invalid input { border-color: rgba(249, 112, 102, 0.7); }
.auth2 input:-webkit-autofill { -webkit-text-fill-color: #fff; transition: background-color 9999s ease 0s; box-shadow: 0 0 0 40px rgba(20, 30, 60, 1) inset; }
.auth2-caps { min-height: 0; font-size: 12px; color: #fdb022; display: flex; align-items: center; gap: 6px; }
.auth2-hint { font-size: 12px; color: var(--a-text-3); display: flex; gap: 6px; align-items: center; }
.auth2-error { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; background: rgba(240, 68, 56, 0.1); border: 1px solid rgba(249, 112, 102, 0.28); color: #fecdca; font-size: 13px; animation: fadeIn .2s ease both; }
.auth2-error .icon { color: #f97066; margin-block-start: 2px; }

/* primary button */
.auth2-btn {
  position: relative; overflow: hidden; height: 52px; border-radius: 14px; border: 0; cursor: pointer; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: #fff; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #5b85ff 0%, #3a63e6 100%);
  box-shadow: 0 10px 30px -8px rgba(58, 99, 230, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0,0,0,0.15);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.auth2-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 40px -10px rgba(58, 99, 230, 0.85), inset 0 1px 0 rgba(255,255,255,0.3); }
.auth2-btn:active:not(:disabled) { transform: translateY(0); }
.auth2-btn:disabled { cursor: default; }
.auth2-btn .icon { transition: transform .2s; }
.auth2-btn:hover .icon { transform: translateX(3px); }
html[dir="rtl"] .auth2-btn:hover .icon { transform: scaleX(-1) translateX(3px); }
.auth2-btn-sheen { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.28) 50%, transparent 65%); transform: translateX(-120%); animation: auth2-sheen 4.5s ease-in-out 1.5s infinite; }
@keyframes auth2-sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.auth2-btn.done { background: linear-gradient(180deg, #22c38e, #139a6e); box-shadow: 0 10px 30px -8px rgba(19, 154, 110, 0.7), inset 0 1px 0 rgba(255,255,255,0.25); }
.auth2-btn.ghost { background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px var(--a-line); }

.auth2-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.auth2-links a, .auth2-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--a-text-2); transition: color .2s; }
.auth2-links a:hover, .auth2-back:hover { color: #fff; }
.auth2-back { align-self: flex-start; margin-block-end: -6px; }
.auth2-help { font-size: 12px; color: var(--a-text-3); padding-block-start: 16px; border-block-start: 1px solid var(--a-line); line-height: 1.6; }
.auth2-muted { color: var(--a-text-2); font-size: 12.5px; }
.auth2-muted.green { color: var(--a-mint); }

/* demo role picker */
.auth2-roles { display: flex; flex-direction: column; gap: 10px; }
.auth2-role { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; text-align: start; cursor: pointer; border: 1px solid var(--a-line); background: var(--a-field); color: var(--a-text); transition: border-color .2s, background .2s, box-shadow .2s; }
.auth2-role:hover { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.05); }
.auth2-role[aria-checked="true"] { border-color: rgba(127,162,255,0.75); background: rgba(127,162,255,0.08); box-shadow: 0 0 0 4px rgba(127,162,255,0.12); }
.auth2-role .ic { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); color: var(--a-text-2); flex: none; }
.auth2-role[aria-checked="true"] .ic { background: linear-gradient(180deg, #5b85ff, #3a63e6); color: #fff; }
.auth2-role b { display: block; font-size: 14px; font-weight: 600; }
.auth2-role small { display: block; font-size: 12px; color: var(--a-text-3); margin-block-start: 2px; }
.auth2-role .radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.25); flex: none; transition: all .2s; }
.auth2-role[aria-checked="true"] .radio { border: 5px solid #7fa2ff; }

/* showcase */
.auth2-show { position: relative; min-width: 0; --mx: 0; --my: 0; }
.auth2-headline h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 650; color: #fff; display: flex; flex-direction: column; text-wrap: balance; }
html[lang="fa"] .auth2-headline h1 { letter-spacing: 0; line-height: 1.35; font-size: clamp(32px, 3.6vw, 50px); }
.auth2-headline .grad { background: linear-gradient(95deg, #ffffff 0%, #a9c1ff 45%, #6ee7c8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[dir="rtl"] .auth2-headline .grad { background: linear-gradient(265deg, #ffffff 0%, #a9c1ff 45%, #6ee7c8 100%); -webkit-background-clip: text; background-clip: text; }
.auth2-headline p { margin-block-start: 16px; max-width: 520px; color: var(--a-text-2); font-size: 16px; line-height: 1.7; }
.auth2-stage { position: relative; height: 380px; margin-block-start: 36px; max-width: 640px; }
.auth2-ghost { position: absolute; inset-inline-start: 34%; top: -40px; opacity: 0.1; pointer-events: none; filter: blur(0.3px); }
.auth2-float { position: absolute; transform: translate3d(calc(var(--mx) * var(--d) * 1px), calc(var(--my) * var(--d) * 1px), 0); transition: transform .25s ease-out; animation: auth2-rise .9s cubic-bezier(.2,.8,.2,1) both; }
.auth2-float.d1 { --d: 14; animation-delay: .35s; }
.auth2-float.d2 { --d: 22; animation-delay: .5s; }
.auth2-float.d3 { --d: 30; animation-delay: .2s; }
@keyframes auth2-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
.auth2-card {
  border-radius: 18px; padding: 16px 18px; color: var(--a-text);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.11);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.1);
}
.auth2-card.main { width: 360px; padding: 20px; }
.auth2-card.sm { width: 220px; display: flex; flex-direction: column; gap: 8px; }
.bob-a { animation: auth2-bob 7s ease-in-out infinite; }
.bob-b { animation: auth2-bob 8s ease-in-out 1s infinite reverse; }
@keyframes auth2-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.auth2-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--a-text-3); }
html[lang="fa"] .auth2-eyebrow { text-transform: none; letter-spacing: 0; font-size: 12px; }
.auth2-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.auth2-pill.green { background: rgba(110, 231, 200, 0.14); color: var(--a-mint); }
.auth2-ring { position: relative; width: 64px; height: 64px; flex: none; }
.auth2-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.auth2-big { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.auth2-chip { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--a-text-2); border: 1px solid rgba(255,255,255,0.06); }
.auth2-num { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.auth2-spark { display: block; width: 100%; height: auto; }
.auth2-meter { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.auth2-meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7fa2ff, #6ee7c8); }

.auth2-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 0 48px 26px; font-size: 12px; color: var(--a-text-3); }
.auth2-foot span { display: inline-flex; align-items: center; gap: 7px; }
.auth2-ver { margin-inline-start: auto; letter-spacing: 0.04em; }

@media (max-width: 1100px) {
  .auth2-grid { grid-template-columns: minmax(0, 440px); justify-content: center; }
  .auth2-stage, .auth2-headline p { display: none; }
  .auth2-show { order: -1; text-align: center; }
  .auth2-headline h1 { font-size: 30px; align-items: center; }
}
@media (max-width: 560px) {
  .auth2-top { padding: 18px 16px 0; }
  .auth2-top .auth2-tag { display: none; }
  .auth2-grid { padding: 20px 16px; }
  .auth2-panel { padding: 26px 20px 22px; border-radius: 20px; }
  .auth2-headline h1 { font-size: 24px; }
  .auth2-foot { padding: 0 16px 20px; justify-content: center; }
  .auth2-ver { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .auth2-panel, .auth2-float, .bob-a, .bob-b, .auth2-btn-sheen { animation: none !important; }
}
.auth2 > .auth2-canvas, .auth2 > .auth2-grain { position: absolute; }
.auth2-ghost { inset-inline-start: auto; inset-inline-end: -40px; top: -70px; opacity: 0.08; }
.auth2-ghost { opacity: 0.045; }
.auth2-card.sm { width: 244px; }
.auth2-card .auth2-eyebrow { white-space: nowrap; }
@media (max-width: 1100px) { .auth2-grid { align-content: center; gap: 28px; } }
@media (max-width: 560px) { .auth2-grid { align-content: start; padding-block-start: 36px; } }

/* =====================================================================
   Auth v3 — minimal: one window, one signal
   ===================================================================== */
.auth3 {
  position: relative; min-height: 100vh; overflow: hidden; color: #f3f6ff; color-scheme: dark;
  --a-text: #f3f6ff; --a-text-2: rgba(226, 233, 255, 0.7); --a-text-3: rgba(226, 233, 255, 0.42);
  --a-line: rgba(255, 255, 255, 0.09); --a-field: rgba(255, 255, 255, 0.035); --a-accent: #7fa2ff; --a-mint: #6ee7c8;
  background: radial-gradient(900px 620px at 50% 30%, rgba(40, 72, 170, 0.28), transparent 65%), #05070e;
  display: flex; align-items: center; justify-content: center;
}
.auth3 > .auth2-canvas { position: absolute; }
.auth3-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 260px at 50% 24%, rgba(110, 150, 255, 0.16), transparent 70%); }
.auth3-lang { position: absolute; top: 24px; inset-inline-end: 28px; z-index: 2; }
.auth3-center { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.auth3-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: auth2-in .8s cubic-bezier(.2,.8,.2,1) both; }
.auth3-mark { line-height: 0; filter: drop-shadow(0 0 22px rgba(120, 160, 255, 0.45)); }
.auth3-brand .wordmark { font-size: 22px; letter-spacing: 0.14em; }
.auth3-panel { width: 100%; animation-delay: .12s; }
.auth3-panel .auth2-help { border: 0; padding: 0; text-align: center; }
.auth3-foot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--a-text-3); animation: fadeIn 1s ease .4s both; }
.auth3-foot span { opacity: .6; }
.auth3 .auth2-links { justify-content: center; }
@media (max-width: 480px) { .auth3-lang { top: 14px; inset-inline-end: 14px; } .auth3-center { padding-block-start: 72px; } }
.auth3-panel .auth2-form-head { text-align: center; }
.auth3-panel .auth2-back { align-self: center; }
[dir] .auth3-panel .auth2-form-head :is(h2, p) { text-align: center; }

/* =====================================================================
   Reception v2 — calm workspace
   ===================================================================== */
.rx-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }
.rx-side { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 12px; }
.rx-search .card-b { padding: 14px; }
.rx-search .patient-row { padding: 9px 10px; border-radius: 10px; }
.rx-work { min-width: 0; max-width: 980px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1100px) { .rx-layout { grid-template-columns: minmax(0, 1fr); } .rx-side { position: static; } }

.rx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 90px 24px; border: 1px dashed var(--border-strong); border-radius: 20px; color: var(--text-2); }
.rx-empty-ic { width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); margin-block-end: 6px; }
.rx-empty h3 { font-size: 17px; color: var(--text); }
.rx-empty p { max-width: 380px; font-size: 13.5px; line-height: 1.7; }

.rx-patient { display: flex; align-items: center; gap: 18px; padding: 4px 2px 18px; border-block-end: 1px solid var(--border); flex-wrap: wrap; }
.rx-patient h2 { font-size: 23px; font-weight: 650; letter-spacing: -0.02em; }
html[lang="fa"] .rx-patient h2 { letter-spacing: 0; }
.rx-patient .avatar.lg { width: 58px; height: 58px; font-size: 19px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }
.rx-patient-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-block-start: 6px; font-size: 13px; color: var(--text-2); }
.rx-patient-meta span { display: inline-flex; align-items: center; gap: 6px; }
.rx-patient-meta .icon { color: var(--text-3); }
.rx-stats { display: flex; gap: 26px; margin: 0; }
.rx-stats div { display: flex; flex-direction: column; gap: 2px; }
.rx-stats dt { font-size: 11.5px; color: var(--text-3); }
.rx-stats dd { margin: 0; font-size: 15px; font-weight: 600; }
.rx-profile-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--text); }
.rx-profile-toggle:hover { color: var(--accent-text); }
.rx-chev { transition: transform .2s; }
.rx-chev.open { transform: rotate(180deg); }
.rx-requests { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.rx-req { padding: 3px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 600; font-size: 12px; }

/* numbered flow */
.rx-flow { display: flex; flex-direction: column; }
.rx-step { position: relative; padding-inline-start: 44px; padding-block-end: 28px; display: flex; flex-direction: column; gap: 14px; }
.rx-step::before { content: ""; position: absolute; inset-inline-start: 13px; top: 30px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--border); }
.rx-step.done::before { background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 25%, var(--border))); }
.rx-step.last::before { display: none; }
.rx-step-h { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; margin-inline-start: -44px; min-height: 28px; }
.rx-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--text-3); flex: none; transition: all .2s; }
.rx-step.on .rx-dot { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.rx-step.done .rx-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: none; }
.rx-step:not(.on) > :not(.rx-step-h) { opacity: .55; }
.rx-prefs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1280px) { .rx-prefs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rx-prefs { grid-template-columns: minmax(0, 1fr); } .rx-step { padding-inline-start: 0; } .rx-step::before { display: none; } .rx-step-h { margin-inline-start: 0; } }
.rx-hint { font-size: 13.5px; color: var(--text-3); padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.rx-loading { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }

/* primary recommendation */
.rx-primary { position: relative; border-radius: 18px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.rx-primary::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), #6ee7c8); opacity: .9; }
.rx-primary.is-selected { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring), var(--shadow-md); }
.rx-primary-top { display: flex; justify-content: space-between; align-items: center; }
.rx-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-text); letter-spacing: 0.02em; }
.rx-trust { font-size: 12px; font-weight: 600; }
.rx-trust.t-green { color: var(--green); } .rx-trust.t-blue { color: var(--blue); } .rx-trust.t-amber { color: var(--amber); } .rx-trust.t-red { color: var(--red); }
.rx-primary-main { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rx-when { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rx-time { font-size: 40px; font-weight: 650; letter-spacing: -0.035em; line-height: 1; }
html[lang="fa"] .rx-time { letter-spacing: 0; }
.rx-date { font-size: 15px; font-weight: 600; display: inline-flex; gap: 8px; align-items: baseline; }
.rx-date em { font-style: normal; font-weight: 400; color: var(--text-3); font-size: 13.5px; }
.rx-doctor { display: flex; align-items: center; gap: 8px; margin-block-start: 10px; font-size: 14px; flex-wrap: wrap; }
.rx-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.rx-facts span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.rx-select { flex: none; }
.rx-reasons { list-style: none; margin: 0; padding: 14px 0 0; border-block-start: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.rx-reasons li { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.rx-reasons .icon { color: var(--green-dot); }
.rx-meta { display: flex; flex-wrap: wrap; gap: 16px; }
.rx-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-3); }
.rx-meta-item.t-green .icon { color: var(--green-dot); } .rx-meta-item.t-blue .icon { color: var(--blue-dot); } .rx-meta-item.t-red .icon { color: var(--red-dot); } .rx-meta-item.t-amber .icon { color: var(--amber-dot); }
.rx-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft); color: var(--text); }
.rx-note.amber { background: var(--amber-soft); }
.rx-note .icon { margin-block-start: 2px; }

/* alternatives list */
.rx-alts { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.rx-alt { display: grid; grid-template-columns: 70px minmax(0, 1.2fr) minmax(0, 1fr) 44px 20px; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; background: none; text-align: start; cursor: pointer; border-block-end: 1px solid var(--border); transition: background .15s; }
.rx-alt:last-child { border-block-end: 0; }
.rx-alt:hover { background: var(--surface-2); }
.rx-alt.is-selected { background: var(--accent-soft); }
.rx-alt-time { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.rx-alt-when { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rx-alt-when b { font-size: 13.5px; font-weight: 600; }
.rx-alt-when small { font-size: 12px; color: var(--text-3); }
.rx-alt-doc { font-size: 13px; color: var(--text-2); }
.rx-score { font-size: 12.5px; font-weight: 700; text-align: center; padding: 3px 0; border-radius: 8px; }
.rx-score.t-green { background: var(--green-soft); color: var(--green); } .rx-score.t-blue { background: var(--blue-soft); color: var(--blue); } .rx-score.t-amber { background: var(--amber-soft); color: var(--amber); } .rx-score.t-red, .rx-score.t-neutral { background: var(--surface-3); color: var(--text-2); }
.rx-alt-pick { color: var(--text-3); display: inline-flex; }
.rx-alt.is-selected .rx-alt-pick { color: var(--accent-text); }
.rx-more { width: 100%; padding: 11px; border: 0; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 550; cursor: pointer; border-block-start: 1px solid var(--border); }
.rx-more:hover { color: var(--text); }
@media (max-width: 640px) { .rx-alt { grid-template-columns: 60px minmax(0, 1fr) 40px; } .rx-alt-doc, .rx-alt-pick { display: none; } }

/* success banner */
.rx-success { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green-dot) 30%, transparent); }
.rx-success-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--green-dot); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rx-success b { display: block; font-size: 14px; }
.rx-success span { display: block; font-size: 13px; color: var(--text); margin-block-start: 2px; }
.rx-success small { display: block; font-size: 12px; color: var(--text-2); margin-block-start: 2px; }

/* sticky action bar */
.rx-bar { position: sticky; bottom: 18px; z-index: 30; margin-block-start: 24px; display: flex; justify-content: center; pointer-events: none; }
.rx-bar-in { pointer-events: auto; display: flex; align-items: center; gap: 14px; width: min(860px, 100%); padding: 12px 12px 12px 20px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
html[dir="rtl"] .rx-bar-in { padding: 12px 20px 12px 12px; }
.rx-bar-time { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; padding-inline-end: 14px; border-inline-end: 1px solid var(--border); }
.rx-bar-in b, .rx-bar-in .grow > span { display: block; }
.rx-bar-in b { font-size: 14px; }
.rx-bar-in .grow > span { font-size: 12.5px; color: var(--text-2); }
.rx-bar-err { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--red); max-width: 240px; }
@media (max-width: 640px) { .rx-bar-in { flex-wrap: wrap; } .rx-bar-time { border: 0; } }
.rx-success .rx-success-ic { display: inline-flex; }
.rx-bar-in { background: color-mix(in srgb, var(--surface) 96%, transparent); }
.rx-success .rx-success-ic { color: #fff; margin: 0; }

/* =====================================================================
   Richness pass — navy dark theme, branded headers, depth
   ===================================================================== */
/* dark = navy (relatively light), never black */
:root[data-theme="dark"] {
  --bg: #14213f;
  --surface: #1b2a4d;
  --surface-2: #203158;
  --surface-3: #283b66;
  --border: rgba(170, 195, 255, 0.12);
  --border-strong: rgba(170, 195, 255, 0.2);
  --text: #f2f5ff;
  --text-2: #b6c2e0;
  --text-3: #8392b8;
  --grid: #2a3a62; --axis: #3b4d7a;
  --dots: rgba(190, 210, 255, 0.07);
  --shadow-xs: 0 1px 2px rgba(5, 12, 35, 0.35);
  --shadow-sm: 0 1px 2px rgba(5, 12, 35, 0.3), 0 2px 8px -2px rgba(5, 12, 35, 0.35);
  --shadow-md: 0 10px 28px -8px rgba(5, 12, 35, 0.55);
  --shadow-lg: 0 28px 64px -16px rgba(4, 10, 30, 0.7);
  --navy-1: #172a5c; --navy-2: #12224b; --navy-3: #0e1b3d;
}
:root[data-theme="dark"] .card { background-image: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0) 44px); }
:root[data-theme="dark"] .topbar { background: color-mix(in srgb, var(--bg) 78%, transparent); }
:root[data-theme="dark"] .sidebar { border-inline-end-color: rgba(170, 195, 255, 0.1); }
.auth3 { background: radial-gradient(900px 620px at 50% 30%, rgba(70, 110, 220, 0.35), transparent 65%), linear-gradient(180deg, #0f1b3b 0%, #0b1530 100%); }

/* branded page header */
.hero-head {
  position: relative; overflow: hidden; isolation: isolate; align-items: center;
  padding: 26px 28px; border-radius: 20px; margin-block-end: 26px; color: #fff;
  background:
    radial-gradient(600px 240px at 88% 0%, rgba(110, 231, 200, 0.18), transparent 60%),
    radial-gradient(700px 300px at 70% 120%, rgba(91, 133, 255, 0.45), transparent 60%),
    linear-gradient(120deg, #13265a 0%, #1a3576 55%, #2448a0 100%);
  box-shadow: 0 18px 40px -18px rgba(19, 38, 90, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html[dir="rtl"] .hero-head { background:
    radial-gradient(600px 240px at 12% 0%, rgba(110, 231, 200, 0.18), transparent 60%),
    radial-gradient(700px 300px at 30% 120%, rgba(91, 133, 255, 0.45), transparent 60%),
    linear-gradient(240deg, #13265a 0%, #1a3576 55%, #2448a0 100%); }
.hero-head::after { display: none; }
.hero-rings { position: absolute; z-index: -1; pointer-events: none; inset-inline-end: -60px; top: 50%; width: 440px; height: 440px; transform: translateY(-50%); border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(190, 210, 255, 0.16) 0 1px, transparent 1.5px 24px);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 68%); mask-image: radial-gradient(circle, #000 10%, transparent 68%); }
.hero-main { min-width: 0; }
.hero-head h1 { color: #fff; font-size: 26px; font-weight: 650; }
.hero-head p { color: rgba(226, 234, 255, 0.78); }
.hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(226, 234, 255, 0.72); margin-block-end: 8px; }
.hero-live .status-dot { width: 7px; height: 7px; background: #6ee7c8; display: block; }
.hero-sep { opacity: .5; }
.hero-actions .btn-secondary, .hero-actions .btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.18); box-shadow: none; backdrop-filter: blur(8px); }
.hero-actions .btn-secondary:hover:not(:disabled), .hero-actions .btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.18); }
.hero-actions .chip { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); color: #fff; }
.hero-actions .faint, .hero-actions .xs { color: rgba(226, 234, 255, 0.7); }
@media (max-width: 640px) { .hero-head { padding: 20px; border-radius: 16px; } .hero-head h1 { font-size: 21px; } }

/* colourful avatars */
.avatar.av-blue { background: #e3ecff; color: #2748b8; }
.avatar.av-violet { background: #ede7ff; color: #5b3fc4; }
.avatar.av-teal { background: #dcf7ef; color: #0f7b5f; }
.avatar.av-amber { background: #fff1d6; color: #9a5b00; }
.avatar.av-rose { background: #ffe4ea; color: #b4234a; }
.avatar.av-indigo { background: #e1e7ff; color: #3a3fae; }
:root[data-theme="dark"] .avatar.av-blue { background: rgba(110, 150, 255, 0.2); color: #b9ccff; }
:root[data-theme="dark"] .avatar.av-violet { background: rgba(150, 120, 255, 0.2); color: #cfc1ff; }
:root[data-theme="dark"] .avatar.av-teal { background: rgba(60, 210, 170, 0.18); color: #9ff0d8; }
:root[data-theme="dark"] .avatar.av-amber { background: rgba(255, 180, 60, 0.18); color: #ffd48a; }
:root[data-theme="dark"] .avatar.av-rose { background: rgba(255, 100, 140, 0.18); color: #ffb4c6; }
:root[data-theme="dark"] .avatar.av-indigo { background: rgba(120, 130, 255, 0.2); color: #c5caff; }
.sidebar .avatar { background: rgba(160, 190, 255, 0.18) !important; color: #dbe6ff !important; }

/* primary actions: brand gradient with inner light */
.btn-primary { background: linear-gradient(180deg, #4f7cff 0%, #2f5fe6 100%); border: 0; box-shadow: 0 6px 16px -6px rgba(47, 95, 230, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #5b86ff 0%, #3567ef 100%); box-shadow: 0 10px 22px -8px rgba(47, 95, 230, 0.7), inset 0 1px 0 rgba(255,255,255,0.28); transform: translateY(-1px); }
:root[data-theme="dark"] .btn-primary { color: #fff; }

/* depth & polish */
.card { border-radius: 16px; }
.card.interactive:hover, .rx-alt:hover { transform: translateY(-1px); }
.rx-primary { border-radius: 20px; }
:root[data-theme="dark"] .rx-primary, :root[data-theme="dark"] .rx-alts, :root[data-theme="dark"] .rx-loading { background: var(--surface); }
.choice { border-radius: 14px; }
.choice[aria-pressed="true"] .ic { background: linear-gradient(180deg, #4f7cff, #2f5fe6); box-shadow: 0 6px 14px -6px rgba(47,95,230,.7); }
.rx-dot { box-shadow: var(--shadow-xs); }
.rx-step.done .rx-dot { background: linear-gradient(180deg, #4f7cff, #2f5fe6); }
.patient-row { transition: background .15s, transform .15s; }
.patient-row[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }
html[dir="rtl"] .patient-row[aria-selected="true"] { box-shadow: inset -3px 0 0 var(--accent); }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none; }
.stagger > * { animation: fadeIn .4s ease both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; } .stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; } .stagger > *:nth-child(6) { animation-delay: .2s; } .stagger > *:nth-child(n+7) { animation-delay: .24s; }
.rx-empty { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, var(--surface), var(--surface-2)); border-style: solid; border-color: var(--border); box-shadow: var(--shadow-sm); }
.rx-empty::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 92px; width: 420px; height: 420px; transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent) 0 1px, transparent 1.5px 26px);
  -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 65%); mask-image: radial-gradient(circle, #000 15%, transparent 65%); }
.rx-empty-ic { background: linear-gradient(180deg, #4f7cff, #2f5fe6); color: #fff; box-shadow: 0 10px 24px -8px rgba(47,95,230,.6); }

/* =====================================================================
   Doctor schedule — heat strip, day dial, agenda timeline
   ===================================================================== */
:root { --heat-0: #eef2f8; --heat-1: #cde2fb; --heat-2: #9ec5f4; --heat-3: #5598e7; --heat-4: #2a6fd6; --heat-ink: #0f2a5c; }
:root[data-theme="dark"] { --heat-0: rgba(170, 195, 255, 0.07); --heat-1: rgba(110, 150, 255, 0.22); --heat-2: rgba(110, 150, 255, 0.4); --heat-3: #4f7cff; --heat-4: #7fa2ff; --heat-ink: #0f1d40; }
.ltr-num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.sc { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1040px) { .sc { grid-template-columns: minmax(0, 1fr); } }
.sc-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
html[lang="fa"] .sc-eyebrow { letter-spacing: 0; text-transform: none; font-size: 12px; }

/* rail */
.sc-rail { padding: 16px 12px; position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 96px); }
@media (max-width: 1040px) { .sc-rail { position: static; max-height: none; } .sc-rail-list { max-height: 340px; } }
.sc-rail-h { display: flex; align-items: center; justify-content: space-between; padding-inline: 6px; }
.sc-rail-h h3 { font-size: 14.5px; }
.sc-rail-search { margin-inline: 2px; }
.sc-rail-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-inline: -2px; padding-inline: 2px; min-height: 0; }
.sc-group { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 10px 8px 4px; }
.sc-doc { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; background: none; text-align: start; cursor: pointer; color: inherit; position: relative; transition: background .15s, border-color .15s; }
.sc-doc:hover { background: var(--surface-2); }
.sc-doc[aria-selected="true"] { background: linear-gradient(90deg, var(--accent-soft), transparent 140%); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
html[dir="rtl"] .sc-doc[aria-selected="true"] { background: linear-gradient(270deg, var(--accent-soft), transparent 140%); }
.sc-doc[aria-selected="true"]::before { content: ""; position: absolute; inset-inline-start: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.sc-doc.dim { opacity: .55; }
.sc-doc-name { display: block; font-size: 13px; font-weight: 600; }
.sc-doc-sub { display: block; font-size: 11.5px; color: var(--text-3); }
.sc-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; flex: none; }
.sc-spark i { display: block; width: 4px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.sc-spark i.first { background: var(--accent); }
.sc-doc-today { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #4f7cff, #2f5fe6); box-shadow: 0 4px 10px -4px rgba(47, 95, 230, .7); }

/* hero */
.sc-hero { padding: 22px; position: relative; overflow: hidden; isolation: isolate; }
.sc-hero::before { content: ""; position: absolute; z-index: -1; inset-inline-end: -120px; top: -150px; width: 380px; height: 380px; border-radius: 50%;
  background: repeating-radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent) 0 1px, transparent 1.5px 22px);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 66%); mask-image: radial-gradient(circle, #000 12%, transparent 66%); }
.sc-hero-top { display: flex; align-items: center; gap: 14px; }
.sc-hero-top .avatar.lg { width: 56px; height: 56px; font-size: 19px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }
.sc-hero-top h2 { font-size: 19px; font-weight: 650; }
.sc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-block: 18px 20px; }
@media (max-width: 720px) { .sc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sc-stat { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.sc-stat-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); background: var(--accent-soft); }
.sc-stat.accent .sc-stat-ic { color: #fff; background: linear-gradient(180deg, #4f7cff, #2f5fe6); box-shadow: 0 6px 14px -6px rgba(47,95,230,.7); }
.sc-stat-l { font-size: 11.5px; color: var(--text-3); }
.sc-stat-v { font-size: 17px; font-weight: 650; }

/* heat strip */
.sc-heat.dim { opacity: .5; }
.sc-heat-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 10px; flex-wrap: wrap; }
.sc-legend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); }
.sc-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.sc-legend i:first-child { margin-inline-start: 5px; } .sc-legend i:last-child { margin-inline-end: 5px; }
.sc-legend .l0, .sc-cell.l0 { background: var(--heat-0); } .sc-legend .l1, .sc-cell.l1 { background: var(--heat-1); }
.sc-legend .l2, .sc-cell.l2 { background: var(--heat-2); } .sc-legend .l3, .sc-cell.l3 { background: var(--heat-3); }
.sc-legend .l4, .sc-cell.l4 { background: var(--heat-4); }
.sc-heat-row { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; }
@media (max-width: 900px) { .sc-heat-row { grid-template-columns: repeat(15, minmax(0, 1fr)); } }
.sc-cell { position: relative; border: 0; border-radius: 8px; height: 50px; padding: 6px 0 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: var(--text-2); transition: transform .15s, box-shadow .15s; min-width: 0; }
.sc-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sc-cell .wd { font-size: 9.5px; opacity: .75; line-height: 1; }
.sc-cell .dn { font-size: 12px; font-weight: 650; padding-block-end: 7px; line-height: 1; font-variant-numeric: tabular-nums; }
.sc-cell.l3, .sc-cell.l4 { color: #fff; }
:root[data-theme="dark"] .sc-cell.l4 { color: var(--heat-ink); }
.sc-cell.weekend { background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--text-3) 12%, transparent) 4px 5px); }
.sc-cell.today::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.sc-cell[aria-selected="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); transform: translateY(-2px); }

/* day card */
.sc-day { padding: 20px 22px 22px; }
.sc-day-h { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-block-end: 18px; }
.sc-day-h h3 { font-size: 17px; margin-block-start: 4px; }
.sc-today-pill { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; color: #fff; background: #e5484d; text-transform: none; letter-spacing: 0; }
.sc-day-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 26px; align-items: start; }
@media (max-width: 820px) { .sc-day-grid { grid-template-columns: minmax(0, 1fr); } .sc-side { order: -1; } }

/* timeline */
.sc-tl { position: relative; padding-inline-start: 58px; }
.sc-tl-hour { position: absolute; inset-inline: 0; height: 0; border-top: 1px dashed var(--border); }
.sc-tl-hour span { position: absolute; inset-inline-start: 0; top: -8px; font-size: 11px; color: var(--text-3); width: 46px; text-align: end; background: var(--surface); }
.sc-tl-lane { position: relative; height: 100%; }
.sc-free { position: absolute; inset-inline: 0; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--green-dot) 40%, transparent); background: color-mix(in srgb, var(--green-dot) 5%, transparent); display: flex; align-items: center; justify-content: center; }
.sc-free span { font-size: 11.5px; font-weight: 600; color: var(--green); display: inline-flex; gap: 6px; align-items: center; }
.sc-free span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-dot); }
.sc-block { position: absolute; inset-inline: 0; border-radius: 12px; padding: 8px 12px; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; align-content: flex-start;
  color: #fff; background: linear-gradient(135deg, #4f7cff 0%, #2f5fe6 100%); box-shadow: 0 10px 22px -12px rgba(47, 95, 230, .85), inset 0 1px 0 rgba(255,255,255,.22);
  animation: scIn .45s cubic-bezier(.2,.8,.2,1) both; }
.sc-block::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: rgba(255,255,255,.55); }
.sc-block.thin { padding-block: 4px; align-items: center; }
.sc-block.past { background: linear-gradient(135deg, color-mix(in srgb, #4f7cff 45%, var(--surface-3)), color-mix(in srgb, #2f5fe6 45%, var(--surface-3))); box-shadow: none; }
.sc-block.live { box-shadow: 0 0 0 3px color-mix(in srgb, #4f7cff 30%, transparent), 0 10px 22px -12px rgba(47, 95, 230, .85); }
.sc-block-time { font-size: 12.5px; font-weight: 700; }
.sc-block-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.sc-block-chips span { font-size: 11px; padding: 1px 7px; border-radius: 8px; background: rgba(255,255,255,.18); }
.sc-block-n { margin-inline-start: auto; font-size: 11px; opacity: .8; }
.sc-block.thin .sc-block-n { display: none; }
@keyframes scIn { from { opacity: 0; transform: translateX(-8px) scaleY(.9); } to { opacity: 1; transform: none; } }
html[dir="rtl"] .sc-block { animation-name: scInR; }
@keyframes scInR { from { opacity: 0; transform: translateX(8px) scaleY(.9); } to { opacity: 1; transform: none; } }
.sc-now { position: absolute; inset-inline: -8px 0; height: 0; border-top: 2px solid #e5484d; z-index: 3; pointer-events: none; }
.sc-now::before { content: ""; position: absolute; inset-inline-start: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .2); animation: pulseR 2s infinite; }
@keyframes pulseR { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.45); } 70% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
.sc-now-tag { position: absolute; inset-inline-end: 0; top: -11px; font-size: 10.5px; font-weight: 700; color: #fff; background: #e5484d; padding: 2px 8px; border-radius: 10px; }

/* side: dial + facts */
.sc-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 80px; }
.sc-dial { position: relative; width: 100%; max-width: 230px; margin-inline: auto; }
.sc-dial svg { display: block; overflow: visible; }
.sc-dial-face { fill: var(--surface-2); stroke: var(--border); }
.sc-seg { fill: var(--heat-0); transition: fill .2s; }
.sc-seg.on { fill: url(#scDialG); animation: fadeIn .4s ease both; }
.sc-seg.on.past { fill: var(--heat-2); }
.sc-dial-tick { font-size: 9px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.sc-dial-now line { stroke: #e5484d; stroke-width: 2; stroke-linecap: round; }
.sc-dial-now circle { fill: #e5484d; stroke: var(--surface); stroke-width: 2; }
.sc-dial-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; pointer-events: none; }
.sc-dial-c b { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.sc-dial-c span { font-size: 11.5px; color: var(--text-3); }
.sc-dial-c em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 8px; margin-block-start: 4px; }
.sc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.sc-fact { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.sc-fact dt { font-size: 11px; color: var(--text-3); }
.sc-fact dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 650; }
.sc-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--amber, #b54708); background: var(--amber-soft, #fffaeb); padding: 8px 10px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .sc-block, .sc-seg.on { animation: none; } }
.sc-block.thin .sc-block-chips { display: none; }
.sc-block.thin .sc-block-time { font-size: 11.5px; }
.sc-block.thin { padding-block: 0; align-items: center; align-content: center; }
.sc-block.thin .sc-block-time { line-height: 1; }
.sc-block.past { background: var(--heat-1); color: var(--heat-ink); box-shadow: none; }
.sc-block.past::before { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.sc-block.past .sc-block-chips span { background: rgba(255,255,255,.55); }
:root[data-theme="dark"] .sc-block.past { background: rgba(110, 150, 255, 0.2); color: #dbe6ff; }
:root[data-theme="dark"] .sc-block.past .sc-block-chips span { background: rgba(255,255,255,.1); }
.sc-fact.wide { grid-column: 1 / -1; }

/* =====================================================================
   Executive dashboard — command center
   ===================================================================== */
:root { --muted-bar: #c9d6ec; }
:root[data-theme="dark"] { --muted-bar: rgba(170, 195, 255, 0.2); }
.split-1-1 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .split-1-1 { grid-template-columns: minmax(0, 1fr); } }
.ex-period { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block-start: 18px; }
.ex-period .seg { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); backdrop-filter: blur(8px); }
.ex-period .seg button { color: rgba(226,234,255,0.78); }
.ex-period .seg button:hover:not([aria-pressed="true"]) { color: #fff; }
.ex-period .seg button[aria-pressed="true"] { background: #fff; color: #13265a; }
.ex-range { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(226,234,255,0.8); font-variant-numeric: tabular-nums; }
.ex-date { width: 130px; height: 32px; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #fff; }
.ex-date::placeholder { color: rgba(226,234,255,0.5); }
.ex-arrow { color: rgba(226,234,255,0.6); }
html[dir="rtl"] .ex-arrow { transform: scaleX(-1); display: inline-block; }

.ex-top { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .ex-top { grid-template-columns: minmax(0, 1fr); } }
.ex-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ex-eyebrow .icon { color: var(--accent); }

/* pulse */
.ex-pulse { padding: 24px 24px 14px; border-radius: 20px; display: flex; flex-direction: column; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(520px 260px at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }
html[dir="rtl"] .ex-pulse { background: radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }
.ex-pulse-main { display: flex; align-items: center; gap: 20px; }
.ex-hero-num { font-size: 56px; line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; margin-block: 10px 12px; }
.ex-unit { font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--text-3); margin-inline-start: 10px; }
.ex-delta { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-delta.up { background: var(--green-soft); color: var(--green); }
.ex-delta.down { background: var(--red-soft); color: var(--red); }
.ex-delta.down .icon { transform: scaleY(-1); }
.ex-delta-sub { font-weight: 500; opacity: .8; }
.ex-soft { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.ex-pulse-spark { margin-block-start: 18px; margin-inline: -24px; }
.ex-pulse-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); padding-block-start: 6px; font-variant-numeric: tabular-nums; }
html[dir="rtl"] .ex-pulse-foot { flex-direction: row-reverse; }
.ex-ring { position: relative; width: 128px; height: 128px; flex: none; }
.ex-ring svg { display: block; }
.ex-ring-arc { transition: stroke-dasharray .9s cubic-bezier(.2,.8,.2,1); }
.ex-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ex-ring-c b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.ex-ring-c span { font-size: 11px; color: var(--text-3); max-width: 84px; line-height: 1.2; }
@media (max-width: 640px) { .ex-hero-num { font-size: 40px; } .ex-ring { width: 96px; height: 96px; } .ex-ring svg { width: 96px; height: 96px; } .ex-ring-c b { font-size: 20px; } }

/* briefing */
.ex-brief { position: relative; overflow: hidden; isolation: isolate; border-radius: 20px; padding: 22px; color: #eaf0ff;
  background: radial-gradient(420px 220px at 100% 0%, rgba(110, 231, 200, 0.16), transparent 60%), linear-gradient(150deg, #172d66 0%, #13265a 55%, #0f1f4a 100%);
  box-shadow: 0 18px 40px -20px rgba(19, 38, 90, 0.6), inset 0 1px 0 rgba(255,255,255,0.1); }
.ex-brief-rings { position: absolute; z-index: -1; inset-inline-end: -120px; bottom: -140px; width: 360px; height: 360px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(190, 210, 255, 0.13) 0 1px, transparent 1.5px 22px);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 68%); mask-image: radial-gradient(circle, #000 10%, transparent 68%); }
.ex-brief header { display: flex; align-items: center; gap: 12px; margin-block-end: 16px; }
.ex-brief h3 { color: #fff; font-size: 15px; }
.ex-brief header p { font-size: 12px; color: rgba(226,234,255,0.65); }
.ex-brief-ic { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; color: #0f1f4a; background: linear-gradient(135deg, #6ee7c8, #7fa2ff); box-shadow: 0 8px 18px -8px rgba(110,231,200,.7); }
.ex-insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ex-insights li { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; font-size: 13px; line-height: 1.55; color: rgba(234,240,255,0.86); transition: background .15s; }
.ex-insights li:hover { background: rgba(255,255,255,0.06); }
.ex-insights b { color: #fff; font-weight: 700; }
.ex-ins-ic { width: 28px; height: 28px; border-radius: 9px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); }
.ex-ins-ic.t-green { color: #6ee7c8; } .ex-ins-ic.t-red { color: #ff9b95; } .ex-ins-ic.t-blue { color: #9db8ff; }
.ex-ins-ic.t-violet { color: #c7b5ff; } .ex-ins-ic.t-amber { color: #ffc86b; }
.ex-signals { margin-block-start: 12px; padding-block-start: 12px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 6px; }
.ex-signal { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: rgba(226,234,255,0.72); }
.ex-signal .icon { flex: none; margin-block-start: 2px; color: #9db8ff; }
.ex-signal.warn .icon { color: #ffc86b; }

/* tiles */
.ex-tile { padding: 16px 16px 0; display: flex; flex-direction: column; overflow: hidden; }
.ex-tile-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 550; min-width: 0; }
.ex-tile-ic { width: 26px; height: 26px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); background: var(--accent-soft); }
.ex-tile-v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-block-start: 10px; font-variant-numeric: normal; }
.ex-tile-sub { font-size: 12px; color: var(--text-3); margin-block-start: 2px; }
.ex-tile-spark { margin-inline: -16px; margin-block-start: 10px; }
.sparkline { display: block; }

.ex-ops { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; }
.ex-op { padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ex-op + .ex-op { border-inline-start: 1px solid var(--border); }
.ex-op-l { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-op-v { font-size: 17px; font-weight: 650; }
@media (max-width: 1100px) { .ex-ops { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ex-op:nth-child(4) { border-inline-start: 0; } .ex-op:nth-child(n+4) { border-top: 1px solid var(--border); } }
@media (max-width: 640px) { .ex-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ex-op { border: 0 !important; } }

/* recovery */
.ex-recovery { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; position: relative; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--red-dot) 9%, var(--surface)), var(--surface) 60%); }
html[dir="rtl"] .ex-recovery { background: linear-gradient(270deg, color-mix(in srgb, var(--red-dot) 9%, var(--surface)), var(--surface) 60%); }
.ex-recovery-ic { width: 42px; height: 42px; border-radius: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(180deg, #f97066, #e5484d); box-shadow: 0 8px 18px -8px rgba(229,72,77,.7); }
.ex-recovery-v { display: flex; flex-direction: column; align-items: flex-end; padding-inline: 16px; border-inline-start: 1px solid var(--border); }
.ex-recovery-v span { font-size: 11.5px; color: var(--text-3); }
.ex-recovery-v b { font-size: 19px; font-weight: 700; }

/* rhythm */
.ex-best { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ex-best-l { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 8px; }
.ex-best b { font-size: 18px; }
.ex-best .num { color: var(--text-2); font-size: 13px; }

/* leaderboard */
.ex-board { display: flex; flex-direction: column; margin-inline: -8px; }
.ex-board-h, .ex-board-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1fr) 72px; align-items: center; gap: 14px; padding: 8px; }
.ex-board-h { font-size: 11px; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--border); }
.ex-board-row { border-radius: 12px; transition: background .15s; }
.ex-board-row + .ex-board-row { border-top: 1px solid var(--border); }
.ex-board-row:hover { background: var(--surface-2); }
.ex-board .end { text-align: end; justify-self: end; }
.ex-doc { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ex-rank { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-3); }
.ex-rank.top { color: #fff; }
.ex-rank.r1 { background: linear-gradient(135deg, #f5c451, #d99a1e); box-shadow: 0 4px 10px -4px rgba(217,154,30,.8); }
.ex-rank.r2 { background: linear-gradient(135deg, #c3cbd8, #8f9bb0); }
.ex-rank.r3 { background: linear-gradient(135deg, #e3a27a, #b86b40); }
.ex-share { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ex-share-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ex-share-bar i { display: block; height: 100%; border-radius: 3px; background: var(--series-1); }
.ex-rate { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-rate::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-inline-end: 5px; }
.ex-rate.t-green { color: var(--green); background: var(--green-soft); }
.ex-rate.t-amber { color: var(--amber); background: var(--amber-soft); }
.ex-rate.t-red { color: var(--red); background: var(--red-soft); }
@media (max-width: 720px) { .ex-board-h, .ex-board-row { grid-template-columns: minmax(0, 1fr) auto; } .ex-board-h span:nth-child(2), .ex-share, .ex-board-h span:nth-child(4), .ex-board-row > .end:last-child { display: none; } }

/* part-to-whole bars */
.ex-flow { display: flex; flex-direction: column; gap: 12px; }
.ex-flow-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--text-2); }
.ex-flow-row b { font-size: 20px; color: var(--text); letter-spacing: -0.01em; }
.ex-stack { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; }
.ex-stack.thin { height: 8px; border-radius: 4px; }
.ex-stack i { display: block; height: 100%; }
.ex-stack i:first-child { border-start-start-radius: inherit; border-end-start-radius: inherit; }
.ex-stack i:last-child { border-start-end-radius: inherit; border-end-end-radius: inherit; }
.ex-stack .c, .ex-flow-legend i.c { background: var(--series-1); }
.ex-stack .o, .ex-flow-legend i.o { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--amber-dot) 55%, transparent) 0 3px, color-mix(in srgb, var(--amber-dot) 30%, transparent) 3px 6px); }
.ex-stack .n, .ex-flow-legend i.n { background: var(--muted-bar); }
.ex-flow-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.ex-flow-legend span { display: flex; align-items: center; gap: 8px; }
.ex-flow-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ex-flow-legend b { color: var(--text); margin-inline-start: auto; }
.ex-flow-legend em { font-style: normal; color: var(--text-3); min-width: 40px; text-align: end; font-variant-numeric: tabular-nums; }
.ex-mix-hero { display: flex; align-items: baseline; gap: 10px; }
.ex-mix-hero b { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.ex-mix-hero span { font-size: 12.5px; color: var(--text-3); }
.ex-ins { display: flex; flex-direction: column; gap: 7px; }
@media print { .ex-brief { color: #000; background: none; border: 1px solid #ccc; } .ex-brief h3, .ex-insights b { color: #000; } }
:root { --band-fill: rgba(245, 158, 11, 0.2); }
:root[data-theme="dark"] { --band-fill: rgba(255, 184, 77, 0.36); }
.ex-pulse-spark { margin-block-start: auto; padding-block-start: 18px; }

/* =====================================================================
   Executive dashboard v3 — calm
   ===================================================================== */
.mx { display: flex; flex-direction: column; gap: 20px; }
.mx-heads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .mx-heads { grid-template-columns: minmax(0, 1fr); } }
.mx-head { padding: 24px 26px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; }
.mx-head-l { font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.mx-head-v { font-size: 40px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.mx-head-v span { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--text-3); margin-inline-start: 8px; }
.mx-head-n { font-size: 13px; color: var(--text-3); }
.mx-head.primary { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 70%); }
.mx-meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-block-start: 4px; }
.mx-meter i { display: block; height: 100%; border-radius: 3px; background: var(--series-1); }

.mx-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.mx-row.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .mx-row, .mx-row.even { grid-template-columns: minmax(0, 1fr); } }
.mx-card { padding: 24px 26px; border-radius: 18px; }
.mx-title { font-size: 15px; font-weight: 650; margin-block-end: 20px; }

.mx-bars { display: flex; align-items: stretch; gap: 14px; height: 250px; }
.mx-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: default; }
.mx-col-v { font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.mx-col-track { flex: 1; width: 100%; max-width: 64px; display: flex; align-items: flex-end; }
.mx-col-track i { display: block; width: 100%; border-radius: 10px 10px 4px 4px; background: var(--muted-bar); transition: background .15s, height .6s cubic-bezier(.2,.8,.2,1); }
.mx-col.current .mx-col-track i { background: linear-gradient(180deg, #5b86ff, #2f5fe6); }
.mx-col.current .mx-col-v { color: var(--text); }
.mx-col.hover .mx-col-track i { background: color-mix(in srgb, var(--accent) 55%, var(--muted-bar)); }
.mx-col.current.hover .mx-col-track i { background: linear-gradient(180deg, #6a92ff, #3567ef); }
.mx-col-l { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.mx-attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mx-attn li { display: flex; align-items: flex-start; gap: 12px; padding-block: 14px; font-size: 14px; line-height: 1.7; color: var(--text); }
.mx-attn li + li { border-top: 1px solid var(--border); }
.mx-attn li:first-child { padding-block-start: 0; }
.mx-attn .link { flex: none; margin-block-start: 3px; }
.mx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-block-start: 9px; }
.mx-dot.t-red { background: var(--red-dot); box-shadow: 0 0 0 4px var(--red-soft); }
.mx-dot.t-amber { background: var(--amber-dot); box-shadow: 0 0 0 4px var(--amber-soft); }
.mx-ok { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.mx-ok-ic { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--green); background: var(--green-soft); }

.mx-list { display: flex; flex-direction: column; gap: 18px; }
.mx-item { display: flex; align-items: center; gap: 12px; }
.mx-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; margin-block-end: 8px; }
.mx-item-top b { font-weight: 650; white-space: nowrap; }
.mx-muted { font-weight: 400; color: var(--text-3); font-size: 12px; }
.mx-warn { color: var(--amber); }
.mx-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.mx-bar i { display: block; height: 100%; border-radius: 3px; background: var(--series-1); }
.mx-bar i.warn { background: var(--amber-dot); }
.mx-more { align-self: flex-start; }
.mx-details-toggle { display: flex; justify-content: center; }
.mx-kv { margin: 0; display: flex; flex-direction: column; }
.mx-kv > div { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; font-size: 13.5px; }
.mx-kv > div + div { border-top: 1px solid var(--border); }
.mx-kv dt { color: var(--text-2); min-width: 0; }
.mx-kv dd { margin: 0; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .mx-head-v { font-size: 32px; } .mx-bars { gap: 8px; height: 210px; } .mx-col-v { font-size: 10.5px; } }

/* =====================================================================
   Executive dashboard v4 — financial-grade minimalism
   ===================================================================== */
:root { --fx-prev: #b8c2d3; }
:root[data-theme="dark"] { --fx-prev: rgba(190, 205, 240, 0.35); }
.fx { display: flex; flex-direction: column; gap: 16px; }
.fx-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs); }
.fx-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.fx-faint { color: var(--text-3); }
.fx-insights { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.fx-insights > .icon { color: var(--accent); }
.fx-insight { display: inline-flex; align-items: center; gap: 8px; }
.fx-insight > i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: none; }
.fx-insight.t-up > i { background: var(--green-dot); } .fx-insight.t-down > i { background: var(--red-dot); } .fx-insight.t-info > i { background: var(--accent); }
.fx-insight .link { font-size: 12.5px; }

.fx-hero { padding: 22px 24px 12px; }
.fx-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-block-end: 8px; }
.fx-hero-v { display: flex; align-items: baseline; gap: 8px; margin-block: 6px 8px; }
.fx-hero-v .num { font-size: 34px; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: normal; }
.fx-unit { font-size: 14px; color: var(--text-3); }
.fx-hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.fx-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-2); }
.fx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fx-legend i { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.fx-legend i.cur { background: var(--series-1); height: 2.5px; } .fx-legend i.prev { background: var(--fx-prev); }
.fx-chart { position: relative; margin-inline: -4px; }
.fx-chart svg { display: block; }
.fx-tip { min-width: 190px; }

.fx-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 6px; }
.fx-delta.good { color: var(--green); background: var(--green-soft); }
.fx-delta.bad { color: var(--red); background: var(--red-soft); }
.fx-delta.flat { color: var(--text-3); background: var(--surface-2); }
.fx-delta.plain { background: none; padding: 0; }

.fx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fx-kpi { padding: 18px 22px; min-width: 0; }
.fx-kpi + .fx-kpi { border-inline-start: 1px solid var(--border); }
.fx-kpi-v { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin-block: 6px 6px; font-variant-numeric: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-kpi-d { font-size: 12.5px; min-height: 22px; }
@media (max-width: 900px) { .fx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-kpi:nth-child(3) { border-inline-start: 0; } .fx-kpi:nth-child(n+3) { border-top: 1px solid var(--border); } }

.fx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .fx-two { grid-template-columns: minmax(0, 1fr); } }
.fx-card-h { padding: 18px 22px 6px; }
.fx-card-h h3 { font-size: 14.5px; font-weight: 600; }
.fx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fx-table th { font-size: 12px; font-weight: 500; color: var(--text-3); text-align: start; padding: 10px 22px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.fx-table td { padding: 12px 22px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.fx-table tbody tr:last-child td { border-bottom: 0; }
.fx-table tbody tr:hover td { background: var(--surface-2); }
.fx-table .n { text-align: end; font-variant-numeric: tabular-nums; }
.fx-table td.strong { font-weight: 600; }
.fx-table td:first-child { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.fx-table th + th, .fx-table td + td { padding-inline-start: 8px; }
.fx-rank { display: inline-block; width: 22px; color: var(--text-3); font-size: 12px; }
.fx-rate { display: inline-flex; align-items: center; gap: 10px; }
.fx-rate-bar { width: 56px; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.fx-rate-bar i { display: block; height: 100%; background: var(--series-1); border-radius: 2px; }
.fx-rate-bar i.low { background: var(--red-dot); }
.fx-low { color: var(--red); font-weight: 600; }
.fx-more { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--accent); font-size: 13px; font-weight: 550; cursor: pointer; border-radius: 0 0 14px 14px; }
.fx-more:hover { background: var(--surface-2); }
@media (max-width: 640px) { .fx-table th, .fx-table td { padding-inline: 14px; } .fx-table th:nth-child(3), .fx-table td:nth-child(3) { display: none; } .fx-hero { padding: 18px 16px 8px; } .fx-kpi { padding: 14px 16px; } }
.fx-two .fx-card { overflow-x: auto; }
.fx-chart .axis-text { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.fx-chart .axis-text { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
@media (max-width: 640px) { .fx-kpi-v { font-size: 17px; } }

/* =====================================================================
   Executive dashboard v5 — legacy layout, v2 design system
   ===================================================================== */
:root { --lg-emerald: #0f9f6e; --lg-cyan: #0891b2; --lg-violet: #7c5cf0; --lg-amber: #d97706; --lg-rose: #e11d48; }
:root[data-theme="dark"] { --lg-emerald: #34d399; --lg-cyan: #22d3ee; --lg-violet: #a78bfa; --lg-amber: #fbbf24; --lg-rose: #fb7185; }
.c-emerald { color: var(--lg-emerald) !important; } .c-cyan { color: var(--lg-cyan) !important; } .c-violet { color: var(--lg-violet) !important; }
.c-amber { color: var(--lg-amber) !important; } .c-rose { color: var(--lg-rose) !important; }
.lg { display: flex; flex-direction: column; gap: 18px; }
.lg-fresh { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 600; color: #6ee7c8; background: rgba(110,231,200,0.12); border: 1px solid rgba(110,231,200,0.25); }

.lg-recovery { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-block-end: 18px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--lg-amber) 30%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--lg-amber) 12%, var(--surface)), var(--surface) 70%); box-shadow: var(--shadow-sm); }
html[dir="rtl"] .lg-recovery { background: linear-gradient(270deg, color-mix(in srgb, var(--lg-amber) 12%, var(--surface)), var(--surface) 70%); }
.lg-recovery-ic { width: 36px; height: 36px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--lg-amber); background: color-mix(in srgb, var(--lg-amber) 15%, transparent); border: 1px solid color-mix(in srgb, var(--lg-amber) 30%, transparent); }
.lg-recovery-line { font-size: 12.5px; color: var(--text-2); margin-block-start: 2px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.lg-recovery-line span { font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-recovery-line i { font-style: normal; color: var(--text-3); padding-inline: 2px; }
.lg-recovery-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  color: var(--lg-amber); background: color-mix(in srgb, var(--lg-amber) 12%, transparent); border: 1px solid color-mix(in srgb, var(--lg-amber) 30%, transparent); }
.lg-recovery-btn:hover { background: color-mix(in srgb, var(--lg-amber) 20%, transparent); }

.lg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .lg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lg-kpis { grid-template-columns: minmax(0, 1fr); } }
.lg-kpi { --c: var(--lg-cyan); display: flex; align-items: flex-start; gap: 14px; padding: 20px; border-radius: 18px; min-width: 0;
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 16%, var(--surface)), color-mix(in srgb, var(--c) 4%, var(--surface)));
  box-shadow: var(--shadow-sm); }
.lg-kpi.t-emerald { --c: var(--lg-emerald); } .lg-kpi.t-cyan { --c: var(--lg-cyan); } .lg-kpi.t-violet { --c: var(--lg-violet); } .lg-kpi.t-amber { --c: var(--lg-amber); }
.lg-kpi-t { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.lg-kpi-v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-block: 10px 6px; font-variant-numeric: normal; line-height: 1.2; }
.lg-kpi-s { font-size: 12px; color: var(--text-3); }
.lg-kpi-ic { width: 46px; height: 46px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--c);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }

.lg-minis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .lg-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lg-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lg-mini { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.lg-mini span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-mini b { font-size: 18px; font-weight: 650; font-variant-numeric: normal; }

.lg-alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.lg-alert.warn { color: var(--lg-amber); border-color: color-mix(in srgb, var(--lg-amber) 30%, transparent); background: color-mix(in srgb, var(--lg-amber) 7%, var(--surface)); }

.lg-charts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.lg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .lg-charts, .lg-two { grid-template-columns: minmax(0, 1fr); } }

.lg-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.lg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lg-table th { text-align: start; font-size: 11.5px; font-weight: 600; color: var(--text-3); padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.lg-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lg-table tbody tr:last-child td { border-bottom: 0; }
.lg-table tbody tr:hover td { background: var(--surface-2); }

.lg-rank { display: flex; flex-direction: column; gap: 14px; max-height: 440px; overflow-y: auto; padding-inline-end: 4px; }
.lg-rank-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-block-end: 6px; }
.lg-rank-top i { font-style: normal; color: var(--text-3); font-size: 11.5px; margin-inline-end: 8px; }
.lg-rank-top b { font-weight: 650; white-space: nowrap; }
.lg-rank-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lg-rank-bar span { display: block; height: 100%; border-radius: 3px; }
.lg-rank-bar .b-emerald { background: linear-gradient(90deg, color-mix(in srgb, var(--lg-emerald) 70%, transparent), var(--lg-emerald)); }
.lg-rank-bar .b-violet { background: linear-gradient(90deg, color-mix(in srgb, var(--lg-violet) 70%, transparent), var(--lg-violet)); }
html[dir="rtl"] .lg-rank-bar .b-emerald { background: linear-gradient(270deg, color-mix(in srgb, var(--lg-emerald) 70%, transparent), var(--lg-emerald)); }
html[dir="rtl"] .lg-rank-bar .b-violet { background: linear-gradient(270deg, color-mix(in srgb, var(--lg-violet) 70%, transparent), var(--lg-violet)); }

.lg-ins-h, .lg-ins-vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.lg-ins-h { font-size: 11px; font-weight: 600; color: var(--text-3); padding-block-end: 8px; border-bottom: 1px solid var(--border); }
.lg-ins { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.lg-ins-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block-end: 9px; font-size: 13px; }
.lg-ins-vals span { font-size: 12px; font-weight: 600; padding: 6px 4px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-ins-vals .v-emerald { color: var(--lg-emerald); background: color-mix(in srgb, var(--lg-emerald) 9%, var(--surface)); border-color: color-mix(in srgb, var(--lg-emerald) 25%, transparent); }
.lg-ins-vals .v-amber { color: var(--lg-amber); background: color-mix(in srgb, var(--lg-amber) 9%, var(--surface)); border-color: color-mix(in srgb, var(--lg-amber) 25%, transparent); }
.lg-risk { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.lg-risk.r-low { color: var(--lg-emerald); background: color-mix(in srgb, var(--lg-emerald) 14%, transparent); }
.lg-risk.r-medium { color: var(--lg-amber); background: color-mix(in srgb, var(--lg-amber) 14%, transparent); }
.lg-risk.r-high { color: var(--lg-rose); background: color-mix(in srgb, var(--lg-rose) 14%, transparent); }
.lg-flow { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.lg-flow b { font-size: 14px; font-weight: 650; color: var(--text); }

/* Executive Advisor */
.adv { display: flex; flex-direction: column; gap: 14px; padding-block-start: 10px; border-top: 1px solid var(--border); margin-block-start: 4px; }
.adv-head { padding: 20px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--lg-violet) 25%, transparent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--lg-violet) 13%, var(--surface)), var(--surface) 65%); box-shadow: var(--shadow-sm); }
.adv-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.adv-bulb { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--lg-violet); background: color-mix(in srgb, var(--lg-violet) 15%, transparent); border: 1px solid color-mix(in srgb, var(--lg-violet) 30%, transparent); }
.adv-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--lg-violet); }
.adv-head h2 { font-size: 19px; font-weight: 700; margin-block-start: 2px; }
.adv-source { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--lg-emerald); padding: 5px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--lg-emerald) 25%, transparent); background: color-mix(in srgb, var(--lg-emerald) 8%, transparent); direction: ltr; }
.adv-summary { margin-block-start: 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.adv-summary p { font-size: 14px; line-height: 1.8; }
.adv-meta { font-size: 11px; color: var(--text-3); margin-block-start: 6px; }
.adv-label { font-size: 11.5px; font-weight: 600; color: var(--text-3); margin-block: 8px 0; }
.adv-summary .adv-label { margin-block: 0 6px; }
.adv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .adv-grid { grid-template-columns: minmax(0, 1fr); } }
.adv-card { --c: var(--lg-cyan); display: flex; flex-direction: column; padding: 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--surface)), var(--surface) 60%); }
.adv-card.c-emerald { --c: var(--lg-emerald); } .adv-card.c-violet { --c: var(--lg-violet); } .adv-card.c-cyan { --c: var(--lg-cyan); } .adv-card.c-amber { --c: var(--lg-amber); } .adv-card.c-rose { --c: var(--lg-rose); }
.adv-card.c-emerald, .adv-card.c-violet, .adv-card.c-cyan, .adv-card.c-amber, .adv-card.c-rose { color: inherit !important; }
.adv-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block-end: 12px; }
.adv-card header b { font-size: 12.5px; color: var(--text-2); }
.adv-ic { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: var(--surface); border: 1px solid var(--border); }
.adv-card p { font-size: 13px; line-height: 1.85; color: var(--text); margin-block-end: 12px; }
.adv-card ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.adv-card li { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.6; color: var(--text-2); }
.adv-card li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; margin-block-start: 6px; }
.adv-card footer { margin-block-start: auto; padding-block-start: 10px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-3); margin-top: 12px; }
.adv-card footer b { color: var(--text-2); font-weight: 600; }
.adv-prio, .adv-badge { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; white-space: nowrap; border: 1px solid transparent; }
.adv-prio.p-high, .adv-badge.p-high { color: var(--lg-rose); background: color-mix(in srgb, var(--lg-rose) 12%, transparent); border-color: color-mix(in srgb, var(--lg-rose) 25%, transparent); }
.adv-prio.p-medium, .adv-badge.p-medium { color: var(--lg-amber); background: color-mix(in srgb, var(--lg-amber) 12%, transparent); border-color: color-mix(in srgb, var(--lg-amber) 25%, transparent); }
.adv-prio.p-low, .adv-badge.p-low { color: var(--text-3); background: var(--surface-2); border-color: var(--border); }
.adv-actions { display: flex; flex-direction: column; gap: 8px; }
.adv-action { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; }
.adv-check { width: 20px; height: 20px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); border: 1.5px solid var(--border-strong); }
.adv-check .icon { width: 12px; height: 12px; }

/* =====================================================================
   Motion system — quiet, fast, purposeful
   ===================================================================== */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-std: cubic-bezier(.2, .8, .2, 1); }

/* launch intro */
.intro { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff;
  background: radial-gradient(900px 620px at 50% 42%, rgba(70, 110, 220, 0.42), transparent 65%), linear-gradient(180deg, #10204a 0%, #0b1530 100%); }
.intro.out { animation: introOut .62s var(--ease-std) forwards; }
@keyframes introOut { to { opacity: 0; transform: scale(1.04); filter: blur(6px); visibility: hidden; } }
.intro-core { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.intro-mark { animation: introMark 1s var(--ease-out) both; }
@keyframes introMark { from { opacity: 0; transform: translateY(10px) scale(.86); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.intro-word { display: flex; font-size: 34px; font-weight: 300; letter-spacing: .06em; margin-block-start: 6px; }
.intro-word span { display: inline-block; opacity: 0; animation: introLetter .7s var(--ease-out) both; }
.intro-word .intro-q { font-weight: 700; color: #a9c6ff; }
@keyframes introLetter { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.intro-tag { font-size: 12.5px; color: rgba(226, 234, 255, .62); letter-spacing: .02em; animation: introFade .8s .75s var(--ease-out) both; }
@keyframes introFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.intro-bar { width: 132px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; margin-block-start: 10px; animation: introFade .5s .5s both; }
.intro-bar i { display: block; height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #6ea0ff, #6ee7c8); animation: introBar 1.05s .45s var(--ease-std) both; }
@keyframes introBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.intro-rings { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.intro-rings i { position: absolute; left: 0; top: 0; width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; border: 1px solid rgba(150, 185, 255, .35); animation: introRing 2.2s var(--ease-std) infinite; opacity: 0; }
.intro-rings i:nth-child(2) { animation-delay: .5s; } .intro-rings i:nth-child(3) { animation-delay: 1s; }
@keyframes introRing { 0% { transform: scale(.5); opacity: 0; } 20% { opacity: .9; } 100% { transform: scale(4.2); opacity: 0; } }
/* page content waits for the veil, then flows in */
.intro-playing .page-enter, .intro-playing .page-enter > * { animation-play-state: paused !important; }

/* page transitions: whole page settles, sections follow in sequence */
.page-enter { animation: pageIn .5s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.page-enter > * { animation: sectionIn .6s var(--ease-out) backwards; }
.page-enter > *:nth-child(2) { animation-delay: .06s; } .page-enter > *:nth-child(3) { animation-delay: .12s; }
.page-enter > *:nth-child(4) { animation-delay: .18s; } .page-enter > *:nth-child(5) { animation-delay: .24s; } .page-enter > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* large grids inside a page cascade too */
.lg > *, .lg-kpis > *, .lg-minis > *, .adv-grid > *, .grid > .card, .sc-stats > * { animation: sectionIn .55s var(--ease-out) backwards; }
.lg > *:nth-child(2), .lg-kpis > *:nth-child(2), .lg-minis > *:nth-child(2), .adv-grid > *:nth-child(2), .grid > .card:nth-child(2), .sc-stats > *:nth-child(2) { animation-delay: .05s; }
.lg > *:nth-child(3), .lg-kpis > *:nth-child(3), .lg-minis > *:nth-child(3), .adv-grid > *:nth-child(3), .grid > .card:nth-child(3), .sc-stats > *:nth-child(3) { animation-delay: .1s; }
.lg > *:nth-child(4), .lg-kpis > *:nth-child(4), .lg-minis > *:nth-child(4), .adv-grid > *:nth-child(4), .grid > .card:nth-child(4), .sc-stats > *:nth-child(4) { animation-delay: .15s; }
.lg > *:nth-child(n+5), .lg-minis > *:nth-child(5), .adv-grid > *:nth-child(n+5) { animation-delay: .2s; }

/* branded header: title rises, a soft light passes once, rings breathe */
.hero-head h1 { animation: heroTitle .8s .05s var(--ease-out) both; }
.hero-head p, .hero-eyebrow { animation: heroTitle .8s .12s var(--ease-out) both; }
@keyframes heroTitle { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.hero-head::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.10) 50%, transparent 65%); transform: translateX(-100%); animation: heroSweep 1.6s .25s var(--ease-std) both; }
html[dir="rtl"] .hero-head::before { animation-name: heroSweepR; }
@keyframes heroSweep { to { transform: translateX(100%); } }
@keyframes heroSweepR { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.hero-rings { animation: heroRings 9s ease-in-out infinite; }
@keyframes heroRings { 0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; } 50% { transform: translateY(-50%) scale(1.06); opacity: .7; } }

/* sidebar: one indicator glides to the active page */
.nav { position: relative; }
.nav-indicator { position: absolute; inset-inline: 0; top: 0; border-radius: 10px; pointer-events: none; z-index: 0;
  background: linear-gradient(90deg, rgba(120, 160, 255, 0.26), rgba(120, 160, 255, 0.08)); box-shadow: inset 0 0 0 1px rgba(150, 185, 255, .18);
  transition: transform .45s var(--ease-out), height .3s var(--ease-out), opacity .2s; }
html[dir="rtl"] .nav-indicator { background: linear-gradient(270deg, rgba(120, 160, 255, 0.26), rgba(120, 160, 255, 0.08)); }
.nav-indicator::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #7fa2ff; box-shadow: 0 0 10px rgba(127, 162, 255, .8); }
.nav .nav-item, .nav .nav-group { position: relative; z-index: 1; }
.sidebar .nav .nav-item[aria-current="page"] { background: transparent !important; box-shadow: none !important; }
.sidebar .nav .nav-item[aria-current="page"]::before { display: none; }
.sidebar .nav .nav-item .icon { transition: transform .25s var(--ease-out); }
.sidebar .nav .nav-item:hover .icon { transform: translateX(2px); }
html[dir="rtl"] .sidebar .nav .nav-item:hover .icon { transform: translateX(-2px); }

/* charts: lines draw, areas fade, bars grow from the baseline */
.ch-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: chDraw 1.3s .15s var(--ease-std) forwards; }
@keyframes chDraw { to { stroke-dashoffset: 0; } }
.ch-fade { animation: chFade .9s .5s ease both; }
@keyframes chFade { from { opacity: 0; } }
.ch-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: chBar .7s var(--ease-out) both; }
@keyframes chBar { from { transform: scaleY(0); } }
/* progress / ranked bars fill from the start edge */
.lg-rank-bar span, .rank-bar span, .mx-bar i, .fx-rate-bar i, .ex-share-bar i, .meter span, .mx-meter i, .sc-spark i {
  transform-origin: left center; animation: barFill .9s .2s var(--ease-out) both; }
html[dir="rtl"] :is(.lg-rank-bar span, .rank-bar span, .mx-bar i, .fx-rate-bar i, .ex-share-bar i, .meter span, .mx-meter i) { transform-origin: right center; }
.sc-spark i { transform-origin: bottom center; animation-name: chBar; }
@keyframes barFill { from { transform: scaleX(0); } }

/* surfaces respond to the pointer */
.btn { transition: transform .12s ease, background .15s, box-shadow .2s, border-color .15s, color .15s; }
.btn:active:not(:disabled) { transform: translateY(0) scale(.97); }
.icon-btn { transition: transform .12s ease, background .15s, color .15s; }
.icon-btn:active { transform: scale(.92); }
.lg-kpi, .adv-card, .lg-mini, .fx-card, .ex-tile, .sc-stat, .lg-ins { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .2s; }
.lg-kpi:hover, .adv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lg-mini:hover, .lg-ins:hover, .sc-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.lg-kpi-ic { transition: transform .35s var(--ease-out); }
.lg-kpi:hover .lg-kpi-ic { transform: rotate(-6deg) scale(1.06); }
.input, .select { transition: border-color .15s, box-shadow .2s var(--ease-out), background .15s; }
.patient-row, .sc-doc, .menu-item { transition: background .15s, transform .2s var(--ease-out); }

/* overlays pop in */
.menu { animation: popIn .18s var(--ease-out) both; transform-origin: top; }
.dialog, .palette { animation: popIn .24s var(--ease-out) both !important; }
.overlay { animation: fadeIn .2s ease both; backdrop-filter: blur(4px); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.toast { animation: toastIn .35s var(--ease-out) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* theme switch: the new theme spreads as a circle from the toggle */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .5s; animation-timing-function: var(--ease-std); }
[data-vt="theme"]::view-transition-old(root) { animation: none; }
[data-vt="theme"]::view-transition-new(root) { animation: vtReveal .65s var(--ease-std) both; }
@keyframes vtReveal { from { clip-path: circle(0 at var(--vt-x) var(--vt-y)); } to { clip-path: circle(var(--vt-r) at var(--vt-x) var(--vt-y)); } }
/* language switch: a soft cross-fade instead of a hard layout flip */
[data-vt="lang"]::view-transition-old(root) { animation: vtOut .28s ease both; }
[data-vt="lang"]::view-transition-new(root) { animation: vtIn .42s .08s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; filter: blur(3px); } }
@keyframes vtIn { from { opacity: 0; filter: blur(3px); transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .intro { display: none; }
}
@media print { .page-enter, .page-enter > *, .ch-draw, .ch-bar { animation: none !important; stroke-dashoffset: 0 !important; } }
