/* ==========================================
   FOOTBALL CAPTAIN
   LOGIN / REGISTER
========================================== */

:root {
    --auth-primary: var(--primary,#16A34A);
    --auth-text: var(--text,#0F172A);
    --auth-text-light: var(--text-light,#64748B);
    --auth-border: var(--border,#E2E8F0);
    --auth-background: var(--background,#F8FAFC);
    --auth-danger: var(--danger,#DC2626);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient( circle at top left, rgba(22,163,74,.10), transparent 34% ), var(--auth-background);
    color: var(--auth-text);
    font-family: "Inter",sans-serif;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.brand-logo {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: var(--auth-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(22,163,74,.20);
}

.auth-brand h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.auth-brand p {
    margin: 5px 0 0;
    color: var(--auth-text-light);
    font-size: 13px;
}

.auth-card {
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15,23,42,.08);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 6px;
    border-bottom: 1px solid #EEF2F7;
    background: #F8FAFC;
}

.auth-tab {
    min-height: 44px;
    border-radius: 14px;
    background: transparent;
    color: var(--auth-text-light);
    font-size: 14px;
    font-weight: 700;
    transition: .18s ease;
}

    .auth-tab.active {
        background: #fff;
        color: var(--auth-primary);
        box-shadow: 0 3px 12px rgba(15,23,42,.06);
    }

.auth-panel {
    padding: 24px;
}

.panel-heading {
    margin-bottom: 22px;
}

    .panel-heading h2 {
        margin: 0;
        font-size: 21px;
        font-weight: 700;
    }

    .panel-heading p {
        margin: 7px 0 0;
        color: var(--auth-text-light);
        font-size: 13px;
        line-height: 1.55;
    }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        font-size: 13px;
        font-weight: 600;
    }

.input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--auth-border);
    border-radius: 15px;
    background: #fff;
    color: var(--auth-text);
    outline: none;
    transition: .18s ease;
}

    .input:hover {
        border-color: #CBD5E1;
    }

    .input:focus {
        border-color: var(--auth-primary);
        box-shadow: 0 0 0 3px rgba(22,163,74,.09);
    }

    .input.invalid {
        border-color: var(--auth-danger);
        box-shadow: 0 0 0 3px rgba(220,38,38,.07);
    }

    .input::placeholder {
        color: #94A3B8;
    }

.password-input {
    position: relative;
}

    .password-input .input {
        padding-right: 72px;
    }

.toggle-password {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    background: #F1F5F9;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
}

    .toggle-password:hover {
        color: var(--auth-primary);
    }

.field-error {
    color: var(--auth-danger);
    font-size: 12px;
    line-height: 1.45;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.checkbox-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--auth-text-light);
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

    .checkbox-row input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.checkbox-box {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1px;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    background: #fff;
    transition: .18s ease;
}

.checkbox-row input:checked + .checkbox-box {
    border-color: var(--auth-primary);
    background: var(--auth-primary);
}

    .checkbox-row input:checked + .checkbox-box::after {
        content: "";
        width: 8px;
        height: 4px;
        margin-top: -2px;
        border-left: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: rotate(-45deg);
    }

.terms-row {
    align-items: flex-start;
}

.text-button {
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    color: var(--auth-primary);
    font-size: 12px;
    font-weight: 700;
}

.primary-button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 15px;
    background: var(--auth-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 9px 20px rgba(22,163,74,.18);
    transition: .18s ease;
}

    .primary-button:hover {
        transform: translateY(-1px);
    }

    .primary-button:active {
        transform: scale(.99);
    }

    .primary-button:disabled {
        cursor: not-allowed;
        opacity: .58;
        transform: none;
    }

.form-alert {
    padding: 12px 14px;
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.5;
}

    .form-alert.error {
        border: 1px solid #FECACA;
        background: #FEF2F2;
        color: #B91C1C;
    }

.auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    color: var(--auth-text-light);
    font-size: 13px;
}

    .auth-switch button {
        padding: 0;
        background: transparent;
        color: var(--auth-primary);
        font-weight: 700;
    }

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    color: #94A3B8;
    font-size: 11px;
}

/* ---------- Overlay ---------- */

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.40);
    z-index: 1100;
}

/* ---------- Bottom Sheet ---------- */

.bottom-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 460px;
    padding: 10px 20px 24px;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -12px 40px rgba(15,23,42,.16);
    z-index: 1200;
}

.sheet-handle {
    width: 44px;
    height: 5px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #CBD5E1;
}

.sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

    .sheet-header h2 {
        margin: 0;
        font-size: 20px;
    }

    .sheet-header p {
        margin: 5px 0 0;
        color: var(--auth-text-light);
        font-size: 13px;
        line-height: 1.5;
    }

.sheet-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #F1F5F9;
    color: #64748B;
    font-size: 21px;
}

.forgot-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #0F172A;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(15,23,42,.22);
    z-index: 1300;
}

[hidden] {
    display: none !important;
}

@media(max-width:480px) {

    .auth-page {
        align-items: flex-start;
        padding: 22px 14px;
    }

    .auth-panel {
        padding: 21px 17px;
    }

    .auth-brand {
        padding: 0 3px;
    }

    .form-options {
        align-items: flex-start;
    }

    .bottom-sheet {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media(max-width:360px) {

    .auth-brand h1 {
        font-size: 19px;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .form-options {
        flex-direction: column;
    }

    .auth-switch {
        flex-direction: column;
    }
}

@media(min-width:768px) {

    .bottom-sheet {
        bottom: 24px;
        border-radius: 24px;
    }
}
