/* Manual do Agiliza Auê — cores e fontes só de ../brand/tokens.css (--aue-*). Sem grafismo:
   a identidade está na tipografia, nas cores da marca e na "pulseira" de cada função. */
:root {
  --bg: var(--aue-bg);
  --fg: var(--aue-fg);
  --card: var(--aue-surface);
  --muted: var(--aue-muted);
  --line: color-mix(in srgb, var(--aue-fg) 13%, transparent);
  --line-strong: color-mix(in srgb, var(--aue-fg) 26%, transparent);
  --gutter: 16px;
  --top-h: 60px;
  --side-w: 290px;
  /* cor de cada função (pulseira) */
  --r-geral: var(--aue-muted);
  --r-admin: var(--aue-noite);
  --r-portaria: var(--aue-mata);
  --r-bar: #C98A00;
  --r-caixa: var(--aue-urucum);
  --r-comprador: var(--aue-magenta);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --r-admin: var(--aue-creme); --r-bar: var(--aue-sol); --r-portaria: #3FB27A; }
}
:root[data-theme="dark"] { --r-admin: var(--aue-creme); --r-bar: var(--aue-sol); --r-portaria: #3FB27A; }

[data-role] { --role-ink: #fff; }
[data-role="geral"] { --role: var(--r-geral); }
[data-role="bar"] { --role-ink: var(--aue-noite); }
[data-role="admin"] { --role-ink: var(--aue-creme); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-role="admin"] { --role-ink: var(--aue-noite); } }
:root[data-theme="dark"] [data-role="admin"] { --role-ink: var(--aue-noite); }
[data-role="admin"] { --role: var(--r-admin); }
[data-role="portaria"] { --role: var(--r-portaria); }
[data-role="bar"] { --role: var(--r-bar); }
[data-role="caixa"] { --role: var(--r-caixa); }
[data-role="comprador"] { --role: var(--r-comprador); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 var(--aue-font-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
b, strong { font-weight: 800; }
h1, h2, h3, h4 { font-family: var(--aue-font-display); line-height: 1.05; letter-spacing: -.01em; margin: 0; }
p { margin: 0 0 .9em; }
:focus-visible { outline: 3px solid var(--aue-magenta); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--aue-noite); color: var(--aue-creme); padding: 10px 14px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 10px; }

/* ---------- barra do topo ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex: 0 0 auto; }
.brand img { height: 28px; width: auto; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-dark { display: block !important; } :root:not([data-theme="light"]) .logo-light { display: none !important; } }
:root[data-theme="dark"] .logo-dark { display: block !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
.top-title { font: 700 1.05rem/1 var(--aue-font-display); padding: 4px 10px; border-radius: 999px; background: var(--line); }
.top-actions { margin-left: auto; display: flex; gap: 2px; }
@media (max-width: 420px) { .top { gap: 8px; } .top-title { display: none; } .brand img { height: 24px; } .icon-btn { width: 42px; } }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--fg); cursor: pointer; }
.icon-btn:hover { background: var(--line); }

/* ---------- layout ---------- */
.layout { display: block; }
main { padding: 0 var(--gutter) 64px; max-width: 880px; margin: 0 auto; outline: none; }

.side {
  position: fixed; z-index: 40; top: var(--top-h); bottom: 0; left: 0; width: min(92vw, 360px);
  background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; padding: 14px var(--gutter) 40px;
  transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 20px 50px -20px rgba(0,0,0,.45);
}
.side.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
.scrim { position: fixed; inset: var(--top-h) 0 0 0; z-index: 35; background: rgba(20,10,34,.45); }

@media (min-width: 1024px) {
  #btn-indice { display: none; }
  .layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .side { position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); width: auto; transform: none; box-shadow: none; background: transparent; }
  main { padding: 0 40px 80px; margin: 0; max-width: 940px; }
  .scrim { display: none; }
}

/* ---------- busca ---------- */
.search { position: relative; margin-bottom: 16px; }
.search input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line-strong);
  background: var(--bg); color: var(--fg); font: 600 1rem var(--aue-font-body);
}
.search input:focus { border-color: var(--aue-magenta); outline: none; }
.results { list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 30px -16px rgba(0,0,0,.4); }
.results a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.results a:hover, .results a:focus-visible { background: var(--line); }
.results b { display: block; font-size: .95rem; }
.results span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.35; }
.results mark { background: color-mix(in srgb, var(--aue-sol) 55%, transparent); color: inherit; border-radius: 3px; }
.results .empty { padding: 8px 10px; color: var(--muted); font-size: .9rem; }

/* ---------- índice ---------- */
.toc, .toc ol { list-style: none; margin: 0; padding: 0; }
.toc-sec { margin-bottom: 10px; }
.toc-sec > a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font: 700 1.02rem/1.2 var(--aue-font-display); text-decoration: none; }
.toc .band { width: 22px; height: 10px; border-radius: 999px; background: var(--role); flex: 0 0 auto; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg) 10%, transparent); }
.toc ol a { display: block; padding: 4px 8px 4px 40px; border-radius: 8px; font-size: .9rem; line-height: 1.3; color: var(--muted); text-decoration: none; }
.toc a:hover { background: var(--line); color: var(--fg); }
.toc a[aria-current="true"] { color: var(--fg); background: var(--line); font-weight: 800; }

