/* =========================
   🩸 قواعد عامة + الألوان
========================= */

:root {
    --bb-primary: #dc2626;
    --bb-primary-soft: #fee2e2;
    --bb-primary-soft-2: rgba(248, 113, 113, 0.12);
    --bb-border-soft: #e5e7eb;
    --bb-text-main: #111827;
    --bb-text-muted: #6b7280;
    --bb-bg: #f5f5f7;
    --bb-card-bg: #ffffff;
    --bb-radius-lg: 20px;
    --bb-radius-md: 14px;
    --bb-radius-pill: 999px;
    --bb-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.09);
    --bb-shadow-card: 0 10px 30px rgba(15, 23, 42, 0.06);
}

body {
    background:
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.16), transparent 55%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.09), transparent 55%),
        #f9fafb;
    color: var(--bb-text-main);
    position: relative;
    z-index: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(248,113,113,0.12), transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(15,23,42,0.03), transparent 55%);
    opacity: 0.9;
    z-index: -2;
    pointer-events: none;
}

.bb-page {
    max-width: 1120px;
}

/* =========================
   🩸 الهيرو (الصفحة الرئيسية)
========================= */

.bb-glass-shell {
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.7), rgba(248, 250, 252, 0.6));
    box-shadow: var(--bb-shadow-soft);
}

.bb-glass-inner {
    border-radius: 26px;
    background: radial-gradient(circle at top left, #ffffff, #fef2f2);
    padding: 1.4rem 1.6rem;
    color: var(--bb-text-main);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .bb-glass-inner {
        padding: 2rem 2.2rem;
    }
}

.bb-hero-orbit {
    position: absolute;
    inset-inline-end: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    background:
        radial-gradient(circle at 30% 30%, rgba(248, 113, 113, 0.22), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(254, 202, 202, 0.4), transparent 55%);
    opacity: 0.65;
    filter: blur(0.4px);
    pointer-events: none;
}

.bb-hero-orbit::after {
    content: "";
    position: absolute;
    inset: 22%;
    border-radius: 999px;
    border: 1px dashed rgba(248, 113, 113, 0.7);
}

.hero-soft h1 {
    font-size: clamp(1.7rem, 2.4vw + 1.4rem, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: .35rem;
}

.hero-soft p {
    color: var(--bb-text-muted);
    max-width: 460px;
    font-size: .96rem;
}

.bb-hero-tagline {
    font-size: .82rem;
    color: #4b5563;
}

/* بادجات الهيرو */
.bb-badge-soft {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #b91c1c;
    font-size: .78rem;
    border: 1px solid rgba(248, 113, 113, 0.35);
    backdrop-filter: blur(12px);
}

.bb-badge-soft small {
    color: var(--bb-text-muted);
    font-size: .78rem;
}

.bb-badge-soft span {
    font-weight: 600;
}

.bb-hero-highlight {
    background: #ffffff;
    border-radius: 999px;
    padding: .25rem .75rem;
    border: 1px solid rgba(248, 113, 113, 0.4);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    color: #b91c1c;
}

.bb-hero-highlight span.bb-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.24);
}

/* أزرار الهيرو */
.bb-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.4rem;
}

.bb-main-action {
    font-size: .96rem !important;
    font-weight: 700;
    padding: 0.7rem 1.9rem !important;
    border-radius: 999px;
    box-shadow: 0 13px 32px rgba(248, 113, 113, 0.45);
    border: none;
    background-image: linear-gradient(to left, #ef4444, #b91c1c);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    letter-spacing: -.01em;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    color: #ffffff !important;
}

.bb-main-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(248, 113, 113, 0.6);
}

.bb-second-action {
    font-size: .95rem !important;
    font-weight: 600;
    padding: 0.68rem 1.7rem !important;
    border-radius: 999px;
    border-width: 1px;
    border-color: rgba(148, 163, 184, 0.6) !important;
    color: var(--bb-text-main);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s ease, transform .18s ease, box-shadow .18s ease;
}

.bb-second-action:hover {
    background: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(148, 163, 184, 0.35);
}

/* ميتريكس الهيرو */
.bb-hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.2rem;
    font-size: .78rem;
}

.bb-hero-pill {
    border-radius: 999px;
    padding: .32rem .8rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--bb-text-muted);
    backdrop-filter: blur(10px);
}

.bb-hero-pill span.icon {
    font-size: .96rem;
}

.bb-hero-pill strong {
    font-weight: 600;
    color: #b91c1c;
}

/* =========================
   📊 كارت الإحصائيات + الفلتر
========================= */

.bb-stats-shell {
    margin-top: 1.4rem;
    margin-bottom: 1.6rem;
}

