/* Tokens e base compartilhados (design do mockup "Central de Ajuda Traus") */

:root {
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Inter Tight", "Instrument Sans", sans-serif;
  --ink: #0A0A0A;
  --ink-soft: #1C1917;
  --muted: #57534E;
  --faint: #8F8A85;
  --line: #E7E5E4;
  --surf: #FAFAF9;
  --shell: #F5F4F2;
  --ok-bg: #E7F1E9;
  --ok-fg: #1F6B37;
  --warn-bg: #F5EFE2;
  --warn-fg: #7A5A17;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

::selection { background: var(--ink); color: #fff; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }

input, textarea, button, select { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

/* ---- componentes compartilhados ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }

.btn--primary {
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.btn--primary:hover { background: var(--ink-soft); color: #fff; }

.btn--ghost { border: 0; background: transparent; color: var(--faint); }
.btn--ghost:hover { color: var(--ink); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge--ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge--warn { background: var(--warn-bg); color: var(--warn-fg); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  background: #fff;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.field .hint { font-size: 12px; color: var(--faint); margin-top: 4px; }

.form-errors {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.form-errors ul { margin: 4px 0 0; padding-left: 18px; }

.flash {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---- corpo de artigo renderizado (ActionText) ---- */

.article-body { font-size: 16.5px; line-height: 1.72; color: var(--ink-soft); }
.article-body p { margin: 0 0 20px; }
.article-body h2 {
  margin: 36px 0 12px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.article-body h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 600; }
.article-body blockquote {
  margin: 0 0 28px;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 16px 44px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  position: relative;
}
.article-body blockquote::before {
  content: "★";
  position: absolute;
  left: 20px;
  top: 16px;
  font-size: 14px;
  color: var(--ink);
}
.article-body ol { margin: 0 0 28px; padding-left: 26px; }
.article-body ol li { margin-bottom: 12px; }
.article-body ol li::marker { font-weight: 600; }
.article-body ul { margin: 0 0 24px; padding-left: 22px; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 28px;
  font-size: 14px;
  background: #fff;
}
.article-body th {
  background: var(--surf);
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 16px;
}
.article-body td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); }
.article-body td:first-child { color: var(--ink); font-weight: 500; }
.article-body img { max-width: 100%; border-radius: var(--radius); }
.article-body a { text-decoration: underline; }
.article-body .attachment { margin: 0 0 20px; }
.article-body .attachment img { display: block; }
.article-body figcaption { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

/* ---- telas de autenticação ---- */

.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: var(--shell);
}
.auth__card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.45);
}
.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth__logo { height: 20px; width: auto; display: block; }
.auth__brand-divider { width: 1px; height: 14px; background: var(--line); }
.auth__brand-label { font-size: 12.5px; color: var(--muted); }
.auth__title { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.auth__sub { margin: 0 0 24px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.auth__submit { width: 100%; margin-top: 4px; padding: 10px 16px; }
.auth__footer { margin-top: 20px; text-align: center; font-size: 13px; }
.auth__footer a { color: var(--muted); text-decoration: underline; }
.auth__footer a:hover { color: var(--ink); }
.auth__message {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 18px;
}
.auth__message--alert { background: var(--warn-bg); color: var(--warn-fg); }
.auth__message--notice { background: var(--ok-bg); color: var(--ok-fg); }
