/* 
 * Estilos para la pantalla de autenticación
 * Diseño mejorado para una experiencia de usuario exquisita
 */

:root {
    --primary-yellow: #d4af37;     /* Color amarillo principal de la web */
    --primary-yellow-hover: #c19b00; /* Versión más oscura para hover */
    --input-bg: #0f1a2e;           /* Fondo de los campos de entrada */
    --input-border: #2a3a5f;       /* Borde de los campos de entrada */
    --text-secondary: #8f9bb3;     /* Texto secundario */
    --card-bg: #16213e;            /* Fondo de la tarjeta de login */
    --card-border: #2a3a5f;        /* Borde de la tarjeta */
    --body-bg: #0a0f1f;            /* Fondo de la página */
}

/* Contenedor principal */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 20px;
    background-color: var(--body-bg);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(21, 16, 62, 0.8) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(84, 13, 110, 0.6) 0%, transparent 25%);
    overflow-y: auto;
    z-index: 9999;
}

/* Tarjeta de login */
.auth-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Mejora el rendimiento en algunos navegadores */
}

/* Efecto sutil de borde superior */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-yellow), #e94560);
}

/* Logo */
.auth-logo {
    width: 160px; /* Aumentado de 80px a 100px */
    height: auto;
    margin: 0 auto 1.2rem; /* Ajustado el margen inferior */
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

/* Título */
.auth-title {
    color: #fff;
    margin: 0 0 1.5rem 0; /* Reducido el margen inferior */
    font-size: 1rem; /* Reducido de 1.6rem */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    display: inline-block;
    padding-bottom: 0.4rem;
}

.auth-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-yellow), transparent);
}

/* Grupos de formulario */
.auth-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Etiquetas */
.auth-form .form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Campos de entrada */
.auth-form .form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 3rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

.auth-form .form-control:focus {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    background-color: var(--input-bg);
}

/* Grupo de input con icono */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.input-group-text {
    background-color: transparent;
    border: none;
    color: var(--primary-yellow);
    position: absolute;
    left: 1rem;
    z-index: 5;
    padding: 0;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

/* Asegurar que el input tenga el padding correcto */
/* Asegurar que el input tenga el padding correcto */
.input-group .form-control {
    padding-left: 3rem;
    padding-right: 3rem; /* Aumentado para dar más espacio al botón */
    position: relative;
    z-index: 1;
}

/* Estilos para el botón de mostrar/ocultar contraseña */
/* Sobrescribir estilos de Bootstrap para el botón dentro de input-group */
.input-group .toggle-password {
    position: absolute !important; /* Forzar posición absoluta */
    right: 0.75rem;
    top: 50% !important; /* Forzar posición vertical */
    transform: translateY(-50%) !important; /* Centrar verticalmente */
    margin: 0 !important; /* Eliminar márgenes */
    z-index: 5;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    opacity: 0.8;
}

.toggle-password:hover {
    color: var(--primary-yellow);
    background-color: rgba(212, 175, 55, 0.15);
    opacity: 1;
    transform: translateY(-50%) scale(1.05); /* Mantener centrado al escalar */
}

.toggle-password:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

/* Estilo para cuando el input tiene foco */
.form-control:focus + .input-group-text,
.form-control:focus ~ .toggle-password {
    color: var(--primary-yellow);
}

/* Asegurar que el ícono del ojo se vea bien */
.toggle-password i {
    font-size: 1rem;
}

/* Botón de login */
.btn-login {
    width: 100%;
    max-width: 320px;
    padding: 0.85rem;
    background: var(--primary-yellow);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 2rem auto 0;
    display: block;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-login:hover {
    background: var(--primary-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* Pie de página */
.auth-footer {
    margin-top: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
}

.auth-footer a {
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Enlace de olvidó contraseña */
#forgot-password {
    color: var(--primary-yellow);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

#forgot-password:hover {
    color: #fff;
    text-decoration: underline;
}

/* Toggle de visibilidad de contraseña */
.toggle-password {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-left: none;
    color: var(--text-secondary);
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    padding: 0 0.75rem;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-yellow);
    background: rgba(212, 175, 55, 0.1);
}

/* Ajustes responsivos */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 1rem 0;
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.4rem;
    }
    
    .auth-form .form-control,
    .btn-login {
        max-width: 100%;
    }
}

.auth-footer a {
    color: #e94560;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #ff6b8b;
    text-decoration: underline;
}

/* Mensajes de error */
.auth-message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

.auth-message.error {
    background-color: #2e0b0b;
    color: #ff6b6b;
    border-left: 4px solid #e94560;
    display: block;
}

/* Estilos para pantallas pequeñas */
@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}
