/* ==== Módulo Interrapidisimo ==== */

.sge-ir-hint {
    color: #6b7280;
    font-size: 13px;
    margin: 6px 0 16px;
}

.sge-ir-dashboard-periodos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.sge-ir-periodo-btn {
    border: 1px solid #d1d5db;
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.sge-ir-periodo-btn.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.sge-ir-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.sge-ir-kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.sge-ir-kpi-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.sge-ir-kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.sge-ir-kpi-por-asignar .sge-ir-kpi-value { color: #92400e; }
.sge-ir-kpi-asignado .sge-ir-kpi-value { color: #1e40af; }
.sge-ir-kpi-entregado .sge-ir-kpi-value { color: #166534; }
.sge-ir-kpi-devolucion .sge-ir-kpi-value { color: #991b1b; }
.sge-ir-kpi-efectividad .sge-ir-kpi-value { color: #6d28d9; }

.sge-ir-section-title {
    margin: 28px 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.sge-ir-kpi-grid-financiero .sge-ir-kpi-card {
    border-width: 1px;
}

.sge-ir-kpi-dinero-entregado .sge-ir-kpi-value { color: #b45309; }
.sge-ir-kpi-valor-servicios .sge-ir-kpi-value { color: #1e40af; }
.sge-ir-kpi-pagado-mensajero .sge-ir-kpi-value { color: #991b1b; }

.sge-ir-kpi-positivo {
    border-color: #86efac;
    background: #f0fdf4;
}
.sge-ir-kpi-positivo .sge-ir-kpi-value { color: #166534; }

.sge-ir-kpi-negativo {
    border-color: #fca5a5;
    background: #fef2f2;
}
.sge-ir-kpi-negativo .sge-ir-kpi-value { color: #991b1b; }

.sge-ir-chart-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
}

.sge-ir-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin: 16px 0 20px;
}

.sge-ir-tab {
    border: none;
    background: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.sge-ir-tab.active {
    color: #111827;
    border-bottom-color: #111827;
}

.sge-ir-cuadre-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.sge-ir-cuadre-aplicar-todos {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sge-ir-cuadre-aplicar-todos input {
    width: 140px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.sge-ir-valor-reconocido {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.sge-ir-editar-monto,
.sge-ir-editar-reconocido {
    width: 110px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.sge-ir-cuadre-totales {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
    margin: 12px 0;
    font-size: 14px;
}

.sge-ir-acordeon-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.sge-ir-acordeon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 14px;
    flex-wrap: wrap;
}

.sge-ir-acordeon-item.open .sge-ir-acordeon-caret {
    transform: rotate(180deg);
}

.sge-ir-acordeon-caret {
    transition: transform 0.15s ease;
}

.sge-ir-acordeon-body {
    padding: 16px 18px;
    border-top: 1px solid #e5e7eb;
}

.sge-ir-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.sge-ir-row {
    cursor: pointer;
}

.sge-ir-detalle-modal-content {
    max-width: 640px;
}

.sge-ir-detalle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sge-ir-detalle-header h2 {
    margin: 0;
}

.sge-ir-detalle-seccion-titulo {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.sge-ir-detalle-fila {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.sge-ir-detalle-seccion {
    margin-top: 4px;
}

.sge-ir-campo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 160px;
    min-width: 0;
}

.sge-ir-campo strong {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.sge-ir-campo span {
    font-size: 14px;
    color: #111827;
    word-break: break-word;
}

.sge-ir-preview-table-wrapper {
    max-height: 420px;
    overflow-y: auto;
}

/* Evitar que direcciones/ciudades sin espacios (ej: PTO/BOGOTA/CUND/COL) se desborden sobre la columna vecina */
.sge-ir-preview-table-wrapper table,
#sge-ir-list-wrapper table {
    table-layout: fixed;
}

.sge-ir-preview-table-wrapper th,
.sge-ir-preview-table-wrapper td,
#sge-ir-list-wrapper th,
#sge-ir-list-wrapper td {
    overflow-wrap: break-word;
    word-break: break-word;
    vertical-align: top;
}

/* Previsualización de importación: Guía, Ciudad Origen, Dirección, Forma de pago, Valor, Contra Pago, Fecha, Estado */
.sge-ir-preview-table-wrapper th:nth-child(1), .sge-ir-preview-table-wrapper td:nth-child(1) { width: 10%; }
.sge-ir-preview-table-wrapper th:nth-child(2), .sge-ir-preview-table-wrapper td:nth-child(2) { width: 16%; }
.sge-ir-preview-table-wrapper th:nth-child(3), .sge-ir-preview-table-wrapper td:nth-child(3) { width: 25%; }
.sge-ir-preview-table-wrapper th:nth-child(4), .sge-ir-preview-table-wrapper td:nth-child(4) { width: 10%; }
.sge-ir-preview-table-wrapper th:nth-child(5), .sge-ir-preview-table-wrapper td:nth-child(5) { width: 10%; }
.sge-ir-preview-table-wrapper th:nth-child(6), .sge-ir-preview-table-wrapper td:nth-child(6) { width: 10%; }
.sge-ir-preview-table-wrapper th:nth-child(7), .sge-ir-preview-table-wrapper td:nth-child(7) { width: 9%; }
.sge-ir-preview-table-wrapper th:nth-child(8), .sge-ir-preview-table-wrapper td:nth-child(8) { width: 10%; }

/* Vista previa y detalle del Cuadre a Interrapidisimo (9 columnas, incluye Forma de pago):
   Guía, Ciudad Origen, Dirección, Fecha, Forma de pago, Valor, Contra Pago, Monto a consignar, Valor reconocido */
.sge-ir-cuadre-table-wrapper th:nth-child(1), .sge-ir-cuadre-table-wrapper td:nth-child(1) { width: 9%; }
.sge-ir-cuadre-table-wrapper th:nth-child(2), .sge-ir-cuadre-table-wrapper td:nth-child(2) { width: 13%; }
.sge-ir-cuadre-table-wrapper th:nth-child(3), .sge-ir-cuadre-table-wrapper td:nth-child(3) { width: 20%; }
.sge-ir-cuadre-table-wrapper th:nth-child(4), .sge-ir-cuadre-table-wrapper td:nth-child(4) { width: 8%; }
.sge-ir-cuadre-table-wrapper th:nth-child(5), .sge-ir-cuadre-table-wrapper td:nth-child(5) { width: 9%; }
.sge-ir-cuadre-table-wrapper th:nth-child(6), .sge-ir-cuadre-table-wrapper td:nth-child(6) { width: 8%; }
.sge-ir-cuadre-table-wrapper th:nth-child(7), .sge-ir-cuadre-table-wrapper td:nth-child(7) { width: 8%; }
.sge-ir-cuadre-table-wrapper th:nth-child(8), .sge-ir-cuadre-table-wrapper td:nth-child(8) { width: 12%; }
.sge-ir-cuadre-table-wrapper th:nth-child(9), .sge-ir-cuadre-table-wrapper td:nth-child(9) { width: 13%; }

/* Listado de servicios: check, Guía, Ciudad Origen, Dirección, Forma de pago, Valor, Contra Pago, Estado, Mensajero, Fecha, Acciones */
#sge-ir-list-wrapper th:nth-child(1), #sge-ir-list-wrapper td:nth-child(1) { width: 3%; }
#sge-ir-list-wrapper th:nth-child(2), #sge-ir-list-wrapper td:nth-child(2) { width: 9%; }
#sge-ir-list-wrapper th:nth-child(3), #sge-ir-list-wrapper td:nth-child(3) { width: 12%; }
#sge-ir-list-wrapper th:nth-child(4), #sge-ir-list-wrapper td:nth-child(4) { width: 15%; }
#sge-ir-list-wrapper th:nth-child(5), #sge-ir-list-wrapper td:nth-child(5) { width: 7%; }
#sge-ir-list-wrapper th:nth-child(6), #sge-ir-list-wrapper td:nth-child(6) { width: 7%; }
#sge-ir-list-wrapper th:nth-child(7), #sge-ir-list-wrapper td:nth-child(7) { width: 7%; }
#sge-ir-list-wrapper th:nth-child(8), #sge-ir-list-wrapper td:nth-child(8) { width: 8%; }
#sge-ir-list-wrapper th:nth-child(9), #sge-ir-list-wrapper td:nth-child(9) { width: 9%; }
#sge-ir-list-wrapper th:nth-child(10), #sge-ir-list-wrapper td:nth-child(10) { width: 7%; }
#sge-ir-list-wrapper th:nth-child(11), #sge-ir-list-wrapper td:nth-child(11) { width: 16%; }

.sge-ir-col-check {
    text-align: center !important;
    padding: 8px !important;
}

.sge-ir-col-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.sge-ir-col-acciones {
    white-space: nowrap;
    padding-left: 8px !important;
    padding-right: 8px !important;
    text-align: left;
}

.sge-btn-icon-sm {
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 3px;
    padding: 0;
    flex-shrink: 0;
}

.sge-btn-icon-sm:last-child {
    margin-right: 0;
}

.sge-btn-icon-sm:hover {
    background: #e2e8f0;
}

.sge-ir-bulk-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #3730a3;
}

.sge-ir-bulk-bar button {
    margin-left: 0;
}

.sge-ir-detalle-acciones {
    justify-content: flex-start;
}

.sge-ir-row-duplicada {
    background: #fff2f2;
}

.sge-ir-row-reintento {
    background: #fffbeb;
}

.sge-ir-badge-retry {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    background: #fef3c7;
    color: #92400e;
}

.sge-ir-badge-dup {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    background: #fde2e2;
    color: #b42318;
}

.sge-ir-badge-new {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    background: #e3f8e9;
    color: #067647;
}

.sge-ir-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.sge-ir-status-por-asignar {
    background: #fef3c7;
    color: #92400e;
}

.sge-ir-status-asignado {
    background: #dbeafe;
    color: #1e40af;
}

.sge-ir-status-entregado {
    background: #dcfce7;
    color: #166534;
}

.sge-ir-status-devolucion {
    background: #fee2e2;
    color: #991b1b;
}
