/* ============================================================
   Empowerment Jobs and Tenders — design tokens
   A registry/ledger aesthetic: procurement reference numbers,
   letterhead header, stamped status badges — drawn from the real
   conventions of tender documents (e.g. "062/SC/24") rather than
   a generic SaaS card grid.
   ============================================================ */

:root{
  --bg: #F0F4F5;
  --bg-raised: #FFFFFF;
  --bg-sunken: #E3EAEC;
  --ink: #1C2A2B;
  --ink-soft: #51615F;
  --ink-faint: #85918D;
  --line: #CBD9DC;
  --line-strong: #9DB3B8;

  --accent: #0A7A9E;
  --accent-strong: #075C78;
  --accent-soft: #E3F4F5;
  --accent-ink: #04424F;

  --highlight: #097C77;
  --highlight-soft: #D7F3F1;

  --danger: #A63A2C;
  --danger-soft: #F4E1DB;

  --ok: #2F6E3F;
  --ok-soft: #E0EEDF;

  /* Fixed "band" colors for the header/hero/footer — deliberately NOT
     redefined under prefers-color-scheme:dark below, so those bold
     brand bands stay a constant teal/cyan gradient (pulled straight from
     the logo) regardless of the visitor's OS theme (an admin-chosen
     brand_color still recolors them — see the inline override in
     includes/header.php). */
  --band-bg: #06516F;
  --band-bg-2: #12A6AE;
  --band-highlight: #6FF3E8;
  --band-highlight-soft: #BFF3EE;
  --band-ink-soft: #D9E4DF;

  --shadow-card: 0 1px 2px rgba(20, 30, 28, 0.06), 0 6px 20px -10px rgba(20, 30, 28, 0.18);
  --shadow-lift: 0 10px 30px -14px rgba(20, 30, 28, 0.35);
  --radius: 8px;
  --radius-lg: 14px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --font-display-ar: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body-ar: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #131b1a;
    --bg-raised: #1a2423;
    --bg-sunken: #0f1615;
    --ink: #E9EDE9;
    --ink-soft: #AEBBB6;
    --ink-faint: #798783;
    --line: #2b3835;
    --line-strong: #3c4a46;

    --accent: #78B5C9;
    --accent-strong: #A8C5CF;
    --accent-soft: #112A30;
    --accent-ink: #08191C;

    --highlight: #77B6B4;
    --highlight-soft: #13302D;

    --danger: #E08575;
    --danger-soft: #3a2019;

    --ok: #86C08E;
    --ok-soft: #1c2e1c;

    --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 6px 24px -10px rgba(0,0,0,0.5);
  }
}

