/* ============================================================
   LOGIN PAGE STYLES
   Extends global design tokens from style.css
   ============================================================ */

/* ── Body ─────────────────────────────────────────────────── */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0f1e;
    position: relative;
    overflow: hidden;
    font-family: 'Tajawal', sans-serif;
    padding: 1.5rem;
}

/* ── Animated background orbs ─────────────────────────────── */
.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: orbFloat 12s ease-in-out infinite alternate;
}

.login-orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #2563eb, #0ea5e9);
    top: -15%;
    right: -10%;
    animation-duration: 14s;
}

.login-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7c3aed, #2563eb);
    bottom: -12%;
    left: -8%;
    animation-duration: 10s;
    animation-delay: -4s;
}

.login-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #0ea5e9, #10b981);
    top: 55%;
    right: 30%;
    animation-duration: 16s;
    animation-delay: -7s;
}

@keyframes orbFloat {
    0%   { transform: translate(0,   0)   scale(1);    }
    50%  { transform: translate(30px, -40px) scale(1.06); }
    100% { transform: translate(-20px, 25px) scale(0.96); }
}

/* ── Wrapper ──────────────────────────────────────────────── */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

/* ── Card ─────────────────────────────────────────────────── */
.login-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 1.5rem;
    padding: 2.5rem 2.25rem;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* ── Header / Branding ────────────────────────────────────── */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border-radius: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1.1rem;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.40);
}

.login-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.login-title span {
    color: #38bdf8;
}

.login-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    font-weight: 400;
}

/* ── Section Divider ──────────────────────────────────────── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.10);
}

.login-divider span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

/* ── Form Labels ──────────────────────────────────────────── */
.login-card .form-label {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ── Input Group ──────────────────────────────────────────── */
.login-input-group {
    border-radius: 0.625rem;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.10);
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.login-input-group:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.20);
}

.login-input-icon {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.40);
    padding: 0 0.9rem;
    font-size: 0.95rem;
}

.login-input-icon:focus,
.login-pwd-toggle:focus {
    outline: none;
    box-shadow: none;
    color: #60a5fa;
}

.login-pwd-toggle {
    cursor: pointer;
    transition: color 150ms ease;
}

.login-pwd-toggle:hover {
    color: #93c5fd;
}

.login-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    border-radius: 0 !important;
    color: #f1f5f9 !important;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9375rem;
    padding: 0.6rem 0.85rem;
    box-shadow: none !important;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.22) !important;
}

.login-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
}

.login-input.is-invalid {
    border-right: 3px solid #ef4444 !important;
}

/* ── Checkbox ─────────────────────────────────────────────── */
.login-checkbox {
    width: 1.1em;
    height: 1.1em;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.20);
    cursor: pointer;
    flex-shrink: 0;
}

.login-checkbox:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.login-checkbox-label {
    color: rgba(255, 255, 255, 0.60);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

/* ── Alerts inside login card ─────────────────────────────── */
.login-card .alert {
    font-size: 0.875rem;
    border-radius: 0.625rem;
}

.login-card .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.30);
    color: #fca5a5;
}

.login-card .alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.30);
    color: #6ee7b7;
}

/* ── Submit Button ────────────────────────────────────────── */
.btn-login {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border: none;
    color: #ffffff;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    letter-spacing: 0.01em;
    margin-top: 0.5rem;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.50);
    color: #ffffff;
    opacity: 0.95;
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

/* ── Card Footer ──────────────────────────────────────────── */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.30);
}

/* ── Attribution ──────────────────────────────────────────── */
.login-attribution {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.20);
    margin: 0;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
    }

    .login-logo {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .login-title {
        font-size: 1.4rem;
    }
}
