/* =========================================================
   AUTHENTICATION CSS
   Login + Registration + Forgot Password
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #4f46e5;

    --bg: #f5f7fb;
    --card: #ffffff;

    --text: #111827;
    --text-light: #374151;
    --muted: #6b7280;

    --border: #e5e7eb;
    --input-bg: #f9fafb;

    --success: #16a34a;
    --danger: #dc2626;
}


/* =========================================================
   BODY
========================================================= */

body {
    font-family: "Inter", sans-serif;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(37, 99, 235, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(79, 70, 229, 0.10),
            transparent 30%
        ),
        var(--bg);

    color: var(--text);

    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   AUTH WRAPPER
========================================================= */

.auth-wrapper,
.register-wrapper {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 15px;
}


/* =========================================================
   AUTH CARD
========================================================= */

.auth-card,
.register-card {
    width: 100%;
    max-width: 450px;

    background: rgba(255, 255, 255, 0.97);

    border: 1px solid rgba(229, 231, 235, 0.85);

    border-radius: 24px;

    padding: 34px;

    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.10);
}


/* =========================================================
   BRAND
========================================================= */

.auth-brand,
.brand {
    text-align: center;
    margin-bottom: 28px;
}


.auth-logo,
.brand-logo {
    width: 58px;
    height: 58px;

    margin: 0 auto 15px;

    border-radius: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    font-size: 25px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    box-shadow:
        0 10px 25px rgba(37, 99, 235, 0.25);
}


.auth-brand h1,
.brand h1 {
    font-size: 25px;

    font-weight: 800;

    margin-bottom: 7px;

    color: var(--text);
}


.auth-brand p,
.brand p {
    font-size: 14px;

    line-height: 1.5;

    color: var(--muted);
}


/* =========================================================
   FORM GROUP
========================================================= */

.form-group {
    margin-bottom: 18px;
}


/* =========================================================
   LABEL
========================================================= */

.form-label {
    display: block;

    font-size: 13px;

    font-weight: 600;

    margin-bottom: 8px;

    color: var(--text-light);
}


/* =========================================================
   INPUT WRAPPER
========================================================= */

.input-wrapper {
    position: relative;
}


/* =========================================================
   INPUT ICON
========================================================= */

.input-icon {
    position: absolute;

    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: #9ca3af;

    font-size: 15px;

    z-index: 2;

    pointer-events: none;
}


/* =========================================================
   FORM CONTROL
========================================================= */

.form-control {
    width: 100%;
    height: 50px;

    border: 1px solid var(--border);

    border-radius: 13px;

    background: var(--input-bg);

    padding: 0 15px 0 44px;

    font-family: inherit;

    font-size: 14px;

    color: var(--text);

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.form-control::placeholder {
    color: #9ca3af;
}


.form-control:hover {
    border-color: #d1d5db;
}


.form-control:focus {
    border-color: var(--primary);

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.08);
}


/* =========================================================
   PASSWORD LABEL ROW
========================================================= */

.password-label-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;
}


.password-label-row .form-label {
    margin-bottom: 8px;
}


/* =========================================================
   FORGOT PASSWORD
========================================================= */

.forgot-link {
    font-size: 12px;

    font-weight: 600;

    color: var(--primary);

    text-decoration: none;

    margin-bottom: 8px;
}


.forgot-link:hover {
    text-decoration: underline;
}


/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.password-toggle {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: none;

    background: transparent;

    color: #9ca3af;

    cursor: pointer;

    z-index: 3;

    border-radius: 8px;

    transition: 0.2s ease;
}


.password-toggle:hover {
    color: var(--primary);

    background: rgba(37, 99, 235, 0.06);
}


/* =========================================================
   REMEMBER ME
========================================================= */

.remember-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: -3px;

    margin-bottom: 20px;
}


.remember-label {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 12px;

    color: var(--muted);

    cursor: pointer;

    user-select: none;
}


.remember-label input {
    width: 15px;
    height: 15px;

    accent-color: var(--primary);

    cursor: pointer;
}


/* =========================================================
   AUTH / REGISTER BUTTON
========================================================= */

