/* Aularis Design System · Mosaico v1.1 — app shell (Sidebar: rail + pinnable panel) and page layouts.
 * 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.
 */
/* ---------- 19. Shell de app · SIDEBAR A (aprovada): TRILHO + PAINEL FIXÁVEL ----------
   Trilho = nível 1 (áreas) · Painel = nível 2 (itens da área), igual ao par
   sidebar_primary + sidebar_secondary de hoje. Fixado: 272px (o mesmo de hoje).
   Recolhido: 72px; o painel "espia" por cima do conteúdo. Celular: gaveta. */
:root {
  /* Decisão do time (2026-10-12): 272px FIXADA ("o mesmo de hoje", `lg:ml-[17rem]` = 272px)
     e 72px RECOLHIDA. Total 272 = trilho 72 + painel 200. (O mockup dizia 272/72 na copy e
     64/196 no CSS — o CSS é que estava incoerente com a própria copy.) */
  --rail-w: 72px; --panel-w: 200px;
  --rail-bg: var(--block-secondary);
  --rail-text: color-mix(in srgb, var(--text) 78%, transparent);
  --rail-text-hover: var(--text);
  --rail-hover: rgb(255 255 255 / .55);
  --rail-active: var(--inverse);
  --rail-active-text: var(--inverse-text);
  --rail-radius: 28px; --rail-btn-radius: 15px;
  --rail-margin: 10px 0 10px 8px;
  --panel-bg: var(--block-neutral);
  --panel-radius: 28px; --panel-margin: 10px 0 10px 4px;
  --panel-text: var(--text-muted);
  --panel-hover: rgb(255 255 255 / .7);
  --panel-active: var(--surface-solid);
  --panel-active-text: var(--text);
  --panel-active-icon: var(--brand-2);
  --panel-marker: var(--accent);
  --panel-item-radius: 12px;
  --floating-active: var(--block-primary);
}
[data-theme="dark"] { --rail-hover: rgb(255 255 255 / .08); --panel-hover: rgb(255 255 255 / .06); --panel-active: rgb(255 255 255 / .1); --rail-text: color-mix(in srgb, var(--text) 80%, transparent); }

