/* =========================================================
   AMRIT GITA
   AUTHENTICATION STYLESHEET

   File: css/auth.css

   Used by:
   - login.html
   - signup.html
========================================================= */


/* =========================================================
   1. AUTH ROOT VARIABLES
========================================================= */

:root {
    --auth-primary: #f47d13;
    --auth-primary-dark: #dd6509;
    --auth-primary-light: #ff9c47;

    --auth-heading: #2e1a10;
    --auth-text: #75675f;
    --auth-muted: #9a8c84;

    --auth-page-bg: #fffaf4;
    --auth-left-bg: #fff5e8;
    --auth-right-bg: #ffffff;

    --auth-border: #eadfd6;
    --auth-border-focus: #f38a30;

    --auth-error: #c93c2f;
    --auth-success: #2d8a57;

    --auth-radius: 26px;
    --auth-input-radius: 12px;

    --auth-shadow:
        0 24px 65px rgba(94, 51, 20, 0.10);

    --auth-transition: 0.25s ease;
}


/* =========================================================
   2. AUTH PAGE
========================================================= */

body.auth-page {
    min-height: 100vh;

    margin: 0;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(247, 166, 83, 0.08),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(238, 116, 18, 0.06),
            transparent 30%
        ),
        var(--auth-page-bg);

    color: var(--auth-text);

    overflow-x: hidden;
}


/* =========================================================
   3. MAIN AUTH LAYOUT
========================================================= */

.auth-main {
    min-height: 100vh;

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

    padding: 52px 24px;
}


/* =========================================================
   4. AUTH CONTAINER
========================================================= */

.auth-container {
    width: min(1080px, 100%);

    display: grid;
    grid-template-columns: 1fr 1fr;

    overflow: hidden;

    border: 1px solid rgba(216, 195, 179, 0.65);

    border-radius: var(--auth-radius);

    background: var(--auth-right-bg);

    box-shadow: var(--auth-shadow);
}


/* Login card */

.login-container {
    min-height: 680px;
}


/* Signup card */

.signup-container {
    grid-template-columns: 0.92fr 1.08fr;

    min-height: 760px;
}


/* =========================================================
   5. LEFT VISUAL PANEL
========================================================= */

.auth-visual-panel {
    position: relative;

    display: flex;
    align-items: center;

    padding: 64px 54px;

    background:
        linear-gradient(
            145deg,
            #fff8ef 0%,
            #fff1df 100%
        );

    overflow: hidden;
}


/* Decorative soft circle */

.auth-visual-panel::before {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    left: -170px;
    top: -140px;

    border-radius: 50%;

    background:
        rgba(244, 125, 19, 0.045);
}


/* Decorative bottom circle */

.auth-visual-panel::after {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    right: -170px;
    bottom: -150px;

    border-radius: 50%;

    background:
        rgba(229, 107, 11, 0.04);
}


.auth-visual-content {
    position: relative;

    z-index: 2;

    width: 100%;

    max-width: 430px;
}


/* =========================================================
   6. AUTH LOGO
========================================================= */

.auth-logo-link {
    display: inline-block;

    margin-bottom: 30px;
}


.auth-logo {
    width: 78px;
    height: 78px;

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

    padding: 5px;

    overflow: hidden;

    border-radius: 50%;

    background: #ffffff;

    border: 1px solid rgba(218, 119, 29, 0.13);

    box-shadow:
        0 12px 30px rgba(100, 52, 18, 0.09);

    transition:
        transform var(--auth-transition),
        box-shadow var(--auth-transition);
}


.auth-logo-link:hover .auth-logo {
    transform: translateY(-2px);

    box-shadow:
        0 16px 35px rgba(100, 52, 18, 0.13);
}


.auth-logo img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;
}


/* =========================================================
   7. LEFT PANEL TYPOGRAPHY
========================================================= */

.auth-eyebrow {
    display: block;

    margin-bottom: 18px;

    color: var(--auth-primary-dark);

    font-size: 0.76rem;
    font-weight: 800;

    letter-spacing: 0.11em;

    text-transform: uppercase;
}


.auth-visual-title {
    max-width: 430px;

    margin: 0;

    color: var(--auth-heading);

    font-size: clamp(
        2.3rem,
        3.4vw,
        3.65rem
    );

    font-weight: 850;

    line-height: 1.08;

    letter-spacing: -0.045em;
}


.auth-visual-description {
    max-width: 430px;

    margin-top: 25px;

    color: #7d7068;

    font-size: 0.96rem;

    line-height: 1.8;
}


