﻿/* =========================================================
   PardisSanat - Modern Auth Page
   Glassmorphism + Smooth Animations + Always-Top Labels
========================================================= */

/* ------------------- Font Face ------------------- */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ------------------- Variables ------------------- */
:root {
    --auth-primary: #dc3545;
    --auth-primary-dark: #b91c1c;
    --auth-primary-light: #ff6b81;
    --auth-secondary: #6366f1;
    --auth-success: #10b981;
    --auth-warning: #f59e0b;
    --auth-bg-from: #fef2f4;
    --auth-bg-via: #ffffff;
    --auth-bg-to: #eef2ff;
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-border-strong: #cbd5e1;
    --auth-card-bg: rgba(255, 255, 255, 0.85);
    --auth-input-bg: rgba(255, 255, 255, 0.9);
    --auth-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --auth-shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --auth-shadow-lg: 0 25px 60px rgba(15, 23, 42, 0.12);
    --auth-radius: 24px;
    --auth-radius-sm: 14px;
    /* منحنی نرم‌تر - کاهش تدریجی سرعت برای حس طبیعی */
    --auth-transition: cubic-bezier(0.16, 1, 0.3, 1);
    --auth-transition-fast: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------- Base ------------------- */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg-via);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   Animated Background
========================================================= */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, rgba(220, 53, 69, 0.12), transparent 50%), radial-gradient(ellipse at bottom left, rgba(99, 102, 241, 0.10), transparent 50%), linear-gradient(135deg, #fef2f4 0%, #ffffff 50%, #eef2ff 100%);
    animation: gradientShift 18s ease-in-out infinite;
    will-change: transform;
}

@keyframes gradientShift {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }

    33% {
        transform: scale(1.05) translate(-2%, 1%);
    }

    66% {
        transform: scale(1.02) translate(1%, -1%);
    }
}

.auth-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
    will-change: transform;
}

.shape-1 {
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: rgba(220, 53, 69, 0.25);
    animation-delay: 0s;
}

.shape-2 {
    top: 60%;
    right: 75%;
    width: 250px;
    height: 250px;
    background: rgba(99, 102, 241, 0.22);
    animation-delay: -4s;
}

.shape-3 {
    top: 75%;
    right: 15%;
    width: 200px;
    height: 200px;
    background: rgba(255, 107, 129, 0.20);
    animation-delay: -8s;
}

.shape-4 {
    top: 20%;
    right: 50%;
    width: 180px;
    height: 180px;
    background: rgba(139, 92, 246, 0.18);
    animation-delay: -12s;
}

.shape-5 {
    top: 45%;
    right: 85%;
    width: 220px;
    height: 220px;
    background: rgba(236, 72, 153, 0.18);
    animation-delay: -16s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 40px) scale(0.95);
    }

    75% {
        transform: translate(20px, 20px) scale(1.05);
    }
}

/* =========================================================
   Wrapper & Card
========================================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1000px;
    min-height: 620px;
    background: var(--auth-card-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow-lg);
    overflow: hidden;
    /* ورود بسیار نرم و طولانی‌تر */
    animation: cardEntry 1.1s var(--auth-transition) both;
    will-change: transform, opacity;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   Brand Side
========================================================= */
.auth-brand {
    position: relative;
    padding: 48px 40px;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 50%), linear-gradient(135deg, #dc3545 0%, #b91c1c 50%, #7f1d1d 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brand-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.decor-1 {
    top: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    animation: rotate 30s linear infinite;
    will-change: transform;
}

.decor-2 {
    bottom: -100px;
    right: -100px;
    width: 320px;
    height: 320px;
    border-style: dashed;
    animation: rotate 45s linear infinite reverse;
    will-change: transform;
}

.decor-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    animation: pulse 4s ease-in-out infinite;
    will-change: transform, opacity;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.7;
    }
}

.brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ------------------- Brand Elements (با تاخیر بسیار نرم) ------------------- */
.brand-logo {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    margin-bottom: 24px;
    transition: transform 0.4s var(--auth-transition);
    /* شروع از حالت کمی شفاف - نه کاملاً مخفی */
    opacity: 0;
    transform: translateX(20px);
    animation: brandSlideIn 0.9s var(--auth-transition) 0.3s forwards;
    will-change: transform, opacity;
}

    .brand-logo:hover {
        transform: rotate(-10deg) scale(1.05);
    }

    .brand-logo svg {
        width: 42px;
        height: 42px;
        color: #fff;
    }

.brand-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInSmooth 0.8s var(--auth-transition) 0.45s forwards;
    will-change: transform, opacity;
}

