:root {
  --blue: #1E6FFF;
  --blue-600: #0B5BD3;
  --blue-ink: #0A1B3D;
  --blue-tint: #EAF1FF;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --text: #101828;
  --text-soft: #5B6B7C;
  --line: #E3E8EF;
  --ok: #0F9D58;
  --ok-bg: #E7F6EE;
  --warn: #C77A00;
  --warn-bg: #FDF3E2;
  --danger: #D92D20;
  --danger-bg: #FEECEB;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(10, 27, 51, 0.06);
  --shadow-md: 0 10px 24px rgba(10, 27, 51, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Sem isto, qualquer regra `display` do nosso CSS venceria o atributo hidden
   e o elemento continuaria na tela. */
[hidden] { display: none !important; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.display { font-family: 'Sora', system-ui, sans-serif; }

.logo-img { height: 34px; width: auto; display: block; }

/* A marca tem texto azul-marinho: sobre fundo escuro ela vai dentro de uma pastilha clara. */
.logo-chip {
  display: inline-flex; align-items: center;
  background: #fff; border-radius: 10px; padding: 9px 14px;
}
.logo-chip img { height: 30px; width: auto; display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13.5px; border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { background: #fff; color: var(--text-soft); border-color: var(--line); }
.btn-ghost:hover { color: var(--blue); border-color: var(--blue); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #0C8449; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #FCD9D6; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text);
  outline: none; transition: border-color 0.15s ease;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.3px;
  padding: 4px 8px; border-radius: 5px; text-transform: uppercase;
}
.badge svg { width: 11px; height: 11px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-ink { background: var(--blue-ink); color: #fff; }
.badge-blue { background: var(--blue-tint); color: var(--blue); }

.skeleton {
  background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FC 50%, #EEF1F6 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state {
  text-align: center; padding: 56px 24px; color: var(--text-soft);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state svg { width: 34px; height: 34px; margin-bottom: 12px; color: #AAB7C7; }
.empty-state h3 { font-family: 'Sora', sans-serif; font-size: 16px; color: var(--blue-ink); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; }

.toast-host {
  position: fixed; bottom: 24px; right: 24px; z-index: 500;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--blue-ink); color: #fff; padding: 12px 16px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  font-size: 13.5px; font-weight: 600; animation: slide-in 0.2s ease;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.erro { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes slide-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
