/* ================================================================
   login.css — Login & Register standalone pages (RTL Persian)
   Brand: #1a1040  Accent: #6610f2
   ================================================================ */

/* ---------- Page Base ---------- */
html, body {
    height: 100%;
    margin: 0;
}

body.auth-page {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
    background: #f0ebff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Split Layout ---------- */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* LEFT — Brand Pane */
.auth-brand-pane {
    flex: 0 0 42%;
    background: linear-gradient(160deg, #0d0820 0%, #1a1040 55%, #2d1b69 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-pane::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(102,16,242,.25) 0%, transparent 60%);
    pointer-events: none;
}

.brand-pane-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 2rem;
    text-decoration: none;
}

.brand-logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #6610f2, #8a40f8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(102,16,242,.4);
}

.brand-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.brand-tagline {
    color: rgba(255,255,255,.75);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.brand-tagline strong {
    color: #fff;
}

.brand-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.brand-benefits li {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    margin-bottom: 1rem;
}

.brand-benefits li i {
    width: 30px;
    height: 30px;
    background: rgba(102,16,242,.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
    font-size: .85rem;
    flex-shrink: 0;
}

/* RIGHT — Form Pane */
.auth-form-pane {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #f8f9fc;
}

.auth-form-box {
    width: 100%;
    max-width: 420px;
}

/* Card */
.auth-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 16px 50px rgba(26,16,64,.1);
    overflow: hidden;
}

.auth-card-header {
    background: linear-gradient(135deg, #1a1040, #2d1b69);
    color: #fff;
    padding: 2rem 2rem 1.75rem;
    text-align: center;
}

.auth-card-header h4 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 .4rem;
    color: #fff;
}

.auth-card-header p {
    font-size: .83rem;
    color: rgba(255,255,255,.65);
    margin: 0;
}

.auth-card-body {
    padding: 2rem 2rem;
}

/* Form elements */
.auth-form-group {
    margin-bottom: 1.1rem;
}

.auth-form-group label {
    display: block;
    font-size: .87rem;
    font-weight: 600;
    color: #333;
    margin-bottom: .4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: .9rem;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    padding-right: 2.6rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 11px;
    height: 46px;
    font-size: .95rem;
    font-family: 'Vazirmatn', sans-serif;
    transition: border-color .2s, box-shadow .2s;
    background: #fafbff;
}

.auth-input-wrap .form-control:focus {
    border-color: #6610f2;
    box-shadow: 0 0 0 3px rgba(102,16,242,.14);
    outline: none;
    background: #fff;
}

.btn-auth-submit {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #1a1040, #6610f2);
    color: #fff;
    border: none;
    border-radius: 13px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    margin-top: .5rem;
    box-shadow: 0 8px 24px rgba(26,16,64,.3);
    letter-spacing: .3px;
}

.btn-auth-submit:hover {
    opacity: .93;
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(26,16,64,.35);
}

.btn-auth-submit:active {
    transform: scale(.98);
}

/* Footer links */
.auth-card-footer {
    padding: 1.1rem 2rem 1.5rem;
    text-align: center;
    font-size: .85rem;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
}

.auth-card-footer a {
    color: #6610f2;
    font-weight: 600;
    text-decoration: none;
}

.auth-card-footer a:hover {
    text-decoration: underline;
    color: #1a1040;
}

.auth-card-footer .sep {
    color: #ddd;
}

/* Error alert */
.auth-alert {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 10px;
    padding: .85rem 1rem;
    font-size: .88rem;
    margin-bottom: 1.25rem;
}

.auth-alert i {
    flex-shrink: 0;
    font-size: 1rem;
}

/* ---------- Info alert (blue) ---------- */
.auth-alert-info {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

/* ---------- Forgot password link ---------- */
.forgot-link {
    font-size: .8rem;
    color: #6610f2;
    font-weight: 600;
    text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ---------- Resend form ---------- */
.resend-form {
    margin: .5rem 0 .75rem;
    text-align: center;
}
.btn-resend {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: none;
    border: 1.5px solid #6610f2;
    color: #6610f2;
    border-radius: 8px;
    padding: .45rem 1.1rem;
    font-size: .85rem;
    font-weight: 700;
    font-family: Vazirmatn, sans-serif;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.btn-resend:hover {
    background: #6610f2;
    color: #fff;
}

/* ---------- Check-email state (register success) ---------- */
.check-email-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    color: #059669;
}

.check-email-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1040;
    margin-bottom: .5rem;
}

.check-email-desc {
    font-size: .9rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.check-email-steps {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    text-align: right;
}

.check-step {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .88rem;
    color: #444;
    padding: .45rem 0;
}

.check-step + .check-step {
    border-top: 1px dashed #e5e7eb;
}

.check-step-num {
    width: 26px;
    height: 26px;
    background: #6610f2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.check-email-note {
    font-size: .82rem;
    color: #888;
    margin: 0;
}

.check-email-note a {
    color: #6610f2;
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Verify / Reset states ---------- */
.auth-centered .auth-form-pane {
    background: linear-gradient(160deg, #0d0820 0%, #1a1040 55%, #2d1b69 100%);
}

.verify-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2.2rem;
}

.verify-icon-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.verify-icon-expired {
    background: linear-gradient(135deg, #fee2e2, #fca5a5);
    color: #dc2626;
}

.verify-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1040;
    margin-bottom: .5rem;
}

.verify-desc {
    font-size: .9rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ---------- Responsive: Mobile stacked ---------- */
@media (max-width: 767.98px) {
    .auth-brand-pane {
        display: none;
    }

    body.auth-page {
        background: linear-gradient(160deg, #0d0820, #1a1040);
    }

    .auth-form-pane {
        background: transparent;
        padding: 2rem 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .auth-form-box {
        max-width: 100%;
    }

    /* Show mini brand above card on mobile */
    .auth-mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        color: #fff;
        font-size: 1.25rem;
        font-weight: 800;
        margin-bottom: 1.5rem;
    }

    .auth-mobile-brand i {
        font-size: 1.4rem;
        color: #c4b5fd;
    }
}

@media (min-width: 768px) {
    .auth-mobile-brand {
        display: none;
    }
}
