/* ============================================================
   RosterMate auth pages (login / register / password / lockout…)
   Brand: #155dee primary, ink #101828 — matches the landing pages.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@700;800&display=swap');

:root {
    --rm-blue: #155dee;
    --rm-blue-dark: #163cc4;
    --rm-ink: #101828;
    --rm-text: #344054;
    --rm-muted: #667085;
    --rm-border: #d0d5dd;
    --rm-error: #dc2626;
    --rm-success: #16a34a;
    /* legacy tokens still referenced by the shared auth rules in mainStyles.css */
    --background: #eff4ff;
    --sec-background: #e8efff;
    --element-background: #ffffff;
    --accent: #155dee;
    --accent-hover: #163cc4;
    --border: #d0d5dd;
    --text: #101828;
    --faded-text: #667085;
    --accent-text: #ffffff;
    --shadow: 0 20px 60px rgba(2, 12, 40, 0.45);
    --error: #dc2626;
}

/* ---------- Background ----------
   Fixed-position, GPU-composited elements instead of the old seven
   background-attachment:fixed parallax layers — those forced a full
   repaint on every scroll frame and made the register page lag.
   Layers: brand gradient + corner glows + dot grid + a faint giant
   logo watermark, plus one drifting glow orb animated on transform
   only (composited, no repaints). */
body {
    background-color: #0a1628;
}

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        z-index: -1;
        background:
            /* faint RosterMate mark, bottom-right */
            url("data:image/svg+xml,%3Csvg viewBox='0 0 3935.55 3383.41' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' fill-opacity='.05' d='M2028.37,1677.43l-284.84-285.49a56.06,56.06,0,0,0-39.68-16.47H790.73a56,56,0,0,1-44.94-22.54L488.67,1008.05c-27.57-37-1.18-89.55,44.93-89.55H1845.87a56,56,0,0,1,39.7,16.48L2682,1734.13a56,56,0,0,1,0,79.15l-779.66,781.46a56,56,0,0,0-6.28,71.66l535.11,766.83c22.3,32,69.61,32,91.92,0L4311,872.44c31.4-45,102-22.75,102,32.09V2933.86a56,56,0,0,1-10.11,32.11L3961.72,3597.1c-31.41,44.93-102,22.71-102-32.11V2470.67c0-54.84-70.63-77.05-102-32.07L2523,4207.8c-22.31,32-69.62,32-91.93,0L1332.6,2634a56,56,0,0,0-46-24H1130.55a56.05,56.05,0,0,0-56,56.05v974.4c0,54.84-70.62,77.05-102,32.09L531.32,3040.63a56,56,0,0,1-10.09-32.08V2115.5a56.05,56.05,0,0,1,56-56.05H1703.8a56,56,0,0,0,39.74-16.52l284.89-286.38A56.06,56.06,0,0,0,2028.37,1677.43Z' transform='translate(-477.45 -848.37)'/%3E%3C/svg%3E") no-repeat right -6vmin bottom -10vmin / 58vmin auto,
            /* subtle dot grid */
            radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.5px) 0 0 / 30px 30px,
            /* corner glows + base gradient */
            radial-gradient(900px 520px at 85% -10%, rgba(21, 93, 238, 0.40), transparent 60%),
            radial-gradient(700px 460px at -10% 110%, rgba(21, 93, 238, 0.30), transparent 60%),
            linear-gradient(160deg, #0a1628 0%, #10224d 55%, #1a3a7a 100%);
    }

    /* Drifting glow orb — transform-only animation, fully composited */
    body::after {
        content: '';
        position: fixed;
        z-index: -1;
        left: 50%;
        top: 50%;
        width: 62vmax;
        height: 62vmax;
        border-radius: 50%;
        pointer-events: none;
        background: radial-gradient(circle, rgba(21, 93, 238, 0.26) 0%, rgba(6, 182, 212, 0.10) 42%, transparent 68%);
        animation: rm-orb-drift 26s ease-in-out infinite alternate;
        will-change: transform;
    }

@keyframes rm-orb-drift {
    0% {
        transform: translate(-85%, -65%) scale(1);
    }

    50% {
        transform: translate(-25%, -50%) scale(1.15);
    }

    100% {
        transform: translate(-60%, -15%) scale(0.95);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::after {
        animation: none;
    }
}

/* ---------- Container & card ---------- */
.auth-container {
    position: static;
    left: auto;
    transform: none;
    display: flex;
    justify-content: center;
    padding: 48px 16px 64px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    backdrop-filter: none;
    border: none;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(2, 12, 40, 0.45);
    padding: 40px 36px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    color: var(--rm-text);
}

/* mainStyles caps .auth-container.wide at 800px without auto margins,
   which shoved the register card to the left — recenter it. */
.auth-container.wide {
    max-width: none;
    margin: 0 auto;
}

    .auth-container.wide .auth-card {
        max-width: 720px;
    }

/* ---------- Logo ---------- */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

    .auth-logo img {
        width: 34px;
        height: 34px;
        display: block;
    }

    .auth-logo span {
        font-family: 'Manrope', sans-serif;
        font-size: 1.35rem;
        font-weight: 800;
        color: var(--rm-ink);
        letter-spacing: -0.02em;
    }

        .auth-logo span b {
            color: var(--rm-blue);
            font-weight: 800;
        }

/* ---------- Headings ---------- */
.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--rm-ink);
    margin: 0 0 5px;
}

