* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Poppins", sans-serif;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.4);
    --glass-blur: blur(20px) saturate(160%);
}

body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Fix for admin template pushing the login page off-center */
.main-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden;
}

.bg-login {
    /* Combine animated gradient with the static stars image overlay */
    background-image: linear-gradient(135deg, rgba(26,26,46,0.65) 0%, rgba(22,33,62,0.65) 50%, rgba(15,52,96,0.65) 100%), url('../images/freepic_bg.jpg');
    background-size: 400% 400%, cover;
    background-position: center, center;
    background-attachment: fixed, fixed;
    animation: gradientBG 20s ease infinite;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%, center; }
    50% { background-position: 100% 50%, center; }
    100% { background-position: 0% 50%, center; }
}

.bg-login::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(58, 87, 232, 0.25) 0%, transparent 60%);
    top: -50px;
    left: -100px;
    border-radius: 50%;
    z-index: 0;
}

.bg-login::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.2) 0%, transparent 60%);
    bottom: -150px;
    right: -100px;
    border-radius: 50%;
    z-index: 0;
}

/* Glass panel wrapper styles */
.page-header {
    position: relative;
    z-index: 10;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    width: 100%;
    /* Neon glow animation relevant to the theme colors */
    animation: neonGlow 4s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    0% { 
        box-shadow: 0 0 20px rgba(58, 87, 232, 0.2), inset 0 0 10px rgba(58, 87, 232, 0.1); 
        border-color: rgba(255, 255, 255, 0.2);
    }
    100% { 
        box-shadow: 0 0 50px rgba(13, 110, 253, 0.6), inset 0 0 20px rgba(13, 110, 253, 0.3); 
        border-color: rgba(255, 255, 255, 0.5);
    }
}

.logo-login {
    width: 18rem;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    margin-bottom: 2rem;
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.logo-login:hover {
    filter: drop-shadow(0 0 35px rgba(255, 255, 255, 1));
    transform: scale(1.05);
}

/* Forms and Inputs */
.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border-radius: 12px !important;
    height: 3.5rem !important; /* Proper height for floating labels */
    padding: 1rem 1rem !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.4) !important;
}

/* Fix auto-fill bg coloring in Chrome */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: #fff !important;
}

/* Remove default bootstrap background color blocking behind floated labels gap */
.form-floating > label::after {
    background-color: transparent !important;
}

/* Fix cramped labels and gray backgrounds */
.form-floating label {
    color: rgba(255, 255, 255, 0.7) !important;
    background: transparent !important;
    padding: 1rem 1rem !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #fff !important;
    opacity: 1;
    transform: scale(0.85) translateY(-0.8rem) translateX(0.15rem);
    background: transparent !important;
}

.btn-login {
    background: linear-gradient(90deg, #3a57e8 0%, #0d6efd 100%);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(58, 87, 232, 0.3);
    color: #fff !important;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(58, 87, 232, 0.5);
    background: linear-gradient(90deg, #4c69f6 0%, #1e80ff 100%);
}

.form-check-label, .forgot a {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
}

.forgot a {
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.forgot a:hover {
    color: #fff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Custom Checkbox Color */
.form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.form-check-input:checked {
    background-color: #3a57e8;
    border-color: #3a57e8;
}

@media (max-width: 576px) {
    .glass-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    .logo-login {
        width: 15rem;
    }
}