/* Aularis Design System · Mosaico v1.1 — components (typography, buttons, blocks, forms, navigation, feedback, data...).
 * Our own CSS (translated to English from the v2 package; see docs/DESIGN_SYSTEM.md).
 * Load order is a contract: fonts.css → tokens.css → components.css → layouts.css → builder.css.
 * Names follow the glossary in backend/apps/core/ds_glossary.py; comments may stay pt-BR.
 */
/* ---------- 6. Tipografia ---------- */
h1, h2, h3, h4 { color: var(--title, inherit); }
.t-display, .t-h1, .t-h2, .t-h3, .t-h4, .card__title, .course__title { color: var(--title, inherit); }
.card--inverse, .card--accent, .action-bar, .toast, .stage, .brand-media, .hero, .player-mini { --title: currentColor; }
.t-display { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -.02em; }
.t-h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
.t-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.01em; }
.t-h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.25; }
.t-h4 { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 1.3; }
.t-lead { font-size: 18px; line-height: 1.6; color: var(--text-muted); }
.t-body { font-size: 16px; }
.t-small { font-size: 14px; line-height: 1.5; }
.t-caption { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.t-overline { font-family: var(--font-text); font-weight: 900; font-size: 11.5px; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.t-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.t-muted { color: var(--text-muted); }
.t-faint { color: var(--text-faint); }
.link { color: var(--brand-2); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; font-weight: 700; }
.link:hover { text-decoration-color: var(--accent); }

/* ---------- 8. Logo / marcador / padrões ---------- */
.logo { display: inline-block; height: calc(var(--w, 112px) * .262); width: auto; aspect-ratio: var(--logo-ratio, 1958 / 513); background: var(--logo) left center / contain no-repeat; flex: none; }
.logo--black { background-image: url("../../img/ds/logo-black.png"); aspect-ratio: 1958 / 513; }
.logo--yellow { background-image: url("../../img/ds/logo-yellow.png"); aspect-ratio: 1958 / 513; }
.symbol { width: var(--w, 32px); height: var(--w, 32px); border-radius: 22%; background: url("../../img/ds/symbol.png") center / cover; flex: none; }
html[data-tenant-custom] .symbol:not(.symbol--aularis) { background: var(--symbol-img) center / contain no-repeat; border-radius: 0; }
.marker {               /* a fita com ponta em chevron — elemento assinatura */
  --mw: 14px; --mh: 20px;
  width: var(--mw); height: var(--mh); background: var(--mc, var(--yellow)); flex: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}
.marker--black { --mc: #000; }
.marker--indigo { --mc: var(--indigo); }
.pattern { -webkit-mask: var(--p) center / var(--ps, 180px) repeat; mask: var(--p) center / var(--ps, 180px) repeat; background: var(--pc, #000); }
.pattern--waves { --p: var(--p-waves); }
.pattern--diagonal { --p: var(--p-diagonal); }
.pattern--dots { --p: var(--p-dots); }
.stripes { background-image: repeating-linear-gradient(-45deg, var(--stripe) 0 6px, transparent 6px 12px); }

/* ---------- 9. Botões ---------- */
.btn {
  --bh: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--bh); padding: 0 20px; border: 0; border-radius: var(--r-ctrl);
  font-family: var(--font-text); font-weight: 700; font-size: 15px; letter-spacing: .005em; white-space: nowrap;
  text-decoration: none; cursor: pointer; position: relative; isolation: isolate; overflow: hidden;
  background: var(--surface-2); color: var(--text);
  transition: transform var(--d-2) var(--ease), background-color var(--d-2) var(--ease), box-shadow var(--d-3) var(--ease), color var(--d-2);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn .lucide { width: 18px; height: 18px; transition: transform var(--d-3) var(--ease); }
.btn:hover .lucide--arrow, .btn:hover [data-lucide="arrow-right"] + *, .btn:hover .arrow { transform: translateX(3px); }
/* Fundo = `--accent-action` (acento escurecido 8%): garante AA com `--accent-text`.
   Medido em prod: primário do tenant #6366f1 + branco = 4.47 (< 4.5) → 5.18 com o token. */
.btn--primary { background: var(--accent-action); color: var(--accent-text); }
.btn--primary:hover { box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn--strong { background: var(--inverse); color: var(--inverse-text); }
.btn--tonal { background: var(--surface-2); color: var(--text); }
.btn--tonal:hover { background: var(--surface-3); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--error-bg); color: var(--error); }
.btn--danger-strong { background: var(--error); color: #fff; }
[data-theme="dark"] .btn--danger-strong { color: #000; }
.btn--sm { --bh: 36px; padding: 0 14px; font-size: 14px; }
.btn--lg { --bh: 54px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn--loading { color: transparent !important; pointer-events: none; }
.btn--loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--accent-text) transparent var(--accent-text) transparent; animation: spin .8s linear infinite; }
.btn-icon {
  --bh: 44px; width: var(--bh); height: var(--bh); display: inline-grid; place-items: center; border: 0; padding: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); color: var(--text); position: relative; flex: none; text-decoration: none;
  transition: transform var(--d-2) var(--ease), background-color var(--d-2);
}
.btn-icon:hover { background: var(--surface-3); transform: translateY(-1px); }
.btn-icon:active { transform: scale(.94); }
.btn-icon--strong { background: var(--inverse); color: var(--inverse-text); }
.btn-icon--strong:hover { background: var(--inverse); }
.btn-icon--sm { --bh: 36px; }

/* ---------- 10. Chips, badges, tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text-muted); font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: background-color var(--d-3) var(--ease), color var(--d-3) var(--ease), transform var(--d-2) var(--ease);
}
.chip:hover { color: var(--text); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip.active { background: var(--inverse); color: var(--inverse-text); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 700 12.5px/1 var(--font-text); white-space: nowrap; background: var(--surface-2); color: var(--text-muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge--no-dot::before { display: none; }
.badge--in-progress { background: color-mix(in srgb, var(--yellow) 30%, var(--surface)); color: color-mix(in srgb, var(--yellow) 35%, #000); }
[data-theme="dark"] .badge--in-progress { background: color-mix(in srgb, var(--yellow) 16%, #111); color: var(--yellow); }
.badge--completed { background: var(--success-bg); color: var(--success); }
.badge--draft { background: var(--surface-2); color: var(--text-muted); }
.badge--published { background: var(--info-bg); color: var(--info); }
.badge--error { background: var(--error-bg); color: var(--error); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--accent { background: var(--accent); color: var(--accent-text); }
.badge--strong { background: var(--inverse); color: var(--inverse-text); }
.type { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-mini); background: var(--surface-2); color: var(--text); flex: none; }
.type--video { background: color-mix(in srgb, var(--yellow) 32%, var(--surface)); color: #000; }
.type--text { background: color-mix(in srgb, var(--lilac) 30%, var(--surface)); color: var(--indigo); }
.type--activity { background: color-mix(in srgb, var(--amber) 28%, var(--surface)); color: color-mix(in srgb, var(--amber) 45%, #000); }
.type--assessment { background: color-mix(in srgb, var(--indigo) 18%, var(--surface)); color: var(--indigo); }
.type--live { background: var(--error-bg); color: var(--error); }
.type--file { background: var(--surface-2); color: var(--text-muted); }
[data-theme="dark"] .type--video { color: var(--yellow); background: color-mix(in srgb, var(--yellow) 16%, #111); }
[data-theme="dark"] .type--text, [data-theme="dark"] .type--assessment { color: var(--lilac); background: color-mix(in srgb, var(--indigo) 30%, #111); }
[data-theme="dark"] .type--activity { color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, #111); }
.kbd { font: 700 11px/1 var(--font-text); padding: 4px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); }

/* ---------- 11. Blocos (cards) · REGRA DOS BLOCOS ---------- */
.card {
  --tile: var(--block-neutral);
  background: var(--tile); border-radius: var(--r-card); padding: var(--cp, 24px);
  position: relative; color: var(--text);
  /* dentro do bloco, os "poços" (campos, linhas, chips) são branco translúcido */
  --surface-2: rgb(255 255 255 / .62); --surface-3: rgb(255 255 255 / .92); --field-bg: rgb(255 255 255 / .7);
  transition: transform var(--d-3) var(--ease), background-color var(--d-3);
}
[data-theme="dark"] .card:not(.card--inverse):not(.card--accent) { --surface-2: rgb(255 255 255 / .06); --surface-3: rgb(255 255 255 / .11); --field-bg: rgb(255 255 255 / .07); }
.card--primary { --tile: var(--block-primary); }
.card--secondary { --tile: var(--block-secondary); }
.card--highlight { --tile: var(--block-highlight); }
.card--primary, .card--secondary, .card--highlight { --text-muted: color-mix(in srgb, var(--text) 80%, transparent); --text-faint: color-mix(in srgb, var(--text) 72%, transparent); }
.card--inverse { --tile: var(--inverse); color: var(--inverse-text); --surface-2: color-mix(in srgb, var(--inverse-text) 12%, transparent); --surface-3: color-mix(in srgb, var(--inverse-text) 20%, transparent); --text: var(--inverse-text); --text-muted: color-mix(in srgb, var(--inverse-text) 70%, transparent); --text-faint: color-mix(in srgb, var(--inverse-text) 62%, transparent); }
.card--accent { --tile: var(--accent); color: var(--accent-text); --surface-2: color-mix(in srgb, var(--accent-text) 10%, transparent); --surface-3: color-mix(in srgb, var(--accent-text) 16%, transparent); --text: var(--accent-text); --text-muted: color-mix(in srgb, var(--accent-text) 76%, transparent); --text-faint: color-mix(in srgb, var(--accent-text) 68%, transparent); }
.card--inverse .link, .card--accent .link { color: inherit; }
.card--interactive { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.card--interactive:hover { transform: translateY(-4px) rotate(-.5deg); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--title, inherit); }
.card__sub { display: block; font-size: 12.5px; line-height: 1.4; color: var(--text-muted); font-family: var(--font-text); font-weight: 400; margin-top: 2px; }

/* card de curso */
.course { padding: 8px; overflow: hidden; display: flex; flex-direction: column; }
.course__cover { aspect-ratio: 16 / 8.5; position: relative; overflow: hidden; background: var(--cc, var(--cream)); border-radius: calc(var(--r-card) - 8px); }
.course__cover img { width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 30% 60%); transition: transform var(--d-5) var(--ease); }
.course:hover .course__cover img { transform: scale(1.05); }
.course__cover .marker { z-index: 1; position: absolute; top: 0; right: 18px; transition: height var(--d-3) var(--ease); }
.course:hover .course__cover .marker { --mh: 46px; }
.course__body { padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course__title { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.25; }

/* stat */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-muted); font-weight: 700; }
.stat__delta { font-size: 12.5px; font-weight: 700; color: var(--success); }
.stat__delta--negative { color: var(--error); }
.stat__delta--neutral { color: var(--text-muted); }

/* ---------- 12. Progresso ---------- */
.bar { height: var(--bh, 8px); border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative; }
.card--accent .bar, .card--inverse .bar { background: color-mix(in srgb, currentColor 16%, transparent); }
.bar > span { display: block; height: 100%; width: var(--v, 40%); border-radius: inherit; background: var(--bc, var(--inverse)); transform-origin: left; animation: fill var(--d-5) var(--ease) both; }
.bar--accent > span { --bc: var(--accent); }
.bar--thick { --bh: 40px; }
.bar--thick > span { display: flex; align-items: center; padding-left: 14px; font-weight: 900; font-size: 13px; color: var(--inverse-text); white-space: nowrap; overflow: visible; }
.bar--thick.bar--accent > span { color: var(--accent-text); }
.bar--striped > span { background: transparent; background-image: repeating-linear-gradient(-45deg, var(--stripe) 0 6px, transparent 6px 12px); background-size: 200% 100%; animation: fill var(--d-5) var(--ease) both, stripe-slide 3.2s linear infinite; color: var(--text) !important; }
.ring { --t: 64px; --v: 62; width: var(--t); height: var(--t); border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--ac, var(--accent)) calc(var(--v) * 1%), var(--surface-2) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ring-bg, var(--surface-solid)); }
.ring > span { position: relative; font-weight: 900; font-size: 14px; }
.segments { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; }
.segments > i { height: 8px; border-radius: 99px; background: var(--surface-2); }
.segments > i.done { background: var(--inverse); }
.segments > i.current { background: var(--accent); }

/* frequência semanal */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); font-weight: 700; }
.day i { width: 100%; max-width: 38px; height: auto; aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: transparent; transition: transform var(--d-3) var(--ease-spring); }
.day.done i { background: var(--accent); color: var(--accent-text); }
.day.today i { box-shadow: inset 0 0 0 2px var(--text); }
.day.done:hover i { transform: scale(1.1) rotate(-6deg); }