.auth-subtitle {
    color: var(--rm-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ---------- Form ---------- */
.auth-card .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rm-text);
    margin-bottom: 6px;
}

.auth-card .form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid var(--rm-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--rm-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

    .auth-card .form-input:hover {
        border-color: #98a2b3;
    }

    .auth-card .form-input:focus {
        outline: none;
        border-color: var(--rm-blue);
        box-shadow: 0 0 0 4px rgba(21, 93, 238, 0.15);
    }

    .auth-card .form-input::placeholder {
        color: #98a2b3;
    }

.auth-card select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 38px;
}

/* ---------- Buttons ---------- */
.auth-button {
    width: 100%;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rm-blue);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.975rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(21, 93, 238, 0.35);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}

    .auth-button:hover {
        background: var(--rm-blue-dark);
        box-shadow: 0 4px 16px rgba(21, 93, 238, 0.45);
    }

    .auth-button:active {
        transform: scale(0.98);
    }

    .auth-button:disabled {
        opacity: 0.55;
        cursor: not-allowed;
        box-shadow: none;
    }

.auth-button-link {
    text-decoration: none;
}

/* ---------- Links & footer text ---------- */
.auth-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    margin-top: 4px;
}

    .auth-links p,
    .auth-text {
        color: var(--rm-muted);
        font-size: 0.9rem;
        margin: 0;
    }

.auth-link {
    color: var(--rm-blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

    .auth-link:hover {
        color: var(--rm-blue-dark);
        text-decoration: underline;
    }

/* ---------- Remember me ---------- */
.password-manager-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 13px;
    color: #4b5563;
    margin: 12px 0;
}

    .password-manager-tip svg {
        flex-shrink: 0;
        color: #6b7280;
    }

    .password-manager-tip strong {
        color: #374151;
        font-weight: 600;
    }

/* ---------- Validation ---------- */
.validation-summary,
.form-error,
.validation-message,
.auth-card .text-danger {
    color: var(--rm-error);
    font-size: 0.825rem;
}

.form-error,
.validation-message,
.auth-card .text-danger {
    display: block;
    margin-top: 4px;
}

.validation-summary ul {
    margin: 0 0 10px;
    padding-left: 18px;
}

.text-red-600 {
    color: var(--rm-error);
}

.text-green-600 {
    color: var(--rm-success);
}

.confirmation-message {
    margin-bottom: 25px;
    color: var(--rm-text);
    line-height: 1.6;
}

/* ---------- Password visibility toggle ---------- */
.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

    .password-wrapper .form-input {
        width: 100%;
        box-sizing: border-box;
    }

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--rm-muted);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .password-toggle-icon:hover {
        color: var(--rm-blue);
    }

/* ---------- Password strength & requirements ----------
   Overrides the small versions in mainStyles.css — the checklist was
   tiny and hard to read. */
.password-strength-container {
    margin-top: 12px;
}

.password-strength-meter {
    height: 6px;
    border-radius: 3px;
    background: #eaecf0;
    overflow: hidden;
}

.password-strength-meter-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

    .password-strength-meter-fill.strength-weak {
        width: 25%;
        background: var(--rm-error);
    }

    .password-strength-meter-fill.strength-fair {
        width: 50%;
        background: #f59e0b;
    }

    .password-strength-meter-fill.strength-good {
        width: 75%;
        background: #22c55e;
    }

    .password-strength-meter-fill.strength-strong {
        width: 100%;
        background: var(--rm-success);
    }

.password-strength-text {
    margin-top: 7px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .password-strength-text.strength-weak {
        color: var(--rm-error);
    }

    .password-strength-text.strength-fair {
        color: #d97706;
    }

    .password-strength-text.strength-good {
        color: #16a34a;
    }

    .password-strength-text.strength-strong {
        color: var(--rm-success);
    }

.password-requirements {
    margin-top: 12px;
    background: #f8faff;
    border: 1px solid #e3ebfb;
    border-radius: 10px;
    padding: 14px 16px;
    display: grid;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--rm-text);
}

    .password-requirements .requirements-title {
        font-weight: 600;
        color: var(--rm-ink);
    }

.requirement {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--rm-muted);
    transition: color 0.15s ease;
}

    .requirement::before {
        content: '';
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        border-radius: 50%;
        border: 2px solid #cbd5e1;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        line-height: 1;
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }

    .requirement.passed {
        color: var(--rm-success);
    }

        .requirement.passed::before {
            content: '\2713';
            color: #ffffff;
            background: var(--rm-success);
            border-color: var(--rm-success);
        }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    .auth-card {
        padding: 30px 22px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