*, *::before, *::after{ box-sizing: border-box; }
html{ text-size-adjust: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: var(--accent-strong); text-decoration: none; }
a:hover{ text-decoration: underline; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
  color: var(--ink);
}
h1{ font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.9rem); font-weight: 500; }
h2{ font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem); }
h3{ font-size: 1.2rem; }
p{ margin: 0 0 1em; color: var(--ink-soft); max-width: 68ch; }
.mono{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

.container{ max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container--narrow{ max-width: 760px; }

/* ---------------- Letterhead header ---------------- */
.letterhead{
  background: var(--band-bg);
  border-bottom: 3px solid var(--band-highlight);
}
.letterhead__bar{
  display:flex; align-items:center; justify-content:space-between;
  gap: 16px; padding: 14px 0;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand__mark{
  width: 46px; height: 46px; border-radius: var(--radius);
  background: var(--band-highlight); color: var(--band-bg);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.3);
}
.brand__text{ line-height: 1.25; }
.brand__name{ font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #fff; }
.brand__ar{ font-size: 0.82rem; color: var(--band-highlight-soft); direction: rtl; }

.nav{ display:flex; align-items:center; gap: 4px; flex-wrap: wrap; }
.nav a{
  color: var(--band-highlight-soft); font-size: 0.92rem; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius);
}
.nav a:hover{ background: rgba(255,255,255,0.1); text-decoration:none; color: #fff; }
.nav a.is-active{ color: #fff; box-shadow: inset 0 -2px 0 0 var(--band-highlight); }

.header-actions{ display:flex; align-items:center; gap:8px; }
.letterhead .btn--ghost{ border-color: rgba(255,255,255,0.4); color: #fff; }
.letterhead .btn--ghost:hover{ background: rgba(255,255,255,0.12); }
.letterhead .btn--primary{ background: var(--band-highlight); color: var(--band-bg); }
.letterhead .btn--primary:hover{ filter: brightness(1.08); background: var(--band-highlight); }
.letterhead .lang-switch{ border: 1px solid rgba(255,255,255,0.35); color: var(--band-highlight-soft); }
.letterhead .lang-switch:hover{ color: #fff; }
.nav-toggle{ display:none; background:none; border:1px solid rgba(255,255,255,0.4); color:#fff; border-radius: var(--radius); padding: 8px 10px; cursor:pointer; }

@media (max-width: 880px){
  .nav{
    display:none; width:100%; flex-direction:column; align-items:stretch;
    border-top: 1px solid rgba(255,255,255,0.2); padding-top: 8px; margin-top: 8px;
  }
  .nav.is-open{ display:flex; }
  .letterhead__bar{ flex-wrap: wrap; }
  .nav-toggle{ display:inline-flex; }
}

/* ---------------- Buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; line-height: 1;
}
.btn:hover{ text-decoration:none; }
.btn--primary{ background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px -4px rgba(16,83,78,0.5); }
.btn--primary:hover{ background: var(--accent-strong); box-shadow: 0 6px 16px -4px rgba(16,83,78,0.55); }
.btn--ghost{ background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover{ background: var(--bg-sunken); }
.btn--danger{ background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover{ background: var(--danger-soft); }
.btn--sm{ padding: 6px 12px; font-size: 0.82rem; }
.btn--block{ width:100%; }
.btn:disabled{ opacity: 0.5; cursor: not-allowed; box-shadow: none; pointer-events: none; }

/* ---------------- Hero ---------------- */
.hero{
  background: linear-gradient(135deg, var(--band-bg) 0%, var(--band-bg-2) 100%);
  border-bottom: none;
}
.hero__inner{ padding: 64px 0 56px; display:grid; gap: 40px; grid-template-columns: 1.3fr 1fr; align-items:center; }
.hero__eyebrow{
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.78rem; color: var(--band-highlight-soft); font-weight: 600; margin-bottom: 10px; display:block;
}
.hero__eyebrow.ar{
  font-family: var(--font-body); text-transform: none; letter-spacing: normal; font-size: 0.85rem;
  text-align: left;
}
.hero h1{ color: #fff; max-width: 19ch; text-wrap: balance; }
.hero p.lede{ font-size: 1.08rem; color: var(--band-ink-soft); }
.hero__stats{ display:flex; flex-direction:column; gap: 12px; }
.stat{
  display:flex; align-items:center; justify-content:space-between; gap: 14px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-inline-start: 4px solid var(--band-highlight); border-radius: var(--radius);
  padding: 14px 18px;
}
.stat__n{ font-family: var(--font-mono); font-weight:600; font-size: 1.8rem; color: var(--band-highlight); line-height:1; }
.stat__l{ font-size: 0.78rem; color: var(--band-ink-soft); text-transform: uppercase; letter-spacing: 0.04em; text-align: end; max-width: 12ch; }

.search{
  display:flex; gap:8px; margin-top: 24px; background: var(--bg-raised);
  border: none; border-radius: var(--radius-lg); padding: 8px; max-width: 560px;
  box-shadow: var(--shadow-lift);
}
.search input[type=text]{ flex:1; border:0; background:transparent; padding: 12px 14px; font-size: 0.95rem; color: var(--ink); font-family: var(--font-body); }
.search input[type=text]:focus{ outline: none; }

@media (max-width: 800px){ .hero__inner{ grid-template-columns: 1fr; } }

/* ---------------- Category tiles ---------------- */
.tiles{ display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 52px 0 8px; }
.tile{
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 20px; display:flex; flex-direction:column; gap: 10px;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover{ border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-2px); text-decoration:none; }
.tile__icon{
  width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent-soft);
  color: var(--accent-strong); display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.tile__icon svg{ width: 22px; height: 22px; display:block; }
.tile__label{ font-family: var(--font-display); font-size: 1.05rem; font-weight:600; color: var(--ink); }
.tile__count{ font-family: var(--font-mono); font-weight:600; font-size: 1.7rem; color: var(--accent-strong); }
.tile__desc{ font-size: 0.8rem; color: var(--ink-faint); line-height:1.4; }
@media (max-width: 480px){ .tiles{ grid-template-columns: 1fr; } }

/* ---------------- Section headers ---------------- */
.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap: 12px; margin: 44px 0 14px; border-bottom: 3px solid var(--highlight); padding-bottom: 12px; }
.section-head h2{ margin:0; }
.section-head .see-all{ font-family: var(--font-mono); font-size: 0.82rem; font-weight:600; }

/* ---------------- Ledger / listing rows ---------------- */
.ledger{
  border: 1px solid var(--line); background: var(--bg-raised);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lift);
}
.ledger-row{
  display:grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items:center;
  padding: 18px 20px; border-bottom: 1px solid var(--line); text-decoration:none; color: inherit;
  border-inline-start: 4px solid transparent;
}
.ledger-row:last-child{ border-bottom:none; }
.ledger-row:hover{ background: var(--bg-sunken); text-decoration:none; }
.ledger-row__ref{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }
.ledger-row__title{ font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.ledger-row__meta{ font-size: 0.82rem; color: var(--ink-faint); display:flex; gap:10px; flex-wrap:wrap; }
.ledger-row__meta span{ display:inline-flex; align-items:center; gap:4px; }
.ledger-row__right{ text-align:right; white-space:nowrap; }
.ledger-row__deadline{ font-family: var(--font-mono); font-size: 0.82rem; }
.ledger-empty{ padding: 40px 18px; text-align:center; color: var(--ink-faint); }

/* Per-category accent — a quiet color key so the eye can scan by type */
.ledger-row--jobs, .ledger-row--trainings{ border-inline-start-color: var(--accent); }
.ledger-row--bids{ border-inline-start-color: var(--highlight); }
.ledger-row--grants{ border-inline-start-color: var(--ok); }
.ledger-row--surveys{ border-inline-start-color: var(--line-strong); }

@media (max-width: 680px){
  .ledger-row{ grid-template-columns: 1fr; }
  .ledger-row__right{ text-align:left; }
}

/* ---------------- Badges ---------------- */
.badge{
  display:inline-block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; line-height: 1.4;
}
.badge--category{ background: var(--accent-soft); color: var(--accent-strong); }
.badge--pending{ background: var(--highlight-soft); color: var(--highlight); }
.badge--approved{ background: var(--ok-soft); color: var(--ok); }
.badge--rejected{ background: var(--danger-soft); color: var(--danger); }
.badge--expired{ background: var(--bg-sunken); color: var(--ink-faint); }
.badge--featured{ background: var(--highlight); color: #fff; }
.badge--urgent{ background: var(--danger-soft); color: var(--danger); }

/* ---------------- Filters ---------------- */
.filters{ display:flex; gap: 10px; flex-wrap:wrap; padding: 16px 18px; background: var(--bg-sunken); border: 1px solid var(--line); border-bottom: none; }
.filters select, .filters input[type=text]{
  font-family: var(--font-body); font-size: 0.86rem; padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--ink);
}

/* ---------------- Detail page ---------------- */
.detail-head{ padding: 32px 0 20px; border-bottom: 1px solid var(--line); }
.detail-meta{ display:flex; gap: 16px; flex-wrap:wrap; margin: 14px 0; font-size: 0.88rem; color: var(--ink-soft); }
.detail-meta strong{ color: var(--ink); }
.detail-body, .page-body{ padding: 28px 0; display:grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.detail-body h3, .page-body h3{ margin-top: 1.6em; }
.detail-body p, .detail-body li, .page-body p, .page-body li{ color: var(--ink); }
.detail-body pre{ white-space: pre-wrap; font-family: var(--font-body); color: var(--ink); }
.side-card{ background: var(--bg-raised); border: 1px solid var(--line); padding: 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); height: fit-content; }
.side-card h4{ font-family: var(--font-mono); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 12px; }
.side-card dl{ margin:0; }
.side-card dt{ font-size: 0.75rem; color: var(--ink-faint); margin-top: 10px; }
.side-card dd{ margin: 0; font-weight: 600; }
@media (max-width: 820px){ .detail-body{ grid-template-columns: 1fr; } .page-body{ grid-template-columns: 1fr; } }

/* Most-viewed sidebar widget */
.widget-list{ list-style:none; margin:0; padding:0; }
.widget-list li{ padding: 10px 0; border-top: 1px solid var(--line); }
.widget-list li:first-child{ border-top:none; padding-top:0; }
.widget-list a{ display:block; font-size: 0.85rem; font-weight:600; color: var(--ink); line-height:1.4; }
.widget-list a:hover{ color: var(--accent-strong); }
.widget-list .badge{ margin-inline-end: 6px; }
.widget-list__views{ display:block; font-size: 0.72rem; color: var(--ink-faint); margin-top: 3px; }

/* Governorate pills (homepage browse-by-governorate) */
.pill-list{ display:flex; flex-wrap:wrap; gap: 8px; margin: 18px 0 36px; }
.pill{
  display:inline-flex; align-items:center; gap: 6px; padding: 7px 14px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.85rem; color: var(--ink); text-decoration:none;
}
.pill:hover{ background: var(--accent-soft); border-color: var(--accent); text-decoration:none; }
.pill__count{ color: var(--ink-faint); font-size: 0.78rem; }

/* Job-details panel (Job Information / Requirements / Job Status) on the listing page */
.job-info{ margin-top: 2em; }
.job-info > h3{ margin-top: 0; }
.job-info__group{ margin-bottom: 22px; }
.job-info__group h4{
  font-family: var(--font-mono); text-transform: uppercase; font-size: 0.78rem;
  letter-spacing: 0.06em; color: var(--accent-strong); margin: 0 0 10px;
  padding-bottom: 8px; border-bottom: 2px solid var(--accent-strong);
}
.job-info__item{
  display:flex; justify-content:space-between; align-items:center; gap: 12px;
  padding: 10px 14px; margin-bottom: 8px; background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.job-info__label{ font-size: 0.82rem; color: var(--ink-faint); }
.job-info__value{ font-size: 0.88rem; font-weight: 600; color: var(--ink); text-align: end; }

/* ---------------- Forms ---------------- */
.form-card{ background: var(--bg-raised); border: 1px solid var(--line); padding: 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); max-width: 640px; }
.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid--single{ grid-template-columns: 1fr; }
.field{ display:flex; flex-direction:column; gap: 6px; margin-bottom: 16px; }
.field label{ font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.field .hint{ font-size: 0.76rem; color: var(--ink-faint); }
.field input, .field select, .field textarea{
  font-family: var(--font-body); font-size: 0.95rem; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-raised); color: var(--ink);
  width: 100%;
}
.field textarea{ min-height: 130px; resize: vertical; font-family: var(--font-body); }

/* Pre-submit review checklist (submit.php) — a deliberate confirm-before-you-send
   gate, not data that gets saved: the checkboxes just disable the submit button. */
.submit-checklist{
  background: var(--accent-soft); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 20px 22px; margin: 28px 0 20px;
}
.submit-checklist h3{ margin: 0 0 4px; font-size: 1.05rem; color: var(--accent-strong); }
.submit-checklist .hint{ margin: 0 0 14px; }
.submit-checklist__item{
  display:flex; align-items:flex-start; gap: 10px; padding: 9px 0;
  border-top: 1px solid rgba(16, 83, 78, 0.12); cursor: pointer;
}
.submit-checklist__item:first-of-type{ border-top: none; }
.submit-checklist__item input[type=checkbox]{
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent-strong); cursor: pointer;
}
.submit-checklist__item span{ font-size: 0.9rem; color: var(--ink); line-height: 1.45; }
.submit-checklist__item--ready{ border-top: 1px solid rgba(16, 83, 78, 0.12); margin-top: 4px; padding-top: 13px; }
.submit-checklist__item--ready span{ font-weight: 600; }
.field input:focus, .field select:focus, .field textarea:focus{ outline: 2px solid var(--accent); outline-offset: 1px; }

/* Anti-spam trap field (see honeypot_field() in helpers.php) — positioned off-screen
   rather than display:none, since some bots skip fields hidden that obviously. */
.hp-field{ position:absolute; left:-5000px; top:-5000px; width:1px; height:1px; overflow:hidden; }

.pw-field{ position: relative; }
.pw-field input{ padding-inline-end: 42px; }
.pw-toggle{
  position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 4px;
  display:flex; align-items:center; justify-content:center; width: 32px; height: 32px;
  background: none; border: none; padding: 0; margin: 0; color: var(--ink-faint); cursor: pointer; border-radius: 4px;
}
.pw-toggle:hover{ color: var(--ink); background: var(--bg); }
.pw-toggle:focus-visible{ outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-toggle svg{ width: 18px; height: 18px; display:block; }
@media (max-width: 620px){ .form-grid{ grid-template-columns: 1fr; } }

.alert{ padding: 12px 16px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 18px; }
.alert--error{ background: var(--danger-soft); color: var(--danger); }
.alert--ok{ background: var(--ok-soft); color: var(--ok); }
.alert--info{ background: var(--accent-soft); color: var(--accent-strong); }

/* ---------------- Tables (dashboard/admin) ---------------- */
.table-wrap{ overflow-x: auto; border: 1px solid var(--line); background: var(--bg-raised); }
table{ width:100%; border-collapse: collapse; font-size: 0.88rem; }
th, td{ text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th{ font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); background: var(--bg-sunken); }
tr:last-child td{ border-bottom: none; }
td.wrap{ white-space: normal; }

/* ---------------- Misc ---------------- */
.page-head{ padding: 34px 0 18px; }
.page-head p{ max-width: 60ch; }
.pagination{ display:flex; gap:6px; justify-content:center; margin: 24px 0; font-family: var(--font-mono); font-size: 0.85rem; }
.pagination a, .pagination span{ padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.pagination a:hover{ background: var(--bg-sunken); text-decoration:none; }
.pagination .is-current{ background: var(--ink); color: var(--bg-raised); }

.footer{ border-top: 4px solid var(--band-highlight); margin-top: 64px; padding: 40px 0; background: var(--band-bg); }
.footer__inner{ display:flex; justify-content:space-between; gap: 20px; flex-wrap:wrap; font-size: 0.84rem; color: var(--band-ink-soft); }
.footer strong{ color: #fff; }
.footer a{ color: var(--band-highlight-soft); }
.footer a:hover{ color: #fff; }
.footer__links{ display:flex; gap: 14px; flex-wrap:wrap; margin-top: 8px; }

.empty-state{ text-align:center; padding: 60px 20px; color: var(--ink-faint); }
.empty-state h3{ color: var(--ink-soft); }

.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px){ .two-col{ grid-template-columns: 1fr; } }

/* ---------------- Brand logo image + language switch ---------------- */
.brand__mark--img{
  width: 46px; height: 46px; border-radius: var(--radius); object-fit: contain;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.3);
  background: var(--bg-sunken); padding: 4px;
}
.lang-switch{
  font-family: var(--font-mono); font-size: 0.78rem !important; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 6px 12px !important; margin-inline-start: 6px;
}

/* ---------------- Organization profile ---------------- */
.org-head{ display:flex; gap: 22px; align-items:center; padding: 32px 0 20px; border-bottom: 1px solid var(--line); flex-wrap:wrap; }
.org-head__logo{ width: 84px; height: 84px; border-radius: var(--radius-lg); object-fit: contain; background: var(--bg-raised); border: 1px solid var(--line); padding: 8px; flex-shrink:0; }
.org-head__logo--placeholder{ display:flex; align-items:center; justify-content:center; font-family: var(--font-display); font-size: 2rem; color: var(--ink-faint); }
.org-meta{ font-size: 0.86rem; color: var(--ink-faint); display:flex; gap:14px; flex-wrap:wrap; margin-top: 6px; }
.org-logo-preview{ width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); padding: 6px; }
.ledger-row__org-logo{ width: 28px; height: 28px; object-fit: contain; border-radius: 2px; vertical-align: middle; margin-inline-end: 6px; background: var(--bg-raised); border: 1px solid var(--line); }

/* ---------------- Promotional banners ---------------- */
/* Named "promo-panel", not "ad-*" — a class named ad-slot/ad-banner is
   exactly what ad-blocker cosmetic filters hide, banner content or not. */
.promo-panel{ margin: 32px 0; }
.promo-panel__link{ display:block; width:100%; border-radius: var(--radius); overflow:hidden; border: 1px solid var(--line); }
.promo-panel__link img{ width:100%; display:block; }
.promo-panel__placeholder{
  border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 22px;
  text-align:center; background: var(--bg-sunken); color: var(--ink-faint);
}
.promo-panel__placeholder strong{ display:block; color: var(--ink-soft); font-family: var(--font-display); font-size: 1rem; margin-bottom: 4px; }
.promo-panel--sidebar .promo-panel__placeholder{ padding: 16px; font-size: 0.82rem; }

/* ---------------- RTL (Arabic) ---------------- */
[dir="rtl"] body{ font-family: var(--font-body-ar); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] .brand__name, [dir="rtl"] .tile__label, [dir="rtl"] .stat__n,
[dir="rtl"] .side-card h4, [dir="rtl"] .org-head__logo--placeholder{
  font-family: var(--font-display-ar);
}
[dir="rtl"] .mono{ font-family: var(--font-mono); } /* keep numerals/reference codes in mono */
[dir="rtl"] .hero__eyebrow.ar{ font-family: var(--font-body-ar); }
[dir="rtl"] .ledger-row{ text-align: right; }
[dir="rtl"] .ledger-row__right{ text-align: left; }
[dir="rtl"] .detail-meta, [dir="rtl"] .ledger-row__meta{ text-align: right; }
[dir="rtl"] .section-head{ flex-direction: row-reverse; }
[dir="rtl"] .footer__inner{ text-align: right; }
[dir="rtl"] .form-card{ text-align: right; }
[dir="rtl"] .side-card dt, [dir="rtl"] .side-card dd{ text-align: right; }
[dir="rtl"] .letterhead__bar{ flex-direction: row; } /* logical flex already mirrors via dir */
@media (max-width: 680px){
  [dir="rtl"] .ledger-row__right{ text-align: right; }
}

/* ---- copy protection: deters casual copy/paste of listing text and
   candidate tables; a technical visitor can still bypass this (view
   source, dev tools) — it is a deterrent, not real access control. ---- */
.no-copy, .no-copy *,
.ledger, .ledger *{
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}
.no-copy input, .no-copy textarea,
.ledger input, .ledger textarea{
  user-select: text;
  -webkit-user-select: text;
}
.no-copy input, .no-copy textarea, .no-copy select,
.no-copy button, .no-copy a,
.ledger input, .ledger textarea, .ledger select,
.ledger button, .ledger a{ cursor: pointer; }

.copy-toast{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink, #202b29);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius, 6px);
  font-size: 0.85rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 999;
}
.copy-toast.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
[dir="rtl"] .copy-toast{ left: 50%; }

/* ---- help chat widget ---- */
.chatbot{ position: fixed; bottom: 20px; right: 20px; z-index: 998; }
[dir="rtl"] .chatbot{ right: auto; left: 20px; }

.chatbot__toggle{
  position: relative;
  display: flex; align-items: center; gap: 9px;
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 999px;
  padding: 13px 20px 13px 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
[dir="rtl"] .chatbot__toggle{ padding: 13px 16px 13px 20px; }
.chatbot__toggle:hover{ background: var(--accent-strong); transform: translateY(-1px); }
.chatbot__toggle-face{ font-size: 1.2rem; line-height: 1; }
.chatbot__toggle-dot{
  position: absolute; top: -2px; right: -2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--highlight); border: 2px solid var(--bg);
}
[dir="rtl"] .chatbot__toggle-dot{ right: auto; left: -2px; }

@keyframes chatbot-toggle-pulse{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.07); }
}
.chatbot__toggle--pulse{ animation: chatbot-toggle-pulse 1.8s ease-in-out 3; }

.chatbot__teaser{
  position: absolute; bottom: 76px; right: 0;
  max-width: 230px;
  background: var(--bg-raised); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 10px 14px; font-size: 0.85rem; line-height: 1.4;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  opacity: 0; transform: translateY(6px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
[dir="rtl"] .chatbot__teaser{ right: auto; left: 0; border-radius: 16px 16px 16px 4px; }
.chatbot__teaser.is-visible{ opacity: 1; transform: translateY(0) scale(1); }
.chatbot__teaser:hover{ background: var(--accent-soft); }

.chatbot__panel{
  position: absolute; bottom: 68px; right: 0;
  width: 366px; max-width: calc(100vw - 32px);
  max-height: min(580px, 75vh);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: chatbot-panel-in 0.18s ease-out;
}
[dir="rtl"] .chatbot__panel{ right: auto; left: 0; transform-origin: bottom left; }
.chatbot__panel[hidden]{ display: none; }
@keyframes chatbot-panel-in{
  from{ opacity: 0; transform: translateY(8px) scale(0.97); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot__header{
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-raised));
  border-bottom: 1px solid var(--line);
}
.chatbot__header-text{ flex: 1; }
.chatbot__header strong{ font-family: var(--font-display); font-size: 1.08rem; color: var(--ink); }
.chatbot__subtitle{ font-size: 0.78rem; color: var(--ink-soft); margin-top: 1px; }
.chatbot__avatar{
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.chatbot__avatar--sm{ width: 26px; height: 26px; font-size: 0.95rem; margin-top: 2px; }
.chatbot__close{
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: var(--ink-soft); padding: 4px 6px;
  border-radius: 50%;
}
.chatbot__close:hover{ color: var(--ink); background: var(--bg-sunken); }

.chatbot__messages{
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 0.88rem;
}
.chatbot__row{ display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.chatbot__row--bot{ align-self: flex-start; }
.chatbot__row--user{ align-self: flex-end; flex-direction: row-reverse; }
[dir="rtl"] .chatbot__row--user{ flex-direction: row; }

.chatbot__msg{ padding: 9px 13px; border-radius: 16px; line-height: 1.48; }
.chatbot__msg p{ margin: 0 0 6px; max-width: none; color: inherit; }
.chatbot__msg p:last-child{ margin-bottom: 0; }
.chatbot__msg a{ color: inherit; text-decoration: underline; }
.chatbot__msg--bot{ background: var(--bg-sunken); color: var(--ink); border-bottom-left-radius: 4px; }
[dir="rtl"] .chatbot__msg--bot{ border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.chatbot__msg--user{ background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
[dir="rtl"] .chatbot__msg--user{ border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }

.chatbot__quick{
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px 12px;
}
.chatbot__quick-btn{
  background: var(--bg-raised); color: var(--accent-strong);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 13px; font-size: 0.78rem; cursor: pointer; font-family: var(--font-body);
  text-align: start;
  transition: background 0.15s ease, transform 0.1s ease;
}
.chatbot__quick-btn:hover{ background: var(--accent-soft); transform: translateY(-1px); }

.chatbot__form{
  display: flex; gap: 8px; padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.chatbot__form input[type="text"]{
  flex: 1; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 15px; font-size: 0.88rem; font-family: var(--font-body);
  background: var(--bg-raised); color: var(--ink);
}
.chatbot__form .btn{ border-radius: 999px; }
.chatbot__disclaimer{
  font-size: 0.7rem; color: var(--ink-faint); text-align: center;
  padding: 0 12px 10px; margin: 0;
}

@media (max-width: 520px){
  .chatbot{ bottom: 14px; right: 14px; }
  [dir="rtl"] .chatbot{ right: auto; left: 14px; }
  .chatbot__toggle-label{ display: none; }
  .chatbot__toggle{ padding: 15px; border-radius: 50%; }
  .chatbot__teaser{ bottom: 80px; max-width: 200px; }
  .chatbot__panel{
    position: fixed; bottom: 0; right: 0; left: 0; top: auto;
    width: 100%; max-width: none; max-height: 82vh;
    border-radius: 20px 20px 0 0;
  }
}

@media (prefers-reduced-motion: reduce){
  .chatbot__toggle--pulse{ animation: none; }
  .chatbot__panel{ animation: none; }
  .chatbot__toggle{ transition: none; }
}