/* stepper */
.steps { display: flex; gap: 8px; counter-reset: step; }
.step { flex: 1; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--text-faint); }
.step::before { content: ""; height: 6px; border-radius: 99px; background: var(--surface-3); }
.step.done { color: var(--text-muted); }
.step.done::before { background: var(--inverse); }
.step.current { color: var(--text); }
.step.current::before { background: var(--accent); }
.step b { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: block; color: inherit; }

/* ---------- 13. Formulários (sem bordas: preenchimento tonal) ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-weight: 700; font-size: 14px; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.field__label small { font-weight: 400; color: var(--text-faint); font-size: 13px; }
.field__help { font-size: 13px; color: var(--text-muted); }
.field__error { font-size: 13px; color: var(--error); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.input {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: var(--r-field);
  background: var(--field-bg, var(--surface-2)); color: var(--text); font: 400 15.5px var(--font-text);
  box-shadow: inset 0 0 0 0 transparent; outline: none;
  transition: background-color var(--d-2) var(--ease), box-shadow var(--d-2) var(--ease);
}
.input::placeholder { color: var(--text-faint); }
.input:hover { background: var(--surface-3); }
.input:focus { background: var(--surface-solid); box-shadow: inset 0 0 0 2px var(--text), 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent); }
.input[aria-invalid="true"] { background: var(--error-bg); box-shadow: inset 0 0 0 2px var(--error); }
textarea.input { height: auto; min-height: 120px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
select.input { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23777' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.input-icon { position: relative; }
.input-icon > .lucide { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.input-icon > .input { padding-left: 46px; }
.input-icon > .kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.search { height: 44px; border-radius: 999px; background: var(--surface); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { appearance: none; margin: 1px 0 0; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; cursor: pointer; flex: none; transition: background-color var(--d-2) var(--ease), transform var(--d-2) var(--ease-spring); }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--d-3) var(--ease-spring); }
.check input:checked { background: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--accent-text); transform: scale(0); }
.check input[type="radio"]:checked::after { transform: scale(1); }
.check input:active { transform: scale(.88); }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; margin: 0; transition: background-color var(--d-3) var(--ease); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-solid); box-shadow: 0 2px 6px rgb(0 0 0 / .2); transition: transform var(--d-3) var(--ease-spring), background-color var(--d-3); }
.switch:checked { background: var(--inverse); }
.switch:checked::after { transform: translateX(18px); background: var(--accent); }
.option-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-mini); background: var(--surface-2); cursor: pointer; transition: background-color var(--d-2), box-shadow var(--d-2), transform var(--d-2) var(--ease); }
.option-card:hover { background: var(--surface-3); }
.option-card:has(input:checked) { background: var(--surface-solid); box-shadow: inset 0 0 0 2px var(--text); }
.option-card input { margin-top: 2px; }
.dropzone { border-radius: var(--r-card); padding: 28px; display: grid; place-items: center; text-align: center; gap: 10px; background: var(--surface-2); position: relative; overflow: hidden; transition: background-color var(--d-3); }
.dropzone::before { content: ""; position: absolute; inset: 10px; border-radius: calc(var(--r-card) - 8px); background-image: repeating-linear-gradient(90deg, var(--stripe) 0 10px, transparent 10px 18px), repeating-linear-gradient(90deg, var(--stripe) 0 10px, transparent 10px 18px), repeating-linear-gradient(0deg, var(--stripe) 0 10px, transparent 10px 18px), repeating-linear-gradient(0deg, var(--stripe) 0 10px, transparent 10px 18px); background-size: 100% 2px, 100% 2px, 2px 100%, 2px 100%; background-position: top, bottom, left, right; background-repeat: no-repeat; pointer-events: none; }
.dropzone:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }

/* ---------- 14. Navegação ---------- */
.segmented { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface-2); position: relative; isolation: isolate; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented button, .segmented a { position: relative; z-index: 1; border: 0; background: transparent; height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--text-muted); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color var(--d-3) var(--ease); }
.segmented button:hover:not([aria-selected="true"]):not(.active) { color: var(--text); }
.segmented [aria-selected="true"], .segmented .active { color: var(--inverse-text); }
.segmented .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--inverse); transition: transform var(--d-4) var(--ease), width var(--d-4) var(--ease); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { border: 0; background: transparent; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--text-muted); cursor: pointer; white-space: nowrap; position: relative; text-decoration: none; transition: color var(--d-2), background-color var(--d-2); }
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs [aria-selected="true"] { color: var(--text); }
.tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 4px; border-radius: 99px; background: var(--accent); animation: tab-in var(--d-3) var(--ease) both; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--text-muted); list-style: none; padding: 0; margin: 0; }
.breadcrumbs a { text-decoration: none; padding: 4px 8px; border-radius: 8px; transition: background-color var(--d-2); }
.breadcrumbs a:hover { background: var(--surface-2); color: var(--text); }
.breadcrumbs li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); opacity: .55; margin-right: 6px; display: inline-block; vertical-align: middle; }
.breadcrumbs [aria-current] { color: var(--text); padding: 4px 8px; }
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 12px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14.5px; color: var(--text-muted); background: transparent; transition: background-color var(--d-2), color var(--d-2); }
.pagination a:hover:not([aria-current="page"]) { background: var(--surface); color: var(--text); }
.pagination [aria-current="page"] { background: var(--inverse); color: var(--inverse-text); }

