/* ═══════════════════════════════════════════
   Login page
   ═══════════════════════════════════════════ */

.login-body {
    background: #070d1a;
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -10%, rgba(59,130,246,.22) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 95%,  rgba(99,102,241,.14) 0%, transparent 55%),
        radial-gradient(ellipse 40% 35% at 10% 80%,  rgba(16,185,129,.08) 0%, transparent 55%);
    min-height: 100vh;
}

/* Hide the normal footer on login */
.login-body .footer { display: none; }

/* Override main container to allow flex centering */
.login-body main.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 2rem);
    padding: 2rem 0;
}

/* ─── Wrapper ─── */
.login-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ─── Card ─── */
.login-card {
    width: min(420px, calc(100% - 2rem));
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 24px;
    padding: 2.5rem 2.2rem 2.2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 24px 64px rgba(0,0,0,.55),
        0 1px 0 rgba(255,255,255,.06) inset;
}

/* ─── Logo ─── */
.login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 18px rgba(96,165,250,.35));
}

/* ─── Headings ─── */
.login-title {
    text-align: center;
    margin: 0 0 .35rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #e2e8f0, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-sub {
    text-align: center;
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 1.75rem;
}

/* ─── Alert ─── */
.login-alert {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .9rem;
    border-radius: 10px;
    font-size: .84rem;
    margin-bottom: 1.25rem;
    direction: rtl;
}

.login-alert svg { flex-shrink: 0; }

.login-alert-danger {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.28);
    color: #fca5a5;
}

.login-alert-success {
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.28);
    color: #86efac;
}

/* ─── Form ─── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.login-field label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    direction: rtl;
}

/* Input wrapper with icon */
.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
    flex-shrink: 0;
}

.login-input-wrap input {
    width: 100%;
    padding: .75rem 2.6rem .75rem .9rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    color: var(--text);
    font-size: .95rem;
    font-family: var(--font-sans);
    transition: border-color .18s, background .18s, box-shadow .18s;
    direction: rtl;
}

.login-input-wrap input::placeholder {
    color: rgba(156,163,175,.5);
}

.login-input-wrap input:focus {
    outline: none;
    border-color: rgba(59,130,246,.55);
    background: rgba(59,130,246,.06);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.login-input-wrap input:focus + .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
    color: #60a5fa;
}

/* ─── Submit button ─── */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    padding: .82rem 1.5rem;
    margin-top: .5rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .18s, transform .15s, box-shadow .18s;
    box-shadow: 0 4px 20px rgba(37,99,235,.35);
    letter-spacing: .01em;
}

.login-btn:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(37,99,235,.45);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(37,99,235,.3);
}

/* ─── CAPTCHA ─── */
.login-captcha-row {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.login-captcha-box {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem 1rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    flex-shrink: 0;
    user-select: none;
    direction: ltr;
}

.captcha-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #93c5fd;
    font-variant-numeric: tabular-nums;
    min-width: 1.4ch;
    text-align: center;
}

.captcha-op {
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
    padding: 0 .1rem;
}

.captcha-q {
    font-size: 1.1rem;
    font-weight: 800;
    color: #818cf8;
}

.captcha-input-wrap {
    flex: 1;
}

/* ─── Responsive ─── */
@media (max-width: 440px) {
    .login-card {
        padding: 2rem 1.4rem 1.75rem;
        border-radius: 20px;
    }
}
