/* Portal Vértice — tokens e base.
   Identidade oficial: roxo + amarelo sobre preto (ver img/logo.png). */
:root {
  --ink: #0b0b0f;
  --ink-2: #353546;
  --ink-3: #6c6c80;
  --line: #e6e4ef;
  --paper: #ffffff;
  --paper-2: #f6f4fb;
  --brand: #6d3fd4;          /* roxo Vértice */
  --brand-dark: #5330a8;
  --brand-soft: #efe9fb;
  --accent: #f2b705;         /* amarelo Vértice */
  --accent-dark: #d9a100;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --danger: #c0392b;
  --font-head: "Montserrat", "Archivo", Arial, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-ui: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 6px;
  --max: 1180px;
  --shadow: 0 2px 10px rgba(11, 11, 15, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; }
.brand-name { font-size: 24px; line-height: 1; text-transform: uppercase; letter-spacing: .02em; color: var(--brand); }
.brand-name small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.brand-name small em { font-style: normal; color: var(--accent); }

/* Botões */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; line-height: 1; }
.btn:hover { background: #000; text-decoration: none; }
.btn-brand { background: var(--brand); border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 7px 11px; font-size: 13px; }
.btn[disabled], .btn.is-future { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); }

/* Chips / etiquetas */
.kicker { display: inline-block; font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.kicker::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--ed, var(--brand)); transform: rotate(45deg) translateY(-1px); }
.tag { display: inline-block; padding: 3px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pub { background: #e3f4ea; color: var(--ok); }
.badge-draft { background: #fff4d6; color: var(--warn); }
.badge-sim { background: var(--brand-soft); color: var(--brand-dark); }
.meta { color: var(--ink-3); font-size: 13px; }
.meta b { color: var(--ink-2); font-weight: 600; }

/* Formulários */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 12px; color: var(--ink-3); }
.field .error { font-size: 12px; color: var(--danger); display: none; }
.field.has-error .error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.input, input[type=text], input[type=search], input[type=url], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { min-height: 120px; resize: vertical; }
.req::after { content: " *"; color: var(--brand); }

/* Toast */
.toast-host { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 14px; animation: toast-in .2s ease; }
.toast-ok { background: var(--ok); }
.toast-err { background: var(--danger); }
.toast-info { background: var(--brand-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Estados vazios */
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-3); background: var(--paper-2); }
.empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 18px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(11,11,15,.6); display: none; align-items: center; justify-content: center; z-index: 900; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 10px; width: min(100%, 460px); padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* Aviso de demo */
.notice { padding: 10px 14px; border-left: 4px solid var(--accent); background: #fffbea; color: #5c4a00; font-size: 13px; border-radius: 0 var(--radius) var(--radius) 0; }
.notice-future { border-left-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