.brand-subtitle {
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0 0 32px;
    opacity: 0;
    font-weight: 400;
    animation: fadeInSmooth 0.8s var(--auth-transition) 0.55s forwards;
    will-change: opacity;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
}

    .brand-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        font-size: 0.9rem;
        font-weight: 500;
        opacity: 0;
        transform: translateX(15px);
        animation: brandSlideIn 0.7s var(--auth-transition) forwards;
        will-change: transform, opacity;
    }

        .brand-features li:nth-child(1) {
            animation-delay: 0.65s;
        }

        .brand-features li:nth-child(2) {
            animation-delay: 0.75s;
        }

        .brand-features li:nth-child(3) {
            animation-delay: 0.85s;
        }

.feature-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 11px;
    font-size: 1.05rem;
    transition: all 0.3s var(--auth-transition);
}

.brand-features li:hover .feature-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(-5deg);
}

.brand-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    animation: fadeInSmooth 0.8s var(--auth-transition) 1s forwards;
    will-change: opacity;
}

.version-badge {
    display: inline-block;
    width: fit-content;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.copyright {
    font-size: 0.78rem;
    opacity: 0.75;
}

/* Keyframes مشترک برند - نرم و طبیعی */
@keyframes brandSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================================
   Form Side
========================================================= */
.auth-form-wrap {
    padding: 48px 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-inner {
    width: 100%;
    max-width: 380px;
}

.form-header {
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(15px);
    animation: formSlideIn 0.9s var(--auth-transition) 0.5s forwards;
    will-change: transform, opacity;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(255, 107, 129, 0.1));
    color: var(--auth-primary);
    border: 1px solid rgba(220, 53, 69, 0.15);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 16px;
}

    .welcome-badge i {
        font-size: 0.85rem;
    }

.form-title {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--auth-text);
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.form-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.6;
}

/* ------------------- Alert ------------------- */
.alert-error {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: var(--auth-radius-sm);
    font-size: 0.83rem;
    font-weight: 500;
    animation: shakeIn 0.5s var(--auth-transition);
}

    .alert-error.show {
        display: flex;
    }

    .alert-error i {
        font-size: 1.05rem;
        flex-shrink: 0;
    }

@keyframes shakeIn {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }

    25% {
        transform: translateX(8px);
    }

    50% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================================
   Form - Ultra Smooth Entry
========================================================= */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ------------------- Form Floating Group ------------------- */
.form-floating-group {
    position: relative;
    /* شروع از حالت بسیار نزدیک به نهایی - نه کاملاً مخفی */
    opacity: 0;
    transform: translateY(12px);
    animation: formSlideIn 0.9s var(--auth-transition) forwards;
    will-change: transform, opacity;
}

    .form-floating-group:nth-of-type(1) {
        animation-delay: 0.7s;
    }

    .form-floating-group:nth-of-type(2) {
        animation-delay: 0.8s;
    }

