:root {
    --fondo-oasis: #e3f2fd;
    --azul-titulo: #1976d2;
    --azul-filtro: #bbdefb;
    --azul-boton: #2196f3;
    --azul-hover: #1565c0;
    --borde-suave: #e1f5fe;
}

/* --- 1. ESTILOS BASE (MÓVIL - Mobile First) --- */
.main-header {
    background-color: var(--azul-filtro);
    border-bottom: 1px solid #90caf9;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: sticky;
    top: 0;
    z-index: 1030 !important; /* Ajustado para que los modales ganen la prioridad */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-img {
    height: 50px;
    transition: 0.3s;
}

.header-nav .nav-link {
    color: var(--azul-titulo) !important; 
    font-weight: 700;
    padding: 12px 0 !important;
    text-align: center;
    transition: 0.2s ease-in-out; 
}

.header-nav .nav-link:hover {
    color: var(--azul-hover) !important;
}

/* ESTILO ESPECÍFICO BOTÓN GESTIÓN PARA CENTROS */
.btn-gestion-centro {
    border: 2px solid var(--azul-boton) !important;
    color: var(--azul-boton) !important;
    transition: all 0.3s ease;
}

.btn-gestion-centro:hover, .btn-gestion-centro:focus {
    background-color: var(--azul-boton) !important;
    color: white !important;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.4);
}

/* dropdown menu superior */
.dropdown-menu {
    z-index: 3000 !important;
}

/* --- BOTÓN INICIAR SESIÓN (Borde Redondeado y sin saltos) --- */
.btn-login-link {
    color: var(--azul-titulo) !important;
    font-weight: 700;
    font-size: 0.95rem;
    background: transparent;
    cursor: pointer;
    text-decoration: underline !important;
    border-radius: 30px; 
    transition: all 0.2s ease;
    outline: none;
    display: inline-block;
    border: 2px solid rgba(0, 0, 0, 0) !important; 
    padding: 6px 20px;
}

.btn-login-link:hover {
    color: var(--azul-hover) !important;
    border-color: var(--azul-hover) !important; 
    text-decoration: none !important;
    background-color: transparent !important;
}

.auth-section {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #64b5f6; 
    transition: 0.3s ease;
}

.avatar-img:hover {
    transform: scale(1.1) rotate(5deg);
}

.user-label {
    color: var(--azul-titulo);
    font-weight: bold;
    font-size: 0.95rem;
}

.logout-icon {
    width: 28px;
    height: auto;
    transition: 0.3s;
}

.logout-icon:hover {
    transform: scale(1.1);
}

.btn-register-custom {
    background: linear-gradient(135deg, var(--azul-boton), #42a5f5);
    color: white !important;
    padding: 10px 22px;
    border-radius: 50px; 
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

.btn-register-custom:hover {
    background: linear-gradient(135deg, var(--azul-titulo), #1e88e5);
    transform: translateY(-2px);
}

/* --- MODAL LOGIN CORREGIDO --- */
.modal-oasis-animal {
    z-index: 2050 !important; /* Asegura posicionamiento absoluto superior */
}

.modal-oasis-animal .modal-content {
    border-radius: 15px;
    border-top: 6px solid var(--azul-boton); 
}

.modal-oasis-animal .login-logo {
    width: 130px; 
    margin-bottom: 5px;
}

.modal-oasis-animal h2 {
    color: var(--azul-titulo);
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.modal-oasis-animal label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.modal-oasis-animal .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px;
    width: 100%;
}

.modal-oasis-animal .form-control:focus {
    border-color: var(--azul-boton);
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
    outline: none;
}

.modal-oasis-animal .btn-block {
    background-color: var(--azul-boton);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    width: 100%;
    transition: 0.3s;
}

.modal-oasis-animal .btn-block:hover {
    background-color: var(--azul-hover);
}

.login-footer a {
    color: var(--azul-boton);
    font-weight: 600;
    transition: 0.3s;
}

.login-footer a:hover {
    color: var(--azul-hover);
    text-decoration: underline !important;
}

/* --- 2. TABLET (Desde 768px hasta 991px) --- */
@media (min-width: 768px) {
    .logo-img {
        height: 65px;
    }

    .header-nav {
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .auth-section {
        flex-direction: row;
        padding: 10px 0;
        gap: 15px;
    }

    .user-profile {
        flex-direction: row;
    }
}

/* --- 3. ORDENADOR (Desde 992px en adelante) --- */
@media (min-width: 992px) {
    .logo-img {
        height: 85px;
    }

    .header-nav .nav-link {
        padding: 0 15px !important;
    }

    .auth-section {
        flex-direction: row;
        padding-bottom: 0;
        gap: 20px;
    }

    .navbar-collapse {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
}