:root {
    --primary-color: #dddddd; /* Color gris neutro por defecto */
    --primary-color-hover: #bbbbbb; /* Tono más oscuro para hover */
    --background-color: #222222; /* Nuevo color oscuro por defecto */
    --background-dynamic: #222222; /* Fondo dinámico inicial, ahora oscuro */
    --text-color: #333;
    --label-color: #555;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --transition-speed: 1s; /* Aumentamos la velocidad para una transición más suave del gradiente */
}

body {
    font: 14px sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--background-dynamic);
    margin: 0;
    transition: background var(--transition-speed) ease;
}

.wrapper {
    width: 360px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary-color);
    transition: border-top-color 0.5s ease;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: var(--label-color);
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color var(--transition-speed) ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.invalid-feedback {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 5px;
}

.btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color var(--transition-speed) ease;
}

.btn:hover {
    background-color: var(--primary-color-hover);
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === Logo Styles === */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

#company-logo {
    max-width: 150px;
    height: auto;
    transition: opacity 0.5s ease;
}

/* === Login Fields Visibility === */
#login-fields {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevents interaction when hidden */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#login-fields.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}