/* ============================================================
   Prefeitura + Sócio — tokens e componentes compartilhados
   ============================================================ */

:root {
  color-scheme: light;

  /* Marca */
  --navy-950: #071f3d;
  --navy-900: #0a2a52;
  --navy-800: #0d3a75;
  --blue-700: #104281;
  --blue-600: #1c5cab;
  --blue-500: #2a78d6;
  --blue-400: #3987e5;
  --blue-100: #e3eefb;
  --blue-50:  #f0f6fd;
  --gold-400: #f6c445;

  /* Tinta */
  --ink:   #101828;
  --ink-2: #45505f;
  --ink-3: #68738a;
  --ink-inverse: #ffffff;

  /* Superfícies */
  --bg:      #f2f5fa;
  --surface: #ffffff;
  --line:    #e4e8f0;
  --line-strong: #d2d8e4;

  /* Status (semáforo) */
  --good:      #0ca30c;
  --good-text: #056b05;
  --good-bg:   #e9f7e9;
  --warn:      #fab219;
  --warn-text: #8a5a00;
  --warn-bg:   #fdf3dc;
  --crit:      #d03b3b;
  --crit-text: #a52424;
  --crit-bg:   #fbe9e9;

  /* Selos de origem */
  --selo-oficial-bg:   #e3eefb;
  --selo-oficial-text: #1c5cab;
  --selo-auto-bg:      #eef0f4;
  --selo-auto-text:    #566073;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 40px rgba(7, 31, 61, .16);

  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--blue-600); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Pills / selos ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill svg { flex: none; }

.selo-oficial { background: var(--selo-oficial-bg); color: var(--selo-oficial-text); }
.selo-auto    { background: var(--selo-auto-bg);    color: var(--selo-auto-text); }

.pill-good { background: var(--good-bg); color: var(--good-text); }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); }
.pill-crit { background: var(--crit-bg); color: var(--crit-text); }
.pill-blue { background: var(--blue-100); color: var(--blue-600); }
.pill-gold { background: #fdf0cd; color: #7a5800; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }

.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }

.btn-ghost {
  background: transparent;
  color: var(--blue-600);
  border: 1.5px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--blue-50); border-color: var(--blue-500); }

.btn-soft { background: var(--blue-100); color: var(--blue-700); }
.btn-soft:hover { background: #d3e4f8; }

.btn-done {
  background: var(--good-bg);
  color: var(--good-text);
  cursor: default;
}

.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 420px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy-950);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .25s cubic-bezier(.2, .9, .3, 1.2);
  max-width: 100%;
}
.toast.toast-out { animation: toast-out .25s ease forwards; }
.toast .toast-ico {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--good);
}
@keyframes toast-in  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(10px); } }

/* ---------- Utilidades ---------- */
.muted  { color: var(--ink-3); }
.small  { font-size: 12.5px; }
.hidden { display: none !important; }

::selection { background: #cfe3fa; }