/* Keyframe مشترک فرم - نرم و طبیعی */
@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ------------------- Input Field ------------------- */
.form-input {
    width: 100%;
    height: 60px;
    padding: 26px 52px 8px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    outline: none;
    transition: border-color 0.3s var(--auth-transition), background 0.3s var(--auth-transition), box-shadow 0.3s var(--auth-transition);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

    /* حذف رنگ زرد Autofill */
    .form-input:-webkit-autofill,
    .form-input:-webkit-autofill:hover,
    .form-input:-webkit-autofill:focus {
        -webkit-text-fill-color: var(--auth-text);
        -webkit-box-shadow: 0 0 0px 1000px #fff inset;
        transition: background-color 5000s ease-in-out 0s;
        caret-color: var(--auth-text);
    }

    .form-input::placeholder {
        color: transparent;
    }

    .form-input:hover {
        border-color: var(--auth-border-strong);
        background: #fff;
    }

    .form-input:focus {
        background: #fff;
        border-color: var(--auth-primary);
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
    }

    .form-input.is-invalid {
        border-color: var(--auth-primary);
        background: rgba(254, 242, 242, 0.6);
        animation: shake 0.4s var(--auth-transition);
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* =========================================================
   Floating Label - Always-Top (Clean & Stable)
========================================================= */
.form-label-float {
    position: absolute;
    top: 8px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    pointer-events: none;
    transition: color 0.25s var(--auth-transition);
    z-index: 1;
}

    .form-label-float i {
        font-size: 0.85rem;
        color: var(--auth-text-muted);
        transition: color 0.25s var(--auth-transition);
    }

.form-input:focus ~ .form-label-float {
    color: var(--auth-primary);
}

    .form-input:focus ~ .form-label-float i {
        color: var(--auth-primary);
    }

.form-input:not(:placeholder-shown) ~ .form-label-float {
    color: var(--auth-primary);
}

    .form-input:not(:placeholder-shown) ~ .form-label-float i {
        color: var(--auth-primary);
    }

.form-input:-webkit-autofill ~ .form-label-float {
    color: var(--auth-primary);
}

    .form-input:-webkit-autofill ~ .form-label-float i {
        color: var(--auth-primary);
    }

.form-input.is-invalid ~ .form-label-float,
.form-input.is-invalid ~ .form-label-float i {
    color: var(--auth-primary);
}

/* =========================================================
   Password Toggle
========================================================= */
.password-toggle {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--auth-text-muted);
    font-size: 1.15rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s var(--auth-transition);
    z-index: 2;
}

    .password-toggle:hover {
        color: var(--auth-primary);
        background: rgba(220, 53, 69, 0.08);
    }

    .password-toggle i {
        transition: transform 0.3s var(--auth-transition);
    }

    .password-toggle.active i {
        transform: scale(1.1);
    }

    .password-toggle.active {
        color: var(--auth-primary);
    }

/* =========================================================
   Caps Lock Warning
========================================================= */
.caps-warning {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: fadeInSmooth 0.3s var(--auth-transition);
}

    .caps-warning.show {
        display: inline-flex;
    }

    .caps-warning i {
        font-size: 0.85rem;
    }

/* =========================================================
   Field Error
========================================================= */
.field-error {
    display: block;
    margin-top: 6px;
    padding-right: 4px;
    color: var(--auth-primary);
    font-size: 0.76rem;
    font-weight: 600;
    min-height: 18px;
}

/* =========================================================
   Password Strength Meter
========================================================= */
.password-strength {
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.4s var(--auth-transition);
    pointer-events: none;
}

    .password-strength.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

.strength-bar {
    height: 4px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0;
    background: var(--auth-primary);
    border-radius: 4px;
    transition: all 0.5s var(--auth-transition);
}

    .strength-fill.weak {
        width: 33%;
        background: #ef4444;
    }

    .strength-fill.medium {
        width: 66%;
        background: #f59e0b;
    }

    .strength-fill.strong {
        width: 100%;
        background: #10b981;
    }

.strength-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--auth-text-muted);
}

    .strength-text.weak {
        color: #ef4444;
    }

    .strength-text.medium {
        color: #f59e0b;
    }

    .strength-text.strong {
        color: #10b981;
    }

/* =========================================================
   Form Options (Smooth Entry)
========================================================= */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(10px);
    animation: formSlideIn 0.9s var(--auth-transition) 0.9s forwards;
    will-change: transform, opacity;
}

/* ------------------- Custom Checkbox ------------------- */
.custom-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

    .custom-check input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.check-mark {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid var(--auth-border);
    border-radius: 6px;
    transition: all 0.3s var(--auth-transition);
    position: relative;
}

    .check-mark i {
        font-size: 0.85rem;
        font-weight: 900;
        color: #fff;
        opacity: 0;
        transform: scale(0);
        transition: all 0.3s var(--auth-transition);
    }

.custom-check input:checked ~ .check-mark {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    border-color: var(--auth-primary);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.25);
}

    .custom-check input:checked ~ .check-mark i {
        opacity: 1;
        transform: scale(1);
    }

.custom-check:hover .check-mark {
    border-color: var(--auth-primary);
}

.check-label {
    font-size: 0.84rem;
    color: var(--auth-text);
    font-weight: 500;
}

/* ------------------- Forgot Link ------------------- */
.forgot-link {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
    position: relative;
    transition: all 0.25s var(--auth-transition);
}

    .forgot-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        right: 0;
        width: 0;
        height: 1.5px;
        background: var(--auth-primary);
        transition: width 0.35s var(--auth-transition);
    }

    .forgot-link:hover::after {
        width: 100%;
    }

/* =========================================================
   Submit Button
========================================================= */
.btn-submit {
    position: relative;
    width: 100%;
    height: 54px;
    padding: 0;
    margin-top: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    background-size: 200% 200%;
    background-position: 0% 0%;
    border: none;
    border-radius: var(--auth-radius-sm);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--auth-transition);
    box-shadow: 0 10px 24px rgba(220, 53, 69, 0.28);
    /* ورود بسیار نرم */
    opacity: 0;
    transform: translateY(12px);
    animation: formSlideIn 1s var(--auth-transition) 1s forwards;
    will-change: transform, opacity;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--auth-primary-dark), #7f1d1d);
        opacity: 0;
        transition: opacity 0.35s var(--auth-transition);
    }

    .btn-submit::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn-submit:hover {
        transform: translateY(-2px);
        background-position: 100% 100%;
        box-shadow: 0 14px 32px rgba(220, 53, 69, 0.35);
    }

        .btn-submit:hover::before {
            opacity: 1;
        }

    .btn-submit:active::after {
        width: 400px;
        height: 400px;
    }

    .btn-submit:disabled {
        cursor: not-allowed;
        opacity: 0.85;
    }

