body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    font-size: 24px;
    background-color: #FFDAB9;
}

.titulo {
    text-align: center;
}

.subtitulo {
    text-align: center;
    color: #555;
    margin-bottom: 20px;
}

/* Botón centrado */
.button-container {
    text-align: center;
    margin: 20px 0;
}

#btn-ver-tabla {
    background-color: #007BFF;
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 18px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

#btn-ver-tabla:hover {
    background-color: #0056b3;
}

/* Mapa central */
.map-section {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#map-container {
    width: 100%;
    max-width: 1000px;
    height: 600px;
}

#map {
    width: 100%;
    height: 100%;
}

/* Leyenda debajo del mapa */
.leyenda {
    text-align: center;
    font-size: 16px;
    color: #333;
    margin: 10px 0 30px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 70%;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-top: 0;
}

.close,
.close-detalle {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
}

.close:hover,
.close-detalle:hover {
    color: black;
}


.tabla-responsive table {
    font-family: sans-serif;
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.tabla-responsive th {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    padding: 8px;
    text-align: left;
}

.tabla-responsive td {
    padding: 6px;
    border-bottom: 1px solid #ddd;
}

.tabla-responsive tr:hover {
    background-color: #f1f1f1;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.5em;
}

/* Contenedor de la tabla con scroll */
.table-wrapper {
    flex: 1;
    overflow: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    max-height: calc(100vh - 150px);
}

/* Tabla principal */
.main-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px; /* Ancho mínimo para evitar que se compriman demasiado */
}

.main-table thead {
    background-color: #34495e;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.main-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #2c3e50;
    white-space: nowrap;
}

.main-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
    white-space: nowrap;
}

.main-table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.main-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Anchos específicos para columnas */
.fecha-col {
    width: 200px; /* Más ancho para la fecha */
}

.accion-col {
    width: 120px; /* Más angosto para el botón */
    text-align: center;
}

/* Botones */
.btn-ver {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    width: 100px; /* Ancho fijo para el botón */
}

.btn-ver:hover {
    background-color: #2980b9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-content h2 {
    background-color: #34495e;
    color: white;
    padding: 20px;
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #f1c40f;
}

/* Tabla de detalles en modal */
.modal-table-container {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table thead {
    background-color: #ecf0f1;
    position: sticky;
    top: 0;
}

.detail-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #bdc3c7;
}

.detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
}

.detail-table tr:hover {
    background-color: #f8f9fa;
}

.detail-table tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        height: 100vh;
    }
    
    h1 {
        font-size: 2em;
        margin-bottom: 15px;
    }
    
    .table-wrapper {
        max-height: calc(100vh - 120px);
    }
    
    .main-table thead th,
    .main-table tbody td {
        padding: 8px 6px;
        font-size: 14px;
    }
    
    .fecha-col {
        width: 150px;
    }
    
    .accion-col {
        width: 100px;
    }
    
    .btn-ver {
        padding: 6px 8px;
        font-size: 12px;
        width: 80px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Scrollbar personalizado */
.table-wrapper::-webkit-scrollbar,
.modal-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track,
.modal-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-wrapper::-webkit-scrollbar-thumb,
.modal-table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover,
.modal-table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}