:root {
  --bg: #0d1420;
  --panel: #131c2b;
  --border: #22304a;
  --text: #e8eef7;
  --dim: #8494ab;
  --green: #17a34a;
  --red: #dc2626;
  --amber: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

/* ===== Header / filtros ===== */
.rep-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: var(--panel);
  border-bottom: 2px solid var(--border);
}
.rep-title { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.rep-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-left: auto; }
.rep-filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--dim); gap: 4px; }
.rep-filters input, .rep-filters select {
  background: #0f1826;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
}
.rep-filters button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.rep-filters button:hover { background: #1d4ed8; }

.rep-wrap { padding: 18px 22px 40px; }
h2 { font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; }

/* ===== Resumen por tripulación ===== */
.rep-resumen { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.rep-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 220px;
}
.rep-card .rc-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.rep-card .rc-big { font-size: 34px; font-weight: 800; line-height: 1; }
.rep-card .rc-big.green { color: var(--green); }
.rep-card .rc-big.amber { color: var(--amber); }
.rep-card .rc-big.red { color: var(--red); }
.rep-card .rc-sub { font-size: 12px; color: var(--dim); margin-top: 6px; }

/* ===== Tendencia ===== */
.rep-trend-box, .rep-table-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 22px;
}
.trend-legend { display: flex; gap: 18px; font-size: 13px; margin-bottom: 8px; }
.trend-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
#trend svg { width: 100%; height: 220px; }

/* ===== Tabla ===== */
.rep-table-wrap { overflow-x: auto; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th {
  text-align: left;
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.rep-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rep-table tr:hover td { background: #182338; }
.chip {
  display: inline-block;
  min-width: 86px;
  text-align: center;
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 700;
  color: #fff;
}
.chip.green { background: var(--green); }
.chip.red { background: var(--red); }
.chip.off { background: #2a3750; color: var(--dim); font-weight: 400; }
.chip small { display: block; font-size: 10px; font-weight: 400; opacity: .85; }
.score { font-weight: 800; }
.score.green { color: var(--green); }
.score.amber { color: var(--amber); }
.score.red { color: var(--red); }
.rep-empty { text-align: center; color: var(--dim); padding: 50px 0; font-size: 15px; }

@media (max-width: 700px) {
  .rep-filters { margin-left: 0; }
  .rep-title { font-size: 18px; }
}