.app { display: flex; min-height: 100vh; background: var(--frame); }
.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app__top { position: sticky; top: var(--doc-h, 0px); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 16px 32px; background: color-mix(in srgb, var(--canvas) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.app__content { padding: 8px 32px 64px; display: flex; flex-direction: column; gap: var(--sp-6); flex: 1; }
.app__mobile-menu { display: none; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; position: relative; }
.page-header__text { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.action-bar { position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 22px; border-radius: 26px; background: var(--inverse); color: var(--inverse-text); box-shadow: var(--shadow-float); }
.action-bar .btn--tonal { background: color-mix(in srgb, var(--inverse-text) 14%, transparent); color: var(--inverse-text); }
.bottom-nav { display: none; }

/* nav = trilho + painel fixo + painel flutuante (espiar) */
.nav { position: sticky; top: var(--doc-h, 0px); height: calc(100vh - var(--doc-h, 0px)); flex: none; display: flex; z-index: 30; }
.nav--embedded { position: relative; top: 0; height: 100%; }
.nav__guard { display: none; }
.rail { width: var(--rail-w); margin: var(--rail-margin); border-radius: var(--rail-radius); background: var(--rail-bg); color: var(--rail-text); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; flex: none; transition: background-color var(--d-3); }
.rail__brand { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; flex: none; }
.rail__brand .symbol { --w: 34px; }
.rail__list { position: relative; width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0; overflow-y: auto; scrollbar-width: none; }
.rail__pill { position: absolute; z-index: 0; left: 50%; top: 0; width: 56px; height: 52px; margin-left: -28px; border-radius: var(--rail-btn-radius); background: var(--rail-active); pointer-events: none; transition: transform var(--d-4) var(--ease), height var(--d-4) var(--ease), opacity var(--d-3); }
.rail__btn { position: relative; z-index: 1; flex: none; width: 56px; min-height: 52px; padding: 7px 0 6px; border: 0; border-radius: var(--rail-btn-radius); background: transparent; color: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; text-decoration: none; font: 700 10px/1.05 var(--font-text); letter-spacing: .01em; text-align: center; transition: color var(--d-3) var(--ease), background-color var(--d-2); }
.rail__btn .lucide { width: 20px; height: 20px; transition: transform var(--d-3) var(--ease-spring); }
.rail__btn > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__btn:hover:not([aria-current]):not([disabled]), .rail__btn.peeking:not([aria-current]) { background: var(--rail-hover); color: var(--rail-text-hover); }
.rail__btn:hover:not([disabled]) .lucide { transform: translateY(-1px) scale(1.07); }
.rail__btn[aria-current] { color: var(--rail-active-text); }
.rail__btn[disabled] { opacity: .45; cursor: not-allowed; }
.rail__btn em { position: absolute; top: 0; right: -2px; font: 900 7.5px/1 var(--font-text); letter-spacing: .06em; text-transform: uppercase; font-style: normal; padding: 3px 4px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); }
.rail__btn .nav-dot { position: absolute; top: 7px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.rail__btn[aria-current] .nav-dot { background: currentColor; box-shadow: none; }
.rail__btn[hidden] { display: none; }
.rail__sep { flex: none; height: 6px; }
.rail__footer { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail__footer .avatar { --t: 36px; border: 0; padding: 0; cursor: pointer; font-family: var(--font-text); }

.panel { width: var(--panel-w); flex: none; display: flex; flex-direction: column; gap: 12px; padding: 16px 8px 12px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; color: var(--panel-text); }
.panel--pinned { background: var(--panel-bg); border-radius: var(--panel-radius); margin: var(--panel-margin); transition: width var(--d-4) var(--ease), padding var(--d-4) var(--ease), margin var(--d-4) var(--ease), opacity var(--d-3) var(--ease), visibility var(--d-4); }
.panel--pinned > * { min-width: calc(var(--panel-w) - 16px); }
.nav[data-state="collapsed"] .panel--pinned { width: 0; padding-inline: 0; margin-left: 0; margin-right: 0; opacity: 0; visibility: hidden; }
.panel--floating { position: absolute; z-index: 40; top: 10px; bottom: 10px; left: calc(100% + 6px); width: calc(var(--panel-w) + 40px); border-radius: var(--panel-radius); background: var(--surface-solid); box-shadow: var(--shadow-float), 0 0 0 1px color-mix(in srgb, var(--text) 7%, transparent); animation: flyout var(--d-4) var(--ease) both;
  --panel-hover: var(--surface-2); --panel-active: var(--floating-active); }
.panel--floating[hidden] { display: none; }
@keyframes flyout { from { opacity: 0; transform: translateX(-10px) scale(.985); } }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 2px 0 10px; }
.panel__head small { display: block; font: 900 10px var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.panel__head b { display: block; font: 700 18px/1.15 var(--font-display); color: var(--title, var(--text)); }
.panel__action { background: transparent; color: var(--text-muted); }
.panel__action:hover { background: var(--surface-2); color: var(--text); }
.panel__search { position: relative; margin: 0 2px; display: block; }
.panel__search .lucide { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.panel__search input { width: 100%; height: 36px; border: 0; border-radius: 12px; background: var(--panel-hover); color: var(--text); font: 400 13.5px var(--font-text); padding: 0 40px 0 33px; outline: none; -webkit-appearance: none; appearance: none; transition: box-shadow var(--d-2); }
.panel__search input::-webkit-search-cancel-button { display: none; }
.panel--floating .panel__search input, .nav-drawer .panel__search input { background: var(--surface-2); }
.panel__search input:focus { box-shadow: inset 0 0 0 2px var(--text), 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
.panel__search .kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.panel__groups[hidden] { display: none; }
.panel__groups { display: flex; flex-direction: column; gap: 6px; animation: swap var(--d-4) var(--ease) both; }
@keyframes swap { from { opacity: 0; transform: translateX(-6px); } }
.panel__label { width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: transparent; cursor: pointer; padding: 6px 10px 4px; font: 900 10px/1 var(--font-text); letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint); border-radius: 8px; text-align: left; }
.panel__label--static { cursor: default; }
.panel__label:hover:not(.panel__label--static) { color: var(--text); }
.panel__label > .lucide { width: 14px; height: 14px; margin-left: 4px; transition: transform var(--d-4) var(--ease); }
.panel__label .summary { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 700; font-size: 11px; opacity: 0; transition: opacity var(--d-3); }
.panel__group.closed .panel__label .summary { opacity: .85; }
.panel__group.closed .panel__label > .lucide { transform: rotate(-90deg); }
.panel__group.closed .panel__items { display: none; }
.panel__items { display: flex; flex-direction: column; gap: 2px; }
.panel__item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px 0 12px; border-radius: var(--panel-item-radius); text-decoration: none; color: inherit; font: 700 13.5px/1.2 var(--font-text); cursor: pointer; transition: background-color var(--d-2), color var(--d-2); }
.panel__item > .lucide { width: 17px; height: 17px; flex: none; }
.panel__item > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel__item:hover { background: var(--panel-hover); color: var(--text); }
.panel__item[aria-current="page"] { background: var(--panel-active); color: var(--panel-active-text); }
.panel__item[aria-current="page"] > .lucide { color: var(--panel-active-icon); }
.panel__item[aria-current="page"]::before { content: ""; position: absolute; left: 5px; top: 0; width: 7px; height: 13px; background: var(--panel-marker); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); animation: fall var(--d-4) var(--ease) both; }
.panel__item .star { display: none; width: 24px; height: 24px; border: 0; background: transparent; border-radius: 8px; place-items: center; color: var(--text-faint); cursor: pointer; flex: none; }
.panel__item:hover .star, .panel__item .star:focus-visible { display: grid; }
.panel__item:hover .counter:not(.counter--alert) { display: none; }
.panel__item .star.on { color: var(--accent-strong); }
.panel__item .star .lucide { width: 14px; height: 14px; }
.panel__item .star.on .lucide { fill: currentColor; }
.panel__item--echo { color: var(--text); font-weight: 900; }
.panel__item .area-tag { font: 700 10.5px var(--font-text); font-style: normal; color: var(--text-faint); flex: none; }
.panel__empty { padding: 10px 12px; font-size: 13px; color: var(--text-muted); }

/* gaveta (celular) — mantém o padrão aprovado */
.nav-drawer[hidden] { display: none; }
.nav-drawer { position: fixed; z-index: 85; inset: 8px auto 8px 8px; width: min(320px, calc(100vw - 40px)); border-radius: 24px; background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-float); display: flex; flex-direction: column; overflow: hidden; animation: drawer-in-left var(--d-4) var(--ease) both;
  --panel-hover: var(--surface-2); --panel-active: var(--floating-active); }
.nav-drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0; }
.nav-drawer__areas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 14px 14px 6px; flex: none; }
.nav-drawer__areas button { flex: none; height: 36px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--surface-2); color: var(--text-muted); font: 700 13px var(--font-text); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.nav-drawer__areas button[aria-pressed="true"] { background: var(--rail-active); color: var(--rail-active-text); }
.nav-drawer__areas .lucide { width: 16px; height: 16px; }
.nav-drawer .panel { width: auto; flex: 1; min-height: 0; }
.nav-drawer__footer { display: flex; align-items: center; gap: 10px; padding: 12px 16px 16px; }

