/* =========================================================
   CREADXMONEY AUTH DESIGN SYSTEM
   ========================================================= */

:root {
    --cm-green: #075233;
    --cm-green-dark: #063522;
    --cm-green-light: #0b6541;

    --cm-mint: #c6e4d5;
    --cm-mint-light: #e6f4ed;

    --cm-gold: #e6a33d;
    --cm-gold-dark: #c9821f;

    --cm-white: #ffffff;
    --cm-background: #f5faf7;
    --cm-text: #13231c;
    --cm-muted: #82918a;
    --cm-border: #dce9e2;
    --cm-error: #d0454c;

    --cm-radius-sm: 12px;
    --cm-radius-md: 16px;
    --cm-radius-lg: 24px;

    --cm-shadow: 0 24px 60px rgba(7, 82, 51, 0.15);
}


/* =========================================================
   PAGE
   ========================================================= */

.auth-page {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 48% 52%;
    background: var(--cm-background);
}


/* =========================================================
   LEFT BRAND PANEL
   ========================================================= */

.auth-visual {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(230, 163, 61, 0.18),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 85%,
            rgba(198, 228, 213, 0.14),
            transparent 30%
        ),
     linear-gradient(135deg, #075233 0%, #0b6541 55%, #187a52 100%);

    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 34px),
        linear-gradient(135deg, #075233 0%, #0b6541 55%, #187a52 100%);

    color: var(--cm-white);
    padding: 55px 8%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}


/* Decorative circles */

.auth-visual::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(184, 207, 194, 0.15);
    border-radius: 50%;
    right: -180px;
    top: -120px;
}

.auth-visual::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(240, 190, 109, 0.12);
    border-radius: 50%;
    left: -160px;
    bottom: -100px;
}


/* =========================================================
   LOGO
   ========================================================= */

.auth-logo-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: fit-content;
}

.auth-main-logo {
    width: 210px !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 14px;
}


/* =========================================================
   BRAND COPY
   ========================================================= */

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.auth-brand-copy {
    margin-top: 110px;
}

.auth-eyebrow,
.auth-form-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.auth-eyebrow {
    color: var(--cm-gold);
    margin-bottom: 18px;
}

.auth-brand-copy h1 {
    margin: 0;
    font-size: clamp(42px, 4vw, 68px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -2px;
}

.auth-brand-copy h1 span {
    display: block;
    color: var(--cm-gold);
}

.auth-brand-copy p {
    max-width: 500px;
    margin-top: 26px;
    color: var(--cm-mint);
    font-size: 17px;
    line-height: 1.7;
}


/* =========================================================
   FEATURES
   ========================================================= */

.auth-features {
    margin-top: 55px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-feature-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(184, 207, 194, 0.10);
    border: 1px solid rgba(184, 207, 194, 0.18);

    border-radius: 12px;
}

.auth-feature-icon .material-icons-round {
    color: var(--cm-gold);
    font-size: 21px;
}

.auth-feature strong {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.auth-feature span {
    color: var(--cm-mint);
    font-size: 13px;
}


/* =========================================================
   BOTTOM
   ========================================================= */

.auth-visual-bottom {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: rgba(184, 207, 194, 0.65);

    font-size: 11px;
    letter-spacing: 0.3px;
}


/* =========================================================
   RIGHT FORM SECTION
   ========================================================= */

.auth-form-section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px;
    background: #f5faf7;
}


.auth-form-wrapper {
    width: 100%;
    max-width: 480px;
}


/* =========================================================
   MOBILE LOGO
   ========================================================= */

.auth-mobile-logo {
    text-align: center;
    margin-bottom: 35px;
}

.auth-mobile-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 14px;
}


/* =========================================================
   FORM HEADER
   ========================================================= */

.auth-form-header {
    margin-bottom: 38px;
}

.auth-form-eyebrow {
    color: var(--cm-green);
    margin-bottom: 12px;
}

.auth-form-header h2 {
    margin: 0;

    color: var(--cm-text);

    font-size: 36px;
    line-height: 1.15;
    font-weight: 700;

    letter-spacing: -1px;
}

.auth-form-header p {
    margin: 13px 0 0;

    color: var(--cm-muted);

    font-size: 15px;
    line-height: 1.6;
}

.auth-form-header strong {
    color: var(--cm-green);
}


/* =========================================================
   FORM
   ========================================================= */

.modern-auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;

    margin-bottom: 9px;

    color: var(--cm-text);

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   PHONE INPUT
   ========================================================= */

.modern-phone-input {
    width: 100%;
    height: 58px;

    display: flex;
    align-items: center;

    padding: 0 18px;

    background: var(--cm-white);

    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius-md);

    transition: all 0.2s ease;
}

.modern-phone-input:focus-within {
    border-color: var(--cm-green);

    box-shadow:
        0 0 0 4px rgba(7, 82, 51, 0.08);
}

.country-code {
    color: var(--cm-green);

    font-size: 15px;
    font-weight: 700;
}

.phone-divider {
    width: 1px;
    height: 24px;

    margin: 0 14px;

    background: var(--cm-border);
}

