:root {
    --bg: #08140d;
    --bg-soft: #0f1f15;
    --card: rgba(13, 27, 18, 0.82);
    --card-solid: #122217;
    --line: rgba(255, 255, 255, 0.08);
    --text: #ecfff2;
    --muted: #b8d4c0;
    --green: #22c55e;
    --green-dark: #15803d;
    --green-soft: rgba(34, 197, 94, 0.15);
    --yellow: #facc15;
    --red: #ef4444;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Inter, Arial, sans-serif;
    background: radial-gradient(circle at top, #173d26 0%, var(--bg) 45%, #040805 100%);
    color: var(--text);
    min-height: 100vh;
}



a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.page-shell {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    padding: 22px 0 40px;
    position: relative;
    z-index: 2;
}

.glass-card, .card-surface {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.glass-card {
    background: linear-gradient(180deg, rgba(17, 34, 23, 0.92), rgba(10, 18, 13, 0.95));
    backdrop-filter: blur(18px);
    border-radius: 30px;
}

.card-surface {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 22px;
}

.public-layout {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 24px;
    padding: 24px;
}

.hero-panel {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.brand-row {
    display: flex;
    gap: 14px;
    align-items: center;
}
.brand-row.centered-brand { justify-content: center; }
.brand-logo { width: 68px; height: 68px; }
.small-logo { width: 54px; height: 54px; }
.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    color: #9bd8ae;
    margin-bottom: 6px;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.06; margin-bottom: 12px; }
h2 { font-size: 1.45rem; margin-bottom: 10px; }
h3 { font-size: 1.2rem; }
.lead { color: var(--muted); line-height: 1.7; font-size: 1rem; margin-bottom: 20px; }
.centered-text { text-align: center; }

.hero-badges, .hero-stats-grid, .button-row, .section-title-row, .panel-header, .submit-row, .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.hero-badges { justify-content: flex-start; margin-bottom: 18px; }
.badge-pill, .section-chip, .member-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.84rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
}

.hero-stats-grid, .stats-grid, .cards-grid, .dashboard-grid, .form-grid, .member-grid {
    display: grid;
    gap: 16px;
}
.hero-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: 1.2fr 0.8fr; margin-top: 18px; }
.cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.mini-stat, .dashboard-stat {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}
.mini-stat strong, .dashboard-stat strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
}
.mini-stat span, .dashboard-stat span { color: var(--muted); }

.field { margin-bottom: 16px; }
.field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}
.field input, .field select, .filter-grid input, .filter-grid select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    padding: 14px 15px;
    font-size: 15px;
    outline: none;
}
.field input:focus, .field select:focus, .filter-grid input:focus, .filter-grid select:focus {
    border-color: rgba(34, 197, 94, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}
.field-help, .hint, .limit-note { color: var(--muted); font-size: 0.9rem; }
.errorlist {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    color: #fecaca;
    font-size: 0.9rem;
}

.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
}
.choice-card input { width: auto; margin: 0; accent-color: var(--green); }
.choice-title { font-weight: 700; }

.checkbox-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}
.checkbox-control input {
    width: auto;
    margin: 0;
    accent-color: var(--green);
}

.hidden-section { display: none; }
.hidden-member { display: none; }
.team-section {
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.member-card {
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    padding: 18px;
}
.member-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.primary-btn, .secondary-btn, .ghost-link, .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 13px 18px;
    font-weight: 700;
    transition: 0.2s ease;
}
.primary-btn {
    background: linear-gradient(135deg, var(--green), #34d399);
    color: #041109;
    border: none;
    cursor: pointer;
}
.primary-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.secondary-btn {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}
.ghost-link {
    color: #9ceab7;
    border: 1px solid rgba(156,234,183,0.18);
    background: rgba(156,234,183,0.08);
}
.small-btn { padding: 11px 14px; }
.full-width-btn { width: 100%; }
.compact-row { justify-content: flex-start; }

.alert {
    border-radius: 16px;
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,0.08);
}
.alert-success { background: rgba(34,197,94,0.14); color: #d6ffe4; }
.alert-error { background: rgba(239,68,68,0.14); color: #ffd5d5; }
.alert-info, .alert-warning { background: rgba(250,204,21,0.12); color: #fff0bf; }
.message-stack { display: grid; gap: 10px; margin-bottom: 16px; }

.bg-orb {
    position: fixed;
    width: 360px; height: 360px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.26;
    z-index: 1;
}
.orb-1 { background: #1ce66d; top: -100px; left: -80px; }
.orb-2 { background: #facc15; bottom: -120px; right: -80px; }

.login-shell { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: min(560px, calc(100% - 24px)); padding: 28px; }
.stack-form { display: grid; gap: 6px; }

.admin-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}
.admin-sidebar {
    padding: 24px 18px;
    border-right: 1px solid rgba(255,255,255,0.08);
    background: rgba(6, 16, 10, 0.86);
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.sidebar-nav { display: grid; gap: 10px; }
.nav-link {
    justify-content: flex-start;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}
.nav-link.active { background: rgba(34,197,94,0.16); border-color: rgba(34,197,94,0.35); }
.nav-link.export-link { color: #d9ff83; }
.nav-link.danger-link { color: #ffd0d0; }

.admin-main { padding: 22px; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.content-card { margin-bottom: 18px; }
.responsive-table { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    vertical-align: top;
}
th { color: #a7efbf; font-size: 0.92rem; }

a:hover { opacity: 0.95; }
.team-list { display: grid; gap: 12px; }
.team-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.clean-list { list-style: none; padding: 0; margin: 0; }
.clean-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.clean-list li:last-child { border-bottom: none; }

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}
.single-filter-grid { grid-template-columns: 1fr auto; }

@media (max-width: 1080px) {
    .public-layout, .dashboard-grid, .cards-grid, .stats-grid, .member-grid { grid-template-columns: 1fr; }
    .hero-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
}

@media (max-width: 720px) {
    .page-shell { width: min(100%, calc(100% - 16px)); }
    .public-layout, .login-card, .card-surface, .hero-panel { padding: 16px; }
    .brand-row { align-items: flex-start; }
    .hero-stats-grid, .choice-cards, .form-grid.two-columns { grid-template-columns: 1fr; }
    .filter-grid, .single-filter-grid { grid-template-columns: 1fr; }
    .admin-main { padding: 14px; }
    .admin-topbar { flex-direction: column; align-items: stretch; }
    h1 { font-size: 1.9rem; }
    table { min-width: 580px; }
}