/* ---------- 22. Responsivo do shell ---------- */
@keyframes drawer-in-left { from { transform: translateX(-105%); } to { transform: none; } }
@media (max-width: 1100px) {
  .app__top { padding: 12px 20px; }
  .app__content { padding: 4px 20px 72px; }
}
@media (max-width: 767px) {
  .nav:not(.nav--embedded) { display: none; }
  .app__mobile-menu { display: inline-grid; }
}
@media (max-width: 640px) {
  .app__top { padding: 10px 16px; }
  .app__content { padding: 4px 16px 104px; gap: var(--sp-5); }
  .card { --cp: 18px; }
  .bottom-nav { display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; padding: 6px; gap: 4px; border-radius: 22px; background: var(--inverse); box-shadow: var(--shadow-float); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 16px; text-decoration: none; font-size: 11px; font-weight: 700; color: color-mix(in srgb, var(--inverse-text) 70%, transparent); }
  .bottom-nav a[aria-current="page"] { background: var(--accent); color: var(--accent-text); }
  .action-bar { bottom: 84px; border-radius: 22px; padding: 10px; }
  .action-bar > span { display: none; }
  .action-bar .cluster { width: 100%; }
  .action-bar .cluster .btn { flex: 1; }
  .toasts { right: 16px; bottom: 92px; }
}

/* ==========================================================================
   28. LAYOUTS DE PÁGINA — bases cbv/, player/, páginas fora do app
   ========================================================================== */
