:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-alt: #fdf2f2;
    --primary: #b22222;
    --primary-dark: #871717;
    --text: #1f2937;
    --muted: #6b7280;
    --success: #166534;
    --danger: #b91c1c;
    --border: #dbe4ee;
    --shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #fff8f8 0%, var(--bg) 32%, #eef4fb 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.topbar {
    padding: 1rem 0 0;
}

.topbar__inner {
    display: flex;
    justify-content: flex-end;
}

.lang-switch {
    display: inline-flex;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem;
    border-radius: 999px;
}

.lang-switch__link {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    color: #b22222;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.92);
}

.lang-switch__link--active {
    background: #ffe3e3;
    color: #871717;
}

.hero {
    padding: 4.5rem 0 6rem;
    background:
        radial-gradient(circle at top right, rgba(178, 34, 34, 0.18), transparent 28%),
        linear-gradient(135deg, #8f1212 0%, #c53b3b 52%, #f8bcbc 100%);
    color: #fff;
}

.hero__content {
    max-width: 700px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.brand-mark__logo {
    width: clamp(64px, 8vw, 104px);
    height: auto;
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 18px 34px rgba(84, 10, 10, 0.24);
    background: rgba(255, 255, 255, 0.94);
}

.eyebrow {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 2.1rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: none;
    opacity: 0.98;
    text-shadow: 0 8px 24px rgba(80, 8, 8, 0.22);
}

.hero h1,
.auth-card h1,
.sidebar h1,
.section-heading h2,
.search-card h2 {
    margin-top: 0;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero__text {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 640px;
}

.hero__link,
.text-link {
    color: #fff;
    font-weight: 600;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.4rem;
}

.hero__actions .hero__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 28px rgba(78, 8, 8, 0.18);
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero__actions .hero__link:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.verification-actions {
    justify-content: flex-start;
}

.main-content {
    margin-top: -3.5rem;
    padding-bottom: 3rem;
}

.card {
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.search-card,
.form-card,
.auth-card,
.table-wrap,
.empty-state,
.result-card {
    padding: 1.5rem;
}

.search-form,
.stack-form {
    display: grid;
    gap: 1rem;
}

.two-col {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: grid;
    gap: 0.45rem;
}

label {
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(178, 34, 34, 0.16);
    border-color: #e7aaaa;
}

.form-actions,
.section-heading,
.sidebar-nav,
.actions {
    display: flex;
    gap: 0.75rem;
}

.form-actions,
.section-heading {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 999px;
    padding: 0.8rem 1.15rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #edf2f7;
    color: var(--text);
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.btn-small {
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.role-badge--donor {
    background: #fee2e2;
    color: #991b1b;
}

.role-badge--receiver {
    background: #dbeafe;
    color: #1d4ed8;
}

.results-section {
    margin-top: 1.5rem;
}

.results-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.result-card p,
.empty-state p,
.sidebar p,
.section-heading p,
.auth-card p,
.section-copy {
    color: var(--muted);
}

.register-card {
    max-width: 900px;
    margin: 0 auto;
}

.alert {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-weight: 600;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
}

.alert-success {
    background: #ecfdf3;
    color: var(--success);
}

.admin-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #fff5f5 0%, #f5f8fc 100%);
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-card {
    width: min(460px, 100%);
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    padding: 2rem;
    background: linear-gradient(180deg, #7f1111 0%, #ab1d1d 100%);
    color: #fff;
}

.sidebar-nav {
    margin-top: 2rem;
    flex-direction: column;
}

.sidebar-nav a {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.admin-main {
    padding: 2rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.checkbox-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fcfdff;
}

.checkbox-item input {
    width: auto;
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding-bottom: 1rem;
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 3rem 0 5rem;
    }

    .brand-mark {
        gap: 0.75rem;
    }

    .search-card,
    .form-card,
    .auth-card,
    .table-wrap,
    .result-card,
    .empty-state {
        padding: 1.1rem;
    }

    th,
    td {
        padding: 0.8rem;
    }
}