/* ---------- 15. Listas sem linhas / tabela ---------- */
.list { display: flex; flex-direction: column; gap: 6px; list-style: none; padding: 0; margin: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-mini); background: var(--surface-2); text-decoration: none; color: inherit; transition: background-color var(--d-2) var(--ease), transform var(--d-3) var(--ease); }
.row:hover { background: var(--surface-3); }
.row__body { flex: 1; min-width: 0; }
.row__title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { font-size: 13px; color: var(--text-muted); }
.table-wrap { position: relative; overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14.5px; min-width: 640px; }
.table th { text-align: left; font: 900 11px/1 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); padding: 8px 14px 10px; white-space: nowrap; }
.table td { padding: 12px 14px; background: transparent; transition: background-color var(--d-2); }
.table tbody tr:nth-child(odd) td { background: var(--surface-2); }
.table tbody tr:hover td { background: var(--surface-3); }
.table td:first-child { border-radius: var(--r-mini) 0 0 var(--r-mini); }
.table td:last-child { border-radius: 0 var(--r-mini) var(--r-mini) 0; }
.avatar { --t: 36px; width: var(--t); height: var(--t); border-radius: 50%; display: inline-grid; place-items: center; font-weight: 900; font-size: calc(var(--t) * .36); background: var(--av, var(--lilac)); color: #000; flex: none; }
.avatars { display: flex; }
.avatars .avatar { box-shadow: 0 0 0 3px var(--surface-solid); }
.avatars .avatar + .avatar { margin-left: -6px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14.5px; margin: 0; }
.meta dt { color: var(--text-muted); }
.meta dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- 16. Acordeão ---------- */
.accordion { display: flex; flex-direction: column; gap: 6px; }
.accordion__item { border-radius: var(--r-mini); background: var(--surface-2); transition: background-color var(--d-3); }
.accordion__item.open { background: var(--surface-3); }
.accordion__button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; background: transparent; cursor: pointer; text-align: left; font-weight: 700; font-size: 15.5px; }
.accordion__button .chev { margin-left: auto; transition: transform var(--d-4) var(--ease); color: var(--text-muted); }
.open .accordion__button .chev { transform: rotate(180deg); }
.accordion__panel { padding: 0 16px 16px; color: var(--text-muted); font-size: 14.5px; }

