/* ==========================================================================
   VARIABLES DE DISEÑO
   ========================================================================== */
:root {
    --reporte-bg: #161616;
    --reporte-cyan: #00a2e0;
    --reporte-orange: #fe9b07;
    --reporte-orange-soft: rgba(254, 155, 7, 0.12);
    --reporte-orange-border: rgba(254, 155, 7, 0.18);
    --reporte-green: #00c389;
    --reporte-green-soft: rgba(0, 195, 137, 0.12);
    --reporte-green-border: rgba(0, 195, 137, 0.18);
    --reporte-blue: #4a90d9;
    --reporte-blue-soft: rgb(11, 49, 63);
    --reporte-blue-border: rgb(11, 49, 63);
    --reporte-panel-border: rgba(0, 162, 224, 0.15);
    --reporte-text: #ffffff;
    --reporte-muted: #c8d4dc;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.dashboard-reporte {
    background: var(--reporte-bg);
    color: var(--reporte-text);
    padding: 20px 30px 40px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0 -35px;
    min-height: 100vh;
    border: none;
    box-shadow: none;
}

/* ==========================================================================
   CABECERA Y TÍTULOS
   ========================================================================== */
.header-reporte {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 2px solid var(--reporte-cyan);
    padding-bottom: 20px;
    margin-bottom: 28px;
}

.main-title-container h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    color: var(--reporte-cyan);
    line-height: 1.1;
}

.main-title-container p {
    font-size: 13px;
    color: #fff;
    margin: 6px 0 0;
    font-weight: 600;
}

.enlace-seleccionado-reporte {
    color: #fff;
    font-weight: 700;
}

/* BOTÓN INSTRUCTIVO */
.dashboard-reporte .btn-instructivo-reporte {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 8px 18px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all .25s ease;
}

.dashboard-reporte .btn-instructivo-reporte:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

/* ==========================================================================
   FILA PRINCIPAL DE PANELES
   ========================================================================== */
.reporte-cards-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 30px;
    margin: 0;
    padding-left: 60px;
    padding-right: 60px;
}

/* Ajuste exclusivo para desembolsos.
   Permite alinear visualmente los paneles naranja y verde
   sin afectar la distribución de otros módulos. */
.col-desembolsos {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(40% - 80px);
    max-width: calc(40% - 80px);
}

/* Clases de utilidad para distribución de ancho en escritorio */
.col-reporte-wide,
.col-reporte-orange-wide {
    flex: 0 0 calc(35% - 15px);
    max-width: calc(35% - 15px);
}

.col-reporte-narrow,
.col-reporte-green-narrow {
    flex: 0 0 calc(65% - 15px);
    max-width: calc(65% - 15px);
}

/* ==========================================================================
   COMPONENTES DE PANEL
   ========================================================================== */
