/* === REPORTS TAB — reparaciones por pod/turno === */

.az-reports { max-width: 1100px; margin: 0 auto; padding: 4px 0 20px; }

.az-reports-topbar {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    margin-bottom: 10px; flex-wrap: wrap;
}
.az-reports-btn {
    font-size: 13px; padding: 7px 14px; border: 1px solid #ddd !important; border-radius: 8px;
    background: #fff; cursor: pointer; color: #444; display: inline-flex; align-items: center; gap: 6px;
    width: auto !important; margin: 0 !important;
}
.az-reports-btn:hover { border-color: #185FA5 !important; color: #185FA5 !important; }

/* --- Filtros: mismo patron compacto que Summary (segmented pill group) --- */
.az-reports-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.az-reports-range { display: flex; align-items: center; gap: 8px; }
.az-reports-range input[type="date"] {
    font-size: 12px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; background: #fff;
}
.az-reports-pillgroup {
    display: inline-flex; background: rgba(0,0,0,0.04); border-radius: 999px; padding: 4px; gap: 4px;
}
.az-reports-pill {
    border: none !important; background: transparent !important; color: #666;
    padding: 7px 14px !important; border-radius: 999px !important; font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap; display: inline-flex !important; width: auto !important;
    margin: 0 !important; align-items: center; gap: 5px; transition: all 0.15s ease;
}
.az-reports-pill:hover { color: #185FA5; }
.az-reports-pill.active { background: #185FA5 !important; color: #fff !important; }
/* Turnos activos toman el color de su propio turno, no el azul generico */
.az-reports-pillgroup[data-group="shift"] .az-reports-pill.active[data-shift="1"] { background: #4d9fff !important; }
.az-reports-pillgroup[data-group="shift"] .az-reports-pill.active[data-shift="2"] { background: #22c55e !important; }
.az-reports-pillgroup[data-group="shift"] .az-reports-pill.active[data-shift="3"] { background: #9b7ce8 !important; }

.az-reports-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; font-size: 12px; color: #888; }
.az-reports-legend-item { display: flex; align-items: center; gap: 4px; }
.az-reports-legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.az-reports-chartbox { position: relative; width: 100%; height: 300px; margin-bottom: 22px; }

/* --- Pod cards: compactas, un renglon por turno --- */
.az-reports-pods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}
.az-reports-pod-card {
    background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 10px 12px;
}
.az-reports-pod-name { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: #222; }
.az-reports-pod-shift-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px;
}
.az-reports-pod-shift-row:last-child { margin-bottom: 0; }
.az-reports-shift-badge {
    font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.az-reports-shift-badge.sh1 { background: #dbeeff; color: #185FA5; }
.az-reports-shift-badge.sh2 { background: #dcf7e3; color: #1a7d3a; }
.az-reports-shift-badge.sh3 { background: #ece3fb; color: #6b3fbd; }
.az-reports-pod-owners {
    width: 62px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444;
    font-weight: 500; cursor: default;
}
.az-reports-progress {
    flex: 1; height: 8px; border-radius: 4px; background: #eee; overflow: hidden; min-width: 40px;
}
.az-reports-progress-fill { display: block; height: 100%; border-radius: 4px; transition: width 0.2s ease; }
.az-reports-pod-pct { font-weight: 600; flex-shrink: 0; color: #666; width: 34px; text-align: right; }
.az-reports-pod-pct.high { color: #1a7d3a; }
.az-reports-pod-pct.low { color: #c0392b; }

/* ===================== DARK MODE ===================== */
body.dark-mode .az-reports-btn { background: #1e222a; border-color: #383d47 !important; color: #e2e4e8; }
body.dark-mode .az-reports-pillgroup { background: rgba(255,255,255,0.06); }
body.dark-mode .az-reports-pill { color: #a0a4ab; }
body.dark-mode .az-reports-pill:hover { color: #63b3f0; }
body.dark-mode .az-reports-legend { color: #a0a4ab; }
body.dark-mode .az-reports-range input[type="date"] { background: #1e222a; color: #e2e4e8; border-color: #383d47; }
body.dark-mode .az-reports-pod-card { background: #1e222a; border-color: #383d47; }
body.dark-mode .az-reports-pod-name { color: #f0f2f5; }
body.dark-mode .az-reports-pod-owners { color: #c3c6cc; }
body.dark-mode .az-reports-pod-pct { color: #a0a4ab; }
body.dark-mode .az-reports-shift-badge.sh1 { background: #16324f; color: #7cc0ff; }
body.dark-mode .az-reports-shift-badge.sh2 { background: #163a24; color: #6fe094; }
body.dark-mode .az-reports-shift-badge.sh3 { background: #2c2145; color: #c2a9f5; }

@media print {
    body * { visibility: hidden; }
    #reports-module, #reports-module * { visibility: visible; }
    #reports-module { position: absolute; left: 0; top: 0; width: 100%; }
    .az-reports-topbar, .az-reports-toolbar { display: none !important; }
}
