/* BIMCORE — tokens e componentes comuns
   Identidade: o núcleo luminoso da marca (safira e ciano) sobre o grafite-azulado do emblema.
   Tema único escuro, por escolha de marca. */
:root {
  --bg: #070d16;
  --bg-2: #0b1421;
  --panel: #0f1b2b;
  --panel-2: #132238;
  --line: #1f3048;
  --line-2: #2b4161;
  --fg: #e6eef7;
  --muted: #8ea2bb;
  --faint: #5f7591;
  --cyan: #52d6f4;
  --sapphire: #2f6bff;
  --glow: rgba(82, 214, 244, 0.22);
  --ok: #3ccf91;
  --warn: #f2b134;
  --err: #f47272;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 6px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #8fe6fa; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 0.95rem/1 var(--body);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--sapphire); color: #fff; box-shadow: 0 0 0 0 var(--glow); }
.btn-primary:hover { color: #fff; background: #4479ff; box-shadow: 0 0 24px var(--glow); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--fg); border-color: var(--cyan); }
.btn-danger { background: transparent; color: var(--err); border-color: rgba(244, 114, 114, 0.4); }
.btn-danger:hover { color: var(--err); border-color: var(--err); }
.btn-sm { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* Formulários */
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%;
  font: 400 1rem/1.4 var(--body);
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}
textarea.input { min-height: 7rem; resize: vertical; }
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--glow); }
.input::placeholder { color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.hint { font-size: 0.82rem; color: var(--faint); }

/* Avisos */
.notice {
  border: 1px solid var(--line-2);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
}
.notice.warn { border-color: rgba(242, 177, 52, 0.45); }
.notice.ok { border-color: rgba(60, 207, 145, 0.45); }
.notice.err { border-color: rgba(244, 114, 114, 0.5); color: #ffd0d0; }

.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  z-index: 300; display: grid; gap: 0.5rem; width: min(92vw, 26rem);
}
.toast {
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--cyan);
  border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.toast.err { border-left-color: var(--err); }

.demo-bar {
  background: repeating-linear-gradient(135deg, rgba(242, 177, 52, 0.14) 0 12px, rgba(242, 177, 52, 0.06) 12px 24px);
  border-bottom: 1px solid rgba(242, 177, 52, 0.35);
  color: #f6d48a; font-size: 0.85rem; text-align: center; padding: 0.45rem 1rem;
}
