/* ============================================================
   Split Authentication Layout for ShoraAliProject (Adminator Style)
   ============================================================ */

:root {
    --auth-bg-body: #f8fafc;
    --auth-bg-card: #ffffff;
    --auth-t-base: #1e293b;
    --auth-t-muted: #64748b;
    --auth-t-light: #94a3b8;
    --auth-border: #e2e8f0;
    --auth-border-soft: #f1f5f9;
    --auth-primary: #1d4ed8;
    --auth-primary-dark: #1e3a8a;
    --auth-primary-soft: #eff6ff;
    --auth-primary-ring: rgba(29, 78, 216, 0.18);
    --auth-danger: #ef4444;
}

[data-bs-theme="dark"] {
    --auth-bg-body: #0b1120;
    --auth-bg-card: #141b2d;
    --auth-t-base: #f1f5f9;
    --auth-t-muted: #94a3b8;
    --auth-t-light: #64748b;
    --auth-border: #222c42;
    --auth-border-soft: #1a2237;
    --auth-primary: #3b82f6;
    --auth-primary-dark: #2563eb;
    --auth-primary-soft: #0f2847;
    --auth-primary-ring: rgba(59, 130, 246, 0.22);
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--auth-bg-body);
    color: var(--auth-t-base);
    font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    direction: rtl;
}

/* ============================================================
   Right / Hero Aside (in RTL)
   ============================================================ */
.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 3.5rem 3.5rem 2.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
    color: #ffffff;
    overflow: hidden;
    isolation: isolate;
}

/* Background atmospheric glows */
.auth-aside::before {
    content: "";
    position: absolute;
    inset: -30% -20% auto auto;
    width: 80%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.auth-aside::after {
    content: "";
    position: absolute;
    inset: auto auto -25% -20%;
    width: 85%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.2) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.auth-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
}

.auth-brand .logo {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    color: #ffffff;
}

.auth-brand .name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.auth-aside-body {
    position: relative;
    z-index: 2;
    max-width: 520px;
    width: 100%;
    margin: auto;
    padding: 2.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-aside-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.25rem;
}

.auth-aside h1,
.auth-aside-title {
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: #ffffff;
    text-align: center;
}

.auth-aside p,
.auth-aside-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1.75rem;
    text-align: center;
}

.auth-welcome-note {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 1.3rem 1.6rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    width: 100%;
}

.auth-welcome-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 0.45rem;
    text-align: center;
}

.auth-welcome-desc {
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
}

.auth-quote {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    line-height: 1.75;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    width: 100%;
}

.auth-quote-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.auth-quote-author .av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.auth-aside-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================================
   Left / Main Form Section (in RTL)
   ============================================================ */
.auth-main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3.5rem;
    background: var(--auth-bg-body);
    position: relative;
}

.auth-main-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.5rem;
}

.auth-back-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--auth-t-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-back-link:hover {
    color: var(--auth-primary);
}

.auth-card {
    margin: auto;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2.5rem;
    background: var(--auth-bg-card);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    box-shadow: 0 12px 35px -5px rgba(15, 23, 42, 0.07), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    animation: auth-card-fade 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-card h2,
.auth-card-title-main {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--auth-t-base);
    margin: 0 0 1.6rem;
    text-align: center;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--auth-t-base);
    margin: 0;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon .ico {
    position: absolute;
    inset-inline-start: 1rem;
    color: var(--auth-t-light);
    font-size: 1.15rem;
    pointer-events: none;
    display: grid;
    place-items: center;
    transition: color 0.15s ease;
}

.input-icon .input {
    width: 100%;
    border: 1px solid var(--auth-border);
    background: var(--auth-bg-card);
    border-radius: 12px;
    padding: 0.82rem 1rem;
    padding-inline-start: 2.85rem;
    padding-inline-end: 1rem;
    font-size: 0.95rem;
    color: var(--auth-t-base);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    font-family: inherit;
}

.input-icon--pass .input {
    padding-inline-end: 3rem;
}

.input-icon .input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-ring);
}

.input-icon:focus-within .ico {
    color: var(--auth-primary);
}

.auth-eye {
    position: absolute;
    inset-inline-end: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--auth-t-light);
    width: 2.3rem;
    height: 2.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-eye:hover {
    color: var(--auth-t-base);
    background: var(--auth-border-soft);
}

/* Captcha Styling */
.auth-captcha-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem;
    background: var(--auth-border-soft);
    border-radius: 12px;
    border: 1px dashed var(--auth-border);
}

.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.auth-captcha-code {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.75rem;
    letter-spacing: 0.5em;
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--auth-primary);
    background: var(--auth-bg-card);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    user-select: none;
    direction: ltr;
}

.auth-captcha-refresh {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: var(--auth-bg-card);
    color: var(--auth-t-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-captcha-refresh:hover {
    color: var(--auth-primary);
    border-color: var(--auth-primary);
}

/* Checkbox (Remember Me) */
.check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--auth-t-muted);
    user-select: none;
}

.check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--auth-primary);
    cursor: pointer;
    border-radius: 4px;
}

/* Submit Button */
.auth-submit {
    margin-top: 0.5rem;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0.88rem 1.4rem;
    background: var(--auth-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--auth-primary-ring);
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    font-family: inherit;
}

.auth-submit:hover:not(:disabled) {
    background: var(--auth-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--auth-primary-ring);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-main-bottom {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--auth-t-light);
}

/* Animation */
@keyframes auth-card-fade {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Default: hide mobile-only header on desktop */
.auth-mobile-header {
    display: none;
}

/* ============================================================
   Responsive (Mobile & Tablets)
   ============================================================ */
@media (max-width: 960px) {
    .auth-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        background: var(--auth-bg-body);
    }

    /* Hide hero aside completely on mobile */
    .auth-aside {
        display: none !important;
    }

    .auth-main {
        flex: 1;
        padding: 1.5rem 1.25rem 2rem;
        justify-content: flex-start;
    }

    .auth-main-top {
        margin-bottom: 1.25rem;
    }

    .auth-card {
        margin: auto;
        padding: 1.8rem 1.4rem;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
        border: 1px solid var(--auth-border);
        border-radius: 18px;
        background: var(--auth-bg-card);
    }

    /* Show mobile-specific header */
    .auth-mobile-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid var(--auth-border-soft);
    }

    .auth-mobile-logo {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--auth-primary), #1e3a8a);
        color: #ffffff;
        display: grid;
        place-items: center;
        font-size: 1.6rem;
        box-shadow: 0 6px 16px var(--auth-primary-ring);
        margin-bottom: 0.85rem;
    }

    .auth-mobile-title {
        font-size: 1.35rem;
        font-weight: 800;
        line-height: 1.35;
        letter-spacing: -0.02em;
        color: var(--auth-t-base);
        margin: 0 0 0.4rem;
        text-align: center;
    }

    .auth-mobile-subtitle {
        font-size: 0.92rem;
        font-weight: 500;
        line-height: 1.55;
        color: var(--auth-t-muted);
        margin: 0;
        text-align: center;
        max-width: 22rem;
    }

    .auth-card-title-main {
        font-size: 1.25rem;
        margin: 0 0 1.25rem;
    }
}
