/* ============================================================
   أحكام التميز — نظام التصميم "مؤسسي مضيء"
   Ahkam Al Tamyoz — Institutional Light design system
   ------------------------------------------------------------
   أبيض ناصع، أقسام بأزرق فاتح، أزرق ملكي عميق للعناوين والأزرار،
   بطاقات مستديرة بظل ناعم، أزرار كبسولة، وفوتوغرافيا معمارية سعودية.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand */
  --royal-900: #141F52;
  --royal-800: #1B2A68;
  --royal-700: #1E2E71;
  --royal:     #24357E;
  --royal-500: #33489C;
  --royal-400: #4A61BC;
  --royal-200: #A9B6E4;
  --royal-100: #DCE3F8;
  --royal-50:  #EEF2FC;
  --mist:      #F3F6FD;
  --mist-2:    #E7EDFA;
  --gold:      #B08C3F;
  --gold-soft: #E8DCC0;
  --paper:     #FFFFFF;
  --ink:       #12151F;
  --ink-2:     #474E63;
  /* 5.1:1 on white and 4.8:1 on the tinted section background — AA at body sizes */
  --ink-3:     #666E88;

  /* Type — display face for headings, text face for body */
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-lat: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;

  --t-hero:  clamp(2.15rem, 1.15rem + 3.9vw, 4.15rem);
  --t-h1:    clamp(1.85rem, 1.2rem + 2.5vw, 3.05rem);
  --t-h2:    clamp(1.6rem, 1.15rem + 1.9vw, 2.6rem);
  --t-h3:    clamp(1.22rem, 1.05rem + 0.72vw, 1.65rem);
  --t-h4:    clamp(1.04rem, 0.98rem + 0.3vw, 1.2rem);
  --t-body:  clamp(0.98rem, 0.95rem + 0.16vw, 1.075rem);
  --t-lead:  clamp(1.06rem, 1rem + 0.42vw, 1.28rem);
  --t-small: 0.875rem;
  --t-micro: 0.78rem;

  /* Rhythm */
  --shell: 1280px;
  --gutter: clamp(1.15rem, 3.5vw, 2.5rem);
  --section: clamp(3.5rem, 2.4rem + 4.6vw, 7rem);
  --stack: clamp(1.25rem, 0.9rem + 1.5vw, 2.25rem);

  /* Shape */
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;
  --pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light — the primary experience */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg:        var(--paper);
  --bg-alt:    var(--mist);
  --bg-deep:   var(--royal);
  --surface:   var(--paper);
  --surface-2: var(--royal-50);
  --fg:        var(--ink-2);
  --fg-strong: var(--ink);
  --fg-title:  var(--royal);
  --fg-muted:  var(--ink-3);
  --accent:    var(--royal);
  --accent-2:  var(--royal-500);
  --on-accent: #FFFFFF;
  --line:      #DFE5F4;
  --line-soft: #EDF1FA;
  --field:     #F7F9FE;
  --shadow-sm: 0 1px 2px rgba(20, 31, 82, 0.05), 0 3px 8px -3px rgba(20, 31, 82, 0.07);
  --shadow:    0 2px 6px rgba(20, 31, 82, 0.05), 0 16px 36px -18px rgba(20, 31, 82, 0.22);
  --shadow-lg: 0 4px 12px rgba(20, 31, 82, 0.06), 0 32px 64px -28px rgba(20, 31, 82, 0.3);
  --overlay:   rgba(18, 21, 31, 0.42);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #0A1030;
  --bg-alt:    #0E1740;
  --bg-deep:   #060B22;
  --surface:   #121C4A;
  --surface-2: #16215A;
  --fg:        #C4CBE6;
  --fg-strong: #F3F6FF;
  --fg-title:  #FFFFFF;
  --fg-muted:  #8E97BC;
  --accent:    #7C93EA;
  --accent-2:  #93A7F2;
  --on-accent: #060B22;
  --line:      rgba(160, 178, 240, 0.18);
  --line-soft: rgba(160, 178, 240, 0.1);
  --field:     rgba(160, 178, 240, 0.07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow:    0 16px 36px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 32px 64px -28px rgba(0, 0, 0, 0.8);
  --overlay:   rgba(4, 8, 24, 0.6);
  --royal-50:  rgba(160, 178, 240, 0.08);
  --royal-100: rgba(160, 178, 240, 0.16);
  --mist:      #0E1740;
  --mist-2:    #16215A;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: 6.5rem;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
html[dir="ltr"] body { line-height: 1.7; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

/* ---------- 3. Layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * 0.62); }
.section--alt { background: var(--bg-alt); }
.section--deep { background: var(--bg-deep); color: #D5DCF5; }
.section--deep .display, .section--deep h2, .section--deep h3 { color: #fff; }

.grid { display: grid; gap: var(--stack); }
@media (min-width: 860px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .grid--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 4.5vw, 4.5rem); align-items: center; }
  .grid--sidebar { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr); gap: clamp(2rem, 4.5vw, 4.5rem); }
}
.stack > * + * { margin-block-start: 1.1em; }
.measure { max-width: 62ch; }
.measure-tight { max-width: 46ch; }
.center { text-align: center; margin-inline: auto; }

/* ---------- 4. Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.45;          /* Readex has tall ascenders — Arabic needs the room */
  letter-spacing: 0;
  color: var(--fg-title);
  text-wrap: balance;
}
html[dir="ltr"] .display { line-height: 1.18; letter-spacing: -0.018em; }
.t-hero { line-height: 1.38; }
html[dir="ltr"] .t-hero { line-height: 1.08; }

.t-hero { font-size: var(--t-hero); }
.t-h1 { font-size: var(--t-h1); }
.t-h2 { font-size: var(--t-h2); }
.t-h3 { font-size: var(--t-h3); }
.t-h4 { font-size: var(--t-h4); font-weight: 600; line-height: 1.6; color: var(--fg-strong); }

/* the display face carries every heading-scale element, not just .display */
.t-h4,
.card__t,
.post__title,
.person__name,
.stat__v,
.qa__q,
.jrn__phase,
.step-card__t,
.prose h2,
.brand__name,
.asst__title {
  font-family: var(--font-display);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--royal-50);
  border: 1px solid var(--line);
  padding: 0.5em 1.05em;
  border-radius: var(--pill);
  line-height: 1.5;
  align-self: flex-start; /* never stretch when it is a flex/grid item */
  width: fit-content;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.eyebrow--plain { background: none; border: 0; padding: 0; }

.lead { font-size: var(--t-lead); color: var(--fg); line-height: 1.75; }
.muted { color: var(--fg-muted); }
.on-deep { color: rgba(255, 255, 255, 0.78); }
.num { font-family: var(--font-lat); font-variant-numeric: tabular-nums; }

.sec-head { display: grid; gap: 1.1rem; margin-block-end: clamp(2.25rem, 4vw, 3.75rem); }
.sec-head__title { margin-block-start: 0.15em; }
@media (min-width: 980px) {
  .sec-head--split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: end; }
}
.sec-head--center { justify-items: center; text-align: center; }
.sec-head--center .measure { margin-inline: auto; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1.75em;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
  color: var(--accent);
  border-color: var(--line);
  background: var(--surface);
}
.btn:hover, .btn:focus-visible { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }

.btn--solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--accent-2); border-color: var(--accent-2); box-shadow: var(--shadow); }

.btn--ghost { background: none; border-color: transparent; padding-inline: 0.4em; }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: transparent; box-shadow: none; color: var(--accent-2); }

.btn--light { background: #fff; color: var(--royal); border-color: #fff; }
.btn--light:hover, .btn--light:focus-visible { background: var(--royal-100); border-color: var(--royal-100); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.42); }
.btn--outline-light:hover, .btn--outline-light:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

.btn--sm { padding: 0.6em 1.25em; font-size: 0.86rem; }
.btn--lg { padding: 1em 2.1em; font-size: 1.02rem; }
.btn .ico { width: 1.05em; height: 1.05em; flex: none; }
html[dir="rtl"] .btn .ico--arrow { transform: scaleX(-1); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.93rem;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.link-arrow svg { width: 1em; height: 1em; }
html[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }
.link-arrow:hover, .link-arrow:focus-visible { gap: 0.85em; color: var(--accent-2); }

/* ---------- 6. Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
/* الشعار PNG بخلفية شفافة — في المظهر الداكن يُقلب إلى أبيض بدل تحميل ملف ثانٍ */
.brand__mark { height: 2.75rem; width: auto; flex: none; }
:root[data-theme="dark"] .brand__mark { filter: brightness(0) invert(1); }

.ftr__brand { display: inline-block; }
.ftr__logo { height: clamp(5rem, 10vw, 7rem); width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-weight: 700; font-size: 1.06rem; color: var(--fg-title); letter-spacing: -0.01em; }
.brand__sub { font-size: 0.68rem; color: var(--fg-muted); font-weight: 500; }
@media (max-width: 520px) { .brand__sub { display: none; } .brand__mark { height: 2.4rem; } }
.brand--light .brand__name { color: #fff; }
.brand--light .brand__sub { color: rgba(255, 255, 255, 0.66); }

/* ---------- 7. Header ---------- */
.hdr {
  position: sticky;
  inset-block-start: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-block-end: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hdr[data-scrolled="true"] { border-block-end-color: var(--line); box-shadow: var(--shadow-sm); }
.hdr__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 4.9rem; }
.hdr__nav { display: none; }
@media (min-width: 1080px) { .hdr__nav { display: flex; align-items: center; gap: clamp(0.9rem, 1.6vw, 1.85rem); } }
.hdr__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fg);
  padding: 0.45rem 0;
  position: relative;
  transition: color 0.25s var(--ease);
}
.hdr__link::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: inline-end;
  transition: transform 0.3s var(--ease-out);
}
.hdr__link:hover, .hdr__link:focus-visible, .hdr__link[aria-current] { color: var(--accent); }
.hdr__link:hover::after, .hdr__link:focus-visible::after, .hdr__link[aria-current]::after { transform: scaleX(1); transform-origin: inline-start; }
.hdr__tools { display: flex; align-items: center; gap: 0.45rem; }

.icon-btn {
  width: 2.45rem; height: 2.45rem;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--fg);
  background: var(--surface);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.icon-btn:hover, .icon-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }
.icon-btn--lang { width: auto; padding-inline: 0.95rem; font-size: 0.82rem; font-weight: 600; }
.hdr__cta { display: none; }
@media (min-width: 720px) { .hdr__cta { display: inline-flex; } }
.hdr__burger { display: grid; }
@media (min-width: 1080px) { .hdr__burger { display: none; } }

