﻿
/* =========================================================
   AUTHENTICATION UI
   Login & Reset Password
========================================================= */

:root {
    --auth-primary: #4b5fe9;
    --auth-primary-hover: #3c50d8;
    --auth-primary-light: #eef1ff;
    --auth-text: #212529;
    --auth-muted: #6c757d;
    --auth-border: #e2e6ed;
    --auth-danger: #dc3545;
    --auth-success: #198754;
    --auth-card-bg: #ffffff;
    --auth-radius: 20px;
}


/* =========================================================
   PAGE
========================================================= */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: radial-gradient( circle at 12% 12%, rgba(95, 115, 255, 0.09), transparent 35% ), radial-gradient( circle at 88% 88%, rgba(95, 115, 255, 0.08), transparent 35% ), linear-gradient( 135deg, #f5f7ff 0%, #eef2ff 50%, #f8faff 100% );
}


    /* Background decorative circles */

    .auth-page::before,
    .auth-page::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
        z-index: -1;
    }


    .auth-page::before {
        width: 500px;
        height: 500px;
        top: -230px;
        right: -180px;
        border: 1px solid rgba(75, 95, 233, 0.04);
        box-shadow: 0 0 0 45px rgba(75, 95, 233, 0.025), 0 0 0 90px rgba(75, 95, 233, 0.02);
    }


    .auth-page::after {
        width: 450px;
        height: 450px;
        bottom: -250px;
        left: -200px;
        border: 1px solid rgba(75, 95, 233, 0.04);
        box-shadow: 0 0 0 45px rgba(75, 95, 233, 0.025), 0 0 0 90px rgba(75, 95, 233, 0.02);
    }


/* =========================================================
   AUTH CARD
========================================================= */

.auth-card {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    padding: 48px;
    background: var(--auth-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--auth-radius);
    box-shadow: 0 24px 70px rgba(31, 45, 61, 0.08), 0 4px 18px rgba(31, 45, 61, 0.025);
}


/* =========================================================
   LOGO
========================================================= */

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
}


    .auth-logo img {
        display: block;
        width: auto;
        height: auto;
        max-width: 220px;
        max-height: 65px;
        object-fit: contain;
    }


/* =========================================================
   HEADING
========================================================= */

.auth-heading {
    text-align: center;
    margin-bottom: 35px;
}


    .auth-heading h1,
    .auth-heading h2 {
        margin: 0 0 12px;
        color: var(--auth-text);
        font-size: 28px;
        font-weight: 700;
        letter-spacing: -0.7px;
        line-height: 1.3;
    }


    .auth-heading p {
        margin: 0;
        color: var(--auth-muted);
        font-size: 15px;
        line-height: 1.6;
    }


/* =========================================================
   FORM
========================================================= */

.auth-form {
    width: 100%;
}


    .auth-form .form-group {
        margin-bottom: 25px;
    }


    .auth-form label {
        display: block;
        margin-bottom: 9px;
        color: #344054;
        font-size: 14px;
        font-weight: 600;
    }


/* =========================================================
   INPUT GROUP
========================================================= */

.auth-input-group {
    position: relative;
    width: 100%;
}


    /* =========================================================
   INPUT
========================================================= */

    .auth-input,
    .auth-input-group input,
    .auth-input-group .form-control {
        display: block;
        width: 100%;
        height: 52px;
        color: var(--auth-text);
        font-family: inherit;
        font-size: 15px;
        background-color: #ffffff;
        border: 1px solid var(--auth-border);
        border-radius: 12px;
        outline: none;
        box-shadow: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }


    .auth-input,
    .auth-input-group input,
    .auth-input-group .form-control {
        padding: 12px 16px;
    }


        .auth-input::placeholder,
        .auth-input-group input::placeholder {
            color: #a0a8b5;
            opacity: 1;
        }


        .auth-input:hover,
        .auth-input-group input:hover {
            border-color: #cbd2df;
        }


        .auth-input:focus,
        .auth-input-group input:focus,
        .auth-input-group .form-control:focus {
            background-color: #ffffff;
            border-color: var(--auth-primary);
            box-shadow: 0 0 0 4px rgba(75, 95, 233, 0.10);
            outline: none;
        }


/* =========================================================
   INPUT ICON
   This handles icons regardless of the has-icon class.
========================================================= */

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #98a2b3;
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
    z-index: 3;
}


/* Reserve space for the icon */

.auth-input-group:has(.auth-input-icon) .auth-input,
.auth-input-group:has(.auth-input-icon) input,
.auth-input-group:has(.auth-input-icon) .form-control {
    padding-left: 46px !important;
}


/* Fallback for browsers that don't support :has() */

.auth-input-group.has-icon .auth-input,
.auth-input-group.has-icon input,
.auth-input-group.has-icon .form-control {
    padding-left: 46px !important;
}


/* Also support icons directly inside input groups */

.auth-input-group > i:not(.auth-password-toggle),
.auth-input-group > span:not(.auth-password-toggle),
.auth-input-group > svg:not(.auth-password-toggle) {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #98a2b3;
    pointer-events: none;
    z-index: 3;
}


/* =========================================================
   PASSWORD INPUT
========================================================= */

