﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --green: #72c29a;
    --green-dark: #48a878;
    --green-light: #edf9f2;
    --text: #252a35;
    --text-soft: #68717d;
    --border: #e6ebe8;
    --background: #ffffff;
    --surface: #f6f9f7;
}


body {
    font-family: 'Vazirmatn', 'IRANSans', 'IRANYekan', 'Segoe UI', Tahoma, Arial, sans-serif;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


button,
input,
select,
textarea {
    font-family: inherit;
}


a {
    text-decoration: none;
    color: inherit;
}


pre, code, kbd, samp {
    font-family: 'Consolas', 'Courier New', monospace;
}


.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f2faf5 0%, #ffffff 55%, #edf8f1 100%);
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .auth-page::before {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        background: rgba(114, 194, 154, .08);
        top: -130px;
        right: -130px;
        pointer-events: none;
    }

    .auth-page::after {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        border: 1px solid rgba(72, 168, 120, .12);
        bottom: -110px;
        left: -110px;
        pointer-events: none;
    }

.auth-wrapper {
    width: 100%;
    max-width: 470px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border, #e6ebe8);
    border-radius: 22px;
    padding: 38px 34px;
    box-shadow: 0 15px 45px rgba(40, 70, 55, .08);
}

    .auth-card.signup-card {
        padding: 34px 34px;
    }


/* =================================
   LOGO
================================= */

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

    .auth-logo img {
        width: 135px;
        height: auto;
        max-height: 70px;
        object-fit: contain;
    }


/* =================================
   HEADING
================================= */

.auth-heading {
    text-align: center;
    margin-bottom: 26px;
}

    .auth-heading h1 {
        font-size: 22px;
        font-weight: 800;
        color: #26332d;
        margin: 0 0 9px;
        line-height: 1.6;
    }

    .auth-heading p {
        font-size: 12.5px;
        color: #7a8580;
        line-height: 1.95;
        margin: 0;
    }


/* =================================
   FORM
================================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .auth-group label {
        color: #39453f;
        font-size: 12.5px;
        font-weight: 700;
    }


/* =================================
   INPUT WRAPPER
================================= */

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 52px;
    background: #f9fbfa;
    border: 1px solid #e1e8e4;
    border-radius: 13px;
    transition: .25s ease;
    overflow: hidden;
}

    .input-wrapper:focus-within {
        background: #ffffff;
        border-color: var(--green, #72c29a);
        box-shadow: 0 0 0 4px rgba(114, 194, 154, .10);
    }

.input-icon {
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a938e;
    flex-shrink: 0;
    transition: .2s ease;
}

    .input-icon svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.input-wrapper:focus-within .input-icon {
    color: var(--green-dark, #48a878);
}

.input-wrapper input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #28322d;
    font-family: inherit;
    font-size: 14px;
    padding: 0 6px 0 0;
}

    .input-wrapper input::placeholder {
        color: #a1aaa5;
        font-size: 13px;
    }

    .input-wrapper input:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 1000px #f9fbfa inset;
        -webkit-text-fill-color: #28322d;
        transition: background-color 5000s ease-in-out 0s;
    }

.input-wrapper:focus-within input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}


/* =================================
   PASSWORD TOGGLE
================================= */

.password-toggle {
    width: 46px;
    height: 100%;
    border: none;
    background: transparent;
    color: #8a938e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
    flex-shrink: 0;
}

    .password-toggle:hover {
        color: var(--green-dark, #48a878);
    }

    .password-toggle svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }


