.module-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.module-header h2,
.empty-state h2 {
    margin: 0;
    color: var(--cide-ink);
    font-weight: 800;
    letter-spacing: -.03em;
}

.module-header p:last-child {
    max-width: 62ch;
    margin-bottom: 0;
    color: var(--cide-muted);
}

.table-shell {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--cide-border);
    border-radius: 24px;
    box-shadow: 0 16px 42px rgba(23, 32, 51, .06);
}

.table-shell table {
    min-width: 760px;
    margin-bottom: 0;
}

.table-shell thead th {
    padding: 1rem;
    color: var(--cide-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: #f7f9fc;
    border-bottom: 1px solid var(--cide-border);
}

.table-shell tbody td {
    padding: .95rem 1rem;
    border-color: #edf1f7;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .25rem .65rem;
    color: var(--cide-primary);
    background: rgba(31, 95, 153, .1);
    border: 1px solid rgba(31, 95, 153, .16);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
}

.pending-strip {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1rem;
    color: #3b2f14;
    background: #fff8e6;
    border: 1px solid #ead69a;
    border-radius: 16px;
    font-weight: 600;
}

.pending-strip i {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    color: #7a5b10;
    background: #f7e7ad;
    border-radius: 12px;
    font-size: 1rem;
}

.excel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.45rem;
    padding: 0 .45rem;
    color: #000;
    background: #22c55e;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
}

.import-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--cide-border);
    border-radius: 20px;
    box-shadow: 0 16px 42px rgba(23, 32, 51, .06);
}

.import-panel-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
}

.import-panel-main > i {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    color: var(--cide-primary);
    background: rgba(31, 95, 153, .1);
    border-radius: 16px;
    font-size: 1.35rem;
}

.import-summary {
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--cide-border);
    border-radius: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.summary-grid article {
    padding: .9rem;
    background: #f7f9fc;
    border: 1px solid var(--cide-border);
    border-radius: 16px;
}

.summary-grid span {
    display: block;
    color: var(--cide-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.summary-grid strong {
    display: block;
    margin-top: .2rem;
    color: var(--cide-primary);
    font-size: 1.65rem;
    line-height: 1;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: .75rem;
    min-height: 360px;
    padding: 3rem 1.25rem;
    text-align: center;
    color: var(--cide-muted);
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px dashed #cad6e5;
    border-radius: 28px;
}

.empty-state i {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: var(--cide-primary);
    background: rgba(31, 95, 153, .1);
    border-radius: 20px;
    font-size: 1.6rem;
}

.modal-resizable .modal-content {
    resize: both;
    overflow: auto;
    min-width: min(92vw, 420px);
    min-height: 360px;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(7, 20, 36, .24);
}

.modal-header {
    cursor: move;
    border-bottom-color: var(--cide-border);
}

.cide-switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 58px;
    padding: 0 1rem;
    background: #f8fafc;
    border: 1px solid var(--cide-border);
    border-radius: 14px;
}

/* Bootstrap posiciona el input del switch con float y margen negativo;
   dentro de un contenedor flex eso lo deja oculto. Lo normalizamos. */
.cide-switch .form-check-input {
    float: none;
    margin: 0;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 1.4rem;
    cursor: pointer;
}

.cide-switch .form-check-label {
    margin: 0;
    cursor: pointer;
}

.cide-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--cide-border);
    color: var(--cide-muted);
    font-size: 0.85rem;
}

.parte-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
}

.parte-flag-n {
    background: #22c55e;
}

.parte-flag-tp {
    background: #ef4444;
}

.form-floating > .form-select,
.form-floating > .form-control {
    min-height: 58px;
    border-radius: 14px;
}

.form-floating > label {
    color: var(--cide-muted);
}

@media (max-width: 768px) {
    .module-header {
        align-items: stretch;
        flex-direction: column;
    }

    .module-header .btn {
        width: 100%;
    }

    .import-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .import-panel .btn {
        width: 100%;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
