/* ================================================================
   يد العون — Blood Donation Platform
   Design System v2 | Warm Red Palette | Clean & Spacious
   ================================================================ */

/* ── Google-free System Font Stack ── */
@font-face {
    font-family: 'SysArabic';
    src: local('Segoe UI'), local('Tahoma'), local('Arial');
}

:root {
    /* Warm red palette */
    --r900: #7f1d1d;
    --r800: #991b1b;
    --r700: #b91c1c;
    --r600: #dc2626;
    --r500: #ef4444;
    --r400: #f87171;
    --r300: #fca5a5;
    --r100: #fee2e2;
    --r50:  #fff5f5;

    /* Warm neutrals */
    --n900: #1c1917;
    --n800: #292524;
    --n700: #44403c;
    --n600: #57534e;
    --n500: #78716c;
    --n400: #a8a29e;
    --n300: #d6d3d1;
    --n200: #e7e5e4;
    --n100: #f5f5f4;
    --n50:  #fafaf9;
    --white: #ffffff;

    /* Accents */
    --gold:  #d97706;
    --gold-l:#fef3c7;

    /* Functional */
    --shadow-xs: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-md: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
    --shadow-lg: 0 20px 25px rgba(0,0,0,.1),  0 8px 10px rgba(0,0,0,.06);
    --shadow-xl: 0 25px 50px rgba(0,0,0,.15);
    --radius-sm: 6px;
    --radius:    10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --ease:      cubic-bezier(.4,0,.2,1);
    --dur:       .25s;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Segoe UI', 'Tahoma', 'Traditional Arabic', 'Arabic Typesetting', Arial, sans-serif;
    background: var(--n50);
    color: var(--n800);
    line-height: 1.75;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.3; color: var(--n900); }
a { text-decoration: none; color: inherit; transition: color var(--dur) var(--ease); }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Page management ── */
.page { display: none; }
.page.active { display: block; }

/* ── Container ── */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 900;
    height: 68px;
    background: var(--white);
    border-bottom: 1px solid var(--n200);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--dur) var(--ease);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    cursor: pointer;
}

.brand-icon {
    width: 40px; height: 40px;
    background: var(--r600);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(220,38,38,.35);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--n900);
}

.brand-name em {
    color: var(--r600);
    font-style: normal;
}

/* Nav items */
.nav-items {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--n600);
    transition: all var(--dur) var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--r600);
    background: var(--r100);
}

.nav-cta {
    padding: 9px 22px;
    background: var(--r600);
    color: var(--white) !important;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: .9rem;
    margin-right: 8px;
    box-shadow: 0 4px 14px rgba(220,38,38,.35);
    transition: all var(--dur) var(--ease);
}

.nav-cta:hover {
    background: var(--r700);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220,38,38,.45);
    color: var(--white);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 22px; height: 2.5px;
    background: var(--n700);
    border-radius: 2px;
    transition: all var(--dur) var(--ease);
}

.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 68px; right: 0; left: 0;
    background: var(--white);
    border-bottom: 1px solid var(--n200);
    padding: 16px 24px 20px;
    z-index: 899;
    box-shadow: var(--shadow-md);
    animation: slideDown .2s var(--ease);
}

.mobile-nav.open { display: block; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-nav a {
    display: block;
    padding: 11px 0;
    border-bottom: 1px solid var(--n100);
    color: var(--n700);
    font-weight: 500;
}

.mobile-nav a:last-child { border-bottom: none; }

/* ================================================================
   EMERGENCY TICKER
   ================================================================ */
.ticker-bar {
    background: var(--r600);
    margin-top: 68px;
    overflow: hidden;
}

.ticker-inner {
    display: flex;
    align-items: center;
    height: 46px;
}

.ticker-badge {
    background: var(--r800);
    color: var(--white);
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .5px;
}

.live-dot {
    width: 8px; height: 8px;
    background: #fca5a5;
    border-radius: 50%;
    animation: blink 1.1s infinite;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50%      { opacity: .2; }
}

.ticker-scroll-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-scroll {
    display: flex;
    animation: scroll-rtl 18s linear infinite;
    white-space: nowrap;
}

.ticker-scroll:hover { animation-play-state: paused; }

@keyframes scroll-rtl {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 36px;
    color: var(--white);
    font-size: .88rem;
    font-weight: 500;
}

.ticker-item .tag {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-size: .8rem;
}

.ticker-sep {
    color: rgba(255,255,255,.3);
    font-size: 1.2rem;
    padding: 0 8px;
}

/* ================================================================
   HOME PAGE
   ================================================================ */

/* Hero */
.hero {
    background: linear-gradient(160deg, var(--r50) 0%, var(--white) 60%);
    padding: 72px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    width: 480px; height: 480px;
    background: radial-gradient(circle, var(--r100) 0%, transparent 68%);
    bottom: -100px; left: -100px;
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--r100);
    color: var(--r700);
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid var(--r300);
}

