:root {
    --bg: #f4efe6;
    --surface: rgba(255, 255, 255, 0.78);
    --text: #1f2933;
    --muted: #667085;
    --line: rgba(31, 41, 51, 0.12);
    --primary: #0b6e4f;
    --primary-dark: #084c39;
    --accent: #f4b942;
    --danger: #c0392b;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(244, 185, 66, 0.28), transparent 30%),
        radial-gradient(circle at right center, rgba(11, 110, 79, 0.2), transparent 28%),
        linear-gradient(135deg, #f8f4eb 0%, #efe6d6 100%);
    min-height: 100vh;
}

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

.site-header, .site-footer, .hero-band, .content-grid, .auth-shell {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
}

.site-header nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-header nav a, .user-chip a, .muted, small { color: var(--muted); }

.brand { display: flex; align-items: center; gap: 0.9rem; }

.brand-mark {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--primary), #1d936d);
    color: white;
    font-weight: 700;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--line);
}

.hero-band {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    padding: 2rem 0 1rem;
}

.hero-band h1, .auth-showcase h1 {
    margin: 0.3rem 0 0.7rem;
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 0.95;
}

.eyebrow {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.12);
    color: var(--primary-dark);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quick-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stat-card, .panel, .auth-card, .toast {
    backdrop-filter: blur(18px);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.stat-card, .panel, .auth-card { border-radius: 28px; padding: 1.35rem; }
.stat-card strong { display: block; margin-top: 0.4rem; font-size: 2rem; }

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 1rem 0 3rem;
}

.admin-grid { grid-template-columns: 1.2fr 0.8fr; }
.full-width, .full-span { grid-column: 1 / -1; }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.9rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }

.pill {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.12);
    color: var(--primary-dark);
    font-size: 0.85rem;
}

.pill-light { background: rgba(244, 185, 66, 0.18); color: #7a4b00; }
.form-grid, .form-stack, .list-stack { display: grid; gap: 1rem; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label span { display: block; margin-bottom: 0.45rem; font-size: 0.92rem; }
input, select, textarea, button { font: inherit; }

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.inline-check { display: flex; align-items: center; gap: 0.75rem; }
.inline-check input { width: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
}

.btn-primary { background: linear-gradient(135deg, var(--primary), #17966d); color: white; }
.btn-secondary { background: linear-gradient(135deg, #ffe1a8, #f4b942); color: #3f2b05; }
.btn-danger { background: linear-gradient(135deg, #d85a4b, #b83222); color: white; }
.btn-small { padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.88rem; }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 90px);
    padding-bottom: 2rem;
}

.auth-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; width: 100%; }
.auth-card-wide { grid-template-columns: 0.95fr 1.05fr; }

.auth-showcase {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    min-height: 100%;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(244, 185, 66, 0.35), transparent 28%),
        linear-gradient(145deg, rgba(8, 76, 57, 0.95), rgba(12, 111, 80, 0.88));
    color: #f6fbf7;
    box-shadow: var(--shadow);
}

.auth-showcase-register {
    background:
        radial-gradient(circle at top right, rgba(255, 220, 140, 0.28), transparent 26%),
        linear-gradient(145deg, rgba(22, 54, 110, 0.95), rgba(29, 127, 148, 0.88));
}

.showcase-content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 1rem;
}

.showcase-content .eyebrow {
    background: rgba(255, 255, 255, 0.14);
    color: #f4f8f6;
}

.auth-showcase p,
.showcase-metrics span,
.showcase-steps p {
    color: rgba(246, 251, 247, 0.84);
}

.showcase-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent);
    animation: drift 16s ease-in-out infinite;
}

.showcase-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.7;
    animation: floaty 9s ease-in-out infinite;
}

.orb-one {
    width: 180px;
    height: 180px;
    right: -26px;
    top: -20px;
    background: rgba(244, 185, 66, 0.82);
}

.orb-two {
    width: 130px;
    height: 130px;
    left: -20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.18);
    animation-delay: -3s;
}

.orb-three {
    width: 170px;
    height: 170px;
    right: -24px;
    top: 18px;
    background: rgba(255, 231, 176, 0.55);
}

.orb-four {
    width: 125px;
    height: 125px;
    left: -20px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.16);
    animation-delay: -2s;
}

.showcase-metrics,
.showcase-steps {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.85rem;
}

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

.showcase-metrics article,
.showcase-steps div {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.showcase-metrics strong,
.showcase-steps span {
    display: block;
    margin-bottom: 0.35rem;
    color: #ffffff;
}

.showcase-steps span {
    font-size: 1.15rem;
    color: #ffe2a6;
}

.otp-card, .list-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.otp-form { display: flex; gap: 0.75rem; align-items: center; }

.tab-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tab-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(11, 110, 79, 0.08);
    border: 1px solid var(--line);
    color: var(--muted);
}

.tab-chip.active {
    background: linear-gradient(135deg, var(--primary), #17966d);
    color: white;
    border-color: transparent;
}

.search-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.action-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.action-inline form {
    margin: 0;
}

.debug-card {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(11, 110, 79, 0.08);
    border: 1px solid var(--line);
}

.toast {
    position: sticky;
    top: 1rem;
    z-index: 20;
    width: min(1180px, calc(100% - 2rem));
    margin: 1rem auto 0;
    padding: 0.9rem 1rem;
    border-radius: 20px;
}

.toast-success { border-left: 5px solid var(--primary); }
.toast-error { border-left: 5px solid var(--danger); }
.site-footer { padding: 0 0 2rem; color: var(--muted); }

@media (max-width: 900px) {
    .hero-band, .content-grid, .auth-card, .admin-grid, .form-grid { grid-template-columns: 1fr; }
    .site-header, .otp-card, .list-row, .otp-form, .user-chip { flex-direction: column; align-items: stretch; }
    .showcase-metrics { grid-template-columns: 1fr; }
    .search-bar { grid-template-columns: 1fr; }
}

@keyframes floaty {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(8px, -12px, 0); }
}

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-10px, 8px, 0); }
}