/* conteúdo + coluna lateral (Detail, Create/Update, Curso do aluno) */
.side-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.sticky-side { position: sticky; top: calc(var(--doc-h, 0px) + 84px); }
@media (max-width: 1180px) { .side-layout { grid-template-columns: minmax(0, 1fr); } .sticky-side { position: static; } }
.filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .filters { flex-direction: column; align-items: stretch; } .filters .segmented { align-self: flex-start; } }
.course-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.shortcut-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.add-card { display: grid; place-items: center; align-content: center; text-align: center; gap: 12px; min-height: 280px; }
.preview { pointer-events: none; }
.detail-head { display: flex; gap: 22px; align-items: center; }
.detail-cover { width: 120px; aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden; background: var(--cream); flex: none; position: relative; }
.detail-cover img:not(.tenant-cover) { width: 100%; height: 100%; object-fit: cover; object-position: 30% 70%; transform: scale(2.1); transform-origin: 28% 72%; }
@media (max-width: 640px) { .detail-head { flex-direction: column; align-items: flex-start; gap: 16px; } .detail-cover { width: 88px; } }
.module { display: flex; flex-direction: column; gap: 6px; }
.module__head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 6px; }
.confirmation { width: min(640px, 100%); margin: 24px auto 0; }
.marker--md { --mw: 24px; --mh: 36px; }
.marker--lg { --mw: 36px; --mh: 56px; }
.marker--corner { position: absolute; top: 0; right: 22px; z-index: 1; }
.logo--lg { --w: 180px; }
/* mensagens (caixa + conversa) */
.messages-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.conversation-block { display: flex; flex-direction: column; gap: 16px; min-height: 560px; }
.conversation-block .conversation { flex: 1; }
@media (max-width: 1100px) { .messages-layout { grid-template-columns: minmax(0, 1fr); } .messages-layout[data-open] .inbox { display: none; } }
@media (min-width: 1101px) { .narrow-only { display: none !important; } }
/* curso do aluno */
.course-hero { display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); gap: 24px; align-items: center; }
.course-hero .course__cover { aspect-ratio: 16 / 10; }
@media (max-width: 900px) { .course-hero { grid-template-columns: 1fr; } }

/* ---- ÁRVORE DO CURSO (seção → módulo → conteúdo): painel do player e página do curso */
.course-tree { --tree-open: rgb(255 255 255 / .62); display: flex; flex-direction: column; gap: 4px; }
.panel--floating .course-tree, .nav-drawer .course-tree { --tree-open: var(--surface-2); }
[data-theme="dark"] .course-tree { --tree-open: rgb(255 255 255 / .05); }
.card .course-tree { --panel-hover: var(--surface-3); --panel-active: var(--surface-solid); --panel-active-text: var(--text); --panel-marker: var(--accent); }
.course-summary { display: flex; flex-direction: column; gap: 10px; padding: 0 6px 12px 10px; }
.course-summary h2 { font: 600 18px/1.25 var(--font-display); color: var(--title, var(--text)); }
.tree { display: flex; flex-direction: column; gap: 4px; }
.tree-section > button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 10px 6px; border: 0; background: transparent; cursor: pointer; font: 900 10.5px/1 var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: inherit; opacity: .7; text-align: left; }
.tree-section > button .lucide { width: 14px; height: 14px; margin-left: auto; transition: transform var(--d-4) var(--ease); }
.tree-section.closed > button .lucide { transform: rotate(-90deg); }
.tree-module { border-radius: 16px; transition: background-color var(--d-3); }
.tree-module.open { background: var(--tree-open); }
.tree-module > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: transparent; cursor: pointer; text-align: left; color: inherit; border-radius: 16px; }
.tree-module > button:hover { background: var(--panel-hover); }
.tree-module > button b { font-size: 14px; line-height: 1.3; display: block; color: var(--text); }
.tree-module > button small { font-size: 12px; opacity: .75; }
.tree-module > button .chev { margin-left: auto; transition: transform var(--d-4) var(--ease); opacity: .6; }
.tree-module.open > button .chev { transform: rotate(180deg); }
.mini-ring { --v: 50; width: 26px; height: 26px; border-radius: 50%; flex: none; background: conic-gradient(var(--accent) calc(var(--v) * 1%), color-mix(in srgb, currentColor 16%, transparent) 0); -webkit-mask: radial-gradient(circle, transparent 7px, #000 7.5px); mask: radial-gradient(circle, transparent 7px, #000 7.5px); }
.tree-items { display: flex; flex-direction: column; gap: 2px; padding: 0 6px 8px; }
.tree-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: inherit; font-size: 13.5px; line-height: 1.3; position: relative; transition: background-color var(--d-2); }
.tree-item:hover { background: var(--panel-hover); color: var(--text); }
.tree-item .status { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 30%, transparent); }
.tree-item.done .status { background: var(--accent); color: var(--accent-text); box-shadow: none; }
.tree-item.done .status .lucide { width: 12px; height: 12px; stroke-width: 3; }
.tree-item.locked { opacity: .5; }
.tree-item.locked .status { box-shadow: none; }
.tree-item .tt { flex: 1; min-width: 0; }
.tree-item .tt small { display: block; font-size: 11.5px; opacity: .7; margin-top: 2px; }
.tree-item[aria-current="page"] { background: var(--panel-active); color: var(--panel-active-text); font-weight: 700; }
.tree-item[aria-current="page"] .status { box-shadow: none; background: transparent; }
.tree-item[aria-current="page"] .marker { --mc: var(--panel-marker); }

