/* ════════════════════════════════════════════════════════════════
   LifeStream — Premium UI (Inspired by LifeDrop + BloodConnect+)
   Red #E53935 | White #FFFFFF | Near-white bg #F7F8FC
   Font: Poppins (Google Fonts)
   ════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
    --red: #E53935;
    --red-dark: #B71C1C;
    --red-soft: #FFEBEE;
    --red-mid: #EF9A9A;
    --white: #FFFFFF;
    --bg: #F7F8FC;
    --card: #FFFFFF;
    --text: #1A1A2E;
    --muted: #6B7280;
    --border: #F0F0F5;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, .09);
    --shadow-red: 0 8px 24px rgba(229, 57, 53, .25);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-pill: 999px;
}

/* ── Reset & Base ──────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ── Navbar ────────────────────────────────────────── */
.ls-navbar {
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.ls-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
}

.ls-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.5px;
}

.ls-brand span {
    color: var(--red);
}

.ls-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.ls-nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: .9rem;
    color: var(--muted);
    transition: all .2s;
}

.ls-nav-links a:hover,
.ls-nav-links a.active {
    color: var(--red);
    background: var(--red-soft);
}

.ls-nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ── Buttons ───────────────────────────────────────── */
.btn-ls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    text-decoration: none;
}

.btn-ls-primary {
    background: var(--red);
    color: #fff;
    box-shadow: var(--shadow-red);
}

.btn-ls-primary:hover {
    background: var(--red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(229, 57, 53, .35);
}

.btn-ls-outline {
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
}

.btn-ls-outline:hover {
    background: var(--red);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ls-white {
    background: #fff;
    color: var(--red);
    font-weight: 700;
}

.btn-ls-white:hover {
    background: var(--red-soft);
    transform: translateY(-2px);
}

.btn-ls-sm {
    padding: 7px 18px;
    font-size: .82rem;
}

.btn-ls-lg {
    padding: 14px 36px;
    font-size: 1rem;
}

/* ── Cards ─────────────────────────────────────────── */
.ls-card {
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.ls-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.ls-card-body {
    padding: 1.5rem;
}

/* ── Request / Urgency Badges ──────────────────────── */
.badge-critical {
    background: #FFE5E5;
    color: #C62828;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.badge-urgent {
    background: #FFF3E0;
    color: #E65100;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.badge-normal {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.badge-emergency {
    /* alias */
    background: #FFE5E5;
    color: #C62828;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* Blood group circle */
.blood-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .95rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(229, 57, 53, .3);
}

.blood-circle-lg {
    width: 72px;
    height: 72px;
    font-size: 1.2rem;
}

/* ── Hero Section ──────────────────────────────────── */
.ls-hero {
    background: var(--white);
    padding: 80px 0 60px;
    overflow: hidden;
    position: relative;
}

.ls-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 57, 53, .08) 0%, transparent 70%);
    pointer-events: none;
}

.ls-hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--text);
}

.ls-hero-title .accent {
    color: var(--red);
}

.ls-stat-chip {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    border: 1px solid var(--border);
}

.ls-stat-chip .number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--red);
    line-height: 1;
}

.ls-stat-chip .label {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 2px;
}

/* Hero illustration blob */
.hero-blob {
    background: linear-gradient(135deg, #E53935 0%, #7B1FA2 100%);
    border-radius: 40% 60% 55% 45% / 45% 50% 50% 55%;
    padding: 50px 55px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 30px 80px rgba(229, 57, 53, .3);
    animation: blobFloat 4s ease-in-out infinite;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Floating mini cards on hero */
.hero-float-card {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    white-space: nowrap;
}

.hero-float-card .fc-title {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
}

.hero-float-card .fc-sub {
    font-size: .72rem;
    color: var(--muted);
}

/* ── Search Strip ──────────────────────────────────── */
.ls-search-strip {
    background: var(--red);
    padding: 40px 0;
}

.ls-search-box {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.ls-search-box .ls-field {
    flex: 1;
    min-width: 180px;
}

.ls-search-box .ls-field label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.ls-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    color: var(--text);
    background: var(--bg);
    transition: border .2s;
    outline: none;
}

.ls-input:focus {
    border-color: var(--red);
    background: #fff;
}

/* ── Section Titles ────────────────────────────────── */
.ls-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.4px;
}

.ls-section-sub {
    color: var(--muted);
    font-size: .9rem;
    margin-top: 4px;
}

/* ── Request Cards ─────────────────────────────────── */
.request-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all .25s;
    height: 100%;
}

