/* ============================================================
   کلاس‌یار — استایل صفحات احراز هویت
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --ink: #0a0e17;
    --ink-2: #131824;
    --ink-3: #1e2432;
    --teal: #14b8a6;
    --teal-bright: #2dd4bf;
    --blue: #3157d5;
    --cream: #f7f5f1;
    --cream-2: #efece5;
    --paper: #ffffff;
    --muted: #6b7280;
    --muted-2: #9ca3af;
    --line: #e8e5de;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --font: 'Vazirmatn', system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   Auth Layout — Split
   ============================================================ */
.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ============================================================
   Visual Side (چپ)
   ============================================================ */
.auth-visual {
    background: var(--ink);
    color: var(--cream);
    padding: 60px 55px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.25), transparent 65%);
    top: -200px;
    right: -200px;
    filter: blur(60px);
    pointer-events: none;
}

.auth-visual::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49, 87, 213, 0.2), transparent 65%);
    bottom: -180px;
    left: -180px;
    filter: blur(60px);
    pointer-events: none;
}

.auth-visual > * {
    position: relative;
    z-index: 1;
}

.visual-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.visual-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--ink);
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
}

.visual-content {
    max-width: 440px;
}

.visual-title {
    font-size: clamp(34px, 4.5vw, 56px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 22px;
}

.visual-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--teal);
}

.visual-desc {
    color: rgba(247, 245, 241, 0.6);
    font-size: 14.5px;
    line-height: 1.9;
    margin-bottom: 40px;
}

.visual-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(247, 245, 241, 0.04);
    border: 1px solid rgba(247, 245, 241, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s var(--ease);
}

.feature-item:hover {
    background: rgba(247, 245, 241, 0.07);
    border-color: rgba(20, 184, 166, 0.3);
    transform: translateX(-4px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(20, 184, 166, 0.12);
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-text small {
    display: block;
    font-size: 11.5px;
    color: rgba(247, 245, 241, 0.5);
}

.visual-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(247, 245, 241, 0.4);
    padding-top: 30px;
    border-top: 1px solid rgba(247, 245, 241, 0.08);
}

.visual-footer a:hover {
    color: var(--teal);
}

/* ============================================================
   Form Side (راست)
   ============================================================ */
.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
}

.auth-form-box {
    width: 100%;
    max-width: 420px;
}

.form-brand-mobile {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 14px;
}

.form-brand-mobile .visual-brand-mark {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

.form-heading {
    margin-bottom: 32px;
}

.form-heading .greeting {
    display: inline-block;
    padding: 5px 12px;
    background: var(--cream-2);
    color: var(--ink-3);
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 14px;
}

.form-heading h1 {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.035em;
    margin-bottom: 10px;
}

.form-heading p {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.8;
}

/* ============================================================
   Alert
   ============================================================ */
.alert {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.7;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1.4;
}

.alert-danger {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger);
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
}

/* ============================================================
   Form
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ink-3);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0;
}

.label-row a {
    font-size: 11.5px;
    color: var(--muted);
    transition: color 0.2s;
}

.label-row a:hover {
    color: var(--teal);
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 45px 0 45px;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 13px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: all 0.25s var(--ease);
}

.form-input::placeholder {
    color: var(--muted-2);
}

.form-input:hover {
    border-color: #d6d2c9;
}

.form-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
    background: var(--paper);
}

.toggle-pass {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.2s;
}

.toggle-pass:hover {
    opacity: 1;
    background: var(--cream-2);
}

/* ============================================================
   Remember
   ============================================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 22px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--ink-3);
}

.remember input {
    display: none;
}

.check-box {
    width: 19px;
    height: 19px;
    border-radius: 6px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    position: relative;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}

.check-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
    opacity: 0;
    transition: opacity 0.15s;
}

.remember input:checked + .check-box {
    background: var(--ink);
    border-color: var(--ink);
}

.remember input:checked + .check-box::after {
    opacity: 1;
}

/* ============================================================
   Submit
   ============================================================ */
.submit-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 13px;
    background: var(--ink);
    color: var(--cream);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 10px 25px rgba(10, 14, 23, 0.15);
}

.submit-btn:hover {
    background: var(--teal);
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(20, 184, 166, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn .arrow {
    transition: transform 0.3s var(--ease);
}

.submit-btn:hover .arrow {
    transform: translateX(-5px);
}

/* ============================================================
   Info box
   ============================================================ */
.info-box {
    padding: 14px 16px;
    background: rgba(49, 87, 213, 0.06);
    border: 1px solid rgba(49, 87, 213, 0.12);
    border-radius: 12px;
    font-size: 12.5px;
    color: var(--blue);
    line-height: 1.8;
    margin-bottom: 22px;
    display: flex;
    gap: 10px;
}

.info-box-icon {
    flex-shrink: 0;
}

/* ============================================================
   Divider
   ============================================================ */
.form-divider {
    text-align: center;
    margin: 26px 0 18px;
    position: relative;
    font-size: 11.5px;
    color: var(--muted-2);
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line);
    z-index: 0;
}

.form-divider span {
    background: var(--cream);
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

.form-help {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.9;
}

/* ============================================================
   Back link
   ============================================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 12.5px;
    color: var(--muted);
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--teal);
}

/* ============================================================
   Password strength
   ============================================================ */
.pass-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: var(--line);
    border-radius: 2px;
    transition: background 0.3s;
}

.strength-bar.active-weak { background: #ef4444; }
.strength-bar.active-mid  { background: #f59e0b; }
.strength-bar.active-strong { background: var(--teal); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
    .auth {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-wrap {
        padding: 40px 24px;
        min-height: 100vh;
    }

    .form-brand-mobile {
        display: flex;
    }
}

@media (max-width: 500px) {
    .auth-form-wrap {
        padding: 30px 18px;
    }

    .form-heading h1 {
        font-size: 24px;
    }
}