/* ISWPuertas Document Modal - PRE / MED / ST / OT */

.isw-doc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
}
.isw-doc-overlay.open { display: block; }

.isw-doc-modal {
    display: none;
    position: fixed;
    top: 5vh;
    left: 5vw;
    width: 90vw;
    height: 90vh;
    background: #fff;
    z-index: 99999;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    overflow: hidden;
}
.isw-doc-modal.open { display: flex; }

/* HEADER */
.isw-doc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: #3498db;
    color: #fff;
    flex-shrink: 0;
}
.isw-doc-header-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.isw-doc-header-title i { margin-right: 8px; }
.isw-doc-header-ref {
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.18);
    padding: 3px 10px;
    border-radius: 0;
}
.isw-doc-header-date {
    font-size: 12px;
    opacity: 0.85;
}
.isw-doc-header-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.isw-doc-header-close:hover { background: rgba(255,255,255,0.18); }

/* TOOLBAR */
.isw-doc-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.isw-doc-tbtn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #6c757d;
    transition: background 0.15s;
}
.isw-doc-tbtn:hover { opacity: 0.88; }
.isw-doc-tbtn-pre   { background: #3498db; }
.isw-doc-tbtn-med   { background: #1abc9c; }
.isw-doc-tbtn-st    { background: #e67e22; }
.isw-doc-tbtn-pro   { background: #9b59b6; }
.isw-doc-tbtn-dup   { background: #34495e; }
.isw-doc-tbtn-print { background: #2c3e50; }
.isw-doc-tbtn-save  { background: #27ae60; }
.isw-doc-tbtn-val   { background: #16a085; }
.isw-doc-tbtn-draft { background: #95a5a6; }

/* BODY = 3 COLUMNAS */
.isw-doc-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
}
.isw-doc-3col {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.isw-doc-col-left,
.isw-doc-col-center,
.isw-doc-col-right {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px;
    background: #fff;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.isw-doc-col-left  { border-right: 1px solid #e0e0e0; background: #fafafa; }
.isw-doc-col-right { border-left:  1px solid #e0e0e0; background: #fafafa; }
.isw-doc-col-center {
    display: flex;
    flex-direction: column;
}

/* CAMPOS GENÉRICOS */
.isw-doc-field {
    margin-bottom: 8px;
}
.isw-doc-field > label,
.isw-doc-field-val {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

/* NUM grande sin etiqueta */
.isw-doc-field-num {
    margin-bottom: 2px;
    text-align: center;
}
.isw-doc-field-num span {
    font-size: 22px;
    font-weight: 800;
    color: #1a2744;
    letter-spacing: 1px;
    display: block;
}

/* FECHA sin etiqueta, centrada */
.isw-doc-field-fecha {
    margin-bottom: 10px;
    text-align: center;
}
.isw-doc-field-fecha input[type="date"] {
    border: none;
    border-bottom: 2px solid #3498db;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    background: transparent;
    text-align: center;
    padding: 3px 4px;
    width: 100%;
    box-sizing: border-box;
}
.isw-doc-field-fecha input[type="date"]:focus { outline: none; border-bottom-color: #1a2744; }

/* Campos inline: etiqueta izquierda + control derecha */
.isw-doc-field-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.isw-doc-field-inline label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    white-space: nowrap;
    min-width: 62px;
    flex-shrink: 0;
}
.isw-doc-field-inline input[type="text"],
.isw-doc-field-inline select {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #ddd;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}
.isw-doc-field-inline input:focus,
.isw-doc-field-inline select:focus { outline: none; border-color: #3498db; }
.isw-doc-field input[type="text"],
.isw-doc-field input[type="date"],
.isw-doc-field input[type="number"],
.isw-doc-field input[type="email"],
.isw-doc-field select,
.isw-doc-field textarea {
    width: 100%;
    padding: 5px 7px;
    border: 1px solid #ccc;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}
.isw-doc-field input:focus,
.isw-doc-field select:focus,
.isw-doc-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}
.isw-doc-field textarea { min-height: 60px; resize: vertical; }

.isw-doc-panel-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a2744;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
    margin: 4px 0 10px;
    letter-spacing: 0.3px;
}

/* CLIENTE + INSTALACION en col-left */
.isw-doc-cli-select { display: flex; gap: 4px; }
.isw-doc-cli-search { flex: 1; }
.isw-doc-change-cli {
    padding: 5px 9px;
    font-size: 11px;
    cursor: pointer;
    border: none;
    background: #34495e;
    color: #fff;
    font-weight: 700;
}
.isw-doc-cli-inst {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 10px;
    margin-top: 6px;
}
.isw-doc-inst-card { font-size: 12px; line-height: 1.5; }
.isw-doc-inst-detail { color: #555; font-size: 11px; margin-top: 3px; }

/* COLUMNA CENTRAL - TABS */
.isw-doc-center-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 10px;
}
.isw-doc-ctab {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: #ecf0f1;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.isw-doc-ctab.active {
    background: #fff;
    color: #3498db;
    border-bottom-color: #3498db;
}
.isw-doc-ctab:hover { background: #d6eaf8; }
.isw-doc-cpane { display: none; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.isw-doc-cpane.active { display: block; }

/* PROYECTO / ASUNTO BAR */
.isw-doc-proyecto-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.isw-doc-proyecto-bar input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ccc;
    font-size: 12px;
}

/* LÍNEAS - TOOLBAR */
.isw-doc-lines-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.isw-doc-lbtn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f7f7f7;
    color: #1a2744;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.isw-doc-lbtn:hover { background: #e6e6e6; }
.isw-doc-lbtn-ok { background: #27ae60; color: #fff; border-color: #27ae60; }
.isw-doc-lbtn-ok:hover { background: #229954; }
.isw-doc-lbtn-cancel { background: #95a5a6; color: #fff; border-color: #95a5a6; }
.isw-doc-lbtn-del { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.isw-doc-check-all-wrap { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 11px; }

.isw-doc-dto-mode {
    display: inline-flex; gap: 2px; margin-left: auto;
}
.isw-doc-dto-mode button {
    padding: 3px 8px;
    font-size: 11px;
    background: #ecf0f1;
    border: 1px solid #ccc;
    cursor: pointer;
}
.isw-doc-dto-mode button.active { background: #3498db; color: #fff; border-color: #3498db; }

/* LÍNEAS - TABLA */
.isw-doc-lines-wrap { border: 1px solid #ddd; background: #fff; overflow-x: auto; }
.isw-doc-ltable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.isw-doc-ltable th {
    background: #f0f0f0;
    color: #1a2744;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 6px;
    border-bottom: 2px solid #ccc;
    text-align: left;
}
.isw-doc-ltable td {
    padding: 5px 6px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.isw-doc-ltable tbody tr:hover { background: #f9f9f9; }
.isw-doc-lth-check, .isw-doc-line-check { width: 24px; text-align: center; }
.isw-doc-lth-drag, .isw-doc-drag-handle { width: 22px; text-align: center; color: #888; cursor: move; }
.isw-doc-lth-actions, .isw-doc-lactions { width: 70px; white-space: nowrap; text-align: right; }
.isw-doc-lcell-desc { min-width: 200px; }
.isw-doc-lcell-num  { width: 70px;  text-align: right; }
.isw-doc-lcell-total{ width: 90px;  text-align: right; font-weight: 700; }
.isw-doc-section-cell { width: 80px; }

.isw-doc-lrow-section td {
    background: #f0eaf4 !important;
    font-weight: 700;
    color: #8E44AD;
    font-size: 12px;
}
.isw-doc-lrow-subtotal td {
    background: #f8f8f8 !important;
    font-weight: 700;
    color: #1a2744;
    border-top: 2px solid #ddd;
}
.isw-doc-subtotal-cell { text-align: right; }
.isw-doc-subtotal-val  { color: #3498db; }

.isw-doc-sec-toggle {
    background: none;
    border: 1px solid #ccc;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 11px;
}

/* EDITOR FORM LÍNEAS */
.isw-doc-editor-area {
    background: #fff;
    border: 1px solid #3498db;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.isw-doc-editor-form { display: flex; flex-direction: column; gap: 6px; }
.isw-doc-ef-row {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.isw-doc-ef-row > label {
    font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase; min-width: 80px;
}
.isw-doc-ef-row input, .isw-doc-ef-row select, .isw-doc-ef-row textarea {
    padding: 4px 7px; border: 1px solid #ccc; font-size: 12px; flex: 1; box-sizing: border-box; font-family: inherit;
}
.isw-doc-ef-actions {
    display: flex; gap: 8px; justify-content: flex-end; padding-top: 6px;
}

/* TOTALES */
.isw-doc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px dashed #eee;
}
.isw-doc-total-title { color: #555; font-weight: 600; }
.isw-doc-total-big {
    padding: 10px;
    margin-top: 8px;
    background: #1a2744;
    color: #fff;
    text-align: right;
    font-size: 16px;
    font-weight: 800;
}
.isw-doc-col-right-actions {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fafafa;
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: row;
    gap: 6px;
}
.isw-doc-col-right-actions .isw-doc-rbtn { flex: 1; }
.isw-doc-rbtn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
}
.isw-doc-rbtn i { margin-right: 6px; }
.isw-doc-rbtn-save {
    background: #e67e22;
    color: #1a2744;
}
.isw-doc-rbtn-save:hover { background: #d35400; }
.isw-doc-rbtn-validate {
    background: #1a2744;
    color: #e67e22;
}
.isw-doc-rbtn-validate:hover { background: #0d1520; }
.isw-doc-desglose {
    border: 1px solid #eee;
    padding: 8px 10px;
    margin-top: 6px;
    background: #fff;
    font-size: 12px;
}
.isw-doc-desglose-row {
    display: flex; justify-content: space-between; padding: 2px 0;
}

/* ADJUNTOS */
.isw-doc-adj-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 6px 0 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}
.isw-doc-adj-toolbar input { flex: 1; padding: 5px 7px; border: 1px solid #ccc; font-size: 12px; }
.isw-doc-adj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.isw-doc-adj-card {
    border: 1px solid #ddd;
    background: #fff;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    overflow: hidden;
    min-width: 0;
}
.isw-doc-adj-preview, .isw-doc-adj-icon {
    width: 100%;
    height: 80px;
    max-height: 80px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #888;
    overflow: hidden;
}
.isw-doc-adj-preview {
    object-fit: cover;
    object-position: center;
    display: block;
}
img.isw-doc-adj-preview {
    width: 100% !important;
    height: 80px !important;
    max-width: 100% !important;
    max-height: 80px !important;
    object-fit: cover;
}
.isw-doc-adj-card img {
    max-width: 100%;
    max-height: 80px;
    object-fit: cover;
}
.isw-doc-adj-name { font-weight: 700; word-break: break-all; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.isw-doc-adj-size, .isw-doc-adj-info, .isw-doc-adj-desc { font-size: 10px; color: #666; }
.isw-doc-adj-actions { display: flex; gap: 4px; }
.isw-doc-adj-desc-input { width: 100%; padding: 4px; border: 1px solid #ccc; font-size: 11px; box-sizing: border-box; }

/* NOTAS */
.isw-doc-notas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* GENERATE BUTTONS */
.isw-doc-gen-section { display: inline-flex; gap: 4px; }

/* EMPTY STATE */
.isw-doc-empty {
    padding: 20px;
    color: #999;
    text-align: center;
    font-style: italic;
    font-size: 13px;
}

/* FOOTER */
.isw-doc-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 16px;
    background: #1a2744;
    color: #fff;
    border-top: 2px solid #0d1b30;
    flex-shrink: 0;
    font-size: 12px;
}
.isw-doc-footer-clock {
    font-weight: 600;
    opacity: 0.85;
}
.isw-doc-footer-total {
    margin-left: auto;
    font-weight: 800;
    font-size: 14px;
    color: #1abc9c;
}

/* ====== SECCIONES COLAPSABLES LATERALES ====== */
.isw-col-sec {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}
.isw-col-sec-hd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #1a2744;
    background: #f0f0f0;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #ddd;
    transition: background 0.15s;
}
.isw-col-sec-hd:hover { background: #e5e5e5; }
.isw-col-sec-hd-celeste {
    background: #d6eaf8;
    color: #1a5276;
    border-bottom: 1px solid #aed6f1;
}
.isw-col-sec-hd-celeste:hover { background: #c4dff3; }
.isw-col-sec-chev {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s;
}
.isw-col-sec-closed .isw-col-sec-chev { transform: rotate(180deg); }
.isw-col-sec-bd {
    padding: 8px 10px;
    transition: max-height 0.25s ease;
    overflow: hidden;
}
.isw-col-sec-bd-celeste {
    background: #eaf4fb;
    border-left: 3px solid #3498db;
}
.isw-col-sec-closed .isw-col-sec-bd {
    display: none;
}

/* ====== INFORME TÉCNICO ST ====== */
.isw-doc-informe-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 8px;
    padding: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}
.isw-doc-informe-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    min-height: 0;
}
.isw-doc-informe-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    min-height: 0;
}
.isw-inf-sec { border: 1px solid #e0e0e0; flex-shrink: 0; }
.isw-inf-sec-grow { flex: 1; display: flex; flex-direction: column; min-height: 160px; }
.isw-inf-sec-grow .isw-inf-sec-bd { flex: 1; display: flex; flex-direction: column; }
.isw-inf-sec-hd {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #1a2744;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: .3px;
    flex-shrink: 0;
}
.isw-inf-sec-bd { padding: 6px 8px; }
.isw-inf-quill-box {
    flex: 1;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    min-height: 120px;
}
.isw-inf-quill-nota {
    min-height: 80px;
    background: #fffef0;
}
.isw-inf-bd-grow {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Checklist items */
.isw-cl-item {
    border-bottom: 1px solid #eee;
    padding: 4px 3px;
}
.isw-cl-item-desc {
    font-size: 11px;
    color: #222;
    margin-bottom: 3px;
}
.isw-cl-item-resp {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.isw-cl-radio {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    cursor: pointer;
}
.isw-cl-radio span.ok  { color: #27ae60; font-weight: 700; }
.isw-cl-radio span.ko  { color: #e74c3c; font-weight: 700; }
.isw-cl-radio span.na  { color: #95a5a6; font-weight: 700; }

#isw-doc-cpane-informe {
    overflow: hidden;
    height: 100%;
    min-height: 0;
}
#isw-doc-cpane-informe.active { display: flex; flex-direction: column; }

.isw-doc-tbtn-st-inf { background: #e67e22 !important; }

/* Checklist modo expandido — in-column: ocultar otras secciones de la columna derecha */
.isw-doc-informe-right.isw-cl-right-expanded > .isw-inf-sec:not(#isw-cl-sec-wrap) {
    display: none !important;
}
.isw-doc-informe-right.isw-cl-right-expanded > #isw-cl-sec-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.isw-doc-informe-right.isw-cl-right-expanded > #isw-cl-sec-wrap .isw-inf-sec-bd {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.isw-doc-informe-right.isw-cl-right-expanded #isw-inf-checklist-items {
    flex: 1;
    max-height: none !important;
    overflow-y: auto;
}
.isw-doc-informe-right { position: relative; }

/* Checklist secciones colapsables */
.isw-cl-grupo { border-bottom: 1px solid #e8e8e8; }
.isw-cl-grupo-hd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    background: #1a2744;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    letter-spacing: .3px;
}
.isw-cl-grupo-hd:hover { background: #243460; }
.isw-cl-chevron {
    font-size: 9px;
    transition: transform .2s;
    flex-shrink: 0;
}
.isw-cl-grp-count {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 1px 7px;
    font-size: 10px;
    border-radius: 10px;
}
.isw-cl-grp-body {
    display: none;
    border-left: 3px solid #1a2744;
}
.isw-cl-grp-body.isw-cl-grp-open { display: block; }
.isw-cl-grp-open ~ .isw-cl-grupo-hd .isw-cl-chevron,
.isw-cl-grp-body.isw-cl-grp-open + * .isw-cl-chevron { transform: rotate(90deg); }
.isw-cl-grupo:has(.isw-cl-grp-open) .isw-cl-chevron { transform: rotate(90deg); }

.isw-doc-total-title { cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.isw-doc-right-chev { font-size: 11px; color: #888; }
.isw-doc-right-collapse.isw-doc-right-closed { display: none; }

.isw-inf-sec-collapsible .isw-inf-sec-toggle { cursor: pointer; user-select: none; }
.isw-inf-sec-chev { margin-left: 8px; font-size: 11px; opacity: 0.8; }
.isw-inf-sec-collapsible.isw-inf-sec-closed .isw-inf-sec-bd { display: none; }

.isw-doc-adj-launch { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:50px 30px; text-align:center; }
.isw-doc-adj-launch-txt { font-size:13px; color:#666; max-width:420px; line-height:1.5; }

/* ===== ADJUNTOS INLINE (pestaña) ===== */
.isw-doc-adj-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    margin-bottom: 8px;
}
.isw-doc-adj-file { flex: 2; min-width: 160px; font-size: 12px; }
.isw-doc-adj-descin {
    flex: 3;
    min-width: 160px;
    padding: 5px 7px;
    border: 1px solid #ccc;
    font-size: 12px;
    font-family: inherit;
}
.isw-doc-adj-catup,
.isw-doc-adj-filter {
    padding: 5px 7px;
    border: 1px solid #ccc;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
}
.isw-doc-adj-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    align-content: start;
}
.isw-doc-adj-preview-pdf {
    width: 100%;
    height: 80px;
    max-height: 80px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #c0392b;
    overflow: hidden;
    cursor: pointer;
}
.isw-doc-adj-pdfthumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    object-position: top center;
}
.isw-doc-adj-preview-pdf:hover { outline: 2px solid #e74c3c; outline-offset: -2px; }
.isw-doc-adj-catsel {
    flex: 1;
    min-width: 0;
    padding: 3px 4px;
    border: 1px solid #ccc;
    font-size: 10px;
    font-family: inherit;
    background: #fff;
}

.isw-doc-pagos {
    margin-top: 8px;
    border-top: 2px solid #e74c3c;
    padding-top: 6px;
}
.isw-doc-pagos-title {
    font-size: 11px;
    font-weight: bold;
    color: #e74c3c;
    letter-spacing: .5px;
    margin-bottom: 4px;
}
.isw-doc-pago-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    padding: 2px 0;
    color: #333;
}
.isw-doc-pago-row span:last-child {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.isw-doc-pago-cobrado {
    font-weight: bold;
    border-top: 1px solid #ddd;
    margin-top: 3px;
    padding-top: 4px;
}
.isw-doc-pago-pend {
    font-weight: bold;
    color: #e74c3c;
    font-size: 13px;
}
.isw-doc-tbtn-cerrar {
    color: #fff;
}

/* Checklist · estados OK / INCIDENCIA / N.A. */
.isw-cl-est {
    flex: 1;
    padding: 3px 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #777;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    line-height: 1.4;
}
.isw-cl-est:hover { background: #f2f2f2; }
.isw-cl-est-ok.isw-cl-est-on { background: #27ae60; border-color: #27ae60; color: #fff; }
.isw-cl-est-ko.isw-cl-est-on { background: #e74c3c; border-color: #e74c3c; color: #fff; }
.isw-cl-est-na.isw-cl-est-on { background: #95a5a6; border-color: #95a5a6; color: #fff; }
.isw-cl-item.isw-cl-item-ko { background: #fdf1f0; }
.isw-cl-item.isw-cl-item-ko .isw-cl-item-desc { color: #c0392b; font-weight: 700; }
.isw-cl-item-resp { gap: 3px; }
