/*
	===============================
		Login page (customer + staff)
	===============================
*/
@font-face {
    font-family: 'iran';
    src: url('../../fonts/iran.woff') format('woff'), url('../../fonts/iran.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --auth-navy-900: #031d36;
    --auth-navy-800: #052a4b;
    --auth-navy-600: #0b4a7d;
    --auth-brand: #0d6fb8;
    --auth-brand-dark: #0a5a97;
    --auth-cyan: #27aae1;
    --auth-ink: #12263a;
    --auth-muted: #5f7183;
    --auth-line: #d9e2ec;
    --auth-surface: #ffffff;
    --auth-field: #f6f9fc;
    --auth-bg: #eaf1f7;
    --auth-danger: #a12626;
    --auth-danger-bg: #fdeeee;
    --auth-danger-line: #f3c4c4;
    --auth-warn: #8a5a00;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body.auth {
    min-height: 100%;
    margin: 0;
    padding: 24px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'iran', Tahoma, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: var(--auth-ink);
    background-color: var(--auth-bg);
    background-image: radial-gradient(circle at 12% 18%, rgba(39, 170, 225, 0.16), transparent 42%), radial-gradient(circle at 88% 86%, rgba(11, 74, 125, 0.14), transparent 46%);
    background-attachment: fixed;
}

.auth-card {
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    background: var(--auth-surface);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px -24px rgba(5, 42, 75, 0.35), 0 2px 6px rgba(5, 42, 75, 0.06);
}

/* ---------- form side ---------- */
.auth-form {
    padding: 40px 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 28px;
    background: var(--auth-bg);
    border-radius: 12px;
}

    .auth-switch a {
        padding: 7px 10px;
        text-align: center;
        text-decoration: none;
        color: var(--auth-muted);
        border-radius: 9px;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

        .auth-switch a:hover {
            color: var(--auth-ink);
        }

        .auth-switch a[aria-current="page"] {
            background: var(--auth-surface);
            color: var(--auth-brand-dark);
            font-weight: bold;
            box-shadow: 0 1px 3px rgba(5, 42, 75, 0.14);
        }

.auth-title {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.6;
    font-weight: bold;
    color: var(--auth-navy-800);
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--auth-muted);
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 14px;
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    border: 1px solid var(--auth-danger-line);
    border-radius: 12px;
}

    .auth-alert svg {
        flex: 0 0 auto;
        margin-top: 4px;
    }

.auth-field {
    margin-bottom: 16px;
}

    .auth-field label {
        display: block;
        margin-bottom: 6px;
        font-size: 13px;
        color: var(--auth-ink);
    }

.auth-control {
    position: relative;
}

    .auth-control > svg {
        position: absolute;
        top: 50%;
        right: 14px;
        transform: translateY(-50%);
        color: var(--auth-muted);
        pointer-events: none;
    }

    .auth-control input {
        display: block;
        width: 100%;
        height: 48px;
        padding: 0 46px;
        /* فونت iran ارقام لاتین را فارسی نشان می‌دهد؛ مقدار تایپ‌شده باید همان‌طور که هست دیده شود */
        font-family: 'Segoe UI', Tahoma, sans-serif;
        font-size: 15px;
        color: var(--auth-ink);
        direction: ltr;
        text-align: left;
        background: var(--auth-field);
        border: 1px solid var(--auth-line);
        border-radius: 12px;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    }

        .auth-control input:hover {
            border-color: #b9c7d6;
        }

        .auth-control input:focus {
            background: var(--auth-surface);
            border-color: var(--auth-brand);
            box-shadow: 0 0 0 3px rgba(13, 111, 184, 0.18);
        }

    .auth-control:focus-within > svg {
        color: var(--auth-brand);
    }

.auth-toggle {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--auth-muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

    .auth-toggle:hover {
        color: var(--auth-ink);
        background: rgba(5, 42, 75, 0.06);
    }

    .auth-toggle:focus-visible {
        outline: 2px solid var(--auth-brand);
        outline-offset: 1px;
    }

    .auth-toggle .icon-eye-off,
    .auth-toggle[aria-pressed="true"] .icon-eye {
        display: none;
    }

    .auth-toggle[aria-pressed="true"] .icon-eye-off {
        display: block;
    }

.auth-hint {
    margin: 6px 2px 0;
    font-size: 12.5px;
    color: var(--auth-warn);
}

.auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    background: var(--auth-brand);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

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

    .auth-submit:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 111, 184, 0.35);
    }

    .auth-submit[disabled] {
        opacity: 0.7;
        cursor: progress;
    }

.auth-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin-top: 24px;
    padding-top: 16px;
    font-size: 13px;
    color: var(--auth-muted);
    border-top: 1px solid var(--auth-line);
}

    .auth-links a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--auth-brand-dark);
        text-decoration: none;
    }

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

    .auth-links bdi {
        font-family: Tahoma, 'Segoe UI', sans-serif;
    }

/* ---------- brand side ---------- */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 32px;
    overflow: hidden;
    text-align: center;
    color: #fff;
    background: linear-gradient(160deg, var(--auth-navy-600) 0%, var(--auth-navy-800) 58%, var(--auth-navy-900) 100%);
}

    .auth-brand::before,
    .auth-brand::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }

    .auth-brand::before {
        width: 340px;
        height: 340px;
        top: -140px;
        left: -120px;
        background: radial-gradient(circle, rgba(39, 170, 225, 0.38), transparent 68%);
    }

    .auth-brand::after {
        width: 300px;
        height: 300px;
        right: -130px;
        bottom: -130px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 0 0 36px rgba(255, 255, 255, 0.04), 0 0 0 76px rgba(255, 255, 255, 0.025);
    }

    .auth-brand > * {
        position: relative;
        z-index: 1;
    }

.auth-logo {
    width: 148px;
    height: 148px;
    padding: 14px 14px 4px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.5);
}

    .auth-logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.auth-brand-title {
    margin: 10px 0 0;
    font-size: 20px;
    line-height: 1.7;
    font-weight: bold;
}

    .auth-brand-title span {
        color: #6fd0f7;
    }

.auth-brand-text {
    max-width: 260px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
}

.auth-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px 16px;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

    .auth-phone:hover {
        background: rgba(255, 255, 255, 0.16);
    }

    .auth-phone bdi {
        font-family: Tahoma, 'Segoe UI', sans-serif;
        letter-spacing: 0.5px;
    }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
    body.auth {
        align-items: flex-start;
        padding: 16px;
    }

    .auth-card {
        max-width: 460px;
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-brand {
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px;
        padding: 16px 20px;
        text-align: start;
    }

        .auth-brand::after,
        .auth-brand-text {
            display: none;
        }

    .auth-logo {
        width: 56px;
        height: 56px;
        padding: 6px 6px 2px;
        border-radius: 14px;
    }

    .auth-brand-title {
        flex: 1 1 0;
        margin: 0;
        font-size: 16px;
    }

    .auth-phone {
        margin-top: 0;
        padding: 3px 12px;
        font-size: 13px;
    }

    .auth-form {
        padding: 24px 20px 20px;
    }

    .auth-switch {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