/* ---- PLAYER (moldura fixa): cabeçalho · palco · Sobre a aula · Materiais · Interação · Anterior/Próximo */
.app.focus .nav { display: none; }
.lesson { width: 100%; max-width: max(640px, calc((100vh - var(--doc-h, 0px) - 230px) * 16 / 9)); margin-inline: auto; display: flex; flex-direction: column; gap: var(--gap); }
.lesson > * { width: 100%; }
.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 6px; }
.stage { border-radius: var(--r-card); overflow: hidden; position: relative; max-width: 100%; }
.stage--video { background: #000; aspect-ratio: 16 / 9; color: #fff; }
.stage--video img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.stage--video .play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); border: 0; cursor: pointer; transition: transform .35s var(--ease-spring); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 24%, transparent); }
.stage--video .play .lucide { width: 32px; height: 32px; }
.stage--video .play:hover { transform: scale(1.08); }
.stage--video .ctrl { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 18px; background: rgb(0 0 0 / .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; font-weight: 700; }
.stage--video .ctrl__track { flex: 1; height: 5px; border-radius: 99px; background: rgb(255 255 255 / .25); position: relative; }
.stage--video .ctrl__track .buf { position: absolute; inset: 0 auto 0 0; width: 55%; border-radius: inherit; background: rgb(255 255 255 / .25); }
.stage--video .ctrl__track .pos { position: absolute; inset: 0 auto 0 0; width: 38%; border-radius: inherit; background: var(--accent); }
.stage--video .ctrl__track .pos::after { content: ""; position: absolute; right: -7px; top: -5px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); }
.stage--video .ctrl__track .cap { position: absolute; left: var(--x, 0); top: -3px; width: 3px; height: 11px; border-radius: 2px; background: rgb(255 255 255 / .7); }
.stage--dark { background: var(--stage-dark); color: #fff; padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 340px; --surface-2: rgb(255 255 255 / .1); --surface-3: rgb(255 255 255 / .16); --text: #fff; --text-muted: rgb(255 255 255 / .72); }
.stage--dark > * { position: relative; }
.stage--dark .pattern { position: absolute; inset: 0; }
.countdown { display: flex; gap: 10px; }
.countdown div { min-width: 74px; padding: 12px 10px; border-radius: 16px; background: color-mix(in srgb, currentColor 10%, transparent); text-align: center; }
.countdown b { display: block; font: 700 34px/1 var(--font-display); color: inherit; }
.countdown small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.file-preview { aspect-ratio: 3 / 4; border-radius: var(--r-mini); background: var(--surface-solid); padding: 22px 18px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.file-preview i { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); width: var(--v, 80%); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.prev-next a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-card); text-decoration: none; color: inherit; background: var(--block-neutral); min-width: 0; transition: transform var(--d-3) var(--ease); }
.prev-next a:hover { transform: translateY(-3px) rotate(-.4deg); }
.prev-next a > span:not(.btn-icon) { min-width: 0; }
.prev-next small { display: block; font: 900 10.5px var(--font-text); letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.prev-next b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.3; }
.prev-next .prev .btn-icon { background: var(--surface-solid); }
.prev-next .next { justify-content: flex-end; text-align: right; background: var(--inverse); color: var(--inverse-text); }
.prev-next .next .btn-icon { background: var(--accent); color: var(--accent-text); }
.prev-next .btn-icon { transition: transform var(--d-3) var(--ease); }
.prev-next .next:hover .btn-icon { transform: translateX(4px); }
.prev-next .prev:hover .btn-icon { transform: translateX(-4px); }
@media (max-width: 640px) { .prev-next a { padding: 12px 14px; gap: 10px; } .prev-next b { font-size: 14px; } .stage--video .ctrl .hide { display: none; } .stage--video .play { width: 64px; height: 64px; } .qnav { grid-template-columns: repeat(5, minmax(0, 1fr)); } .countdown div { min-width: 62px; } }

