/* Shared styles for the secondary pages (thanks, track, admin, policies). Tokens match the home page. */
:root {
  --bg: #eef3f2; --surface: #ffffff; --sunk: #f5f8f8; --fg: #12282b; --muted: #4f6668; --line: #d3dfde;
  --teal: #0d6a72; --teal-ink: #ffffff; --teal-soft: #dcedee; --water: #2b97b0;
  --ok: #1d7a4a; --ok-soft: #dff1e6; --warn: #9a5b00; --warn-soft: #fbefdc; --bad: #b3261e;
  --display: "Cairo", "Almarai", "Segoe UI", Tahoma, sans-serif;
  --body: "Almarai", "Cairo", "Segoe UI", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
:root:not(:lang(ar)) {
  --display: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1719; --surface: #112427; --sunk: #0e1e21; --fg: #e2eded; --muted: #9bb3b4; --line: #23393c;
    --teal: #4db3bb; --teal-ink: #062023; --teal-soft: #173a3e; --water: #5cc3db;
    --ok: #5fcf8f; --ok-soft: #173a28; --warn: #e3a64a; --warn-soft: #3a2c16; --bad: #ff8a80;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.75; }
.wrap { max-width: 760px; margin: 0 auto; padding-block: 28px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 18px; }
.wrap.wide { max-width: 1100px; }
h1, h2, h3 { margin: 0; font-family: var(--display); line-height: 1.3; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); color: var(--teal); }
h2 { font-size: 1.35rem; }
p { margin: 0; }
a { color: var(--teal); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
button, input, select, textarea { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand img { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.brand b { font-family: var(--display); font-size: 1.25rem; display: block; line-height: 1.2; }
.brand small { color: var(--muted); font-size: .8rem; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang a { text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; line-height: 1.6; font-family: "IBM Plex Sans", "Cairo", sans-serif; }
.lang a[aria-current="page"] { background: var(--teal); color: var(--teal-ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 10px; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--teal); color: var(--teal-ink); text-decoration: none;
  font-weight: 700; padding: 11px 20px; border-radius: 999px; border: 0; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn.wa { background: #1f9d55; color: #fff; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 20px; height: 20px; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--teal-soft); color: var(--teal); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--warn-soft); color: var(--bad); }
.err { color: var(--bad); font-weight: 600; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--sunk); border-radius: 10px; padding: 10px 12px; width: 100%; }

/* Stage pipeline (vertical on the donor page) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; padding-block: 0 22px; padding-inline: 44px 0; min-width: 0; }
.steps li::before { content: ""; position: absolute; inset-inline-start: 8px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); z-index: 1; }
.steps li::after { content: ""; position: absolute; inset-inline-start: 16px; top: 22px; bottom: -4px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { background: var(--teal); border-color: var(--teal); }
.steps li.done::after { background: var(--teal); }
.steps li.now::before { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 5px var(--teal-soft); }
.steps b { display: block; }
.steps li:not(.done):not(.now) b { color: var(--muted); font-weight: 500; }
.steps small { color: var(--muted); display: block; }
.steps a { font-size: .9rem; }

.footer-links { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.footer-links a { color: var(--muted); }
