/* ============================================================
   CUADRANTE DE TURNOS — Print Stylesheet
   ============================================================ */

@media print {
    /* ---------- Ocultar elementos no imprimibles ---------- */
    .no-print,
    .loading-overlay,
    .toast,
    .results-tabs,
    .individual-selector {
        display: none !important;
    }

    /* ---------- Layout general ---------- */
    @page {
        size: landscape;
        margin: 10mm 8mm;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: #fff;
        font-size: 9pt;
        color: #000;
        line-height: 1.35;
    }

    .app-header {
        position: static;
        border-bottom: 2px solid #000;
        margin-bottom: 8pt;
    }

    .header-inner {
        padding: 4pt 0;
    }

    .brand-sub {
        display: none;
    }

    .app-main {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* ---------- Cards ---------- */
    .card {
        box-shadow: none;
        border: 1px solid #aaa;
        border-radius: 0;
        padding: 8pt;
        margin-bottom: 6pt;
        /* NO page-break-inside: avoid — las tablas pueden ser largas */
    }

    /* ---------- Resumen ---------- */
    .results-summary {
        page-break-after: avoid;
    }

    .summary-grid {
        gap: 4pt;
    }

    .summary-item {
        padding: 4pt;
        border: 1px solid #ccc;
    }

    .summary-value {
        font-size: 12pt;
    }

    .summary-label {
        font-size: 7pt;
    }

    /* ---------- Tabs: mostrar todos los contenidos ---------- */
    .tab-content {
        display: block !important;
    }

    /* Separador visual entre secciones */
    .tab-content + .tab-content {
        margin-top: 12pt;
        padding-top: 8pt;
        border-top: 2px solid #333;
    }

    /* ---------- Tablas de cuadrante ---------- */
    .schedule-table-wrap {
        overflow: visible;
    }

    .week-label {
        font-size: 8pt;
        font-weight: bold;
        margin: 6pt 0 3pt;
        page-break-after: avoid;
    }

    table.schedule {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: auto;
        font-size: 7.5pt;
    }

    table.schedule th,
    table.schedule td {
        padding: 2pt 3pt;
        border: 0.5pt solid #999;
        font-size: 7.5pt;
    }

    table.schedule th {
        background: #eee !important;
        font-size: 7pt;
    }

    table.schedule tr {
        page-break-inside: avoid;
    }

    table.schedule td.cell-worker {
        position: static; /* Desactivar sticky para impresión */
        font-size: 7.5pt;
        background: #f5f5f5 !important;
    }

    /* Colores de turnos */
    .cell-turno-M { background: #fef3c7 !important; color: #92400e !important; }
    .cell-turno-T { background: #dbeafe !important; color: #1e40af !important; }
    .cell-turno-N { background: #e0e7ff !important; color: #3730a3 !important; }
    .cell-turno-S { background: #fef08a !important; color: #854d0e !important; }
    .cell-turno-L { background: #bbf7d0 !important; color: #166534 !important; }
    .cell-turno-D { background: #f0f0f0 !important; color: #999 !important; }

    /* ---------- Vista individual: imprimir titulo ---------- */
    #tabIndividual h3 {
        font-size: 10pt;
        margin-bottom: 4pt;
    }

    #tabIndividual p {
        font-size: 8pt;
    }

    /* ---------- Tabla de equidad ---------- */
    table.equity {
        width: 100%;
        font-size: 8pt;
        page-break-inside: auto;
    }

    table.equity th,
    table.equity td {
        padding: 2pt 4pt;
        border: 0.5pt solid #999;
    }

    table.equity th {
        background: #eee !important;
        font-size: 7pt;
    }

    table.equity .positive { color: #16a34a !important; }
    table.equity .negative { color: #dc2626 !important; }

    /* ---------- Títulos de sección para impresión ---------- */
    .print-section-title {
        display: block !important;
        font-size: 11pt;
        font-weight: bold;
        margin-bottom: 6pt;
        padding-bottom: 3pt;
        border-bottom: 1pt solid #333;
    }
}

/* Fuera de print: ocultar los títulos de sección de impresión */
.print-section-title {
    display: none;
}