:root {
    --bg: #071018;
    --bg-deep: #04070d;
    --panel-border: rgba(111, 194, 207, 0.18);
    --text: #eff8fa;
    --muted: #9cb9bf;
    --gold: #f2c36c;
    --teal: #6fe4ea;
    --success: #9cf0b1;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(71, 163, 185, 0.16), transparent 22%),
        radial-gradient(circle at 84% 14%, rgba(242, 195, 108, 0.12), transparent 20%),
        radial-gradient(circle at 50% 120%, rgba(12, 88, 103, 0.3), transparent 28%),
        linear-gradient(180deg, #09131c 0%, #05090f 52%, #020407 100%);
    color: var(--text);
    font-family: "Manrope", sans-serif;
}

body.modal-open {
    overflow: hidden;
}

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

button,
input {
    font: inherit;
}

.ambient {
    position: fixed;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(24px);
    opacity: 0.32;
}

.ambient-left {
    top: -10rem;
    left: -8rem;
    background: radial-gradient(circle, rgba(56, 183, 201, 0.42), transparent 70%);
}

.ambient-right {
    right: -10rem;
    bottom: -10rem;
    background: radial-gradient(circle, rgba(242, 195, 108, 0.32), transparent 70%);
}

.page-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.brand-title {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: 0.02em;
}

.ghost-link {
    padding: 0.95rem 1.2rem;
    border: 1px solid rgba(111, 194, 207, 0.2);
    border-radius: 999px;
    color: var(--text);
    background: rgba(7, 16, 24, 0.46);
    backdrop-filter: blur(10px);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ghost-link:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 194, 207, 0.46);
    background: rgba(10, 22, 32, 0.72);
}

.hero-card,
.panel {
    background:
        linear-gradient(180deg, rgba(10, 22, 32, 0.92), rgba(6, 13, 20, 0.88)),
        linear-gradient(135deg, rgba(111, 194, 207, 0.08), rgba(242, 195, 108, 0.04));
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 1fr);
    gap: 30px;
    padding: 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0%, transparent 44%, rgba(255, 255, 255, 0.04) 50%, transparent 58%, transparent 100%);
    transform: translateX(-100%);
    animation: shine 9s linear infinite;
    pointer-events: none;
}

.hero-copy h2,
.panel-head h3 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
}

.hero-text {
    margin: 14px 0 0;
    max-width: 50ch;
    color: var(--muted);
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(111, 194, 207, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-stats,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    min-height: 168px;
    min-width: 0;
    padding: 20px 18px 18px;
    border-radius: 22px;
    border: 1px solid rgba(111, 194, 207, 0.16);
    background:
        radial-gradient(circle at top right, rgba(111, 194, 207, 0.2), transparent 48%),
        linear-gradient(180deg, rgba(9, 19, 28, 0.96), rgba(5, 10, 16, 0.94));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    overflow: hidden;
}

.stat-card__label,
.stat-card > span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.stat-card__value,
.stat-card > strong {
    display: block;
    color: var(--gold);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.1rem, 1.65vw, 1.85rem);
    line-height: 1.14;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    letter-spacing: -0.03em;
    white-space: normal;
    font-variant-numeric: tabular-nums;
}

.stat-card__hint {
    margin-top: auto;
    color: rgba(239, 248, 250, 0.55);
    font-size: 0.78rem;
    line-height: 1.45;
}

.accent-card strong {
    color: var(--teal);
}

.flash {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.flash-success {
    background: rgba(18, 58, 36, 0.8);
    color: var(--success);
}

.flash-error {
    background: rgba(74, 17, 17, 0.82);
    color: #ffd1cc;
}

.content-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.action-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 24px;
    margin-bottom: 24px;
}

.panel {
    padding: 28px;
}

.panel-head {
    margin-bottom: 22px;
}

.panel-head h3 {
    font-size: clamp(1.8rem, 2.6vw, 2.2rem);
}

.donation-form,
.admin-login-form,
.search-form {
    display: grid;
    gap: 16px;
}

.donation-form--wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
}

.search-stack {
    display: grid;
    gap: 14px;
    align-content: end;
}

.inline-form {
    margin: 0;
}

.inline-delete-form {
    margin: 0;
    display: inline-flex;
}

.field {
    display: grid;
    gap: 10px;
}

.field span {
    color: var(--muted);
    font-size: 0.92rem;
}

.required-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239, 107, 93, 0.14);
    color: #ffb0a7;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.required-badge--primary {
    background: rgba(242, 195, 108, 0.18);
    color: #ffd88f;
}

