/* Convention Fitness — shared member auth UI (login / register / forgot / reset / verify) */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --brand-green: #82FF00;
    --brand-green-deep: #6CD400;
    --brand-green-soft: rgba(130, 255, 0, 0.14);
    --brand-ink: #0c0c0c;
    --brand-panel: #141414;
    --brand-elevated: #1c1c1c;
    --brand-line: rgba(255, 255, 255, 0.1);
    --brand-text: #f4f4f4;
    --brand-muted: #a8a8a8;
    --brand-danger: #ff4d4f;
    --brand-success: #3dd68c;
    --radius: 18px;
    --auth-font: 'Outfit', sans-serif;
    --auth-display: 'Bebas Neue', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font);
    color: var(--brand-text);
    background: var(--brand-ink);
    overflow-x: hidden;
}

a {
    color: var(--brand-green);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ff8a33;
}

/* ---------- Shell ---------- */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
    width: 100%;
}

.auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    overflow: hidden;
    background:
        url('../img/brand/background.png') center / cover no-repeat,
        #111;
    /* Flat scrim over the photo (solid color, no gradient). */
    box-shadow: inset 0 0 0 100vmax rgba(8, 8, 8, 0.74);
}

.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.auth-brand::before {
    width: min(52vw, 420px);
    height: min(52vw, 420px);
    top: -12%;
    right: -10%;
    background: rgba(130, 255, 0, 0.14);
    border-radius: 50%;
    animation: authPulse 8s ease-in-out infinite;
}

.auth-brand::after {
    width: min(40vw, 320px);
    height: min(40vw, 320px);
    bottom: -8%;
    left: -8%;
    background: rgba(130, 255, 0, 0.08);
    border-radius: 50%;
    animation: authPulse 6.5s ease-in-out infinite reverse;
}

.auth-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.auth-shapes svg {
    position: absolute;
    fill: none;
    stroke: rgba(130, 255, 0, 0.45);
    stroke-width: 1.5;
}

.auth-shapes .shape-a {
    width: 140px;
    top: 14%;
    left: 10%;
    animation: authFloat 7s ease-in-out infinite;
}

.auth-shapes .shape-b {
    width: 110px;
    bottom: 18%;
    right: 14%;
    animation: authFloat 9s ease-in-out infinite reverse;
}

.auth-shapes .shape-c {
    width: 70px;
    top: 42%;
    right: 22%;
    stroke: rgba(255, 255, 255, 0.2);
    animation: authFloat 5.5s ease-in-out infinite;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    text-align: left;
    animation: authRise 0.75s ease-out both;
}

.auth-brand-logo {
    display: block;
    width: min(220px, 55vw);
    height: auto;
    margin-bottom: 1.75rem;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.auth-brand-name {
    margin: 0 0 0.35rem;
    font-family: var(--auth-display);
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    letter-spacing: 0.04em;
    line-height: 0.95;
    color: #fff;
    text-transform: uppercase;
}

.auth-brand-tag {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--brand-green);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-brand-copy {
    margin: 0;
    max-width: 34ch;
    color: var(--brand-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.auth-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--brand-line);
    background: rgba(255, 255, 255, 0.04);
    color: #e8e8e8;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-pill span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-green);
}

/* ---------- Form panel ---------- */

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--brand-panel);
    position: relative;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: var(--radius);
    background: rgba(28, 28, 28, 0.92);
    border: 1px solid var(--brand-line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    animation: authRise 0.7s ease-out 0.08s both;
}

.auth-card-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-card-mobile-brand img {
    width: 120px;
    height: auto;
    margin-bottom: 0.5rem;
}

