/* ═══════════════════════════════════════════
   SHARED AUTH BACKGROUND + CARD SYSTEM
   ═══════════════════════════════════════════ */

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

body {
    min-height: 100vh;
    margin: 0;
    background: #0d2414;
    color: white;
    overflow-x: hidden;
}

/* ── Pitch stripes layer (fixed, behind everything) ── */
.pitch-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        repeating-linear-gradient(
            to right,
            rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 70px,
            transparent 70px, transparent 140px
        ),
        linear-gradient(180deg, #0d2414 0%, #132d1a 50%, #0d2414 100%);
    pointer-events: none;
}

/* ── Floating keywords canvas ── */
.keywords-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.kw {
    position: absolute;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    animation: kwFloat linear infinite;
    will-change: transform, opacity;
}

@keyframes kwFloat {
    0%   { transform: translateY(0)   translateX(0);   opacity: 0; }
    8%   { opacity: var(--op); }
    90%  { opacity: var(--op); }
    100% { transform: translateY(-110vh) translateX(var(--dx)); opacity: 0; }
}

/* ── Glowing centre orb ── */
.pitch-orb {
    position: fixed;
    left: 50%; top: 50%;
    width: 520px; height: 520px;
    margin: -260px 0 0 -260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,180,80,0.13) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* ── Page wrapper ── */
.auth-page {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ══════════════════════════
   AUTH CARD
══════════════════════════ */
.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    border: 1px solid rgba(110,224,127,0.18);
    background: linear-gradient(160deg, rgba(10,58,22,0.96) 0%, rgba(18,78,34,0.97) 100%);
    backdrop-filter: blur(18px);
    box-shadow:
        0 0 0 1px rgba(110,224,127,0.08),
        0 24px 64px rgba(0,0,0,0.55),
        0 0 80px rgba(30,130,60,0.12);
    overflow: hidden;
}

/* top accent line */
.auth-card::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4caf60, #6ee07f, #4caf60, transparent);
}

.auth-card-body {
    padding: 2rem 2.4rem 2.2rem;
}

/* ── Brand header ── */
.brand-header {
    text-align: center;
    margin-bottom: 1.8rem;
}
.brand-header img {
    width: 62px; height: 62px;
    margin-bottom: 0.55rem;
    filter: drop-shadow(0 0 8px rgba(110,224,127,0.4));
}
.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6ee07f;
    margin: 0 0 0.1rem;
    text-transform: uppercase;
}
.brand-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ── Field groups ── */
.field-group { margin-bottom: 1.1rem; }

.field-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.38rem;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"] {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    border: 1.5px solid rgba(110,224,127,0.2);
    background: rgba(0,0,0,0.28);
    color: #fff;
    font-size: 0.93rem;
    font-family: 'Rubik', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-group input:focus {
    outline: none;
    border-color: #6ee07f;
    box-shadow: 0 0 0 3px rgba(110,224,127,0.13);
    background: rgba(0,0,0,0.38);
}
.field-group input::placeholder { color: rgba(255,255,255,0.25); }

.field-group .helptext {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    margin-top: 0.28rem;
    display: block;
    line-height: 1.4;
}
.field-group ul.errorlist {
    list-style: none; padding: 0; margin: 0.3rem 0 0;
}
.field-group ul.errorlist li {
    font-size: 0.73rem;
    color: #ff7b7b;
}

/* ── Submit button ── */
.btn-auth {
    width: 100%;
    padding: 0.78rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2a6e35 0%, #3fa050 50%, #4caf60 100%);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 0.4rem;
    box-shadow: 0 4px 16px rgba(76,175,96,0.3);
}
.btn-auth:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(76,175,96,0.4);
}
.btn-auth:active { transform: translateY(0); }

/* ── Button loading state ── */
.btn-auth.is-loading {
    cursor: not-allowed;
    filter: brightness(0.75);
    transform: none !important;
    box-shadow: 0 4px 16px rgba(76,175,96,0.15) !important;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

.btn-auth.is-loading .btn-spinner {
    display: inline-block;
}

.btn-label-text { display: inline-block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Divider ── */
.auth-divider {
    display: flex; align-items: center; gap: 0.7rem;
    margin: 1.3rem 0 1rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.12);
}
.auth-divider span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    letter-spacing: 0.06em;
}

/* ── Crosslink ── */
.auth-crosslink {
    text-align: center;
    font-size: 0.83rem;
    color: rgba(255,255,255,0.45);
    margin: 0;
}
.auth-crosslink a {
    color: #6ee07f;
    text-decoration: none;
    font-weight: 700;
}
.auth-crosslink a:hover { text-decoration: underline; }

/* ── Alerts ── */
.alert {
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.9rem;
}
.alert-error, .alert-danger {
    background: rgba(220,53,69,0.18);
    border: 1px solid rgba(220,53,69,0.35);
    color: #ff9a9a;
}
.alert-success {
    background: rgba(76,175,96,0.18);
    border: 1px solid rgba(76,175,96,0.35);
    color: #a3f0b0;
}

/* ── Captcha row ── */
.captcha-row {
    display: flex; align-items: center; gap: 0.8rem;
}
.captcha-row img {
    border-radius: 6px;
    border: 1.5px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}
.captcha-row input[type="text"] {
    flex: 1;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    border: 1.5px solid rgba(110,224,127,0.2);
    background: rgba(0,0,0,0.28);
    color: #fff;
    font-size: 0.93rem;
}
.captcha-row input[type="text"]:focus {
    outline: none;
    border-color: #6ee07f;
    box-shadow: 0 0 0 3px rgba(110,224,127,0.13);
}

.required-star { color: #ff7b7b; margin-left: 2px; }

@media (max-width: 480px) {
    .auth-card-body { padding: 1.6rem 1.2rem 1.5rem; }
}