/* ---------- 17. Feedback ---------- */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-mini); font-size: 16px; line-height: 1.5; background: var(--info-bg); color: var(--text); }
.notice > .lucide { color: var(--info); margin-top: 2px; width: 20px; height: 20px; }
.notice--success { background: var(--success-bg); } .notice--success > .lucide { color: var(--success); }
.notice--error { background: var(--error-bg); } .notice--error > .lucide { color: var(--error); }
.notice--warning { background: var(--warning-bg); } .notice--warning > .lucide { color: var(--warning); }
.notice b { display: block; }
.notice .t-caption { color: inherit; opacity: .85; }
.notice__actions { margin-top: 8px; }
.toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: center; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--inverse); color: var(--inverse-text); box-shadow: var(--shadow-float); animation: toast-in var(--d-4) var(--ease) both; }
.toast .glyph { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.toast p { flex: 1; font-size: 14.5px; }
.toast p b { display: block; }
.tooltip { position: relative; display: inline-flex; }
.tooltip__bubble { position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 4px; opacity: 0; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--inverse); color: var(--inverse-text); font-size: 13px; font-weight: 700; white-space: nowrap; transition: opacity var(--d-2), translate var(--d-3) var(--ease); }
.tooltip:hover .tooltip__bubble, .tooltip:focus-within .tooltip__bubble, .tooltip__bubble.pinned { opacity: 1; translate: -50% 0; }
.empty { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 40px 24px; border-radius: var(--r-card); background: var(--block-primary); position: relative; overflow: hidden; }
.empty__art { width: min(420px, 100%); height: 110px; background: url("../../img/ds/desk-illustration.png") center bottom / auto 100% no-repeat; }
.skeleton { --skel-1: color-mix(in srgb, var(--text) 7%, transparent); --skel-2: color-mix(in srgb, var(--text) 14%, transparent); border-radius: 10px; background: linear-gradient(90deg, var(--skel-1) 0 40%, var(--skel-2) 50%, var(--skel-1) 60% 100%); background-size: 300% 100%; animation: shimmer 1.4s var(--ease-io) infinite; }

/* ---------- 18. Sobreposições ---------- */
.veil { position: fixed; inset: 0; z-index: 80; background: rgb(10 10 10 / .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: calc(var(--r-card) + 4px); background: var(--surface-solid); padding: 28px; box-shadow: var(--shadow-float); position: relative; }
.drawer { position: fixed; z-index: 81; top: 10px; right: 10px; bottom: 10px; width: min(420px, calc(100vw - 20px)); border-radius: calc(var(--r-card) + 4px); background: var(--surface-solid); box-shadow: var(--shadow-float); padding: 24px; overflow: auto; }
.menu { position: absolute; z-index: 30; min-width: 220px; padding: 6px; border-radius: 16px; background: var(--surface-solid); box-shadow: var(--shadow-float); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; text-align: left; font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer; color: var(--text); }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .danger { color: var(--error); }
.menu hr { border: 0; height: 6px; margin: 0; }

/* ---------- 20. Bento ---------- */
.bento { display: grid; gap: var(--gap); grid-template-columns: repeat(12, 1fr); }
.bento > * { min-width: 0; }
.c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; } .c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; } .c-12 { grid-column: span 12; }
@media (max-width: 1180px) { .c-3 { grid-column: span 6; } .c-4, .c-5 { grid-column: span 6; } .c-7, .c-8 { grid-column: span 12; } }
@media (max-width: 720px) { .bento > * { grid-column: span 12 !important; } }