.hero h1 {
    font-size: clamp(1.9rem, 3.5vw, 2.9rem);
    font-weight: 900;
    color: var(--n900);
    margin-bottom: 16px;
    line-height: 1.25;
}

.hero h1 span { color: var(--r600); }

.hero-lead {
    color: var(--n600);
    font-size: 1rem;
    margin-bottom: 32px;
    max-width: 440px;
}

.hero-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-solid {
    padding: 13px 30px;
    background: var(--r600);
    color: var(--white);
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: .95rem;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 6px 18px rgba(220,38,38,.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-solid:hover {
    background: var(--r700);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(220,38,38,.45);
    color: var(--white);
}

.btn-ghost {
    padding: 12px 28px;
    border: 2px solid var(--n300);
    color: var(--n700);
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: .9rem;
    transition: all var(--dur) var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ghost:hover {
    border-color: var(--r400);
    color: var(--r600);
    background: var(--r50);
}

/* Hero visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-card-stack {
    position: relative;
    width: 300px;
    height: 320px;
}

.hero-bg-circle {
    position: absolute;
    width: 280px; height: 280px;
    background: var(--r100);
    border-radius: 50%;
    top: 20px; right: 10px;
}

.blood-drop-big {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9rem;
    animation: float-drop 4s ease-in-out infinite;
    filter: drop-shadow(0 12px 24px rgba(220,38,38,.3));
    line-height: 1;
}

@keyframes float-drop {
    0%,100% { transform: translate(-50%,-50%) translateY(0); }
    50%      { transform: translate(-50%,-50%) translateY(-14px); }
}

.hero-stat-badge {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--n200);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float-badge 3.5s ease-in-out infinite;
}

.hero-stat-badge:nth-child(3) { bottom: 10px; right: -10px; animation-delay: 0s; }
.hero-stat-badge:nth-child(4) { top: 30px; left: -20px; animation-delay: 1.5s; }

@keyframes float-badge {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.badge-icon { font-size: 1.6rem; }
.badge-num { font-size: 1.1rem; font-weight: 800; color: var(--n900); line-height: 1; }
.badge-lbl { font-size: .72rem; color: var(--n500); }

/* Stats strip */
.stats-strip {
    background: var(--white);
    border-top: 1px solid var(--n200);
    border-bottom: 1px solid var(--n200);
    padding: 28px 0;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 0;
}

.stat-cell {
    flex: 1;
    max-width: 200px;
    text-align: center;
    padding: 0 24px;
    position: relative;
}

.stat-cell:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0; top: 10%; bottom: 10%;
    width: 1px;
    background: var(--n200);
}

.stat-num {
    display: block;
    font-size: 1.85rem;
    font-weight: 900;
    color: var(--r600);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-lbl {
    display: block;
    font-size: .8rem;
    color: var(--n500);
}

/* ── Section shell ── */
.section {
    padding: 72px 0;
}

.section-head {
    margin-bottom: 48px;
    text-align: center;
}

.section-tag {
    display: inline-block;
    background: var(--r100);
    color: var(--r700);
    padding: 5px 14px;
    border-radius: var(--radius-xl);
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid var(--r300);
    letter-spacing: .5px;
}

.section-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 10px;
}

.section-sub {
    color: var(--n500);
    font-size: .95rem;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Why donate cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px 22px;
    border: 1px solid var(--n200);
    transition: all var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    bottom: 0; right: 0; left: 0;
    height: 3px;
    background: var(--r600);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--dur) var(--ease);
}

.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.info-card:hover::before { transform: scaleX(1); }

.card-icon {
    width: 52px; height: 52px;
    background: var(--r50);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    border: 1px solid var(--r100);
}

.info-card h3 { font-size: .95rem; margin-bottom: 8px; }
.info-card p  { font-size: .86rem; color: var(--n500); line-height: 1.65; }

/* ── Steps ── */
.steps-section { background: var(--r50); }

.steps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    position: relative;
}

