/**
 * css/consulta.css
 * Estilos de los accesos nuevos: Consulta (cifras, filtros de fecha, pestañas), fotos adjuntas (comprobantes y entrega)
 * y el recuadro de precio anual de la página de inicio.
 */

/* Cifras del día */
.cq-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.cq-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.cq-kpi small {
  display: block;
  color: var(--mute);
  font-size: 12px;
}
.cq-kpi b {
  font-size: 18px;
}
/* Filtros de fecha y pestañas */
.cq-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.cq-dates label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--mute);
}
.cq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.cq-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}
/* Fotos adjuntas */
.ph-pick {
  display: grid;
  gap: 8px;
}
.ph-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ph-th {
  position: relative;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
  cursor: pointer;
}
.ph-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ph-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #000a;
  color: #fff;
  cursor: pointer;
}
#photoDlg {
  padding: 8px;
  border: 0;
  border-radius: var(--r);
}
#photoDlg img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}
.ld-year {
  display: block;
  color: var(--mute);
  margin-top: -4px;
}

/* Gráficos (Dashboard e Informes): una serie = un color; con modo oscuro propio */
:root {
  --ch1: #2a78d6;
  --ch2: #eb6834;
  --ch3: #1baf7a;
  --chgrid: #e3e3ef;
}
html[data-theme='dark'] {
  --ch1: #3987e5;
  --ch2: #d95926;
  --ch3: #199e70;
  --chgrid: #34345a;
}
.gr-bars {
  display: grid;
  gap: 8px;
}
.gr-row {
  display: grid;
  grid-template-columns: minmax(90px, 30%) 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.gr-lab {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gr-track {
  background: var(--soft);
  border-radius: 0 6px 6px 0;
  height: 14px;
}
.gr-track i {
  display: block;
  height: 100%;
  background: var(--ch1);
  border-radius: 0 4px 4px 0;
}
.gr-val {
  min-width: 70px;
  text-align: right;
}
.gr-cols {
  width: 100%;
  height: auto;
}
.gr-grid {
  stroke: var(--chgrid);
  stroke-width: 1;
}
.gr-axis {
  stroke: var(--mute);
  stroke-width: 1;
}
.gr-col {
  fill: var(--ch1);
}
.gr-hit {
  fill: transparent;
}
.gr-hit:hover {
  fill: var(--soft);
}
.gr-tx {
  fill: var(--mute);
  font-size: 11px;
}
.gr-top {
  fill: var(--ink);
  font-weight: 700;
}
.gr-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.gr-card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.rp-opt td:first-child {
  padding-left: 28px;
  color: var(--mute);
}
.cq-link {
  font-size: 12px;
}
