/* Cachuf — tokens e estilos compartilhados */
:root {
  --navy: #0b1f2a;
  --navy-2: #12303f;
  --ice: #edf4f7;
  --paper: #f4f1ea;
  --amber: #f2b33d;
  --brand: #0a6b92;
  --brand-700: #075676;
  --brand-800: #06455f;
  --brand-50: #e9f4f9;
  --brand-100: #d2e8f2;
  --brand-400: #2a9fd0;
  --night: #072a3b;
  --sky: #eaf5fb;
  --sky-2: #d5ebf6;
  --sun: #ffd166;
  --ink: #0e1e27;
  --muted: #52646e;
  --line: #e2e9ed;
  --bg: #f3f6f8;
  --card: #ffffff;
  --promo: #c2410c;
  --promo-50: #fff1e8;
  --ok: #15803d;
  --ok-700: #116a32;
  --danger: #b91c1c;
  --danger-50: #fdecec;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow-sm: 0 1px 2px rgba(16, 37, 48, .06), 0 1px 3px rgba(16, 37, 48, .06);
  --shadow-md: 0 8px 24px rgba(16, 37, 48, .10);
  --shadow-lg: 0 24px 60px rgba(16, 37, 48, .22);
  --font-head: 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 4px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: var(--ok-700); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-50); border-color: var(--brand-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--ink);
  transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--brand-50); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Campos ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .error { font-size: 13px; color: var(--danger); min-height: 0; }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-50); }
textarea.input { min-height: 96px; resize: vertical; }

/* ---------- Diálogos / sobreposição ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(9, 24, 32, .52);
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 70; left: 50%; top: 50%;
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  background: #fff; border-radius: 6px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, -46%) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .24s var(--ease), opacity .2s var(--ease);
}
.modal.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 18px 0 24px;
}
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 16px 24px 24px; }

.toast-wrap {
  position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: grid; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 4px;
  font-weight: 600; font-size: 15px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in .25s var(--ease);
}
.toast svg { width: 18px; height: 18px; color: #86efac; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) *, html:not(.force-motion) *::before, html:not(.force-motion) *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
