/* ============================================================
   BloodBridge — Donor Pages Styles (Pages 11-13)
   ============================================================ */

/* ── Donor Login — Two-Panel Layout ── */
.donor-login-page {
    display: flex;
    min-height: 100vh;
}

.donor-login-hero {
    flex: 0 0 42%;
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--navy) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.donor-login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.donor-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-8);
    max-width: 400px;
}

.donor-hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-8);
}

.donor-hero-logo-icon { width: 32px; height: 32px; color: var(--white); }
.donor-hero-logo-icon svg { width: 100%; height: 100%; }
.donor-hero-logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
}

.donor-hero-title {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-3);
}

.donor-hero-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    margin-bottom: var(--space-8);
}

.donor-hero-illustration {
    display: flex;
    justify-content: center;
}

/* Floating Blood Cells */
.floating-cell {
    position: absolute;
    border-radius: 50%;
    background: rgba(192,57,43,0.2);
    animation: floatCell linear infinite;
}

@keyframes floatCell {
    0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ── Login Form Panel ── */
.donor-login-form-panel {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--white);
    padding: 40px 48px;
    overflow-y: auto;
    max-height: 100vh;
}

.donor-login-form-wrapper {
    max-width: 420px;
    width: 100%;
}

/* ── Auth Tabs ── */
.donor-auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--grey-100);
    margin-bottom: 28px;
}

.donor-auth-tab {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--grey-600);
    cursor: pointer;
    transition: all 200ms;
    margin-bottom: -2px;
}

.donor-auth-tab:hover { color: var(--grey-900); }

.donor-auth-tab.active {
    color: var(--teal-primary);
    border-bottom-color: var(--teal-primary);
}

/* ── Auth Form ── */
.donor-auth-heading {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--grey-900);
    margin-bottom: 4px;
}

.donor-auth-subtext {
    color: var(--grey-600);
    font-size: 14px;
    margin-bottom: 24px;
}

.auth-form-group {
    margin-bottom: 18px;
}

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

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-900);
    margin-bottom: 6px;
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--grey-300);
    border-radius: 10px;
    padding: 0 12px;
    background: var(--white);
    transition: border-color 200ms, box-shadow 200ms;
}

.auth-input-wrap:focus-within {
    border-color: var(--teal-primary);
    box-shadow: 0 0 0 3px rgba(26,122,138,0.08);
}

.auth-input-icon {
    width: 18px;
    height: 18px;
    color: var(--grey-600);
    flex-shrink: 0;
    margin-right: 10px;
}

.auth-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 14px;
    background: transparent;
    color: var(--grey-900);
}

.auth-input::placeholder { color: var(--grey-600); opacity: 0.6; }

.auth-select {
    appearance: none;
    cursor: pointer;
}

.auth-eye-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grey-600);
    padding: 4px;
    display: flex;
    align-items: center;
}

.auth-eye-btn:hover { color: var(--grey-900); }

.auth-forgot {
    display: block;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--teal-primary);
    margin-top: 6px;
}

.auth-forgot:hover { color: var(--teal-dark); }

/* ── Submit Button ── */
.btn-auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms;
    margin-top: 4px;
}

.btn-auth-submit:hover {
    background: #243656;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(27,42,74,0.2);
}

/* ── Divider ── */
.donor-auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 12px;
}

.donor-auth-divider::before,
.donor-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--grey-200);
}

.donor-auth-divider span {
    font-size: 13px;
    color: var(--grey-600);
}

/* ── Google Button ── */
.btn-google-signin {
    width: 100%;
    padding: 12px;
    background: var(--white);
    border: 1.5px solid var(--teal-primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-900);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 200ms;
}

.btn-google-signin:hover {
    background: rgba(26,122,138,0.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Toggle Link ── */
.donor-auth-toggle {
    text-align: center;
    font-size: 13px;
    color: var(--grey-600);
    margin-top: 16px;
}

.donor-auth-toggle a {
    color: var(--teal-primary);
    font-weight: 700;
}

.donor-auth-toggle a:hover { color: var(--teal-dark); }

/* ── Demo Accounts Collapsible ── */
.donor-demo-section {
    margin-top: 24px;
    border: 1px solid var(--grey-100);
    border-radius: 12px;
    overflow: hidden;
}

.donor-demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    background: var(--grey-50);
    transition: background 200ms;
}

.donor-demo-header:hover { background: var(--grey-100); }

.donor-demo-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-900);
}

