@font-face {
    font-family: "Vazirmatn";
    src: url("../../fonts/Vazirmatn-RD-Medium.woff2") format("woff2-variations");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../../fonts/Vazirmatn-RD-Bold.woff2") format("woff2-variations");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-1: #493d8f;
    --color-2: #8d7aff;
    --color-2-bold: #7b6cff;
    --color-1-lighter: #edeaff;
    --color-1-light: #4a3e8f;
    --color-white: #ffffff;
    --color-title: #2d2d2d;
    --color-gray-18: #666666;
    --color-gray-8: #e0e0e0;
    --color-gray-4: #f5f5f5;
    --font-3: 'Vazirmatn', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-3);
    background: var(--color-1-lighter);
    color: var(--color-title);
    line-height: 1.6;
    direction: rtl;
}

/* ===== Header ===== */
.header {
    background: var(--color-1-light);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(73, 61, 143, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-white);
    font-size: 1.25rem;
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo span {
    font-weight: 400;
}

.logo b {
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.nav a:hover {
    opacity: 0.85;
}

/* ===== Auth Page Layout ===== */
.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== Auth Card ===== */
.auth-card {
    background: var(--color-white);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 45px rgba(73, 61, 143, 0.08);
}

.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-title);
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 0.95rem;
    color: var(--color-gray-18);
    line-height: 1.7;
}

/* ===== Alert Messages ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-error {
    background: #fdf0ef;
    color: #c0392b;
    border: 1px solid #f5c6c2;
}

.alert ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.alert li {
    font-size: 0.875rem;
    line-height: 1.6;
}

.alert li:not(:last-child) {
    margin-bottom: 0.35rem;
}

/* ===== Form Styles ===== */
.auth-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-title);
}

.form-group input[type='text'],
.form-group input[type='email'],
.form-group input[type='tel'],
.form-group input[type='password'] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e0ddf5;
    border-radius: 12px;
    font-family: var(--font-3);
    font-size: 0.95rem;
    color: var(--color-title);
    background: #fafafa;
    transition: all 0.2s ease;
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--color-2);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(141, 122, 255, 0.18);
}

.form-group input.input-error {
    border-color: #e74c3c;
    background: #fff5f5;
}

.input-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--color-gray-18);
}

.error-message {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #e74c3c;
    font-weight: 500;
}

/* ===== Password Input with Toggle ===== */
.password-input {
    position: relative;
}

.password-input input {
    padding-left: 3rem;
}

.toggle-password {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-18);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.toggle-password svg {
    display: block;
}

/* ===== Checkbox Label ===== */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-gray-18);
}

.checkbox-label input[type='checkbox'] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--color-2);
    cursor: pointer;
}

.checkbox-label span {
    line-height: 1.6;
}

.checkbox-label a {
    color: var(--color-2);
    text-decoration: none;
    font-weight: 600;
}

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

/* ===== Submit Button ===== */
.btn-login {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 999px;
    background: var(--color-2);
    color: var(--color-white);
    font-family: var(--font-3);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: var(--color-2-bold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(141, 122, 255, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

/* ===== Auth Footer ===== */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.auth-footer p {
    font-size: 0.875rem;
    color: var(--color-gray-18);
}

.auth-footer a {
    color: var(--color-2);
    font-weight: 600;
    text-decoration: none;
}

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

/* ===== Auth Illustration ===== */
.auth-illustration {
    position: relative;
    text-align: center;
}

.auth-illustration img {
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(73, 61, 143, 0.12);
    margin-bottom: 1.5rem;
}

.auth-illustration h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-title);
    margin-bottom: 0.75rem;
}

.auth-illustration p {
    font-size: 1rem;
    color: var(--color-gray-18);
    line-height: 1.8;
    max-width: 420px;
    margin: 0 auto;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auth-illustration {
        order: -1;
    }

    .auth-illustration img {
        max-width: 360px;
    }
}

@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1.5rem;
    }

    .auth-page {
        padding: 2rem 0;
    }

    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 18px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-illustration img {
        max-width: 100%;
    }

    .auth-illustration h2 {
        font-size: 1.25rem;
    }

    .auth-illustration p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    .nav {
        font-size: 0.875rem;
        gap: 1rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
    }

    .form-group input {
        font-size: 0.9rem;
        padding: 0.65rem 0.85rem;
    }

    .password-input input {
        padding-left: 2.75rem;
    }

    .toggle-password {
        left: 0.65rem;
    }
}
