:root {
    --bg: #080808;
    --panel: rgba(18, 18, 18, 0.92);
    --panel-strong: #141414;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f4f4f4;
    --muted: #a6a6a6;
    --accent: #d11f31;
    --accent-strong: #8f101c;
    --accent-soft: rgba(209, 31, 49, 0.14);
    --success: #1e8f59;
    --warning: #f0b24d;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(10, 10, 10, 0.38), rgba(10, 10, 10, 0.52)),
        radial-gradient(circle at top left, rgba(209, 31, 49, 0.18), transparent 28%),
        linear-gradient(180deg, #3f6672 0%, #4d7b84 32%, #936b6a 65%, #6f4239 100%);
}

button,
input,
select {
    font: inherit;
}

.site-backdrop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.backdrop-shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.22;
}

.shape-a {
    width: 320px;
    height: 320px;
    background: #c61c2d;
    top: -80px;
    left: -40px;
}

.shape-b {
    width: 260px;
    height: 260px;
    background: #5d0c15;
    right: -60px;
    top: 80px;
}

.backdrop-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.8), transparent);
}

.card-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.auth-view,
.app-view {
    padding: 26px;
}

.auth-shell {
    max-width: 620px;
    margin: 0 auto;
    display: grid;
    min-height: calc(100vh - 52px);
    align-items: center;
}

.auth-panel,
.topbar,
.hero-banner,
.section-banner,
.card-panel {
    border-radius: 24px;
}

.auth-panel {
    display: grid;
    align-content: center;
    padding: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.auth-brand,
.brand-lockup,
.profile-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark,
.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    font-family: "Sora", sans-serif;
    font-weight: 700;
    color: #fff;
}

.auth-topline {
    text-align: center;
    font-family: "Sora", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.auth-brand-centered {
    justify-content: center;
    text-align: center;
    margin-bottom: 6px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: "Sora", sans-serif;
}

p {
    margin: 0;
}

.auth-toggle,
.nav-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-toggle button,
.nav-pills button,
.btn {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.auth-toggle button,
.nav-pills button {
    padding: 12px 16px;
    background: rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.82);
}

.auth-toggle button.is-active,
.nav-pills button.is-active,
.auth-toggle button:hover,
.nav-pills button:hover {
    background: rgba(209, 31, 49, 0.26);
    color: #fff;
}

.auth-toggle button.is-active,
.nav-pills button.is-active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-toggle {
    justify-content: center;
    margin-bottom: 14px;
}

.auth-context {
    margin: 22px 0;
    text-align: center;
}

.auth-hint-card {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    display: grid;
    gap: 4px;
    text-align: center;
    justify-items: center;
}

.auth-hint-card strong {
    color: var(--text);
    font-weight: 700;
}

.auth-form,
.banking-form {
    display: grid;
    gap: 14px;
}

.auth-form[hidden] {
    display: none !important;
}

.auth-form {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

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

.auth-form .field,
.auth-form .field-grid {
    text-align: left;
}

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

.field-grid {
    grid-template-columns: repeat(2, 1fr);
}

input,
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255,255,255,0.12);
    color: var(--text);
}

select option {
    background: #161616;
    color: #f4f4f4;
}

select:focus,
input:focus,
button:focus {
    outline: 2px solid rgba(209, 31, 49, 0.45);
    outline-offset: 2px;
}

input::placeholder {
    color: #7a7a7a;
}

.form-note,
.form-message,
.banner-copy,
.profile-meta span,
.stack-item p,
.summary-card p,
.section-banner p {
    color: var(--muted);
}

.btn {
    padding: 12px 18px;
}

.btn-primary {
    background: #ffd0b7;
    color: #47241f;
    font-weight: 800;
    border-radius: 999px;
}

.btn-secondary {
    background: rgba(255,255,255,0.12);
    color: var(--text);
}

.btn-danger {
    background: rgba(209, 31, 49, 0.18);
    color: #ffd9de;
    border: 1px solid rgba(209, 31, 49, 0.3);
}

.btn-small {
    padding: 10px 14px;
    min-height: 40px;
}

.btn:hover,
.auth-toggle button:hover,
.nav-pills button:hover {
    transform: translateY(-1px);
}

.auth-feature-list article,
.stack-item,
.metric-card,
.timeline-item,
.panel-summary {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.auth-feature-list article {
    padding: 18px;
    display: grid;
    gap: 6px;
}

.topbar {
    max-width: 1380px;
    margin: 0 auto 20px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
}

.app-main {
    max-width: 1380px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.screen-panel {
    display: none;
    gap: 18px;
}

.screen-panel.is-active {
    display: grid;
}

.hero-banner,
.section-banner {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.metric-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
    padding: 18px;
}

.metric-card strong {
    display: block;
    font-size: 1.6rem;
    font-family: "Sora", sans-serif;
    margin-top: 8px;
}

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

.membership-layout {
    grid-template-columns: 0.95fr 1.05fr;
}

.card-panel {
    padding: 22px;
}

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

.section-badge {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #ffb7bf;
    font-size: 0.82rem;
}

.stack-list {
    display: grid;
    gap: 12px;
}

.stack-item,
.summary-card,
.timeline-item {
    padding: 16px;
}

.admin-roster-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.summary-card {
    display: grid;
    gap: 6px;
}

.panel-summary {
    padding: 18px;
    margin-bottom: 14px;
    display: grid;
    gap: 8px;
}

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    gap: 10px;
    z-index: 20;
}

.toast {
    min-width: 260px;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(14,14,14,0.95);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.toast.success {
    border-color: rgba(30,143,89,0.42);
}

.toast.error {
    border-color: rgba(209,31,49,0.42);
}

@media (max-width: 1180px) {
    .topbar,
    .metric-grid,
    .two-column,
    .membership-layout {
        grid-template-columns: 1fr;
    }

    .topbar {
        justify-items: start;
    }
}

@media (max-width: 760px) {
    .auth-view,
    .app-view {
        padding: 14px;
    }

    .auth-panel,
    .card-panel,
    .hero-banner,
    .section-banner {
        padding: 18px;
        border-radius: 20px;
    }

    .auth-context,
    .auth-hint-card {
        text-align: left;
        justify-items: start;
    }

    .field-grid,
    .hero-actions {
        grid-template-columns: 1fr;
    }

    .field-grid {
        display: grid;
    }

    .nav-pills {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .nav-pills button,
    .btn {
        min-height: 44px;
    }

    .brand-lockup,
    .profile-lockup,
    .section-head,
    .hero-banner,
    .section-banner,
    .admin-roster-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-topline,
    .auth-context,
    .auth-brand-centered,
    .auth-hint-card {
        text-align: center;
        justify-items: center;
    }

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