/* dashed connector */
.steps-row::before {
    content: '';
    position: absolute;
    top: 28px; right: 10%; left: 10%;
    height: 1px;
    border-top: 2px dashed var(--r300);
    z-index: 0;
}

.step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-num {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--r600);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 6px 16px rgba(220,38,38,.35);
    position: relative;
}

.step h3 { font-size: .92rem; margin-bottom: 6px; }
.step p  { font-size: .84rem; color: var(--n500); }

/* ── CTA Banner ── */
.cta-banner {
    background: linear-gradient(135deg, var(--r700) 0%, var(--r600) 50%, var(--gold) 120%);
    padding: 64px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '🩸';
    position: absolute;
    font-size: 16rem;
    opacity: .05;
    right: -2rem; top: -3rem;
    line-height: 1;
}

.cta-banner h2 { color: var(--white); font-size: clamp(1.5rem,3vw,2.2rem); margin-bottom: 12px; }
.cta-banner p  { color: rgba(255,255,255,.8); max-width: 440px; margin: 0 auto 28px; font-size: .95rem; }

.btn-white {
    padding: 14px 38px;
    background: var(--white);
    color: var(--r700);
    border-radius: var(--radius-xl);
    font-weight: 800;
    font-size: 1rem;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    display: inline-block;
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0,0,0,.25);
    color: var(--r700);
}

/* ================================================================
   BLOOD SEARCH PAGE
   ================================================================ */
.search-page-wrap {
    padding: 68px 0 0; /* account for fixed navbar */
    min-height: 100vh;
    background: var(--n50);
}

.page-hero {
    background: linear-gradient(135deg, var(--r700) 0%, var(--r500) 100%);
    padding: 52px 0 60px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border: 80px solid rgba(255,255,255,.06);
    border-radius: 50%;
    top: -200px; right: -200px;
}

.page-hero h1 { color: var(--white); font-size: clamp(1.7rem,3vw,2.4rem); margin-bottom: 10px; }
.page-hero p  { color: rgba(255,255,255,.8); font-size: .95rem; }

/* Blood type selector */
.blood-selector {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    margin: -36px auto 0;
    max-width: 800px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--n200);
}

.selector-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--n600);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selector-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--n200);
}

.blood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.btype-btn {
    border: 2px solid var(--n200);
    border-radius: var(--radius-md);
    padding: 20px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    background: var(--white);
}

.btype-btn:hover {
    border-color: var(--r400);
    background: var(--r50);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.btype-btn.active {
    border-color: var(--r600);
    background: var(--r600);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(220,38,38,.4);
    transform: translateY(-3px);
}

.btype-val {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}

.btype-sub {
    font-size: .7rem;
    font-weight: 500;
    opacity: .7;
}

/* Result panel */
.result-panel {
    display: none;
    background: var(--n50);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--n200);
    animation: appear .3s var(--ease);
}

.result-panel.show { display: block; }

@keyframes appear {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--n900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-title .type-badge {
    background: var(--r600);
    color: var(--white);
    padding: 4px 14px;
    border-radius: var(--radius-xl);
    font-size: 1rem;
}

.compat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.compat-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 18px;
    border: 1px solid var(--n200);
}

.compat-box-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--n500);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.compat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 4px 14px;
    border-radius: var(--radius-xl);
    font-size: .82rem;
    font-weight: 700;
}