.field input {
    width: 100%;
    padding: 15px 17px;
    border: 1px solid rgba(111, 194, 207, 0.18);
    border-radius: 16px;
    background: rgba(4, 10, 15, 0.72);
    color: var(--text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field input:focus {
    border-color: rgba(111, 194, 207, 0.52);
    box-shadow: 0 0 0 4px rgba(31, 163, 180, 0.14);
    transform: translateY(-1px);
}

.form-panel--wide {
    margin-bottom: 24px;
}

.admin-only-panel {
    margin-bottom: 24px;
}

.form-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.action-card {
    display: grid;
    align-content: start;
    gap: 18px;
}

.user-management-panel {
    margin-bottom: 24px;
}

.user-management-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
}

.user-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(111, 194, 207, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.user-card h4 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.7rem;
    line-height: 1;
}

.action-card--danger {
    background:
        linear-gradient(180deg, rgba(30, 16, 18, 0.94), rgba(18, 9, 11, 0.9)),
        linear-gradient(135deg, rgba(220, 90, 90, 0.08), rgba(242, 195, 108, 0.04));
}

.compact-text {
    margin-top: -6px;
    max-width: none;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
}

.button-link--small {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mini-stats div {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(111, 194, 207, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.mini-stats span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.mini-stats strong {
    color: var(--gold);
    font-size: 1.6rem;
    font-family: "Cormorant Garamond", serif;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 5, 9, 0.72);
    backdrop-filter: blur(10px);
}

.modal-card {
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid rgba(111, 194, 207, 0.22);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(13, 24, 35, 0.98), rgba(8, 15, 23, 0.96)),
        linear-gradient(135deg, rgba(111, 194, 207, 0.08), rgba(242, 195, 108, 0.04));
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.modal-step {
    display: grid;
    gap: 16px;
}

.modal-backdrop[hidden],
.modal-step[hidden] {
    display: none !important;
}

.primary-button {
    padding: 15px 18px;
    border: 0;
    border-radius: 16px;
    color: #101216;
    font-weight: 800;
    cursor: pointer;
    background:
        linear-gradient(135deg, #ffe09d 0%, #f2c36c 44%, #bb8428 100%);
    box-shadow:
        0 14px 28px rgba(177, 124, 31, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px rgba(177, 124, 31, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.danger-button {
    width: 100%;
    padding: 15px 18px;
    border: 0;
    border-radius: 16px;
    color: #fff4f3;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, #8d1f1f 0%, #c73737 48%, #ef6b5d 100%);
    box-shadow:
        0 14px 28px rgba(141, 31, 31, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.danger-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px rgba(141, 31, 31, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.danger-button--small {
    width: auto;
    min-width: 108px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow:
        0 10px 20px rgba(141, 31, 31, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.feature-list {
    display: grid;
    gap: 14px;
}

.feature-item {
    padding: 18px;
    border: 1px solid rgba(111, 194, 207, 0.14);
    border-radius: 18px;
    background: rgba(7, 16, 24, 0.48);
}

.feature-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 1.02rem;
}

.feature-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.table-panel {
    margin-bottom: 24px;
}

.table-wrapper {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(111, 194, 207, 0.12);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: rgba(5, 11, 17, 0.72);
}

.table-panel--full table {
    min-width: 980px;
}

thead th {
    padding: 14px 16px;
    text-align: left;
    color: var(--teal);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(7, 16, 24, 0.96);
}

tbody td {
    padding: 15px 16px;
    border-top: 1px solid rgba(111, 194, 207, 0.08);
    color: var(--text);
}

tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.01);
}

.gold-cell {
    color: var(--gold);
    font-weight: 800;
}

.table-note {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.table-link {
    color: var(--teal);
}

.table-link:hover {
    text-decoration: underline;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

.summary-panel {
    margin-bottom: 24px;
}

.summary-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.summary-inline div {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(111, 194, 207, 0.14);
    background: rgba(7, 16, 24, 0.5);
}

.summary-inline span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.summary-inline strong {
    color: var(--gold);
    font-size: 1.4rem;
}

.admin-login-card {
    align-items: center;
}

.search-form {
    align-content: end;
}

.reveal {
    animation: riseIn 700ms ease both;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(120%);
    }
}

@media (max-width: 980px) {
    .hero-card,
    .action-grid,
    .content-grid,
    .dashboard-grid,
    .user-management-grid,
    .summary-inline {
        grid-template-columns: 1fr;
    }

    .donation-form--wide {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stats,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        min-height: 148px;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100vw - 18px, 1180px);
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-card,
    .panel {
        padding: 22px;
    }

    .hero-stats,
    .stats-grid,
    .donation-form--wide {
        grid-template-columns: 1fr;
    }

    .mini-stats,
    .button-row {
        grid-template-columns: 1fr;
    }

    .button-row {
        display: grid;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .ghost-link,
    .primary-button,
    .danger-button,
    .field input {
        width: 100%;
    }
}
