/* Identidade Rui Alexandre — tokens e componentes partilhados */
:root {
  --ink: #000;
  --paper: #fff;
  --ink-2: #1a1a1a;
  --ink-3: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --soft: #f4f4f4;
  --ok: #12a150;
  --ok-soft: #e7f6ee;
  --warn: #e8590c;
  --warn-soft: #fdf0e8;
  --wait: #6b6b6b;
  --wait-soft: #f1f1f1;
  --radius: 14px;
  --brand-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--brand-font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* Botões da marca */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; letter-spacing: .01em;
  transition: transform .12s ease, background .15s ease, opacity .15s ease; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--soft); }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.outline-light { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.6); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: #c92a2a; border-color: #f0c4c4; }
.btn.ok { background: var(--ok); border-color: var(--ok); }

.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(0,0,0,.06); }

/* Etiquetas de estado */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.pending { background: var(--wait-soft); color: var(--wait); }
.pill.approved { background: var(--ok-soft); color: var(--ok); }
.pill.changes { background: var(--warn-soft); color: var(--warn); }

/* Campos */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; background: var(--paper); outline: none; font-size: 14px;
  transition: border-color .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--ink); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  background: var(--ink); color: var(--paper); padding: 14px 18px; border-radius: 14px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; display: flex; gap: 10px; align-items: center;
}
.toast.in { opacity: 1; transform: none; }
.toast.ok svg { color: #4ade80; }
.toast.err { background: #c92a2a; }

/* Faixa de demonstração */
.demo-strip { background: #fff3bf; color: #5c4400; font-size: 12.5px; text-align: center; padding: 7px 16px; font-weight: 500; }
.demo-strip a { color: inherit; font-weight: 700; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(0,0,0,.12); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
