/* Estilos generales del cuerpo y contenedor */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 95%; /* Un poco más ancho para acomodar filtros y menú */
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Estilos para el formulario de autenticación */
.auth-container {
    width: 400px;
    margin: 100px auto;
    background-color: #fff;
    padding: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

h1 {
        font-weight: bold;
    }
/* Estilos para títulos */
h1, h2 {
    color: #0056b3;
    text-align: center; /* Centrar títulos por defecto */
    margin-bottom: 20px;
}

/* Estilos para grupos de formulario (labels e inputs) */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: calc(100% - 20px); /* Ajusta el padding */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Incluir padding y border en el ancho total */
}



/* Estilos para botones generales */
button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* Estilos para mensajes de alerta/información */
.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Panel contenedor */
.filters-panel {
    background: #ffffff;
    padding: 25px;
    margin: 25px auto;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    max-width: 900px;
}

/* Títulos */
.filters-panel h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #333;
}

/* Filtros en grid */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    color: #555;
}

.filter-group select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

/* Acciones filtros */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Botones generales */
button, .btn-secondary, .btn-success {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Colores */
.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: #ddd;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-upload {
    background: #17a2b8;
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-upload:hover {
    background: #117a8b;
}

/* Upload card */
.upload-card {
    margin-top: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

.upload-card .form-group {
    margin-bottom: 15px;
    text-align: left;
}

/* Botón */
.btn-upload {
    width: 100%;
    padding: 12px;
    background: #007bff;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-upload:hover {
    background: #0056b3;
}


/* Tabla */
.table-container { overflow-x: auto; background: white; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1200px;
}

th, td {
  border: 1px solid #e0e0e0;
  padding: 6px 8px;
  text-align: center;
  font-size: 13px;
}

th {
  background-color: #47928f;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 2;
}


/* Estilos para el enlace de cerrar sesión */
.logout-link {
    display: block;
    margin-top: 20px;
    text-align: right;
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.logout-link:hover {
    text-decoration: underline;
    color: #c82333;
}


/* --- Estilos para el Menú de Navegación (Nuevo) --- */
.main-nav {
    background-color: #333;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex; /* Para alinear los elementos horizontalmente */
    justify-content: center; /* Centrar los elementos del menú */
}

.main-nav li {
    /* float: left; (ya no es estrictamente necesario con flexbox en ul) */
}

.main-nav li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.main-nav li a:hover {
    background-color: #555;
}

/* Estilo para el enlace de la página activa */
.main-nav li a.active {
    background-color: #007bff; /* Color para la sección actual */
    color: white;
    font-weight: bold;
}


/* --- Estilos para el Formulario de Filtrado --- */
.filter-form {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos se envuelvan a la siguiente línea */
    gap: 15px; /* Espacio entre los elementos del formulario */
    align-items: flex-end; /* Alinea los botones y selectores */
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.filter-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
    white-space: nowrap; /* Evita que el texto de la etiqueta se rompa */
}
.filter-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px; /* Ancho mínimo para los desplegables */
    background-color: white; /* Asegura un fondo blanco */
    box-sizing: border-box;
}
.filter-form button {
    padding: 8px 15px;
    /* Colores ya definidos en el estilo general de button */
}
.filter-form a.button { /* Estilo para el botón "Limpiar Filtros" */
    background-color:#dc3545; /* Rojo para limpiar */
    color:white;
    padding:8px 15px;
    border-radius:4px;
    text-decoration:none;
    align-self: flex-end; /* Alinea el botón con la parte inferior de los selects */
    transition: background-color 0.3s ease;
}
.filter-form a.button:hover {
    background-color: #c82333;
}


/* --- Estilos para mostrar filtros activos --- */
.active-filters {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9em;
}
.active-filters p {
    margin: 0;
    padding: 0;
    color: #21597d;
    font-weight: bold;
    margin-bottom: 5px;
}
.active-filters span {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 5px; /* Pequeño margen inferior para separar los tags */
    padding: 3px 8px;
    background-color: #cce7ff;
    border-radius: 3px;
    font-weight: bold;
    color: #004085;
    border: 1px solid #a3d9ff;
}

/* --- Estilos para la Paginación --- */
.pagination-info {
    text-align: right;
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
}

.pagination {
    margin-top: 20px;
    text-align: center;
    padding-bottom: 20px; /* Espacio al final de la paginación */
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
    background-color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.pagination a:hover {
    background-color: #e9ecef;
    border-color: #b3d7ff;
}
.pagination span.current-page {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
    cursor: default; /* No permitir click en la página actual */
}
.pagination span.disabled {
    color: #6c757d;
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #e9ecef;
}