.bb-stats-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--bb-shadow-card);
    padding: 1.4rem 1.4rem 1.6rem;
    backdrop-filter: blur(18px);
}

.bb-stats-card-header h5 {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: .1rem;
}

.bb-stats-card-header small {
    font-size: .8rem;
    color: var(--bb-text-muted);
}

.bb-stats-tag {
    border-radius: 999px;
    font-size: .78rem;
    padding: .35rem .9rem;
    border: 1px solid rgba(59,130,246,0.22);
    color: var(--bb-text-main);
    background: linear-gradient(135deg, rgba(239,246,255,0.9), rgba(219,234,254,0.95));
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
}

.bb-stats-tag span.icon {
    font-size: 1rem;
}

/* شريط الفلتر */
.bb-filter-shell {
    border-radius: 18px;
    padding: .75rem .9rem;
    background: linear-gradient(135deg, rgba(248,250,252,0.98), rgba(241,245,249,0.98));
    border: 1px solid rgba(148,163,184,0.6);
    margin-bottom: 1rem;
}

.bb-filter-chip {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .8rem;
    border-radius: 999px;
    border: 1px dashed rgba(148, 163, 184, 0.8);
    font-size: .8rem;
    background-color: rgba(255, 255, 255, 0.98);
    color: var(--bb-text-muted);
}

.bb-filter-chip strong {
    color: var(--bb-text-main);
    font-weight: 700;
}

.bb-filter-chip span.icon {
    font-size: .9rem;
}

.bb-filter-chip-main {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-style: solid;
    border-color: rgba(248, 113, 113, 0.7);
}

.bb-filter-chip-main strong {
    color: #b91c1c;
}

.bb-filter-chip-select {
    background-color: #ffffff;
    color: var(--bb-text-main);
}

.bb-filter-chip-select span {
    color: var(--bb-text-main);
    font-weight: 600;
}

.bb-filter-chip-select span.icon {
    color: var(--bb-primary);
}

.bb-filter-chip-select .form-select {
    border: none;
    padding-inline: .3rem;
    padding-block: 0;
    height: auto;
    font-size: .78rem;
    background-color: transparent;
    box-shadow: none !important;
    color: var(--bb-text-main);
}

.bb-filter-chip-select .form-select:focus {
    outline: none;
    box-shadow: none;
}

.bb-filter-meta {
    font-size: .76rem;
    color: var(--bb-text-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
    white-space: normal;
    line-height: 1.5;
}

.bb-filter-meta span.icon {
    font-size: .9rem;
}

/* =========================
   📈 بوكسات الإحصائيات + الفصائل
========================= */

.bb-stat-box {
    border-radius: var(--bb-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: .9rem 1rem;
    background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bb-stat-box::after {
    content: "";
    position: absolute;
    inset-inline-end: -40px;
    top: -40px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(248,113,113,0.17), transparent 60%);
    opacity: 0;
    transition: opacity .18s ease;
}

.bb-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(148, 163, 184, 0.25);
    border-color: rgba(248, 113, 113, 0.9);
}

.bb-stat-box:hover::after {
    opacity: 1;
}

.bb-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background-color: var(--bb-primary-soft);
    color: var(--bb-primary);
    margin-inline-start: .1rem;
    box-shadow: 0 8px 18px rgba(248, 113, 113, 0.3);
}

.bb-stat-label {
    font-size: .8rem;
    color: var(--bb-text-muted);
}

.bb-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--bb-text-main);
    letter-spacing: -0.02em;
}

.bb-stat-hint {
    margin-top: auto;
    font-size: .74rem;
    color: var(--bb-text-muted);
}

.bb-divisor {
    border-top: 1px dashed rgba(148, 163, 184, 0.6);
}

/* بادجات الفصائل */
.bb-badge-blood {
    border-radius: 999px;
    padding: .35rem .8rem;
    font-size: .8rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background-color: #ffffff;
    color: var(--bb-text-main);
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
}

.bb-badge-blood strong {
    color: var(--bb-primary);
    font-weight: 800;
    font-size: .82rem;
}

.bb-badge-blood span.count {
    font-weight: 500;
    color: var(--bb-text-muted);
}

/* =========================
   ℹ️ كارت "من نحن" / قانوني
========================= */

.bb-legal-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: var(--bb-shadow-card);
    padding: 1.3rem 1.4rem 1.5rem;
    backdrop-filter: blur(14px);
}

.bb-legal-card h5 {
    font-weight: 700;
    margin-bottom: .4rem;
}

.bb-legal-card p,
.bb-legal-card li,
.bb-legal-card small {
    color: var(--bb-text-muted);
    font-size: .86rem;
}