.chip-give    { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.chip-receive { background: var(--r100); color: var(--r700); border: 1px solid var(--r300); }

/* Tips below selector */
.search-tips {
    max-width: 800px;
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-bottom: 60px;
}

.tip-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px 18px;
    border: 1px solid var(--n200);
    text-align: center;
}

.tip-card .tip-icon { font-size: 1.6rem; margin-bottom: 10px; }
.tip-card h4 { font-size: .9rem; margin-bottom: 6px; }
.tip-card p  { font-size: .82rem; color: var(--n500); line-height: 1.6; }

/* ================================================================
   REGISTER (DONATE) PAGE
   ================================================================ */
.register-page-wrap {
    padding: 68px 0 0;
    min-height: 100vh;
    background: var(--n50);
}

.form-section {
    padding: 60px 0;
}

.form-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 44px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--n200);
}

.form-card h2 {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.form-card .form-sub {
    color: var(--n500);
    font-size: .9rem;
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--n700);
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    min-height: 48px;
    border: 1.5px solid var(--n300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .92rem;
    color: var(--n800);
    background: var(--white);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    outline: none;
}

.form-control:focus {
    border-color: var(--r500);
    box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

.form-control::-webkit-input-placeholder { color: var(--n400); }

select.form-control {
    background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23666" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6"></path></svg>');
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 14px;
    padding-left: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--r600);
    color: var(--white);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 800;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 6px 18px rgba(220,38,38,.35);
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--r700);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(220,38,38,.45);
}

/* ================================================================
   INFO PAGE
   ================================================================ */
.info-page-wrap {
    padding: 68px 0 0;
    min-height: 100vh;
    background: var(--n50);
}

.info-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 60px 24px;
}

.info-block {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 20px;
    border: 1px solid var(--n200);
    box-shadow: var(--shadow-xs);
}

.info-block h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--r700);
}

.info-block p, .info-block li {
    font-size: .9rem;
    color: var(--n600);
    line-height: 1.75;
}

.info-block ul { padding-right: 16px; }
.info-block ul li { list-style: disc; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    background: var(--n900);
    color: rgba(255,255,255,.55);
    padding: 52px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.f-brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    display: block;
}

.f-brand-name em { color: var(--r400); font-style: normal; }

.footer p { font-size: .86rem; line-height: 1.7; margin-bottom: 0; }

.footer-col h4 {
    color: var(--white);
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--r600);
    display: inline-block;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,.5);
    font-size: .86rem;
    padding: 5px 0;
    transition: color var(--dur) var(--ease);
}

.footer-col a:hover { color: var(--r400); }

.footer-bottom {
    text-align: center;
    font-size: .78rem;
    color: rgba(255,255,255,.28);
}

.footer-bottom strong { color: var(--r400); }

/* ================================================================
   TOAST NOTIFICATION
   ================================================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--n900);
    color: var(--white);
    padding: 14px 28px;
    border-radius: var(--radius-xl);
    font-size: .9rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 4px solid var(--r500);
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .nav-items { display: none; }
    .hamburger { display: flex; }
    .search-tips { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .blood-grid { grid-template-columns: repeat(2, 1fr); }
    .compat-row { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 28px 20px; }
    .stats-row { flex-wrap: wrap; gap: 16px; }
    .stat-cell { flex: none; width: 45%; }
    .stat-cell::after { display: none; }
}

/* ================================================================
   COMPATIBILITY MATRIX
   ================================================================ */

.compat-matrix-wrap {
    overflow-x: auto;
    margin-bottom: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--n200);
    box-shadow: var(--shadow-sm);
}

.compat-matrix {
    border-collapse: collapse;
    width: 100%;
    min-width: 520px;
    font-size: .85rem;
}

/* Header row */
.compat-matrix thead tr {
    background: var(--n900);
}

