/* =====================================================
   Hajmi — Admin login (OTP)
   ===================================================== */

body:has(.auth-login-page) {
    margin: 0;
    min-height: 100vh;
    font-family: 'Vazirmatn', sans-serif;
    background: #e8eef5;
    overflow-x: hidden;
}

html[data-theme-mode="dark"] body:has(.auth-login-page) {
    background: #0d1117;
}

body:has(.auth-login-page) .admin-wrapper,
body:has(.auth-login-page) .admin-container,
body:has(.auth-login-page) .admin-main {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.auth-login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.auth-login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    padding: 32px 28px 24px;
    text-align: center;
    color: #1a1d2e;
    animation: authLoginFadeIn 0.5s ease-out;
}

html[data-theme-mode="dark"] .auth-login-card {
    background: #161b28;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    color: #f1f5f9;
}

@keyframes authLoginFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.auth-login-brand__logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 3px solid #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

html[data-theme-mode="dark"] .auth-login-brand__logo {
    background: #1e2536;
    border-color: #f87171;
}

.auth-login-brand__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

html[data-theme-mode="dark"] .auth-login-brand__title {
    color: #94a3b8;
}

.auth-login-heading {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
    color: #1a1d2e;
}

html[data-theme-mode="dark"] .auth-login-heading {
    color: #f8fafc;
}

.auth-login-subtitle {
    margin: 0 0 20px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

html[data-theme-mode="dark"] .auth-login-subtitle {
    color: #94a3b8;
}

.auth-login-illustration {
    margin: 0 auto 24px;
    max-width: 300px;
    width: 100%;
    line-height: 0;
}

.auth-login-illustration__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.auth-login-illustration__img--dark {
    display: none;
}

.auth-login-illustration__svg {
    width: 100%;
    height: auto;
    display: block;
}

html[data-theme-mode="dark"] .auth-login-illustration__img--light {
    display: none;
}

html[data-theme-mode="dark"] .auth-login-illustration__img--dark {
    display: block;
}

html[data-theme-mode="dark"] .auth-login-illustration__svg rect[fill="#FFFFFF"],
html[data-theme-mode="dark"] .auth-login-illustration__svg path[fill="#FFFFFF"] {
    fill: #1e2536;
}

html[data-theme-mode="dark"] .auth-login-illustration__svg rect[fill="#EDF4FC"] {
    fill: #243044;
}

html[data-theme-mode="dark"] .auth-login-illustration__svg rect[fill="#DCE9F8"] {
    fill: #1a2a42;
}

.auth-login-field {
    margin-bottom: 16px;
    text-align: right;
}

.auth-login-input-wrap {
    position: relative;
}

.auth-login-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #2b7fff;
    font-size: 16px;
    pointer-events: none;
}

.auth-login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px 14px 44px;
    border: 1px solid #d8e0ea;
    border-radius: 14px;
    background: #f8fafc;
    color: #1a1d2e;
    font-size: 16px;
    font-family: inherit;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-login-input::placeholder {
    color: #94a3b8;
}

.auth-login-input:focus {
    border-color: #2b7fff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.15);
}

html[data-theme-mode="dark"] .auth-login-input {
    background: #1e2536;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
}

html[data-theme-mode="dark"] .auth-login-input:focus {
    border-color: #3b82f6;
    background: #1a2030;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.auth-login-input--otp {
    letter-spacing: 6px;
    font-size: 22px;
    font-weight: 700;
}

.auth-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #3b8cff 0%, #2b7fff 55%, #1d6fe8 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 8px 20px rgba(43, 127, 255, 0.35);
}

.auth-login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(43, 127, 255, 0.42);
}

.auth-login-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.auth-login-timer {
    display: none;
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
}

html[data-theme-mode="dark"] .auth-login-timer {
    color: #94a3b8;
}

.auth-login-timer strong {
    color: #2b7fff;
}

.auth-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

html[data-theme-mode="dark"] .auth-login-security {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

.auth-login-security i {
    color: #2b7fff;
    font-size: 16px;
}

.auth-login-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: right;
    list-style: none;
}

.auth-login-alert--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-login-alert--success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.auth-login-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

html[data-theme-mode="dark"] .auth-login-alert--danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

html[data-theme-mode="dark"] .auth-login-alert--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(74, 222, 128, 0.3);
    color: #86efac;
}

html[data-theme-mode="dark"] .auth-login-alert--warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

.auth-login-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-login-back:hover {
    color: #2b7fff;
}

html[data-theme-mode="dark"] .auth-login-back {
    color: #94a3b8;
}

html[data-theme-mode="dark"] .auth-login-back:hover {
    color: #60a5fa;
}

.auth-login-otp-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

html[data-theme-mode="dark"] .auth-login-otp-label {
    color: #94a3b8;
}

@media (max-width: 480px) {
    .auth-login-card {
        padding: 28px 20px 20px;
        border-radius: 20px;
    }

    .auth-login-heading {
        font-size: 22px;
    }
}