/* ==========================================================================
   27. COMPONENTES v1.0 — um componente por item + lacunas encontradas na
   revisão dos 291 templates do repositório (ver 07 · Cobertura)
   ========================================================================== */

/* ---- contador: o MESMO em chips, abas, itens do menu, botões-ícone e títulos de bloco */
.counter { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font: 900 11px/1 var(--font-text); font-style: normal; letter-spacing: 0; text-transform: none; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text-muted); flex: none; }
.counter--alert { background: var(--accent); color: var(--accent-text); }
.btn-icon > .counter { position: absolute; top: -3px; right: -3px; box-shadow: 0 0 0 2px var(--canvas); }
:is(.chip.active, .chip[aria-pressed="true"], .segmented [aria-selected="true"]) .counter { background: color-mix(in srgb, currentColor 20%, transparent); color: inherit; }

/* ---- selo: ícone de diálogo (excluir, confirmar, enviar arquivo, sucesso, em breve) — tamanho único */
.seal { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text); }
.seal .lucide { width: 24px; height: 24px; }
.seal--danger { background: var(--error-bg); color: var(--error); }
.seal--success { background: var(--success-bg); color: var(--success); }
.seal--strong { background: var(--inverse); color: var(--inverse-text); }
.seal--accent { background: var(--accent); color: var(--accent-text); }

/* ---- número: posição/ordem (módulos, etapas, ranking, decisões) */
.number { width: 34px; height: 34px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; font: 600 15px/1 var(--font-display); background: var(--inverse); color: var(--inverse-text); font-variant-numeric: tabular-nums; }
.number--muted { background: var(--surface-2); color: var(--text); }

/* ---- avatar: 4 tamanhos fixos (sem tamanho livre) */
.avatar--sm { --t: 28px; } .avatar--lg { --t: 52px; } .avatar--xl { --t: 88px; }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* ---- botão-ícone: superfície de poço; variantes forte e fantasma */
.btn-icon--ghost { background: transparent; color: inherit; }
.btn-icon--ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

/* ---- barra fina (dentro de linhas, árvore e uploads) */
.bar--thin { --bh: 6px; }

/* ---- tipos de arquivo (mesma peça do .type de conteúdo) */
.type--pdf { background: var(--error-bg); color: var(--error); }
.type--image { background: color-mix(in srgb, var(--lilac) 30%, var(--surface-solid)); color: var(--indigo); }
.type--spreadsheet { background: var(--success-bg); color: var(--success); }
.type--doc { background: var(--info-bg); color: var(--info); }
[data-theme="dark"] .type--image { color: var(--lilac); background: color-mix(in srgb, var(--indigo) 30%, #111); }

/* ---- pessoa (avatar + nome + e-mail) — tabela, conversa, ranking */
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.person b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- tabela de dados: ordenação, seleção, ações; no celular cada linha vira um bloco */
.table th[aria-sort] { cursor: pointer; }
.table th[aria-sort] .lucide { width: 13px; height: 13px; vertical-align: -2px; margin-left: 4px; opacity: .45; }
.table th[aria-sort="ascending"] .lucide, .table th[aria-sort="descending"] .lucide { opacity: 1; color: var(--text); }
.table .td-check { width: 44px; }
.table .td-check .check { display: inline-flex; }
.table .td-actions { width: 1%; white-space: nowrap; text-align: right; }
.table .td-actions .cluster { justify-content: flex-end; flex-wrap: nowrap; --s: 4px; }
.table .td-num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr.selected td { background: color-mix(in srgb, var(--accent) 24%, transparent) !important; }
.table td .bar { min-width: 90px; }
.table td .mono { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .table--responsive { min-width: 0; border-spacing: 0; }
  .table--responsive thead { display: none; }
  .table--responsive tbody { display: flex; flex-direction: column; gap: 6px; }
  .table--responsive tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--r-mini); background: var(--surface-2); }
  .table--responsive td { display: block; padding: 0; background: transparent !important; border-radius: 0 !important; }
  .table--responsive .td-check { grid-column: 1; grid-row: 1; width: auto; }
  .table--responsive .td-main { grid-column: 2; grid-row: 1; }
  .table--responsive .td-actions { grid-column: 3; grid-row: 1; width: auto; }
  .table--responsive td[data-label] { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; text-align: right; }
  .table--responsive td[data-label]::before { content: attr(data-label); color: var(--text-muted); font-weight: 700; text-align: left; }
  .table--responsive td[data-label] .bar { flex: 1; max-width: 140px; }
  .table-wrap:has(.table--responsive) { overflow: visible; margin: 0; padding: 0; }
}

