/* Hub HOM — componentes e layout (mobile-first) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-page); color: var(--text-primary); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text-primary); color: var(--text-inverse); padding: 10px 16px; border-radius: var(--radius-md); transition: top var(--dur-fast) var(--ease-out); }
.skip:focus { top: 12px; }
.tnum { font-variant-numeric: tabular-nums; }

/* tipografia */
.label { font-family: var(--mono); font-size: 12px; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.display { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 7vw, 44px); line-height: 1.08; letter-spacing: -.02em; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 5vw, 32px); line-height: 1.15; letter-spacing: -.01em; }
.h3 { font-family: var(--accent-font); font-weight: 700; font-size: 20px; line-height: 1.25; }
.navtitle { font-family: var(--accent-font); font-weight: 700; font-size: 17px; line-height: 1.25; }
.lede { font-size: 17px; line-height: 1.4; color: var(--text-muted); max-width: 720px; }
.small { font-size: 14px; line-height: 1.45; }
.muted { color: var(--text-muted); }
.gold { color: var(--text-gold); }
.mono { font-family: var(--mono); }
.bold { font-weight: 600; }

/* layout geral */
.app { display: block; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(86vw, 300px); background: var(--bg-card); border-right: 1px solid var(--border-default); padding: var(--space-6) var(--space-4); overflow-y: auto; transform: translateX(-102%); transition: transform var(--dur-base) var(--spring-soft); display: flex; flex-direction: column; gap: 2px; }
.sidebar.open { transform: none; box-shadow: var(--shadow-panel); }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(28, 26, 21, .45); opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.scrim.on { opacity: 1; pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 var(--space-3) var(--space-4); }
.logo { width: 36px; height: 36px; border-radius: 8px; background: var(--text-primary); color: var(--text-inverse); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; flex: none; position: relative; overflow: hidden; }
.logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); transform: translateX(-120%); transition: transform 900ms var(--ease-out); }
.brand:hover .logo::after { transform: translateX(120%); }
.brand-name { font-family: var(--accent-font); font-weight: 700; font-size: 17px; line-height: 1.2; }
.nav-group { padding: 14px var(--space-3) 6px; }
.nav { position: relative; display: flex; flex-direction: column; gap: 1px; }
.nav-item { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: var(--size-touch); padding: 0 var(--space-3); border-radius: var(--radius-md); transition: background var(--dur-fast) var(--ease-out); }
.nav-item:hover { background: var(--bg-card-hover); }
.nav-item[aria-current="page"] { background: var(--bg-card); font-weight: 600; }
.nav-indicator { position: absolute; left: 0; top: 0; width: 3px; height: 20px; border-radius: 2px; background: var(--accent-gold); transition: transform var(--dur-base) var(--spring-soft), opacity var(--dur-fast); will-change: transform; pointer-events: none; opacity: 0; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: color-mix(in srgb, var(--bg-page) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border-default); }
.icon-btn { width: var(--size-touch); height: var(--size-touch); display: grid; place-items: center; border-radius: var(--radius-md); transition: background var(--dur-fast); flex: none; }
.icon-btn:hover { background: var(--bg-card-hover); }
.search-trigger { flex: 1; display: flex; align-items: center; gap: 10px; min-height: var(--size-touch); padding: 0 var(--space-4); border: 1px solid var(--border-strong); background: var(--bg-surface); border-radius: var(--radius-md); color: var(--text-muted); min-width: 0; transition: box-shadow var(--dur-fast); }
.search-trigger:hover { box-shadow: var(--shadow-card); }
.search-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font-family: var(--mono); font-size: 14px; display: none; }
.topbar-meta { display: none; align-items: center; gap: var(--space-4); }
.content { padding: var(--space-6) var(--space-4) var(--space-16); max-width: calc(var(--layout-content-max) + 96px); display: flex; flex-direction: column; gap: var(--space-8); }
.page { animation: pageIn var(--dur-slow) var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
  .sidebar { transform: none; width: var(--layout-sidebar); box-shadow: none; }
  .main { margin-left: var(--layout-sidebar); }
  .icon-btn.menu { display: none; }
  .topbar { padding: var(--space-4) var(--space-12); }
  .search-trigger { flex: 1; max-width: 420px; }
  .kbd { display: block; }
  .content { padding: var(--space-10) var(--space-12) var(--space-16); }
  .scrim { display: none; }
}

