/* --- ESTILOS GENERALES --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e2e; 
    color: #e0e6f8; 
    margin: 0;
    padding-top: 100px; 
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    font-size: 16px;
}

/* --- HEADER MEJORADO --- */
header {
    position: fixed; 
    top: 0; left: 0;
    width: 100%;
    height: 70px;
    background-color: #11111b; 
    border-bottom: 2px solid #89b4fa; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0 5%; 
    z-index: 1000; 
    box-sizing: border-box;
}

/* Estilo para que el enlace de INICIO parezca un botón real */
header a, .btn-header {
    background-color: #313244;
    color: #fff !important;
    border: 1px solid #45475a;
    text-decoration: none !important; /* Quita el subrayado */
    padding: 8px 18px;
    border-radius: 20px; 
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

header a:hover {
    background-color: #89b4fa;
    color: #11111b !important;
}

.logo-texto {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: bold;
    color: #fff;
}

/* --- CAJAS CENTRALES (Index, Panel, Formulario) --- */
.caja-central {
    background-color: #ffffff; 
    padding: 2.5rem; 
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); 
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 90%;
    max-width: 450px;
    margin: auto; 
}

.caja-central h1, 
.caja-central h2, 
legend {
    text-align: center !important;
    align-self: center; 
    display: block;
    width: 100%;
    color: #313244;
    margin-bottom: 1rem;
}

label {
    text-align: left !important;
    align-self: flex-start;
    display: block;
    width: 100%;
    color: #5e616b;
    margin-bottom: 8px;
    font-weight: 500;
}

/* --- BOTONES DEL MENÚ / PANEL (Centrados) --- */
.contenedor-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.btn-menu {
    width: 100%;
    max-width: 320px;
    padding: 18px;
    background-color: #313244;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #45475a;
    transition: 0.3s;
}

/* --- FORMULARIOS --- */
fieldset {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.5rem; 
    margin-bottom: 1.5rem; 
    background-color: rgba(0, 0, 0, 0.02);
    width: 100%;
    box-sizing: border-box;
}

input, select, textarea {
    padding: 12px; 
    width: 100%;   
    border-radius: 6px;
    border: 1px solid #45475a;
    background-color: #313244;
    color: white;
    margin-bottom: 15px; 
    box-sizing: border-box;
    font-size: 1rem;
}

.btn-azul, button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #4a90e2; 
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* --- TABLA DE RESERVAS (lista.html) --- */
.contenedor-lista {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto; 
}

.fila-controles {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    width: 100%;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.filtros-estados {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botón Eliminados - Estilo recuperado */
.btn-filtro, #btnVerBorrados {
    background: #313244;
    color: white;
    border: 1px solid #45475a;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

#btnVerBorrados {
    border-color: #f38ba8;
    color: #f38ba8;
}

.tabla-scroll-container {
    overflow-x: auto;
    border-radius: 12px;
    background-color: #313244;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

table {
    width: 100%; 
    border-collapse: collapse;
    min-width: 1200px; 
}

th { 
    background-color: #45475a; 
    color: #89b4fa; 
    padding: 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

td { 
    padding: 12px 10px; 
    text-align: center; 
    border-bottom: 1px solid #45475a;
    color: #bac2de; 
    font-size: 0.9rem;
}

/* BOTONES DE ACCIÓN (Corregidos con colores y nivelación) */
td:last-child, .celda-acciones {
    white-space: nowrap;
    width: 250px; 
}

/* Estilo real para los botones dentro de la tabla */
td .btn-azul, td .btn-borrar {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: auto !important;
    min-width: 110px;
    padding: 8px 12px !important;
    font-size: 11px !important;
    margin: 0 5px !important; 
    border-radius: 6px;
    vertical-align: middle;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

/* Colores específicos para los botones de la tabla */
td .btn-azul { 
    background-color: #4a90e2 !important; 
    color: white !important; 
}
td .btn-azul:hover { background-color: #357abd !important; }

td .btn-borrar { 
    background-color: #f38ba8 !important; 
    color: #1e1e2e !important; 
}
td .btn-borrar:hover { background-color: #e64553 !important; color: white !important; }

/* --- MODALES --- */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .fila-controles { flex-direction: column; align-items: stretch; }
    #buscador { max-width: 100%; }
}