/* ---- AUTENTICAÇÃO (layout_auth): bloco da marca + formulário */
.auth { min-height: calc(100vh - var(--doc-h, 0px)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--gap); padding: 10px; }
.auth__brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.auth__tagline { font: 700 clamp(30px, 3.8vw, 56px)/1.04 var(--font-display); letter-spacing: -.03em; max-width: 13ch; color: var(--title, inherit); }
.auth__art { flex: 1; min-height: 180px; border-radius: calc(var(--r-card) - 8px); background: var(--surface-2) url("../../img/ds/desk-illustration.png") center bottom / auto 92% no-repeat; }
html[data-tenant-custom] .auth__art { background: var(--surface-2) var(--symbol-img) center / auto 46% no-repeat; }
.auth__form { width: min(440px, 100%); margin: 0 auto; padding: 40px 8px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth__form .page-header__text { gap: 8px; }
.auth__footer { font-size: 13px; color: var(--text-muted); }
.strength { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.strength i { height: 6px; border-radius: 99px; background: var(--surface-3); }
.strength i.on { background: var(--success); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__art { display: none; } .auth__tagline { font-size: 28px; } .auth__brand { gap: 14px; } .auth__form { padding: 20px 6px 40px; } }

/* ---- PÁGINAS DE ERRO (404, 500, domínio não vinculado) */
.error-page { min-height: calc(100vh - var(--doc-h, 0px)); display: grid; place-items: center; padding: 16px; }
.error-page > .card { width: min(760px, 100%); display: grid; gap: 18px; justify-items: start; overflow: hidden; }
.error__code { font: 700 clamp(84px, 14vw, 168px)/.85 var(--font-display); letter-spacing: -.06em; }

/* ---- PÁGINA SIMPLES (aceite de termos e afins): topo com marca + coluna central */
.simple-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 4vw, 40px); }
.center-column { width: min(860px, 100% - 32px); margin: 0 auto; padding: 8px 0 64px; display: flex; flex-direction: column; gap: var(--gap); }
.document { max-height: 52vh; overflow: auto; padding-right: 8px; scrollbar-width: thin; }

/* ---- E-MAIL TRANSACIONAL (apps/communications/email/default_templates) — sempre claro */
.email-canvas { min-height: calc(100vh - var(--doc-h, 0px)); padding: 40px 12px 64px; background: #F1F0EC; }
.email { --text: #111111; --text-muted: #595853; --surface-2: #F1F0EC; width: min(600px, 100%); margin: 0 auto; border-radius: 24px; overflow: hidden; background: #FFFFFF; color: #111111; font-family: var(--font-text); }
.email__header { padding: 28px 36px 8px; }
.email__body { padding: 14px 36px 30px; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.6; }
.email__body h1 { font: 700 28px/1.15 var(--font-display); color: var(--t-heading, #111111); }
.email__button { align-self: flex-start; display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-weight: 900; text-decoration: none; }
.email__box { padding: 16px 18px; border-radius: 16px; background: #F1F0EC; font-size: 14.5px; }
.email__footer { padding: 20px 36px 28px; background: #F7F6F3; font-size: 12.5px; line-height: 1.5; color: #595853; }

@media (min-width: 768px) { .mobile-only { display: none !important; } }
@media (max-width: 640px) { .hide-mobile { display: none !important; } }

/* ---- utilitários do shell usados por todas as páginas do app */
.app__top .breadcrumbs { flex: 1; min-width: 0; }
.app__top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.top-search { flex: 1; max-width: 440px; }
.actions-end { justify-content: flex-end; }