/* ---------- abertura: pulseiras ---------- */
.hero { padding: 34px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.eyebrow { font: 800 .78rem/1 var(--aue-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--aue-magenta); margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4.2rem); font-weight: 800; margin-bottom: 14px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.bands { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .bands { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .bands { grid-template-columns: repeat(3, 1fr); } }
/* a pulseira: fita da cor da função com o "lacre" à esquerda */
.wristband {
  position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 68px;
  padding: 10px 16px 10px 58px; border-radius: 16px; text-decoration: none;
  background: var(--role); color: var(--role-ink);
  background-image: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.07) 14px 15px);
  box-shadow: 0 10px 22px -14px var(--role);
  transition: transform .12s ease;
}

.wristband::before { /* lacre */
  content: ''; position: absolute; left: 16px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 5px color-mix(in srgb, currentColor 30%, transparent);
}
.wristband b { font: 800 1.3rem/1.1 var(--aue-font-display); }
.wristband span { font-size: .9rem; opacity: .92; line-height: 1.3; }
.wristband:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .wristband { transition: none; } .wristband:hover { transform: none; } }
.hero-note { margin: 16px 0 0; font-size: .88rem; color: var(--muted); }

/* ---------- capítulos ---------- */
.chapter { padding-top: 40px; }
.chapter-head { position: relative; padding: 0 0 14px 20px; margin-bottom: 8px; }
.chapter-head::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 16px; width: 8px; border-radius: 999px; background: var(--role); }
.chapter-head .eyebrow { color: var(--role); }
.chapter h2 { font-size: clamp(1.9rem, 6.4vw, 2.9rem); font-weight: 800; margin-bottom: 10px; }
.sub { padding-top: 26px; }
.sub h3 { font-size: clamp(1.3rem, 4.4vw, 1.65rem); font-weight: 700; margin-bottom: 12px; position: relative; }
.sub h4 { font-size: 1.15rem; margin: 6px 0 8px; }
.anchor { position: absolute; left: -1.1em; opacity: 0; text-decoration: none; color: var(--muted); font-weight: 400; }
.sub h3:hover .anchor, .anchor:focus { opacity: 1; }

/* passos numerados (a ordem importa) */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps > li {
  counter-increment: s; position: relative; padding: 4px 0 18px 50px; margin: 0;
  display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr);
}
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font: 800 1.15rem/1 var(--aue-font-display);
  background: var(--role, var(--aue-urucum)); color: var(--role-ink, #fff);
}
.steps > li::after { content: ''; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.step-text { padding-top: 5px; }
.step-text p:last-child { margin: 0; }

figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.shot { display: block; text-decoration: none; }
.shot img { width: 100%; }
/* celular: moldura escura, largura de bolso */
.shot.phone { max-width: 250px; border-radius: 30px; padding: 7px; background: #120a1e; box-shadow: 0 16px 34px -18px rgba(20,10,34,.7), inset 0 0 0 1px rgba(255,255,255,.08); }
.shot.phone img { border-radius: 24px; }
/* computador: barra de janela */
.shot.desk { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--card); box-shadow: 0 16px 34px -22px rgba(20,10,34,.55); }
.shot.desk::before {
  content: ''; display: block; height: 20px; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 14px 10px, #E8531F 4px, transparent 4.5px), radial-gradient(circle at 28px 10px, #FFC23C 4px, transparent 4.5px), radial-gradient(circle at 42px 10px, #1F7A4D 4px, transparent 4.5px);
}
@media (min-width: 720px) {
  .steps > li:has(> figure .phone) { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
}

/* parede de vereditos */
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 16px; }
@media (min-width: 720px) { .phones { grid-template-columns: repeat(4, 1fr); } }
.phones .shot.phone { max-width: 100%; border-radius: 22px; padding: 5px; }
.phones .shot.phone img { border-radius: 18px; }

.two { display: grid; gap: 8px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }
.two .steps > li { grid-template-columns: minmax(0, 1fr) !important; padding-bottom: 12px; }

.ticks { margin: 0 0 12px; padding-left: 1.2em; }
.ticks li { margin-bottom: 6px; }

.note { margin: 8px 0 16px; padding: 12px 16px; border-radius: 14px; border-left: 6px solid var(--aue-urucum); background: color-mix(in srgb, var(--aue-urucum) 9%, var(--card)); }
.note.info { border-color: var(--aue-magenta); background: color-mix(in srgb, var(--aue-magenta) 8%, var(--card)); }
.note.tip { border-color: var(--aue-mata); background: color-mix(in srgb, var(--aue-mata) 10%, var(--card)); }
.note.warn { border-color: var(--aue-sol); background: color-mix(in srgb, var(--aue-sol) 22%, var(--card)); }
.note p { margin: 0; font-size: .96rem; }

table.plain { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: .95rem; display: block; overflow-x: auto; }
@media (min-width: 720px) { table.plain { display: table; } }
table.plain th, table.plain td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.faq details { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; font: 700 1.1rem/1.25 var(--aue-font-display); list-style-position: inside; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: 12px 16px 14px; margin: 0; }

.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

:target { animation: none; }
.flash { box-shadow: 0 0 0 4px color-mix(in srgb, var(--aue-sol) 60%, transparent); border-radius: 10px; }