/* =================================
   OPTIONS ROW
================================= */

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #68756f;
    font-size: 12px;
    user-select: none;
    line-height: 1.4;
}

    .remember-me input {
        width: 16px;
        height: 16px;
        accent-color: var(--green-dark, #48a878);
        cursor: pointer;
        flex-shrink: 0;
        margin: 0;
    }

.auth-options > a {
    color: var(--green-dark, #48a878);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
    white-space: nowrap;
}

    .auth-options > a:hover {
        color: var(--green, #72c29a);
    }


/* =================================
   SUBMIT BUTTON
================================= */

.auth-submit {
    width: 100%;
    height: 54px;
    margin-top: 6px;
    border: none;
    border-radius: 13px;
    background: var(--green-dark, #48a878);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: .25s ease;
    box-shadow: 0 9px 22px rgba(72, 168, 120, .22);
    letter-spacing: .2px;
}

    .auth-submit:hover:not(:disabled) {
        background: #3d9568;
        transform: translateY(-2px);
        box-shadow: 0 12px 26px rgba(72, 168, 120, .28);
    }

    .auth-submit:active:not(:disabled) {
        transform: translateY(0);
    }

    .auth-submit:disabled {
        opacity: .7;
        cursor: wait;
        transform: none;
        box-shadow: 0 5px 14px rgba(72, 168, 120, .15);
    }

    .auth-submit span {
        font-size: 18px;
        transition: .25s ease;
        line-height: 1;
    }

    .auth-submit:hover:not(:disabled) span {
        transform: translateX(-4px);
    }


/* =================================
   DIVIDER
================================= */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #98a29c;
    font-size: 12px;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #edf1ee;
    }

    .auth-divider span {
        white-space: nowrap;
    }


/* =================================
   REGISTER LINK
================================= */

.auth-register {
    text-align: center;
    color: #7a8580;
    font-size: 13px;
    line-height: 2;
}

    .auth-register a {
        color: var(--green-dark, #48a878);
        font-weight: 800;
        text-decoration: none;
        transition: .2s ease;
        padding: 0 2px;
    }

        .auth-register a:hover {
            color: var(--green, #72c29a);
            text-decoration: underline;
        }


/* =================================
   TERMS CHECK
================================= */

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #68756f;
    font-size: 12px;
    line-height: 1.95;
    cursor: pointer;
    margin: 2px 0;
}

    .terms-check span {
        display: block;
    }

    .terms-check a {
        color: var(--green-dark, #48a878);
        font-weight: 700;
        text-decoration: none;
        transition: .2s ease;
    }

        .terms-check a:hover {
            color: var(--green, #72c29a);
            text-decoration: underline;
        }


/* =================================
   SWEETALERT Z-INDEX
================================= */

.swal2-container {
    z-index: 9999 !important;
}


/* =================================
   TABLET / MOBILE — FULL SCREEN
   (بدون گرادیان، بدون قاب، تمام صفحه)
================================= */

@media (max-width: 700px) {

    /* ---- 1) خودِ main دیگر flex نیست، به block تبدیل می‌شه ---- */
    .auth-page {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        background: #ffffff !important;
        overflow: visible !important;
        position: static !important;
    }

        /* ---- 2) حذف کامل دایره‌های دکوراتیو ---- */
        .auth-page::before,
        .auth-page::after {
            display: none !important;
            content: none !important;
        }

    /* ---- 3) wrapper تمام عرض، بدون سقف ---- */
    .auth-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
    }

    /* ---- 4) کارت تمام صفحه، بدون border/radius/shadow ---- */
    .auth-card,
    .auth-card.signup-card {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        padding: 40px 24px !important;
    }

        /* ---- 5) ورود: عمودی وسط‌چین | ثبت‌نام: از بالا ---- */
        .auth-card:not(.signup-card) {
            justify-content: center !important;
        }

        .auth-card.signup-card {
            justify-content: flex-start !important;
        }

    .auth-logo {
        margin-bottom: 20px;
    }

        .auth-logo img {
            width: 115px;
        }

    .auth-heading {
        margin-bottom: 24px;
    }

        .auth-heading h1 {
            font-size: 20px;
        }

        .auth-heading p {
            font-size: 12px;
        }
}


/* =================================
   MOBILE
================================= */

@media (max-width: 480px) {

    .auth-card,
    .auth-card.signup-card {
        padding: 32px 20px !important;
    }

    .auth-logo {
        margin-bottom: 18px;
    }

        .auth-logo img {
            width: 100px;
            max-height: 55px;
        }

    .auth-heading {
        margin-bottom: 22px;
    }

        .auth-heading h1 {
            font-size: 17.5px;
            margin-bottom: 7px;
        }

        .auth-heading p {
            font-size: 11.5px;
            line-height: 1.9;
        }

    .auth-form {
        gap: 13px;
    }

    .auth-group {
        gap: 7px;
    }

        .auth-group label {
            font-size: 12px;
        }

    .input-wrapper {
        height: 49px;
        border-radius: 12px;
    }

    .input-icon {
        width: 42px;
    }

        .input-icon svg {
            width: 18px;
            height: 18px;
            stroke-width: 1.9;
        }

    .input-wrapper input {
        font-size: 13px;
        padding: 0 4px 0 0;
    }

        .input-wrapper input::placeholder {
            font-size: 12px;
        }

    .password-toggle {
        width: 42px;
    }

        .password-toggle svg {
            width: 18px;
            height: 18px;
        }

    .auth-options {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 2px;
    }

    .remember-me {
        font-size: 11.5px;
    }

    .auth-options > a {
        font-size: 11.5px;
    }

    .auth-submit {
        height: 50px;
        font-size: 13px;
        border-radius: 12px;
        margin-top: 4px;
    }

        .auth-submit span {
            font-size: 16px;
        }

    .auth-divider {
        margin: 18px 0;
        font-size: 11.5px;
    }

    .auth-register {
        font-size: 12px;
        line-height: 1.9;
    }

    .terms-check {
        font-size: 11.5px;
        line-height: 1.85;
    }

    .swal2-popup {
        font-size: 12px !important;
        padding: 20px 16px !important;
    }
}


/* =================================
   VERY SMALL (≤ 360px)
================================= */

@media (max-width: 360px) {

    .auth-card,
    .auth-card.signup-card {
        padding: 26px 16px !important;
    }

    .auth-logo img {
        width: 90px;
    }

    .auth-heading h1 {
        font-size: 16.5px;
    }

    .auth-heading p {
        font-size: 11px;
    }

    .input-wrapper {
        height: 46px;
    }

    .auth-submit {
        height: 47px;
        font-size: 12.5px;
    }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

        .auth-options > a {
            align-self: flex-end;
        }
}
