/* =====================================================================
   Plataforma EAD · folha de estilos única (público, aluno e admin)
   Direção: caderno de estudo. Azul de caneta sobre papel quadriculado,
   marca-texto amarelo como destaque de progresso e conquista.
   ===================================================================== */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
/* Algarismos da Bricolage (a Atkinson usa zero cortado, estranho em datas e cargas horárias) */
@font-face { font-family: "Digits"; src: url("../fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); font-weight: 400; unicode-range: U+0030-0039; font-display: swap; }
@font-face { font-family: "Digits"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; unicode-range: U+0030-0039; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #1F3A93;
  --ink-deep: #172C70;
  --ink-night: #101F52;
  --ink-soft: #E9EEFB;
  --ink-line: #C9D3F0;
  --paper: #F5F7FB;
  --surface: #FFFFFF;
  --graphite: #1E2430;
  --muted: #5B6478;
  --rule: #DCE1EC;
  --rule-strong: #C3CADA;
  --marker: #F5E04B;
  --marker-soft: #FBF3B5;
  --ok: #1E7A4C;
  --ok-soft: #E2F3E9;
  --warn: #8A5D00;
  --warn-soft: #FCF1D3;
  --danger: #B42318;
  --danger-soft: #FDECEA;

  --font-display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --font-body: "Digits", "Atkinson", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);

  --radius-s: 4px;
  --radius: 8px;
  --radius-l: 14px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1180px;
  --grid-size: 24px;
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink);
}

*, *::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;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--graphite);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }
p { margin: 0 0 1em; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
small { font-size: var(--step--1); }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-s); }

[hidden] { display: none !important; }
.icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.icon-lg { width: 1.6em; height: 1.6em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); z-index: 100; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 760px; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 1rem; }
.cluster { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.grid-paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: -1px -1px;
}