/* ---- campo com ação (copiar, mostrar senha, enviar) */
.input-action { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: var(--r-field); background: var(--field-bg, var(--surface-2)); transition: background-color var(--d-2), box-shadow var(--d-2); }
/* campo interno (campo com ação e alternativa em edição): um só desenho */
:is(.input-action, .choice--editing) .input { height: 36px; background: transparent !important; box-shadow: none !important; flex: 1; min-width: 0; padding: 0 12px; }
.input-action:focus-within { background: var(--surface-solid); box-shadow: inset 0 0 0 2px var(--text), 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---- campo de cor (Configurações › Personalização e painel "Aparência da escola") */
.color-field { display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 14px; background: var(--surface-2); cursor: pointer; min-width: 0; }
.color-field input { appearance: none; -webkit-appearance: none; width: 34px; height: 34px; border: 0; padding: 0; border-radius: 10px; cursor: pointer; flex: none; background: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.color-field input::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input::-webkit-color-swatch { border: 0; border-radius: 10px; }
.color-field input::-moz-color-swatch { border: 0; border-radius: 10px; }
.color-field span { min-width: 0; display: flex; flex-direction: column; }
.color-field b { font-size: 12.5px; line-height: 1.2; }
.color-field code { font: 11.5px ui-monospace, monospace; color: var(--text-muted); }
.color-field small { font-size: 11px; color: var(--text-faint); line-height: 1.25; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }

/* ---- upload: zona (.dropzone), arquivo enviado, foto de perfil */
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: var(--r-mini); background: var(--surface-2); min-width: 0; }
.file-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.file-item__body b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item__body small { font-size: 12.5px; color: var(--text-muted); }
.profile-photo { position: relative; width: 88px; height: 88px; flex: none; }
.profile-photo .btn-icon { position: absolute; right: -4px; bottom: -4px; box-shadow: 0 0 0 3px var(--tile, var(--surface-solid)); }

/* ---- seleção extra */
.check small { display: block; font-size: 12.5px; color: var(--text-muted); }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.option-row > span b { display: block; }
.option-row > span small { display: block; font-size: 12.5px; color: var(--text-muted); }

/* ---- editor de texto rico (Editor.js) — mesmo poço dos campos */
.editor { position: relative; min-height: 200px; padding: 18px 20px 18px 58px; border-radius: var(--r-field); background: var(--field-bg, var(--surface-2)); transition: background-color var(--d-2), box-shadow var(--d-2); }
.editor:focus-within { background: var(--surface-solid); box-shadow: inset 0 0 0 2px var(--text), 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent); }
.editor [contenteditable] { outline: none; }
.editor__block { position: relative; }
.editor__block + .editor__block { margin-top: 12px; }
.editor__add { position: absolute; left: -44px; top: -4px; }
.editor__menu { position: absolute; z-index: 5; left: -44px; top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 300px; }
.editor .prose { font-size: 16px; max-width: none; }

/* ---- conteúdo rico renderizado (editorjs_renderer, descrição de curso, aula em texto) */
.prose { font-size: 17px; line-height: 1.75; max-width: 72ch; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font: 600 28px/1.2 var(--font-display); color: var(--title, inherit); margin-top: 32px; }
.prose h3 { font: 600 21px/1.3 var(--font-display); color: var(--title, inherit); margin-top: 28px; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--text-muted); font-weight: 700; }
.prose a { color: var(--brand-2); font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose blockquote { padding: 18px 22px; border-radius: var(--r-mini); background: var(--block-secondary); font: 500 19px/1.5 var(--font-display); }
.prose blockquote cite { display: block; margin-top: 8px; font: 700 13px var(--font-text); font-style: normal; color: var(--text-muted); }
.prose figure img { width: 100%; border-radius: var(--r-mini); }
.prose figcaption { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.prose .formula { font: 500 22px var(--font-display); text-align: center; padding: 18px; border-radius: var(--r-mini); background: var(--surface-2); }
.prose code { font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); }
.prose hr, .site-divider--dots::before { border: 0; height: 12px; width: 84px; margin: 32px auto; background: radial-gradient(circle, var(--text-faint) 3px, transparent 3.5px) center / 28px 12px repeat-x; }
.prose .embed { aspect-ratio: 16 / 9; border-radius: var(--r-mini); overflow: hidden; background: #000; display: grid; place-items: center; color: #fff; }
.prose .checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prose .checklist li { margin: 0; }
.prose .table { min-width: 0; }

/* ---- alternativas (aluno responde) e editor de questão (professor cria) */
.choice { display: flex; gap: 14px; align-items: center; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r-mini); background: var(--surface-2); color: inherit; font-size: 16px; text-align: left; cursor: pointer; transition: background-color var(--d-2), box-shadow var(--d-2); }
.choice:hover { background: var(--surface-3); }
.choice__letter { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none; font: 900 14px var(--font-text); background: var(--surface-solid); color: var(--text); }
.choice.selected { background: var(--surface-solid); box-shadow: inset 0 0 0 2px var(--text); }
.choice.selected .choice__letter { background: var(--inverse); color: var(--inverse-text); }
.choice.correct { background: var(--success-bg); box-shadow: inset 0 0 0 2px var(--success); }
.choice.correct .choice__letter { background: var(--success); color: var(--surface-solid); }
.choice.wrong { background: var(--error-bg); box-shadow: inset 0 0 0 2px var(--error); }
.choice.wrong .choice__letter { background: var(--error); color: var(--surface-solid); }
.choice--editing { cursor: default; padding: 6px 6px 6px 8px; gap: 10px; }
.choice--editing.correct { box-shadow: none; }
.choice--editing .check { font-size: 13px; font-weight: 700; white-space: nowrap; align-items: center; }
.qnav { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.qnav span { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 12.5px; font-weight: 900; background: var(--surface-2); color: var(--text-muted); }
.qnav .r { background: var(--inverse); color: var(--inverse-text); }
.qnav .a { background: var(--accent); color: var(--accent-text); }
.qnav .m { box-shadow: inset 0 0 0 2px var(--brand-2); color: var(--brand-2); }
.qnav-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-muted); }
.qnav-legend span { display: inline-flex; align-items: center; gap: 6px; }
.qnav-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; background: var(--surface-2); }
.qnav-legend .r i { background: var(--inverse); } .qnav-legend .a i { background: var(--accent); } .qnav-legend .m i { background: transparent; box-shadow: inset 0 0 0 2px var(--brand-2); }