/* =========================================================
   8. BENEFITS
========================================================= */

.auth-benefits {
    display: grid;

    gap: 17px;

    margin-top: 34px;
}


.auth-benefits li {
    display: flex;
    align-items: center;

    gap: 12px;

    color: #5f524a;

    font-size: 0.88rem;
    font-weight: 600;
}


.auth-benefit-icon {
    width: 27px;
    height: 27px;

    flex-shrink: 0;

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

    border-radius: 50%;

    color: var(--auth-primary-dark);

    background:
        rgba(245, 126, 20, 0.11);

    font-size: 0.76rem;
    font-weight: 850;
}


/* =========================================================
   9. RIGHT FORM PANEL
========================================================= */

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 58px 54px;

    background: var(--auth-right-bg);
}


.signup-container .auth-form-panel {
    padding:
        40px 48px;
}


.auth-form-wrapper {
    width: 100%;

    max-width: 440px;
}


.signup-form-wrapper {
    max-width: 510px;
}


/* =========================================================
   10. BACK LINK
========================================================= */

.auth-back-link {
    display: none;

    width: fit-content;

    align-items: center;

    gap: 7px;

    margin-bottom: 25px;

    color: var(--auth-muted);

    font-size: 0.8rem;
    font-weight: 650;

    transition:
        color var(--auth-transition);
}


.auth-back-link:hover {
    color: var(--auth-primary-dark);
}


/* =========================================================
   11. FORM HEADER
========================================================= */

.auth-mobile-brand {
    display: none;

    margin-bottom: 6px;

    color: var(--auth-primary-dark);

    font-size: 0.76rem;
    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


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


.signup-container .auth-form-header {
    margin-bottom: 26px;
}


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

    color: var(--auth-heading);

    font-size: clamp(
        2rem,
        3vw,
        2.45rem
    );

    font-weight: 850;

    line-height: 1.2;

    letter-spacing: -0.035em;
}


.signup-container .auth-form-header h2 {
    font-size: 2.15rem;
}


.auth-form-header p {
    margin-top: 9px;

    color: var(--auth-text);

    font-size: 0.87rem;

    line-height: 1.65;
}


/* =========================================================
   12. FORM
========================================================= */

.auth-form {
    width: 100%;
}


.form-group {
    width: 100%;

    margin-bottom: 23px;
}


.signup-form .form-group {
    margin-bottom: 19px;
}


.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #44342b;

    font-size: 0.82rem;
    font-weight: 750;
}


/* =========================================================
   13. FORM ROW
========================================================= */

.form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================================
   14. INPUT WRAPPER
========================================================= */

.input-wrapper {
    position: relative;

    width: 100%;
}


/* =========================================================
   15. INPUTS / SELECTS
========================================================= */

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    height: 54px;

    padding: 0 16px;

    border:
        1px solid var(--auth-border);

    border-radius:
        var(--auth-input-radius);

    outline: none;

    color: #3f3129;

    background: #fffefd;

    font-size: 0.89rem;

    transition:
        border-color var(--auth-transition),
        box-shadow var(--auth-transition),
        background var(--auth-transition);
}


.signup-form .input-wrapper input,
.signup-form .input-wrapper select {
    height: 51px;

    font-size: 0.86rem;
}


.input-wrapper input::placeholder {
    color: #a2958e;
}


.input-wrapper input:hover,
.input-wrapper select:hover {
    border-color:
        rgba(226, 128, 44, 0.42);
}


.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color:
        var(--auth-border-focus);

    background:
        #ffffff;

    box-shadow:
        0 0 0 3px rgba(244, 125, 19, 0.10);
}


/* Browser autofill */

.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover,
.input-wrapper input:-webkit-autofill:focus {
    -webkit-text-fill-color: #3f3129;

    box-shadow:
        0 0 0 1000px #fffefd inset;

    transition:
        background-color 9999s ease-in-out 0s;
}


/* =========================================================
   16. SELECT
========================================================= */

.select-wrapper select {
    appearance: auto;

    cursor: pointer;
}


/* =========================================================
   17. PASSWORD INPUT
========================================================= */

.password-input-wrapper input {
    padding-right: 72px;
}


.password-toggle {
    position: absolute;

    right: 14px;
    top: 50%;

    transform:
        translateY(-50%);

    padding:
        5px;

    color: #75675f;

    font-size: 0.75rem;
    font-weight: 750;

    border-radius: 7px;

    transition:
        color var(--auth-transition),
        background var(--auth-transition);
}