.auth-kicker {
    margin: 0 0 0.35rem;
    color: var(--brand-green);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-title {
    margin: 0 0 0.5rem;
    font-family: var(--auth-display);
    font-size: clamp(2rem, 4vw, 2.55rem);
    letter-spacing: 0.04em;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
}

.auth-subtitle {
    margin: 0 0 1.5rem;
    color: var(--brand-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0 0 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-alert-danger {
    background: rgba(255, 77, 79, 0.12);
    border: 1px solid rgba(255, 77, 79, 0.35);
    color: #ffb3b4;
}

.auth-alert-success {
    background: rgba(61, 214, 140, 0.12);
    border: 1px solid rgba(61, 214, 140, 0.35);
    color: #b8f0d2;
}

.auth-alert-info {
    background: var(--brand-green-soft);
    border: 1px solid rgba(130, 255, 0, 0.35);
    color: #ffd2b0;
}

.auth-form {
    display: grid;
    gap: 0.95rem;
}

.auth-field {
    display: grid;
    gap: 0.4rem;
}

.auth-field label {
    color: #d6d6d6;
    font-size: 0.86rem;
    font-weight: 600;
}

.auth-field input,
.auth-field select,
.auth-form .form-control,
.auth-form .form-select {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    border: 1px solid #333;
    background: #101010;
    color: var(--brand-text);
    font-family: var(--auth-font);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input::placeholder,
.auth-form .form-control::placeholder {
    color: #6f6f6f;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(130, 255, 0, 0.2);
    background: #101010;
    color: var(--brand-text);
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

/* Readonly BMI — keep dark theme contrast (no light gray crash) */
.auth-field input.auth-bmi[readonly],
.auth-field input#bmi_display[readonly] {
    background: #1a1a1a !important;
    color: #FFFFFF !important;
    border-color: rgba(130, 255, 0, 0.55);
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: default;
    opacity: 1;
    -webkit-text-fill-color: #FFFFFF;
}

.auth-field input.auth-bmi[readonly]:focus,
.auth-field input#bmi_display[readonly]:focus {
    background: #1a1a1a !important;
    color: #FFFFFF !important;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(130, 255, 0, 0.18);
}

.auth-otp input {
    text-align: center;
    letter-spacing: 0.45em;
    font-weight: 700;
    font-size: 1.35rem;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 50px;
    margin-top: 0.35rem;
    padding: 0.85rem 1.1rem;
    border: 0;
    border-radius: 12px;
    background: var(--brand-green);
    color: #111;
    font-family: var(--auth-font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 24px rgba(130, 255, 0, 0.28);
}

.auth-btn:hover,
.auth-btn:focus {
    color: #111;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(130, 255, 0, 0.34);
    text-decoration: none;
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-links {
    display: grid;
    gap: 0.55rem;
    margin-top: 1.25rem;
    color: var(--brand-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-links .auth-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.auth-admin {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--brand-line);
    color: #8f8f8f;
    font-size: 0.82rem;
}

.auth-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem;
    border: 0;
    background: transparent;
    color: var(--brand-muted);
    font-family: var(--auth-font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-link-btn:hover {
    color: var(--brand-green);
}

.auth-footer-note {
    margin-top: 1.25rem;
    color: #777;
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Bootstrap alert leftovers inside auth pages */
.auth-card .alert {
    border-radius: 12px;
    border: 0;
    font-size: 0.9rem;
}

.auth-card .alert-danger {
    background: rgba(255, 77, 79, 0.12);
    color: #ffb3b4;
}

.auth-card .alert-success {
    background: rgba(61, 214, 140, 0.12);
    color: #b8f0d2;
}

.auth-card .alert-info,
.auth-card .alert-warning {
    background: var(--brand-green-soft);
    color: #ffd2b0;
}

/* ---------- Motion ---------- */

@keyframes authPulse {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes authRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        align-items: flex-start;
        padding: 1.25rem 1rem 2rem;
        background:
            url('../img/brand/background.png') center top / cover no-repeat,
            #121212;
        /* Flat scrim over the photo (solid color, no gradient). */
        box-shadow: inset 0 0 0 100vmax rgba(10, 10, 10, 0.92);
    }

    .auth-card {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        padding: 1.35rem 1.15rem 1.5rem;
        background: rgba(20, 20, 20, 0.88);
        backdrop-filter: blur(10px);
    }

    .auth-card-mobile-brand {
        display: block;
    }

    .auth-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .auth-title {
        font-size: 1.85rem;
    }

    .auth-btn {
        font-size: 0.9rem;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .auth-brand::before,
    .auth-brand::after,
    .auth-shapes svg,
    .auth-brand-inner,
    .auth-card {
        animation: none !important;
    }
}

/* Admin login (same shell, staff emphasis) */
.admin-auth .auth-brand-tag {
    color: #ffb06a;
}

.admin-auth .auth-kicker {
    letter-spacing: 0.16em;
}
