.eq-page {
  --eq-head-bg:     var(--c-surface-alt);
  --eq-head-bg-alt: var(--c-border);
  --eq-row-alt:     var(--c-surface-alt);
  --eq-row-hover:   var(--c-accent-soft);
  --eq-control-h:   32px;
}

/* ============================================================
   Layout
   ============================================================ */

.eq-page {
  width: 100%;
  padding: var(--sp-4);
  font-family: inherit;
  font-size: var(--fs-base);
  line-height: 1.4;
  color: var(--c-text);
  background: var(--c-surface);
  box-sizing: border-box;
  overflow-x: hidden;
}

.eq-content {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  width: 100%;
  box-sizing: border-box;
}

.eq-col-left {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 0 0 380px;
  max-width: 380px;
  min-width: 0;
}

.eq-col-main {
  flex: 1 1 auto;
  min-width: 0;
}

.eq-panel {
  min-width: 0;
  overflow: hidden;
  background: var(--c-surface);
}

/* ============================================================
   Tabelas — base
   ============================================================ */

.eq-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-surface);
}

.eq-table th,
.eq-table td {
  box-sizing: border-box;
  padding: var(--sp-1) var(--sp-2);
  text-align: center;
  vertical-align: middle;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.25;
}

.eq-table th {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  line-height: 1.15;
  background: var(--eq-head-bg);
}

.eq-table thead tr:first-child th { background: var(--eq-head-bg-alt); }

.eq-main-table tbody tr:nth-child(even) td { background: var(--eq-row-alt); }
.eq-main-table tbody tr:hover td           { background: var(--eq-row-hover); }

/* ============================================================
   Coluna esquerda — tabelas compactas
   ============================================================ */

.eq-col-left .eq-table,
.eq-col-left .eq-stats-table { font-size: var(--fs-xs); }

.eq-col-left .eq-table th,
.eq-col-left .eq-table td,
.eq-col-left .eq-stats-table td {
  padding: 3px 5px;
  font-size: var(--fs-xs);
  line-height: 1.2;
}

.eq-col-left .eq-table th,
.eq-col-left .eq-stats-table thead th {
  font-size: var(--fs-2xs);
  letter-spacing: 0;
}

.eq-col-left .eq-stats-label,
.eq-col-left .eq-col-desc { font-size: var(--fs-2xs); letter-spacing: 0; }

.eq-col-left .eq-stats-value,
.eq-col-left .eq-col-strong { font-size: var(--fs-xs); }

.eq-col-left .eq-col-desc { padding-left: 5px; }

.eq-col-left .eq-empty {
  padding: var(--sp-2);
  font-size: var(--fs-xs);
}

/* ============================================================
   Células específicas
   ============================================================ */

.eq-c { text-align: center; white-space: normal; }

.eq-col-strong {
  font-weight: var(--fw-semibold);
  color: var(--c-accent);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-col-desc {
  padding-left: var(--sp-2);
  font-size: var(--fs-xs);
  line-height: 1.3;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-col-num {
  padding-right: var(--sp-2);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eq-cell-right {
  padding-right: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Stats table
   ============================================================ */

.eq-stats-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-surface);
}

.eq-stats-table td {
  box-sizing: border-box;
  padding: var(--sp-1) var(--sp-2);
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.25;
}

.eq-stats-table tbody tr:nth-child(even) td { background: var(--eq-row-alt); }

.eq-stats-table thead th {
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .05em;
  text-align: center;
  color: var(--c-text);
  background: var(--eq-head-bg-alt);
  border: 1px solid var(--c-border-strong);
}

.eq-stats-label {
  font-weight: var(--fw-semibold);
  text-align: left;
  white-space: normal;
  background: var(--eq-head-bg);
}

.eq-stats-value {
  text-align: right;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Tags
   ============================================================ */

.eq-tag {
  display: inline-block;
  padding: 2px var(--sp-2);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .03em;
  border-radius: 999px;
}

.eq-tag-seco {
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
}

.eq-tag-nova {
  color: var(--c-success-text);
  background: var(--c-success-bg);
  border: 1px solid var(--c-success);
}

.eq-tag-exist {
  color: var(--c-text-muted);
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-strong);
}

/* ============================================================
   Estado vazio
   ============================================================ */

.eq-empty {
  padding: var(--sp-4);
  font-style: italic;
  text-align: center;
  color: var(--c-text-muted);
}

/* ============================================================
   Filtros
   ============================================================ */

.eq-filters-panel {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r-sm);
}

.eq-filter {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 0 1 auto;
  min-width: 180px;
}

.eq-filter-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-text-muted);
}

.eq-select {
  min-width: 180px;
  min-height: var(--eq-control-h);
  padding: var(--sp-1) var(--sp-2);
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.eq-select:hover { border-color: var(--c-text-subtle); }

.eq-select:focus-visible {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}

.eq-reset-btn {
  min-height: var(--eq-control-h);
  align-self: flex-end;
  padding: var(--sp-1) var(--sp-3);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.eq-reset-btn:hover:not(:disabled) {
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
}

.eq-reset-btn:disabled { opacity: .5; cursor: not-allowed; }

.eq-reset-btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ============================================================
   Acessibilidade
   ============================================================ */

.eq-table :focus-visible,
.eq-table:focus-visible,
.eq-stats-table :focus-visible,
.eq-stats-table:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (forced-colors: active) {
  .eq-table th,
  .eq-table td,
  .eq-stats-table td {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
  }

  .eq-table th,
  .eq-stats-label {
    background: Canvas;
    font-weight: var(--fw-bold);
  }
}

/* ============================================================
   Responsivo
   ============================================================ */

@media (max-width: 1200px) {
  .eq-col-left {
    flex: 0 0 320px;
    max-width: 320px;
  }
}

@media (max-width: 1024px) {
  .eq-page {
    --eq-pad-x: var(--sp-2);
    --eq-pad-y: var(--sp-1);
    padding: var(--sp-3);
  }

  .eq-content  { gap: var(--sp-3); }
  .eq-col-left { gap: var(--sp-2); flex: 0 0 280px; max-width: 280px; }
}

@media (max-width: 768px) {
  .eq-content {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .eq-col-left,
  .eq-col-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  .eq-filters-panel {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
  }

  .eq-filter,
  .eq-select {
    width: 100%;
    min-width: 0;
  }

  .eq-reset-btn { width: 100%; }

  .eq-table th,
  .eq-table td {
    padding: 3px var(--sp-1);
    font-size: var(--fs-xs);
    line-height: 1.2;
  }

  .eq-table th { font-size: var(--fs-2xs); }
}