.password-toggle:hover {
    color: var(--auth-primary-dark);

    background:
        rgba(244, 125, 19, 0.07);
}


/* =========================================================
   18. ERROR TEXT
========================================================= */

.form-error {
    display: block;

    min-height: 16px;

    margin-top: 5px;

    color: var(--auth-error);

    font-size: 0.7rem;

    line-height: 1.4;
}


/* Invalid input state */

.form-group.has-error input,
.form-group.has-error select {
    border-color:
        rgba(201, 60, 47, 0.75);

    box-shadow:
        0 0 0 3px rgba(201, 60, 47, 0.07);
}


/* Valid input state */

.form-group.is-valid input,
.form-group.is-valid select {
    border-color:
        rgba(45, 138, 87, 0.5);
}


/* =========================================================
   19. LOGIN OPTIONS
========================================================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin:
        2px 0 25px;
}


/* =========================================================
   20. CUSTOM CHECKBOX
========================================================= */

.remember-option,
.terms-option {
    position: relative;

    display: flex;
    align-items: flex-start;

    gap: 9px;

    cursor: pointer;
}


.remember-option input,
.terms-option input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


.custom-checkbox {
    position: relative;

    width: 16px;
    height: 16px;

    flex-shrink: 0;

    margin-top: 1px;

    border:
        1.5px solid #b8aaa2;

    border-radius: 4px;

    background: #ffffff;

    transition:
        border-color var(--auth-transition),
        background var(--auth-transition),
        box-shadow var(--auth-transition);
}


.remember-option input:checked + .custom-checkbox,
.terms-option input:checked + .custom-checkbox {
    border-color:
        var(--auth-primary);

    background:
        var(--auth-primary);
}


.remember-option input:checked + .custom-checkbox::after,
.terms-option input:checked + .custom-checkbox::after {
    content: "✓";

    position: absolute;

    left: 50%;
    top: 50%;

    color: #ffffff;

    font-size: 0.66rem;
    font-weight: 900;

    transform:
        translate(-50%, -52%);
}


.remember-option input:focus-visible + .custom-checkbox,
.terms-option input:focus-visible + .custom-checkbox {
    box-shadow:
        0 0 0 3px rgba(244, 125, 19, 0.16);
}


.remember-label {
    color: #75675f;

    font-size: 0.78rem;
    font-weight: 600;
}


/* =========================================================
   21. FORGOT PASSWORD
========================================================= */

.forgot-password-link {
    color: var(--auth-primary-dark);

    font-size: 0.78rem;
    font-weight: 750;

    white-space: nowrap;

    transition:
        color var(--auth-transition);
}


.forgot-password-link:hover {
    color: #b64b04;
}


/* =========================================================
   22. SUBMIT BUTTON
========================================================= */

.auth-submit-button {
    position: relative;

    width: 100%;
    height: 55px;

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

    gap: 10px;

    padding: 0 20px;

    border-radius: 13px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #ff8b1b 0%,
            #ed6f0a 100%
        );

    box-shadow:
        0 13px 30px rgba(230, 104, 10, 0.20);

    font-size: 0.9rem;
    font-weight: 800;

    transition:
        transform var(--auth-transition),
        box-shadow var(--auth-transition),
        opacity var(--auth-transition);
}


.signup-container .auth-submit-button {
    height: 53px;
}


.auth-submit-button:hover:not(:disabled) {
    transform:
        translateY(-2px);

    box-shadow:
        0 17px 35px rgba(230, 104, 10, 0.27);
}


.auth-submit-button:active:not(:disabled) {
    transform:
        translateY(0);
}


.auth-submit-button:disabled {
    cursor: not-allowed;

    opacity: 0.7;
}


/* =========================================================
   23. BUTTON LOADER
========================================================= */

.auth-button-loader {
    width: 19px;
    height: 19px;

    border:
        2px solid rgba(255, 255, 255, 0.4);

    border-top-color:
        #ffffff;

    border-radius:
        50%;

    animation:
        authSpin 0.75s linear infinite;
}


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


/* =========================================================
   24. ACCOUNT SWITCH LINK
========================================================= */

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

    flex-wrap: wrap;

    gap: 5px;

    margin-top: 23px;

    color: #8a7d75;

    font-size: 0.82rem;
}


.auth-switch a {
    color: var(--auth-primary-dark);

    font-weight: 800;

    transition:
        color var(--auth-transition);
}


.auth-switch a:hover {
    color: #b64b04;
}


/* =========================================================
   25. LOGIN LEGAL
========================================================= */

.auth-legal {
    margin-top: 34px;

    text-align: center;
}