/* Drawer */
.drawer {
  position: fixed; inset: 0; z-index: 950;
  background: var(--bg);
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.drawer[data-open="true"] { opacity: 1; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; min-height: 4.9rem; border-block-end: 1px solid var(--line); }
.drawer__body { display: flex; flex-direction: column; gap: 0.15rem; overflow-y: auto; padding-block: 1.5rem; }
.drawer__link {
  font-size: 1.22rem; font-weight: 600; color: var(--fg-strong);
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer__link svg { width: 1rem; height: 1rem; color: var(--accent); }
html[dir="rtl"] .drawer__link svg { transform: scaleX(-1); }
.drawer__foot { padding-block: 1.5rem; border-block-start: 1px solid var(--line); display: grid; gap: 0.75rem; }

/* ---------- 8. Hero ---------- */
.hero { position: relative; background: var(--royal-900); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10, 16, 48, 0.88) 0%, rgba(14, 22, 62, 0.5) 45%, rgba(20, 31, 82, 0.24) 100%),
    linear-gradient(to var(--grad-dir), rgba(16, 25, 68, 0.86) 0%, rgba(18, 28, 74, 0.42) 48%, rgba(20, 31, 82, 0.06) 100%);
}
html[dir="rtl"] .hero__media::after { --grad-dir: left; }
html[dir="ltr"] .hero__media::after { --grad-dir: right; }

.hero__inner {
  position: relative; z-index: 2;
  padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem);
  min-height: clamp(30rem, 74vh, 44rem);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.hero__eyebrow { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); color: #fff; backdrop-filter: blur(6px); }
.hero h1 { color: #fff; margin-block: 1.35rem 0; max-width: 19ch; }
html[dir="ltr"] .hero h1 { max-width: 15ch; }
.hero__sub { color: rgba(255, 255, 255, 0.84); font-size: var(--t-lead); max-width: 52ch; margin-block-start: 1.35rem; line-height: 1.75; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-block-start: 2.15rem; }

.hero__strip { position: relative; z-index: 2; border-block-start: 1px solid rgba(255, 255, 255, 0.16); }
.hero__strip ul { display: flex; flex-wrap: wrap; gap: 0.5rem clamp(1.25rem, 3vw, 2.75rem); padding-block: 1.1rem; }
.hero__strip li {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: var(--t-micro); color: rgba(255, 255, 255, 0.72); font-weight: 500;
}
.hero__strip svg { width: 0.95rem; height: 0.95rem; color: var(--gold-soft); flex: none; }

/* ---------- 9. Stats ---------- */
.stats {
  display: grid; gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats--float { margin-block-start: calc(clamp(2rem, 5vw, 4rem) * -1); position: relative; z-index: 5; }
.stat { padding: clamp(1.35rem, 2.6vw, 2.1rem); border-block-end: 1px solid var(--line); }
@media (min-width: 640px) {
  .stat { border-inline-end: 1px solid var(--line); }
  .stat:nth-child(2n) { border-inline-end: 0; }
}
@media (min-width: 1000px) {
  .stat { border-block-end: 0; border-inline-end: 1px solid var(--line); }
  .stat:nth-child(2n) { border-inline-end: 1px solid var(--line); }
  .stat:last-child { border-inline-end: 0; }
}
.stat:last-child { border-block-end: 0; }
.stat__v { font-size: clamp(2rem, 1.3rem + 2.2vw, 3rem); font-weight: 700; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__l { font-weight: 600; color: var(--fg-strong); margin-block-start: 0.35rem; font-size: 0.98rem; }
.stat__n { font-size: var(--t-small); color: var(--fg-muted); margin-block-start: 0.2rem; line-height: 1.6; }

/* ---------- 10. Cards ---------- */
.cards { display: grid; gap: clamp(1rem, 1.8vw, 1.5rem); }
@media (min-width: 640px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) and (max-width: 1039px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  display: grid; gap: 0.75rem; align-content: start;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
a.card:hover, a.card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--royal-200); }
.card__ico {
  width: 3rem; height: 3rem; border-radius: var(--r-md);
  background: var(--royal-50); color: var(--accent);
  display: grid; place-items: center;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.card__ico svg { width: 1.4rem; height: 1.4rem; }
a.card:hover .card__ico { background: var(--accent); color: var(--on-accent); }
.card__t { font-size: 1.09rem; font-weight: 600; color: var(--fg-title); line-height: 1.62; text-wrap: balance; }
.card__b { font-size: 0.94rem; color: var(--fg-muted); line-height: 1.75; }
.card__f { margin-block-start: 0.35rem; }
.card--flat { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.card--deep { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.8); }
.card--deep .card__t { color: #fff; }
.card--deep .card__b { color: rgba(255, 255, 255, 0.7); }
.card--deep .card__ico { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* numbered card */
.card__n {
  font-size: 0.82rem; font-weight: 700; color: var(--accent);
  background: var(--royal-50); border-radius: var(--pill);
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- 11. Media blocks ---------- */
.figure { border-radius: var(--r-xl); overflow: hidden; position: relative; background: var(--mist-2); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--wide { aspect-ratio: 16 / 10; }
.figure--sq { aspect-ratio: 1 / 1; }
.figure__tag {
  position: absolute; inset-block-end: 1rem; inset-inline-start: 1rem;
  background: rgba(255, 255, 255, 0.94); color: var(--royal);
  padding: 0.55rem 1.1rem; border-radius: var(--pill);
  font-size: var(--t-small); font-weight: 600;
  backdrop-filter: blur(8px);
}

/* ---------- 12. Ticks / lists ---------- */
.ticks { display: grid; gap: 0.7rem; }
.ticks li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.ticks svg { width: 1.15rem; height: 1.15rem; color: var(--accent); margin-block-start: 0.35em; flex: none; }
.ticks--deep svg { color: var(--gold-soft); }

.bullets { display: grid; gap: 0.55rem; }
.bullets li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; color: var(--fg-muted); font-size: 0.95rem; }
.bullets li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-block-start: 0.65em; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-size: var(--t-small); font-weight: 500;
  padding: 0.5em 1.05em; border-radius: var(--pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
a.chip:hover, button.chip:hover { color: var(--accent); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.note {
  background: var(--royal-50);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  color: var(--fg-muted);
  line-height: 1.7;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--t-micro); font-weight: 600;
  color: var(--gold); background: #FBF7EE; border: 1px solid var(--gold-soft);
  padding: 0.45em 0.95em; border-radius: var(--pill);
}
:root[data-theme="dark"] .badge { background: rgba(176, 140, 63, 0.14); color: #DFC384; border-color: rgba(176, 140, 63, 0.4); }
.badge svg { width: 0.9rem; height: 0.9rem; }

/* ---------- 13. Ledger (credentials) ---------- */
.ledger {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.ledger__row {
  display: grid; gap: 0.15rem 1rem;
  padding: 1rem clamp(1rem, 2vw, 1.5rem);
  border-block-end: 1px solid var(--line-soft);
  align-items: center;
}
.ledger__row:last-child { border-block-end: 0; }
@media (min-width: 720px) { .ledger__row { grid-template-columns: minmax(0, 1.7fr) auto minmax(0, 0.75fr); } }
.ledger__label { font-size: 0.94rem; color: var(--fg-strong); font-weight: 500; }
.ledger__value {
  font-family: var(--font-lat); font-variant-numeric: tabular-nums;
  font-weight: 600; color: var(--accent); font-size: 1rem;
  background: var(--royal-50); padding: 0.2em 0.7em; border-radius: var(--r-sm);
  justify-self: start;
  /* لا nowrap: الأرقام لا تلتف بطبيعتها، والنصوص الطويلة
     (مثل نوع الكيان بالإنجليزية) كانت تدفع الصفحة خارج شاشة الجوال */
  overflow-wrap: anywhere;
}
.ledger__who { font-size: var(--t-small); color: var(--fg-muted); }

/* ---------- 14. Steps / journey ---------- */
.steps-track { display: grid; gap: clamp(1rem, 1.8vw, 1.5rem); counter-reset: s; }
@media (min-width: 700px) { .steps-track { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps-track--5 { grid-template-columns: repeat(5, 1fr); } }
.step-card { position: relative; padding-block-start: 1.5rem; border-block-start: 3px solid var(--royal-100); }
.step-card__n { font-size: 0.8rem; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.step-card__t { font-weight: 700; color: var(--fg-title); margin-block: 0.5rem 0.45rem; font-size: 1.04rem; }
.step-card__b { font-size: 0.93rem; color: var(--fg-muted); line-height: 1.75; }
.step-card:first-child { border-block-start-color: var(--accent); }

.jrn { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.jrn__i {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.6vw, 2.1rem);
  display: grid; gap: 1.1rem;
}
@media (min-width: 900px) { .jrn__i { grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); } }
.jrn__phase { font-size: var(--t-h3); font-weight: 700; color: var(--fg-title); margin-block-start: 0.6rem; }
.jrn__risk {
  margin-block-start: 1.15rem; background: #FDF8EE; border: 1px solid var(--gold-soft);
  border-radius: var(--r-md); padding: 0.9rem 1.15rem; font-size: 0.9rem; color: #7C6427; line-height: 1.7;
}
:root[data-theme="dark"] .jrn__risk { background: rgba(176, 140, 63, 0.1); border-color: rgba(176, 140, 63, 0.3); color: #DFC384; }

/* ---------- 15. People ---------- */
.people { display: grid; gap: clamp(1.25rem, 2.4vw, 2rem); }
@media (min-width: 860px) { .people { grid-template-columns: repeat(2, 1fr); } }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; display: grid; align-content: start;
}
.person__head { display: grid; grid-template-columns: auto 1fr; gap: 1.15rem; align-items: center; padding: clamp(1.35rem, 2.5vw, 1.9rem); background: var(--royal-50); border-block-end: 1px solid var(--line); }
.person__avatar {
  width: clamp(4.25rem, 8vw, 5.5rem); aspect-ratio: 1; border-radius: var(--pill);
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.4rem);
  overflow: hidden; flex: none;
}
.person__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person__role { font-size: var(--t-small); font-weight: 600; color: var(--accent); }
.person__name { font-size: var(--t-h3); font-weight: 700; color: var(--fg-title); margin-block-start: 0.2rem; line-height: 1.4; }
.person__body { padding: clamp(1.35rem, 2.5vw, 1.9rem); display: grid; gap: 1.35rem; }
.spec { display: grid; gap: 0.6rem; }
.spec__k { font-size: var(--t-micro); font-weight: 700; color: var(--fg-muted); letter-spacing: 0.04em; }
.spec__v { display: grid; gap: 0.45rem; }
.spec__v li {
  display: grid; grid-template-columns: 1fr auto; gap: 0.85rem; align-items: center;
  font-size: 0.92rem; background: var(--field); border-radius: var(--r-sm); padding: 0.55rem 0.8rem;
}
.spec__v li b { font-family: var(--font-lat); font-weight: 600; color: var(--accent); font-size: 0.86rem; white-space: nowrap; }

/* ---------- 16. Accordion / FAQ ---------- */
.qa { display: grid; gap: 0.75rem; }
.qa__i { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color 0.25s, box-shadow 0.25s; }
.qa__i:has([aria-expanded="true"]) { border-color: var(--royal-200); box-shadow: var(--shadow-sm); }
.qa__q {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: center;
  text-align: start; padding: clamp(1rem, 2vw, 1.4rem) clamp(1.1rem, 2.2vw, 1.6rem);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem); font-weight: 600; color: var(--fg-strong); line-height: 1.6;
}
.qa__q:hover { color: var(--accent); }
.qa__sign {
  width: 1.9rem; height: 1.9rem; border-radius: var(--pill); background: var(--royal-50); color: var(--accent);
  display: grid; place-items: center; flex: none; transition: transform 0.3s var(--ease-out), background-color 0.25s;
}
.qa__sign svg { width: 0.85rem; height: 0.85rem; }
.qa__q[aria-expanded="true"] .qa__sign { transform: rotate(45deg); background: var(--accent); color: var(--on-accent); }
.qa__a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.35s var(--ease-out); }
.js .qa__a { grid-template-rows: 0fr; }
.js .qa__q[aria-expanded="true"] + .qa__a { grid-template-rows: 1fr; }
.qa__a > div { overflow: hidden; }
.qa__a p { padding: 0 clamp(1.1rem, 2.2vw, 1.6rem) clamp(1.1rem, 2.2vw, 1.5rem); color: var(--fg-muted); font-size: 0.96rem; max-width: 76ch; }

/* ---------- 17. Posts ---------- */
.posts { display: grid; gap: clamp(1rem, 1.8vw, 1.5rem); }
@media (min-width: 700px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .posts--3 { grid-template-columns: repeat(3, 1fr); } }
.post {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.35rem, 2.4vw, 1.9rem);
  display: grid; gap: 0.7rem; align-content: start;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--royal-200); }
/* بطاقة مقال بصورة: الصورة تلتصق بحواف البطاقة العلوية وتتقرّب عند التحويم */
.post--img { padding: 0; overflow: hidden; }
.post--img > *:not(.post__thumb) { margin-inline: clamp(1.35rem, 2.4vw, 1.9rem); }
.post--img .post__meta { margin-block-start: 1.1rem; }
.post--img > *:last-child { margin-block-end: clamp(1.35rem, 2.4vw, 1.9rem); }
.post__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--mist-2); }
.post__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.post--img:hover .post__thumb img { transform: scale(1.045); }

/* صورة رأس المقال */
.post__hero { aspect-ratio: 21 / 9; margin-block-end: clamp(2rem, 4vw, 3rem); }
.post__hero img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .post__hero { aspect-ratio: 16 / 10; } }

.post__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.85rem; font-size: var(--t-micro); color: var(--fg-muted); align-items: center; }
.post__cat { color: var(--accent); font-weight: 600; background: var(--royal-50); padding: 0.25em 0.7em; border-radius: var(--pill); }
.post__title { font-size: 1.1rem; font-weight: 600; color: var(--fg-title); line-height: 1.66; text-wrap: balance; }
.post__dek { font-size: 0.93rem; color: var(--fg-muted); line-height: 1.75; }

/* ---------- 18. Article ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--t-h3); font-weight: 700; color: var(--fg-title); margin-block: clamp(2rem, 3.6vw, 2.9rem) 0.8rem; line-height: 1.5; }
.prose h2:first-child { margin-block-start: 0; }
.prose p { margin-block-end: 1.1em; color: var(--fg); }
.prose p:last-child { margin-block-end: 0; }

.toc { position: sticky; inset-block-start: 6.5rem; display: none; }
@media (min-width: 1060px) { .toc { display: block; } }
.toc__k { font-size: var(--t-micro); font-weight: 700; color: var(--fg-muted); margin-block-end: 0.85rem; }
.toc a {
  display: block; padding: 0.5rem 0.9rem; font-size: 0.88rem; color: var(--fg-muted);
  border-radius: var(--r-sm); transition: color 0.25s, background-color 0.25s;
}
.toc a:hover, .toc a.is-active { color: var(--accent); background: var(--royal-50); font-weight: 600; }

.keypoints { background: var(--royal-50); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.35rem, 2.6vw, 2rem); display: grid; gap: 1rem; }

/* ---------- 19. Forms ---------- */
.field { display: grid; gap: 0.45rem; }
.field__k { font-size: var(--t-small); font-weight: 600; color: var(--fg-strong); display: flex; gap: 0.5rem; align-items: baseline; }
.field__k em { font-style: normal; font-size: var(--t-micro); color: var(--fg-muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.85em 1.05em;
  background: var(--field); border: 1.5px solid var(--line); border-radius: var(--r-md);
  color: var(--fg-strong); transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  font-size: 0.98rem;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px var(--royal-50);
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-muted); }

.opts { display: grid; gap: 0.65rem; }
@media (min-width: 640px) { .opts--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .opts--3 { grid-template-columns: repeat(3, 1fr); } }
.opt {
  display: grid; gap: 0.25rem; align-content: start;
  padding: 1rem 1.2rem; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); text-align: start;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.opt:hover { border-color: var(--royal-200); transform: translateY(-2px); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--royal-50); box-shadow: 0 0 0 3px var(--royal-50); }