.donor-demo-arrow {
    width: 18px;
    height: 18px;
    color: var(--grey-600);
    transition: transform 300ms;
}

.donor-demo-arrow svg { width: 100%; height: 100%; }

.donor-demo-header.open .donor-demo-arrow {
    transform: rotate(180deg);
}

.donor-demo-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms var(--ease-out), padding 400ms;
    padding: 0 16px;
}

.donor-demo-panel.open {
    max-height: 1000px;
    padding: 16px;
}

/* ── Donor Select Grid (inside demo) ── */
.donor-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.donor-select-card {
    padding: 12px 8px;
    border: 2px solid var(--grey-100);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 200ms var(--ease-out);
    position: relative;
}

.donor-select-card:hover {
    border-color: var(--teal-primary);
    background: rgba(26,122,138,0.03);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.donor-select-card.selected {
    border-color: var(--teal-primary);
    background: rgba(26,122,138,0.06);
    box-shadow: 0 0 0 3px rgba(26,122,138,0.1);
}

.donor-select-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    color: var(--teal-primary);
    font-weight: bold;
    font-size: 12px;
}

.donor-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

.donor-card-name {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
    color: var(--grey-900);
}

.donor-card-bg {
    font-size: 11px;
    color: var(--red-primary);
    font-weight: 700;
}