.auth-legal p {
    color: #a1958e;

    font-size: 0.68rem;

    line-height: 1.6;
}


.auth-legal a {
    color: #7d6f67;

    transition:
        color var(--auth-transition);
}


.auth-legal a:hover {
    color: var(--auth-primary-dark);
}


/* =========================================================
   26. SIGNUP TERMS
========================================================= */

.signup-terms {
    margin:
        3px 0 23px;
}


.terms-label {
    color: #7e7169;

    font-size: 0.76rem;

    line-height: 1.55;
}


.terms-label a {
    color: var(--auth-primary-dark);

    font-weight: 750;
}


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


/* =========================================================
   27. PASSWORD STRENGTH
========================================================= */

.password-strength-section {
    margin:
        -2px 0 22px;
}


/* Strength bar */

.password-strength-bar {
    width: 100%;
    height: 5px;

    overflow: hidden;

    border-radius: 999px;

    background: #eee5de;
}


.password-strength-fill {
    display: block;

    width: 0;
    height: 100%;

    border-radius: inherit;

    background: #d8ccc4;

    transition:
        width 0.3s ease,
        background 0.3s ease;
}


/* Weak */

.password-strength-section.weak
.password-strength-fill {
    width: 33%;

    background: #d96050;
}


/* Medium */

.password-strength-section.medium
.password-strength-fill {
    width: 66%;

    background: #e4a53b;
}


/* Strong */

.password-strength-section.strong
.password-strength-fill {
    width: 100%;

    background: #3d9b67;
}


/* Strength text */

.password-strength-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 7px;

    color: #978a82;

    font-size: 0.66rem;
}


.password-strength-info strong {
    color: #73665e;

    font-size: 0.66rem;
    font-weight: 750;
}


.password-strength-section.weak
.password-strength-info strong {
    color: #c45043;
}


.password-strength-section.medium
.password-strength-info strong {
    color: #bb7d1d;
}


.password-strength-section.strong
.password-strength-info strong {
    color: #318455;
}


/* =========================================================
   28. PASSWORD REQUIREMENTS
========================================================= */

.password-requirements {
    display: flex;
    flex-wrap: wrap;

    gap:
        7px 20px;

    margin-top: 9px;
}


.password-requirement {
    position: relative;

    padding-left: 12px;

    color: #9b8e86;

    font-size: 0.63rem;
}


.password-requirement::before {
    content: "•";

    position: absolute;

    left: 0;

    color: #c7bbb3;
}


.password-requirement.valid {
    color: #42855e;
}


.password-requirement.valid::before {
    content: "✓";

    color: #42855e;

    font-weight: 800;
}


/* =========================================================
   29. GLOBAL MESSAGE
========================================================= */

.auth-message {
    margin-bottom: 20px;

    padding:
        12px 14px;

    border-radius: 10px;

    font-size: 0.78rem;

    line-height: 1.5;
}


.auth-message.error {
    color: #a83228;

    border:
        1px solid rgba(201, 60, 47, 0.18);

    background:
        rgba(201, 60, 47, 0.06);
}


.auth-message.success {
    color: #237348;

    border:
        1px solid rgba(45, 138, 87, 0.18);

    background:
        rgba(45, 138, 87, 0.07);
}


.auth-message.info {
    color: #8a5e25;

    border:
        1px solid rgba(222, 143, 44, 0.18);

    background:
        rgba(222, 143, 44, 0.07);
}


/* =========================================================
   30. NOSCRIPT
========================================================= */

.noscript-message {
    position: fixed;

    left: 20px;
    right: 20px;
    bottom: 20px;

    z-index: 9999;

    max-width: 600px;

    margin: auto;

    padding: 13px 18px;

    border-radius: 10px;

    color: #8e3028;

    background: #fff1ef;

    border:
        1px solid rgba(201, 60, 47, 0.2);

    text-align: center;

    font-size: 0.8rem;
}


/* =========================================================
   31. DESKTOP HEIGHT OPTIMIZATION
========================================================= */

@media (
    min-width: 901px
)
and (
    max-height: 850px
) {

    .auth-main {
        align-items: flex-start;

        padding:
            34px 24px;
    }

    .login-container {
        min-height: 650px;
    }

    .signup-container {
        min-height: 720px;
    }

    .auth-visual-panel {
        padding:
            50px 50px;
    }

    .auth-form-panel {
        padding:
            46px 50px;
    }

    .signup-container
    .auth-form-panel {
        padding:
            32px 46px;
    }

    .auth-logo {
        width: 70px;
        height: 70px;
    }

    .auth-logo-link {
        margin-bottom: 24px;
    }

    .auth-visual-description {
        margin-top: 20px;
    }

    .auth-benefits {
        margin-top: 27px;

        gap: 14px;
    }
}


