/* =============================================================================
   LOGIN PAGE — SCIFI TERMINAL AESTHETIC
   ============================================================================= */

.login-body {
    background: #04080f;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* ── ANIMATED BACKGROUND ── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* Grid overlay */
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(245,158,11,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245,158,11,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridPulse 6s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}

/* Glow orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px; height: 400px;
    background: rgba(245,158,11,0.08);
    top: -100px; right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px; height: 300px;
    background: rgba(59,130,246,0.06);
    bottom: -80px; left: 10%;
    animation-delay: 3s;
}

.orb-3 {
    width: 200px; height: 200px;
    background: rgba(139,92,246,0.05);
    top: 40%; left: 50%;
    animation-delay: 5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-30px) scale(1.1); }
}

/* Scan line */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245,158,11,0.3), transparent);
    animation: scanLine 6s linear infinite;
    top: 0;
}

@keyframes scanLine {
    0%   { top: -2px; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Particles */
.particles { position: absolute; inset: 0; }

.particle {
    position: absolute;
    background: rgba(245,158,11,0.6);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-120px) scale(0.5); opacity: 0; }
}

/* ── LOGIN CARD ── */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: rgba(13,17,23,0.95);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow:
        0 0 0 1px rgba(245,158,11,0.05),
        0 4px 60px rgba(0,0,0,0.6),
        0 0 80px rgba(245,158,11,0.04);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

/* Top glow line */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245,158,11,0.8), transparent);
}

/* Corner decorations */
.login-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), transparent);
}

/* ── HEADER ── */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.login-logo-icon {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-icon i {
    font-size: 28px;
    color: #f59e0b;
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 0 12px rgba(245,158,11,0.6));
}

.logo-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-rings span {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(245,158,11,0.3);
    animation: ringPulse 2s ease-in-out infinite;
}

.logo-rings span:nth-child(1) { width: 68px; height: 68px; animation-delay: 0s; }
.logo-rings span:nth-child(2) { width: 52px; height: 52px; animation-delay: 0.4s; border-color: rgba(245,158,11,0.5); }
.logo-rings span:nth-child(3) { width: 36px; height: 36px; animation-delay: 0.8s; border-color: rgba(245,158,11,0.7); }

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%       { transform: scale(1.08); opacity: 1; }
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #64748b;
}

/* ── STATUS ── */
.login-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 22px;
    padding: 7px 14px;
    background: rgba(16,185,129,0.05);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 20px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: statusBlink 2s ease-in-out infinite;
}
.status-dot.online { background: #10b981; box-shadow: 0 0 6px #10b981; }

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.status-time {
    margin-right: auto;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
}

/* ── FORM ── */
.login-form { }

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.form-group { margin-bottom: 16px; }

.form-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 7px;
}
.form-label i { color: #f59e0b; width: 14px; }

.input-wrap {
    position: relative;
}

.form-input {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'Noto Sans Arabic', sans-serif;
    transition: all 0.2s;
    outline: none;
    direction: rtl;
}

.form-input:focus {
    border-color: rgba(245,158,11,0.5);
    box-shadow:
        0 0 0 3px rgba(245,158,11,0.1),
        inset 0 0 20px rgba(245,158,11,0.02);
}

.form-input.is-error { border-color: rgba(239,68,68,0.5); }
.form-input::placeholder { color: #334155; }

.input-border {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
    border-radius: 0 0 8px 8px;
}

.form-input:focus ~ .input-border { transform: scaleX(1); }

.password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 13px;
    transition: color 0.2s;
}
.password-toggle:hover { color: #f59e0b; }

/* Remember */
.form-remember { margin-bottom: 20px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input { display: none; }

.checkbox-custom {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkbox-custom {
    background: #f59e0b;
    border-color: #f59e0b;
}

.checkbox-label input:checked ~ .checkbox-custom::after {
    content: '✓';
    color: #000;
    font-size: 10px;
    font-weight: 700;
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Noto Sans Arabic', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 4px 30px rgba(245,158,11,0.5);
    transform: translateY(-1px);
}

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

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Scan animation on button */
.btn-scan {
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btnScan 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes btnScan {
    0%   { left: -100%; }
    50%  { left: 200%; }
    100% { left: 200%; }
}

/* ── FOOTER ── */
.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 11px;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .login-card { padding: 28px 20px; }
    .login-title { font-size: 17px; }
}