.btn-donor-login {
    width: 100%;
    padding: 12px;
    background: var(--teal-primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all 200ms var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-donor-login:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.btn-donor-login:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-donor-login .spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    display: none;
}

.btn-donor-login.loading .spinner { display: block; animation: spin 600ms linear infinite; }
.btn-donor-login.loading .btn-label { display: none; }

/* Dark mode overrides */
body.dark-mode .donor-login-form-panel { background: #0d1117; }
body.dark-mode .donor-auth-heading { color: #f1f3f5; }
body.dark-mode .donor-auth-subtext { color: #8b949e; }
body.dark-mode .donor-auth-tab { color: #8b949e; }
body.dark-mode .donor-auth-tab.active { color: var(--teal-primary); }
body.dark-mode .auth-input-wrap { border-color: #30363d; background: #161b22; }
body.dark-mode .auth-input { color: #f1f3f5; }
body.dark-mode .auth-label { color: #c9d1d9; }
body.dark-mode .btn-google-signin { background: #161b22; border-color: #30363d; color: #f1f3f5; }
body.dark-mode .btn-auth-submit { background: #1A7A8A; color: #f1f3f5; }
body.dark-mode .btn-auth-submit:hover { background: #145F6E; }
body.dark-mode .donor-demo-header { background: #161b22; }
body.dark-mode .donor-demo-section { border-color: #30363d; }
body.dark-mode .donor-select-card { border-color: #30363d; }
body.dark-mode .donor-card-name { color: #c9d1d9; }
body.dark-mode .donor-card-bg { color: #E74C3C; }
body.dark-mode .btn-donor-login:disabled { background: #2a2d35; color: #6b7280; opacity: 1; border: 1px solid #30363d; }
body.dark-mode .donor-welcome-name,
body.dark-mode .donor-welcome-sub,
body.dark-mode .donor-meta-item { color: #f1f3f5 !important; }

/* ── Donor Dashboard Layout ── */
.donor-dashboard {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    padding: var(--space-6) var(--space-8);
    min-height: calc(100vh - 60px);
}

.donor-dash-main { min-width: 0; }

.donor-dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* ── Donor Welcome Banner ── */
.donor-welcome {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--navy) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-8);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
    position: relative;
    overflow: hidden;
}

.donor-welcome::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.donor-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
    color: var(--white);
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.donor-welcome-info { position: relative; z-index: 1; flex: 1; }

.donor-welcome-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-1);
}

.donor-welcome-sub {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.7);
    margin-bottom: var(--space-3);
}

.donor-welcome-meta {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.donor-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.8);
    padding: var(--space-1) var(--space-3);
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-full);
}

.donor-meta-item svg { width: 14px; height: 14px; opacity: 0.8; }

/* ── Eligibility Card ── */
.eligibility-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.eligibility-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}

.eligibility-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.eligibility-title svg { width: 20px; height: 20px; }

.eligibility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.elig-item {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--grey-100);
    transition: all var(--duration-fast);
}

.elig-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.elig-item-label {
    font-size: var(--text-xs);
    color: var(--grey-600);
    margin-bottom: var(--space-1);
}

.elig-item-value {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
}

.elig-item-status {
    margin-top: var(--space-2);
}

/* ── Progress Ring ── */
.progress-ring-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-ring-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--font-extrabold);
    color: var(--white);
}

/* ── Alerts Section ── */
.alerts-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.alerts-header h4 {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.alerts-header svg { width: 18px; height: 18px; color: var(--red-primary); }

.alert-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--grey-100);
    margin-bottom: var(--space-3);
    transition: all var(--duration-base) var(--ease-out);
    cursor: pointer;
}

.alert-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--grey-200);
}

.alert-card.urgent {
    border-left: 4px solid var(--red-primary);
    animation: glowPulseRed 3s ease-in-out infinite;
}

.alert-card.normal {
    border-left: 4px solid var(--amber);
}

.alert-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.alert-card-title {
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
    margin-bottom: 2px;
}

.alert-card-desc {
    font-size: var(--text-xs);
    color: var(--grey-600);
    line-height: 1.4;
}

.alert-card-time {
    font-size: 10px;
    color: var(--grey-status);
    white-space: nowrap;
}

.alert-card-actions {
    display: flex;
    gap: var(--space-2);
}

.btn-accept-alert {
    padding: var(--space-1) var(--space-4);
    background: var(--red-primary);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    transition: all var(--duration-fast);
    cursor: pointer;
    border: none;
}

.btn-accept-alert:hover:not(:disabled) { background: #a93226; transform: translateY(-1px); }

.btn-accept-alert:disabled,
.btn-accept-alert.btn-accept-disabled {
    background: var(--grey-200);
    color: var(--grey-500);
    cursor: not-allowed;
    transform: none;
    opacity: 0.8;
}

.btn-decline-alert {
    padding: var(--space-1) var(--space-4);
    background: transparent;
    color: var(--grey-600);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    transition: all var(--duration-fast);
    cursor: pointer;
}

.btn-decline-alert:hover { border-color: var(--red-badge); color: var(--red-badge); }

/* ── Ineligible Action Wrapper ── */
.ineligible-action-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ineligible-reason {
    font-size: 10px;
    color: var(--red-primary);
    line-height: 1.3;
    max-width: 220px;
}

/* ── Cooldown Indicator (replaces Accept button for 90-day donors) ── */
.cooldown-indicator {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 12px;
    border: 1.5px solid var(--teal-primary);
    border-radius: var(--radius-md);
    background: rgba(26,122,138,0.04);
    font-size: var(--text-xs);
    color: var(--teal-primary);
    min-width: 180px;
}

.cooldown-indicator-top {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.cooldown-indicator-top svg { flex-shrink: 0; }

.cooldown-indicator-date {
    font-size: 10px;
    color: var(--grey-500);
    padding-left: 22px;
}

/* ── Eligibility Badge (Welcome Banner) ── */
.eligibility-badge {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
    margin-left: auto;
}

.eligibility-ring { flex-shrink: 0; }

.eligibility-badge-text {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: 700;
    white-space: nowrap;
    color: rgba(255,255,255,0.95);
}

.eligibility-badge-icon { font-size: 14px; }

.eligibility-badge.eligible { background: rgba(39,174,96,0.15); }
.eligibility-badge.cooldown { background: rgba(243,156,18,0.15); }
.eligibility-badge.ineligible { background: rgba(231,76,60,0.15); }

/* Dark mode */
body.dark-mode .cooldown-indicator { border-color: var(--teal-primary); background: rgba(26,122,138,0.08); }
body.dark-mode .ineligible-reason { color: #ff7b7b; }
body.dark-mode .btn-accept-alert:disabled,
body.dark-mode .btn-accept-alert.btn-accept-disabled { background: #21262d; color: #6e7681; }

/* ── Impact / Donation Stats ── */
.impact-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.impact-title {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.impact-title svg { width: 18px; height: 18px; color: var(--red-primary); }

.impact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.impact-stat {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--grey-100);
    transition: all var(--duration-fast);
}

.impact-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.impact-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
}

.impact-stat-label {
    font-size: var(--text-xs);
    color: var(--grey-600);
    margin-top: 2px;
}

.impact-stat.red .impact-stat-value { color: var(--red-primary); }
.impact-stat.green .impact-stat-value { color: var(--green); }
.impact-stat.teal .impact-stat-value { color: var(--teal-primary); }
.impact-stat.amber .impact-stat-value { color: var(--amber); }

/* ── Nearby Blood Banks Panel ── */
.nearby-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.nearby-title {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nearby-title svg { width: 18px; height: 18px; color: var(--teal-primary); }

.nearby-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.nearby-item:hover {
    background: var(--grey-50);
    transform: translateX(4px);
}

.nearby-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(192,57,43,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nearby-icon svg { width: 18px; height: 18px; color: var(--red-primary); }

.nearby-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    margin-bottom: 1px;
}

.nearby-dist {
    font-size: var(--text-xs);
    color: var(--grey-600);
}

/* ── Donor Settings ── */
.donor-profile-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    text-align: center;
}

.donor-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--font-extrabold);
    color: var(--white);
}

.donor-profile-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-1);
}

.donor-profile-email {
    font-size: var(--text-sm);
    color: var(--grey-600);
    margin-bottom: var(--space-4);
}

.donor-profile-badges {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Compact Alerts ── */
.alerts-compact {
    padding: var(--space-4);
}

#alerts-list {
    max-height: 380px;
    overflow-y: auto;
    padding-right: var(--space-2);
}

.alerts-compact .alert-card {
    padding: var(--space-3);
    margin-bottom: var(--space-2);
}

.alerts-compact .alert-card-top {
    margin-bottom: var(--space-2);
}

.alerts-compact .alert-card-title {
    font-size: var(--text-xs);
}

.alerts-compact .alert-card-desc {
    font-size: 10px;
}

.alerts-compact .btn-accept-alert,
.alerts-compact .btn-decline-alert {
    padding: 2px 10px;
    font-size: 10px;
}

/* ── Donor History Page ── */
.donor-history-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.dh-stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--grey-100);
    transition: all var(--duration-fast);
}

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

.dh-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-3);
}