.auth-btn,
.register-btn {
    width: 100%;
    height: 52px;

    border: none;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    box-shadow:
        0 10px 25px rgba(37, 99, 235, 0.23);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease;
}


.auth-btn:hover,
.register-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 30px rgba(37, 99, 235, 0.30);
}


.auth-btn:active,
.register-btn:active {
    transform: translateY(0);
}


.auth-btn:disabled,
.register-btn:disabled {
    opacity: 0.65;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   AUTH SWITCH / LOGIN LINK
========================================================= */

.auth-switch,
.login-link {
    text-align: center;

    margin-top: 23px;

    font-size: 13px;

    line-height: 1.5;

    color: var(--muted);
}


.auth-switch a,
.login-link a {
    color: var(--primary);

    font-weight: 700;

    text-decoration: none;
}


.auth-switch a:hover,
.login-link a:hover {
    text-decoration: underline;
}


/* =========================================================
   SECURITY TEXT
========================================================= */

.secure-text {
    margin-top: 20px;

    padding-top: 17px;

    border-top: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    color: var(--muted);

    font-size: 11px;
}


.secure-text i {
    color: var(--success);

    font-size: 12px;
}


/* =========================================================
   SPONSOR STATUS
========================================================= */

.sponsor-status {
    display: none;

    align-items: center;

    gap: 7px;

    margin-top: 7px;

    font-size: 11px;

    color: var(--success);
}


.sponsor-status i {
    font-size: 11px;
}


/* =========================================================
   PHONE INPUT - INTL TEL INPUT
========================================================= */

.iti {
    width: 100%;
}


.iti .form-control {
    padding-left: 88px;
}


.iti__country-container {
    border-radius: 13px 0 0 13px;
}


.iti__selected-country {
    border-radius: 13px 0 0 13px;
}


.iti__dropdown-content {
    border-radius: 12px;

    box-shadow:
        0 15px 40px rgba(15, 23, 42, 0.15);
}


/* =========================================================
   ERROR STATE
========================================================= */

.form-control.input-error {
    border-color: var(--danger);

    background: #fffafa;

    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.06);
}


.input-error-message {
    margin-top: 6px;

    font-size: 11px;

    color: var(--danger);
}


/* =========================================================
   SUCCESS STATE
========================================================= */

.form-control.input-success {
    border-color: var(--success);

    background: #fafffb;

    box-shadow:
        0 0 0 4px rgba(22, 163, 74, 0.06);
}


/* =========================================================
   LOADING BUTTON
========================================================= */

.auth-btn.loading,
.register-btn.loading {
    pointer-events: none;

    opacity: 0.75;
}


.auth-btn.loading i,
.register-btn.loading i {
    animation: authSpin 0.8s linear infinite;
}


@keyframes authSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================================
   MOBILE RESPONSIVE
========================================================= */

@media (max-width: 480px) {

    .auth-wrapper,
    .register-wrapper {
        min-height: 100dvh;

        padding: 16px;

        align-items: flex-start;

        padding-top: 25px;
    }


    .auth-card,
    .register-card {
        padding: 25px 20px;

        border-radius: 21px;
    }


    .auth-brand,
    .brand {
        margin-bottom: 25px;
    }


    .auth-logo,
    .brand-logo {
        width: 54px;
        height: 54px;

        border-radius: 17px;

        font-size: 22px;
    }


    .auth-brand h1,
    .brand h1 {
        font-size: 22px;
    }


    .auth-brand p,
    .brand p {
        font-size: 13px;
    }


    .form-control {
        height: 48px;
    }


    .auth-btn,
    .register-btn {
        height: 50px;
    }

}


/* =========================================================
   VERY SMALL DEVICES
========================================================= */

@media (max-width: 360px) {

    .auth-wrapper,
    .register-wrapper {
        padding: 10px;
    }


    .auth-card,
    .register-card {
        padding: 22px 16px;

        border-radius: 19px;
    }


    .auth-brand h1,
    .brand h1 {
        font-size: 20px;
    }


    .password-label-row {
        align-items: flex-start;
    }


    .forgot-link {
        font-size: 11px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}