.opt__t { font-weight: 600; color: var(--fg-strong); font-size: 0.97rem; }
.opt__n { font-size: var(--t-small); color: var(--fg-muted); line-height: 1.6; }

.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; cursor: pointer; font-size: 0.9rem; color: var(--fg-muted); }
.check input {
  appearance: none; width: 1.25rem; height: 1.25rem; border: 1.5px solid var(--line);
  border-radius: 5px; margin-block-start: 0.15em; flex: none; position: relative;
  transition: background-color 0.2s, border-color 0.2s; background: var(--surface);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; position: absolute; inset: 0; background: var(--on-accent); clip-path: polygon(14% 46%, 38% 70%, 86% 20%, 94% 30%, 38% 88%, 6% 56%); }

.drop {
  border: 2px dashed var(--line); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3.5vw, 2.75rem); text-align: center;
  display: grid; gap: 0.6rem; justify-items: center; cursor: pointer;
  background: var(--field); transition: border-color 0.2s, background-color 0.2s;
}
.drop:hover, .drop[data-over="true"] { border-color: var(--accent); background: var(--royal-50); }
.drop svg { width: 1.7rem; height: 1.7rem; color: var(--accent); }
.filelist { display: grid; gap: 0.5rem; margin-block-start: 0.9rem; }
.filelist li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center;
  font-size: var(--t-small); background: var(--field); border-radius: var(--r-sm); padding: 0.6rem 0.85rem;
}
.filelist button { color: var(--fg-muted); font-size: 1.1rem; line-height: 1; }
.filelist button:hover { color: #C0392B; }

.steps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-block-end: clamp(1.75rem, 3.5vw, 2.75rem); }
.steps__i {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: var(--t-small); font-weight: 500; color: var(--fg-muted);
  padding: 0.4rem 0.9rem; border-radius: var(--pill); background: var(--field);
  transition: color 0.25s, background-color 0.25s;
}
.steps__i[data-state="active"] { color: var(--on-accent); background: var(--accent); }
.steps__i[data-state="done"] { color: var(--accent); background: var(--royal-50); }

.panel { display: grid; gap: clamp(1.1rem, 2.2vw, 1.75rem); }
.js .panel { display: none; }
.js .panel[data-active="true"] { display: grid; animation: paneIn 0.4s var(--ease-out); }
@keyframes paneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.navrow { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center; border-block-start: 1px solid var(--line); padding-block-start: 1.35rem; }

.wizard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.35rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm); }
.summary { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.summary__r { display: grid; gap: 0.1rem 1.25rem; padding: 0.85rem clamp(1rem, 2vw, 1.4rem); border-block-end: 1px solid var(--line-soft); }
@media (min-width: 620px) { .summary__r { grid-template-columns: 11rem 1fr; } }
.summary__r:last-child { border-block-end: 0; }
.summary__k { font-size: var(--t-small); color: var(--fg-muted); }
.summary__v { color: var(--fg-strong); font-size: 0.95rem; white-space: pre-wrap; font-weight: 500; }

/* ---------- 20. Contact ---------- */
.chans { display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .chans { grid-template-columns: repeat(2, 1fr); } }
.chan {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem 1.35rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.chan:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--royal-200); }
.chan__ico { width: 2.75rem; height: 2.75rem; border-radius: var(--r-md); background: var(--royal-50); color: var(--accent); display: grid; place-items: center; flex: none; }
.chan__ico svg { width: 1.25rem; height: 1.25rem; }
/* the middle cell stacks three lines — they must be block-level, not inline spans */
.chan > span:nth-child(2) { display: grid; gap: 0.15rem; min-width: 0; }
.chan__t { display: block; font-weight: 600; color: var(--fg-strong); }
.chan__v { display: block; font-size: var(--t-small); color: var(--accent); font-weight: 600; }
.chan__n { display: block; font-size: var(--t-small); color: var(--fg-muted); line-height: 1.6; }
.chan > svg { width: 1.05rem; height: 1.05rem; color: var(--accent); flex: none; }
html[dir="rtl"] .chan > svg { transform: scaleX(-1); }

/* ---------- الفروع ---------- */
.branches { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); margin-block-start: 1.5rem; }
.branch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  display: grid;
  gap: 1rem;
  justify-items: start;
}
.branch__head { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.branch__pin {
  width: 2.6rem; height: 2.6rem; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--royal-50); color: var(--accent);
}
.branch__pin svg { width: 1.2rem; height: 1.2rem; }
.branch__name { font-family: var(--font-display); font-size: var(--t-h4); font-weight: 700; color: var(--fg-title); line-height: 1.5; }
.branch__addr { font-size: 0.93rem; color: var(--fg-muted); margin-block-start: 0.2rem; line-height: 1.7; }
.branch__map {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--mist-2);
}
.branch__map iframe { width: 100%; height: 100%; display: block; }
/* الخرائط تُصدَّر بألوان فاتحة — نلطّفها قليلاً في المظهر الداكن */
:root[data-theme="dark"] .branch__map iframe { filter: invert(0.92) hue-rotate(180deg) saturate(0.8); }

