
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

:root {
    /* Logo-derived palette */
    --gold:       #D4A017;
    --gold-dark:  #A87C10;
    --gold-light: #F5E6B0;
    --gold-pale:  #FDF8E8;

    --red:        #C0392B;
    --red-dark:   #922B21;
    --red-light:  #FADBD8;

    --green:      #1A6B3A;
    --green-dark: #0F4423;
    --green-light:#D4EDDA;

    --black:      #0D0D0D;
    --black-soft: #1A1A1A;
    --charcoal:   #2C2C2C;

    --white:      #FFFFFF;
    --gray-50:    #F9F7F0;
    --gray-100:   #F0EDE0;
    --gray-200:   #E0DBCA;
    --gray-400:   #A09880;
    --gray-600:   #6B6355;
    --gray-800:   #2C2820;

    --shadow-sm:  0 1px 4px rgba(0,0,0,0.10);
    --shadow:     0 3px 12px rgba(0,0,0,0.13);
    --shadow-lg:  0 6px 24px rgba(0,0,0,0.16);
    --radius:     8px;
    --radius-lg:  14px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: 'Hind Siliguri', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
}

/* ── HEADER ── */
.header {
    background: var(--black);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid var(--gold);
    object-fit: cover;
}
.logo-text .bn {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
    letter-spacing: .3px;
}
.logo-text .en {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
}

nav { display: flex; gap: 4px; }
nav a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all .18s;
}
nav a:hover { color: var(--gold); border-color: rgba(212,160,23,.35); background: rgba(212,160,23,.08); }
nav a.active { color: var(--black); background: var(--gold); border-color: var(--gold); font-weight: 600; }

/* ── HERO ── */
.hero {
    background: var(--black);
    background-image: radial-gradient(ellipse at 60% 50%, rgba(192,57,43,.18) 0%, transparent 70%);
    color: white;
    padding: 3.5rem 1.5rem 3rem;
    text-align: center;
    border-bottom: 2px solid var(--gold);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 28px,
        rgba(212,160,23,.025) 28px,
        rgba(212,160,23,.025) 30px
    );
    pointer-events: none;
}
.hero h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: .5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.hero p { font-size: 1rem; color: rgba(255,255,255,.75); max-width: 520px; margin: 0 auto 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
    line-height: 1;
}
.stat-label { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; display: block; }
.stat-divider {
    width: 1px;
    background: rgba(212,160,23,.3);
    align-self: stretch;
}

/* ── CONTAINER ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.main { padding: 2rem 0; }

/* ── SEARCH BOX ── */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--gold);
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: end;
}
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; color: var(--gray-600); font-weight: 600; letter-spacing: .2px; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 9px 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: border-color .18s, background .18s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: white;
    box-shadow: 0 0 0 3px rgba(212,160,23,.12);
}
.form-group textarea { resize: vertical; min-height: 72px; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .18s;
    white-space: nowrap;
}
.btn-gold { background: var(--gold); color: var(--black); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--red-dark); }
.btn-dark { background: var(--charcoal); color: white; }
.btn-dark:hover { background: var(--black); }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: var(--green-dark); }
.btn-secondary { background: var(--gray-100); color: var(--gray-800); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }

/* ── BLOOD GROUP FILTER ── */
.blood-filter {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-200);
}
.blood-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .75rem; }
.blood-tab {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-200);
    background: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: var(--gray-600);
    transition: all .18s;
}
.blood-tab:hover { border-color: var(--gold); color: var(--gold-dark); }
.blood-tab.active { background: var(--gold); border-color: var(--gold); color: var(--black); }

/* ── DONOR CARDS ── */
.donors-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.donors-header h2 { font-size: 16px; font-weight: 700; }
.count-badge {
    background: var(--gold-pale);
    color: var(--gold-dark);
    border: 1px solid var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}

.donors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1rem;
}
.donor-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--gold);
    transition: box-shadow .2s, transform .2s;
    position: relative;
}
.donor-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}
.card-name-wrap { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--black);
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.card-father { font-size: 12px; color: var(--gray-600); margin-top: 2px; }

.blood-badge {
    background: var(--red);
    color: white;
    font-size: 13px;
    font-weight: 800;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--red-dark);
    box-shadow: 0 2px 6px rgba(192,57,43,.35);
}

.card-divider { height: 1px; background: var(--gray-100); margin: 10px 0; }

