:root {
    --calcha-celeste: #FF6600; /* Naranja RDM */
    --calcha-navy: #0A0A0A;    /* Negro RDM */
    --calcha-bg: #f3f4f6;
}

body {
    /* Fondo corporativo usando el Negro de la marca y un gris súper oscuro para el gradiente */
    background: linear-gradient(135deg, var(--calcha-navy) 0%, #1a1a1a 100%); 
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', system-ui, sans-serif;
    margin: 0;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6); /* Sombra un poco más intensa para contraste con fondo negro */
    padding: 2rem 2.5rem;
    position: relative;
}

.brand-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}
.brand-logo img {
    height: 150px; /* Logo horizontal de Calcha/RDM */
    margin-bottom: 10px;
}
.brand-logo p {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* --- ESTILOS MODERNOS PARA INPUTS --- */
.form-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden; 
}

.input-group:focus-within {
    border-color: var(--calcha-celeste);
    /* Sombra de foco adaptada al Naranja en RGBA */
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15);
}

.input-group-text {
    background-color: transparent;
    border: none;
    color: #94a3b8;
    padding-left: 1rem;
}

/* Estilos inyectados al widget nativo */
#auth_user_login input[type="text"],
#auth_user_login input[type="password"] {
    border: none;
    background: transparent;
    padding: 0.8rem 1rem;
    width: 100%;
    color: #1e293b; /* Texto oscuro para que se lea bien en el input blanco */
    font-weight: 500;
}
#auth_user_login input[type="text"]:focus,
#auth_user_login input[type="password"]:focus {
    outline: none;
    box-shadow: none;
}

/* REGISTROS */

.register-card {
    width: 100%;
    max-width: 550px; 
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    padding: 2rem 2.5rem;
    margin: 2rem;
    position: relative;
}

#auth_user_register input[type="text"],
#auth_user_register input[type="password"],
#auth_user_register input[type="email"],
#auth_user_register select {
    border: none;
    background: transparent;
    width: 100%;
    color: #1e293b;
    font-weight: 500;
}

#auth_user_register input:focus,
#auth_user_register select:focus {
    outline: none;
    box-shadow: none;
}

/* Estilos para el Select Moderno con Logos */
.dropdown-toggle-custom {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}
.dropdown-toggle-custom:focus, .dropdown-toggle-custom[aria-expanded="true"] {
    border-color: var(--calcha-celeste);
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15);
    outline: none;
}
.custom-select-agencia .dropdown-item {
    transition: background-color 0.2s;
}
.custom-select-agencia .dropdown-item:hover {
    background-color: #fff4ed; /* Un fondo muy sutilmente anaranjado al pasar el mouse */
}
.custom-select-agencia .dropdown-item:last-child {
    border-bottom: none !important;
}

/* Select de Agencia */
#auth_user_register select { cursor: pointer; }

/* Checkbox */
.form-check-input {
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--calcha-celeste);
    border-color: var(--calcha-celeste);
}

/* Botón de Submit */
.btn-primary {
    background-color: var(--calcha-celeste) !important;
    border-color: var(--calcha-celeste) !important;
    color: white;
    font-weight: 700;
    padding: 0.85rem;
    border-radius: 10px;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}
.btn-primary:hover {
    background-color: #e65c00 !important; /* Naranja oscurecido para el hover */
    border-color: #e65c00 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.3);
}

/* Links inferiores */
.auth_links {
    text-align: center;
    margin-top: 2rem;
}
.auth_links a { 
    color: #64748b; 
    text-decoration: none; 
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}
.auth_links a:hover { 
    color: var(--calcha-celeste); 
}

/* Ocultar elementos sobrantes */
.w2p_flash { display: none !important; }
#auth_user_login tr td:first-child { display: none; } 
#auth_user_register tr td:first-child { display: none; }