.mapframe { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); position: relative; aspect-ratio: 16 / 11; background: var(--mist-2); display: grid; place-items: center; }
.mapframe .mapart { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--royal-200); }
.mapframe__pin { position: relative; z-index: 2; display: grid; justify-items: center; gap: 0.6rem; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.35rem 1.75rem; box-shadow: var(--shadow); }
.mapframe__pin svg { width: 1.5rem; height: 1.5rem; color: var(--accent); }

.hours { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.hours__r { display: flex; justify-content: space-between; gap: 1.25rem; padding: 0.9rem 1.25rem; border-block-end: 1px solid var(--line-soft); font-size: 0.94rem; }
.hours__r:last-child { border-block-end: 0; }
.hours__r span:first-child { font-weight: 500; color: var(--fg-strong); }
.hours__r span:last-child { color: var(--fg-muted); }

/* ---------- 21. Page head ---------- */
.pagehead { background: var(--mist); border-block-end: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(2.5rem, 5vw, 4rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: var(--t-small); color: var(--fg-muted); margin-block-end: 1.35rem; }
.crumbs a:hover { color: var(--accent); }
.crumbs li { display: flex; align-items: center; }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 0.4rem; opacity: 0.45; }

/* ---------- 22. CTA band ---------- */
.band { position: relative; overflow: hidden; background: var(--royal); color: #fff; }
.band__media { position: absolute; inset: 0; opacity: 0.2; }
.band__media img { width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 31, 82, 0.9), rgba(36, 53, 126, 0.72)); }
.band__inner { position: relative; z-index: 2; padding-block: clamp(3rem, 6vw, 5.5rem); display: grid; gap: 1.5rem; }
@media (min-width: 940px) { .band__inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 4.5vw, 4.5rem); } }
.band h2 { color: #fff; }
.band__eyebrow { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.26); color: #fff; }
.band__acts { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- 23. Footer ---------- */
.ftr { background: var(--royal-900); color: rgba(255, 255, 255, 0.72); }

/* — Top: Brand + Navigation Columns — */
/* الفاصل الشعري يكفي للفصل — الحشو السفلي الكبير كان يترك فراغاً ميتاً */
.ftr__top { display: grid; gap: clamp(2rem, 4vw, 3.25rem); padding-block: clamp(2.75rem, 5vw, 4.25rem) clamp(2rem, 3.5vw, 3rem); align-items: start; }
@media (min-width: 900px) { .ftr__top { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 0.7fr)); } }

.ftr__brandcol { display: flex; flex-direction: column; gap: 1.25rem; }
.ftr__brand { display: inline-block; }
.ftr__blurb { font-size: 0.92rem; line-height: 1.75; color: rgba(255, 255, 255, 0.6); max-width: 36ch; }

.ftr__col { display: grid; gap: 0.7rem; align-content: start; }
.ftr__k { font-size: var(--t-micro); font-weight: 700; color: rgba(255, 255, 255, 0.5); margin-block-end: 0.3rem; }
/* التباعد والحروف الكبيرة للاتيني فقط — في العربية يفصل التباعدُ الحروفَ المتصلة */
html[dir="ltr"] .ftr__k { letter-spacing: 0.05em; text-transform: uppercase; }
html[dir="rtl"] .ftr__k { font-size: 0.82rem; }
.ftr__col a { font-size: 0.92rem; color: rgba(255, 255, 255, 0.74); width: fit-content; transition: color 0.25s; }
.ftr__col a:hover { color: #fff; }

/* — Reach: Branches + Direct Contact — */
.ftr__reach {
  border-block-start: 1px solid rgba(255, 255, 255, 0.10);
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  display: grid; gap: clamp(1.5rem, 3vw, 2.25rem);
}
@media (min-width: 760px) { .ftr__reach { grid-template-columns: repeat(3, 1fr); } }

/* البطاقة نفسها المستعملة في بقية الموقع، بنسخة داكنة — الكتل الثلاث
   تصبح وحدات متساوية بدل نصوص سائبة متفاوتة الوزن */
.ftr__place {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: clamp(1.1rem, 2vw, 1.5rem);
}
.ftr__place .ftr__k { color: rgba(255, 255, 255, 0.95); font-size: 0.95rem; font-family: var(--font-display); margin-block-end: 0.15rem; }
html[dir="ltr"] .ftr__place .ftr__k { text-transform: none; letter-spacing: 0; }
/* يدفع رابط الخريطة إلى أسفل البطاقة فتتحاذى الروابط رغم اختلاف أطوال العناوين */
.ftr__place > :last-child { margin-block-start: auto; padding-block-start: 0.35rem; }
.ftr__addr { font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); line-height: 1.6; }
.ftr__maplink {
  display: inline-flex; align-items: center; gap: 0.35rem; width: fit-content;
  font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); transition: color 0.25s;
}
.ftr__maplink:hover { color: #fff; }
.ftr__maplink svg { width: 0.9em; height: 0.9em; flex-shrink: 0; }

.ftr__tel {
  display: inline-flex; align-items: center; gap: 0.45rem; width: fit-content;
  font-size: 1.1rem; font-weight: 600; color: rgba(255, 255, 255, 0.9); letter-spacing: 0.02em;
  transition: color 0.25s;
}
.ftr__tel:hover { color: #fff; }
.ftr__tel svg { width: 1em; height: 1em; flex-shrink: 0; opacity: 0.7; }

/* width: fit-content يجمع الأرقام البديلة تحت الرقم الرئيسي
   بدل أن تتمدد على عرض العمود فتبدو مبعثرة */
.ftr__alt { font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); display: flex; flex-wrap: wrap; gap: 0.3rem 0.55rem; align-items: center; width: fit-content; }
.ftr__altk { font-size: var(--t-micro); color: rgba(255, 255, 255, 0.35); }
.ftr__alt a { color: rgba(255, 255, 255, 0.55); transition: color 0.25s; }
.ftr__alt a:hover { color: #fff; }
.ftr__alt i { color: rgba(255, 255, 255, 0.25); font-style: normal; }

.ftr__mail {
  display: inline-flex; align-items: center; gap: 0.4rem; width: fit-content;
  font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); transition: color 0.25s; margin-block-start: 0.15rem;
}
.ftr__mail:hover { color: #fff; }
.ftr__mail svg { width: 0.95em; height: 0.95em; flex-shrink: 0; opacity: 0.6; }

/* — Chips in footer — */
.ftr .chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.85); }
.ftr .chip:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); color: #fff; }

/* — Mid: Legal note + Registry — */
.ftr__mid { border-block-start: 1px solid rgba(255, 255, 255, 0.10); padding-block: 1.5rem; display: grid; gap: 0.85rem; }
@media (min-width: 900px) { .ftr__mid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; } }
.ftr__legal { font-size: var(--t-small); color: rgba(255, 255, 255, 0.45); line-height: 1.75; max-width: 68ch; }
.ftr__reg { font-size: var(--t-small); color: rgba(255, 255, 255, 0.45); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.ftr__reg b { color: rgba(255, 255, 255, 0.7); font-weight: 600; letter-spacing: 0.03em; }

/* — Bottom bar: Copyright + Policies — */
.ftr__bot {
  border-block-start: 1px solid rgba(255, 255, 255, 0.10); padding-block: 1.35rem 1.85rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: center; justify-content: space-between;
  font-size: var(--t-small); color: rgba(255, 255, 255, 0.4);
}
.ftr__pol { display: flex; gap: 1.35rem; }
.ftr__pol a { color: rgba(255, 255, 255, 0.45); transition: color 0.25s; }
.ftr__pol a:hover { color: #fff; }

/* ---------- 24. Assistant ---------- */
/* الأزرار العائمة: واتساب فوق المساعد القانوني — بارتفاع واحد */
.fabs {
  --fab-h: 3.25rem;
  position: fixed;
  inset-block-end: clamp(1rem, 2.5vw, 1.75rem);
  inset-inline-end: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 880;
  display: grid;
  gap: 0.65rem;
  justify-items: end;
}

/* هيكل واحد للزرين: دائرة بنفس المقاس، تتمدد عند التحويم لتكشف عنوانها.
   نفس نصف القطر والظل ومنحنى الحركة المستخدم في بطاقات الموقع وأزراره. */
.fab {
  height: var(--fab-h);
  min-width: var(--fab-h);
  display: inline-flex;
  align-items: center;
  border-radius: var(--pill);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
              padding-inline-end 0.3s var(--ease-out), background-color 0.25s var(--ease);
}
.fab__ico { width: var(--fab-h); height: var(--fab-h); display: grid; place-items: center; flex: none; }
.fab__ico svg { width: 1.45rem; height: 1.45rem; }
.fab__label {
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 0.35s var(--ease-out), opacity 0.25s var(--ease-out);
}
.fab:hover, .fab:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lg); padding-inline-end: 1.15rem; }
.fab:hover .fab__label, .fab:focus-visible .fab__label { max-width: 12rem; opacity: 1; }