.auth-input-group.has-password-toggle .auth-input,
.auth-input-group.has-password-toggle input,
.auth-input-group.has-password-toggle .form-control {
    padding-right: 48px !important;
}


/* Password toggle */

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #98a2b3;
    font-size: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 4;
    transition: color 0.2s ease;
}


    .auth-password-toggle:hover {
        color: var(--auth-primary);
    }


    .auth-password-toggle:focus {
        outline: none;
    }


/* =========================================================
   FORM OPTIONS
========================================================= */

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: -5px;
    margin-bottom: 25px;
}


    .auth-form-options label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        color: var(--auth-muted);
        font-size: 13px;
        font-weight: 400;
    }


    .auth-form-options input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--auth-primary);
        cursor: pointer;
    }


/* =========================================================
   LINKS
========================================================= */

.auth-link {
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}


    .auth-link:hover {
        color: var(--auth-primary-hover);
        text-decoration: underline;
    }


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 13px 20px;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient( 135deg, #7886f4 0%, #4b5fe9 100% );
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}


    .auth-submit:hover {
        color: #ffffff !important;
        background: linear-gradient( 135deg, #6877ee 0%, #3c50d8 100% );
        box-shadow: 0 8px 22px rgba(75, 95, 233, 0.22);
    }


    .auth-submit:active {
        transform: translateY(1px);
    }


    .auth-submit:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(75, 95, 233, 0.15);
    }


    .auth-submit:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        box-shadow: none;
    }


    /* Button icon */

    .auth-submit i,
    .auth-submit svg {
        margin-right: 10px;
    }


/* =========================================================
   ALERTS
========================================================= */

.auth-alert {
    padding: 14px 16px;
    margin-bottom: 22px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}


.auth-alert-danger {
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
}


.auth-alert-success {
    color: #0f5132;
    background: #d1e7dd;
    border: 1px solid #badbcc;
}


.auth-alert-warning {
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #ffecb5;
}


/* =========================================================
   VALIDATION
========================================================= */

.auth-validation-summary {
    padding: 13px 16px;
    margin-bottom: 22px;
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 10px;
    font-size: 13px;
}


    .auth-validation-summary ul {
        margin: 0;
        padding-left: 18px;
    }


    .auth-validation-summary li + li {
        margin-top: 5px;
    }


.auth-validation-error {
    display: block;
    margin-top: 6px;
    color: var(--auth-danger);
    font-size: 12px;
}


.auth-input.is-invalid,
.auth-input.input-validation-error,
.auth-input-group input.is-invalid,
.auth-input-group input.input-validation-error {
    border-color: var(--auth-danger);
}


    .auth-input.is-invalid:focus,
    .auth-input.input-validation-error:focus,
    .auth-input-group input.is-invalid:focus,
    .auth-input-group input.input-validation-error:focus {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.10);
    }


/* =========================================================
   RESET PASSWORD
========================================================= */

.auth-password-requirements {
    margin-top: 9px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.6;
}


.auth-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}


    .auth-back:hover {
        color: var(--auth-primary);
    }


/* =========================================================
   SUCCESS STATE
========================================================= */

.auth-success {
    text-align: center;
    padding: 10px 0 5px;
}


.auth-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    color: var(--auth-success);
    background: rgba(25, 135, 84, 0.10);
    border-radius: 50%;
    font-size: 30px;
}


.auth-success h2 {
    margin: 0 0 12px;
    color: var(--auth-text);
    font-size: 25px;
    font-weight: 700;
}


.auth-success p {
    margin: 0 0 25px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   FOOTER
========================================================= */

.auth-footer {
    margin-top: 32px;
    padding-top: 22px;
    text-align: center;
    border-top: 1px solid #edf0f4;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.6;
}


    .auth-footer p {
        margin: 0;
    }


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 576px) {

    .auth-page {
        padding: 20px 15px;
    }


    .auth-card {
        max-width: 100%;
        padding: 32px 25px;
        border-radius: 16px;
    }


    .auth-logo {
        margin-bottom: 28px;
    }


        .auth-logo img {
            max-width: 180px;
            max-height: 55px;
        }


    .auth-heading {
        margin-bottom: 28px;
    }


        .auth-heading h1,
        .auth-heading h2 {
            font-size: 24px;
        }


        .auth-heading p {
            font-size: 14px;
        }


    .auth-form .form-group {
        margin-bottom: 22px;
    }


    .auth-input,
    .auth-input-group input,
    .auth-input-group .form-control {
        height: 49px;
    }


    .auth-submit {
        min-height: 49px;
    }


    .auth-form-options {
        flex-wrap: wrap;
    }


    .auth-page::before {
        width: 300px;
        height: 300px;
    }


    .auth-page::after {
        width: 280px;
        height: 280px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .auth-card {
        padding: 26px 20px;
    }


    .auth-heading h1,
    .auth-heading h2 {
        font-size: 22px;
    }


    .auth-input,
    .auth-input-group input,
    .auth-input-group .form-control {
        font-size: 14px;
    }


    .auth-submit {
        font-size: 14px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .auth-input,
    .auth-link,
    .auth-submit,
    .auth-password-toggle,
    .auth-back {
        transition: none !important;
    }
}
