/* Agenda de posts — design system (tokens → componentes). Espaçamento em múltiplos de 4. */
:root {
  --bg: #0b0b0c; --surface: #111113; --surface-2: #17171a; --surface-3: #1e1e22;
  --border: #25252a; --border-strong: #34343b;
  --text: #ededee; --text-2: #b4b4bb; --muted: #8e8e97;
  --primary: #ededee; --on-primary: #0b0b0c; --primary-hover: #ffffff;
  --accent: #5b9bff; --accent-soft: rgba(91, 155, 255, .14);
  --ok: #3ecf8e; --ok-soft: rgba(62, 207, 142, .14);
  --warn: #f5a524; --warn-soft: rgba(245, 165, 36, .14);
  --err: #ff6369; --err-soft: rgba(255, 99, 105, .14);
  --focus: #5b9bff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-4: 0 24px 64px rgba(0, 0, 0, .55);
  --scrim: rgba(0, 0, 0, .6);
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 20px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  --rail: 68px; --side: 276px; --top: 64px;
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f4f5; --surface: #ffffff; --surface-2: #f8f8f9; --surface-3: #eeeef0;
  --border: #e4e4e7; --border-strong: #d0d0d6;
  --text: #18181b; --text-2: #3f3f46; --muted: #62626b;
  --primary: #18181b; --on-primary: #fafafa; --primary-hover: #000000;
  --accent: #1d5fd6; --accent-soft: rgba(29, 95, 214, .1);
  --ok: #0a7d4f; --ok-soft: rgba(10, 125, 79, .1);
  --warn: #9a5b00; --warn-soft: rgba(154, 91, 0, .1);
  --err: #c4262e; --err-soft: rgba(196, 38, 46, .08);
  --focus: #1d5fd6;
  --shadow-1: 0 1px 2px rgba(24, 24, 27, .06);
  --shadow-2: 0 8px 24px rgba(24, 24, 27, .12);
  --shadow-4: 0 24px 64px rgba(24, 24, 27, .22);
  --scrim: rgba(24, 24, 27, .45);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html, body, #raiz { height: 100%; max-width: 100vw; }
a { color: inherit; text-decoration: none; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; } svg.i.lg { width: 20px; height: 20px; }
.tnum, .num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); } ::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: var(--rail) var(--side) minmax(0, 1fr); height: 100%; transition: grid-template-columns .2s var(--ease); }
.app.sem-lateral { grid-template-columns: var(--rail) 0 minmax(0, 1fr); }
.rail { border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: var(--s3) 0; gap: var(--s3); background: var(--bg); }
.rail .espaco { flex: 1; }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; background: var(--surface-3); color: var(--text); border: 2px solid transparent; overflow: hidden; flex: none; transition: border-color .15s, transform .15s; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.ativo { border-color: var(--text); }
.av.sm { width: 20px; height: 20px; font-size: 10px; border-width: 0; }
.av.md { width: 32px; height: 32px; font-size: 12px; }
.av.xl { width: 56px; height: 56px; font-size: 20px; }
.rail .av:hover:not(.ativo) { border-color: var(--border-strong); }
.rail .av:active { transform: scale(.96); }
.rail .tracejado { border: 1px dashed var(--border-strong); background: none; color: var(--muted); }
.side { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--bg); }
.side-topo { height: var(--top); display: flex; align-items: center; padding: 0 var(--s6); border-bottom: 1px solid var(--border); flex: none; }
.conta-btn { display: flex; align-items: center; gap: var(--s2); font-size: 16px; font-weight: 600; padding: var(--s2) var(--s2); margin-left: calc(var(--s2) * -1); border-radius: var(--r-md); min-height: 40px; max-width: 100%; }
.conta-btn:hover { background: var(--surface-2); }
.conta-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s1); }
.nav.fim { margin-top: auto; padding-bottom: var(--s4); }
.nav-item { display: flex; align-items: center; gap: var(--s3); min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-md); color: var(--text-2); font-size: 15px; text-align: left; width: 100%; transition: background .15s, color .15s; white-space: nowrap; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.ativo { background: var(--surface-3); color: var(--text); }
.nav-item.ativo svg { color: var(--accent); }
.nav-item .cont { margin-left: auto; color: var(--muted); font-size: 13px; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.cal-layout > * { min-width: 0; }
.topo { height: var(--top); flex: none; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s6); border-bottom: 1px solid var(--border); }
.topo h1 { font-size: 16px; font-weight: 600; margin-right: auto; margin-left: var(--s2); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topo .info { color: var(--muted); font-size: 13px; margin-right: var(--s2); white-space: nowrap; }
.conteudo { flex: 1; overflow: auto; padding: var(--s6); }
.conteudo > .pagina { max-width: 1400px; margin: 0 auto; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; animation: aparece .15s var(--ease); }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobe { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s, opacity .15s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.96); }
.btn.primario { background: var(--primary); color: var(--on-primary); border-color: transparent; font-weight: 600; }
.btn.primario:hover { background: var(--primary-hover); }
.btn.fantasma { border-color: transparent; background: none; color: var(--text-2); }
.btn.fantasma:hover { background: var(--surface-3); color: var(--text); }
.btn.perigo { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--border)); }
.btn.perigo:hover { background: var(--err-soft); }
.btn.perigo.solido { background: var(--err); color: #fff; border-color: transparent; }
.btn.icone { width: 40px; padding: 0; }
.btn.sm { min-height: 32px; padding: 0 var(--s3); font-size: 13px; }
.btn.sm.icone { width: 32px; padding: 0; }
.btn[disabled], .btn.carregando { opacity: .5; pointer-events: none; }
.btn.carregando::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.campo { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.campo > label, .rotulo { font-size: 13px; font-weight: 500; color: var(--text-2); }
.campo .dica { font-size: 12px; color: var(--muted); }
.campo .erro { font-size: 12px; color: var(--err); display: none; }
.campo.invalido .erro { display: block; }
.campo.invalido .entrada { border-color: var(--err); }
.entrada { width: 100%; min-height: 40px; padding: 0 var(--s3); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; }
textarea.entrada { padding: var(--s3); min-height: 120px; resize: vertical; line-height: 1.55; }
.entrada::placeholder { color: var(--muted); }
.entrada:hover { border-color: var(--muted); }
.entrada:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.entrada[disabled] { opacity: .5; }
.seletor { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 40px; padding: 0 var(--s3); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); width: 100%; text-align: left; transition: border-color .15s; }
.seletor:hover { border-color: var(--muted); }
.seletor > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: var(--s2); }
.seletor svg:last-child { color: var(--muted); }
.busca { position: relative; min-width: 240px; }
.busca svg { position: absolute; left: var(--s3); top: 12px; color: var(--muted); pointer-events: none; }
.busca .entrada { padding-left: 40px; }
.interruptor { display: inline-flex; align-items: center; gap: var(--s3); min-height: 40px; cursor: pointer; user-select: none; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor i { width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: background .15s; flex: none; }
.interruptor i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s var(--ease), background .15s; }
.interruptor input:checked + i { background: var(--ok-soft); border-color: var(--ok); }
.interruptor input:checked + i::after { transform: translateX(16px); background: var(--ok); }
.interruptor input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.check { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, border-color .15s; }
.check:checked, .check:indeterminate { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check:indeterminate::after { content: ''; width: 8px; height: 2px; background: #fff; }
.alvo-toque { display: grid; place-items: center; width: 40px; height: 40px; margin: -11px; cursor: pointer; }

/* ---------- abas, selos, tabela ---------- */
.barra { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.barra .espaco { flex: 1; }
.abas { display: flex; flex: 0 1 auto; gap: var(--s1); padding: var(--s1); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow-x: auto; max-width: 100%; }
.aba { display: inline-flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-md); color: var(--muted); white-space: nowrap; font-weight: 500; transition: background .15s, color .15s; }
.aba:hover { color: var(--text); }
.aba.ativo { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.aba .n { font-size: 13px; color: var(--muted); }
.selo { display: inline-flex; align-items: center; gap: var(--s1); min-height: 24px; padding: 0 var(--s2); border-radius: var(--r-pill); font-size: 12px; font-weight: 500; border: 1px solid var(--border-strong); color: var(--text-2); white-space: nowrap; }
.selo.auto { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-soft); border-radius: var(--r-md); }
.selo.manual { border-style: dashed; color: var(--muted); border-radius: var(--r-md); }
.selo.teste { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.selo.ok { color: var(--ok); border-color: transparent; background: var(--ok-soft); }
.selo.warn { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.selo.err { color: var(--err); border-color: transparent; background: var(--err-soft); }
.selo.info { color: var(--accent); border-color: transparent; background: var(--accent-soft); }
.estado { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 500; }
.estado::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.estado.ok { color: var(--ok); } .estado.warn { color: var(--warn); } .estado.err { color: var(--err); } .estado.neutro { color: var(--text-2); } .estado.info { color: var(--accent); }
.painel { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.tabela-wrap { overflow-x: auto; position: relative; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: var(--s3) var(--s4); white-space: nowrap; border-bottom: 1px solid var(--border); }
th.ord { cursor: pointer; user-select: none; } th.ord:hover { color: var(--text); }
th .seta { display: inline-block; margin-left: var(--s1); opacity: .9; }
td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.marcada { background: var(--accent-soft); }
.d { text-align: right; } th.d { text-align: right; }
.sec { color: var(--muted); font-size: 13px; }
.sec2 { color: var(--text-2); }
.nada { color: var(--muted); }
.linha-post { display: flex; align-items: center; gap: var(--s3); min-width: 220px; cursor: pointer; }
.linha-post b { font-weight: 600; display: block; }
.miniatura { width: 44px; height: 55px; border-radius: var(--r-md); background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 600; overflow: hidden; flex: none; border: 1px solid var(--border); }
.miniatura img, .miniatura video { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: 13px; margin-top: 2px; }
.rodape-tab { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.pag { display: flex; align-items: center; gap: var(--s1); }
.pag button { min-width: 32px; height: 32px; border-radius: var(--r-md); color: var(--text-2); }
.pag button:hover:not([disabled]) { background: var(--surface-3); }
.pag button.ativo { background: var(--surface-3); color: var(--text); font-weight: 700; }
.pag button[disabled] { opacity: .35; cursor: default; }
.lote { position: sticky; bottom: 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-2); animation: sobe .2s var(--ease); }
.vazio { padding: var(--s12) var(--s6); text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.vazio h3 { color: var(--text); font-size: 18px; font-weight: 600; }
.vazio p { max-width: 440px; line-height: 1.55; }

/* ---------- menus, modais, aviso ---------- */
.menu { position: fixed; z-index: 70; min-width: 200px; max-width: 320px; max-height: 360px; overflow: auto; padding: var(--s1); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-2); animation: sobe .15s var(--ease); }
.menu button, .menu .sep-t { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-md); text-align: left; color: var(--text-2); }
.menu button:hover, .menu button.foco { background: var(--surface-3); color: var(--text); }
.menu button.sel { color: var(--text); font-weight: 600; }
.menu button.sel svg.check-i { margin-left: auto; color: var(--accent); }
.menu button.perigo { color: var(--err); }
.menu .sep { height: 1px; background: var(--border); margin: var(--s1) 0; }
.menu .sep-t { color: var(--muted); font-size: 12px; min-height: 28px; }
.pop { position: fixed; z-index: 70; padding: var(--s4); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-2); animation: sobe .15s var(--ease); max-width: calc(100vw - 16px); }
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--s4); pointer-events: none; }
.modal { pointer-events: auto; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-2xl); box-shadow: var(--shadow-4); animation: sobe .2s var(--ease); }
.modal.estreito { width: min(480px, 100%); } .modal.largo { width: min(960px, 100%); }
.modal-topo { display: flex; align-items: center; gap: var(--s3); padding: var(--s5) var(--s6); border-bottom: 1px solid var(--border); }
.modal-topo h2 { font-size: 18px; font-weight: 600; margin-right: auto; }
.modal-corpo { padding: var(--s6); overflow: auto; display: flex; flex-direction: column; gap: var(--s5); }
.modal-pe { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s2); padding: var(--s4) var(--s6); border-top: 1px solid var(--border); }
.modal-pe .espaco { flex: 1; }
.avisos-toast { width: max-content; max-width: calc(100vw - 32px); position: fixed; z-index: 90; bottom: var(--s6); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s2); align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-2); animation: sobe .2s var(--ease); max-width: min(520px, calc(100vw - 32px)); }
.toast.ok svg { color: var(--ok); } .toast.err svg { color: var(--err); }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.linha { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.pilha { display: flex; flex-direction: column; gap: var(--s3); }
.nota { padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: 13px; line-height: 1.5; display: flex; gap: var(--s3); align-items: flex-start; border: 1px solid transparent; }
.nota svg { margin-top: 1px; }
.nota.err { background: var(--err-soft); color: var(--err); } .nota.warn { background: var(--warn-soft); color: var(--warn); } .nota.info { background: var(--accent-soft); color: var(--accent); } .nota.ok { background: var(--ok-soft); color: var(--ok); }
.nota span { color: var(--text); }

/* ---------- mídias do editor ---------- */
.zona { border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: var(--s6); text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: var(--s2); cursor: pointer; transition: border-color .15s, background .15s; }
.zona:hover, .zona.sobre { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.midias { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s3); }
.midia { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); }
.midia img, .midia video { width: 100%; height: 100%; object-fit: cover; }
.midia .ord { position: absolute; top: var(--s1); left: var(--s1); min-width: 20px; height: 20px; padding: 0 var(--s1); border-radius: var(--r-pill); background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; display: grid; place-items: center; }
.midia .acoes { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: var(--s1); background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.midia .acoes button { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; border-radius: var(--r-sm); }
.midia .acoes button:hover { background: rgba(255, 255, 255, .2); }
.midia.carrega { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.contador { font-size: 12px; color: var(--muted); text-align: right; }
.contador.estoura { color: var(--err); }
.checklist { display: flex; flex-direction: column; gap: var(--s2); }

/* ---------- calendário ---------- */
.cal-layout { display: grid; grid-template-columns: 348px minmax(0, 1fr); gap: var(--s6); align-items: start; }
.mini { padding: var(--s5); }
.mini-topo { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.mini-topo b { font-size: 16px; font-weight: 600; margin-right: auto; }
.mini-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; text-align: center; }
.mini-grade .sem { font-size: 12px; color: var(--muted); padding: var(--s2) 0; }
.dia { position: relative; height: 40px; display: grid; place-items: center; border-radius: var(--r-md); color: var(--text); font-variant-numeric: tabular-nums; transition: background .12s; }
.dia:hover { background: var(--surface-3); }
.dia.fora { color: var(--muted); }
.dia.hoje { box-shadow: inset 0 0 0 1px var(--accent); }
.dia.sel { background: var(--surface-3); font-weight: 700; box-shadow: inset 0 0 0 1px var(--border-strong); }
.dia.alvo { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dia .pt { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.dia.desab { opacity: .35; pointer-events: none; }
.numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); padding-top: var(--s5); margin-top: var(--s5); border-top: 1px solid var(--border); }
.numeros b { display: block; font-size: 28px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.numeros span { color: var(--muted); font-size: 14px; }
.sem-data { padding-top: var(--s5); margin-top: var(--s5); border-top: 1px solid var(--border); }
.sem-data h3 { font-size: 14px; font-weight: 600; margin-bottom: var(--s3); }
.item-sd { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 40px; margin-bottom: var(--s2); padding: 0 var(--s3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); text-align: left; cursor: grab; }
.item-sd:hover { border-color: var(--border-strong); }
.item-sd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-barra { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s3); }
.cal-barra .titulo { font-size: 16px; font-weight: 600; margin: 0 auto 0 var(--s2); }
.chips-conta { display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); color: var(--text-2); font-size: 13px; }
.chip-conta { display: inline-flex; align-items: center; gap: var(--s2); min-height: 28px; padding: 0 var(--s2); border-radius: var(--r-md); }
.chip-conta:hover { background: var(--surface-3); }
.cards-dia { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: var(--s4); }
.card-post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; text-align: left; box-shadow: var(--shadow-1); transition: border-color .15s, transform .15s; cursor: pointer; }
.card-post:hover { border-color: var(--border-strong); }
.card-post.arrasta { opacity: .5; }
.card-post .capa { position: relative; aspect-ratio: 4 / 4.2; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); font-weight: 600; overflow: hidden; }
.card-post .capa img, .card-post .capa video { width: 100%; height: 100%; object-fit: cover; }
.card-post .capa .selo { position: absolute; top: var(--s2); right: var(--s2); }
.card-post .capa .vinc { position: absolute; top: var(--s2); left: var(--s2); width: 24px; height: 24px; border-radius: var(--r-md); background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.card-post .corpo { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.card-post .l1 { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; gap: var(--s2); }
.card-post .l1 span { display: inline-flex; align-items: center; gap: var(--s1); }
.card-post h4 { font-size: 15px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-post .l3 { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); font-size: 13px; color: var(--muted); }
.card-post.compacto .capa { aspect-ratio: 16 / 6; }
.sem-capa-mini { font-size: 12px; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(160px, 1fr)); gap: var(--s3); overflow-x: auto; padding-bottom: var(--s2); }
.col-dia { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); min-height: 260px; display: flex; flex-direction: column; }
.col-dia.alvo { border-color: var(--accent); background: var(--accent-soft); }
.col-dia header { padding: var(--s3); border-bottom: 1px solid var(--border); font-weight: 600; display: flex; justify-content: space-between; cursor: pointer; }
.col-dia header.hoje { color: var(--accent); }
.col-dia .lista { padding: var(--s2); display: flex; flex-direction: column; gap: var(--s2); }
.mini-card { display: flex; gap: var(--s2); padding: var(--s2); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); text-align: left; width: 100%; cursor: pointer; }
.mini-card:hover { border-color: var(--border-strong); }
.mini-card .miniatura { width: 32px; height: 40px; }
.mini-card b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-card small { color: var(--muted); font-size: 12px; }
.mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.mes .cab { padding: var(--s2) var(--s3); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cel { min-height: 112px; padding: var(--s2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.cel:nth-child(7n) { border-right: 0; }
.cel.fora { background: var(--surface-2); }
.cel.alvo { background: var(--accent-soft); }
.cel .nd { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer; align-self: flex-start; padding: 0 var(--s1); border-radius: var(--r-sm); }
.cel .nd.hoje { background: var(--accent); color: #fff; font-weight: 700; }
.cel .evento { display: flex; align-items: center; gap: var(--s1); min-height: 24px; padding: 0 var(--s2); border-radius: var(--r-sm); background: var(--surface-3); font-size: 12px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; cursor: pointer; border-left: 3px solid var(--accent); }
.cel .evento:hover { background: var(--border-strong); }
.cel .mais { font-size: 12px; color: var(--muted); text-align: left; padding: 0 var(--s1); }

/* ---------- desempenho, contas, avisos ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: var(--s4); margin-bottom: var(--s4); }
.kpi { padding: var(--s5); }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { display: block; font-size: 28px; font-weight: 600; line-height: 1.2; margin-top: var(--s1); font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12px; }
.sec-titulo { font-size: 16px; font-weight: 600; margin-bottom: var(--s4); }
.graf { padding: var(--s5); margin-bottom: var(--s4); }
.graf svg { width: 100%; height: auto; display: block; }
.graf text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.grade-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.item-lista { display: flex; align-items: flex-start; gap: var(--s4); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.item-lista:last-child { border-bottom: 0; }
.item-lista .txt { flex: 1; min-width: 0; }
.item-lista .txt b { font-weight: 600; display: block; }
.passos { counter-reset: p; display: flex; flex-direction: column; gap: var(--s3); padding: 0; list-style: none; }
.passos li { counter-increment: p; display: flex; gap: var(--s3); color: var(--text-2); line-height: 1.55; }
.passos li::before { content: counter(p); width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; color: var(--text); }
kbd { font: 500 12px var(--mono); padding: 2px 8px; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); }
code { font: 13px var(--mono); background: var(--surface-3); padding: 1px 6px; border-radius: var(--r-sm); }
.login { height: 100%; display: grid; place-items: center; padding: var(--s4); }
.login form { width: min(400px, 100%); padding: var(--s8); display: flex; flex-direction: column; gap: var(--s5); border-radius: var(--r-2xl); }
.login h1 { font-size: 24px; font-weight: 600; line-height: 1.2; }
.login p { color: var(--muted); line-height: 1.5; }
.cmp td:first-child, .cmp th:first-child { position: sticky; left: 0; background: var(--surface); }
.venc { color: var(--ok); font-weight: 700; }
.so-mobile { display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-layout .mini { max-width: 420px; }
}
@media (max-width: 900px) {
  .app, .app.sem-lateral { display: block; }
  .rail { position: fixed; z-index: 30; inset: auto 0 0 0; height: 64px; flex-direction: row; padding: 0 var(--s3); border-right: 0; border-top: 1px solid var(--border); overflow-x: auto; justify-content: flex-start; }
  .rail .espaco { display: none; }
  .side { position: fixed; z-index: 45; inset: 0 auto 0 0; width: min(300px, 86vw); border-right: 1px solid var(--border-strong); transform: translateX(-102%); transition: transform .2s var(--ease); box-shadow: var(--shadow-4); }
  .app.menu-aberto .side { transform: none; }
  .conteudo { padding: var(--s4); padding-bottom: 88px; }
  .topo { padding: 0 var(--s4); gap: var(--s2); }
  .topo .info, .topo .txt-btn { display: none; }
  .topo .btn { width: 44px; padding: 0; }
  .col-m3, .col-m4 { display: none; }
  .so-mobile { display: inline-flex; }
  .grade-2, .grade-3 { grid-template-columns: 1fr; }
  .busca { min-width: 0; flex: 1 1 100%; }
  .btn, .aba, .nav-item { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .modal-topo, .modal-corpo, .modal-pe { padding-left: var(--s4); padding-right: var(--s4); }
  .avisos-toast { bottom: 80px; }
}
@media (max-width: 560px) {
  .col-m2 { display: none; }
  .kpi b { font-size: 24px; }
  .modal-wrap { padding: 0; align-items: end; }
  .modal, .modal.estreito, .modal.largo { width: 100%; max-height: 94vh; border-radius: var(--r-2xl) var(--r-2xl) 0 0; }
  .semana { grid-template-columns: repeat(7, 180px); }
  .cel { min-height: 72px; padding: var(--s1); }
  .cel .evento { font-size: 0; padding: 0; min-height: 8px; width: 8px; border-radius: 50%; border-left-width: 0; background: var(--accent); }
}
