/* Cards, tabelas, badges, modal, toast. Depende de base.css. */
/* ---------- Componentes ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.muted {
  color: var(--text-muted);
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat .label {
  font-size: 13px;
  color: var(--text-muted);
}
.stat .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.table-wrap {
  overflow-x: auto;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,
.table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.table td.actions {
  text-align: right;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-ok {
  background: var(--success-bg);
  color: var(--success);
}
.badge-off {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge-admin {
  background: var(--warning-bg);
  color: var(--primary-dark);
}
.badge-neutral {
  background: #f1f5f9;
  color: var(--text-muted);
}

dialog.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 35%);
}
dialog.modal::backdrop {
  background: rgb(15 23 42 / 55%);
}
.modal h3 {
  margin: 0 0 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--graphite);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 1000;
}
.toast.error {
  background: var(--danger);
}