.btn-content {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s var(--auth-transition);
}

.btn-submit i {
    font-size: 1.05rem;
    transition: transform 0.3s var(--auth-transition);
}

.btn-submit:hover i {
    transform: translateX(-4px);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    gap: 6px;
    z-index: 2;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: loaderBounce 1.4s ease-in-out infinite;
}

    .loader-dot:nth-child(2) {
        animation-delay: 0.16s;
    }

    .loader-dot:nth-child(3) {
        animation-delay: 0.32s;
    }

@keyframes loaderBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-submit.loading .btn-content {
    opacity: 0;
}

.btn-submit.loading .btn-loader {
    display: flex;
}

/* =========================================================
   Divider
========================================================= */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    color: var(--auth-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeInSmooth 0.8s var(--auth-transition) 1.1s forwards;
    will-change: opacity;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: linear-gradient(to left, transparent, var(--auth-border), transparent);
    }

/* =========================================================
   Alt Actions
========================================================= */
.alt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    animation: formSlideIn 0.9s var(--auth-transition) 1.2s forwards;
    will-change: transform, opacity;
}

.alt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--auth-transition);
}

    .alt-btn i {
        font-size: 1rem;
        color: var(--auth-primary);
        transition: transform 0.3s var(--auth-transition);
    }

    .alt-btn:hover {
        border-color: var(--auth-primary);
        background: rgba(220, 53, 69, 0.03);
        color: var(--auth-primary);
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

        .alt-btn:hover i {
            transform: scale(1.15);
        }

.alt-btn-ghost i {
    color: var(--auth-secondary);
}

.alt-btn-ghost:hover {
    border-color: var(--auth-secondary);
    color: var(--auth-secondary);
    background: rgba(99, 102, 241, 0.04);
}

/* =========================================================
   Animations
========================================================= */
@keyframes fadeInSmooth {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 991.98px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 480px;
        min-height: auto;
    }

    .auth-brand {
        padding: 36px 32px;
        text-align: center;
    }

    .brand-logo {
        margin: 0 auto 20px;
    }

    .brand-features {
        display: none;
    }

    .brand-footer {
        margin-top: 24px;
    }

    .auth-form-wrap {
        padding: 36px 32px;
    }

    .decor-circle {
        opacity: 0.5;
    }
}

@media (max-width: 575.98px) {
    .auth-wrapper {
        padding: 16px;
    }

    .auth-card {
        border-radius: 20px;
    }

    .auth-brand {
        padding: 28px 22px;
    }

    .brand-title {
        font-size: 1.6rem;
    }

    .brand-subtitle {
        font-size: 0.85rem;
    }

    .auth-form-wrap {
        padding: 28px 22px;
    }

    .form-title {
        font-size: 1.45rem;
    }

    .alt-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* =========================================================
   Reduced Motion - برای کاربران حساس به انیمیشن
========================================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* در حالت Reduced Motion، همه چیز فوری نمایش داده بشه */
    .form-floating-group,
    .form-header,
    .form-options,
    .btn-submit,
    .divider,
    .alt-actions,
    .brand-logo,
    .brand-title,
    .brand-subtitle,
    .brand-features li,
    .brand-footer {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── «کاری از NexaDev» — نشان سازنده روی صفحهٔ ورود ── */
.nx-made-by{
  display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;
  margin:0 0 12px;padding:9px 12px;border-radius:12px;
  background:rgba(255,255,255,.10);
  border:1px dashed rgba(255,255,255,.22);
  font-size:.74rem;color:rgba(255,255,255,.78);
  backdrop-filter:blur(4px);
}
.nx-made-by .nx-mb-dot{
  width:7px;height:7px;border-radius:50%;flex:none;
  background:linear-gradient(140deg,#ffd7d3,#ffffff);
  box-shadow:0 0 0 3px rgba(255,255,255,.16);
}
.nx-made-by .nx-mb-brand{color:#fff;font-weight:800;letter-spacing:.05em;font-size:.82rem}
.nx-made-by .nx-mb-sep{color:rgba(255,255,255,.35)}
.nx-made-by .nx-mb-sub{color:rgba(255,255,255,.62)}
@media(max-width:420px){ .nx-made-by .nx-mb-sep,.nx-made-by .nx-mb-sub{display:none} }
