/* Hayat — dusk & coral. Based on the brand board: coral #FF4B5C, pink #FF8FA3, light #E8E8E8, black #1A1A1A.
   Dark theme by default; [data-theme="light"] switches the page (the hero and the closing CTA stay dusk). */
:root {
  --coral: #ff4b5c;
  --coral-2: #ff8fa3;
  --coral-deep: #d92b45;
  --grad-coral: linear-gradient(135deg, #ff8fa3 0%, #ff4b5c 55%, #e3304a 100%);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-ar: "Cairo", "Inter", system-ui, sans-serif;
  --font-en: "Inter", "Cairo", system-ui, sans-serif;
  --font: var(--font-ar);
}
html[lang="en"] { --font: var(--font-en); }

:root, [data-theme="dark"] {
  --bg: #15131c;
  --bg-2: #1b1824;
  --card: #1f1b28;
  --card-2: #272233;
  --line: rgb(255 255 255 / .08);
  --line-hi: rgb(255 255 255 / .16);
  --ink: #f4eff1;
  --muted: #a69eae;
  --soft: rgb(255 75 92 / .12);
  --amber: #f6c453;
  --amber-soft: rgb(246 196 83 / .12);
  --ok: #34d399;
  --ok-soft: rgb(52 211 153 / .12);
  --shadow: 0 24px 60px -30px rgb(0 0 0 / .8);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f2f0;
  --bg-2: #efe8e6;
  --card: #ffffff;
  --card-2: #faf6f5;
  --line: #ece3e0;
  --line-hi: #ddd1cd;
  --ink: #1a1a1a;
  --muted: #6f6870;
  --soft: #ffe9ec;
  --amber: #a86a00;
  --amber-soft: #fff3d6;
  --ok: #138a5b;
  --ok-soft: #e0f5ec;
  --shadow: 0 24px 50px -30px rgb(90 30 40 / .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.8 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .4s, color .4s;
}
html[lang="en"] body { line-height: 1.6; }
::selection { background: rgb(255 75 92 / .35); }

main { position: relative; isolation: isolate; flex: 1; }
main:focus { outline: none; }
svg { display: block; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--coral-2); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--font); font-weight: 800; line-height: 1.35; }
html[lang="en"] :is(h1, h2, h3) { letter-spacing: -0.025em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.1rem; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); font-weight: 400; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 46ch; }
.accent { background: var(--grad-coral); -webkit-background-clip: text; background-clip: text; color: transparent; }
.duo span { display: block; }
.duo .accent { filter: drop-shadow(0 0 22px rgb(255 75 92 / .35)); }
html[dir="ltr"] .flip { transform: scaleX(-1); }