/* peças básicas */
.card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.card.shadow { box-shadow: var(--shadow-card); }
.card.paper { background: var(--bg-card); }
.card-head { display: flex; flex-direction: column; gap: 2px; }
.row { display: flex; align-items: center; gap: var(--space-3); }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--space-3); }
.grow { flex: 1; min-width: 0; }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-4); }
.grid { display: grid; gap: var(--space-4); }
.g2, .g3 { grid-template-columns: minmax(0, 1fr); } .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.split { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1280px) { .split { grid-template-columns: minmax(0, 1fr) 340px; } .split.wide { grid-template-columns: minmax(0, 1fr) 380px; } .split.left { grid-template-columns: 340px minmax(0, 1fr); } }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--size-touch); padding: 0 var(--space-5); border-radius: var(--radius-md); font-weight: 600; border: 1px solid transparent; transition: transform var(--dur-fast) var(--spring-snappy), background var(--dur-fast), box-shadow var(--dur-fast); }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--text-primary); color: var(--text-inverse); }
.btn.primary:hover { background: var(--frente-time); color: var(--text-on-time); }
.btn.secondary { background: var(--bg-card); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--bg-card-hover); }
.btn.ghost:hover { background: var(--bg-card); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* chips, pílulas, selos */
.chip { min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--bg-card); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--spring-snappy); }
.chip:hover { background: var(--bg-card-hover); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip.on { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-default); background: var(--bg-card); font-size: 14px; line-height: 1.45; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: var(--c, var(--accent-gold)); }
.dot.lg { width: 10px; height: 10px; }
.pessoa { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-muted); white-space: nowrap; }
.pessoa.match { background: var(--text-primary); color: var(--text-inverse); }
.selo { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 14px; line-height: 1.45; white-space: nowrap; background: var(--status-info-bg); color: var(--status-info); }
.selo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.selo.ok { background: var(--status-success-bg); color: var(--status-success); }
.selo.warn { background: var(--status-warning-bg); color: var(--status-warning); }
.selo.bad { background: var(--status-danger-bg); color: var(--status-danger); }
.selo.pulse::before { animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--bg-page); display: grid; place-items: center; font-size: 14px; background: var(--c); color: var(--text-on-frente); flex: none; }
.avatar.m { width: 52px; height: 52px; font-family: var(--accent-font); font-weight: 700; font-size: 20px; }
.avatar.time { color: var(--text-on-time); }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -14px; }