.card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.info-item { font-size: 12px; }
.info-label { color: var(--gray-400); display: block; margin-bottom: 1px; font-weight: 500; }
.info-value { font-weight: 600; color: var(--gray-800); }
.info-wide { grid-column: 1 / -1; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    width: 100%;
    justify-content: center;
    letter-spacing: .2px;
}
.status-available { background: var(--green-light); color: var(--green-dark); border: 1px solid #b2d8c2; }
.status-unavailable { background: #FDF0E0; color: #8B5E00; border: 1px solid #FCDBA0; }

/* ── DONOR FORM ── */
.donor-form-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 2.5rem;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 0 auto;
    border-top: 4px solid var(--gold);
}
.donor-form-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--black);
}
.donor-form-section h2 span { color: var(--red); }
.subtitle { font-size: 13px; color: var(--gray-600); margin-bottom: 1.75rem; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-1col { grid-column: 1 / -1; }

.form-section-label {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 4px 0 6px;
    border-bottom: 1px solid var(--gold-light);
    margin-bottom: 2px;
}

.form-note {
    font-size: 12px;
    color: var(--gray-600);
    background: var(--gold-pale);
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-top: 1.25rem;
    border-left: 3px solid var(--gold);
    line-height: 1.6;
}

/* ── ALERT ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #b2d8c2; }
.alert-error { background: var(--red-light); color: var(--red-dark); border: 1px solid #f5b7b1; }
.alert-warning { background: #FDF0E0; color: #8B5E00; border: 1px solid #FCDBA0; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--gray-400); grid-column: 1 / -1; }
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: .6; }
.empty-state p { font-size: 15px; }

/* ── ADMIN ── */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 66px); }
.sidebar {
    background: var(--black-soft);
    border-right: 1px solid rgba(212,160,23,.2);
    padding: 1.25rem 0;
    position: sticky;
    top: 66px;
    height: calc(100vh - 66px);
    overflow-y: auto;
}
.sidebar a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 1.5rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: 14px;
    transition: all .18s;
    border-left: 3px solid transparent;
}
.sidebar a:hover { background: rgba(212,160,23,.08); color: var(--gold); }
.sidebar a.active { background: rgba(212,160,23,.12); color: var(--gold); border-left-color: var(--gold); font-weight: 600; }
.sidebar .sidebar-title {
    font-size: 10px;
    color: rgba(255,255,255,.3);
    padding: 14px 1.5rem 5px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 700;
}
.admin-content { padding: 1.75rem; background: var(--gray-50); }
.admin-content h1 { font-size: 20px; font-weight: 700; margin-bottom: 1.5rem; color: var(--gray-800); }

/* ── TABLE ── */
.table-wrap { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; border: 1px solid var(--gray-200); }
table { width: 100%; border-collapse: collapse; }
table th {
    background: var(--black);
    color: var(--gold);
    padding: 11px 14px;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    letter-spacing: .3px;
    text-transform: uppercase;
}
table td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--gray-50); }
.action-btns { display: flex; gap: 5px; flex-wrap: wrap; }

/* ── LOGIN ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--black); padding: 1rem; }
.login-card {
    background: var(--black-soft);
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 40px rgba(212,160,23,.15);
    width: 100%;
    max-width: 390px;
    text-align: center;
}
.login-card h1 { font-size: 20px; font-weight: 700; color: var(--gold); margin-bottom: .25rem; }
.login-card p { font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 1.75rem; }
.login-card .form-group input {
    background: rgba(255,255,255,.06);
    border-color: rgba(212,160,23,.3);
    color: white;
}
.login-card .form-group input:focus { border-color: var(--gold); background: rgba(255,255,255,.1); }
.login-card .form-group label { color: rgba(255,255,255,.6); }

/* ── MODAL ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--gold);
}
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 1rem; color: var(--gray-800); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.25rem; }

/* ── FOOTER ── */
.footer {
    background: var(--black);
    border-top: 2px solid var(--gold);
    color: rgba(255,255,255,.5);
    text-align: center;
    padding: 1.5rem;
    font-size: 13px;
    margin-top: 3rem;
}
.footer span { color: var(--gold); font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .header-inner { height: auto; padding: .75rem 1rem; flex-wrap: wrap; gap: .5rem; }
    nav { flex-wrap: wrap; }
    .hero h1 { font-size: 1.5rem; }
    .form-2col { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .donors-grid { grid-template-columns: 1fr; }
    .search-grid { grid-template-columns: 1fr; }
    table { font-size: 12px; }
    table th, table td { padding: 8px 10px; }
    .hero-stats { gap: 1.5rem; }
    .stat-divider { display: none; }
}
