/* =========================================================
   AUTH PAGES
   صبا حساب - Login / Signup
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

    --auth-primary: #e63946;
    --auth-primary-dark: #c92f3b;

    --auth-secondary: #1d3557;

    --auth-dark: #17202a;

    --auth-text: #444;
    --auth-muted: #777;

    --auth-light: #f7f8fa;

    --auth-white: #fff;

    --auth-border: #e5e7eb;

    --auth-success: #198754;
    --auth-danger: #dc3545;

    --auth-shadow:
        0 15px 50px rgba(0, 0, 0, 0.08);

}


/* =========================================================
   RESET
   ========================================================= */

.auth-page,
.auth-page * {
    box-sizing: border-box;
}


.auth-page {
    margin: 0;

    min-height: 100vh;

    background:
        linear-gradient(
            135deg,
            #f7f8fa 0%,
            #ffffff 50%,
            #f8f9fb 100%
        );

    color: var(--auth-text);

    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;
}


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

.auth-header {
    width: 100%;

    background: var(--auth-white);

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


.auth-header-inner {
    width: min(1200px, calc(100% - 40px));

    min-height: 82px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


.auth-logo {
    display: inline-flex;

    align-items: center;

    text-decoration: none;
}


.auth-logo img {
    width: 150px;

    max-width: 100%;

    height: auto;

    display: block;
}


.back-home {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: var(--auth-secondary);

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}


.back-home:hover {
    color: var(--auth-primary);

    transform: translateX(3px);
}


/* =========================================================
   MAIN
   ========================================================= */

.auth-main {
    width: 100%;

    min-height:
        calc(100vh - 145px);

    padding:
        60px 20px;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* =========================================================
   AUTH BOX
   ========================================================= */

.auth-box {
    width: 100%;

    max-width: 480px;

    padding: 42px 40px;

    background: var(--auth-white);

    border:
        1px solid rgba(0, 0, 0, 0.05);

    border-radius: 18px;

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


/* =========================================================
   ICON
   ========================================================= */

.auth-icon {
    width: 68px;

    height: 68px;

    margin:
        0 auto 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(230, 57, 70, 0.09);

    color: var(--auth-primary);

    border-radius: 50%;

    font-size: 27px;
}


/* =========================================================
   TITLE
   ========================================================= */

.auth-box h1 {
    margin:
        0 0 8px;

    color: var(--auth-secondary);

    font-size: 27px;

    font-weight: 800;

    line-height: 1.7;

    text-align: center;
}


.auth-subtitle {
    margin:
        0 0 30px;

    color: var(--auth-muted);

    font-size: 14px;

    line-height: 2;

    text-align: center;
}


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

.auth-form {
    width: 100%;
}


.form-group {
    width: 100%;

    margin-bottom: 20px;
}


.form-group label {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 8px;

    color: var(--auth-secondary);

    font-size: 14px;

    font-weight: 600;
}


.form-group label i {
    color: var(--auth-primary);

    width: 17px;

    text-align: center;
}


.optional {
    margin-right: auto;

    color: #999;

    font-size: 11px;

    font-weight: 400;
}


/* =========================================================
   INPUTS
   ========================================================= */

.form-group input {
    width: 100%;

    height: 52px;

    padding:
        0 16px;

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

    border-radius: 9px;

    outline: none;

    background: #fff;

    color: var(--auth-dark);

    font-family: inherit;

    font-size: 14px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


.form-group input::placeholder {
    color: #aaa;
}


.form-group input:focus {
    border-color: var(--auth-primary);

    background: #fff;

    box-shadow:
        0 0 0 4px
        rgba(230, 57, 70, 0.08);
}


/* =========================================================
   PASSWORD
   ========================================================= */

.password-box {
    position: relative;

    width: 100%;
}


.password-box input {
    padding-left: 50px;
}


.password-toggle {
    position: absolute;

    left: 0;

    top: 0;

    width: 50px;

    height: 52px;

    border: 0;

    background: transparent;

    color: #999;

    cursor: pointer;

    font-size: 16px;
}


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


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

.terms {
    display: flex;

    align-items: flex-start;

    gap: 9px;

    margin:
        3px 0 20px;

    cursor: pointer;

    color: #666;

    font-size: 13px;

    line-height: 1.9;
}


.terms input {
    width: 17px;

    height: 17px;

    margin-top: 3px;

    flex-shrink: 0;

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

    cursor: pointer;
}


/* =========================================================
   LOGIN OPTIONS
   ========================================================= */

.login-options {
    width: 100%;

    margin:
        0 0 20px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    font-size: 12px;
}


.remember-me {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #666;

    cursor: pointer;
}


.remember-me input {
    width: 16px;

    height: 16px;

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

    cursor: pointer;
}


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

    text-decoration: none;

    transition: color 0.2s ease;
}


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

    text-decoration: underline;
}


/* =========================================================
   MESSAGE
   ========================================================= */

.auth-message {
    display: none;

    width: 100%;

    margin:
        0 0 18px;

    padding:
        11px 14px;

    border-radius: 8px;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;
}


.auth-message.show {
    display: block;
}


.auth-message.error {
    background:
        rgba(220, 53, 69, 0.08);

    border:
        1px solid rgba(220, 53, 69, 0.15);

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


.auth-message.success {
    background:
        rgba(25, 135, 84, 0.08);

    border:
        1px solid rgba(25, 135, 84, 0.15);

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


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

.auth-submit {
    width: 100%;

    height: 53px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    border: 0;

    border-radius: 9px;

    background: var(--auth-primary);

    color: #fff;

    font-family: inherit;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

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


.auth-submit:hover {
    background: var(--auth-primary-dark);

    transform: translateY(-2px);

    box-shadow:
        0 7px 20px
        rgba(230, 57, 70, 0.22);
}


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


.auth-submit:disabled {
    opacity: 0.7;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   SWITCH LOGIN / SIGNUP
   ========================================================= */

.auth-switch {
    margin-top: 25px;

    padding-top: 22px;

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

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 6px;

    color: #777;

    font-size: 13px;

    text-align: center;
}


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

    font-weight: 700;

    text-decoration: none;
}


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

    text-decoration: underline;
}


/* =========================================================
   FOOTER
   ========================================================= */

.auth-footer {
    width: 100%;

    padding:
        18px 20px;

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

    background: #fff;

    color: #888;

    font-size: 11px;

    text-align: center;
}


/* =========================================================
   RESPONSIVE - 650px
   ========================================================= */

@media (max-width: 650px) {

    .auth-header-inner {
        width: min(
            100% - 30px,
            1200px
        );

        min-height: 72px;
    }


    .auth-logo img {
        width: 130px;
    }


    .back-home {
        font-size: 12px;
    }


    .auth-main {
        min-height: auto;

        padding:
            35px 15px 45px;
    }


    .auth-box {
        padding:
            32px 24px;

        border-radius: 14px;
    }


    .auth-box h1 {
        font-size: 23px;
    }


    .auth-subtitle {
        font-size: 13px;

        margin-bottom: 25px;
    }


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

        flex-direction: column;

        gap: 12px;
    }

}


/* =========================================================
   RESPONSIVE - 400px
   ========================================================= */

@media (max-width: 400px) {

    .auth-header-inner {
        width: calc(100% - 24px);
    }


    .auth-logo img {
        width: 115px;
    }


    .back-home {
        font-size: 11px;
    }


    .auth-main {
        padding:
            25px 10px 35px;
    }


    .auth-box {
        padding:
            27px 18px;
    }


    .auth-icon {
        width: 60px;

        height: 60px;

        font-size: 23px;
    }


    .auth-box h1 {
        font-size: 21px;
    }


    .form-group input {
        height: 49px;

        font-size: 13px;
    }


    .password-toggle {
        height: 49px;
    }


    .auth-submit {
        height: 50px;

        font-size: 14px;
    }

}