.skip { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100; background: var(--coral); color: #fff; padding: 8px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

.card {
  position: relative;
  background: radial-gradient(420px circle at var(--mx, -400px) var(--my, -400px), rgb(255 75 92 / .08), transparent 45%), var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

/* ---------- motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes beat { 0%, 40%, 100% { transform: scale(1); } 8% { transform: scale(1.18); } 16% { transform: scale(1); } 24% { transform: scale(1.1); } }
@keyframes bob { 50% { transform: translateY(-14px); } }
@keyframes shadow-bob { 50% { transform: scale(.8); opacity: .18; } }
@keyframes wave-arm { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-22deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes run { to { stroke-dashoffset: -1; } }
@keyframes glow-pulse { 50% { filter: drop-shadow(0 0 4px #ff4b5c) drop-shadow(0 0 22px #ff4b5c); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes drift { 50% { transform: translate(4%, -6%) scale(1.08); } }
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  33% { border-radius: 58% 42% 38% 62% / 55% 38% 62% 45%; }
  66% { border-radius: 36% 64% 52% 48% / 38% 60% 40% 62%; }
}
@keyframes float-soft { 50% { transform: translateY(-12px) rotate(-3deg); } }
@keyframes nudge { 50% { transform: translateY(6px); } }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease-out) var(--d, 0ms), transform 1s var(--ease-out) var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }

.site-header { view-transition-name: header; }
::view-transition-old(root) { animation: .2s ease-in both vt-out; }
::view-transition-new(root) { animation: .5s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }

.page > *, .detail > *, .detail-main > *, .auth > * { animation: rise .8s var(--ease-out) both; }
.page > :nth-child(2), .detail-main > :nth-child(2), .auth > :nth-child(2) { animation-delay: 70ms; }
.page > :nth-child(3), .detail-main > :nth-child(3), .auth > :nth-child(3) { animation-delay: 140ms; }
.page > :nth-child(n+4), .detail-main > :nth-child(n+4), .auth > :nth-child(n+4) { animation-delay: 210ms; }
.detail > :nth-child(2) { animation-delay: 90ms; }

/* ---------- buttons ---------- */

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border: 1px solid transparent; border-radius: 999px;
  font: 700 1rem/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--spring), box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .5; cursor: progress; transform: none; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-sm { padding: 8px 16px; font-size: .92rem; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad-coral); color: #fff; box-shadow: 0 12px 30px -10px rgb(255 75 92 / .75); }
.btn-primary:hover { box-shadow: 0 18px 40px -10px rgb(255 75 92 / .95); }
.btn-primary::after, .btn-ok::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn-primary:hover::after, .btn-ok:hover::after { transform: translateX(120%); }
.btn-outline { background: transparent; border-color: var(--coral); color: var(--ink); }
.btn-outline:hover { background: var(--soft); box-shadow: 0 0 24px -8px rgb(255 75 92 / .7); }
.hero .btn-outline { color: #fff; border-color: rgb(255 255 255 / .55); }
.hero .btn-outline:hover { border-color: #fff; background: rgb(255 255 255 / .08); }
.btn-ghost { background: var(--card-2); border-color: var(--line-hi); color: var(--ink); }
.btn-ghost:hover { border-color: var(--coral); }
.btn-ok { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.btn-danger { background: var(--grad-coral); color: #fff; }
.btn-text { background: none; color: var(--muted); padding-inline: 10px; font-weight: 600; }
.btn-text:hover { color: var(--ink); transform: none; }
.btn-text.danger { color: var(--coral); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line-hi); color: var(--ink); cursor: pointer;
  transition: transform .4s var(--spring), border-color .2s;
}
.icon-btn:hover { transform: rotate(-20deg) scale(1.08); border-color: var(--coral); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- emergency alert: one calm line, tap to read more ---------- */

@keyframes alert-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes alert-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.alert-bar { padding-top: 10px; }
.alert-bar:empty { display: none; }
.alert-in {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 14px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #8f1630, #d42a45 55%, #ff4b5c);
  box-shadow: 0 12px 30px -14px rgb(255 75 92 / .8), inset 0 1px 0 rgb(255 255 255 / .18);
  animation: alert-in .45s var(--ease-out) both;
}
html[dir="rtl"] .alert-in { padding: 8px 14px 8px 8px; }
.alert-in.leaving { animation: alert-out .35s ease-in both; }
.alert-in::after { /* slow light sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgb(255 255 255 / .16) 50%, transparent 65%);
  animation: sheen 5s ease-in-out infinite;
}
.siren {
  position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgb(255 255 255 / .18);
}
.siren::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(255 255 255 / .7); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.siren svg { width: 18px; height: 18px; fill: #fff; }
.alert-body {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.alert-line { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; max-width: 60%; }
.alert-tag {
  flex: none; padding: 1px 10px; border-radius: 999px; background: #fff; color: #c41f3b;
  font-size: .75rem; font-weight: 800; line-height: 1.8;
}
.alert-title { font-size: .95rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-msg { flex: 1; min-width: 0; font-size: .9rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-src { display: none; align-items: center; gap: 6px; font-size: .82rem; opacity: .85; }
.alert-src svg { width: 14px; height: 14px; fill: currentColor; }
.alert-count { flex: none; padding: 0 8px; border-radius: 999px; background: rgb(0 0 0 / .18); font: 700 .75rem/1.8 var(--font-en); }
.alert-x {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgb(0 0 0 / .18); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer;
  transition: background-color .2s, transform .3s var(--spring);
}
.alert-x:hover { background: rgb(0 0 0 / .32); transform: rotate(90deg); }

/* Opened: everything wraps and the hospital shows. */
.alert-in.open { align-items: flex-start; }
.alert-in.open .alert-body { flex-direction: column; align-items: flex-start; gap: 4px; }
.alert-in.open .alert-line { max-width: 100%; }
.alert-in.open :is(.alert-title, .alert-msg) { white-space: normal; }
.alert-in.open .alert-src { display: inline-flex; }

@media (max-width: 720px) {
  .alert-bar .wrap { width: calc(100% - 16px); }
  .alert-bar { padding-top: 8px; }
  .alert-in { gap: 10px; border-radius: 16px; }
  .alert-line { max-width: 100%; flex: 1; }
  .alert-in:not(.open) .alert-msg { display: none; }
}
/* ---------- header & footer ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .4s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo svg { width: 30px; height: 30px; fill: var(--coral); animation: beat 2.6s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgb(255 75 92 / .6)); }
.logo-text { display: grid; line-height: 1; }
.logo-ar { font: 900 1.6rem/1 var(--font-ar); }
.logo-en { font: 600 .66rem/1.4 var(--font-en); letter-spacing: .38em; color: var(--muted); text-align: center; }
.nav { display: flex; gap: 6px; margin-inline: auto; }
.nav a { position: relative; padding: 8px 12px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; transition: color .2s; }
.nav a::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--coral);
  transform: scaleX(0); transition: transform .35s var(--ease-out); box-shadow: 0 0 10px var(--coral);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(.4); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 6px; }

.site-footer { margin-top: 110px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 30px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 18px; }
.foot-tag { font: 600 .95rem var(--font-en); color: var(--ink); }

/* ---------- home: dusk hero ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 8px 12px 0; border-radius: 36px; color: #fff;
  background: linear-gradient(180deg, #1a1630 0%, #2a1c38 32%, #55213b 62%, #b8384c 86%, #ff6a5c 100%);
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / .9);
}
.sky { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(60px); animation: drift 14s ease-in-out infinite; }
.g1 { width: 520px; height: 520px; top: -180px; inset-inline-end: -120px; background: rgb(124 77 255 / .25); }
.g2 { width: 600px; height: 340px; bottom: -120px; left: 18%; background: rgb(255 98 80 / .55); animation-delay: -5s; }
.g3 { width: 380px; height: 380px; top: 22%; left: 30%; background: rgb(255 75 92 / .18); animation-delay: -9s; }
.clouds { position: absolute; inset: auto 0 0; width: 100%; height: 34%; z-index: -1; pointer-events: none; }
.clouds .c1 { fill: #2a1a2c; filter: drop-shadow(0 -8px 22px rgb(255 90 92 / .55)); }
.clouds .c2 { fill: #130e17; filter: drop-shadow(0 -6px 18px rgb(255 75 92 / .35)); }

.hero-in { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 32px; align-items: center; min-height: min(680px, 86vh); padding-block: 64px 120px; }
.hero h1 { font-size: clamp(2.7rem, 5.8vw, 4.8rem); line-height: 1.25; }
.hero h1 .l1, .hero h1 .l2 { display: block; animation: rise 1s var(--ease-out) both; }
.hero h1 .l1 { animation-delay: .1s; }
.hero h1 .l2 {
  animation-delay: .3s;
  background: linear-gradient(90deg, #ffb3c0, #ff4b5c 60%, #ff8fa3); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgb(255 75 92 / .55));
}
.hero .lead { color: rgb(255 255 255 / .82); margin-block: 20px 32px; animation: rise 1s var(--ease-out) .5s both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; animation: rise 1s var(--ease-out) .65s both; }

/* The drop character, its heart and orbit */
.scene {
  position: relative; width: min(100%, 440px); aspect-ratio: 1; justify-self: center;
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--tilt, 0deg));
  transition: transform .8s var(--ease-out);
  animation: fade 1.2s var(--ease-out) .3s both;
}
.scene-back { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.heart-line {
  fill: none; stroke: url(#g-coral); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 4px #ff4b5c) drop-shadow(0 0 12px #ff4b5c);
  animation: draw 2.4s var(--ease-out) .6s forwards, glow-pulse 2.6s ease-in-out 3s infinite;
}
.orbit { transform: rotate(-12deg); transform-origin: 200px 250px; }
.orbit ellipse { fill: none; stroke-width: 2.5; }
.orbit-track { stroke: rgb(255 120 130 / .22); }
.orbit-run { stroke: #ff8fa3; stroke-linecap: round; stroke-dasharray: .22 .78; filter: drop-shadow(0 0 6px #ff4b5c); animation: run 6s linear infinite; }
.mascot { position: absolute; left: 50%; top: 50%; width: 52%; transform: translate(-50%, -46%); overflow: visible; }
.mascot * { transform-box: view-box; }
.m-float { animation: bob 4s ease-in-out infinite; }
.m-shadow { fill: #000; opacity: .35; transform-origin: 110px 250px; animation: shadow-bob 4s ease-in-out infinite; }
.m-body { fill: url(#g-drop); filter: drop-shadow(0 0 18px rgb(255 75 92 / .55)); }
.m-gloss { fill: #fff; opacity: .42; }
.m-eyes { transform-origin: 110px 150px; animation: blink 5s infinite; }
.m-eyes ellipse { fill: #2b0b14; }
.m-spark { fill: #fff; }
.m-cheek { fill: #ff8fa3; opacity: .65; }
.m-smile { fill: none; stroke: #2b0b14; stroke-width: 4; stroke-linecap: round; }
.m-arm path { fill: none; stroke: #ff4b5c; stroke-width: 10; stroke-linecap: round; }
.m-arm circle { fill: #ff6a78; }
.m-wave { transform-origin: 48px 156px; animation: wave-arm 2.2s ease-in-out infinite; }
.m-leg { fill: none; stroke: #c42039; stroke-width: 10; stroke-linecap: round; }
.spark { position: absolute; width: 14px; height: 14px; background: #ffd1d8; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 6px #ff8fa3); animation: twinkle 3s ease-in-out infinite; }
.s1 { top: 12%; left: 14%; } .s2 { top: 20%; right: 10%; animation-delay: -1s; width: 10px; height: 10px; }
.s3 { bottom: 26%; left: 6%; animation-delay: -2s; width: 9px; height: 9px; } .s4 { bottom: 14%; right: 18%; animation-delay: -1.5s; }

.stat-card {
  display: grid; gap: 4px; padding: 10px; border-radius: 24px; min-width: 190px;
  background: rgb(20 14 28 / .5); border: 1px solid rgb(255 255 255 / .12); backdrop-filter: blur(16px);
  animation: rise 1s var(--ease-out) .8s both;
}
.stat { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 16px; transition: background-color .2s; }
.stat:hover { background: rgb(255 255 255 / .05); }
.stat + .stat { border-top: 1px solid rgb(255 255 255 / .08); }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgb(255 75 92 / .16); flex: none; }
.stat-icon svg { width: 22px; height: 22px; fill: #ff6a78; filter: drop-shadow(0 0 6px #ff4b5c); }
.stat strong { display: block; font: 800 1.6rem/1.1 var(--font-en); font-variant-numeric: tabular-nums; }
.stat small { color: rgb(255 255 255 / .65); font-size: .82rem; }

.scroll-hint {
  position: absolute; bottom: 66px; left: 50%; transform: translateX(-50%);
  display: grid; justify-items: center; color: rgb(255 255 255 / .8); font-size: .85rem; text-decoration: none;
}
.scroll-hint svg { width: 20px; height: 20px; fill: currentColor; animation: nudge 1.6s ease-in-out infinite; }

/* ---------- home: find by type ---------- */

.find { position: relative; z-index: 2; margin-top: -54px; }
.find-card { padding: 28px; }
.find-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 18px; }
.find-head h2 { font-size: 1.5rem; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; margin-bottom: 18px;
  background: var(--bg); border: 1px solid var(--line-hi); border-radius: 999px; transition: border-color .2s, box-shadow .25s;
}
html[dir="rtl"] .search { padding: 6px 16px 6px 6px; }
.search:focus-within { border-color: var(--coral); box-shadow: 0 0 0 4px var(--soft); }
.search > svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; box-shadow: none; }
.search input:focus { box-shadow: none; }
.type-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.type-pill {
  position: relative; display: grid; place-items: center; min-height: 58px; padding: 8px; cursor: pointer;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 150%), rgb(255 75 92 / .18), transparent 60%), var(--card-2);
  border: 1px solid var(--line-hi); border-radius: 16px; color: var(--ink);
  font: 800 1.15rem/1 var(--font-en);
  animation: rise .7s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms);
  transition: transform .35s var(--spring), border-color .2s, box-shadow .3s, background-color .2s;
}
.type-pill:hover { transform: translateY(-4px); border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral), 0 14px 30px -12px rgb(255 75 92 / .7); }
.type-pill:active { transform: scale(.95); background: var(--coral); color: #fff; }
.type-pill .n {
  position: absolute; top: -8px; inset-inline-end: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--grad-coral); color: #fff; font: 700 .72rem/1 var(--font-en);
  box-shadow: 0 4px 12px -2px rgb(255 75 92 / .7);
}

/* ---------- home: sections ---------- */

.block { padding-top: 84px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.block-head a:not(.btn) { color: var(--coral); font-weight: 700; text-decoration: none; }
.block-head a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }

.story { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.story-art { position: relative; aspect-ratio: 1.1; display: grid; place-items: center; }
.blob {
  position: absolute; inset: 6% 10%;
  background: radial-gradient(circle at 35% 30%, rgb(255 143 163 / .55), transparent 55%), linear-gradient(140deg, #3a1d2e, #7a2338 60%, #ff4b5c);
  animation: morph 12s ease-in-out infinite; box-shadow: 0 40px 80px -40px rgb(255 75 92 / .7);
}
[data-theme="light"] .blob { background: radial-gradient(circle at 35% 30%, #fff, transparent 55%), linear-gradient(140deg, #ffe3e8, #ffc2cc 60%, #ff8fa3); }
.big-heart { position: relative; width: 42%; filter: drop-shadow(0 20px 30px rgb(140 10 30 / .55)); animation: float-soft 5s ease-in-out infinite; }
.big-heart path { animation: beat 2.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.flow { position: absolute; inset: auto -6% 8% -6%; width: 112%; height: 34%; overflow: visible; pointer-events: none; }
.flow path { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px var(--coral)); }
.in .flow path, .in.flow path, [data-reveal].in .flow path { animation: draw 2.4s var(--ease-out) .3s forwards; }
.story-copy h2 { font-size: clamp(2rem, 4vw, 3rem); }
.story-copy p { color: var(--muted); font-size: 1.15rem; margin-block: 16px 26px; max-width: 34ch; }
.round-btn {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--bg); transition: transform .4s var(--spring), background-color .2s, box-shadow .3s;
}
.round-btn:hover { transform: scale(1.1); background: var(--coral); color: #fff; box-shadow: 0 0 30px -4px var(--coral); }
.round-btn svg { width: 22px; height: 22px; fill: currentColor; }

.how h2 { margin-bottom: 26px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding: 28px; color: var(--muted); transition: transform .4s var(--spring), border-color .3s; }
.steps li:hover { transform: translateY(-6px); border-color: rgb(255 75 92 / .45); }
.steps li > svg { width: 52px; height: 52px; padding: 13px; margin-bottom: 18px; border-radius: 16px; fill: #fff; background: var(--grad-coral); box-shadow: 0 12px 26px -10px rgb(255 75 92 / .8); }
.steps li::after { content: counter(step); position: absolute; top: 18px; inset-inline-end: 24px; font: 800 2.8rem/1 var(--font-en); color: var(--line-hi); }

.cta {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  padding: 52px; border-radius: 32px; color: #fff;
  background: radial-gradient(600px 300px at 15% 120%, rgb(255 75 92 / .45), transparent 60%), linear-gradient(135deg, #1d1626, #2e1a2c 60%, #4a1f33);
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / .9);
}
.cta .flow { inset: auto -5% -38% -5%; height: 70%; opacity: .6; }
.cta-drop { width: 110px; filter: drop-shadow(0 0 30px rgb(255 75 92 / .7)); animation: float-soft 4.5s ease-in-out infinite; }
.cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.cta p { color: rgb(255 255 255 / .78); margin-top: 10px; font-size: 1.1rem; }

/* ---------- request cards ---------- */

.req-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.req {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: start;
  padding: 20px; border-radius: 22px;
  background: radial-gradient(380px circle at var(--mx, -400px) var(--my, -400px), rgb(255 75 92 / .1), transparent 45%), var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.req.in { transition: opacity .8s var(--ease-out) var(--d, 0ms), transform .45s var(--spring), border-color .3s, box-shadow .35s; }
.req:hover { transform: translateY(-5px); border-color: rgb(255 75 92 / .45); box-shadow: 0 26px 50px -26px rgb(255 75 92 / .55); }
.req[hidden] { display: none; }
.req-top { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.req-where { margin-top: 8px; font: 800 1.12rem/1.45 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-link { text-decoration: none; }
.req-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.req-units { color: var(--muted); font-size: .95rem; }
.req-type {
  position: relative; font: 800 1.9rem/1 var(--font-en); color: var(--coral);
  text-shadow: 0 0 22px rgb(255 75 92 / .5); padding-top: 4px; transition: transform .45s var(--spring);
}
.req:hover .req-type { transform: scale(1.12) rotate(-4deg); }
.req[data-status="OPEN"][data-urgency="CRITICAL"] .req-type::after {
  content: ""; position: absolute; top: -2px; inset-inline-end: -10px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 0 var(--coral); animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
.req[data-status="FULFILLED"] .req-type { color: var(--ok); text-shadow: none; }
.req-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 10px; color: var(--muted); font-size: .88rem; }
.req-meta span { display: inline-flex; align-items: center; gap: 5px; }
.req-meta svg { width: 15px; height: 15px; fill: currentColor; opacity: .8; }
.req-actions { position: relative; z-index: 1; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.req-actions .btn { flex: 1; }
.req-actions .btn-text { flex: none; }

.chip { display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: .8rem; font-weight: 700; line-height: 1.9; }
.chip.u-URGENT { background: var(--amber-soft); color: var(--amber); }
.chip.u-CRITICAL { background: var(--grad-coral); color: #fff; box-shadow: 0 6px 16px -6px rgb(255 75 92 / .8); }
.chip.s-OPEN { background: var(--soft); color: var(--coral); }
.chip.s-FULFILLED { background: var(--ok-soft); color: var(--ok); }
.units { display: inline-flex; align-items: center; gap: 6px; }
.units svg { width: 15px; height: 15px; fill: var(--coral); }

.empty { padding: 44px 24px; color: var(--muted); text-align: center; display: grid; justify-items: center; gap: 16px; }

/* ---------- inner pages ---------- */

.page { padding-top: 56px; }
.page > h1 { margin-bottom: 8px; }
.compat { font-size: 1rem; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-block: 26px; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.filters .field { margin: 0; min-width: 170px; }

.tabs { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 22px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.tabs button { padding: 8px 20px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 .95rem var(--font); cursor: pointer; transition: background-color .25s, color .25s, box-shadow .25s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--grad-coral); color: #fff; box-shadow: 0 8px 20px -8px rgb(255 75 92 / .8); }

/* ---------- detail ---------- */

.detail { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; padding-top: 60px; }
.detail-type {
  position: relative; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 8px; overflow: hidden;
  border-radius: 36px; color: #fff;
  background: radial-gradient(circle at 50% 110%, rgb(255 75 92 / .55), transparent 60%), linear-gradient(160deg, #241a30, #3d1c30);
  box-shadow: 0 30px 70px -30px rgb(255 75 92 / .6);
}
.detail-drop { position: absolute; width: 74%; left: 13%; top: 10%; fill: rgb(255 75 92 / .9); filter: drop-shadow(0 0 30px rgb(255 75 92 / .7)); animation: float-soft 5s ease-in-out infinite; }
.detail-type .g { position: relative; font: 800 4.4rem/1 var(--font-en); text-shadow: 0 6px 24px rgb(80 0 20 / .7); }
.detail-units { position: relative; font-weight: 700; }
.detail-type[data-status="FULFILLED"] .detail-drop { fill: #34d399; filter: drop-shadow(0 0 30px rgb(52 211 153 / .6)); }
.detail-main h1 { margin-top: 10px; }
.detail-city { color: var(--muted); font-size: 1.1rem; }
.detail-desc { margin-top: 18px; max-width: 60ch; white-space: pre-line; }
.banner-ok { margin-top: 18px; padding: 12px 16px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 26px 0; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.facts div { padding: 14px 18px; }
.facts div + div { border-inline-start: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 700; }
.detail-actions, .owner-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.owner-bar { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- forms ---------- */

.form-page { max-width: 780px; }
.form-page h1 { margin-bottom: 26px; }
#request-form { padding: 32px; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 30px; padding: 0; counter-reset: p; }
.progress li { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; text-align: center; }
.progress li::before { /* connector */
  content: ""; position: absolute; top: 15px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line-hi); z-index: 0;
}
.progress li:last-child::before { display: none; }
.progress li.done::before { background: linear-gradient(90deg, var(--coral), var(--coral-2)); box-shadow: 0 0 8px var(--coral); }
.progress span {
  position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--line-hi); transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.progress span::after { counter-increment: p; content: counter(p); font: 700 .8rem var(--font-en); }
.progress li.done { color: var(--ink); }
.progress li.done span { background: var(--grad-coral); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px var(--soft), 0 0 18px -2px var(--coral); animation: pop .4s var(--spring); }
.progress li.done span::after { content: "✓"; }

.field { display: grid; gap: 6px; margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { padding: 0; font-weight: 700; }
.field > legend { margin-bottom: 8px; }
.hint { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-row:has(.stepper) { grid-template-columns: auto 1fr; gap: 0 28px; }
.seg-3 label { white-space: nowrap; font-size: .95rem; }

input, select, textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line-hi); border-radius: 14px;
  background: var(--bg); color: inherit; font: inherit; line-height: 1.5;
  transition: border-color .2s, box-shadow .25s, background-color .2s;
}
select option { background: var(--card); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px var(--soft); }
[aria-invalid="true"] { border-color: var(--coral); }
input[dir="ltr"] { text-align: start; }
html[dir="rtl"] input[dir="ltr"] { text-align: right; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg label {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px; cursor: pointer;
  border: 1px solid var(--line-hi); border-radius: 14px; background: var(--bg); font-weight: 700;
  transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--spring), box-shadow .3s;
}
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg label:hover { border-color: var(--coral); transform: translateY(-2px); }
.seg label:has(input:checked) {
  border-color: var(--coral); background: rgb(255 75 92 / .14); color: var(--ink);
  box-shadow: 0 0 0 1px var(--coral), 0 0 22px -4px rgb(255 75 92 / .8); animation: pop .4s var(--spring);
}
.seg label:has(input:focus-visible) { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.seg label:has(input[aria-invalid="true"]) { border-color: var(--coral); }
.seg-types label { font: 800 1.2rem/1 var(--font-en); min-height: 56px; }
/* Urgency options show a radio dot, like the brand board. */
.seg-3 label span { display: inline-flex; align-items: center; gap: 8px; }
.seg-3 label span::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-hi); transition: border-color .2s, box-shadow .2s; }
.seg-3 label:has(input:checked) span::before { border-color: var(--coral); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 8px var(--coral); }

.stepper { display: inline-flex; align-items: center; width: fit-content; border: 1px solid var(--line-hi); border-radius: 14px; background: var(--bg); }
.stepper button { width: 48px; height: 48px; border: 0; border-radius: 12px; background: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; transition: background-color .2s, color .2s, transform .25s var(--spring); }
.stepper button:hover { background: var(--soft); color: var(--coral); }
.stepper button:active { transform: scale(.88); }
.stepper input { width: 3.2ch; padding: 0; border: 0; background: none; text-align: center; font: 800 1.3rem var(--font-en); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper input:focus { box-shadow: none; }

.form-error { margin-bottom: 20px; padding: 12px 16px; border-radius: 14px; background: var(--soft); color: var(--coral); font-weight: 600; animation: pop .35s var(--spring); }
.form-error[hidden] { display: none; }

.auth { max-width: 460px; margin: 64px auto 0; padding: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.auth h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth form { margin-top: 22px; }
.auth-switch { margin-top: 18px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--coral); font-weight: 700; }

/* ---------- hospital alerts ---------- */

.panel { margin-block: 28px; padding: 26px; max-width: 780px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.2rem; margin-bottom: 16px; }
.alert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 780px; }
.alert-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.alert-list li.is-active { border-color: var(--coral); box-shadow: 0 0 30px -12px var(--coral); }
.alert-list h3 { margin-top: 6px; }
.alert-list p { color: var(--muted); }

/* ---------- misc ---------- */

.notice { padding-block: 96px; display: grid; justify-items: center; gap: 20px; text-align: center; color: var(--muted); font-size: 1.1rem; animation: rise .6s var(--ease-out) both; }

dialog {
  width: min(440px, calc(100% - 32px)); padding: 26px; border-radius: 24px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-hi); box-shadow: 0 40px 100px -20px rgb(0 0 0 / .7);
}
dialog[open] { animation: dialog-in .4s var(--spring); }
dialog::backdrop { background: rgb(10 6 14 / .6); backdrop-filter: blur(6px); animation: fade .25s both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

#toast {
  position: fixed; inset-inline: 0; bottom: 28px; z-index: 50; width: max-content; max-width: calc(100% - 32px); margin-inline: auto;
  padding: 13px 24px; border-radius: 999px; background: var(--grad-coral); color: #fff; font-weight: 700;
  box-shadow: 0 20px 44px -14px rgb(255 75 92 / .8);
  opacity: 0; transform: translateY(160%) scale(.9); transition: opacity .3s, transform .5s var(--spring); pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }

main[aria-busy="true"] { opacity: .6; transition: opacity .2s .15s; }

/* ---------- account type (login / sign-up) ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acct-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 22px; padding: 0; border: 0; }
.acct-switch label { position: relative; cursor: pointer; }
.acct-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.acct-card {
  display: grid; justify-items: center; gap: 4px; height: 100%; padding: 18px 12px; text-align: center;
  border: 1.5px solid var(--line-hi); border-radius: 18px; background: var(--bg);
  transition: border-color .25s, background-color .25s, box-shadow .3s, transform .35s var(--spring);
}
.acct-card svg { width: 30px; height: 30px; padding: 6px; border-radius: 12px; fill: var(--muted); background: var(--card-2); transition: fill .25s, background-color .25s, transform .4s var(--spring); }
.acct-card strong { font-size: 1rem; }
.acct-card small { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.acct-switch label:hover .acct-card { transform: translateY(-2px); border-color: var(--coral); }
.acct-switch input:checked + .acct-card { border-color: var(--coral); background: var(--soft); box-shadow: 0 0 0 1px var(--coral), 0 12px 28px -14px rgb(255 75 92 / .8); }
.acct-switch input:checked + .acct-card svg { fill: #fff; background: var(--grad-coral); transform: scale(1.12); }
.acct-switch input:focus-visible + .acct-card { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.hospital-note { display: none; gap: 10px; align-items: flex-start; margin: -6px 0 20px; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); color: var(--ink); font-size: .88rem; line-height: 1.6; }
.hospital-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: var(--amber); }
#auth-form[data-type="HOSPITAL"] .hospital-note { display: flex; animation: rise .4s var(--ease-out) both; }

/* ---------- hospital alerts page ---------- */

.pending-box { display: flex; gap: 14px; align-items: flex-start; max-width: 780px; margin-top: 24px; padding: 18px 20px; border-radius: 20px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.pending-box svg { width: 26px; height: 26px; flex: none; fill: var(--amber); }
.pending-box p { color: var(--muted); margin-top: 2px; }
.panel.is-locked { opacity: .45; filter: grayscale(.6); }
.kind-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kind-grid label { position: relative; cursor: pointer; }
.kind-grid input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.kind-grid span {
  display: grid; justify-items: center; gap: 6px; height: 100%; padding: 12px 6px; text-align: center; font-size: .85rem; font-weight: 700;
  border: 1px solid var(--line-hi); border-radius: 14px; background: var(--bg); transition: border-color .2s, background-color .2s, box-shadow .3s, transform .3s var(--spring);
}
.kind-grid svg { width: 22px; height: 22px; fill: var(--muted); transition: fill .2s; }
.kind-grid label:hover span { border-color: var(--coral); transform: translateY(-2px); }
.kind-grid input:checked + span { border-color: var(--coral); background: var(--soft); box-shadow: 0 0 0 1px var(--coral), 0 0 20px -6px var(--coral); }
.kind-grid input:checked + span svg { fill: var(--coral); }
.kind-grid input:focus-visible + span { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.kind-chip { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.9; background: var(--soft); color: var(--coral); }
.kind-chip svg { width: 13px; height: 13px; fill: currentColor; }
.alert-tag { display: inline-flex; align-items: center; gap: 4px; }
.alert-tag svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- admin dashboard ---------- */

.admin-head { margin-bottom: 22px; }
.admin-nav { display: flex; gap: 6px; padding: 6px; margin-bottom: 28px; overflow-x: auto; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.admin-nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 14px; flex: none;
  color: var(--muted); text-decoration: none; font-weight: 700; transition: color .2s, background-color .25s, box-shadow .25s;
}
.admin-nav a svg { width: 18px; height: 18px; fill: currentColor; }
.admin-nav a:hover { color: var(--ink); background: var(--card-2); }
.admin-nav a[aria-current="page"] { color: #fff; background: var(--grad-coral); box-shadow: 0 10px 24px -10px rgb(255 75 92 / .8); }
.admin-body { animation: rise .6s var(--ease-out) both; }
.adm-h2 { font-size: 1.25rem; margin: 34px 0 14px; }

.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ov-card {
  position: relative; overflow: hidden; display: grid; gap: 2px; padding: 20px; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.ov-card::after { content: ""; position: absolute; width: 120px; height: 120px; top: -50px; inset-inline-end: -40px; border-radius: 50%; background: rgb(255 75 92 / .1); filter: blur(10px); }
.ov-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 12px; background: var(--soft); }
.ov-icon svg { width: 20px; height: 20px; fill: var(--coral); }
.ov-card strong { font: 800 2.2rem/1.1 var(--font-en); font-variant-numeric: tabular-nums; }
.ov-card small { color: var(--muted); }
.ov-card.warn .ov-icon { background: var(--amber-soft); } .ov-card.warn .ov-icon svg { fill: var(--amber); }
.ov-card.ok .ov-icon { background: var(--ok-soft); } .ov-card.ok .ov-icon svg { fill: var(--ok); }
.ov-card.hot { border-color: rgb(255 75 92 / .4); }

.adm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adm-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 14px 16px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .25s;
}
.adm-row:hover { border-color: var(--line-hi); }
.adm-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--card-2); }
.adm-avatar svg { width: 22px; height: 22px; fill: var(--muted); }
.adm-avatar[class*="kind-"] { background: var(--soft); } .adm-avatar[class*="kind-"] svg { fill: var(--coral); }
.adm-type { display: grid; place-items: center; min-width: 52px; height: 44px; padding: 0 8px; border-radius: 14px; background: var(--soft); color: var(--coral); font: 800 1.05rem var(--font-en); }
.adm-main { min-width: 0; }
.adm-main .req-top { align-items: center; }
.adm-main .req-top a { color: inherit; text-decoration: none; }
.adm-main .req-top a:hover { color: var(--coral); }
.adm-main .req-meta { margin-top: 4px; }
.adm-text { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.adm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.adm-filters .search { flex: 1; min-width: 240px; margin: 0; }
.adm-filters select { width: auto; border-radius: 999px; }
.tabs a { padding: 8px 20px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: .95rem; text-decoration: none; transition: background-color .25s, color .25s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-selected="true"] { background: var(--grad-coral); color: #fff; box-shadow: 0 8px 20px -8px rgb(255 75 92 / .8); }
.chip.s-CANCELLED { background: var(--card-2); color: var(--muted); }

@media (max-width: 900px) {
  .ov-grid { grid-template-columns: repeat(2, 1fr); }
  .kind-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .adm-row { grid-template-columns: auto 1fr; }
  .adm-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .acct-card { padding: 14px 8px; }
}
/* ---------- donors ---------- */

.switch-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  position: relative; flex: none; width: 50px; height: 28px; margin-top: 2px; border-radius: 999px;
  background: var(--line-hi); transition: background-color .3s, box-shadow .3s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .3); transition: transform .35s var(--spring);
}
.switch-row input:checked + .switch { background: var(--grad-coral); box-shadow: 0 0 18px -4px var(--coral); }
.switch-row input:checked + .switch::after { transform: translateX(22px); }
html[dir="rtl"] .switch-row input:checked + .switch::after { transform: translateX(-22px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.switch-text { display: grid; gap: 2px; }
.switch-text small { color: var(--muted); font-size: .85rem; line-height: 1.55; }

.donor-box { margin: 4px 0 22px; padding: 18px; border-radius: 18px; border: 1px dashed var(--line-hi); background: var(--card-2); transition: border-color .3s, background-color .3s; }
.donor-box:has(input[name="isDonor"]:checked) { border-style: solid; border-color: rgb(255 75 92 / .5); background: var(--soft); }
.donor-extra { display: none; margin-top: 16px; }
.donor-box:has(input[name="isDonor"]:checked) .donor-extra { display: grid; gap: 14px; animation: rise .45s var(--ease-out) both; }
.donor-extra .field { margin: 0; }
#auth-form[data-type="HOSPITAL"] .donor-box { display: none; }

.form-h2 { font-size: 1.15rem; margin: 6px 0 16px; }
.form-h2:not(:first-of-type) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-email { color: var(--muted); margin: -8px 0 18px; text-align: start; }
.donor-status { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 4px; padding: 8px 16px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-weight: 700; }
.donor-status svg { width: 18px; height: 18px; fill: currentColor; }
.donor-status.on { background: var(--soft); color: var(--coral); }

.privacy-note { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 10px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.privacy-note svg { width: 18px; height: 18px; flex: none; fill: var(--coral); }

.donor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.donor {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-items: center; padding: 18px;
  border-radius: 22px; background: radial-gradient(360px circle at var(--mx, -400px) var(--my, -400px), rgb(255 75 92 / .1), transparent 45%), var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.donor.in { transition: opacity .8s var(--ease-out) var(--d, 0ms), transform .45s var(--spring), border-color .3s; }
.donor:hover { transform: translateY(-4px); border-color: rgb(255 75 92 / .45); }
.donor-type {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad-coral); color: #fff; font: 800 1.15rem var(--font-en);
  box-shadow: 0 10px 24px -10px rgb(255 75 92 / .9);
}
.donor-type::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgb(255 75 92 / .35); }
.donor-main h3 { font-size: 1.08rem; }
.donor-main .req-meta { margin-top: 2px; }
.avail { color: var(--ok); font-weight: 700; }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.donor-actions { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.donor-actions .btn { flex: 1; }

.join-band {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 36px; padding: 24px;
  border-radius: 24px; background: var(--soft); border: 1px solid rgb(255 75 92 / .3);
}
.join-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad-coral); }
.join-icon svg { width: 26px; height: 26px; fill: #fff; animation: beat 2.6s ease-in-out infinite; }
.join-band p { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta .btn-outline { color: #fff; border-color: rgb(255 255 255 / .55); }

@media (max-width: 720px) {
  .join-band { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
/* ---------- profile ---------- */

.profile-head { margin-bottom: 28px; }
.profile-grid { display: grid; grid-template-columns: 330px 1fr; gap: 28px; align-items: start; }

.profile-card {
  position: sticky; top: 92px; overflow: hidden; display: grid; justify-items: center; text-align: center;
  padding: 0 24px 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.profile-cover {
  position: relative; overflow: hidden; width: calc(100% + 48px); height: 110px; margin-inline: -24px;
  background: linear-gradient(135deg, #1a1630, #55213b 55%, #ff4b5c);
}
.profile-cover span { position: absolute; border-radius: 50%; filter: blur(28px); animation: drift 10s ease-in-out infinite; }
.profile-cover span:nth-child(1) { width: 180px; height: 180px; top: -60px; inset-inline-start: -30px; background: rgb(255 143 163 / .55); }
.profile-cover span:nth-child(2) { width: 160px; height: 160px; bottom: -90px; inset-inline-end: -20px; background: rgb(124 77 255 / .45); animation-delay: -4s; }
.avatar {
  position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-top: -52px; border-radius: 50%;
  background: var(--grad-coral); color: #fff; font: 800 2.2rem/1 var(--font-en);
  border: 5px solid var(--card); box-shadow: 0 16px 34px -14px rgb(255 75 92 / .9);
  animation: pop .6s var(--spring) both;
}
.avatar-type {
  position: absolute; bottom: -4px; inset-inline-end: -8px; display: grid; place-items: center; min-width: 40px; height: 30px; padding: 0 8px;
  border-radius: 999px; background: var(--card); color: var(--coral); font: 800 .82rem var(--font-en);
  border: 2px solid var(--coral); box-shadow: 0 0 16px -4px var(--coral);
}
.profile-card h2 { margin-top: 14px; font-size: 1.35rem; }
.profile-mail { color: var(--muted); font-size: .9rem; word-break: break-all; }
.profile-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.profile-chips .chip { gap: 5px; }
.profile-chips .chip svg { width: 13px; height: 13px; fill: currentColor; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin: 20px 0 0; padding: 14px 0; border-block: 1px solid var(--line); }
.profile-stats div { display: grid; gap: 0; }
.profile-stats div + div { border-inline-start: 1px solid var(--line); }
.profile-stats dd { margin: 0; font: 800 1.5rem/1.2 var(--font-en); }
.profile-stats dt { color: var(--muted); font-size: .78rem; }
.profile-meta { list-style: none; width: 100%; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; text-align: start; }
.profile-meta li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }
.profile-meta li:has(bdi) { flex-direction: row-reverse; justify-content: flex-end; }
.profile-meta svg { width: 16px; height: 16px; flex: none; fill: var(--coral); }
.profile-links { display: flex; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.profile-main { display: grid; gap: 18px; }
.form-section { padding: 26px; }
.section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.section-head h2 { font-size: 1.2rem; }
.section-head .muted { font-size: .9rem; }
.section-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--card-2); }
.section-icon svg { width: 22px; height: 22px; fill: var(--muted); }
.section-icon.hot { background: var(--grad-coral); box-shadow: 0 10px 22px -10px rgb(255 75 92 / .9); }
.section-icon.hot svg { fill: #fff; }
.form-section .donor-box { margin: 0; }
.readonly {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--card-2); border: 1px dashed var(--line-hi); color: var(--muted); cursor: not-allowed;
}
.readonly svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.readonly span { flex: 1; text-align: start; }

.save-bar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 12px 12px 20px; border-radius: 22px;
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(16px);
  border: 1px solid var(--line-hi); box-shadow: 0 20px 40px -24px rgb(0 0 0 / .6);
  transition: border-color .3s, box-shadow .3s;
}
html[dir="rtl"] .save-bar { padding: 12px 20px 12px 12px; }
.save-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.save-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.save-state .unsaved { display: none; }
.dirty .save-bar { border-color: rgb(255 75 92 / .55); box-shadow: 0 20px 44px -22px rgb(255 75 92 / .7); }
.dirty .save-state { color: var(--ink); }
.dirty .save-state .dot { background: var(--coral); box-shadow: 0 0 10px var(--coral); animation: beat 1.6s ease-in-out infinite; }
.dirty .save-state .saved { display: none; }
.dirty .save-state .unsaved { display: inline; }
.dirty .save-bar .btn-primary { animation: pop .5s var(--spring); }

@media (max-width: 960px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card { position: static; }
}
@media (max-width: 720px) {
  .form-section { padding: 20px; }
  .save-bar { bottom: 10px; }
  .save-bar .btn { flex: 1; }
}
/* ---------- donor contact methods ---------- */

.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method-grid label { position: relative; cursor: pointer; }
.method-grid input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.method-grid span {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 8px; text-align: center;
  border: 1px solid var(--line-hi); border-radius: 14px; background: var(--bg); font-weight: 700; font-size: .92rem;
  transition: border-color .2s, background-color .2s, box-shadow .3s, transform .3s var(--spring);
}
.method-grid span::after { /* tick */
  content: ""; width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--line-hi); flex: none;
  transition: background-color .2s, border-color .2s;
}
.method-grid svg { width: 18px; height: 18px; fill: var(--muted); flex: none; transition: fill .2s; }
.method-grid label:hover span { border-color: var(--coral); transform: translateY(-2px); }
.method-grid input:checked + span { border-color: var(--coral); background: rgb(255 75 92 / .12); box-shadow: 0 0 0 1px var(--coral); }
.method-grid input:checked + span svg { fill: var(--coral); }
.method-grid input:checked + span::after {
  border-color: var(--coral);
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2Z'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.method-grid input:focus-visible + span { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.method-grid input[aria-invalid="true"] + span { border-color: var(--coral); }

.method-icons { display: inline-flex; align-items: center; gap: 6px; }
.method-icons span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line); }
.method-icons svg { width: 16px; height: 16px; fill: var(--coral); }

@media (max-width: 480px) {
  .method-grid { grid-template-columns: 1fr; }
}
/* ---------- "become a donor" prompts ---------- */

.donate-cta svg { fill: var(--coral); animation: beat 2.4s ease-in-out infinite; }
.donate-cta:hover svg { fill: currentColor; }

.donor-invite {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 28px 32px;
  border-radius: 28px; border: 1px solid rgb(255 75 92 / .35);
  background: radial-gradient(500px 220px at 100% 0%, rgb(255 75 92 / .22), transparent 70%), var(--card);
  box-shadow: 0 30px 60px -36px rgb(255 75 92 / .7);
}
.donor-invite::after {
  content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 75%, rgb(255 143 163 / .14) 85%, transparent 95%);
  animation: spin 10s linear infinite;
}
.donor-invite h2 { font-size: 1.5rem; }
.donor-invite p { color: var(--muted); margin-top: 4px; max-width: 60ch; }
.invite-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--grad-coral); box-shadow: 0 14px 30px -12px rgb(255 75 92 / .9); }
.invite-icon svg { width: 32px; height: 32px; fill: #fff; animation: beat 2.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.form-section.spotlit { border-color: var(--coral); box-shadow: 0 0 0 4px var(--soft), 0 30px 60px -30px rgb(255 75 92 / .7); animation: pop .6s var(--spring) .4s both; }

@media (max-width: 720px) {
  .donor-invite { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; }
  .donate-cta span { display: none; }
}
/* ---------- login extras, forgot / reset ---------- */

.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 20px; font-size: .92rem; }
.login-row a { color: var(--coral); font-weight: 700; text-decoration: none; }
.login-row a:hover { text-decoration: underline; text-underline-offset: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-weight: 600; }
.check input { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--coral); cursor: pointer; }
.auth-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 18px; background: var(--grad-coral); box-shadow: 0 14px 30px -12px rgb(255 75 92 / .9); }
.auth-icon svg { width: 26px; height: 26px; fill: #fff; }
.sent-box { display: grid; justify-items: center; gap: 8px; margin-top: 22px; padding: 26px 20px; text-align: center; border-radius: 20px; background: var(--ok-soft); animation: pop .5s var(--spring) both; }
.sent-box[hidden] { display: none; }
.sent-box p { color: var(--muted); font-size: .92rem; }
.sent-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok); }
.sent-icon svg { width: 26px; height: 26px; fill: #fff; }
/* ---------- Continue with Google ---------- */

.btn-google { margin-top: 0; background: #fff; color: #1f1f1f; border-color: #dadce0; font-family: var(--font); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.btn-google:hover { background: #f8f9fa; border-color: #c6c9cc; box-shadow: 0 6px 16px -8px rgb(0 0 0 / .35); }
.btn-google svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-hi); }
.welcome-box { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; padding: 16px 18px; border-radius: 18px; background: var(--soft); border: 1px solid rgb(255 75 92 / .35); animation: pop .5s var(--spring) both; }
.welcome-box svg { width: 22px; height: 22px; flex: none; fill: var(--coral); margin-top: 2px; }
/* ---------- request expiry, privacy page, account deletion ---------- */

.chip.s-EXPIRED { background: var(--card-2); color: var(--muted); border: 1px dashed var(--line-hi); }
.banner-warn { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: 16px; background: var(--amber-soft); color: var(--ink); font-weight: 600; }
.banner-warn svg { width: 18px; height: 18px; flex: none; margin-top: 3px; fill: var(--amber); }

.legal { max-width: 980px; }
.legal-date { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 28px; color: var(--muted); font-size: .9rem; }
.legal-date svg { width: 16px; height: 16px; fill: currentColor; }
.legal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.legal-card { padding: 24px; }
.legal-card .section-head { align-items: center; margin-bottom: 14px; }
.legal-card ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; color: var(--muted); line-height: 1.75; }
.legal-card li::marker { color: var(--coral); }
.legal-contact { margin-top: 24px; color: var(--muted); }
.legal-contact a { color: var(--coral); font-weight: 700; }
.foot-link { color: var(--muted); font-weight: 600; text-decoration: none; }
.foot-link:hover { color: var(--coral); }
.agree-note { margin: -6px 0 18px; color: var(--muted); font-size: .85rem; text-align: center; }
.agree-note a { color: var(--coral); font-weight: 700; }

.danger-zone { border-color: rgb(255 75 92 / .35); }
.danger-zone .muted { margin: -8px 0 18px; }
.section-icon.danger { background: var(--soft); }
.section-icon.danger svg { fill: var(--coral); }
.btn-danger-outline { background: transparent; border-color: var(--coral); color: var(--coral); }
.btn-danger-outline:hover { background: var(--coral); color: #fff; }
.delete-dialog { display: grid; gap: 10px; }
.delete-dialog h3 { font-size: 1.25rem; }
.delete-dialog label { font-weight: 700; margin-top: 6px; }
.auth-icon.danger { background: var(--soft); box-shadow: none; }
.auth-icon.danger svg { fill: var(--coral); }

@media (max-width: 720px) {
  .legal-grid { grid-template-columns: 1fr; }
}
/* ---------- app install & notifications ---------- */

.install-btn svg { fill: var(--coral); }
.install-btn { border-color: rgb(255 75 92 / .5); animation: pop .6s var(--spring) both; }
.install-dialog { display: grid; gap: 10px; }
.install-dialog ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; color: var(--muted); }
.notif-body { display: grid; gap: 14px; justify-items: start; }
.notif-body > p { color: var(--muted); }
.notif-note { padding: 12px 14px; border-radius: 14px; background: var(--card-2); }
.notif-on { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ok-soft); color: var(--ok) !important; font-weight: 700; }
.notif-on svg { width: 16px; height: 16px; fill: currentColor; }
.notif-hint { margin-top: -4px; }
.notif-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notif-body .switch-row { width: 100%; }
/* ---------- area pickers ---------- */

.search .search-select { flex: 1; min-width: 0; padding: 8px 4px; border: 0; background: none; box-shadow: none; cursor: pointer; }
.search .search-select:focus { box-shadow: none; }
select optgroup { font-weight: 800; color: var(--coral); }
select option { color: var(--ink); font-weight: 500; }
/* ---------- last donation ---------- */

.date-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.date-row input { flex: 1; min-width: 170px; }
[data-theme="dark"] input[type="date"] { color-scheme: dark; }
.rest-box { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: var(--soft); color: var(--ink); font-weight: 600; animation: pop .45s var(--spring) both; }
.rest-box svg { width: 18px; height: 18px; flex: none; margin-top: 3px; fill: var(--coral); }
/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-in { grid-template-columns: 1fr 1fr; }
  .stat-card { grid-column: 1 / -1; grid-auto-flow: column; justify-content: center; }
  .stat + .stat { border-top: 0; border-inline-start: 1px solid rgb(255 255 255 / .08); }
}

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; text-align: center; padding-block: 44px 110px; gap: 24px; }
  .hero .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .scene { width: min(80%, 340px); }
  .type-grid { grid-template-columns: repeat(4, 1fr); }
  .story { grid-template-columns: 1fr; gap: 24px; }
  .story-art { max-width: 420px; margin-inline: auto; width: 100%; }
  .cta { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 40px 24px; }
  .detail { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .detail-type { width: 210px; border-radius: 30px; }
  .detail-type .g { font-size: 3.4rem; }
}

@media (max-width: 720px) {
  .header-in { flex-wrap: wrap; gap: 4px 10px; padding-block: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-inline: 0; }
  .hide-sm { display: none; }
  .hero { margin: 6px 8px 0; border-radius: 28px; }
  .stat-card { grid-auto-flow: row; justify-content: stretch; }
  .stat + .stat { border-inline-start: 0; border-top: 1px solid rgb(255 255 255 / .08); }
  .find-card { padding: 20px; }
  .type-grid { gap: 8px; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  #request-form { padding: 22px; }
  .progress li { font-size: .75rem; }
  .auth { margin-top: 32px; padding: 26px; }
  .filters { width: 100%; }
  .facts div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation: none !important; transition: none !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .heart-line, .flow path { stroke-dashoffset: 0; }
}

/* ---------- share sheet ---------- */
.share-dialog { display: grid; gap: 14px; width: min(440px, 100%); }
.share-dialog h3 { font-size: 1.25rem; }
.share-preview { display: grid; place-items: center; aspect-ratio: 4 / 5; height: min(46vh, 420px); margin-inline: auto; border-radius: 16px; overflow: hidden; background: var(--card-2); border: 1px solid var(--line); }
.share-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-actions .btn { justify-content: center; }
.share-actions .btn[hidden] { display: none; }
.share-hint { font-size: .9rem; margin: 0; }
.share-dialog .dialog-actions { margin-top: 0; }

/* ---------- map ---------- */
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 16px; }
.map-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.map-filter { font: 700 .95rem/1 var(--font); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-hi); background: var(--card); color: var(--ink); cursor: pointer; }
.map-filter[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }
.map-count { margin-inline-start: auto; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.map-box { height: min(68vh, 620px); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card-2); z-index: 0; }
.map-box .notice { padding: 24px; }
[data-theme="dark"] .map-box .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
.place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: min(68vh, 620px); overflow: auto; }
.place { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); line-height: 1.5; }
.place[data-kind="blood"] { border-inline-start: 4px solid var(--coral); }
.place-go { position: absolute; inset: 0; background: none; border: 0; border-radius: inherit; cursor: pointer; }
.place-go:hover { background: var(--soft); }
.place-actions { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.map-pin { display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 4px 10px rgb(0 0 0 / .35); }
.map-pin svg { width: 14px; height: 14px; fill: #fff; }
.pin-blood { background: var(--coral); }
.pin-hospital { background: #3b82f6; }
.place-pop { display: grid; gap: 2px; font: 400 .95rem/1.5 var(--font); min-width: 190px; }
.map-box .leaflet-popup-content-wrapper, .map-box .leaflet-popup-tip { background: var(--card); color: var(--ink); }
.map-box.leaflet-container { font-family: var(--font); background: var(--card-2); }
@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-box { height: 52vh; }
  .place-list { max-height: none; }
}

/* ---------- donor history & badges ---------- */
.hist-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hist-stats > div { display: grid; padding: 16px; border-radius: 16px; background: var(--soft); text-align: center; line-height: 1.3; }
.hist-stats strong { font-size: 2.2rem; font-weight: 900; color: var(--coral); }
.hist-stats span { color: var(--muted); font-weight: 600; }
.badges { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.badge { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; border: 1px dashed var(--line-hi); text-align: center; line-height: 1.35; opacity: .5; filter: grayscale(1); }
.badge.earned { opacity: 1; filter: none; border: 1px solid var(--amber); background: var(--amber-soft); }
.badge-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad-coral); }
.badge-icon svg { width: 22px; height: 22px; fill: #fff; }
.badge small { color: var(--muted); font-size: .8rem; }
.badge-next { display: grid; gap: 6px; margin: 0; color: var(--muted); font-weight: 600; }
.badge-next p { margin: 0; }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--grad-coral); }
.hist-add { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: end; }
.hist-add .field { margin: 0; }
.hist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hist-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.hist-list li > span:nth-child(2) { display: grid; flex: 1; line-height: 1.4; }
.hist-list small { color: var(--muted); }
.hist-dot svg { width: 18px; height: 18px; fill: var(--coral); }
@media (max-width: 640px) { .hist-add { grid-template-columns: 1fr; } }

/* ---------- campaigns ---------- */
.camp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.camp { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.camp-main { display: grid; gap: 4px; min-width: 0; }
.camp-main h3 { font-size: 1.15rem; }
.camp-main .muted svg, .camp-detail .muted svg { width: 16px; height: 16px; fill: currentColor; vertical-align: -3px; margin-inline-end: 4px; }
.camp-fill { display: grid; gap: 4px; margin-top: 6px; }
.camp-fill small { color: var(--muted); }
.day-box { display: grid; place-items: center; align-content: center; width: 64px; height: 70px; border-radius: 16px; background: var(--grad-coral); color: #fff; line-height: 1.1; }
.day-box strong { font-size: 1.6rem; font-weight: 900; }
.day-box small { font-weight: 700; }
.camp-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.camp-detail .facts { margin: 18px 0; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.slot { display: grid; gap: 2px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line-hi); background: var(--card-2); color: var(--ink); font: inherit; cursor: pointer; line-height: 1.3; transition: border-color .2s, background-color .2s, transform .2s; }
.slot:hover:not(:disabled) { border-color: var(--coral); transform: translateY(-2px); }
.slot small { color: var(--muted); font-size: .8rem; }
.slot:disabled { cursor: default; opacity: .45; }
.slot.is-mine { opacity: 1; border-color: var(--ok); background: var(--ok-soft); }
.table-wrap { overflow-x: auto; }
.book-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.book-table th, .book-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.book-table th { color: var(--muted); font-weight: 700; }
.camp-new { margin-top: 14px; }
.camp-new > summary { list-style: none; width: fit-content; }
.camp-new > summary::-webkit-details-marker { display: none; }
.camp-new[open] > summary { margin-bottom: 14px; }
.camp-old { margin-top: 14px; }
.camp-old > summary { cursor: pointer; color: var(--muted); font-weight: 700; margin-bottom: 12px; }

/* ---------- hospital dashboard ---------- */
.hosp { display: grid; gap: 18px; }
.hosp > h1, .hosp > .lead { margin: 0; }
.hosp-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hs-tile { display: grid; gap: 2px; padding: 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); line-height: 1.3; }
.hs-tile svg { width: 22px; height: 22px; fill: var(--coral); }
.hs-tile strong { font-size: 1.7rem; font-weight: 900; }
.hs-tile small { color: var(--muted); font-weight: 600; }
.hs-sub { font-size: 1.05rem; margin-top: 8px; }
.hs-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-bars li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; }
.hs-bars .g, .stock-row legend.g { font-weight: 900; font-family: Inter, var(--font); color: var(--coral); }
.hs-bars small { color: var(--muted); }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.stock-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; }
.stock-row legend { float: inline-start; padding: 0; font-size: 1.15rem; }
.stock-seg { gap: 6px; }
.stock-seg label { min-width: 0; padding-inline: 4px; font-size: .85rem; white-space: normal; text-align: center; }
.is-locked { opacity: .55; }

/* ---------- shortages ---------- */
.short-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.short-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.short-card.is-critical { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral) inset; }
.short-type { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 18px; background: var(--grad-coral); color: #fff; font: 900 1.3rem/1 Inter, var(--font); text-decoration: none; }
.short-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; line-height: 1.4; }
.short-card li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lvl-chip-LOW { background: var(--amber-soft); color: var(--amber); }
.lvl-chip-CRITICAL { background: var(--soft); color: var(--coral); }
.place-short { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0; color: var(--coral); font-weight: 700; }
.place-short > svg { width: 16px; height: 16px; fill: currentColor; }
.map-pin.pin-short { box-shadow: 0 0 0 4px rgb(255 75 92 / .55), 0 4px 10px rgb(0 0 0 / .35); background: var(--coral); }

/* The nav has 7–8 links now: give it its own row before it can push the header off screen. */
@media (max-width: 1180px) {
  .header-in { flex-wrap: wrap; gap: 4px 10px; padding-block: 10px; }
  .header-in .logo { margin-inline-end: auto; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-inline: 0; }
}
.stock-row, .stock-seg { min-width: 0; }

/* Search filters: labels, boxes and the button line up; the "nearby areas" hint sits under the row. */
.filters { align-items: flex-end; padding-bottom: 38px; }
.filters .field { position: relative; display: grid; gap: 6px; }
.filters .field label { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.4; }
.filters .field select { min-height: 52px; }
.filters .field .hint { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; margin: 0; white-space: nowrap; font-size: .85rem; }
.filters > .btn { min-height: 52px; }

/* Stock levels: no radio dot (too cramped), and each level has its own colour when picked. */
.stock-seg label span::before { display: none; }
.stock-seg label { min-height: 44px; }
.stock-seg label.lvl-OK:has(input:checked) { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.stock-seg label.lvl-LOW:has(input:checked) { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.stock-seg label.lvl-CRITICAL:has(input:checked) { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: 0 0 0 1px var(--coral), 0 0 18px -4px rgb(255 75 92 / .8); }
.stock-row { padding-block: 10px; }

/* ---------- home: per-account sections ---------- */
.me-home { display: grid; gap: 18px; }
.me-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); }
.me-banner.is-ready { border-color: var(--ok); background: linear-gradient(135deg, var(--ok-soft), var(--card) 60%); }
.me-banner.is-resting { border-color: var(--amber); background: linear-gradient(135deg, var(--amber-soft), var(--card) 60%); }
.me-banner h2 { font-size: 1.3rem; }
.me-banner p { margin: 2px 0 0; color: var(--muted); }
.me-type { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--grad-coral); color: #fff; font: 900 1.4rem/1 Inter, var(--font); }
.hh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hh-card { display: grid; gap: 4px; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; line-height: 1.3; transition: border-color .2s, transform .3s var(--spring); }
.hh-card:hover { border-color: var(--coral); transform: translateY(-3px); }
.hh-card svg { width: 24px; height: 24px; fill: var(--coral); }
.hh-card strong { font-size: 1.8rem; font-weight: 900; font-family: Inter, var(--font); }
.hh-card small { color: var(--muted); font-weight: 600; }
.hh-card.warn { border-color: var(--amber); background: var(--amber-soft); }
.hh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.history-invite .btn { width: fit-content; }
@media (max-width: 640px) { .me-banner { grid-template-columns: auto 1fr; } .me-banner > .btn { grid-column: 1 / -1; } }

/* ---------- admin statistics ---------- */
.an-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.an-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.an-bar { position: absolute; bottom: 0; width: 70%; border-radius: 4px 4px 0 0; min-height: 2px; }
.an-bar.views { background: rgb(255 75 92 / .35); }
.an-bar.people { width: 40%; background: var(--coral); }
.an-col:hover .an-bar.views { background: rgb(255 75 92 / .55); }
.an-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.an-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.an-legend .views { background: rgb(255 75 92 / .35); }
.an-legend .people { background: var(--coral); margin-inline-start: 8px; }
.an-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.an-list li { grid-template-columns: minmax(90px, auto) 1fr auto; }

/* ---------- notification centre ---------- */
.bell-btn { position: relative; }
.bell-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: #fff; font: 800 .72rem/19px Inter, var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notices { display: grid; gap: 18px; }
.notices > h1, .notices > .lead { margin: 0; }
.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notice-item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s, transform .3s var(--spring); }
.notice-item:has(.notice-link):hover { border-color: var(--coral); transform: translateY(-2px); }
.notice-item.is-unread { border-color: var(--coral); background: linear-gradient(135deg, var(--soft), var(--card) 55%); }
.notice-item.is-unread::after { content: ""; position: absolute; top: 18px; inset-inline-end: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.notice-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--soft); }
.notice-icon svg { width: 20px; height: 20px; fill: var(--coral); }
.notice-item[data-kind="ELIGIBLE"] .notice-icon, .notice-item[data-kind="APPROVED"] .notice-icon { background: var(--ok-soft); }
.notice-item[data-kind="ELIGIBLE"] .notice-icon svg, .notice-item[data-kind="APPROVED"] .notice-icon svg { fill: var(--ok); }
.notice-item[data-kind="CAMPAIGN_CANCELLED"] .notice-icon { background: var(--amber-soft); }
.notice-item[data-kind="CAMPAIGN_CANCELLED"] .notice-icon svg { fill: var(--amber); }
.notice-body { display: grid; gap: 2px; line-height: 1.5; padding-inline-end: 18px; min-width: 0; }
.notice-body small { color: var(--muted); font-size: .82rem; }
.notice-body .hot { color: var(--coral); }
.notice-link { position: absolute; inset: 0; border-radius: inherit; }
.pref-list { display: grid; gap: 12px; }

/* ---------- blood components ---------- */
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.comp-opt { position: relative; cursor: pointer; }
.comp-opt input { position: absolute; opacity: 0; pointer-events: none; }
.comp-opt > span { display: grid; gap: 4px; height: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--line-hi); background: var(--bg); line-height: 1.4; transition: border-color .2s, background-color .2s, transform .3s var(--spring); }
.comp-opt:hover > span { border-color: var(--coral); transform: translateY(-2px); }
.comp-opt input:checked + span { border-color: var(--coral); background: rgb(255 75 92 / .12); box-shadow: 0 0 0 1px var(--coral); }
.comp-opt input:focus-visible + span { outline: 2px solid var(--coral-2); outline-offset: 3px; }
.comp-opt small { color: var(--muted); font-size: .85rem; }
.comp-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--soft); }
.comp-icon svg { width: 18px; height: 18px; fill: var(--coral); }
.comp-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--amber-soft); color: var(--amber); }
.comp-chip svg { width: 13px; height: 13px; fill: currentColor; }
.hist-add { grid-template-columns: 1fr 1fr 1.3fr auto; }
@media (max-width: 760px) { .hist-add { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .hist-add { grid-template-columns: 1fr; } }

/* ---------- side menu (phones and small tablets) ---------- */
.menu-btn, .drawer-root { display: none; }
@media (max-width: 900px) {
  .header-in { flex-wrap: nowrap; padding-block: 8px; gap: 8px; min-height: 64px; }
  .header-in .logo { margin-inline-end: auto; }
  .header-in .nav { display: none; }
  /* The bar keeps only the bell and the menu button; the rest lives in the menu. */
  .header-actions > :not(.bell-btn, .menu-btn) { display: none; }
  .menu-btn { display: grid; }
  .drawer-root { display: block; }
}
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgb(10 6 14 / .55); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer {
  --dx: 105%;
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 91; width: min(320px, 86vw);
  display: flex; flex-direction: column; gap: 18px; padding: 16px 16px 24px; overflow-y: auto;
  background: var(--bg-2); border-inline-start: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(var(--dx)); visibility: hidden; transition: transform .38s var(--ease-out), visibility 0s linear .38s;
}
[dir="rtl"] .drawer { --dx: -105%; }
.menu-open { overflow: hidden; }
.menu-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.menu-open .drawer { transform: none; visibility: visible; transition: transform .38s var(--ease-out); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; line-height: 1.35; }
.drawer-user span:last-child { display: grid; min-width: 0; }
.drawer-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-user small { color: var(--muted); }
.drawer-avatar { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--grad-coral); }
.drawer-avatar svg { width: 20px; height: 20px; fill: #fff; }
.drawer-nav { display: grid; gap: 2px; }
.drawer-nav a { padding: 12px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.drawer-nav a:hover { background: var(--card); }
.drawer-nav a[aria-current="page"] { background: var(--soft); color: var(--coral); box-shadow: inset 3px 0 0 var(--coral); }
[dir="rtl"] .drawer-nav a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--coral); }
.drawer-actions { display: grid; gap: 8px; }
.drawer-actions .btn { justify-content: center; }
.drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop { transition: none; } }

/* Decorative lines (.flow) and glows may poke past the screen edge; never let them cause sideways scrolling. */
html, body { overflow-x: clip; }

/* ---------- messages ---------- */
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-inline-start: 6px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: #fff; font: 800 .7rem/18px Inter, var(--font); vertical-align: 1px; }
.menu-btn { position: relative; }
.menu-dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--bg); }
.convs, .chat { display: grid; gap: 16px; }
.convs > h1, .convs > .lead { margin: 0; }
.conv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.conv-item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s, transform .3s var(--spring); }
.conv-item:hover { border-color: var(--coral); transform: translateY(-2px); }
.conv-item.is-unread { border-color: var(--coral); background: linear-gradient(135deg, var(--soft), var(--card) 55%); }
.conv-avatar { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--grad-coral); color: #fff; font: 800 1.2rem/1 var(--font); }
.conv-body { display: grid; gap: 2px; min-width: 0; line-height: 1.45; }
.conv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.conv-top small { margin-inline-start: auto; color: var(--muted); font-size: .8rem; }
.conv-about { color: var(--muted); font-size: .9rem; text-decoration: none; }
a.conv-about:hover { color: var(--coral); }
.conv-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item.is-unread .conv-preview { font-weight: 700; }
.back-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--muted); text-decoration: none; font-weight: 700; }
.back-link svg { width: 18px; height: 18px; fill: currentColor; }
[dir="rtl"] .back-link svg { transform: scaleX(-1); }
.chat-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.chat-head h1 { font-size: 1.3rem; }
.chat-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.chat-tools svg { width: 16px; height: 16px; fill: currentColor; }
.chat-intro { display: grid; justify-items: center; gap: 6px; padding: 8px 12px; text-align: center; color: var(--muted); }
.chat-intro > svg { width: 22px; height: 22px; fill: var(--coral); }
.chat-intro p { margin: 0; }
.chat-intro blockquote { margin: 4px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); max-width: 46ch; }
.pending-card { display: grid; gap: 12px; padding: 18px; text-align: center; border-color: var(--coral); }
.pending-card p { margin: 0; }
.pending-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.msg { display: grid; gap: 2px; max-width: min(78%, 520px); padding: 10px 14px; border-radius: 18px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg small { font-size: .72rem; opacity: .75; white-space: nowrap; }
.msg.mine { align-self: flex-start; background: var(--grad-coral); color: #fff; border-end-start-radius: 6px; }
.msg.theirs { align-self: flex-end; background: var(--card); border: 1px solid var(--line); border-end-end-radius: 6px; }
.msg.is-phone span { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.msg.is-phone svg { width: 16px; height: 16px; fill: currentColor; }
.msg.is-phone a { color: inherit; font: 800 1.1rem/1.4 Inter, var(--font); }
.composer { position: sticky; bottom: 10px; display: grid; gap: 8px; padding: 12px; }
.composer textarea { resize: vertical; min-height: 52px; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.contact-dialog { display: grid; gap: 10px; width: min(440px, 100%); }
.contact-dialog h3 { font-size: 1.2rem; }
.contact-dialog label { font-weight: 700; }
.contact-dialog .cd-about { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--card-2); }
.report-reasons { display: grid; gap: 6px; }
.report-reasons label, .check-row { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.report-excerpt { margin: 6px 0; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font: inherit; font-size: .9rem; white-space: pre-wrap; max-height: 180px; overflow: auto; }
.convs .hint svg, .chat .hint svg, .chat .banner-warn svg { width: 15px; height: 15px; fill: currentColor; vertical-align: -2px; margin-inline-end: 4px; }
