/* ── OS Reports ─────────────────────────────────────────────────────────── */

#os-reports-page {
  padding: 0 0 48px;
}

/* ── Filtros ── */
#os-reports-page .os-filters {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 0;
}

#os-reports-page .os-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 160px;
}

#os-reports-page .os-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

#os-reports-page .os-input {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--background-color-main-light);
  color: var(--text-primary);
  box-sizing: border-box;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#os-reports-page select.os-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

#os-reports-page input[type="date"].os-input {
  padding-right: 10px;
}

#os-reports-page .os-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

html.dark-theme #os-reports-page .os-input {
  background-color: var(--background-main-dark-mode, #1e293b);
  border-color: var(--border-dark-mode, #334155);
  color: var(--text-primary);
}

/* ── Range personalizado (exibido como linha) — ID duplo para vencer .os-filter-group ── */
#os-reports-page #os-rpt-custom-range {
  display: none;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  flex: 2 1 280px;
}

/* ── Cada campo de data dentro do range ── */
.os-rpt-date-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

/* ── Abas ── */
#os-reports-page .os-tabs {
  margin-top: 16px;
}

/* ── Botão de exportar CSV por aba ── */
.os-rpt-tab-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* ── Tabela técnico — colunas 2-7 center, 8-9 right ── */
#os-rpt-tab-technician .os-table th:nth-child(n+2):nth-child(-n+7),
#os-rpt-tab-technician .os-table td:nth-child(n+2):nth-child(-n+7) {
  text-align: center;
}

#os-rpt-tab-technician .os-table th:nth-child(n+8),
#os-rpt-tab-technician .os-table td:nth-child(n+8) {
  text-align: right;
}

/* ── Tabela cliente — colunas 8-9 right, 10 center ── */
#os-rpt-tab-client .os-table th:nth-child(8),
#os-rpt-tab-client .os-table th:nth-child(9),
#os-rpt-tab-client .os-table td:nth-child(8),
#os-rpt-tab-client .os-table td:nth-child(9) {
  text-align: right;
}

#os-rpt-tab-client .os-table th:nth-child(10),
#os-rpt-tab-client .os-table td:nth-child(10) {
  text-align: center;
}

/* ── Classes de cor para os dados ── */
.os-rpt-completed {
  color: #10b981;
}

.os-rpt-sla-bad {
  color: #ef4444;
  font-weight: 600;
}

.os-rpt-sla-ok {
  color: #10b981;
}
