
/* Estilos de fondo y cuerpo */
body {
    background-color: #212529 !important; /* Fondo principal oscuro */
    min-height: 100vh;
    position: relative;
    padding-bottom: 50px; 
    color: #f8f9fa; /* Color de texto base claro */
    font-family: 'Segoe UI', sans-serif; 
    overflow-x: hidden; /* Evita scroll horizontal */
    width: 100%;
}

/* Contenedor principal de la aplicación */
.main-app-container {
    position: relative;
    z-index: 1; 
    padding-top: 100px !important; /* Espacio extra para asegurar que nada tape la navbar */
    padding-bottom: 20px;
    min-height: calc(100vh - 50px); 
}

/* Imagen de león de fondo */
.bg-lion-bottom-right {
    position: fixed;
    top: 60%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 38vw;
    max-width: 480px;
    opacity: 0.10;
    z-index: -1;
    pointer-events: none;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar (Personalizado) */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-thumb {
    background-color: #FFC107; /* Amarillo SIMBA */
    border-radius: 10px;
}
::-webkit-scrollbar-track {
    background-color: #2a2a2a;
}
/* --- Toast moderno --- */
.toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #343a40;
    color: #ffc107;
    padding: 12px 20px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; }

/* ESTILO GLOBAL: Glassmorphism para todas las Cards */
.card, .card-modern {
    background: rgba(0, 0, 0, 0.25) !important; 
    backdrop-filter: blur(10px) !important; 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px; 
    animation: fadeInUp 0.6s ease;
    transition: all 0.3s ease;
    padding: 25px;
}

.card:hover, .card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* Inputs, Selects y Textarea Globales (Dark Theme) */
.card-modern .form-control,
.card-modern .form-select,
.card-modern textarea,
.form-control, .form-select {
    background-color: #2a2a2a !important;
    color: #f8f9fa !important;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 10px 15px;
}

.card-modern .form-control:focus,
.card-modern .form-select:focus,
.card-modern textarea:focus,
.form-control:focus, .form-select:focus {
    border-color: #FFC107 !important; 
    box-shadow: 0 0 6px rgba(255,193,7,0.6);
    outline: none;
}

/* Placeholder claro */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Labels */
label { font-weight: 500; color: #ffc107; }

/* Botones modernos */
.btn-modern, button {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-modern:hover, button:hover {
    transform: translateY(-2px);
}

/* Botón warning custom */
.btn-warning, .btn-warning-custom {
    background-color: #FFC107 !important;
    color: #000 !important;
    border: none;
    font-weight: bold;
}
.btn-warning:hover, .btn-warning-custom:hover {
    background-color: #e0a800 !important;
}

/* Botón danger */
.btn-danger {
    background-color: #dc3545 !important;
    border: none;
    color: #fff !important;
    font-weight: 600;
}
.btn-danger:hover {
    background-color: #e04d5d !important;
    transform: translateY(-2px);
}

/* Títulos */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}
.section-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffc107;
}
.section-header p { color: #aaa; }

h2.text-warning {
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 193, 7, 0.4);
}

/* =======================================================
   🎨 ESTILOS GLOBAL SIMBA - NAVEGACIÓN Y MODALES
   ======================================================= */

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s ease-in-out;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link:hover i,
.navbar-dark .navbar-nav .nav-link:focus i,
.navbar-dark .navbar-nav .btn-link.nav-link:hover,
.navbar-dark .navbar-nav .btn-link.nav-link:focus,
.navbar-dark .navbar-nav .btn-link.nav-link:hover i,
.navbar-dark .navbar-nav .btn-link.nav-link:focus i {
    color: #FFC107 !important;
}

.logo-simba-nav { height: 35px; opacity: 0.7; }