/* KPI */
.kpi { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); box-shadow: var(--shadow-card); min-width: 0; transition: transform var(--dur-base) var(--spring-soft), box-shadow var(--dur-base); position: relative; overflow: hidden; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-raised); }
.kpi::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 42%, rgba(201, 162, 39, .12) 50%, transparent 58%); transform: translateX(-130%); transition: transform 900ms var(--ease-out); pointer-events: none; }
.kpi:hover::after { transform: translateX(130%); }
.kpi-value { font-family: var(--accent-font); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-delta { font-weight: 600; }
.kpi-delta.up { color: var(--status-success); } .kpi-delta.down { color: var(--status-danger); } .kpi-delta.flat { color: var(--text-muted); }
.spark { width: 96px; height: 28px; overflow: visible; }
.spark path, .linechart path.ln { fill: none; stroke: var(--accent-gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); animation: draw var(--dur-chart) var(--ease-out) .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* nav cards (como no original) */
.navcard { display: flex; align-items: center; gap: var(--space-4); width: 100%; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5); transition: background var(--dur-fast), transform var(--dur-base) var(--spring-soft); }
.navcard:hover { background: var(--bg-card-hover); }
.navcard:hover .arrow { transform: translateX(4px); }
.navcard:active { transform: scale(.99); }
.navcard .ico { width: 32px; height: 32px; flex: none; }
.navcard .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arrow { width: 20px; height: 20px; flex: none; transition: transform var(--dur-base) var(--spring-soft); }
.ico svg, .arrow svg { width: 100%; height: 100%; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* caixas de ajuda */
.oque { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
.oque > summary, .como > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-3); min-height: var(--size-touch); padding: var(--space-3) var(--space-5); font-weight: 600; }
.oque > summary::-webkit-details-marker, .como > summary::-webkit-details-marker { display: none; }
.oque .chev { margin-left: auto; transition: transform var(--dur-base) var(--spring-soft); }
.oque[open] .chev { transform: rotate(180deg); }
.oque-body { display: grid; gap: var(--space-3); padding: 0 var(--space-5) var(--space-5); animation: rise var(--dur-base) var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.como { background: var(--bg-surface); border-radius: var(--radius-lg); border-left: 4px solid var(--accent-gold); box-shadow: var(--shadow-card); }
.como > summary { color: var(--text-gold); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.como > summary .act { margin-left: auto; font-family: var(--body); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.como-body { display: flex; flex-direction: column; gap: var(--space-4); padding: 0 var(--space-5) var(--space-5); animation: rise var(--dur-base) var(--ease-out); }
.como-body ol { display: flex; flex-direction: column; gap: 10px; }
.como-body li { display: flex; gap: 12px; align-items: flex-start; }
.num { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-card-hover); display: grid; place-items: center; font-family: var(--mono); font-size: 14px; flex: none; }
.ex { background: var(--bg-card); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.ex.warn { background: var(--status-warning-bg); color: var(--status-warning); }
.como-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--size-touch); color: var(--text-gold); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.como-link:hover .arrow { transform: translateX(4px); }

/* campos */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-weight: 600; }
.input { min-height: var(--size-touch); padding: var(--space-2) var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); font: inherit; width: 100%; color: var(--text-primary); transition: box-shadow var(--dur-fast), border-color var(--dur-fast); }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--focus-ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 25%, transparent); }
.input.mono { font-family: var(--mono); font-weight: 500; }
.help { font-size: 14px; color: var(--text-muted); }
.help.err { color: var(--status-danger); }

/* tarefas */
.tarefa { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-default); }
.tarefa .nome { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tarefa .pessoas { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.check { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-surface); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--dur-fast), transform var(--dur-fast) var(--spring-snappy); margin: 0; }
.check:checked { background: var(--text-primary); border-color: var(--text-primary); }
.check:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--text-inverse); border-bottom: 2px solid var(--text-inverse); transform: rotate(-45deg) translate(1px, -1px); animation: tick var(--dur-base) var(--ease-out); }
@keyframes tick { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.check:active { transform: scale(.9); }
.tarefa.done .nome { color: var(--text-muted); text-decoration: line-through; }
.touch-row { min-height: var(--size-touch); }

/* tabelas viram cartões no celular */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border-default); }
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border-default); vertical-align: middle; }
@media (max-width: 719px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 0; border-bottom: 1px solid var(--border-default); }
  .tbl td { border: 0; padding: 4px 0; display: flex; gap: 12px; justify-content: space-between; }
  .tbl td::before { content: attr(data-l); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); flex: none; padding-top: 3px; }
}