/* ---- conversa (dúvidas, mensagens/tickets) */
.conversation { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: min(78%, 640px); }
.msg__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg__bubble { padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--surface-2); font-size: 14.5px; line-height: 1.5; }
.msg__meta { font-size: 12px; color: var(--text-muted); padding: 0 6px; }
.msg--mine { align-self: flex-end; flex-direction: row-reverse; }
.msg--mine .msg__bubble { background: var(--inverse); color: var(--inverse-text); border-radius: 20px 20px 6px 20px; }
.msg--mine .msg__meta { text-align: right; }
.msg--system { align-self: center; max-width: none; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.msg .attachment { margin-top: 4px; }
.attachment { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: inherit; font-size: 13px; font-weight: 700; }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 24px; background: var(--surface-2); }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; padding: 11px 12px; border: 0; background: transparent; color: var(--text); font: 400 15px/1.45 var(--font-text); resize: none; outline: none; }
.composer:focus-within { background: var(--surface-solid); box-shadow: inset 0 0 0 2px var(--text), 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent); }
.new-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---- linha do tempo (histórico, logs, pontos) — sem traço vertical: o ritmo vem dos selos */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline > li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 12px 10px 10px; border-radius: var(--r-mini); }
.timeline > li:hover { background: var(--surface-2); }
.timeline__seal { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.timeline__seal .lucide { width: 17px; height: 17px; }
.timeline__seal--accent { background: var(--accent); color: var(--accent-text); }
.timeline__seal--success { background: var(--success-bg); color: var(--success); }
.timeline__seal--strong { background: var(--inverse); color: var(--inverse-text); }
.timeline b { display: block; font-size: 14.5px; }
.timeline small { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.timeline time { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; font-weight: 700; }

/* ---- gráficos (séries com cor fixa: 1 = preto, 2 = primária, 3 = secundária, 4 = destaque) */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bar-chart > div { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.bar-chart i { width: min(14px, 100%); height: var(--h); border-radius: 99px; background: var(--inverse); transform-origin: bottom; animation: bar-rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.bar-chart .current i { background: var(--accent); }
.bar-chart .partial i { background: repeating-linear-gradient(-45deg, var(--stripe) 0 4px, transparent 4px 8px); }
@keyframes bar-rise { from { transform: scaleY(0); } }
.line-chart { display: block; width: 100%; height: 190px; overflow: visible; }
.line-chart .area { fill: color-mix(in srgb, var(--accent) 28%, transparent); }
.line-chart .stroke { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; animation: draw 1.6s var(--ease) both; }
.line-chart .dot { fill: var(--accent); stroke: var(--text); stroke-width: 2.5; }
@keyframes draw { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }
.chart-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.donut-chart { --t: 148px; width: var(--t); height: var(--t); border-radius: 50%; flex: none; background: conic-gradient(var(--inverse) 0 calc(var(--a) * 1%), var(--accent) 0 calc((var(--a) + var(--b)) * 1%), var(--block-secondary) 0); -webkit-mask: radial-gradient(circle, transparent 55%, #000 56%); mask: radial-gradient(circle, transparent 55%, #000 56%); }
.chart-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.chart-legend li { display: flex; align-items: center; gap: 10px; }
.chart-legend li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-legend i { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.chart-legend .s1 i { background: var(--inverse); } .chart-legend .s2 i { background: var(--accent); } .chart-legend .s3 i { background: var(--block-secondary); } .chart-legend .s4 i { background: var(--block-highlight); }

/* ---- ranking (gamificação): pódio + lista */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
.podium__place { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px 12px 18px; border-radius: var(--r-card); background: var(--surface-2); min-width: 0; }
.podium__place--1 { order: 2; padding-top: 34px; background: var(--block-primary); }
.podium__place--2 { order: 1; } .podium__place--3 { order: 3; }
.podium__place b { font-size: 14.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium__points { font: 700 26px/1 var(--font-display); letter-spacing: -.03em; }
.podium__place small { font-size: 12px; color: var(--text-muted); }

/* ---- avaliação por estrelas */
.stars { display: inline-flex; gap: 4px; }
.stars button { width: 40px; height: 40px; border: 0; padding: 0; border-radius: 12px; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text-faint); transition: transform var(--d-2) var(--ease-spring), color var(--d-2); }
.stars button:hover { transform: scale(1.12) rotate(-6deg); }
.stars .lucide { width: 28px; height: 28px; stroke-width: 1.6; }
.stars .on { color: var(--text); }
.stars .on .lucide { fill: var(--accent); }

/* ---- plano (preços do site público e planos do SaaS) */
.plan { display: flex; flex-direction: column; gap: 18px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan__price b { font: 700 44px/1 var(--font-display); letter-spacing: -.04em; }
.plan__price small { font-size: 14px; color: var(--text-muted); }
.plan ul, .check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.plan li, .check-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan li .lucide, .check-list li .lucide { margin-top: 3px; }
.plan .btn { margin-top: auto; }

/* ---- vazio "em breve" (funções anunciadas: Comentários, IA, Vendas, Integrações) */
.empty--soon { background: var(--surface-2); }

/* ---- banner de cookies (LGPD) */
.cookies { position: fixed; z-index: 70; left: 16px; bottom: 16px; width: min(460px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border-radius: var(--r-card); background: var(--inverse); color: var(--inverse-text); box-shadow: var(--shadow-float); --surface-2: color-mix(in srgb, var(--inverse-text) 14%, transparent); --surface-3: color-mix(in srgb, var(--inverse-text) 22%, transparent); --text: var(--inverse-text); }
.cookies p { font-size: 14px; color: color-mix(in srgb, var(--inverse-text) 78%, transparent); }
.cookies .link { color: inherit; }

/* ---- busca global (⌘K) */
.veil--top { place-items: start center; padding-top: 10vh; }
.global-search { width: min(640px, 100%); max-height: min(560px, 80vh); display: flex; flex-direction: column; border-radius: calc(var(--r-card) + 4px); background: var(--surface-solid); box-shadow: var(--shadow-float); overflow: hidden; animation: modal-in var(--d-4) var(--ease) both; }
.global-search__field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.global-search__field input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--text); font: 400 18px var(--font-text); outline: none; }
.global-search__results { overflow: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 12px; }
.global-search__group { display: flex; flex-direction: column; gap: 4px; }
.global-search__group > .t-overline { padding: 4px 10px; }
.global-search .row { background: transparent; }
.global-search .row[aria-selected="true"] { background: var(--block-primary); }
.global-search__footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 18px; background: var(--surface); font-size: 12.5px; color: var(--text-muted); }
.global-search__footer span { display: inline-flex; align-items: center; gap: 6px; }

/* ==========================================================================
   29. COMPONENTES v1.0 — lacunas da revisão final (quadro, rodapé do app, certificado)
   ========================================================================== */

/* ---- QUADRO (kanban): tickets da equipe (staff_inbox) e qualquer fluxo por etapa.
   Colunas em poço, cartões sólidos; arrastar = SortableJS (já usado no assistente de curso). */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: var(--gap); overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.board__column { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-card); background: var(--block-neutral); scroll-snap-align: start; min-height: 260px; }
.board__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 6px; font-weight: 900; font-size: 14px; }
.board__card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-mini); background: var(--surface-solid); color: var(--text); text-decoration: none; cursor: grab; transition: transform var(--d-2) var(--ease), box-shadow var(--d-2); }
.board__card:hover { transform: translateY(-2px) rotate(-.4deg); }
.board__card.dragging { box-shadow: 0 0 0 2px var(--text); transform: rotate(-1.2deg) scale(1.02); cursor: grabbing; }
.board__card > b { font-size: 14.5px; line-height: 1.35; }
.board__empty { padding: 18px 12px; border-radius: var(--r-mini); background: color-mix(in srgb, var(--text) 5%, transparent); text-align: center; font-size: 13px; color: var(--text-muted); }
[data-theme="dark"] .board__card { background: var(--surface-2); }

/* ---- RODAPÉ DO APP (components/footer_dashboard.html): discreto, sem linha */
.app__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 0 32px 28px; font-size: 13px; color: var(--text-muted); }
.app__footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.app__footer a { color: inherit; text-decoration: none; }
.app__footer a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 767px) { .app__footer { padding: 0 16px 24px; } }