/* Modales */
.modal-content {
    background-color: #1E1E1E !important;
    color: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #FFC107;
}
.modal-header { border-bottom: 1px solid rgba(255, 193, 7, 0.4); }
.modal-title { font-weight: bold; }
.modal-body label { color: #FFC107; font-weight: 500; }
.modal.fade .modal-dialog { transform: scale(0.95); transition: all 0.3s ease; }
.modal.show .modal-dialog { transform: scale(1); }

/* =======================================================
   🎨 ESTILOS PREMIUM SIMBA - NAVBAR & DROPDOWNS
   ======================================================= */

/* Navbar Principal */
.navbar {
    background: #1a1a1a !important;
    border-bottom: 2px solid #FFC107 !important;
    z-index: 10000 !important;
    padding: 0.4rem 0 !important;
    min-height: 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    pointer-events: auto !important;
}

/* Forzar que el dropdown esté por encima de todo */
.dropdown-menu {
    z-index: 10001 !important;
    background: rgba(30, 30, 30, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    border-radius: 12px !important;
    margin-top: 10px !important;
    padding: 0.6rem !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8) !important;
    min-width: 220px !important;
    pointer-events: auto !important;
    display: none;
}

.dropdown-menu.show {
    display: block !important;
}

/* Modales y backdrops - Ajustar para no bloquear la navbar */
.modal-backdrop {
    z-index: 9000 !important;
}
.modal {
    z-index: 9001 !important;
}

.navbar-brand span {
    color: #FFC107 !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    font-size: 1.3rem;
}

/* Saludo Usuario */
.user-greeting {
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 500 !important;
    opacity: 0.9;
}

/* Enlaces del Navbar - Estilo Botón */
.navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.5rem 1.2rem !important;
    margin: 0 0.2rem !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Estilo Dropdown Toggler */
.nav-item.dropdown .nav-link {
    background: rgba(255, 193, 7, 0.05) !important;
    border: 1px solid rgba(255, 193, 7, 0.1) !important;
}

/* Hover & Active State - Gradiente Dorado */
.nav-item.dropdown .nav-link:hover,
.nav-item.dropdown.show .nav-link {
    background: linear-gradient(135deg, #FFC107 0%, #FFB300 100%) !important;
    color: #000000 !important;
    border-color: #FFC107 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.nav-item.dropdown .nav-link:hover i,
.nav-item.dropdown.show .nav-link i {
    color: #000000 !important;
}

/* Forzar que el dropdown esté por encima de todo */
.dropdown-menu {
    z-index: 999999 !important;
    background: rgba(30, 30, 30, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    border-radius: 12px !important;
    margin-top: 10px !important;
    padding: 0.6rem !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8) !important;
    min-width: 220px !important;
    pointer-events: auto !important;
    display: none;
}

.dropdown-menu.show {
    display: block !important;
}

/* Evitar que el backdrop de Bootstrap bloquee la navbar */
.modal-backdrop {
    z-index: 9999 !important;
}
.modal {
    z-index: 10000 !important;
}

/* Animación SlideIn */
.animate {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

@keyframes slideIn {
    0% {
        transform: translateY(1rem);
        opacity: 0;
    }
    100% {
        transform: translateY(0rem);
        opacity: 1;
    }
}

.slideIn {
    animation-name: slideIn;
}

/* Items del Dropdown */
.dropdown-item {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.7rem 1rem !important;
    border-radius: 8px !important;
    font-size: 0.88rem;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    margin-bottom: 2px;
}

.dropdown-item:hover {
    background: rgba(255, 193, 7, 0.15) !important;
    color: #FFC107 !important;
    transform: translateX(5px);
}

.dropdown-item i {
    color: #FFC107;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.dropdown-item:hover i {
    transform: scale(1.2);
}

/* Botón Logout - Rojo Gradient */
.btn-logout-nav {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 8px !important;
    font-size: 0.9rem;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-logout-nav:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        background: #1a1a1a;
        margin: 0 -1.5rem;
        padding: 1.5rem;
        border-top: 1px solid rgba(255, 193, 7, 0.2);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-nav .nav-item {
        margin: 0.3rem 0;
    }
    
    .dropdown-menu {
        background: rgba(255, 255, 255, 0.03) !important;
        border: none !important;
        box-shadow: none !important;
        padding-left: 1rem !important;
        margin-top: 0 !important;
    }
    
    .dropdown-item:hover {
        transform: none;
    }
}

/* =======================================================
   🎨 ESTILOS ESPECÍFICOS - LOGIN Y CUADROS PRIVADOS
   ======================================================= */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.login-logo { max-height: 120px; }

#cuadropr {
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 500px;
    height: auto;
    padding: 40px 30px;
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(8px);
    color: #CCCCCC;
    border: 1px solid rgb(185, 139, 0);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

#cuadropr:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

#simbalet { width: 40%; height: auto; margin-bottom: 20px; }

@media (min-width: 1024px) {
    #cuadropr { width: 40vw; }
    #simbalet { width: 30%; }
}

/* =======================================================
   🎨 ESTILOS VISTAS UNIFICADOS - FORMULARIOS, CARDS Y TABLAS
   ======================================================= */

/* Card centrado y responsive */
.card-centered {
    width: 95%;
    max-width: 1200px;  
    margin: 0 auto;    
}
@media (min-width: 1200px) {
    .card-centered { max-width: 1100px; }
}

/* Tablas dark */
.table-dark thead th { color: #ffc107; }
.table-dark-custom { background: #161819 !important; color: #e8e8e8 !important; }

/* Acciones en tablas */
.table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
}

/* =======================================================
   🎨 ESTILOS VISTAS MASCOTAS (vreg, vrep, vper, vmas, vser, vres, vevi)
   ======================================================= */

/* Responsive cards y grids para formularios y listados */
.vista-mascotas .row.g-3 > div {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}
@media (max-width: 992px) {
    .vista-mascotas .row.g-3 > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
@media (max-width: 768px) {
    .vista-mascotas .row.g-3 > div {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Selects oscuros específicos de vmas.php */
.vista-mascotas .form-select {
    background-color: #343a40 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}
.vista-mascotas .form-select:focus {
    background-color: #2c3034 !important;
    color: #fff !important;
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25) !important;
}
.vista-mascotas .form-select option {
    background-color: #343a40;
    color: #fff;
}

/* Tabla de listados de mascotas y reservas */
.vista-mascotas .listado-mascotas,
.vista-mascotas .listado-mascotas .card,
.vista-mascotas .listado-mascotas .card-body,
.vista-mascotas .listado-mascotas .table {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.vista-mascotas .listado-mascotas {
    background-color: #212529 !important;
    border-radius: 15px;
    padding: 2rem;
}

.vista-mascotas .listado-mascotas .table td,
.vista-mascotas .listado-mascotas .table th {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.vista-mascotas .listado-mascotas .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.vista-mascotas .listado-mascotas .table-hover tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.vista-mascotas .listado-mascotas .btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}

/* Tipografía y color de textos en vistas */
.vista-mascotas .display-5, 
.vista-mascotas h1, .vista-mascotas h2, .vista-mascotas h3, .vista-mascotas h4, .vista-mascotas h5, .vista-mascotas h6,
.vista-mascotas .card .form-label,
.vista-mascotas .card small, .vista-mascotas .card p,
.vista-mascotas .listado-mascotas .table thead th,
.vista-mascotas .listado-mascotas .btn-outline-warning,
.vista-mascotas .listado-mascotas i {
    color: #ffc107 !important;
    font-weight: bold;
}
/* =======================================================
   🎨 Section Header Global
   ======================================================= */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffc107; /* Amarillo SIMBA */
}

.section-header p {
    color: #aaa;
}
