.tab-headers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
    background-color: #243447;
    border-bottom: none;
}


/* ========================= ESTILOS GENERALES DEL SISTEMA ========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ecf0f1;
    color: #2c3e50;
}


/* Forzar estilo de las pestañas como botones */
.tab-headers a.tab-header,
.tab-headers a.tab-header:link,
.tab-headers a.tab-header:visited {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 13px;
    text-decoration: none !important;
    color: #ecf0f1 !important;
    background-color: transparent;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tab-headers a.tab-header:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-headers a.tab-header.active {
    background-color: #f5f6fa;
    color: #243447 !important;
    border-color: transparent;
}


/* Contenedor principal del panel */
.container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 20px 25px 30px 25px;
}

/* Encabezado superior */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dfe4ea;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-welcome {
    font-size: 14px;
    color: #7f8c8d;
}

/* Tabs principales */
.tabs {
    margin-top: 10px;
}

.tab-content {
    padding-top: 10px;
}

/* Login */
.form-container {
    max-width: 360px;
    margin: 60px auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    padding: 25px 25px 30px 25px;
}

.form-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    text-align: center;
    color: #2c3e50;
}

/* Formulario genérico */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #2c3e50;
}

.form-input,
select,
textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 13px;
    background: #ffffff;
}

.form-input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-input:disabled {
    background-color: #ecf0f1;
    color: #7f8c8d;
}

/* Botones */
.btn {
    border-radius: 4px;
    border: none;
    cursor: pointer;
    padding: 8px 14px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    font-weight: 500;
}

.btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.btn-primary,
.btn-secondary {
    background-color: #3498db;
    color: #ffffff;
}

.btn-primary:hover,
.btn-secondary:hover {
    background-color: #2980b9;
}

/* Otros botones */
.btn-success {
    background-color: #27ae60;
    color: #ffffff;
}

.btn-danger {
    background-color: #e74c3c;
    color: #ffffff;
}

/* Botón pequeño universal */
.btn-small {
    padding: 5px 9px;
    font-size: 12px;
    border-radius: 3px;
}

/* Alertas */
.alert-error,
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Tablas */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 10px;
    border: 1px solid #dfe4ea;
}

.table thead {
    background-color: #34495e;
    color: #ffffff;
}

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

/* Utilidades */
.small { font-size: 12px; color: #7f8c8d; }

/* ========================= ESTILO DE EVIDENCIAS HORIZONTAL ========================= */

.evidencias-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    margin-top: 8px;
}

.evidencia-item {
    flex: 0 0 auto;
    width: 200px;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    background: #fff;
}

.evidencia-item img {
    max-width: 100%;
    max-height: 170px;
    object-fit: cover;
    border-radius: 4px;
}

/* ========================= FIN ESTILO EVIDENCIAS ========================= */


/* ========================= CATÁLOGOS Y SEGURIDAD (MEJORADOS) ========================= */

.catalogos-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 10px;
}

/* Versión 2 columnas solo para monitores */
@media (min-width: 992px) {
    .catalogos-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tarjetas */
.catalogo-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid #dfe4ea;
}

/* Header dentro de cada tarjeta */
.catalogo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.catalogo-card-header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.catalogo-count {
    font-size: 12px;
    color: #7f8c8d;
    background-color: #ecf0f1;
    padding: 3px 8px;
    border-radius: 12px;
}

/* Tablas con scroll */
.catalogo-table-wrapper {
    margin-top: 8px;
    max-height: 380px;
    overflow: auto;
    border-radius: 4px;
    border: 1px solid #dfe4ea;
}

.catalogo-table-wrapper .table {
    margin: 0;
}

/* Mensajes */
.form-message {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Fila de botones */
.form-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* Dos columnas para formularios específicos */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-row .form-group {
    flex: 1 1 160px;
}

h2 + p {
    margin-top: 4px;
    font-size: 13px;
    color: #7f8c8d;
}

/* ========================= MODALES GENERALES ========================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 16px 18px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.modal-close {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}

.modal-body {
    overflow-y: auto;
    margin-top: 6px;
}
.portada {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.titulo-portada {
    font-size: 32pt;
    font-weight: bold;
    color: #0047AB; /* azul profesional */
    text-align: center;
    text-transform: uppercase;
}
/* ===========================================
   BADGES DE ESTADO (USO GLOBAL EN EL PROYECTO)
   =========================================== */

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* Estados generales del sistema */
.status-pendiente {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.status-autorizado {
    background: #cce5ff;
    color: #004085;
    border-color: #b8daff;
}


.status-levantamiento {
    background: #e8daff;
    color: #3d1a78;
    border-color: #d6c8ff;
}

.status-enproceso {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.status-completado {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Puedes usar esto si agregas más estados */
.status-cancelado {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-default {
    background: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

/* --- FIX banda azul de pestañas --- */
.tab-headers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
    background-color: #243447 !important; /* banda azul oscura */
    border-bottom: none;
}