.dh-stat-icon svg { width: 20px; height: 20px; }
.dh-stat-icon.red { background: rgba(192,57,43,0.1); color: var(--red-primary); }
.dh-stat-icon.green { background: rgba(39,174,96,0.1); color: var(--green); }
.dh-stat-icon.teal { background: rgba(26,122,138,0.1); color: var(--teal-primary); }

.dh-stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
    color: var(--grey-900);
    margin-bottom: 2px;
}

.dh-stat-label {
    font-size: var(--text-xs);
    color: var(--grey-600);
}

/* Timeline cards */
.donor-history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dh-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-3);
    transition: all 200ms ease;
    position: relative;
    overflow: hidden;
}

.dh-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.dh-card-left {
    width: 4px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.dh-card-number {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
    flex-shrink: 0;
    background: rgba(26,122,138,0.08);
    color: var(--teal-primary);
}

.dh-card-body {
    flex: 1;
    min-width: 0;
}

.dh-card-top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 4px;
}

.dh-card-title {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    color: var(--grey-900);
}

.dh-card-meta {
    font-size: var(--text-xs);
    color: var(--grey-600);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.dh-card-hb {
    font-size: 10px;
    color: var(--green);
    margin-top: 2px;
    font-weight: var(--font-medium);
}

/* Empty state */
.dh-empty {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.dh-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-4);
    opacity: 0.3;
}

.dh-empty-icon svg {
    width: 56px;
    height: 56px;
    color: var(--grey-600);
}

.dh-empty h3 {
    font-family: var(--font-display);
    margin-bottom: var(--space-2);
}

.dh-empty p {
    color: var(--grey-600);
    font-size: var(--text-sm);
}