.fab--wa { background: #25D366; }
.fab--wa:hover, .fab--wa:focus-visible { background: #1FBE5B; }
.fab--call { background: var(--accent); }
.fab--call:hover, .fab--call:focus-visible { background: var(--accent-2); }

/* نبضة واحدة خفيفة على زر الاتصال — إشارة واحدة تكفي، إشارتان ضجيج */
.fab--call::after {
  content: "";
  position: absolute; inset: -1.5px;
  border-radius: var(--pill);
  border: 2px solid var(--accent);
  animation: fabPing 3.2s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes fabPing {
  0%   { transform: scale(1); opacity: 0.55; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fab--call::after { animation: none; opacity: 0; } }
/* على اللمس لا يوجد تحويم — أبقِ الدائرة نظيفة */
@media (hover: none) { .fab__label { display: none; } }

.fabs[data-hidden="true"] { opacity: 0; pointer-events: none; transform: translateY(12px); }
.fabs { transition: opacity 0.25s, transform 0.25s var(--ease-out); }

.icon-btn--wa { display: none; color: #128C7E; border-color: #BFE7D3; background: #EAFBF1; }
.icon-btn--wa:hover, .icon-btn--wa:focus-visible { color: #fff; background: #25D366; border-color: #25D366; }
:root[data-theme="dark"] .icon-btn--wa { color: #4BE08C; background: rgba(37, 211, 102, 0.12); border-color: rgba(37, 211, 102, 0.35); }
@media (min-width: 560px) { .icon-btn--wa { display: grid; } }

.asst-scrim { position: fixed; inset: 0; z-index: 960; background: var(--overlay); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.asst-scrim[data-open="true"] { opacity: 1; visibility: visible; }

.asst {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 970;
  width: min(30rem, 100vw); background: var(--bg);
  display: grid; grid-template-rows: auto 1fr auto;
  transform: translateX(101%); transition: transform 0.45s var(--ease-out); visibility: hidden;
  box-shadow: var(--shadow-lg);
}
html[dir="rtl"] .asst { transform: translateX(-101%); }
.asst[data-open="true"] { transform: none; visibility: visible; }
.asst__head { padding: 1.1rem clamp(1rem, 2.5vw, 1.5rem); border-block-end: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center; background: var(--mist); }
.asst__head > span:first-child { width: 2.5rem; height: 2.5rem; border-radius: var(--pill); background: var(--accent); color: #fff; display: grid; place-items: center; }
.asst__head > span:first-child svg { width: 1.2rem; height: 1.2rem; }
.asst__title { font-weight: 700; color: var(--fg-title); font-size: 1.02rem; }
.asst__sub { font-size: var(--t-micro); color: var(--fg-muted); }
.asst__log { overflow-y: auto; padding: 1.15rem clamp(1rem, 2.5vw, 1.5rem); display: grid; gap: 0.85rem; align-content: start; }
.asst__foot { border-block-start: 1px solid var(--line); padding: 0.85rem clamp(1rem, 2.5vw, 1.5rem) 1.1rem; display: grid; gap: 0.55rem; background: var(--surface); }

.msg { display: grid; gap: 0.4rem; max-width: 94%; font-size: 0.92rem; line-height: 1.7; animation: msgIn 0.35s var(--ease-out); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg--bot { justify-self: start; }
.msg--user { justify-self: end; }
.msg__b { padding: 0.8rem 1.05rem; border-radius: var(--r-lg); background: var(--mist); color: var(--fg); }
.msg--bot .msg__b { border-start-start-radius: 6px; }
.msg--user .msg__b { background: var(--accent); color: #fff; border-end-end-radius: 6px; }
.msg__k { font-size: var(--t-micro); font-weight: 700; color: var(--accent); }
.msg--user .msg__k { color: #fff; }
.msg ul { display: grid; gap: 0.35rem; margin-block-start: 0.45rem; }
.msg ul li { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem; align-items: start; font-size: 0.88rem; color: var(--fg-muted); }
.msg ul li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-block-start: 0.6em; }
.msg__sec + .msg__sec { margin-block-start: 0.8rem; }

.asst__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.asst__chip {
  font-size: 0.82rem; padding: 0.45em 0.95em; border-radius: var(--pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-align: start;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.asst__chip:hover { color: var(--accent); border-color: var(--accent); background: var(--royal-50); }
.asst__form { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
.asst__input { padding: 0.75em 1em; background: var(--field); border: 1.5px solid var(--line); border-radius: var(--pill); font-size: 0.92rem; }
.asst__input:focus { outline: none; border-color: var(--accent); }
.asst__send { width: 2.85rem; height: 2.85rem; display: grid; place-items: center; border-radius: var(--pill); background: var(--accent); color: #fff; transition: background-color 0.2s; }
.asst__send:hover { background: var(--accent-2); }
.asst__send svg { width: 1.05rem; height: 1.05rem; }
html[dir="rtl"] .asst__send svg { transform: scaleX(-1); }
.asst__note { font-size: var(--t-micro); color: var(--fg-muted); line-height: 1.6; }
.asst__acts { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-block-start: 0.8rem; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 0.85rem 1.05rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: dot 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- 24b. CEO address ---------- */
.ceo { position: relative; overflow: hidden; }
.ceo__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* المشغّل يأخذ عرضاً صريحاً: أبعاده تأتي من aspect-ratio، ولو تُرك بلا عرض
   في سياق لا يمدّده لانكمش إلى الصفر. */
.ceo__grid .vplayer { width: min(20rem, 100%); }
@media (min-width: 900px) { .ceo__grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr); } }

/* الفيديو رأسي 9:16 — نؤطّره كشاشة جهاز بدل تمديده قسراً */
.vplayer {
  position: relative;
  aspect-ratio: 9 / 16;
  max-width: 20rem;
  margin-inline: auto;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--royal-900);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.vplayer video, .vplayer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vplayer__full { z-index: 3; background: #000; }
.vplayer[data-playing="true"] .vplayer__teaser,
.vplayer[data-playing="true"] .vplayer__veil,
.vplayer[data-playing="true"] .vplayer__play,
.vplayer[data-playing="true"] .vplayer__meta { opacity: 0; pointer-events: none; }
.vplayer__veil {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(10, 16, 48, 0.86) 0%, rgba(10, 16, 48, 0.15) 45%, rgba(10, 16, 48, 0.35) 100%);
  transition: opacity 0.4s var(--ease);
}
.vplayer__play {
  position: absolute; z-index: 4;
  inset-block-end: 1.15rem; inset-inline: 1.15rem;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--royal);
  border-radius: var(--pill);
  font-weight: 600; font-size: 0.92rem;
  backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease-out), background-color 0.25s, opacity 0.3s;
}
.vplayer__play:hover { transform: translateY(-2px); background: #fff; }
.vplayer__play svg { width: 1.05rem; height: 1.05rem; }
.vplayer__meta {
  position: absolute; z-index: 4;
  inset-block-start: 1.15rem; inset-inline-start: 1.15rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4em 0.85em;
  background: rgba(10, 16, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff; border-radius: var(--pill);
  font-size: var(--t-micro); font-weight: 500;
  backdrop-filter: blur(6px);
  transition: opacity 0.3s var(--ease);
}

/* علامة اقتباس ذهبية كبيرة خلف النص */
.ceo__quote-mark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: 0.7;
  color: var(--gold-soft);
  opacity: 0.5;
  display: block;
  margin-block-end: 0.35rem;
}
.ceo__quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.55rem);
  line-height: 1.75;
  color: #fff;
  font-weight: 500;
}
.ceo__by { display: flex; align-items: center; gap: 0.9rem; margin-block-start: 1.75rem; }
.ceo__by img { width: 3.4rem; height: 3.4rem; border-radius: var(--pill); object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.3); flex: none; }
.ceo__by-name { font-weight: 700; color: #fff; font-family: var(--font-display); }
.ceo__by-role { font-size: var(--t-small); color: var(--gold-soft); margin-block-start: 0.15rem; }

/* ---------- 25. Entrance & reveal (progressive enhancement) ---------- */
/* Above-the-fold entrance: time-based, never gated on an observer. */
.js [data-in] { animation: riseIn 0.75s var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js [data-in] { animation: none; } }

.js [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- 25b. لوحة المتابعة ---------- */
.dash__topacts { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.dash__charts { margin-block-end: clamp(1.25rem, 2.5vw, 2rem); }
@media (min-width: 900px) { .dash__charts { grid-template-columns: 1.15fr 1fr; } }
.dash__chart { margin-block-start: 0.75rem; }
.dash__chart svg { display: block; height: auto; }

.dash__tablecard { padding: 0; overflow: hidden; }
.dash__toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 2vw, 1.4rem); border-block-end: 1px solid var(--line); }
.dash__search {
  padding: 0.6em 1em; background: var(--field); border: 1.5px solid var(--line);
  border-radius: var(--pill); font-size: 0.92rem; min-width: min(16rem, 100%);
}
.dash__search:focus { outline: none; border-color: var(--accent); }
.dash__scroll { overflow-x: auto; }
.dash__table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 720px; }
.dash__table th {
  text-align: start; font-size: var(--t-micro); font-weight: 700; color: var(--fg-muted);
  padding: 0.7rem clamp(0.6rem, 1.4vw, 1.1rem); border-block-end: 1px solid var(--line); background: var(--field);
  white-space: nowrap;
}
.dash__table td { padding: 0.7rem clamp(0.6rem, 1.4vw, 1.1rem); border-block-end: 1px solid var(--line-soft); vertical-align: middle; }
.dash__table tr:last-child td { border-block-end: 0; }
.dash__table tr.is-urgent td:first-child { box-shadow: inset 4px 0 0 #C0392B; }
html[dir="rtl"] .dash__table tr.is-urgent td:first-child { box-shadow: inset -4px 0 0 #C0392B; }
.t-urgent { color: #C0392B; font-weight: 600; }

/* شريط الحالات: العدّ والتصفية في عنصر واحد */
.dash__tabs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem;
  margin-block-end: 1rem;
}
@media (max-width: 760px) { .dash__tabs { grid-template-columns: repeat(2, 1fr); } .dash__tabs .dash__tab:first-child { grid-column: 1 / -1; } }
.dash__tab {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 0.85rem 1rem; display: grid; gap: 0.1rem; justify-items: center; text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.dash__tab b { font-size: 1.5rem; font-weight: 700; color: var(--fg-title); font-variant-numeric: tabular-nums; font-family: var(--font-lat); line-height: 1.2; }
.dash__tab span { font-size: 0.82rem; font-weight: 600; color: var(--fg-muted); }
.dash__tab:hover { border-color: var(--royal-200); transform: translateY(-2px); }
.dash__tab[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--royal-50); }
.dash__tab[aria-selected="true"] span { color: var(--accent); }
.dash__tab--new b { color: #9A5B00; }
.dash__tab--contacted b { color: var(--accent); }
.dash__tab--scheduled b { color: #1B7A3D; }
.dash__tab--closed b { color: var(--fg-muted); }

.dash__urgentline {
  background: #FDECEA; border: 1px solid #F2C4BE; color: #8E2A20;
  border-radius: var(--r-md); padding: 0.65rem 1.1rem; font-size: 0.9rem; font-weight: 500;
  margin-block-end: 1rem;
}

/* خلية العميل المجمّعة */
.dash__name { font-weight: 700; color: var(--fg-strong); font-size: 0.98rem; }
.dash__urgentbadge {
  display: inline-block; margin-inline-start: 0.5rem;
  background: #C0392B; color: #fff; font-size: 0.68rem; font-weight: 700;
  padding: 0.15em 0.6em; border-radius: var(--pill); vertical-align: middle;
}
.dash__phone { font-size: 0.85rem; color: var(--fg-muted); margin-block-start: 0.1rem; }
.dash__notes { font-size: 0.83rem; color: var(--fg-muted); margin-block-start: 0.25rem; max-width: 34ch; line-height: 1.55; }
.dash__date { white-space: nowrap; color: var(--fg-muted); }

/* الحالة كقائمة منسدلة ملوّنة */
.dash__statussel {
  width: 100%; padding: 0.45em 0.8em; border-radius: var(--r-md);
  border: 1.5px solid var(--line); font-size: 0.86rem; font-weight: 600; cursor: pointer;
  background: var(--surface); appearance: auto;
}
.dash__statussel.s-new       { background: #FFF3E4; color: #9A5B00; border-color: #F3D9B0; }
.dash__statussel.s-contacted { background: var(--royal-50); color: var(--accent); border-color: var(--royal-100); }
.dash__statussel.s-scheduled { background: #E7F6EC; color: #1B7A3D; border-color: #BFE7CD; }
.dash__statussel.s-closed    { background: var(--field); color: var(--fg-muted); }

/* أزرار التواصل والحذف */
.dash__acts { white-space: nowrap; }
.dash__wa {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border-radius: var(--pill); background: #EAFBF1; color: #1B9E4B; vertical-align: middle;
  transition: background-color 0.2s, color 0.2s;
}
.dash__wa:hover { background: #25D366; color: #fff; }
.dash__wa svg { width: 1.15rem; height: 1.15rem; }
.dash__del {
  font-size: 0.78rem; color: var(--fg-muted); padding: 0.3rem 0.55rem; border-radius: var(--r-sm);
  margin-inline-start: 0.35rem; vertical-align: middle;
}
.dash__del:hover { color: #fff; background: #C0392B; }

/* صندوق الإحصاءات المطوي */
.dash__statsbox { padding: 0; overflow: hidden; margin-block-start: 1rem; }
.dash__statsbox > summary {
  list-style: none; cursor: pointer; padding: 0.95rem 1.35rem;
  font-weight: 700; color: var(--accent); font-family: var(--font-display); user-select: none;
  display: flex; align-items: center; gap: 0.6rem;
}
.dash__statsbox > summary::-webkit-details-marker { display: none; }
.dash__statsbox > summary::before { content: "▾"; font-size: 0.8em; color: var(--fg-muted); transition: rotate 0.2s; }
.dash__statsbox:not([open]) > summary::before { rotate: -90deg; }
.dash__statsbox[open] > summary { border-block-end: 1px solid var(--line-soft); }
.dash__statsbox .dash__charts { padding: 1.25rem 1.35rem; margin: 0; }

.dash__dialog { border: 0; border-radius: var(--r-xl); padding: 0; width: min(38rem, calc(100vw - 2rem)); box-shadow: var(--shadow-lg); }
.dash__dialog::backdrop { background: rgba(18, 21, 31, 0.45); backdrop-filter: blur(3px); }
.dash__form { padding: clamp(1.35rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
.dash__dialog--wide { width: min(58rem, calc(100vw - 2rem)); }
.dash__formerr {
  color: #C0392B; background: #FDECEA; border: 1px solid #F5C6C0;
  border-radius: var(--r-md); padding: 0.7rem 0.9rem; font-size: var(--t-small); line-height: 1.6;
}

/* ---------- 24b. نموذج الحجز: نتيجة الإرسال وحقل الفخّ ---------- */
.wizard__sent {
  border-radius: var(--r-md); padding: 0.85rem 1rem; font-size: 0.92rem; line-height: 1.75;
  background: #E7F6EC; border: 1px solid #BFE7CD; color: #14602F;
}
.wizard__sent--err { background: #FDECEA; border-color: #F5C6C0; color: #C0392B; }
:root[data-theme="dark"] .wizard__sent { background: rgba(27, 122, 61, 0.14); border-color: rgba(27, 122, 61, 0.4); color: #6FD394; }
:root[data-theme="dark"] .wizard__sent--err { background: rgba(192, 57, 43, 0.14); border-color: rgba(192, 57, 43, 0.4); color: #F1948A; }

/* حقل الفخّ: خارج التدفّق البصري وخارج شجرة الوصول، لا display:none —
   بعض المرسلات الآلية تتخطى الحقول المخفية بـ display صراحةً. */
.hp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 25a. لوحة الإدارة: الهيكل والشريط الجانبي ---------- */
.dashapp { display: grid; grid-template-columns: 15.5rem 1fr; min-height: 100vh; background: var(--mist); }
@media (max-width: 900px) { .dashapp { grid-template-columns: 1fr; } }

.dside {
  background: var(--bg); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.25rem 1rem; position: sticky; inset-block-start: 0; height: 100vh;
}
@media (max-width: 900px) {
  .dside {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 70;
    width: 15.5rem; translate: var(--off, 100%) 0; transition: translate 0.2s;
    box-shadow: var(--shadow-lg);
  }
  html[dir="rtl"] .dside { --off: 100%; }
  html[dir="ltr"] .dside { --off: -100%; }
  .dside.is-open { translate: 0 0; }
}
.dside__brand { display: flex; align-items: center; gap: 0.6rem; padding-inline: 0.4rem; }
.dside__mark { width: 2.1rem; height: auto; }
.dside__names { display: grid; line-height: 1.3; }
.dside__names b { font-size: 0.92rem; color: var(--fg-title); }
.dside__names i { font-size: 0.72rem; color: var(--fg-muted); font-style: normal; }

.dside__nav { display: grid; gap: 0.2rem; }
.dnav {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.68em 0.8em; border: 0; border-radius: var(--r-md); background: none;
  font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--fg);
  cursor: pointer; text-align: start;
}
.dnav:hover { background: var(--mist); }
.dnav.is-active { background: var(--royal-50); color: var(--accent); font-weight: 600; }
.dnav__i { width: 1.15rem; height: 1.15rem; flex: none; opacity: 0.85; }
.dnav.is-active .dnav__i { opacity: 1; }

.dside__foot { margin-block-start: auto; display: grid; gap: 0.35rem; padding-inline: 0.4rem; }
.dside__site { font-size: 0.82rem; color: var(--fg-muted); text-decoration: none; }
.dside__site:hover { color: var(--accent); }
.dside__build {
  font-size: 0.68rem; color: var(--fg-muted); opacity: 0.7;
  font-variant-numeric: tabular-nums; cursor: help;
}

.dmain { display: flex; flex-direction: column; min-width: 0; }
.dtop {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem); background: var(--bg);
  border-block-end: 1px solid var(--line); min-height: 3.9rem;
}
.dtop__acts { display: flex; align-items: center; gap: 0.6rem; margin-inline-start: auto; }
.dtop__burger {
  display: none; flex-direction: column; gap: 4px; padding: 0.5rem;
  background: none; border: 0; cursor: pointer;
}
.dtop__burger span { display: block; width: 20px; height: 2px; background: var(--fg); border-radius: 2px; }
@media (max-width: 900px) { .dtop__burger { display: flex; } }

.dview { flex: 1; }
.dwrap { padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 4rem; max-width: 82rem; margin-inline: auto; }

.ovhead { margin-block-end: 1.5rem; }
.ovhead--row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.ovhead__t { font-size: clamp(1.3rem, 2.5vw, 1.65rem); color: var(--fg-title); }
.ovhead__s { font-size: 0.92rem; color: var(--fg-muted); line-height: 1.75; margin-block-start: 0.35rem; max-width: 60ch; }

/* زر معطّل يجب أن يبدو معطّلاً: بلا هذا كان زر «نشر التعديلات» وأزرار
   الحفظ تبدو قابلة للضغط بينما لا تفعل شيئاً — وعد بصري كاذب. */
.btn:disabled,
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover,
.btn[disabled]:hover { transform: none; }

/* ---------- 25a2. النظرة العامة ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.9rem; margin-block-end: 1.5rem; }
.kpi {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem 1rem; display: grid; gap: 0.15rem; cursor: pointer; text-align: start;
  transition: transform 0.15s, border-color 0.15s;
}
.kpi:hover { border-color: var(--royal-200); transform: translateY(-2px); }
.kpi b { font-size: 1.75rem; font-weight: 700; color: var(--fg-title); font-variant-numeric: tabular-nums; font-family: var(--font-lat); line-height: 1.15; }
.kpi span { font-size: 0.82rem; font-weight: 600; color: var(--fg-muted); }
.kpi--new b { color: #9A5B00; }
.kpi--alert { border-color: #E8B4AE; background: #FDF3F2; }
.kpi--alert b { color: #C0392B; }
:root[data-theme="dark"] .kpi--alert { background: rgba(192, 57, 43, 0.12); border-color: rgba(192, 57, 43, 0.4); }
:root[data-theme="dark"] .kpi--alert b { color: #F1948A; }

.ovgrid { display: grid; gap: 1.1rem; }
@media (min-width: 950px) {
  .ovgrid { grid-template-columns: 1.35fr 1fr; align-items: start; }
  /* محرر المحتوى لا يرى بطاقة الطلبات، فيمتد العمود الباقي بدل ترك فراغ */
  .ovgrid:has(> .ovcard.hidden) { grid-template-columns: minmax(0, 34rem); }
}
.ovside { display: grid; gap: 1.1rem; }
.ovcard { padding: 1.15rem 1.25rem; display: grid; gap: 0.75rem; align-content: start; }
.ovcard__h { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ovcard__t { font-size: 1rem; color: var(--fg-title); }
.ovcard__p { font-size: 0.88rem; color: var(--fg-muted); line-height: 1.7; }
.ovcard__f { font-size: 0.8rem; color: var(--fg-muted); }
.ovcard__note { font-size: 0.76rem; color: var(--fg-muted); line-height: 1.65; border-block-start: 1px solid var(--line-soft); padding-block-start: 0.6rem; }
.ovcard__link { font-size: 0.82rem; font-weight: 600; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 0; text-align: start; }
.ovcard__link:hover { text-decoration: underline; }
.ovcard .btn { justify-self: start; }

.ovlist { display: grid; gap: 0.35rem; }
.ovrow {
  display: grid; gap: 0.15rem; padding: 0.6rem 0.7rem; border-radius: var(--r-md);
  background: none; border: 0; cursor: pointer; text-align: start; width: 100%;
}
.ovrow:hover { background: var(--mist); }
.ovrow__m { font-size: 0.9rem; font-weight: 600; color: var(--fg-strong); }
.ovrow__s { font-size: 0.78rem; color: var(--fg-muted); }
.ovrow--urgent { box-shadow: inset 3px 0 0 #C0392B; }
html[dir="rtl"] .ovrow--urgent { box-shadow: inset -3px 0 0 #C0392B; }

.pbadge { font-size: 0.72rem; font-weight: 600; padding: 0.25em 0.7em; border-radius: var(--pill); white-space: nowrap; }
.pbadge--ok { background: #E7F6EC; color: #14602F; }
.pbadge--pending { background: #FFF3E4; color: #9A5B00; }
.pbadge--off { background: var(--field); color: var(--fg-muted); }
:root[data-theme="dark"] .pbadge--ok { background: rgba(27, 122, 61, 0.18); color: #6FD394; }
:root[data-theme="dark"] .pbadge--pending { background: rgba(176, 140, 63, 0.18); color: #DFC384; }

.sysdl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; font-size: 0.85rem; margin: 0; }
.sysdl dt { color: var(--fg-muted); }
.sysval { margin: 0; font-weight: 600; }
.sysval--ok { color: #1B7A3D; }
.sysval--warn { color: #9A5B00; }
.sysval--bad { color: #C0392B; }
:root[data-theme="dark"] .sysval--ok { color: #6FD394; }
:root[data-theme="dark"] .sysval--warn { color: #DFC384; }
:root[data-theme="dark"] .sysval--bad { color: #F1948A; }

/* ---------- 25a3. محرر المحتوى ---------- */
.cwrap { display: grid; gap: 1.1rem; align-items: start; }
@media (min-width: 950px) { .cwrap { grid-template-columns: 16rem 1fr; } }

.clist { display: grid; gap: 0.25rem; align-content: start; }
.cdoc {
  display: grid; gap: 0.15rem; padding: 0.7rem 0.85rem; border-radius: var(--r-md);
  border: 1px solid transparent; background: none; cursor: pointer; text-align: start; width: 100%;
}
.cdoc:hover:not(:disabled) { background: var(--bg); border-color: var(--line); }
.cdoc.is-active { background: var(--bg); border-color: var(--royal-200); box-shadow: var(--shadow-sm); }
.cdoc:disabled { opacity: 0.5; cursor: not-allowed; }
.cdoc__t { font-size: 0.9rem; font-weight: 600; color: var(--fg-strong); }
.cdoc__h { font-size: 0.74rem; color: var(--fg-muted); }

.cpane { padding: 0; overflow: hidden; }
.cpane__h {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; justify-content: space-between;
  padding: 1.15rem clamp(1rem, 2vw, 1.35rem); border-block-end: 1px solid var(--line);
}
.cpane__t { font-size: 1.05rem; color: var(--fg-title); }
.cpane__s { font-size: 0.84rem; color: var(--fg-muted); line-height: 1.7; margin-block-start: 0.25rem; max-width: 52ch; }
.cpane__m { font-size: 0.74rem; color: var(--fg-muted); margin-block-start: 0.35rem; }
.cpane__acts { display: flex; align-items: center; gap: 0.7rem; }
.cdirty { font-size: 0.76rem; font-weight: 600; color: #9A5B00; }
:root[data-theme="dark"] .cdirty { color: #DFC384; }
.cpane__bar { padding: 0.8rem clamp(1rem, 2vw, 1.35rem); border-block-end: 1px solid var(--line-soft); }
.cpane__bar .dash__search { max-width: 100%; width: 100%; }

.ceditor { padding: clamp(0.9rem, 2vw, 1.35rem); display: grid; gap: 0.85rem; }
.ceditor:empty { display: none; }

.cfld { display: grid; gap: 0.3rem; }
.cfld__k { font-size: 0.78rem; font-weight: 600; color: var(--fg-muted); }
.cfld__i {
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--field);
  padding: 0.6em 0.8em; font: inherit; font-size: 0.9rem; color: var(--fg); width: 100%;
  line-height: 1.75; resize: vertical;
}
.cfld__i:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.cfld--bool { padding-block: 0.2rem; }
.cfld__check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; cursor: pointer; }

.cnote {
  font-size: 0.8rem; color: var(--fg-muted); line-height: 1.7; background: var(--field);
  border-inline-start: 3px solid var(--gold); border-radius: var(--r-sm); padding: 0.6rem 0.8rem;
}

.cgrp { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); overflow: hidden; }
.cgrp__s {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none;
  padding: 0.75em 0.95em; font-size: 0.9rem; font-weight: 600; color: var(--fg-title);
}
.cgrp__s::-webkit-details-marker { display: none; }
.cgrp__s::before { content: "▾"; font-size: 0.75em; color: var(--fg-muted); transition: rotate 0.2s; }
.cgrp:not([open]) > .cgrp__s::before { rotate: -90deg; }
.cgrp__n {
  font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--fg-muted);
  background: var(--field); border-radius: var(--pill); padding: 0.1em 0.55em; margin-inline-start: auto;
}
.cgrp__b { padding: 0.2rem 0.95rem 0.95rem; display: grid; gap: 0.8rem; }

.carr { display: grid; gap: 0.6rem; }
.citem { border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--field); overflow: hidden; }
.citem__h { display: flex; align-items: center; gap: 0.5rem; padding: 0.5em 0.7em; background: var(--bg); border-block-end: 1px solid var(--line-soft); }
.citem__t { font-size: 0.82rem; font-weight: 600; color: var(--fg-strong); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem__a { display: flex; gap: 0.2rem; flex: none; }
.citem__b {
  width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 0.85rem; color: var(--fg-muted);
}
.citem__b:hover { border-color: var(--royal-200); color: var(--accent); }
.citem__b:last-child:hover { border-color: #E8B4AE; color: #C0392B; }
.citem__b2 { padding: 0.7rem; display: grid; gap: 0.7rem; }
.carr__add {
  justify-self: start; font-size: 0.82rem; font-weight: 600; color: var(--accent);
  background: none; border: 1px dashed var(--royal-200); border-radius: var(--pill);
  padding: 0.4em 0.9em; cursor: pointer;
}
.carr__add:hover { background: var(--royal-50); }

/* ---------- 25a4. المحرر: لغة، حقول متقدمة، صفوف بسيطة ---------- */
.clangbar {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  padding: 0.7rem clamp(1rem, 2vw, 1.35rem); border-block-end: 1px solid var(--line-soft);
}
.clangbtn {
  border: 1px solid var(--line); background: var(--bg); border-radius: var(--pill);
  padding: 0.35em 1em; font: inherit; font-size: 0.84rem; font-weight: 600;
  color: var(--fg-muted); cursor: pointer;
}
.clangbtn[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.clangbar__h { font-size: 0.74rem; color: var(--fg-muted); margin-inline-start: auto; }
@media (max-width: 640px) { .clangbar__h { display: none; } }
.clang { display: grid; gap: 0.85rem; }

.cfld__h { font-size: 0.72rem; color: var(--fg-muted); line-height: 1.6; margin-block-start: -0.15rem; }

.cadv { border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--field); }
.cadv__s {
  cursor: pointer; list-style: none; padding: 0.5em 0.8em;
  font-size: 0.78rem; font-weight: 600; color: var(--fg-muted);
}
.cadv__s::-webkit-details-marker { display: none; }
.cadv__s::before { content: "▾"; font-size: 0.8em; margin-inline-end: 0.35rem; display: inline-block; transition: rotate 0.2s; }
.cadv:not([open]) > .cadv__s::before { rotate: -90deg; }
.cadv__b { padding: 0.2rem 0.8rem 0.8rem; display: grid; gap: 0.7rem; }

.crow { display: flex; gap: 0.4rem; align-items: center; }
.crow .cfld__i { flex: 1; }

/* ---------- 25a5. حقل الصورة ومنتقيها ---------- */
.cimg__row { display: flex; gap: 0.85rem; align-items: flex-start; flex-wrap: wrap; }
.cimg__prev {
  width: 8.5rem; aspect-ratio: 3 / 2; border-radius: var(--r-md); overflow: hidden;
  background: var(--field); border: 1px solid var(--line); flex: none;
  display: grid; place-items: center;
}
.cimg__prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cimg__prev.is-empty { font-size: 0.76rem; color: var(--fg-muted); }
.cimg__side { display: grid; gap: 0.5rem; align-content: start; min-width: 10rem; flex: 1; }
.cimg__cap { font-size: 0.8rem; color: var(--fg-muted); line-height: 1.65; }
.cimg__side .btn { justify-self: start; }

.pickgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem;
  max-height: 22rem; overflow-y: auto; padding-block: 0.25rem;
}
.pick {
  border: 2px solid var(--line); border-radius: var(--r-md); background: var(--bg);
  padding: 0; overflow: hidden; cursor: pointer; display: grid; gap: 0; text-align: start;
}
.pick:hover { border-color: var(--royal-200); }
.pick.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--royal-50); }
.pick img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--field); }
.pick__c {
  font-size: 0.72rem; color: var(--fg-muted); padding: 0.4rem 0.5rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.cupload { border: 1px dashed var(--royal-200); border-radius: var(--r-lg); background: var(--field); }
.cupload > summary {
  cursor: pointer; list-style: none; padding: 0.7em 1em;
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
}
.cupload > summary::-webkit-details-marker { display: none; }
.cupload > summary::before { content: "＋"; margin-inline-end: 0.4rem; }
.cupload__b { padding: 0.3rem 1rem 1rem; display: grid; gap: 0.85rem; }
.cupload__s { font-size: 0.82rem; color: var(--fg-muted); min-height: 1.2em; }
.cupload__s--err { color: #C0392B; }
:root[data-theme="dark"] .cupload__s--err { color: #F1948A; }

/* ---------- 25a6. قسم المقالات ---------- */
.artgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.9rem; }
.artcard {
  display: flex; gap: 0.85rem; align-items: stretch; text-align: start; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 0.7rem; transition: border-color 0.15s, transform 0.15s;
}
.artcard:hover { border-color: var(--royal-200); transform: translateY(-2px); }
.artcard__t {
  width: 6.5rem; flex: none; border-radius: var(--r-md); overflow: hidden;
  background: var(--field); display: grid; place-items: center;
  font-size: 0.7rem; color: var(--fg-muted);
}
.artcard__t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artcard__b { display: grid; gap: 0.25rem; align-content: center; min-width: 0; }
.artcard__b b {
  font-size: 0.92rem; font-weight: 600; color: var(--fg-strong); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.artcard__b i { font-size: 0.75rem; color: var(--fg-muted); font-style: normal; }
.artcard__badge {
  justify-self: start; font-size: 0.68rem; font-style: normal; font-weight: 600;
  background: #FFF3E4; color: #9A5B00; border-radius: var(--pill); padding: 0.15em 0.6em;
}
:root[data-theme="dark"] .artcard__badge { background: rgba(176, 140, 63, 0.18); color: #DFC384; }

.artform { display: grid; gap: 1.1rem; align-items: start; }
@media (min-width: 1000px) { .artform { grid-template-columns: minmax(0, 1fr) 20rem; } }
.artmain { padding: clamp(1.1rem, 2.5vw, 1.6rem); display: grid; gap: 1.1rem; }
.artside { display: grid; gap: 1.1rem; }
.artside .ovcard { gap: 0.7rem; }
.artside .field { display: grid; gap: 0.3rem; }

.artinput--title { font-size: 1.15rem; font-weight: 600; line-height: 1.6; }

.artguide {
  font-size: 0.78rem; color: var(--fg-muted); line-height: 1.75;
  background: var(--field); border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 0.55rem 0.75rem;
}
.artguide b { color: var(--fg-strong); font-weight: 600; }
.artguide code {
  font-family: var(--font-lat), monospace; font-size: 0.9em; background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.35em; direction: ltr; display: inline-block;
}

.artbody {
  min-height: 20rem; line-height: 2; font-size: 0.97rem;
  /* الكتابة الطويلة تحتاج مساحة تنفّس أكبر من حقل نموذج عادي */
  padding: 1rem 1.1rem !important;
}

/* ---------- 25b. اللوحة: حالات القائمة ---------- */
.dash__state { padding: 3rem 1rem; text-align: center; color: var(--fg-muted); display: grid; gap: 0.5rem; justify-items: center; }
.dash__state-t { font-weight: 600; color: var(--fg-strong); }
.dash__state--err .dash__state-t { color: #C0392B; }
.dash__spinner {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 2.5px solid var(--royal-100); border-block-start-color: var(--accent);
  animation: dash-spin 0.7s linear infinite;
}
@keyframes dash-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .dash__spinner { animation-duration: 2.4s; } }

/* ---------- 25c. اللوحة: شريط الأدوات والترقيم ---------- */
.dash__filtersel {
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--field);
  padding: 0.5em 0.75em; font: inherit; font-size: 0.88rem; color: var(--fg); max-width: 12rem;
}
.dash__filtersel:focus { outline: none; border-color: var(--accent); }
.dash__reset { color: var(--accent); font-weight: 600; font-size: var(--t-small); text-decoration: underline; }
.dash__pager {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 0.9rem; border-block-start: 1px solid var(--line-soft);
}
.dash__ref { color: var(--fg-muted); font-size: 0.85rem; white-space: nowrap; }
.dash__assignee { font-size: 0.88rem; white-space: nowrap; }
.dash__unassigned { color: var(--fg-muted); font-style: normal; opacity: 0.75; }
.dash__inactive { color: var(--fg-muted); }
.dash__open {
  border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg);
  padding: 0.32em 0.7em; font-size: 0.8rem; font-weight: 600; color: var(--accent); cursor: pointer;
}
.dash__open:hover { background: var(--royal-50); border-color: var(--royal-200); }

/* ---------- 25d. اللوحة: حساب المستخدم ---------- */
.dash__account { position: relative; }
.dash__accountbtn {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.5rem;
  border-radius: var(--pill); border: 1px solid transparent; cursor: pointer; background: none;
}
.dash__accountbtn:hover { background: var(--mist); border-color: var(--line); }
.dash__avatar {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.8rem; flex: none;
}
.dash__accountname { display: grid; text-align: start; line-height: 1.25; }
.dash__accountname b { font-size: 0.85rem; color: var(--fg-strong); }
.dash__accountname i { font-size: 0.72rem; color: var(--fg-muted); font-style: normal; }
@media (max-width: 640px) { .dash__accountname { display: none; } }
.dash__menu {
  position: absolute; inset-block-start: calc(100% + 0.4rem); inset-inline-end: 0; z-index: 40;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 0.35rem; min-width: 12rem; display: grid;
}
.dash__menuitem {
  text-align: start; padding: 0.6em 0.8em; border-radius: var(--r-md);
  font-size: 0.85rem; font-weight: 500; color: var(--fg); cursor: pointer; background: none; border: 0;
}
.dash__menuitem:hover { background: var(--mist); }
.dash__menuitem--danger { color: #C0392B; }
.dash__menuitem--danger:hover { background: #FDECEA; }

/* ---------- 25e. اللوحة: لوح التفاصيل ---------- */
.dash__panel {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 60;
  width: min(30rem, 100vw); background: var(--bg); border-inline-start: 1px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: dash-slide 0.22s ease-out;
}
@keyframes dash-slide { from { translate: var(--slide-from, 100%) 0; } }
html[dir="rtl"] .dash__panel { --slide-from: -100%; }
@media (prefers-reduced-motion: reduce) { .dash__panel { animation: none; } }
.dash__panel[hidden] { display: none; }
.dash__panelhead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.25rem clamp(1.1rem, 2.5vw, 1.5rem); border-block-end: 1px solid var(--line);
}
.dash__panelref { font-size: 0.78rem; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.dash__paneltitle { font-size: 1.15rem; color: var(--fg-title); margin-block-start: 0.15rem; }
.dash__panelclose {
  font-size: 1.6rem; line-height: 1; color: var(--fg-muted); background: none; border: 0;
  cursor: pointer; padding: 0 0.3rem; border-radius: var(--r-sm); flex: none;
}
.dash__panelclose:hover { color: var(--fg-strong); background: var(--mist); }
.dash__panelbody { overflow-y: auto; padding: 1.25rem clamp(1.1rem, 2.5vw, 1.5rem) 2rem; display: grid; gap: 1.15rem; }
.dash__facts { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; font-size: 0.88rem; margin: 0; }
.dash__facts dt { color: var(--fg-muted); }
.dash__facts dd { color: var(--fg-strong); margin: 0; }
.dash__factlong { grid-column: 1 / -1; line-height: 1.7; white-space: pre-wrap; }
.dash__panelfield { display: grid; gap: 0.4rem; }
.dash__panelfield select, .dash__panelfield textarea {
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--field);
  padding: 0.6em 0.8em; font: inherit; font-size: 0.9rem; color: var(--fg); width: 100%;
}
.dash__panelfield select:focus, .dash__panelfield textarea:focus { outline: none; border-color: var(--accent); }
.dash__panelfield .btn { justify-self: start; }
.dash__timelinetitle { font-size: 0.95rem; color: var(--fg-title); }
.dash__timeline { display: grid; gap: 0.85rem; list-style: none; padding: 0; margin: 0; }
.dash__event { padding-inline-start: 0.85rem; border-inline-start: 2px solid var(--line); }
.dash__event--status { border-inline-start-color: var(--accent); }
.dash__event--note { border-inline-start-color: var(--gold); }
.dash__eventhead { font-size: 0.85rem; font-weight: 600; color: var(--fg-strong); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; }
.dash__eventtime { font-size: 0.74rem; font-weight: 400; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.dash__eventnote { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.65; margin-block-start: 0.15rem; }
.dash__paneldanger { border-block-start: 1px solid var(--line-soft); padding-block-start: 1rem; }
.dash__scrim { position: fixed; inset: 0; z-index: 55; background: rgba(18, 21, 31, 0.4); backdrop-filter: blur(2px); }
body.dash-locked { overflow: hidden; }

/* ---------- 25f. اللوحة: التنبيه العابر ---------- */
.dash__toast {
  position: fixed; inset-block-end: 1.25rem; inset-inline-start: 50%; translate: -50% 0; z-index: 80;
  background: var(--royal-900); color: #fff; padding: 0.75em 1.25em;
  border-radius: var(--pill); font-size: 0.88rem; font-weight: 500;
  box-shadow: var(--shadow-lg); max-width: min(28rem, calc(100vw - 2rem)); text-align: center;
}
.dash__toast--error { background: #C0392B; }

.dash__adduser > summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--accent); }
.dash__table--users { min-width: 46rem; }

/* ---------- 25g. صفحة دخول اللوحة ---------- */
.dashlogin { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--mist); }
.dashlogin__card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(1.75rem, 4vw, 2.5rem); width: min(24rem, 100%);
  display: grid; gap: 1rem; box-shadow: var(--shadow);
}
.dashlogin__brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--fg-title); font-size: 0.95rem; }
.dashlogin__mark { width: 2.2rem; height: auto; }
.dashlogin__title { font-size: 1.15rem; color: var(--fg-title); margin-block-start: 0.35rem; }
.dashlogin__sub { font-size: var(--t-small); color: var(--fg-muted); line-height: 1.7; margin-block-end: 0.25rem; }
.dashlogin__submit { width: 100%; justify-content: center; }
.dashlogin__err {
  color: #C0392B; background: #FDECEA; border: 1px solid #F5C6C0;
  border-radius: var(--r-md); padding: 0.7rem 0.9rem; font-size: var(--t-small); line-height: 1.6;
}
.dashlogin__note { font-size: 0.78rem; color: var(--fg-muted); line-height: 1.7; border-block-start: 1px solid var(--line-soft); padding-block-start: 0.9rem; }

/* ---------- 25h. اللوحة في المظهر الداكن ----------
   بقية عناصر اللوحة مبنية على متغيّرات دلالية فتتبدّل وحدها؛
   المستثنى هنا ما استُخدم فيه لون صريح: صناديق الخطأ والتنبيه العابر. */
:root[data-theme="dark"] .dash__formerr,
:root[data-theme="dark"] .dashlogin__err {
  background: rgba(192, 57, 43, 0.14); border-color: rgba(192, 57, 43, 0.4); color: #F1948A;
}
:root[data-theme="dark"] .dash__state--err .dash__state-t { color: #F1948A; }
:root[data-theme="dark"] .dash__menuitem--danger { color: #F1948A; }
:root[data-theme="dark"] .dash__menuitem--danger:hover { background: rgba(192, 57, 43, 0.14); }
/* --royal-900 هو خلفية الصفحة في الداكن، فالتنبيه يحتاج سطحاً مرفوعاً */
:root[data-theme="dark"] .dash__toast { background: var(--surface-2); color: var(--fg-strong); border: 1px solid var(--line); }
:root[data-theme="dark"] .dash__toast--error { background: #C0392B; color: #fff; border-color: #C0392B; }
:root[data-theme="dark"] .dash__scrim { background: rgba(0, 0, 0, 0.55); }

/* ---------- 26. Misc ---------- */
.skip {
  position: absolute; inset-inline-start: 1rem; inset-block-start: -100%; z-index: 999;
  background: var(--accent); color: #fff; padding: 0.7rem 1.25rem; border-radius: var(--pill);
  font-size: 0.9rem; font-weight: 600; transition: inset-block-start 0.2s;
}
.skip:focus { inset-block-start: 1rem; }
.hidden { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

* { scrollbar-color: var(--royal-200) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--royal-200); border-radius: var(--pill); border: 3px solid var(--bg); }

@media print {
  .hdr, .asst-fab, .asst, .asst-scrim, .band, .drawer { display: none !important; }
  body { background: #fff; color: #000; }
}
