/* Ensure variables from style.css are accessible */
/* Assumes style.css is already loaded with the :root variables */

/* ------------------------------------------- */
/* --- 0. BACKGROUND ANIMATION KEYFRAMES --- */
/* ------------------------------------------- */
@keyframes subtle-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ------------------------------------------- */
/* --- 1. Login Page Specific Layout --- */
/* ------------------------------------------- */

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    
    /* NEW: Enhanced Background */
    background-color: #0b0b0f; /* Even darker base */
    background-image: radial-gradient(circle at top left, rgba(0, 255, 255, 0.08) 0%, rgba(10, 10, 15, 1) 40%),
                      repeating-linear-gradient(0deg, #101015, #101015 1px, #0b0b0f 1px, #0b0b0f 50px);
    background-size: 200% 200%; /* For the subtle-move animation */
    animation: subtle-move 40s ease infinite;
    color: var(--color-text-light);
}

.login-wrapper {
    width: 100%;
    /* WIDER CARD: Increased max-width */
    max-width: 500px; 
    padding: 20px;
}

.login-card {
    background-color: var(--color-bg-card);
    padding: 50px; /* Slightly more vertical padding */
    border-radius: 15px; /* Slightly more rounded corners */
    border: 1px solid rgba(0, 255, 255, 0.2); /* Softer border */
    box-shadow: 0 15px 50px rgba(0, 255, 255, 0.25), 0 0 10px rgba(0, 255, 255, 0.1); /* Deeper cyan glow */
    text-align: center;
    backdrop-filter: blur(5px); /* Optional, for a "frosted glass" effect if background were lighter */
}

/* ------------------------------------------- */
/* --- 2. Header and Branding --- */
/* ------------------------------------------- */
.login-header {
    margin-bottom: 40px;
}

.login-logo-img {
    height: 100px; 
    margin-bottom: 5px;
}

.login-header h1 {
    font-size: 2em; /* Slightly larger heading */
    color: var(--color-accent);
    margin-bottom: 5px;
    font-weight: 900;
}

.login-header p {
    color: var(--color-text-subtle);
    font-size: 1em;
}

/* ------------------------------------------- */
/* --- 3. Form Inputs and Groups --- */
/* ------------------------------------------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Increased gap */
}

.input-group {
    text-align: left;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--color-text-light);
}

.input-group label i {
    color: var(--color-accent);
    margin-right: 8px;
}

.input-group input {
    width: 100%;
    padding: 15px 18px; /* Slightly larger padding for modern look */
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #0d0d10;
    color: var(--color-text-light);
    font-size: 1.05em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    outline: none;
}

/* --- Password Toggle Specifics (FIXED) --- */
.password-group input {
    padding-right: 50px; /* Ensure enough space for the icon */
}

.toggle-password {
    position: absolute;
    right: 15px;
    /* FIX: Center the icon vertically relative to the input field height */
    top: 50%;
    transform: translateY(calc(-50% + 14px)); /* -50% for vertical center of the input group, + half the label height */
    cursor: pointer;
    color: var(--color-text-subtle);
    transition: color 0.2s;
    height: 100%; /* Important for click area */
    display: flex;
    align-items: center;
}

.toggle-password i {
    font-size: 1.1em;
}

.toggle-password:hover {
    color: var(--color-accent);
}


/* ------------------------------------------- */
/* --- 4. Minor Actions (Remember Me, Forgot Password) --- */
/* ------------------------------------------- */
.form-actions-minor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: var(--color-text-subtle);
}

.remember-me label {
    margin-left: 8px;
    cursor: pointer;
    font-weight: 400;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
    border: 1px solid var(--color-border);
    vertical-align: middle;
}

.forgot-password-link {
    color: var(--color-accent);
    font-weight: 500;
    transition: opacity 0.2s;
}
.forgot-password-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ------------------------------------------- */
/* --- 5. Login Button --- */
/* ------------------------------------------- */
.btn-login {
    background-color: var(--color-accent);
    color: var(--color-bg-dark);
    padding: 18px 25px; /* Slightly larger button */
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
    margin-top: 20px;
}

.btn-login:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.5);
}

.btn-login i {
    margin-left: 10px;
}

/* ------------------------------------------- */
/* --- 6. Footer Links --- */
/* ------------------------------------------- */
.login-footer {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px dashed var(--color-border);
    font-size: 0.9em;
    color: var(--color-text-subtle);
}

.register-link, .back-home {
    color: var(--color-accent);
    font-weight: 500;
}

.back-home {
    display: block;
    margin-top: 15px;
}

/* ------------------------------------------- */
/* --- RESPONSIVENESS --- */
/* ------------------------------------------- */
@media (max-width: 550px) {
    .login-wrapper {
        padding: 10px;
    }
    .login-card {
        padding: 30px;
    }

    .login-header h1 {
        font-size: 1.6em;
    }
    
    .btn-login {
        font-size: 1em;
        padding: 15px;
    }

    .form-actions-minor {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}