/* =========================================================
   ESPECIALISTAS UI — Design System (Light-first)
   Uso: shared em Cruzamento + Tabela Estatística
   ========================================================= */

:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe3ec;

  --a1: #0ea5e9; /* cyan/blue */
  --a2: #22d3ee;

  --radius: 16px;
  --radiusSm: 12px;

  --shadow1: 0 1px 0 rgba(0, 0, 0, 0.04);
  --shadow2: 0 8px 22px rgba(15, 23, 42, 0.08);

  --chipBg: #ffffff;
  --chipBd: #dbe3ec;
  --chipOnBg: rgba(14, 165, 233, 0.1);
  --chipOnBd: rgba(14, 165, 233, 0.28);

  --tableHeadBg: #f1f5f9;
  --tableHover: rgba(14, 165, 233, 0.08);
}

/* Page base */
html,
body {
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
}

/* Wrap default (SaaS feel) */
.wrap {
  width: min(92vw, 1280px);
  margin: 0 auto;
}

/* Header “produto” (barra + título + subtítulo) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 14px;
}

.page-title-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
}

.page-accent {
  width: 5px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(to bottom, var(--a1), var(--a2));
  flex: 0 0 auto;
}

.page-title {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.3px;
  margin: 0;
  line-height: 1.1;
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* Buttons */
.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  box-shadow: var(--shadow1);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: var(--shadow2);
}
.btn--ghost {
  background: transparent;
}
.btn--danger {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow: hidden;
}
.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(14, 165, 233, 0.12);
  color: #075985;
  border: 1px solid rgba(14, 165, 233, 0.22);
}

/* Filters / Chips */
.filters {
  padding: 14px;
}
.filters .label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #0f172a;
  opacity: 0.7;
}
.chip,
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--chipBd);
  background: var(--chipBg);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  user-select: none;
}
.chip.is-on,
.seg-btn.is-active {
  background: linear-gradient(
    90deg,
    rgba(14, 165, 233, 0.14),
    rgba(34, 211, 238, 0.1)
  );
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Table */
.table-wrap {
  overflow: auto;
  padding: 12px;
  background: linear-gradient(
    180deg,
    rgba(241, 245, 249, 0.65),
    rgba(241, 245, 249, 0.25)
  );
}
.sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.sheet thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--tableHeadBg);
  color: rgba(15, 23, 42, 0.86);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 10px;
  border-bottom: 2px solid rgba(15, 23, 42, 0.1);
}
.sheet tbody td {
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  padding: 8px 10px;
  font-size: 13px;
}
.sheet tbody tr:hover td {
  background: var(--tableHover);
}

/* Heatmap claro (mais contrastado, sem “lavar”) */
.sheet td.hm1 {
  background: rgba(239, 68, 68, 0.22);
}
.sheet td.hm2 {
  background: rgba(239, 68, 68, 0.12);
}
.sheet td.hm3 {
  background: transparent;
}
.sheet td.hm4 {
  background: rgba(34, 197, 94, 0.12);
}
.sheet td.hm5 {
  background: rgba(34, 197, 94, 0.22);
}

/* Density defaults (pode ajustar por página) */
.sheet th:first-child,
.sheet td:first-child {
  width: 44px;
  text-align: center;
}
.sheet th:nth-child(2),
.sheet td:nth-child(2) {
  min-width: 170px;
}
.sheet th.num,
.sheet td.num {
  width: 72px;
  min-width: 72px;
  text-align: center;
}

/* Responsive */
@media (max-width: 720px) {
  .wrap {
    width: min(94vw, 720px);
  }
  .page-title {
    font-size: 20px;
  }
  .page-subtitle {
    font-size: 12px;
  }
  .sheet tbody td {
    font-size: 12px;
  }
}
