/* Simtro — componentes de UI compartilhados (botoes, badges, modal, card, tabela).
   Adaptado de simtro-design-system/components/**/*.jsx e ui_kits/portal/index.html
   para HTML/CSS puro (este projeto nao usa React). Depende de shared/tokens.css. */

/* ===== Ícones inline (ver shared/icons.js) ===== */
[data-icon], .icon-inline { display: inline-flex; vertical-align: -2px; }

/* ===== Botoes ===== */
.btn {
  font-family: var(--sim-font-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--sim-radius-btn);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { font-size: 12.5px; padding: 7px 14px; border-radius: 8px; }
.btn-lg { font-size: 15px; padding: 14px 26px; border-radius: 12px; }

.btn-primary { background: var(--sim-color-brand); color: #fff; box-shadow: var(--sim-shadow-sm); }
.btn-primary:hover { background: var(--sim-color-brand-hover); }
.btn-accent { background: var(--sim-accent); color: #fff; box-shadow: var(--sim-shadow-sm); }
.btn-accent:hover { background: var(--sim-accent-dark); }
.btn-secondary { background: #fff; color: var(--sim-slate-700); border: 1.5px solid var(--sim-slate-300); padding: 9.5px 18.5px; }
.btn-secondary:hover { border-color: var(--sim-slate-400); }
.btn-ghost { background: transparent; color: var(--sim-color-brand); }
.btn-ghost:hover { background: var(--sim-violet-50); }
.btn-danger { background: var(--sim-danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; }

.btn:disabled,
.btn[disabled] {
  background: var(--sim-slate-100);
  color: var(--sim-slate-400);
  border: none;
  box-shadow: none;
  cursor: not-allowed;
}

.btn:focus-visible { outline: none; box-shadow: var(--sim-focus-ring); }

/* ===== Badges ===== */
.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--sim-radius-pill);
  white-space: nowrap;
  display: inline-block;
}
.badge-neutral { background: var(--sim-slate-100); color: var(--sim-slate-600); border: 1px solid var(--sim-slate-200); }
.badge-brand   { background: var(--sim-violet-50); color: var(--sim-violet-700); border: 1px solid var(--sim-violet-100); }
.badge-info    { background: var(--sim-info-soft); color: var(--sim-business-dark); border: 1px solid var(--sim-business-border); }
.badge-success { background: var(--sim-success-soft); color: var(--sim-success-text); border: 1px solid var(--sim-view-border); }
.badge-warning { background: var(--sim-warning-soft); color: var(--sim-warning-text); border: 1px solid var(--sim-service-border); }
.badge-danger  { background: var(--sim-danger-soft); color: #B91C1C; border: 1px solid #FECACA; }

/* ===== Card ===== */
.card {
  background: var(--sim-color-surface);
  border: 1px solid var(--sim-color-border);
  border-radius: var(--sim-radius-card);
  box-shadow: var(--sim-shadow-sm);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22,22,26,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.modal-panel {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--sim-shadow-modal);
  overflow: hidden;
}
.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--sim-slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--sim-color-text); }
.modal-close {
  border: none;
  background: var(--sim-slate-50);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--sim-slate-500);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--sim-slate-100); }
.modal-body { padding: 26px; }
.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--sim-slate-100);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== Tabela ===== */
.sim-table { width: 100%; border-collapse: collapse; }
.sim-table th {
  text-align: left;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--sim-slate-600);
  border-bottom: 1px solid var(--sim-slate-100);
  white-space: nowrap;
  background: #FAFAFB;
}
.sim-table td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--sim-slate-50);
  color: var(--sim-slate-600);
}
