/*
 * FTTH Monitor - Login Page CSS
 * Dark network-themed background with glassmorphism card
 * Teal/cyan color scheme for network monitoring
 */

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #020617 0%, #0c1a2e 25%, #0a1628 50%, #071320 75%, #020617 100%);
    position: relative;
    overflow: hidden;
}

.login-body::before,
.login-body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    pointer-events: none;
}

.login-body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #06b6d4, #0891b2);
    top: -150px;
    right: -150px;
}

.login-body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #0ea5e9, #0284c7);
    bottom: -100px;
    left: -100px;
}

/* ============================================
   Particles Canvas
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   Remember Me Checkbox
   ============================================ */
.login-card .form-check-input:checked {
    background-color: #06b6d4;
    border-color: #06b6d4;
}

.login-card .form-check-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ============================================
   Login Container & Card
   ============================================ */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 24px;
    padding: 44px 40px 36px;
    box-shadow:
        0 32px 64px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(6, 182, 212, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 80px -20px rgba(6, 182, 212, 0.1);
}

/* ============================================
   Login Header
   ============================================ */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: logoPulse 3s ease-in-out infinite;
    box-shadow:
        0 0 0 0 rgba(6, 182, 212, 0.4),
        0 12px 32px rgba(0, 0, 0, 0.4);
}

.login-logo i {
    font-size: 2rem;
    color: #ffffff;
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(6, 182, 212, 0.4),
            0 12px 32px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow:
            0 0 0 12px rgba(6, 182, 212, 0),
            0 12px 40px rgba(6, 182, 212, 0.3);
    }
}

.login-header h1 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.login-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
}

/* ============================================
   Alert Message
   ============================================ */
.login-card .alert {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shakeX 0.5s ease;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ============================================
   Form Elements
   ============================================ */
.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.login-card .input-group {
    position: relative;
}

.login-card .input-group > i.fa-user,
.login-card .input-group > i.fa-lock {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.login-card .form-control {
    width: 100%;
    padding: 14px 48px 14px 46px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.login-card .form-control:focus {
    outline: none;
    background: rgba(6, 182, 212, 0.06);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow:
        0 0 0 4px rgba(6, 182, 212, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-card .input-group:focus-within > i.fa-user,
.login-card .input-group:focus-within > i.fa-lock {
    color: #06b6d4;
}

/* ============================================
   Login Button
   ============================================ */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px rgba(6, 182, 212, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login .spinner {
    display: none;
}

.btn-login.loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Password Toggle
   ============================================ */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 3;
    line-height: 1;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   Login Footer - Status Indicators
   ============================================ */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.status-dot.up {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.warning {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation-delay: 0.3s;
}

.status-dot.down {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation-delay: 0.6s;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* ============================================
   Brand Footer
   ============================================ */
.brand-footer {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    text-align: center;
    z-index: 10;
    white-space: nowrap;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 28px;
    }
    .login-header h1 {
        font-size: 1.4rem;
    }
}