.request-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--red-mid);
}

.request-card.emergency {
    border-left: 4px solid #E53935;
}

.request-card.urgent {
    border-left: 4px solid #FF9800;
}

.request-card.normal {
    border-left: 4px solid #4CAF50;
}

/* ── Donor Cards ───────────────────────────────────── */
.donor-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.4rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all .25s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ── Statistics Bar ────────────────────────────────── */
.ls-stats-bar {
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
    padding: 48px 0;
}

.ls-stats-bar .stat-item {
    text-align: center;
}

.ls-stats-bar .stat-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}

.ls-stats-bar .stat-num span {
    color: var(--red);
}

.ls-stats-bar .stat-label {
    color: rgba(255, 255, 255, .55);
    font-size: .85rem;
    margin-top: 4px;
}

/* ── How It Works ──────────────────────────────────── */
.how-step {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all .25s;
}

.how-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.how-step .step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--red-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
}

.how-step .step-num {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: var(--red);
    color: #fff;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── CTA Section ───────────────────────────────────── */
.ls-cta {
    background: linear-gradient(135deg, #E53935 0%, #7B1FA2 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.ls-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    pointer-events: none;
}

.ls-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    pointer-events: none;
}

/* ── Auth Pages ────────────────────────────────────── */
.ls-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff 50%, #FFEBEE 100%);
    padding: 60px 0;
}

.ls-auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .1);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* ── Footer ────────────────────────────────────────── */
.ls-footer {
    background: #111827;
    color: rgba(255, 255, 255, .7);
    padding: 64px 0 28px;
}

.ls-footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}

.ls-footer a {
    color: rgba(255, 255, 255, .55);
    transition: color .2s;
    display: block;
    margin-bottom: 8px;
    font-size: .88rem;
}

.ls-footer a:hover {
    color: var(--red);
}

.ls-footer .social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .6);
    transition: all .2s;
    font-size: .9rem;
}

.ls-footer .social-icon:hover {
    background: var(--red);
    color: #fff;
}

.ls-footer-divider {
    border-color: rgba(255, 255, 255, .08);
    margin: 32px 0 20px;
}

/* ── Flash Alert ───────────────────────────────────── */
.ls-flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    color: #1B5E20;
    font-size: .88rem;
    font-weight: 500;
}

/* ── Map page ──────────────────────────────────────── */
.map-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.map-filter-btn {
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all .2s;
}

.map-filter-btn:hover,
.map-filter-btn.active {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}

/* ── Admin Sidebar ─────────────────────────────────── */
.admin-sidebar {
    width: 264px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #111827;
    padding: 24px 16px;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-content {
    margin-left: 264px;
    padding: 32px;
    min-height: 100vh;
    background: var(--bg);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .6);
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: var(--red);
    color: #fff;
}

.admin-nav-item i {
    font-size: 1.05rem;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
}

/* Stat mini cards for admin */
.admin-stat {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.admin-stat .s-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 12px;
}

.admin-stat .s-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
}

.admin-stat .s-label {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Utilities ─────────────────────────────────────── */
.text-red {
    color: var(--red) !important;
}

.bg-red {
    background: var(--red) !important;
}

.bg-red-soft {
    background: var(--red-soft) !important;
}

.rounded-ls {
    border-radius: var(--radius-md) !important;
}

.shadow-ls {
    box-shadow: var(--shadow-md) !important;
}

/* Pulse animation for live badges */
@keyframes pulse-dot {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: .6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Counter number animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.count-anim {
    animation: countUp .6s ease both;
}

/* Hover lift */
.hover-lift {
    transition: transform .25s, box-shadow .25s;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-mid);
}