:root {
  --primary: #4f46e5;
  --secondary: #0ea5e9;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "Segoe UI", Tahoma, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.container { padding: 16px; max-width: 1200px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.grid { display: grid; gap: 12px; }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
input, select, button, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
button { background: var(--primary); color: #fff; border: 0; cursor: pointer; }
button.secondary { background: #0f172a; }
button.danger { background: var(--danger); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 10px; text-align: left; font-size: 14px; }
.badge { display: inline-block; background: color-mix(in srgb, var(--primary) 12%, white); color: var(--primary); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.notice { padding: 10px; border-radius: 8px; margin-bottom: 12px; }
.notice.ok { background: #dcfce7; color: #166534; }
.notice.err { background: #fee2e2; color: #991b1b; }
.toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: #0f172a;
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .25);
  border: 1px solid rgba(255, 255, 255, .08);
  animation: toast-in .18s ease-out;
}
.toast.success { background: #166534; }
.toast.error { background: #991b1b; }
.toast.warning { background: #9a3412; }
.toast-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.toast-message { font-size: 13px; line-height: 1.35; }
.toast-actions { display: flex; gap: 8px; margin-top: 10px; }
.toast-btn {
  border: 0;
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  width: auto;
  min-width: 0;
  font-size: 12px;
}
.toast-btn.primary { background: #2563eb; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.text-muted { color: var(--muted); font-size: 13px; }
.global-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  z-index: 40;
}
body.has-footer .container { padding-bottom: 56px; }
@media (max-width: 768px) {
  .container { padding-bottom: 88px; }
  .global-footer { bottom: 0; }
  body.has-footer .container { padding-bottom: 120px; }
}

/* Sincroniza os heros com as cores definidas em Aparência */
[class$="-hero"],
[class*="-hero "] {
  background:
    radial-gradient(circle at 12% 16%, rgba(255,255,255,.2), transparent 34%),
    linear-gradient(128deg, #0f172a 0%, var(--primary) 46%, var(--secondary) 100%) !important;
  color: #fff;
}