/* =========================================================
   32. TABLET
========================================================= */

@media (max-width: 900px) {

    .auth-main {
        align-items: flex-start;

        padding:
            30px 18px;
    }

    .auth-container,
    .signup-container {
        grid-template-columns: 1fr;

        max-width: 620px;

        min-height: auto;
    }

    .auth-visual-panel {
        padding:
            42px 38px;
    }

    .auth-visual-content {
        max-width: 100%;
    }

    .auth-visual-title {
        max-width: 520px;

        font-size:
            clamp(
                2rem,
                7vw,
                2.8rem
            );
    }

    .auth-visual-description {
        max-width: 520px;
    }

    .auth-benefits {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .auth-benefits li:last-child {
        grid-column:
            1 / -1;
    }

    .auth-form-panel,
    .signup-container
    .auth-form-panel {
        padding:
            46px 38px;
    }

    .auth-form-wrapper,
    .signup-form-wrapper {
        max-width: 100%;
    }

    .auth-back-link {
        display: inline-flex;
    }

}


/* =========================================================
   33. MOBILE
========================================================= */

@media (max-width: 620px) {

    body.auth-page {
        background: #ffffff;
    }

    .auth-main {
        display: block;

        min-height: 100vh;

        padding: 0;
    }

    .auth-container,
    .signup-container {
        width: 100%;

        max-width: none;

        border: 0;

        border-radius: 0;

        box-shadow: none;
    }


    /* Hide visual panel on mobile */

    .auth-visual-panel {
        display: none;
    }


    /* Form panel */

    .auth-form-panel,
    .signup-container
    .auth-form-panel {
        min-height: 100vh;

        align-items: flex-start;

        padding:
            32px 22px 45px;
    }

    .auth-form-wrapper,
    .signup-form-wrapper {
        width: 100%;

        max-width: 100%;
    }


    /* Back link */

    .auth-back-link {
        display: inline-flex;

        margin-bottom: 32px;
    }


    /* Mobile brand */

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


    /* Header */

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

    .auth-form-header h2,
    .signup-container
    .auth-form-header h2 {
        font-size: 2rem;
    }

    .auth-form-header p {
        font-size: 0.84rem;
    }


    /* Form */

    .form-group,
    .signup-form
    .form-group {
        margin-bottom: 20px;
    }


    /* Signup rows become stacked */

    .form-row {
        grid-template-columns: 1fr;

        gap: 0;
    }


    /* Inputs */

    .input-wrapper input,
    .input-wrapper select,
    .signup-form
    .input-wrapper input,
    .signup-form
    .input-wrapper select {
        height: 53px;
    }


    /* Login options */

    .login-options {
        align-items: flex-start;

        margin-bottom: 24px;
    }


    /* Submit */

    .auth-submit-button,
    .signup-container
    .auth-submit-button {
        height: 54px;
    }


    /* Signup requirements */

    .password-requirements {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }


    /* Legal */

    .auth-legal {
        margin-top: 30px;
    }

}


/* =========================================================
   34. SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .auth-form-panel,
    .signup-container
    .auth-form-panel {
        padding:
            26px 17px 40px;
    }

    .auth-back-link {
        margin-bottom: 27px;
    }

    .auth-form-header h2,
    .signup-container
    .auth-form-header h2 {
        font-size: 1.78rem;
    }

    .auth-form-header p {
        font-size: 0.8rem;
    }

    .login-options {
        gap: 12px;
    }

    .remember-label,
    .forgot-password-link {
        font-size: 0.72rem;
    }

    .password-requirements {
        grid-template-columns: 1fr;
    }

    .auth-switch {
        font-size: 0.78rem;
    }

    .terms-label {
        font-size: 0.72rem;
    }

}


/* =========================================================
   35. VERY SMALL MOBILE
========================================================= */

@media (max-width: 350px) {

    .login-options {
        flex-direction: column;

        align-items: flex-start;
    }

    .forgot-password-link {
        margin-left: 25px;
    }

}


/* =========================================================
   36. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .auth-submit-button,
    .auth-logo,
    .password-toggle,
    .input-wrapper input,
    .input-wrapper select {
        transition: none;
    }

    .auth-button-loader {
        animation-duration: 1.5s;
    }

}


/* =========================================================
   END OF AUTH.CSS
========================================================= */