/* ------------------------------------------------------------ marca-texto */
.mark {
  background: linear-gradient(100deg, transparent .25em, var(--marker) .3em, var(--marker) calc(100% - .2em), transparent calc(100% - .1em)) 0 78% / 100% .55em no-repeat;
  padding: 0 .1em;
}
.progress {
  --value: 0%;
  position: relative;
  height: 10px;
  background: var(--ink-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress::after {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: var(--value);
  background: var(--marker);
  border-radius: 2px 6px 3px 2px;
  box-shadow: inset 0 -2px 0 rgba(138, 93, 0, .18);
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.progress[data-done="1"]::after { background: var(--ok); box-shadow: none; }
.progress-label { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--muted); margin-bottom: 6px; }
.progress-label strong { color: var(--graphite); font-family: var(--font-display); }

/* ------------------------------------------------------------ botões */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .55em 1.15em;
  font: 700 var(--step-0)/1.2 var(--font-body);
  color: var(--fg); background: var(--bg);
  border: 1.5px solid var(--bd); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { --bg: var(--ink-deep); --bd: var(--ink-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.btn-secondary { --bg: var(--surface); --fg: var(--ink); --bd: var(--ink-line); }
.btn-secondary:hover { --bg: var(--ink-soft); --bd: var(--ink); --fg: var(--ink-deep); }
.btn-ghost { --bg: transparent; --fg: var(--ink); --bd: transparent; }
.btn-ghost:hover { --bg: var(--ink-soft); --bd: transparent; --fg: var(--ink-deep); }
.btn-marker { --bg: var(--marker); --fg: var(--graphite); --bd: var(--marker); }
.btn-marker:hover { --bg: #EBD32F; --bd: #EBD32F; --fg: var(--graphite); }
.btn-danger { --bg: var(--surface); --fg: var(--danger); --bd: #F1B8B1; }
.btn-danger:hover { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
.btn-ok { --bg: var(--ok); --bd: var(--ok); }
.btn-ok:hover { --bg: #17613C; --bd: #17613C; }
.btn-sm { min-height: 34px; padding: .3em .8em; font-size: var(--step--1); }
.btn-lg { min-height: 52px; padding: .7em 1.5em; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ formulários */
.field { margin-bottom: 1.1rem; }
.field > label, .label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field .hint { font-size: var(--step--1); color: var(--muted); margin: .3rem 0 0; }
.input, .select, .textarea {
  width: 100%; min-height: 46px;
  padding: .6em .8em;
  font: inherit; color: var(--graphite);
  background: var(--surface);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 2.4em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6478' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7em center; background-size: 18px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink-soft); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: var(--step--1); font-weight: 700; margin: .35rem 0 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--ink); flex: none; }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); margin-bottom: .75rem; padding: 0; }

/* ------------------------------------------------------------ avisos */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid; margin-bottom: 1.25rem; }
.alert .icon { margin-top: .15rem; }
.alert p:last-child { margin: 0; }
.alert-success { background: var(--ok-soft); border-color: #A9D9BD; color: #12512F; }
.alert-error { background: var(--danger-soft); border-color: #F4B7B0; color: #8A1A12; }
.alert-warning { background: var(--warn-soft); border-color: #EBCF7E; color: #5E3F00; }
.alert-info { background: var(--ink-soft); border-color: var(--ink-line); color: var(--ink-deep); }

.badge { display: inline-flex; align-items: center; gap: .3em; padding: .15em .6em; font-size: .8125rem; font-weight: 700; border-radius: 999px; background: var(--ink-soft); color: var(--ink-deep); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: #EEF0F4; color: var(--muted); }
.badge-marker { background: var(--marker-soft); color: #5E4A00; }

/* ------------------------------------------------------------ cabeçalho público */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--graphite); font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 8px; height: 5px; background: var(--marker); border-radius: 2px; transform: rotate(-4deg); }
.brand-mark span { font-size: 1rem; line-height: 1; transform: translateY(-3px); }
.site-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.site-nav a.nav-link { padding: .5rem .75rem; text-decoration: none; color: var(--graphite); border-radius: var(--radius); font-weight: 700; }
.site-nav a.nav-link:hover { background: var(--ink-soft); color: var(--ink-deep); }
.site-nav a.nav-link[aria-current="page"] { color: var(--ink); background: linear-gradient(var(--marker), var(--marker)) .75rem calc(100% - .45rem) / calc(100% - 1.5rem) 4px no-repeat; }
.nav-toggle { display: none; margin-left: auto; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: .25rem; }
  .site-nav.is-open { display: flex; }
  .site-nav .btn { width: 100%; }
}

.demo-bar { background: var(--ink-night); color: #DDE4FA; font-size: var(--step--1); }
.demo-bar .container { display: flex; gap: .75rem; align-items: center; justify-content: center; min-height: 38px; flex-wrap: wrap; text-align: center; padding-top: 4px; padding-bottom: 4px; }
.demo-bar a { color: var(--marker); font-weight: 700; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--paper) 30%, rgba(245, 247, 251, .55) 60%, rgba(245, 247, 251, .1)); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; align-items: center; padding-top: clamp(2.5rem, 7vw, 5.5rem); padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { max-width: 13ch; margin-bottom: 1.25rem; }
.hero-lead { font-size: 1.1875rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.75rem; }
.hero-search { display: flex; gap: .5rem; max-width: 520px; background: var(--surface); padding: 6px; border: 1.5px solid var(--rule-strong); border-radius: 12px; }
.hero-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--ink-soft); }
.hero-search .input { border: 0; min-height: 46px; box-shadow: none !important; }
.hero-search .btn { flex: none; }
.hero-topics { margin-top: 1rem; font-size: var(--step--1); color: var(--muted); }
.hero-topics a { color: var(--graphite); font-weight: 700; margin-right: .35rem; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero::before { background: rgba(245, 247, 251, .82); } }

/* composição do hero: cartão de progresso sobre o certificado */
.hero-visual { position: relative; min-height: 360px; }
.hv-cert { position: absolute; right: 0; top: 0; width: min(100%, 420px); aspect-ratio: 1.414; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 30px 60px -35px rgba(16, 31, 82, .45); display: grid; grid-template-columns: 30% 1fr; overflow: hidden; transform: rotate(2deg); }
.hv-cert-band { background: var(--ink); border-right: 3px solid var(--marker); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.hv-seal { width: 54px; height: 54px; border-radius: 50%; background: var(--marker); display: grid; place-items: center; font: 800 .8rem var(--font-display); color: var(--ink); box-shadow: 0 0 0 5px rgba(255, 255, 255, .18); }
.hv-qr { width: 64px; background: #fff; padding: 5px; border-radius: 6px; }
.hv-cert-body { padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.hv-cert-body .t { font: 800 1.05rem var(--font-display); color: var(--ink); }
.hv-cert-body .n { font: 700 1.25rem/1.2 var(--font-display); margin-top: 10px; }
.hv-cert-body .l { height: 7px; border-radius: 4px; background: var(--rule); }
.hv-card { position: absolute; left: 0; bottom: 0; width: min(88%, 340px); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: 18px 18px 16px; box-shadow: 0 24px 48px -28px rgba(16, 31, 82, .5); }
.hv-card .k { font-size: var(--step--1); color: var(--muted); }
.hv-card .c { font: 700 1.05rem/1.25 var(--font-display); margin: 4px 0 14px; }
.hv-card .row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: var(--step--1); }
.hv-card .row .icon { color: var(--ok); }
@media (max-width: 900px) { .hero-visual { display: none; } }

/* ------------------------------------------------------------ seções */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: .4rem 0 0; color: var(--muted); max-width: 60ch; }
.surface-band { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ------------------------------------------------------------ cartões de curso */
.course-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.course-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.course-card:hover { border-color: var(--ink); }
.course-card:focus-within { box-shadow: var(--focus); }
.course-card h3 { font-size: 1.1875rem; margin: 0 0 .4rem; }
.course-card h3 a { color: var(--graphite); text-decoration: none; }
.course-card h3 a::after { content: ""; position: absolute; inset: 0; }
.course-card h3 a:focus-visible { box-shadow: none; }
.course-card .body { padding: 1.1rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.course-card .summary { color: var(--muted); font-size: .9375rem; margin: 0 0 1rem; }
.course-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: var(--step--1); color: var(--muted); margin-top: auto; }
.course-meta span { display: inline-flex; align-items: center; gap: .35em; }

/* capa tipográfica gerada por CSS: cor do curso + quadriculado + inicial da categoria */
.cover { --c: var(--ink); position: relative; aspect-ratio: 16 / 8; background-color: var(--c); background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 20px 20px; color: #fff; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-glyph { position: absolute; right: .04em; bottom: -.22em; font: 800 9rem/1 var(--font-display); letter-spacing: -0.06em; color: rgba(255, 255, 255, .16); user-select: none; }
.cover-cat { position: absolute; left: 1rem; top: .9rem; font-size: .8125rem; font-weight: 700; background: rgba(0, 0, 0, .22); padding: .2em .65em; border-radius: 999px; }
.cover-title { position: absolute; left: 1rem; right: 5.5rem; bottom: 1rem; font: 700 1.25rem/1.15 var(--font-display); letter-spacing: -0.01em; }
.cover-hours { position: absolute; right: 1rem; top: .8rem; font: 800 1.6rem/1 var(--font-display); text-align: right; }
.cover-hours small { display: block; font: 700 .75rem var(--font-body); opacity: .8; }
.cover-lg { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.cover-lg .cover-glyph { font-size: 14rem; }

/* ------------------------------------------------------------ passos */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 2px solid var(--graphite); }
.step { padding: 1.5rem 1.5rem 0 0; counter-increment: step; }
.step + .step { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.step::before { content: counter(step); display: block; font: 800 2.6rem/1 var(--font-display); color: var(--ink); margin-bottom: .9rem; }
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } .step { padding: 1.25rem 0; } }

.topic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: .75rem; list-style: none; padding: 0; margin: 0; }
.topic-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--graphite); font-weight: 700; }
.topic-list a:hover { border-color: var(--ink); color: var(--ink); }
.topic-list span { white-space: nowrap; font-weight: 400; color: var(--muted); font-size: var(--step--1); }

.validate-band { background: var(--ink); color: #fff; border-radius: var(--radius-l); padding: clamp(1.75rem, 4vw, 3rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; position: relative; overflow: hidden; }
.validate-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 28px solid rgba(245, 224, 75, .14); }
.validate-band h2 { color: #fff; }
.validate-band p { color: #C9D3F0; margin: 0; }
.validate-band .input { border-color: transparent; }
@media (max-width: 760px) { .validate-band { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ catálogo */
.page-head { padding: 2.5rem 0 1.5rem; }
.page-head h1 { font-size: var(--step-3); margin-bottom: .35rem; }
.page-head p { color: var(--muted); margin: 0; max-width: 64ch; }
.breadcrumb { font-size: var(--step--1); color: var(--muted); margin-bottom: .75rem; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--muted); }
.catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; padding-bottom: 4rem; align-items: start; }
.filters { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem; }
.filters h2 { font-size: 1.0625rem; margin-bottom: 1rem; }
.filter-group { border: 0; margin: 0 0 1.25rem; padding: 0; }
.filter-group legend { font-size: var(--step--1); font-family: var(--font-body); font-weight: 700; color: var(--muted); margin-bottom: .4rem; }
.filter-group .check { padding: .25rem 0; font-size: .9375rem; }
.catalog-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.catalog-bar .select { width: auto; min-height: 40px; }
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.is-open { display: block; }
  .filter-toggle { display: inline-flex; }
}
.empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); }
.empty .icon { width: 40px; height: 40px; color: var(--ink); margin: 0 auto 1rem; }
.empty h3 { margin-bottom: .4rem; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.25rem; }

.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 .6rem; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--surface); text-decoration: none; color: var(--graphite); font-weight: 700; }
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------ página do curso */
.course-hero { background: var(--surface); border-bottom: 1px solid var(--rule); }
.course-hero .container { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 3rem; padding-top: 2.25rem; padding-bottom: 2.5rem; }
.course-hero h1 { font-size: var(--step-4); margin-bottom: .75rem; max-width: 18ch; }
.course-hero .lead { font-size: 1.125rem; color: var(--muted); max-width: 56ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); margin: 1.5rem 0 0; background: var(--paper); }
.facts div { padding: .9rem 1rem; }
.facts div + div { border-left: 1px solid var(--rule); }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 0; font: 700 1.125rem var(--font-display); }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr 1fr; } .facts div:nth-child(3) { border-left: 0; } .facts div:nth-child(n+3) { border-top: 1px solid var(--rule); } }
.enroll-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: 1.25rem; position: sticky; top: 88px; }
.enroll-card .cover { border-radius: var(--radius); margin-bottom: 1.1rem; }
.enroll-card ul { list-style: none; padding: 0; margin: 1rem 0 0; font-size: .9375rem; }
.enroll-card li { display: flex; gap: .6rem; padding: .35rem 0; }
.enroll-card li .icon { color: var(--ok); margin-top: .2rem; }
@media (max-width: 900px) { .course-hero .container { grid-template-columns: 1fr; } .enroll-card { position: static; } }
.course-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 3rem; padding: 2.5rem 0 4rem; }
.course-body section + section { margin-top: 2.5rem; }
.course-body h2 { font-size: var(--step-2); }
@media (max-width: 900px) { .course-body { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.check-list li { display: flex; gap: .65rem; }
.check-list .icon { color: var(--ok); margin-top: .22rem; }
.prose { max-width: 68ch; }
.prose p, .prose li { line-height: 1.7; }
.prose h3 { margin-top: 1.75rem; font-size: 1.25rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .35rem; }

.curriculum { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.curriculum details + details { border-top: 1px solid var(--rule); }
.curriculum summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; cursor: pointer; font-weight: 700; }
.curriculum summary::-webkit-details-marker { display: none; }
.curriculum summary .icon { transition: transform .2s; color: var(--muted); }
.curriculum details[open] summary .icon { transform: rotate(180deg); }
.curriculum summary small { font-weight: 400; color: var(--muted); }
.curriculum ol { list-style: none; margin: 0; padding: 0 1.1rem 1rem; }
.curriculum li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-top: 1px dashed var(--rule); font-size: .9375rem; }
.curriculum li .grow { flex: 1; }
.curriculum li .icon { color: var(--muted); }

.instructor { display: flex; gap: 1rem; align-items: flex-start; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--ink-soft); color: var(--ink); display: grid; place-items: center; font: 700 1rem var(--font-display); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.6rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }

/* ------------------------------------------------------------ autenticação */
.auth { min-height: calc(100vh - 68px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside { background: var(--ink); color: #fff; padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 24px 24px; }
.auth-aside > * { position: relative; }
.auth-aside h2 { color: #fff; font-size: var(--step-3); max-width: 16ch; }
.auth-aside p { color: #C9D3F0; max-width: 40ch; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem var(--gutter); }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: var(--step-3); }
.auth-box .sub { color: var(--muted); margin-bottom: 1.75rem; }
.auth-foot { text-align: center; margin-top: 1.5rem; color: var(--muted); }
.demo-logins { border: 1.5px dashed var(--ink-line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; background: var(--ink-soft); }
.demo-logins p { margin: 0 0 .6rem; font-size: var(--step--1); color: var(--ink-deep); }
.demo-logins .cluster { gap: .5rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ------------------------------------------------------------ validação de certificado */
.verify { padding: 2.5rem 0 4rem; }
.verify-status { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.4rem; border-radius: var(--radius-l); margin-bottom: 1.5rem; border: 1.5px solid; }
.verify-status .icon { width: 36px; height: 36px; flex: none; }
.verify-status h1 { font-size: var(--step-2); margin: 0 0 .2rem; }
.verify-status p { margin: 0; }
.verify-ok { background: var(--ok-soft); border-color: #A9D9BD; color: #12512F; }
.verify-bad { background: var(--danger-soft); border-color: #F4B7B0; color: #8A1A12; }
.verify-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 2rem; align-items: start; }
.verify-grid img { border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.data-list { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.25rem; margin: 0; }
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; font-weight: 700; }
@media (max-width: 860px) { .verify-grid { grid-template-columns: 1fr; } }
.code { font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; }

/* ------------------------------------------------------------ rodapé */
.site-footer { background: var(--ink-night); color: #B9C4E6; padding: 3rem 0 2rem; font-size: .9375rem; margin-top: auto; }
.site-footer a { color: #E4E9F8; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h3 { font-size: 1rem; color: #fff; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--step--1); }
.site-footer .brand { color: #fff; margin-bottom: .75rem; }
.site-footer .link-btn { color: #E4E9F8; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

.app-body { min-height: 100vh; display: flex; flex-direction: column; }
.app-body > main { flex: 1; }

/* ------------------------------------------------------------ cookies e WhatsApp */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); padding: 1.1rem 1.2rem; box-shadow: 0 24px 60px -24px rgba(16, 31, 82, .45); }
.cookie-banner h2 { font-size: 1.0625rem; margin-bottom: .35rem; display: flex; gap: .5rem; align-items: center; }
.cookie-banner p { font-size: .9375rem; color: var(--muted); }
.cookie-banner .cluster { gap: .5rem; }
.cookie-banner[hidden] { display: none; }
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: #1E8E3E; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); }
.whatsapp-float .icon { width: 28px; height: 28px; }

/* =====================================================================
   ÁREA DO ALUNO
   ===================================================================== */
.student-head { background: var(--surface); border-bottom: 1px solid var(--rule); }
.student-head .container { padding-top: 2rem; padding-bottom: 1.75rem; display: flex; justify-content: space-between; gap: 1.5rem; align-items: end; flex-wrap: wrap; }
.student-head h1 { font-size: var(--step-3); margin: 0; }
.student-head p { margin: .3rem 0 0; color: var(--muted); }
.subnav { display: flex; gap: .25rem; overflow-x: auto; margin-top: 1.25rem; scrollbar-width: none; }
.subnav a { white-space: nowrap; padding: .55rem .9rem; border-radius: var(--radius); text-decoration: none; color: var(--muted); font-weight: 700; display: inline-flex; gap: .45rem; align-items: center; }
.subnav a:hover { background: var(--ink-soft); color: var(--ink-deep); }
.subnav a[aria-current="page"] { background: var(--ink); color: #fff; }

.resume { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); overflow: hidden; margin: 2rem 0; }
.resume .cover { aspect-ratio: auto; min-height: 210px; }
.resume-body { padding: 1.5rem 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.resume-body .k { color: var(--muted); font-size: var(--step--1); margin: 0; }
.resume-body h2 { font-size: var(--step-2); margin: .25rem 0 .5rem; }
.resume-body .next { margin: 0 0 1.25rem; }
.resume-body .progress-wrap { max-width: 420px; margin-bottom: 1.25rem; }
@media (max-width: 760px) { .resume { grid-template-columns: 1fr; } .resume .cover { min-height: 150px; } }

.enroll-list { display: grid; gap: 1rem; padding-bottom: 3rem; }
.enroll-item { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: .9rem; }
.enroll-item .cover { aspect-ratio: 16/9; border-radius: var(--radius-s); }
.enroll-item .cover-title, .enroll-item .cover-hours { display: none; }
.enroll-item .cover-glyph { font-size: 5rem; }
.enroll-item h3 { font-size: 1.125rem; margin: 0 0 .25rem; }
.enroll-item h3 a { color: var(--graphite); text-decoration: none; }
.enroll-item h3 a:hover { color: var(--ink); text-decoration: underline; }
.enroll-item .meta { color: var(--muted); font-size: var(--step--1); margin: 0 0 .65rem; }
.enroll-item .progress-wrap { max-width: 360px; }
@media (max-width: 760px) { .enroll-item { grid-template-columns: 96px minmax(0, 1fr); } .enroll-item .actions { grid-column: 1 / -1; } .enroll-item .actions .btn { width: 100%; } }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rule); margin: 1.5rem 0 1.25rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--graphite); border-color: var(--marker); }
.tabs a span { font-weight: 400; }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; padding-bottom: 3rem; }
.cert-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.cert-card img { width: 100%; aspect-ratio: 1.414; object-fit: cover; border-bottom: 1px solid var(--rule); background: var(--paper); }
.cert-card .body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.cert-card h3 { font-size: 1.0625rem; margin: 0; }
.cert-card .actions { margin-top: auto; padding-top: .75rem; display: flex; gap: .5rem; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.75rem); }
.panel + .panel { margin-top: 1.5rem; }
.panel h2 { font-size: var(--step-1); }
.panel-danger { border-color: #F4B7B0; }
.profile-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; padding: 2rem 0 4rem; align-items: start; }
@media (max-width: 860px) { .profile-layout { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ player */
.player-top { background: var(--ink-night); color: #fff; position: sticky; top: 0; z-index: 45; }
.player-top .bar { display: flex; align-items: center; gap: 1rem; min-height: 60px; padding: 0 var(--gutter); }
.player-top a { color: #fff; }
.player-top .title { font: 700 1rem/1.25 var(--font-display); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-top .prog { width: 220px; display: flex; align-items: center; gap: .75rem; font-size: var(--step--1); color: #C9D3F0; }
.player-top .prog .progress { flex: 1; background: rgba(255, 255, 255, .14); }
.player-top .btn-ghost { --fg: #fff; }
.player-top .btn-ghost:hover { --bg: rgba(255, 255, 255, .12); --fg: #fff; }
@media (max-width: 700px) { .player-top .prog { display: none; } }

.player { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: calc(100vh - 60px); }
.player-main { padding: 1.5rem clamp(16px, 3vw, 2.5rem) 3rem; min-width: 0; }
.player-side { background: var(--surface); border-left: 1px solid var(--rule); max-height: calc(100vh - 60px); overflow-y: auto; position: sticky; top: 60px; }
@media (max-width: 1000px) { .player { grid-template-columns: 1fr; } .player-side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--rule); } }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #0B1433; border-radius: var(--radius); overflow: hidden; }
.video-frame video, .video-frame iframe, .video-frame > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-status { display: flex; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: .9rem 0 1.5rem; font-size: var(--step--1); color: var(--muted); }
.video-status .watch { display: flex; align-items: center; gap: .6rem; min-width: 240px; }
.video-status .watch .progress { flex: 1; height: 8px; }
.lesson-head h1 { font-size: var(--step-3); margin-bottom: .25rem; }
.lesson-head p { color: var(--muted); margin-bottom: 1.25rem; }
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.materials { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.materials a { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--graphite); }
.materials a:hover { border-color: var(--ink); }
.materials .file-ico { width: 40px; height: 40px; border-radius: var(--radius-s); background: var(--ink-soft); color: var(--ink); display: grid; place-items: center; font: 800 .7rem var(--font-display); flex: none; }
.materials .grow { flex: 1; min-width: 0; }
.materials small { color: var(--muted); display: block; }
.text-lesson { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.5rem); }

.side-head { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--rule); }
.side-head h2 { font-size: 1rem; margin: 0 0 .6rem; }
.side-module { border-bottom: 1px solid var(--rule); }
.side-module summary { list-style: none; cursor: pointer; padding: .9rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; font-weight: 700; font-size: .9375rem; }
.side-module summary::-webkit-details-marker { display: none; }
.side-module summary small { display: block; font-weight: 400; color: var(--muted); }
.side-module summary .icon { color: var(--muted); transition: transform .2s; }
.side-module[open] summary .icon { transform: rotate(180deg); }
.side-items { list-style: none; margin: 0; padding: 0 0 .5rem; }
.side-items a { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 1.25rem .55rem 1.25rem; text-decoration: none; color: var(--graphite); font-size: .9375rem; line-height: 1.35; border-left: 3px solid transparent; }
.side-items a:hover { background: var(--paper); }
.side-items a[aria-current="page"] { background: var(--ink-soft); border-left-color: var(--ink); font-weight: 700; }
.side-items .icon { margin-top: .05rem; color: var(--rule-strong); }
.side-items .is-done .icon { color: var(--ok); }
.side-items .is-quiz .icon { color: var(--ink); }
.side-items small { display: block; color: var(--muted); font-weight: 400; margin-top: .15rem; }
.side-items .locked { opacity: .6; }

/* ------------------------------------------------------------ avaliação */
.quiz { max-width: 760px; }
.question { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem 1.35rem; margin-bottom: 1rem; }
.question legend { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 700; line-height: 1.45; display: flex; gap: .65rem; margin-bottom: .9rem; }
.question legend .num { font-family: var(--font-display); color: var(--ink); flex: none; }
.option { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .85rem; border: 1.5px solid var(--rule); border-radius: var(--radius); cursor: pointer; margin-top: .5rem; transition: border-color .15s, background-color .15s; }
.option:hover { border-color: var(--ink-line); background: var(--paper); }
.option input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--ink); flex: none; }
.option:has(input:checked) { border-color: var(--ink); background: var(--ink-soft); }
.option.is-right { border-color: #9CD3B4; background: var(--ok-soft); }
.option.is-wrong { border-color: #F4B7B0; background: var(--danger-soft); }
.result-score { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 1.5rem; border-radius: var(--radius-l); margin-bottom: 1.5rem; border: 1.5px solid; }
.result-score .num { font: 800 3.25rem/1 var(--font-display); }
.result-pass { background: var(--ok-soft); border-color: #A9D9BD; color: #12512F; }
.result-fail { background: var(--warn-soft); border-color: #EBCF7E; color: #5E3F00; }
.result-score h2 { margin: 0 0 .25rem; font-size: var(--step-2); }
.result-score p { margin: 0; }
.feedback { font-size: .9375rem; margin: .75rem 0 0; padding: .65rem .85rem; border-radius: var(--radius-s); background: var(--paper); color: var(--muted); }

.celebrate { text-align: center; padding: 2rem 1.5rem; background: var(--surface); border: 1.5px solid var(--marker); border-radius: var(--radius-l); margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.celebrate::before { content: ""; position: absolute; left: 50%; top: -80px; width: 360px; height: 160px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--marker-soft), transparent); }
.celebrate > * { position: relative; }
.celebrate h2 { font-size: var(--step-3); }

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: var(--paper); }
.admin-side { background: var(--ink-night); color: #C9D3F0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: start; }
.admin { background: linear-gradient(90deg, var(--ink-night) 252px, var(--paper) 252px); }
@media (max-width: 980px) { .admin { background: var(--paper); } }
.admin-side .brand { color: #fff; padding: 1.1rem 1.25rem; }
.admin-nav { padding: .5rem .75rem 1rem; display: grid; gap: 2px; }
.admin-nav .group { font-size: .75rem; font-weight: 700; color: #8592BD; padding: 1rem .6rem .35rem; }
.admin-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: var(--radius); color: #DCE3F8; text-decoration: none; font-weight: 700; font-size: .9375rem; }
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 var(--marker); }
.admin-nav .icon { color: #8592BD; }
.admin-nav a[aria-current="page"] .icon { color: var(--marker); }
.admin-side .side-foot { margin-top: auto; padding: 1rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: var(--step--1); }
.admin-side .side-foot a { color: #fff; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; gap: 1rem; min-height: 64px; padding: 0 clamp(16px, 3vw, 2rem); background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; }
.admin-top .who { margin-left: auto; display: flex; gap: .75rem; align-items: center; font-size: .9375rem; }
.admin-top .who small { display: block; color: var(--muted); line-height: 1.2; }
.admin-menu-btn { display: none; }
.admin-content { padding: clamp(16px, 3vw, 2rem); width: 100%; max-width: 1280px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-head h1 { font-size: var(--step-3); margin: 0; }
.admin-head p { margin: .3rem 0 0; color: var(--muted); }
@media (max-width: 980px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 70; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(16, 31, 82, .45); }
  .admin-menu-btn { display: inline-flex; }
}

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 1.5rem; }
.kpi { padding: 1.1rem 1.25rem; }
.kpi + .kpi { border-left: 1px solid var(--rule); }
.kpi dt { font-size: var(--step--1); color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.kpi dd { margin: .2rem 0 0; font: 800 1.9rem/1.1 var(--font-display); letter-spacing: -0.02em; }
.kpi .delta { font-size: var(--step--1); color: var(--muted); }
.kpi .delta strong { color: var(--ok); }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--rule); } }

.cols { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.cols-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .cols, .cols-even { grid-template-columns: minmax(0, 1fr); } }
.cols > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.card-head h2 { font-size: 1.0625rem; margin: 0; }
.card-head p { margin: .15rem 0 0; font-size: var(--step--1); color: var(--muted); }
.card-body { padding: 1.25rem; }
.card + .card { margin-top: 1.5rem; }
.cols > .card + .card, .cols > * + .card { margin-top: 0; }
.cols { align-items: start; }

.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-size: .8125rem; font-weight: 700; color: var(--muted); padding: .7rem 1rem; border-bottom: 1px solid var(--rule); white-space: nowrap; background: #FAFBFD; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a.row-link { font-weight: 700; color: var(--graphite); text-decoration: none; }
.table a.row-link:hover { color: var(--ink); text-decoration: underline; }
.table .sub { display: block; font-size: var(--step--1); color: var(--muted); }
.table .actions { text-align: right; white-space: nowrap; }
.person { display: flex; align-items: center; gap: .65rem; }

.toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); }
.toolbar .field { margin: 0; }
.toolbar .input, .toolbar .select { min-height: 40px; }
.toolbar .grow { flex: 1; min-width: 200px; }

.chart { width: 100%; height: auto; }
.chart text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; }
.chart .area { fill: var(--ink-soft); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.chart .bar { fill: var(--ink); }
.chart .bar-alt { fill: var(--marker); }
.chart-legend { display: flex; gap: 1rem; font-size: var(--step--1); color: var(--muted); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.hbar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.hbar-list .top { display: flex; justify-content: space-between; gap: 1rem; font-size: .9375rem; margin-bottom: .3rem; }
.hbar-list .top strong { font-family: var(--font-display); }
.hbar { height: 8px; background: var(--ink-soft); border-radius: 999px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: .75rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--rule); font-size: .9375rem; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); font-size: var(--step--1); white-space: nowrap; margin-left: auto; }

.builder-module { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 1rem; }
.builder-module > header { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.builder-module > header h3 { margin: 0; font-size: 1.0625rem; flex: 1; min-width: 160px; }
.builder-items { list-style: none; margin: 0; padding: .25rem 0; }
.builder-items li { display: flex; align-items: center; gap: .75rem; padding: .55rem 1.1rem; border-bottom: 1px dashed var(--rule); }
.builder-items li:last-child { border-bottom: 0; }
.builder-items .grow { flex: 1; min-width: 0; }
.builder-items .grow a { font-weight: 700; color: var(--graphite); text-decoration: none; }
.builder-items .grow a:hover { color: var(--ink); text-decoration: underline; }
.builder-items small { color: var(--muted); }
.handle { cursor: grab; color: var(--muted); background: none; border: 0; padding: .25rem; border-radius: var(--radius-s); }
.handle:active { cursor: grabbing; }
.is-dragging { opacity: .5; background: var(--ink-soft); }
.builder-foot { display: flex; gap: .5rem; padding: .75rem 1.1rem; border-top: 1px solid var(--rule); background: #FAFBFD; flex-wrap: wrap; border-radius: 0 0 var(--radius) var(--radius); }

.q-editor { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; background: var(--surface); }
.q-editor .opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; margin-top: .5rem; }
.q-editor .opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table input { width: 18px; height: 18px; accent-color: var(--ink); }

.tag-input-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline-form { display: inline; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 0; }
.dl-grid dt { font-size: var(--step--1); color: var(--muted); }
.dl-grid dd { margin: .1rem 0 0; font-weight: 700; }

/* erros */
.error-page { padding: 5rem 0; text-align: center; }
.error-page .status { font: 800 6rem/1 var(--font-display); color: var(--ink); letter-spacing: -0.04em; }
.error-page .status span { background: linear-gradient(var(--marker), var(--marker)) 0 85% / 100% .25em no-repeat; }
.error-page p { color: var(--muted); max-width: 48ch; margin: 1rem auto 1.75rem; }

@media print {
  .site-header, .site-footer, .cookie-banner, .whatsapp-float, .demo-bar, .no-print { display: none !important; }
  body { background: #fff; }
}

@media (max-width: 600px) {
  .admin-top { gap: .5rem; }
  .admin-top .who > span:not(.avatar), .admin-top > .badge { display: none; }
  .admin-head .cluster { width: 100%; }
}