/* ── Donor Dark Mode ── */
body.dark-mode .donor-welcome {
    background: linear-gradient(135deg, #0a2e33 0%, #0d1117 100%) !important;
}

body.dark-mode .eligibility-card {
    background: #1a1d24;
    box-shadow: none;
    border: 1px solid #2a2d35;
}

body.dark-mode .eligibility-title {
    color: #f1f3f5;
}

body.dark-mode .elig-item {
    border-color: #2a2d35;
}

body.dark-mode .elig-item-label {
    color: #6b7280;
}

body.dark-mode .elig-item-value {
    color: #f1f3f5;
}

body.dark-mode .alerts-section {
    background: #1a1d24;
    box-shadow: none;
    border: 1px solid #2a2d35;
}

body.dark-mode .alerts-header h4 {
    color: #f1f3f5;
}

body.dark-mode .alert-card {
    background: #12151a;
    border-color: #2a2d35;
}

body.dark-mode .alert-card:hover {
    background: #1e2128;
    border-color: #3a3d45;
}

body.dark-mode .alert-card-title {
    color: #f1f3f5;
}

body.dark-mode .alert-card-desc {
    color: #6b7280;
}

body.dark-mode .nearby-section {
    background: #1a1d24;
    box-shadow: none;
    border: 1px solid #2a2d35;
}

body.dark-mode .nearby-title {
    color: #f1f3f5;
}

body.dark-mode .nearby-name {
    color: #f1f3f5;
}

body.dark-mode .nearby-dist {
    color: #6b7280;
}

body.dark-mode .nearby-item:hover {
    background: #12151a;
}

body.dark-mode .map-fallback {
    background: #12151a;
    border-color: #2a2d35;
}

/* Donor history dark mode */
body.dark-mode .dh-stat-card {
    background: #1a1d24;
    border-color: #2a2d35;
    box-shadow: none;
}

body.dark-mode .dh-stat-value {
    color: #f1f3f5;
}

body.dark-mode .dh-stat-label {
    color: #6b7280;
}

body.dark-mode .dh-card {
    background: #1a1d24;
    border-color: #2a2d35;
}

body.dark-mode .dh-card:hover {
    background: #1e2128;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark-mode .dh-card-title {
    color: #f1f3f5;
}

body.dark-mode .dh-card-meta {
    color: #6b7280;
}

body.dark-mode .dh-card-number {
    background: rgba(26,122,138,0.15);
}

body.dark-mode .dh-empty h3 {
    color: #f1f3f5;
}

body.dark-mode .dh-empty p {
    color: #6b7280;
}

/* Donor profile card dark mode */
body.dark-mode .donor-profile-card {
    background: #1a1d24;
    box-shadow: none;
    border: 1px solid #2a2d35;
}

body.dark-mode .donor-profile-name {
    color: #f1f3f5;
}

body.dark-mode .donor-profile-email {
    color: #6b7280;
}

/* Donor login dark mode */
body.dark-mode .donor-login-form-panel {
    background: #0d1117;
}

body.dark-mode .donor-login-heading {
    color: #f1f3f5;
}

body.dark-mode .donor-login-sub {
    color: #6b7280;
}

body.dark-mode .donor-select-card {
    border-color: #2a2d35;
    background: #1a1d24;
}

body.dark-mode .donor-select-card:hover {
    border-color: var(--teal-primary);
    background: rgba(26,122,138,0.08);
}

body.dark-mode .donor-card-name {
    color: #f1f3f5;
}

/* ── Donor Screening Overlay ── */
.screening-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.screening-layout {
    display: flex;
    width: 1000px;
    height: 650px;
    max-width: 100%;
    max-height: 100%;
    background: var(--grey-50);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.screening-sidebar {
    width: 320px;
    background: var(--navy);
    color: var(--white);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.stepper {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-6);
}

.step-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    opacity: 0.5;
    transition: all var(--duration-base);
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 0.8;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
    border: 2px solid rgba(255,255,255,0.2);
    background: transparent;
    transition: all var(--duration-base);
}

.step-item.active .step-circle {
    background: var(--red-primary);
    border-color: var(--red-primary);
}

.step-item.completed .step-circle {
    background: var(--teal-primary);
    border-color: var(--teal-primary);
}

.step-text {
    flex: 1;
}

.step-title {
    font-weight: var(--font-bold);
    font-size: var(--text-md);
    margin-bottom: 2px;
}

.step-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.stepper-line {
    width: 2px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    margin-left: 15px;
    transition: background var(--duration-base);
}

.stepper-line.active {
    background: var(--teal-primary);
}

.safety-card {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-top: auto;
}

.safety-card h4 {
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.safety-card p {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

.screening-sidebar-illus {
    text-align: center;
    margin-top: var(--space-4);
}

.screening-content {
    flex: 1;
    background: var(--grey-50);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

.screening-header {
    padding: var(--space-6) var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.screening-header-left {
    display: flex;
    align-items: center;
}

.screening-secure {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--teal-primary);
    font-size: var(--text-xs);
    font-weight: 600;
}

.screening-progress-wrap {
    height: 4px;
    background: var(--grey-200);
    margin: 0 var(--space-8);
    border-radius: 2px;
    overflow: hidden;
}

.screening-progress-bar {
    height: 100%;
    background: var(--red-primary);
    transition: width var(--duration-base) var(--ease-out);
}

.screening-step-count {
    text-align: right;
    padding: var(--space-2) var(--space-8);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--red-primary);
}

.screening-form-area {
    flex: 1;
    padding: var(--space-6) var(--space-8);
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.form-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--grey-100);
    margin-bottom: var(--space-6);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    margin-bottom: 2px;
}

.section-header p {
    color: var(--grey-600);
    font-size: var(--text-xs);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    color: var(--grey-900);
}

.form-group input[type="number"] {
    padding: 10px 14px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: border-color var(--duration-fast);
}

.form-group input[type="number"]:focus {
    border-color: var(--teal-primary);
    outline: none;
}

.radio-group {
    display: flex;
    gap: var(--space-3);
}

.radio-btn {
    flex: 1;
    padding: 10px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--duration-fast);
}

.radio-btn input {
    margin: 0;
}

.radio-btn.selected {
    border-color: var(--teal-primary);
    background: rgba(26,122,138,0.05);
    color: var(--teal-primary);
}

.info-banner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: rgba(41,128,185,0.1);
    color: var(--navy);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-top: var(--space-6);
    font-size: var(--text-sm);
}