/* ---- CERTIFICADO (documento A4 paisagem): o mesmo desenho no PDF, na impressão e na verificação.
   Medidas em cqi: o documento escala com a largura e nunca reflui. */
.certificate { position: relative; width: 100%; max-width: 1040px; margin: 0 auto; aspect-ratio: 297 / 210; border-radius: 22px; overflow: hidden; background: #FFFFFF; color: #111111; display: grid; grid-template-columns: 31% minmax(0, 1fr); container-type: inline-size; }
.certificate__band { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 5cqi 3.6cqi; background: var(--accent); color: var(--accent-text); }
.certificate__band .logo { --w: 18cqi; }
.certificate__band .marker { --mw: 4.2cqi; --mh: 6.4cqi; }
.certificate__seal { font: 700 2.4cqi/1.15 var(--font-display); }
.certificate__body { display: flex; flex-direction: column; gap: 2cqi; padding: 5.4cqi 5.6cqi 4.4cqi; }
.certificate__overline { font: 900 1.25cqi var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: #595853; }
.certificate__name { font: 700 5.4cqi/1.02 var(--font-display); letter-spacing: -.02em; color: var(--t-heading, #111111); }
.certificate__text { font-size: 1.75cqi; line-height: 1.55; margin: 0; max-width: 58ch; }
.certificate__text b { font-weight: 900; }
.certificate__footer { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 3cqi; align-items: end; font-size: 1.35cqi; color: #595853; }
.certificate__signature b { display: block; font: italic 600 2.1cqi var(--font-display); color: #111111; }
.certificate__qr { width: 9.5cqi; height: 9.5cqi; border-radius: 1.2cqi; background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 0 / 1.6cqi 1.6cqi; box-shadow: 0 0 0 .8cqi #fff inset; }
.certificate__code { font: 1.25cqi ui-monospace, SFMono-Regular, Menlo, monospace; color: #595853; }

/* ---- superfícies sempre claras (e-mail, certificado): a logo não troca com o tema escuro */
:is(.email, .certificate) { --logo: url("../../img/ds/logo-black.png"); }
html[data-tenant-custom] :is(.email, .certificate) { --logo: var(--t-logo); }

/* ---- lista simples com marcadores (regras, requisitos curtos dentro de blocos) */
.simple-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }

/* ---- bloco amplo: herói do site, marca do login, página de erro — um único respiro */
.card--wide { padding: clamp(28px, 4vw, 56px); }

/* ---- abas no celular: mesmo componente, respiro menor para 3 abas caberem em 375px */
@media (max-width: 640px) { .tabs { gap: 2px; } .tabs button, .tabs a { padding: 10px; } .tabs [aria-selected="true"]::after { left: 10px; right: 10px; } }

.row__title, .row__meta { display: block; }

/* ---- bloco com mídia (continuar aula, destaque de curso) */
.media-card { padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
.media-card__media { position: relative; min-height: 220px; border-radius: calc(var(--r-card) - 8px); overflow: hidden; background: var(--cream); }
.media-card__media > img { width: 100%; height: 100%; object-fit: cover; }
.media-card__body { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
@media (max-width: 640px) { .media-card { grid-template-columns: 1fr; } .media-card__media { min-height: 160px; } }
/* ---- caixa de entrada (mensagens) */
.inbox { display: flex; flex-direction: column; gap: 14px; }
.inbox .row[aria-current="true"] { background: var(--surface-solid); }
.row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-muted); flex: none; }
.mono { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.anchor { position: relative; }
.menu--right { top: calc(100% + 8px); right: 0; }
.menu--left { top: calc(100% + 8px); left: 0; }
.avatar--more { --av: var(--surface-3); color: var(--text); }
.full-column { grid-column: 1 / -1; }

/* esqueleto (carregando): formas fixas, nunca medidas inline */
.skeleton--search { height: 44px; width: min(420px, 100%); border-radius: 99px; }
.skeleton--title { height: 40px; width: 40%; }
.skeleton--line { height: 14px; width: 70%; }
.skeleton--line-short { height: 12px; width: 40%; }
.skeleton--avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.skeleton--bar { height: 10px; width: 100%; border-radius: 99px; }
.grow { flex: 1; min-width: 0; }
