/* ─────────────────────────────────────────────────────────────
   tools-notas.css — Extractor de notas de lavadero
   Reutiliza .modal-overlay / .modal-header / .modal-close / .modal-footer
   de tools-ex32.css. Aquí van solo las clases propias .notas-*
   ───────────────────────────────────────────────────────────── */

.notas-modal-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ── Zona de subida ── */
.notas-upload {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    margin-bottom: 16px;
}
.notas-upload .notas-hint {
    flex: 1 1 auto;
    font-size: 12.5px;
    color: var(--text-muted);
    min-width: 160px;
}
.notas-file-info {
    flex-basis: 100%;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-hover);
    padding: 8px 12px;
    border-radius: 8px;
}
.notas-file-info.hidden { display: none; }

/* ── Botones ── */
.notas-btn-primary,
.notas-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s, opacity .15s;
}
.notas-btn-primary {
    background: #b91c1c;
    color: #fff;
}
.notas-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.notas-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.notas-btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.notas-btn-secondary:hover { filter: brightness(1.05); }

.notas-btn-sm {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.notas-btn-sm:hover { filter: brightness(1.06); }

/* ── Spinner ── */
.notas-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: notas-spin .7s linear infinite;
    display: inline-block;
}
.notas-spinner.hidden { display: none; }
@keyframes notas-spin { to { transform: rotate(360deg); } }

/* ── Estado vacío ── */
.notas-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 14px;
}

/* ── Bloques de resultado ── */
.notas-block { margin-bottom: 24px; }
.notas-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.notas-block-head h3 {
    font-size: 14px;
    margin: 0;
    color: var(--text-primary);
}
.notas-count {
    font-weight: 700;
    color: #b91c1c;
}
.notas-block-head .notas-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Tablas ── */
.notas-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.notas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 560px;
}
.notas-table th,
.notas-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
.notas-table thead th {
    background: var(--bg-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    position: sticky;
    top: 0;
}
.notas-table tbody tr:hover { background: var(--bg-hover); }
.notas-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.notas-table .notas-idx { color: var(--text-muted); text-align: center; font-size: 12px; }
.notas-table .notas-cli { font-weight: 600; }
.notas-table tfoot td {
    font-weight: 700;
    background: var(--bg-secondary);
    border-top: 2px solid #b91c1c;
}
.notas-tot-label { text-align: right; }

/* Inputs dentro de tabla */
.notas-table input {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    border-radius: 6px;
    padding: 5px 6px;
    font-size: 13px;
    font-family: inherit;
}
.notas-table input:hover { border-color: var(--border); }
.notas-table input:focus {
    outline: none;
    border-color: #b91c1c;
    background: var(--bg-primary);
}
.notas-table input.num { text-align: right; font-variant-numeric: tabular-nums; }
.notas-table input.cif { text-transform: uppercase; font-weight: 600; }
.notas-table input.cli-edit { font-weight: 600; }

.notas-del {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 6px;
}
.notas-del:hover { background: rgba(185, 28, 28, .12); color: #b91c1c; }

/* ─────────────────────────────────────────────────────────────
   MÓVIL — mismas convenciones que el resto de modales
   100dvh, sticky header/footer, safe-area-inset
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .notas-modal-container {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        border: none;
    }
    #notas-modal.modal-overlay {
        padding: 0;
    }
    #notas-modal .modal-header {
        padding-top: max(12px, env(safe-area-inset-top));
        position: sticky;
        top: 0;
        background: var(--bg-primary);
        z-index: 2;
    }
    #notas-modal .modal-footer {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        position: sticky;
        bottom: 0;
        z-index: 2;
        flex-wrap: wrap;
    }
    .notas-btn-primary,
    .notas-btn-secondary {
        flex: 1 1 auto;
        justify-content: center;
    }
    .notas-upload { padding: 12px; }
    .notas-table { font-size: 12px; min-width: 520px; }
}

/* Oculta el modal cuando se imprime (la impresión usa ventana aparte) */
@media print {
    #notas-modal { display: none !important; }
}