.compat-matrix thead th {
    padding: 10px 14px;
    color: var(--white);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* Corner label */
.compat-matrix .corner-cell {
    background: var(--r700);
    color: var(--white);
    font-size: .75rem;
    line-height: 1.3;
    padding: 8px 10px;
    min-width: 80px;
}

/* Row header */
.compat-matrix tbody th {
    background: var(--n50);
    border-bottom: 1px solid var(--n200);
    border-left: 1px solid var(--n200);
    padding: 0 12px;
    text-align: center;
    white-space: nowrap;
}

.compat-matrix .row-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: var(--r600);
    color: var(--white);
    border-radius: 50%;
    font-weight: 900;
    font-size: .85rem;
    margin: 6px 0;
}

/* Cells */
.compat-matrix tbody td {
    padding: 0;
    border-bottom: 1px solid var(--n200);
    border-left: 1px solid var(--n200);
    text-align: center;
    min-width: 52px;
    height: 52px;
    transition: background var(--dur) var(--ease);
}

.compat-matrix tbody tr:last-child td,
.compat-matrix tbody tr:last-child th {
    border-bottom: none;
}

/* Same type highlight */
.compat-matrix tbody tr:hover td { background: var(--n50); }

/* YES cell */
.cell-yes {
    background: #f0fdf4;
    color: #166534;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: default;
}

.cell-yes:hover { background: #dcfce7 !important; }

/* NO cell */
.cell-no {
    background: var(--white);
    color: var(--n300);
    font-size: 1rem;
    cursor: default;
}

/* Diagonal (same type) */
.cell-self {
    background: var(--r50);
    color: var(--r400);
    font-size: 1.1rem;
}

/* Column header badges */
.col-type-badge {
    display: inline-block;
    background: var(--r100);
    color: var(--r700);
    border: 1px solid var(--r300);
    border-radius: var(--radius-xl);
    padding: 3px 10px;
    font-weight: 800;
    font-size: .82rem;
}

/* ── Summary cards per blood type ── */
.compat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.compat-card {
    border: 1px solid var(--n200);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    transition: all var(--dur) var(--ease);
}

.compat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.compat-card-head {
    background: var(--r600);
    color: var(--white);
    text-align: center;
    padding: 12px 8px 10px;
}

.compat-card-type {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    display: block;
}

.compat-card-sub {
    font-size: .7rem;
    opacity: .8;
    margin-top: 2px;
    display: block;
}

.compat-card-body {
    padding: 12px 10px;
}

.compat-mini-label {
    font-size: .68rem;
    font-weight: 700;
    color: var(--n400);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}

.compat-mini-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.mini-chip {
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
}

.mini-chip-give    { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.mini-chip-receive { background: var(--r100); color: var(--r700); border: 1px solid var(--r300); }

/* Responsive matrix */
@media (max-width: 760px) {
    .compat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
    .compat-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--n100); }
::-webkit-scrollbar-thumb { background: var(--r400); border-radius: 3px; }

/* ================================================================
   ADMIN LOGIN & DASHBOARD
   ================================================================ */

/* Settings Icon in Navbar */
.nav-settings {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--n500);
    cursor: pointer;
    padding: 6px 10px;
    transition: all var(--dur) var(--ease);
}
.nav-settings:hover {
    color: var(--r600);
    transform: rotate(30deg);
}

/* Admin Dashboard Layout */
.dashboard-wrap {
    display: flex;
    min-height: calc(100vh - 68px);
    margin-top: 68px;
    background: var(--n50);
}

/* Sidebar */
.dashboard-sidebar {
    width: 260px;
    background: var(--white);
    border-left: 1px solid var(--n200);
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.sidebar-header {
    padding: 0 20px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--n900);
    border-bottom: 1px solid var(--n100);
    margin-bottom: 10px;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
}
.sidebar-link {
    padding: 12px 20px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--n700);
    text-align: right;
    transition: all var(--dur) var(--ease);
    border-right: 3px solid transparent;
}
.sidebar-link:hover, .sidebar-link.active {
    background: var(--r50);
    color: var(--r600);
    border-right-color: var(--r600);
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}
.dashboard-panel {
    display: none;
}
.dashboard-panel.active {
    display: block;
    animation: fadeIn .3s var(--ease);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.panel-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--n900);
}
.btn-add {
    padding: 10px 20px;
    background: var(--r600);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: .9rem;
    box-shadow: 0 4px 12px rgba(220,38,38,.2);
    transition: all var(--dur) var(--ease);
}
.btn-add:hover {
    background: var(--r700);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220,38,38,.3);
    color: var(--white);
}