.reporte-panel-wrap {
    position: relative;
    padding-left: 45px;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Barra de acento lateral (Izquierda redondeada, Derecha recta) */
.reporte-panel-accent-outer {
    position: absolute;
    left: 10px;
    top: 6px;
    bottom: 6px;
    width: 18px;
    border-radius: 5px 0 0 5px;
    display: block;
}

/* Barra lateral gris para el panel de validaciones */
.reporte-resultados-box {
    position: relative;
    padding-left: 50px; /* antes 60px */
    padding-right: 60px;
}

.reporte-resultados-box::before {
    content: "";
    position: absolute;
    left: 60px;
    top: 6px;
    bottom: 6px;
    width: 18px;
    border-radius: 5px 0 0 5px;
    background: #4a4a4a;
    display: block;
}

.reporte-panel-wrap-orange .reporte-panel-accent-outer {
    background: #b9851d;
}

.reporte-panel-wrap-green .reporte-panel-accent-outer {
    background: #0c8f79;
}

.reporte-panel-wrap-blue .reporte-panel-accent-outer {
    background: rgb(11, 49, 63);
}

.reporte-panel-wrap-cyan .reporte-panel-accent-outer {
    background: #0077a8;
}

.reporte-panel {
    border: 1px solid var(--reporte-panel-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.reporte-panel-orange {
    background: rgba(80, 66, 27, 0.42);
}

.reporte-panel-green {
    background: rgba(0, 90, 86, 0.42);
}

.reporte-resultados-box::before {
    top: 35px;
    bottom: 0;
}

.reporte-panel-blue {
    background: oklch(23.504% 0.03011 226.364)
}

.reporte-panel-cyan {
    background: rgba(0, 40, 70, 0.65);
}

.reporte-panel-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 14px 8px;
}

.reporte-panel-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.reporte-panel-orange .reporte-panel-title {
    color: var(--reporte-orange);
}

.reporte-panel-green .reporte-panel-title {
    color: var(--reporte-green);
}

.reporte-panel-blue .reporte-panel-title {
    color: var(--reporte-blue);
}

.reporte-panel-cyan .reporte-panel-title {
    color: var(--reporte-cyan);
}

.reporte-panel-body-shell {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.reporte-panel-body-inner {
    border-radius: 18px;
    padding: 18px 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.reporte-panel-orange .reporte-panel-body-inner {
    background: var(--reporte-orange-soft);
    border-top: 1px solid var(--reporte-orange-border);
    min-height: 96px;
}

.reporte-panel-green .reporte-panel-body-inner {
    background: var(--reporte-green-soft);
    border-top: 1px solid var(--reporte-green-border);
    min-height: 96px;
}

.reporte-panel-blue .reporte-panel-body-inner {
    background: var(--reporte-blue-soft);
    border-top: 1px solid var(--reporte-blue-border);
    min-height: 96px;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 6px;
}

.reporte-panel-cyan .reporte-panel-body-inner {
    background: rgba(0, 162, 224, 0.07);
    border-top: 1px solid rgba(0, 162, 224, 0.18);
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 16px;
}

.reporte-panel-cyan .reporte-resumen-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 16px;
    width: 100%;
}

/* ==========================================================================
   CONTROLES DE CARGA DE ARCHIVO
   ========================================================================== */
.reporte-upload-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.file-upload-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 2px dashed rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    cursor: pointer;
    background: transparent;
    transition: all 0.25s ease;
    min-width: 220px;
    margin: 0;
}

.file-upload-custom:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
}

.file-upload-custom input {
    display: none;
}

.file-upload-text {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* ==========================================================================
   BOTONES GENERALES
   ========================================================================== */
.btn-reporte {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all .25s ease;
    white-space: nowrap;
}

.btn-reporte:hover,
.btn-reporte:focus {
    text-decoration: none;
    outline: none;
}

/* VARIANTES DE BOTONES */
.dashboard-reporte .btn-reporte-orange {
    background: var(--reporte-orange);
    color: #fff;
    box-shadow: 0 6px 14px rgba(254, 155, 7, 0.25);
}

.dashboard-reporte .btn-reporte-orange:hover {
    background: #ffab2d;
    color: #fff;
}

.dashboard-reporte .btn-reporte-green {
    background: var(--reporte-green);
    color: #fff;
    box-shadow: 0 6px 14px rgba(0, 156, 113, 0.25);
}

.dashboard-reporte .btn-reporte-green:hover {
    background: #00b885;
    color: #fff;
}

.btn-reporte-green[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.dashboard-reporte .btn-reporte-white {
    background-color: #ffffff;
    color: var(--reporte-green);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.dashboard-reporte .btn-reporte-white:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

/* BOTÓN DANE (MAGENTA) */
.dashboard-reporte .btn-anexo-dane {
    background-color: #ffffff;
    color: #e4006b;
    border: 1.5px solid #e4006b;
    box-shadow: 0 4px 12px rgba(228, 0, 107, 0.15);
}

.dashboard-reporte .btn-anexo-dane:hover {
    background-color: #fff5f9;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(228, 0, 107, 0.2);
    color: #e4006b;
}

.logo-dane-btn {
    height: 14px;
    width: auto;
    margin-left: 6px;
    filter: drop-shadow(0 0 1px rgba(228, 0, 107, 0.2));
}

/* ICONO CIRCULAR (BOTÓN VALIDAR) */
.btn-reporte-white .circle-icon {
    background-color: var(--reporte-green);
    color: #ffffff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    font-size: 10px;
}

/* ==========================================================================
   FORMULARIOS Y SELECTS
   ========================================================================== */
.form-group-reporte {
    margin-bottom: 14px;
    width: 100%;
}

.form-group-reporte label {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-reporte .form-control {
    background-color: #1a3141;
    border: 1px solid rgba(0, 162, 224, 0.18);
    border-radius: 10px;
    color: #fff;
    height: 40px;
    box-shadow: none;
}

.dashboard-reporte .form-control:focus {
    border-color: var(--reporte-cyan);
    box-shadow: 0 0 0 2px rgba(0, 162, 224, 0.08);
}

.dashboard-reporte .form-control option {
    background: #1a3141;
    color: #fff;
}

/* ==========================================================================
   VISUALIZACIÓN DE RESULTADOS (AJAX)
   ========================================================================== */
.reporte-resultados-box {
    margin-top: 50px;
    padding-left: 60px;
    padding-right: 60px;
}

#reporte_resultados h3 {
    color: #fff;
    font-weight: 500;
    margin-bottom: 25px;
    font-size: 24px;
}

/* CARTAS DE PASOS DE VALIDACIÓN */
.validacion-paso-custom {
    background: #252424c0;
    border-radius: 6px 40px 40px 6px;
    margin: 10px 40px 0;
    display: flex;
    align-items: center;
    padding: 15px 50px 15px 25px;
    position: relative;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.validacion-paso-custom .paso-nombre {
    font-weight: 700;
    flex: 0 0 40%;
    font-size: 14px;
}

.validacion-paso-custom .paso-mensaje {
    flex: 1;
    font-size: 13px;
    opacity: 0.9;
}

.validacion-paso-custom .paso-icon-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 40px 40px 0;
}

.paso-success .paso-icon-handle {
    background: #5cb85c;
}

.paso-error .paso-icon-handle {
    background: #d9534f;
}

.paso-skipped {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.paso-skipped .paso-icon-handle {
    background: #777;
}

.paso-icon-handle i {
    font-size: 18px;
    color: #fff;
}


/* ==========================================================================
   PANEL DE RESUMEN FINANCIERO
   ========================================================================== */
.reporte-resumen-wrap {
    padding-left: 60px;
    padding-right: 60px;
    margin-bottom: 28px;
}

.reporte-resumen {
    background: rgba(0, 40, 70, 0.65);
    border: 1px solid rgba(0, 162, 224, 0.22);
    border-radius: 18px;
    padding: 18px 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reporte-resumen-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--reporte-cyan);
    text-align: center;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.reporte-resumen-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 12px;
    width: 100%;
}

.reporte-resumen-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 140px;
}

.reporte-resumen-label {
    font-size: 10px;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    /* Fondo gris claro / translúcido */
    border-radius: 999px;
    padding: 2px 10px;
}

.reporte-resumen-value {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.reporte-resumen-item.destacado .reporte-resumen-label {
    background: var(--reporte-cyan);
}

.reporte-resumen-item.destacado .reporte-resumen-value {
    color: var(--reporte-cyan);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .header-reporte {
        flex-direction: column;
        align-items: flex-start;
    }

    .reporte-cards-row {
        gap: 16px;
        padding-left: 0;
        padding-right: 0;
    }

    .reporte-cards-row>.col-md-6,
    .reporte-cards-row>.col-md-6:first-child,
    .reporte-cards-row>.col-md-6:last-child {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0;
    }

    .reporte-panel-wrap {
        padding-left: 44px;
    }

    .reporte-panel-orange .reporte-panel-body-inner {
        min-height: 70px;
    }

    .reporte-panel-green .reporte-panel-body-inner {
        min-height: auto;
    }

    .reporte-upload-row {
        gap: 12px;
    }

    .file-upload-custom {
        min-width: 0;
        width: 100%;
        max-width: 260px;
    }
}