.bb-legal-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .76rem;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    color: var(--bb-text-muted);
    background-color: #ffffff;
}

/* =========================
   📊 الرسم البياني
========================= */

#bloodChartWrapper {
    position: relative;
    height: 260px;
}

@media (max-width: 767.98px) {
    #bloodChartWrapper {
        height: 220px;
    }

    .bb-glass-inner {
        padding: 1.4rem 1.3rem;
    }

    .bb-filter-meta {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .bb-filter-meta span.icon {
        margin-top: 2px;
    }

    .bb-filter-chip {
        flex-wrap: wrap;
    }
}

/* =========================
   🧩 كلاسيكيات مساعدة
========================= */

.text-muted {
    color: var(--bb-text-muted) !important;
}

/* أنيميشن خفيفة */
.fade-in-up {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeInUp .45s ease-out forwards;
}

.fade-in-up.delay-1 {
    animation-delay: .08s;
}

.fade-in-up.delay-2 {
    animation-delay: .15s;
}

.fade-in-up.delay-3 {
    animation-delay: .22s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   📝 صفحة "تسجيل متبرع"
========================= */

.bb-form-shell {
    max-width: 720px;
    margin-inline: auto;
}

.bb-form-card {
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,0.45);
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15,23,42,0.10);
    padding: 1.4rem 1.6rem 1.8rem;
}

.bb-form-title {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: #b91c1c;
}

.bb-form-subtitle {
    font-size: .9rem;
    color: #4b5563;
}

.bb-age-note {
    font-size: .78rem;
    color: #9ca3af;
}

.bb-form-label {
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
}

.bb-form-card .form-control,
.bb-form-card .form-select,
.bb-form-card textarea {
    font-size: .9rem;
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.bb-form-card .form-control::placeholder,
.bb-form-card textarea::placeholder {
    color: #9ca3af;
}

.bb-checkbox-label {
    font-size: .85rem;
    color: #374151;
}

.bb-submit-btn {
    border-radius: 999px;
    padding: .45rem 2.2rem;
    font-weight: 700;
    font-size: .95rem;
}

.bb-form-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    background-color: rgba(248,113,113,0.08);
    color: #b91c1c;
    border: 1px solid rgba(248,113,113,0.35);
}

/* =========================
   🚑 صفحة "طلب تبرع بالدم"
========================= */

.bb-request-shell {
    max-width: 720px;
    margin-inline: auto;
}

.bb-request-card {
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,0.45);
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15,23,42,0.10);
    padding: 1.4rem 1.6rem 1.8rem;
}

.bb-request-title {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: #b91c1c;
}

.bb-request-subtitle {
    font-size: .9rem;
    color: #4b5563;
}

.bb-request-card .form-label {
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
}

.bb-request-card .form-control,
.bb-request-card .form-select {
    font-size: .9rem;
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.bb-request-card .form-control::placeholder {
    color: #9ca3af;
}

.bb-request-card .alert-danger,
.bb-request-card .alert-success {
    font-size: .85rem;
}

.bb-request-card .btn-danger {
    border-radius: 999px;
    padding: .45rem 2.4rem;
    font-weight: 700;
    font-size: .95rem;
}
/* =========================
   🧭 Navbar (الهيدر)
========================= */

.bb-navbar {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 25px rgba(15,23,42,0.25);
}

.bb-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff !important;
    letter-spacing: -0.02em;
}

.bb-navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 600;
    font-size: .9rem;
    transition: color .15s ease, background .15s ease;
    border-radius: 999px;
    padding: .35rem .9rem;
}

.bb-navbar .nav-link:hover,
.bb-navbar .nav-link:focus {
    color: #ffffff !important;
    background: rgba(255,255,255,0.15);
}

/* Dropdown */
.bb-navbar .dropdown-menu {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(15,23,42,0.18);
    padding: .4rem;
}

.bb-navbar .dropdown-item {
    font-size: .88rem;
    border-radius: 10px;
    padding: .45rem .8rem;
    font-weight: 600;
}

.bb-navbar .dropdown-item:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* زر تسجيل الدخول / الخروج */
.btn-auth {
    border-radius: 999px;
    padding: .35rem 1.2rem;
    font-weight: 700;
    font-size: .85rem;
    background: #ffffff;
    color: #b91c1c !important;
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    transition: all .15s ease;
}

.btn-auth:hover {
    background: #fee2e2;
    color: #991b1b !important;
}

/* نص الترحيب */
.bb-navbar .navbar-text {
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    font-size: .88rem;
}

/* زر الهاتف */
.navbar-toggler {
    border-color: rgba(255,255,255,0.6);
}

.navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

