/* Modern Login Page Styles */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.login-body {
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 50%, #0d2137 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding-top: 5vh;
    position: relative;
    overflow: hidden;
}

/* Animated Background Pattern */
.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(46, 204, 113, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(52, 152, 219, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 60% 60%, rgba(46, 204, 113, 0.05) 0%, transparent 30%);
    pointer-events: none;
}

/* Floating Particles Effect */
.login-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 100px 50px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 200px 150px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 300px 250px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 400px 100px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 500px 300px, rgba(255,255,255,0.25), transparent),
        radial-gradient(2px 2px at 150px 400px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 250px 500px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 350px 350px, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 450px 450px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 50px 200px, rgba(255,255,255,0.25), transparent),
        radial-gradient(1px 1px at 600px 200px, rgba(52, 152, 219, 0.5), transparent),
        radial-gradient(1px 1px at 700px 400px, rgba(46, 204, 113, 0.5), transparent),
        radial-gradient(1px 1px at 800px 100px, rgba(52, 152, 219, 0.4), transparent),
        radial-gradient(1px 1px at 900px 300px, rgba(46, 204, 113, 0.4), transparent);
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px;
}

.login-content {
    max-width: 420px;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-brand-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
    animation: float 3s ease-in-out infinite;
}

.login-brand-icon i {
    font-size: 40px;
    color: #ffffff;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-brand {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 2px;
}

.brand-th {
    color: #3498db;
    text-shadow: 2px 2px 4px rgba(52, 152, 219, 0.3);
}

.brand-auto {
    color: #2ecc71;
    text-shadow: 2px 2px 4px rgba(46, 204, 113, 0.3);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-form {
    width: 100%;
}

.login-title {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.form-label {
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 8px;
    display: block;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 16px;
    z-index: 1;
}

.modern-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 45px;
    border: 2px solid #e8ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.modern-input:focus {
    border-color: #3498db;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15), 0 0 20px rgba(52, 152, 219, 0.1);
}

.modern-input::placeholder {
    color: #bdc3c7;
}

.modern-btn-primary {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.35);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.modern-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.modern-btn-primary:hover::before {
    left: 100%;
}

.modern-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #27ae60 100%);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.45);
    transform: translateY(-3px);
}

.modern-btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.35);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.change-password-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.change-password-link:hover {
    color: #2980b9;
    text-decoration: none;
}

.login-ip {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 24px;
    font-size: 13px;
}

/* Alert styles */
.alert {
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 24px;
    }

    .login-brand-icon {
        width: 60px;
        height: 60px;
    }

    .login-brand-icon i {
        font-size: 30px;
    }

    .login-brand {
        font-size: 2.2rem;
    }

    .login-subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    .login-title {
        font-size: 1.5rem;
    }
}