/* Data Table */
.data-table-wrap {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--n200);
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 14px 20px;
    text-align: right;
    border-bottom: 1px solid var(--n100);
}
.data-table th {
    background: var(--n50);
    font-size: .85rem;
    font-weight: 700;
    color: var(--n500);
    text-transform: uppercase;
}
.data-table td {
    font-size: .95rem;
    color: var(--n800);
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tr:hover td {
    background: var(--r50);
}

/* Table Actions */
.action-btns {
    display: flex;
    gap: 8px;
}
.btn-edit, .btn-delete {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    transition: all var(--dur) var(--ease);
}
.btn-edit {
    background: var(--n100);
    color: var(--n700);
}
.btn-edit:hover {
    background: var(--n200);
    color: var(--n900);
}
.btn-delete {
    background: #fee2e2;
    color: var(--r700);
}
.btn-delete:hover {
    background: #fecaca;
    color: var(--r800);
}

@media (max-width: 900px) {
    .dashboard-wrap {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--n200);
        padding: 15px 0;
    }
    .sidebar-header {
        margin-bottom: 0;
        border-bottom: none;
        padding-bottom: 10px;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .sidebar-link {
        border-right: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        text-align: center;
        padding: 10px 15px;
        margin-top: 0 !important;
    }
    .sidebar-link:hover, .sidebar-link.active {
        border-right-color: transparent;
        border-bottom-color: var(--r600);
        background: transparent;
    }
    .dashboard-content {
        padding: 16px;
    }
    .data-table-wrap {
        overflow-x: auto;
    }
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ================================================================
   SEARCH ENHANCEMENTS (CITIES & DONORS)
   ================================================================ */

/* City Selector */
.city-selector-panel {
    display: none;
    margin-top: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--n200);
    box-shadow: var(--shadow-md);
    animation: appear .3s var(--ease);
}
.city-selector-panel.show {
    display: block;
}
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.city-btn {
    background: var(--n50);
    border: 1.5px solid var(--n200);
    padding: 12px 8px;
    border-radius: var(--radius-md);
    font-size: .88rem;
    font-weight: 700;
    color: var(--n700);
    text-align: center;
    transition: all var(--dur) var(--ease);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}
.city-btn:hover {
    background: var(--r50);
    border-color: var(--r400);
    color: var(--r700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.city-btn.active {
    background: var(--r600);
    color: var(--white);
    border-color: var(--r600);
    box-shadow: 0 6px 14px rgba(220,38,38,.35);
    transform: translateY(-2px);
}

/* Donors Panel */
.donors-panel {
    display: none;
    margin-top: 24px;
    animation: appear .3s var(--ease);
}
.donors-panel.show {
    display: block;
}

/* Mobile-first Donor List */
.donor-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.donor-card {
    background: var(--white);
    border: 1px solid var(--n200);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--dur) var(--ease);
}
.donor-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--r300);
}
.donor-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.donor-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--n900);
    display: flex;
    align-items: center;
    gap: 8px;
}
.donor-name::before {
    content: '👤';
    font-size: 1.2rem;
}
.donor-meta {
    font-size: .85rem;
    color: var(--n500);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.donor-meta .badge {
    background: var(--r100);
    color: var(--r700);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: .8rem;
    border: 1px solid var(--r300);
}
.donor-meta .city-badge {
    background: var(--n100);
    color: var(--n700);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: .8rem;
    border: 1px solid var(--n200);
}
.btn-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #16a34a;
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-xl);
    font-size: .95rem;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    transition: all var(--dur) var(--ease);
    flex-shrink: 0;
}
.btn-call:hover {
    background: #15803d;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.45);
    color: white;
}
.btn-call span {
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .city-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .city-btn {
        padding: 10px 4px;
        font-size: .8rem;
    }
    .donor-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }
    .btn-call {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
    }
    .city-selector-panel {
        padding: 20px 16px;
    }
}
@media (max-width: 400px) {
    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