/* gráficos */
.hbar { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; }
.hbar .b { height: 14px; border-radius: 4px; background: var(--c, var(--accent-gold)); transform-origin: left; animation: grow var(--dur-chart) var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.donut { width: 140px; height: 140px; flex: none; }
.donut path { fill: none; stroke-width: 22; animation: fadeIn var(--dur-chart) var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.linechart { width: 100%; height: auto; }
.legend { display: flex; flex-direction: column; gap: 6px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.gauge { width: 180px; height: 104px; }
.gauge .track { stroke: var(--border-default); }
.gauge .fill { stroke: var(--accent-gold); stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw var(--dur-chart) var(--spring-soft) .1s forwards; }
.gauge .needle { transform-origin: 90px 90px; transform: rotate(var(--rot0, -90deg)); animation: needle var(--dur-chart) var(--spring-soft) .1s forwards; stroke: var(--text-primary); }
@keyframes needle { to { transform: rotate(var(--rot, 0deg)); } }
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }

/* stagger */
[data-stagger] > * { animation: rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }

/* diálogo (busca, kit) */
dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; color: inherit; }
dialog::backdrop { background: rgba(28, 26, 21, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] .panel { animation: pop var(--dur-base) var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
.panel { background: var(--bg-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-panel); padding: var(--space-6); width: min(94vw, 560px); max-height: 88vh; overflow: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.search-panel { width: min(94vw, 640px); padding: var(--space-4); }
.search-panel .input { font-size: 18px; }
.results { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.result { display: flex; align-items: center; gap: 12px; min-height: var(--size-touch); padding: 8px 12px; border-radius: var(--radius-md); }
.result:hover, .result[aria-selected="true"] { background: var(--bg-card); }
.result .tipo { margin-left: auto; }
@media (max-width: 719px) { dialog.sheet { margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; } dialog.sheet .panel { width: 100%; max-height: 100%; height: 100%; border-radius: 0; } }

/* página: rotina */
.week { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 720px) { .week { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ev { background: var(--bg-card); border-radius: var(--radius-lg); border-left: 4px solid var(--c); padding: 12px; display: flex; flex-direction: column; gap: 4px; transition: opacity var(--dur-base); }
.ev.dim { opacity: .35; }
.daily { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px 16px; transition: opacity var(--dur-base); }
.daily.dim { opacity: .35; }
.hora { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; background: var(--text-primary); color: var(--text-inverse); border-radius: var(--radius-sm); padding: 4px 8px; }
.focos { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 900px) { .focos { grid-template-columns: repeat(3, 1fr); } }
.foco { border-left: 4px solid var(--c); border-radius: var(--radius-lg); background: var(--bg-surface); border-top: 1px solid var(--border-default); border-right: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.freq-grid { display: grid; gap: var(--space-4); align-items: start; grid-template-columns: 1fr; }
@media (min-width: 1280px) { .freq-grid { grid-template-columns: 1fr 1fr; } }
.freq-col { display: flex; flex-direction: column; gap: var(--space-4); }

/* frentes */
.infoitem { border-left: 4px solid var(--c); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 4px; }
.doc-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.sidecol { display: flex; flex-direction: column; gap: var(--space-4); }

/* funil */
.flow { display: flex; flex-direction: column; align-items: center; gap: 0; }
.fnode { background: var(--bg-surface); border-radius: var(--radius-md); border: 1px solid var(--c, var(--border-default)); border-left: 4px solid var(--c, var(--border-default)); padding: 16px; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 330px; animation: rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
.fnode.start { background: var(--bg-card); }
.fnode ul { display: flex; flex-direction: column; gap: 4px; }
.who { display: inline-flex; align-self: flex-start; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--c); color: var(--text-on-frente); }
.who.auto, .who.stop { color: var(--text-inverse); }
.rail { width: 2px; height: 18px; background: var(--border-strong); margin: 0 auto; }
.flow-split { display: grid; gap: 24px; grid-template-columns: 1fr; width: 100%; justify-items: center; align-items: start; }
.flow-split.two { max-width: 760px; }
@media (min-width: 900px) { .flow-split.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1500px) { .flow-split.big { grid-template-columns: 1.15fr 1fr; max-width: 1060px; } }
.branch-col { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; }
.sub-split { display: grid; gap: 12px; grid-template-columns: 1fr; width: 100%; justify-items: center; align-items: start; }
@media (min-width: 560px) { .sub-split { grid-template-columns: 1fr 1fr; } }
.branch { display: inline-flex; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; padding: 2px 12px; border-radius: var(--radius-pill); background: var(--c); color: var(--text-on-frente); text-transform: uppercase; }
.branch.stop { color: var(--text-inverse); }
.fim { display: inline-flex; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; padding: 4px 16px; border-radius: var(--radius-pill); background: var(--c); color: var(--text-on-frente); text-transform: uppercase; margin-top: 12px; }
.fim.stop { color: var(--text-inverse); }
.decisao { background: var(--bg-card); border: 2px solid var(--c); border-radius: var(--radius-md); padding: 12px 16px; max-width: 330px; width: 100%; }
.gate { display: flex; gap: 10px; background: var(--status-warning-bg); color: var(--status-warning); border-radius: var(--radius-md); padding: 12px 16px; max-width: 330px; }
.kit-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }

/* artigos */
.artcard { display: flex; gap: var(--space-4); align-items: flex-start; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-4); transition: background var(--dur-fast), transform var(--dur-base) var(--spring-soft); }
.artcard:hover { background: var(--bg-card-hover); transform: translateY(-2px); }
.thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--bg-surface); display: grid; place-items: center; flex: none; }
.prose { display: flex; flex-direction: column; gap: 20px; max-width: 720px; font-size: 17px; line-height: 1.55; }
.prose .h2 { margin-top: 12px; }
.pull { border-left: 4px solid var(--accent-gold); padding-left: 20px; font-family: var(--accent-font); font-weight: 700; font-size: 20px; line-height: 1.3; }
.callout { border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.callout.bad { background: var(--status-danger-bg); color: var(--status-danger); } .callout.good { background: var(--status-success-bg); color: var(--status-success); } .callout.act { background: var(--status-info-bg); color: var(--status-info); }
.callout p { color: var(--text-primary); }
.tl li { display: flex; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-default); }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--text-muted); padding: 4px; }
.cal .cell { min-height: 92px; border-radius: var(--radius-sm); background: var(--bg-card); padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .cell.out { background: var(--bg-page); color: var(--text-muted); }
.cal .cell.today { outline: 2px solid var(--text-primary); }
.cal .evt { border-left: 3px solid var(--c); padding-left: 4px; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.agenda { display: none; }
@media (max-width: 719px) { .cal { display: none; } .agenda { display: block; } }
.layer { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--bg-surface); border: 2px solid var(--c); font-weight: 600; transition: opacity var(--dur-fast), transform var(--dur-fast) var(--spring-snappy); }
.layer[aria-pressed="false"] { opacity: .45; border-style: dashed; }

/* gantt */
.gantt { display: grid; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.gantt-row { display: grid; grid-template-columns: 150px minmax(520px, 1fr); gap: 12px; align-items: center; }
.gantt-track { position: relative; height: 18px; }
.gantt-bar { position: absolute; top: 0; height: 18px; border-radius: 6px; background: var(--c); transform-origin: left; animation: grow var(--dur-chart) var(--ease-out) both; }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--status-danger); }

/* glossário */
.glos-list { display: flex; flex-direction: column; }
.glos-item { display: flex; align-items: center; gap: 8px; min-height: var(--size-touch); padding: 0 12px; border-radius: var(--radius-sm); transition: background var(--dur-fast); }
.glos-item:hover { background: var(--bg-card); }
.glos-item[aria-current="true"] { background: var(--bg-card-hover); box-shadow: inset 4px 0 0 var(--accent-gold); font-weight: 600; }
.az { display: flex; flex-wrap: wrap; gap: 6px; }
.az button { min-width: 34px; min-height: 34px; border-radius: var(--radius-sm); background: var(--bg-card); font-family: var(--mono); text-align: center; }
.az button.on { background: var(--text-primary); color: var(--text-inverse); }
.term-block { background: var(--bg-page); border-radius: var(--radius-md); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.term-block.ex { background: var(--bg-card); }
.rel { display: inline-flex; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--text-gold); color: var(--text-gold); font-size: 14px; }
.rel:hover { background: var(--bg-card); }
.termo { border-bottom: 1px dotted var(--text-gold); cursor: help; }

/* treinamento / guias */
.progress { height: 8px; border-radius: 4px; background: var(--bg-card-hover); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent-gold); border-radius: 4px; transition: width var(--dur-slow) var(--spring-soft); }
.guia-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: var(--radius-sm); min-height: var(--size-touch); transition: background var(--dur-fast); }
.guia-item:hover, .guia-item[aria-current="true"] { background: var(--bg-card-hover); }
.guia-item[aria-current="true"] { border-color: var(--accent-gold); border-width: 2px; }
.gtag { font-family: var(--mono); font-size: 14px; background: var(--text-primary); color: var(--text-inverse); padding: 2px 8px; border-radius: var(--radius-sm); }
.vote { display: flex; flex-direction: column; align-items: center; background: var(--bg-card); border-radius: var(--radius-md); padding: 4px 10px; min-width: 44px; min-height: 44px; justify-content: center; transition: transform var(--dur-fast) var(--spring-snappy); }
.vote:active { transform: scale(.92); }
.vote.on { background: var(--text-primary); color: var(--text-inverse); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .draw { stroke-dashoffset: 0; }
}
@media print { .sidebar, .topbar, .scrim { display: none; } .main { margin: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); max-width: min(92vw, 520px); padding: 12px 20px; border-radius: var(--radius-lg); background: var(--text-primary); color: var(--text-inverse); box-shadow: var(--shadow-raised); opacity: 0; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--spring-soft); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.brand .label { font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
.topbar-meta .label { white-space: nowrap; }

@media (min-width: 1280px) { .topbar-meta { display: flex; margin-left: auto; } }
.flow-split { grid-template-columns: 1fr; }

/* chave de tema claro/escuro */
.tema { position: relative; flex: none; width: 64px; height: 36px; border-radius: var(--radius-pill); background: var(--bg-card-hover); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: space-between; padding: 0 9px; color: var(--text-muted); transition: background var(--dur-fast) var(--ease-out); }
.tema::after { content: ""; position: absolute; inset: -4px; }
.tema i { position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%; background: var(--text-primary); transition: transform var(--dur-base) var(--spring-soft); }
.tema[aria-checked="true"] i { transform: translateX(28px); }
.tema svg { width: 16px; height: 16px; position: relative; z-index: 1; transition: color var(--dur-fast); }
.tema[aria-checked="false"] .sol, .tema[aria-checked="true"] .lua { color: var(--text-inverse); }
.tema:active i { width: 32px; }
.tema:active[aria-checked="true"] i { transform: translateX(24px); }

pre.msg { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--body); font-size: 15px; line-height: 1.5; background: var(--bg-card); border-radius: var(--radius-md); padding: 12px 14px; color: var(--text-primary); }

/* alvos de toque de 44 px em telas de toque (checagem Better Design: rule/touch-target-min-44px) */
@media (pointer: coarse), (max-width: 720px) {
  .az button { min-width: 44px; min-height: 44px; }
  .check { position: relative; }
  .check::before { content: ""; position: absolute; inset: -10px; }
  .tema { min-height: 44px; }
  .tema::after { inset: -4px; }
}

/* "Editar conteúdo" só aparece para quem pode editar */
.nav-item[data-k="editar"] { display: none; }
body.pode-editar .nav-item[data-k="editar"] { display: flex; }