.modern-phone-input input {
    flex: 1;

    min-width: 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--cm-text);

    font-size: 15px;
}

.modern-phone-input input::placeholder {
    color: #a4afa9;
}


/* =========================================================
   BUTTON
   ========================================================= */

.modern-primary-btn {
    width: 100%;
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 0;
    border-radius: var(--cm-radius-md);

    background: var(--cm-green);
    color: var(--cm-white);

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.modern-primary-btn:hover {
    background: var(--cm-green-light);

    transform: translateY(-1px);

    box-shadow:
        0 10px 25px rgba(7, 82, 51, 0.18);
}

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

.modern-primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.modern-primary-btn .material-icons-round {
    font-size: 19px;
}


/* =========================================================
   ERROR
   ========================================================= */

.modern-form-error {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-top: 8px;

    color: var(--cm-error);

    font-size: 12px;
}

.modern-form-error .material-icons-round {
    font-size: 16px;
}

.otp-error {
    margin: -5px 0 20px;
}


/* =========================================================
   SECURITY
   ========================================================= */

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 25px;

    color: var(--cm-muted);

    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.auth-security-note .material-icons-round {
    color: var(--cm-green);
    font-size: 17px;
}


/* =========================================================
   TERMS
   ========================================================= */

.auth-terms {
    margin: 24px 0 0;

    color: #8a948e;

    font-size: 11px;
    line-height: 1.7;

    text-align: center;
}

.auth-terms a {
    color: var(--cm-green);

    font-weight: 600;

    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}


/* =========================================================
   TRUST BADGES
   ========================================================= */

.auth-trust-row {
    display: flex;

    justify-content: center;

    gap: 35px;

    margin-top: 35px;

    padding-top: 24px;

    border-top: 1px solid var(--cm-border);
}

.auth-trust-row div {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #7d8982;

    font-size: 11px;
    font-weight: 600;
}

.auth-trust-row .material-icons-round {
    color: var(--cm-green);
    font-size: 16px;
}


/* =========================================================
   OTP
   ========================================================= */

.otp-wrapper {
    position: relative;
}

.auth-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 40px;

    color: var(--cm-muted);

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition: color 0.2s ease;
}

.auth-back-btn:hover {
    color: var(--cm-green);
}

.auth-back-btn .material-icons-round {
    font-size: 17px;
}


/* =========================================================
   OTP FIELDS
   ========================================================= */

.otp-fields {
    display: flex;
    justify-content: flex-start;
    gap: 13px;

    margin-bottom: 28px;
}

.otp-input {
    width: 68px;
    height: 70px;

    border: 1px solid var(--cm-border);
    border-radius: 16px;

    background: var(--cm-white);

    color: var(--cm-green);

    font-size: 26px;
    font-weight: 700;

    text-align: center;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.otp-input:focus {
    border-color: var(--cm-green);

    box-shadow:
        0 0 0 4px rgba(7, 82, 51, 0.08);

    transform: translateY(-2px);
}


/* =========================================================
   RESEND
   ========================================================= */

.resend-section {
    margin-top: 25px;

    text-align: center;
}

.resend-timer {
    color: var(--cm-muted);

    font-size: 12px;
}

.resend-timer strong {
    color: var(--cm-green);
}

.resend-link {
    display: inline-flex;
    align-items: center;

    color: var(--cm-green);

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}

.resend-link:hover {
    color: var(--cm-gold-dark);
}


/* =========================================================
   LOADING
   ========================================================= */

.auth-spinner {
    width: 15px;
    height: 15px;

    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;

    border-radius: 50%;

    animation: authSpin 0.7s linear infinite;
}

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


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .auth-page {
        grid-template-columns: 42% 58%;
    }

    .auth-visual {
        padding: 40px;
    }

    .auth-brand-copy {
        margin-top: 80px;
    }

    .auth-brand-copy h1 {
        font-size: 44px;
    }

    .auth-form-section {
        padding: 35px;
    }

}


@media (max-width: 768px) {

    .auth-page {
        display: block;

        min-height: 100vh;

        background: #f5faf7;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-section {
        min-height: 100vh;

        padding: 35px 22px;

        align-items: flex-start;
    }

    .auth-form-wrapper {
        max-width: 500px;

        margin: auto;
    }

    .auth-mobile-logo {
        display: block;
    }

    .auth-form-header {
        text-align: center;
        margin-bottom: 32px;
    }

    .auth-form-header h2 {
        font-size: 30px;
    }

    .auth-trust-row {
        gap: 20px;
    }

}


@media (max-width: 480px) {

    .auth-form-section {
        padding: 28px 18px;
    }

    .auth-form-header h2 {
        font-size: 27px;
    }

    .auth-form-header p {
        font-size: 14px;
    }

    .modern-phone-input {
        height: 55px;
    }

    .modern-primary-btn {
        min-height: 55px;
    }

    .otp-fields {
        justify-content: center;
        gap: 9px;
    }

    .otp-input {
        width: 58px;
        height: 62px;

        font-size: 23px;
        border-radius: 14px;
    }

    .auth-trust-row {
        gap: 14px;
    }

}