.info-icon {
    color: var(--teal-primary);
}

.motivational-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: linear-gradient(135deg, var(--teal-primary) 0%, #117a65 100%);
    color: var(--white);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-top: var(--space-8);
    position: relative;
    overflow: hidden;
}

.motivational-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.motivational-text {
    flex: 1;
    font-size: var(--text-sm);
    line-height: 1.5;
}

.motivational-graphic {
    position: absolute;
    right: 0;
    bottom: -10px;
    opacity: 0.3;
}

.screening-footer {
    padding: var(--space-5) var(--space-8);
    border-top: 1px solid var(--grey-200);
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back, .btn-next {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.btn-back {
    background: transparent;
    border: 1.5px solid var(--grey-300);
    color: var(--grey-700);
}

.btn-back:hover {
    background: var(--grey-100);
    color: var(--grey-900);
}

.btn-next {
    background: var(--red-primary);
    border: 1.5px solid var(--red-primary);
    color: var(--white);
}

.btn-next:hover {
    background: #c0392b;
    border-color: #c0392b;
}

body.dark-mode .btn-back {
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode .btn-back:hover {
    background: #21262d;
    color: #f1f3f5;
}

.error-msg {
    color: var(--red-primary);
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
}

.error-shake {
    animation: shake 400ms cubic-bezier(.36,.07,.19,.97) both;
    border-color: var(--red-primary) !important;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.result-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-8);
    z-index: 10;
}

.success-anim {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-4);
}

.checkmark {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--white);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--green);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--green);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 50px var(--green); } }

/* Dark mode for screening */
body.dark-mode .screening-layout { background: #0d1117; }
body.dark-mode .screening-content { background: #0d1117; }
body.dark-mode .screening-header h2 { color: #f1f3f5; }
body.dark-mode .screening-header p { color: #9ca3af; }
body.dark-mode .form-section { background: #161b22; border-color: #30363d; }
body.dark-mode .section-header h3 { color: #f1f3f5; }
body.dark-mode .form-group label { color: #c9d1d9; }
body.dark-mode .form-group input[type="number"] { background: #0d1117; border-color: #30363d; color: #f1f3f5; }
body.dark-mode .radio-btn { border-color: #30363d; color: #c9d1d9; }
body.dark-mode .radio-btn.selected { background: rgba(26,122,138,0.15); border-color: var(--teal-primary); color: #5ee6e6; }
body.dark-mode .screening-footer { background: #161b22; border-color: #30363d; }
body.dark-mode .result-screen { background: #0d1117 !important; }
body.dark-mode .result-screen h2 { color: #f1f3f5; }

@media (max-width: 900px) {
    .donor-dashboard { grid-template-columns: 1fr; }
    .donor-login-page { flex-direction: column; }
    .eligibility-grid { grid-template-columns: 1fr 1fr; }
    .donor-history-summary { grid-template-columns: 1fr; }
    .screening-layout { flex-direction: column; }
    .screening-sidebar { width: 100%; padding: var(--space-4); }
    .stepper { flex-direction: row; flex-wrap: wrap; }
    .form-grid-3, .form-grid-2 { grid-template-columns: 1fr; }
}

