:root {
  --bg: #f4f6fb; --card: #ffffff; --ink: #14182b; --mut: #5f6780; --line: #e1e6f2; --line-2: #ecf0f8;
  --brand: #2563eb; --brand-2: #4f46e5; --brand-soft: #e8efff; --brand-ink: #1d4ed8; --on-brand: #ffffff;
  --ok: #12804a; --ok-soft: #e1f5ea; --warn: #b45f06; --warn-soft: #fff1dc; --bad: #d03a36; --bad-soft: #fde8e7; --idle: #8c93a8;
  --shadow: 0 1px 2px rgba(20, 40, 100, .06), 0 8px 24px rgba(20, 40, 100, .06);
  --shadow-up: 0 2px 4px rgba(20, 40, 100, .08), 0 16px 36px rgba(20, 40, 100, .14);
  --r: 16px; --safe-b: env(safe-area-inset-bottom, 0px);
  --barra-h: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220; --card: #171c2e; --ink: #eef1fb; --mut: #a0a9c2; --line: #28304a; --line-2: #1f2539;
    --brand: #6ea0ff; --brand-2: #8b86ff; --brand-soft: #1b2849; --brand-ink: #b3cbff; --on-brand: #0a1226;
    --ok: #3ccf7d; --ok-soft: #12301f; --warn: #f0a24a; --warn-soft: #3a2a10; --bad: #ff7d78; --bad-soft: #3a1818; --idle: #858ea6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --shadow-up: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 36px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-ink); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, p { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.so-desktop { display: none !important; }
@media (min-width: 900px) { .so-desktop { display: inline-flex !important; } .so-mobile { display: none !important; } }
.pular { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.pular:focus { top: 8px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.p { width: 16px; height: 16px; }
.ico.g { width: 24px; height: 24px; }

/* ---------- topo e navegação ---------- */
.topo { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line-2); }
.topo-in { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; min-height: 56px; }
.topo .esp { flex: 1; }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.marca-logo { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 40%, transparent); }
.marca-logo svg { width: 18px; height: 18px; fill: #fff; }
.marca-logo.grande { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 6px; }
.marca-logo.grande svg { width: 34px; height: 34px; }
.abas-topo { display: none; gap: 2px; margin-left: 6px; }
.aba-topo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; text-decoration: none; color: var(--mut); font-weight: 600; font-size: 14.5px; position: relative; }
.aba-topo:hover { background: var(--card); color: var(--ink); }
.aba-topo[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.eu { display: flex; align-items: center; gap: 8px; }
.eu-nome { font-size: 14px; font-weight: 600; max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-eu { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.papel { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.papel.equipe { background: var(--line-2); color: var(--mut); }
.papel.socio { background: var(--ok-soft); color: var(--ok); }
.topo form { margin: 0; }
@media (max-width: 899px) { .eu-nome, .eu .btn-sair-topo { display: none; } }
@media (min-width: 900px) { .abas-topo { display: flex; } .barra { display: none !important; } }
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--barra-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
.barra-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; border: 0; background: none; text-decoration: none; color: var(--mut); font-size: 11.5px; font-weight: 600; position: relative; }
.barra-item[aria-current="page"] { color: var(--brand-ink); }
.barra-item[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 32px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.cracha { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.aba-topo .cracha { position: static; margin-left: 2px; }

/* ---------- página ---------- */
.pagina { max-width: 1180px; margin: 0 auto; padding: 18px 16px calc(var(--barra-h) + var(--safe-b) + 40px); outline: none; }
@media (min-width: 900px) { .pagina { padding-bottom: 56px; } }
.cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin: 4px 0 18px; }
.cab h1 { margin: 0; font-size: clamp(24px, 4.6vw, 32px); line-height: 1.12; letter-spacing: -.025em; outline: none; }
.cab p { margin: 6px 0 0; color: var(--mut); font-size: 15px; max-width: 62ch; }
.cab-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.atualizado { font-size: 12.5px; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }
.atualizado.falha { color: var(--warn); }
.sec-titulo { margin: 28px 0 12px; font-size: 12.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.sec-titulo:first-child { margin-top: 0; }
.mut { color: var(--mut); }
.peq { font-size: 13px; }

/* ---------- botões, formulários ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--mut); }
.btn:active { transform: translateY(1px); }
.btn.primario { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primario:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.perigo { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn.perigo.cheio { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.suave { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.btn.grande { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.icone-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--line-2); display: grid; place-items: center; color: var(--ink); flex: none; }
.icone-btn:hover { background: var(--line); }
.campo { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.campo > label, .campo > .rotulo, legend.rotulo { font-size: 13px; font-weight: 600; color: var(--mut); }
.campo .dica { font-size: 12.5px; color: var(--mut); }
input[type="text"], input[type="search"], input[type="email"], input[type="number"], textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14.5px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; font-weight: 600; color: var(--mut); cursor: pointer; }
.seg input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.acoes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.erro-campo { color: var(--bad); font-size: 13px; font-weight: 600; margin: -6px 0 10px; }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); font-size: 14px; line-height: 1.45; margin: 0 0 16px; }
.aviso .ico { margin-top: 1px; color: var(--brand-ink); }
.aviso.warn { background: var(--warn-soft); } .aviso.warn .ico { color: var(--warn); }
.aviso.bad { background: var(--bad-soft); } .aviso.bad .ico { color: var(--bad); }
.aviso-erro { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin: 0 0 14px; }

/* ---------- selos e pontos ---------- */
.selo { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--mut); white-space: nowrap; line-height: 1.4; }
.selo.ok { background: var(--ok-soft); color: var(--ok); } .selo.bad { background: var(--bad-soft); color: var(--bad); } .selo.warn { background: var(--warn-soft); color: var(--warn); } .selo.brand { background: var(--brand-soft); color: var(--brand-ink); }
.selo.donna_a { background: #fde9f3; color: #a3195b; } .selo.oriz { background: #e3f6f3; color: #0b7a6c; } .selo.integrativa { background: #eaf3df; color: #3f6b12; }
@media (prefers-color-scheme: dark) { .selo.donna_a { background: #3b1a2c; color: #ff9ccb; } .selo.oriz { background: #12302d; color: #5fd9c6; } .selo.integrativa { background: #232f14; color: #aedc72; } }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--idle); flex: none; display: inline-block; }
.ponto.executando { background: var(--warn); animation: pulso 1.3s ease-in-out infinite; }
.ponto.online, .ponto.no_ar { background: var(--ok); }
.ponto.erro, .ponto.fora { background: var(--bad); }
.ponto.pausado { background: transparent; border: 2px solid var(--idle); }
.ponto.nivel-erro { background: var(--bad); } .ponto.nivel-aviso { background: var(--warn); }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

/* ---------- cartões e estados ---------- */
.cartao { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
a.cartao, button.cartao { display: block; width: 100%; text-align: left; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
a.cartao:hover, button.cartao:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.esqueleto { height: 120px; border-radius: var(--r); background: linear-gradient(90deg, var(--line-2), var(--card), var(--line-2)); background-size: 200% 100%; animation: brilho 1.4s linear infinite; }
.esqueleto.alto { height: 260px; margin-bottom: 12px; } .esqueleto.fino { height: 56px; margin-bottom: 10px; }
@keyframes brilho { to { background-position: -200% 0; } }
.vazio { text-align: center; padding: 34px 18px; color: var(--mut); border: 1px dashed var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--card) 60%, transparent); font-size: 14.5px; }
.vazio .ico { width: 30px; height: 30px; margin-bottom: 8px; opacity: .6; }
.vazio p { margin: 0 auto; max-width: 46ch; }
.erro-estado { text-align: center; padding: 28px 18px; border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-soft); border-radius: var(--r); }
.erro-estado p { margin: 0 0 14px; font-weight: 600; color: var(--bad); }

/* ---------- avisos (toast) ---------- */
.avisos { position: fixed; z-index: 90; left: 0; right: 0; bottom: calc(var(--barra-h) + var(--safe-b) + 12px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 12px; pointer-events: none; }
@media (min-width: 900px) { .avisos { bottom: 24px; align-items: flex-end; padding: 0 24px; } }
.aviso-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; max-width: 460px; width: 100%; padding: 12px 8px 12px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-up); font-size: 14.5px; font-weight: 500; animation: entra .2s ease; }
.aviso-toast.erro { background: var(--bad); color: #fff; }
.aviso-toast.ok { background: var(--ok); color: #fff; }
@media (prefers-color-scheme: dark) { .aviso-toast.ok { color: #06210f; } .aviso-toast.erro { color: #2a0a09; } }
.aviso-toast span { flex: 1; padding-top: 1px; }
.aviso-toast button { background: none; border: 0; color: inherit; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; opacity: .85; flex: none; }
.aviso-toast button:hover { background: rgba(255, 255, 255, .15); }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- início ---------- */
.saudacao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.data-hoje { color: var(--mut); font-size: 15px; }
.resumos { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .resumos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.bloco { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.bloco-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.bloco-num { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.bloco-num small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--mut); margin-left: 6px; }
.bloco ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bloco li { font-size: 14px; line-height: 1.35; display: flex; gap: 8px; align-items: flex-start; }
.bloco li .t { flex: 1; min-width: 0; }
.bloco li .m { display: block; font-size: 12.5px; color: var(--mut); }
.bloco li.velho .m { color: var(--bad); font-weight: 600; }
.bloco .rodape { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--brand-ink); display: inline-flex; align-items: center; gap: 6px; }
.bloco li a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bloco li .ponto { margin-top: 6px; }
.tudo-certo { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; font-size: 14.5px; }
.grupo-sis { margin: 26px 0 0; }
.grupo-sis > h3 { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.sistemas { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .sistemas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .sistemas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .sistemas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sistema { display: flex; flex-direction: column; gap: 10px; min-height: 124px; padding: 14px; }
.sistema.fora { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); background: color-mix(in srgb, var(--bad-soft) 55%, var(--card)); }
.sis-topo { display: flex; align-items: center; gap: 10px; }
.sis-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.sis-nome { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; line-height: 1.2; flex: 1; min-width: 0; }
.sistema .ext { width: 15px; height: 15px; color: var(--mut); flex: none; }
.sis-desc { font-size: 13.5px; color: var(--mut); line-height: 1.4; flex: 1; }
.sis-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mut); }

/* ---------- tarefas ---------- */
.faixa { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: thin; }
@media (min-width: 900px) { .faixa { margin: 0 0 8px; padding-left: 2px; padding-right: 2px; } }
.chip-ag { display: flex; align-items: center; gap: 10px; flex: none; min-height: 52px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); scroll-snap-align: start; position: relative; }
.chip-ag:hover { border-color: var(--mut); }
.chip-ag[aria-current="page"] { border-color: var(--brand); background: var(--brand-soft); }
.chip-ag .nome { font-weight: 600; font-size: 14px; line-height: 1.15; }
.chip-ag .sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); }
.foto-ag { position: relative; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.foto-ag img { width: 100%; height: 100%; object-fit: cover; }
.foto-ag.g { width: 52px; height: 52px; font-size: 20px; border-radius: 16px; }
.contagem { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.contagem.mut { background: var(--line); color: var(--mut); }
.grade-ag { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grade-ag { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grade-ag { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1160px) { .grade-ag { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card-ag { display: flex; flex-direction: column; gap: 12px; }
.card-ag .topo-ag { display: flex; gap: 12px; align-items: center; }
.card-ag .nome { font-weight: 700; font-size: 16px; letter-spacing: -.01em; line-height: 1.2; }
.card-ag .funcao { font-size: 13px; color: var(--mut); line-height: 1.3; }
.card-ag .estado { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mut); }
.contadores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.contadores div { text-align: center; background: var(--line-2); border-radius: 10px; padding: 6px 2px; }
.contadores b { display: block; font-size: 17px; line-height: 1.1; }
.contadores span { font-size: 10.5px; color: var(--mut); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.abas-col { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; background: var(--line-2); border-radius: 14px; }
.abas-col button { flex: 1; min-width: 0; min-height: 44px; padding: 0 2px; white-space: nowrap; border: 0; border-radius: 10px; background: none; font-size: 12.5px; font-weight: 600; color: var(--mut); display: flex; align-items: center; justify-content: center; gap: 4px; }
.abas-col button .contagem { min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
.abas-col button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
.colunas { display: grid; grid-template-columns: 1fr; gap: 14px; touch-action: pan-y; }
.col { display: none; min-width: 0; }
.col.atual { display: block; }
.col-cab { display: none; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
.col-lista { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) {
  .abas-col { display: none; }
  .colunas { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
  .col { display: block; background: var(--line-2); border-radius: 18px; padding: 12px 10px; border-top: 3px solid var(--idle); }
  .col[data-col="fazendo"] { border-top-color: var(--warn); } .col[data-col="esperando"] { border-top-color: var(--brand); } .col[data-col="feito"] { border-top-color: var(--ok); }
  .col-cab { display: flex; }
}
.card-t { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); width: 100%; text-align: left; min-height: 44px; }
.card-t:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.card-t .cod { font-size: 11.5px; font-weight: 700; color: var(--mut); letter-spacing: .04em; }
.card-t .tit { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.card-t .meta { font-size: 12.5px; color: var(--mut); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.card-t .sel { display: flex; flex-wrap: wrap; gap: 6px; }
.card-t .res { font-size: 13px; color: var(--ink); background: var(--line-2); border-radius: 10px; padding: 8px 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tipo-sol { font-weight: 600; }
.fab { position: fixed; z-index: 25; right: 16px; bottom: calc(var(--barra-h) + var(--safe-b) + 16px); min-height: 52px; padding: 0 20px; border-radius: 999px; box-shadow: var(--shadow-up); }

/* ---------- folhas (detalhe e modais) ---------- */
.folha-fundo { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 28, .5); display: flex; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.folha { background: var(--bg); display: flex; flex-direction: column; width: 100%; height: 100%; max-height: 100dvh; box-shadow: var(--shadow-up); }
.folha-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); background: var(--card); }
.folha-cab h2 { margin: 0; flex: 1; font-size: 17px; letter-spacing: -.01em; line-height: 1.25; }
.folha-corpo { flex: 1; overflow-y: auto; padding: 18px; padding-bottom: calc(18px + var(--safe-b)); overscroll-behavior: contain; }
@media (min-width: 900px) {
  .folha-fundo.lateral { justify-content: flex-end; }
  .folha.lateral { width: min(560px, 100%); animation: desliza .22s ease; }
  .folha-fundo.modal { align-items: center; justify-content: center; padding: 24px; }
  .folha.modal { width: min(520px, 100%); height: auto; max-height: min(88dvh, 760px); border-radius: 22px; overflow: hidden; animation: sobe .2s ease; }
  .folha.modal.larga { width: min(680px, 100%); }
}
@keyframes desliza { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes sobe { from { transform: translateY(12px); opacity: .4; } to { transform: none; opacity: 1; } }
.folha-fundo.baixo { align-items: flex-end; justify-content: center; }
.folha.baixo { width: min(520px, 100%); height: auto; max-height: 85dvh; border-radius: 22px 22px 0 0; animation: sobe .22s ease; }
@media (max-width: 899px) { .folha-fundo.modal { align-items: flex-end; } .folha.modal { height: auto; max-height: 92dvh; border-radius: 22px 22px 0 0; animation: sobe .22s ease; } }
.lista-menu { display: flex; flex-direction: column; gap: 6px; }
.lista-menu a, .lista-menu button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15.5px; width: 100%; text-align: left; }
.lista-menu form { margin: 0; }

/* ---------- detalhe de tarefa ---------- */
.det-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--mut); margin: 0 0 14px; align-items: center; }
.texto-longo { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.texto-longo p { margin: 0 0 .6em; } .texto-longo p:last-child { margin-bottom: 0; }
.texto-longo ul, .texto-longo ol { margin: .2em 0 .7em; padding-left: 1.3em; } .texto-longo li { margin: .15em 0; }
.texto-longo h3, .texto-longo h4, .texto-longo h5 { margin: .9em 0 .35em; letter-spacing: -.005em; line-height: 1.25; }
.texto-longo h3 { font-size: 1.12em; } .texto-longo h4 { font-size: 1.04em; } .texto-longo h5 { font-size: 1em; }
.texto-longo code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: color-mix(in srgb, var(--ink) 9%, transparent); padding: 1px 5px; border-radius: 6px; }
.resultado { border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok-soft) 55%, var(--card)); border-radius: 16px; padding: 14px 16px; margin: 0 0 18px; }
.resultado-cab { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--ok); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.bloco-det { margin: 0 0 20px; }
.bloco-det > h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.linha-tempo { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.com { border-radius: 14px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); }
.com.agente { border-left: 4px solid var(--brand); }
.com.pessoa { background: var(--line-2); border-color: transparent; }
.com.sistema { background: var(--warn-soft); border-color: transparent; font-size: 13.5px; }
.com-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--mut); margin-bottom: 4px; }
.com-cab b { color: var(--ink); font-size: 13.5px; }
.tl { list-style: none; margin: 0 0 16px; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.tl li { position: relative; font-size: 14px; }
.tl li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.tl .q { display: block; font-size: 12px; color: var(--mut); }
.pares { margin: 0 0 16px; display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.pares dt { color: var(--mut); font-weight: 600; font-size: 13px; } .pares dd { margin: 0; overflow-wrap: anywhere; }
.caixa-form { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px; margin: 0 0 16px; }
.caixa-form h3 { margin: 0 0 10px; font-size: 14.5px; }

/* ---------- pipelines ---------- */
.abas-pipe { position: relative; display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 6px; }
@media (min-width: 900px) { .abas-pipe { margin: 0 0 14px; padding: 2px 0 6px; } }
.abas-pipe a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; background: var(--card); border: 1px solid var(--line); color: var(--mut); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.abas-pipe a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pipe { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px; padding: 4px 16px 14px; align-items: flex-start; }
@media (min-width: 900px) { .pipe { margin: 0; padding: 4px 0 14px; scroll-snap-type: none; } }
.pcol { flex: 0 0 82%; scroll-snap-align: start; background: var(--line-2); border-radius: 18px; padding: 12px 10px; min-width: 0; border-top: 3px solid var(--idle); }
@media (min-width: 640px) { .pcol { flex-basis: 46%; } }
@media (min-width: 900px) { .pcol { flex: 1 0 264px; max-width: 360px; } }
.pcol.destaque { border-top-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 60%, var(--line-2)); }
.pcol-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); }
.pcol-lista { display: flex; flex-direction: column; gap: 10px; }
.pvazio { font-size: 13.5px; color: var(--mut); padding: 10px 6px; line-height: 1.45; }
.card-p { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); width: 100%; text-align: left; }
.card-p:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.card-p .tit { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.card-p .sub { font-size: 13px; color: var(--mut); line-height: 1.35; }
.card-p .sel { display: flex; flex-wrap: wrap; gap: 6px; }
.card-p .esp { font-size: 12.5px; color: var(--mut); }
.card-p .esp.alerta { color: var(--bad); font-weight: 600; }
.card-p .idade { font-size: 12px; color: var(--mut); display: flex; align-items: center; gap: 5px; }
.card-p .vals { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--mut); border-top: 1px solid var(--line-2); padding-top: 6px; }
.card-p .vals b { color: var(--ink); font-weight: 600; }

/* ---------- aprovações ---------- */
.lista-aprov { display: flex; flex-direction: column; gap: 14px; }
.aprov { display: flex; flex-direction: column; gap: 10px; }
.aprov-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; }
.aprov-cab h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; line-height: 1.25; flex: 1 1 260px; }
.aprov-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--mut); }
.aprov-meta .velho { color: var(--bad); font-weight: 700; }
.riscos { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.riscos li { display: flex; gap: 8px; font-size: 14px; align-items: flex-start; }
.riscos .ico { color: var(--warn); margin-top: 2px; width: 16px; height: 16px; }
details.det { border: 1px solid var(--line); border-radius: 12px; background: var(--line-2); }
details.det > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-weight: 600; font-size: 14px; list-style: none; }
details.det > summary::-webkit-details-marker { display: none; }
details.det > summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--mut); }
details.det[open] > summary::after { content: "−"; }
details.det > .corpo { padding: 2px 14px 14px; }
.aprov-acoes { border-top: 1px solid var(--line-2); padding-top: 12px; }
.aprov-acoes .campo { margin-bottom: 10px; }
.aprov-acoes .acoes .btn { flex: 1 1 auto; }

/* ---------- Juliana ---------- */
.abas-int { display: flex; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 14px; margin: 0 0 16px; max-width: 520px; }
.abas-int button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: none; font-weight: 600; font-size: 14px; color: var(--mut); display: flex; align-items: center; justify-content: center; gap: 6px; }
.abas-int button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
.busca { position: relative; margin: 0 0 14px; max-width: 560px; }
.busca .ico { position: absolute; left: 14px; top: 12px; color: var(--mut); pointer-events: none; }
.busca input { padding-left: 42px; }
.lista-simples { display: flex; flex-direction: column; gap: 8px; }
.item-art { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); width: 100%; text-align: left; }
.item-art:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.item-art .t { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.item-art .t small { display: block; font-weight: 400; color: var(--mut); font-size: 12.5px; }
.artigo { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 1000px) { .artigo { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.conteudo-art { max-height: 62vh; overflow-y: auto; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.voltar { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 0; background: none; color: var(--brand-ink); font-weight: 600; padding: 0 4px; margin: 0 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

/* ---------- admin ---------- */
.pessoas { display: flex; flex-direction: column; gap: 10px; }
.pessoa { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; padding: 14px; }
@media (min-width: 900px) { .pessoa { grid-template-columns: minmax(0, 1.4fr) 170px 120px auto; } }
.pessoa .quem { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pessoa .nome { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pessoa .sub { font-size: 13px; color: var(--mut); overflow-wrap: anywhere; }
.pessoa .controles { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pessoa.inativa { opacity: .7; }
.interruptor { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: none; padding: 0; font-weight: 600; font-size: 14px; }
.interruptor .trilho { width: 46px; height: 28px; border-radius: 999px; background: var(--idle); position: relative; transition: background .15s; flex: none; }
.interruptor .trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.interruptor[aria-checked="true"] .trilho { background: var(--ok); }
.interruptor[aria-checked="true"] .trilho::after { transform: translateX(18px); }
.interruptor[disabled] { opacity: .55; cursor: not-allowed; }
.papeis-desc { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .papeis-desc { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.papeis-desc h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.papeis-desc p { margin: 0; font-size: 14px; color: var(--mut); }
.tabela-rolavel { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table.matriz { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.matriz th, .matriz td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line-2); }
.matriz th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); background: var(--line-2); }
.matriz th:first-child, .matriz td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; }
.matriz th:first-child { background: var(--line-2); }
.matriz td small { display: block; color: var(--mut); font-size: 12px; }
.matriz tr:last-child td { border-bottom: 0; }
.matriz .sim { color: var(--ok); } .matriz .nao { color: var(--idle); }
.atividade { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.atividade li { padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: space-between; }
.atividade li:last-child { border-bottom: 0; }
.atividade .q { color: var(--mut); font-size: 12.5px; white-space: nowrap; }
.convite { display: flex; gap: 8px; margin: 8px 0 8px; }
.convite input { flex: 1; min-width: 0; }

/* ---------- entrar ---------- */
.pagina-entrar { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent), var(--bg); }
.entrar { width: 100%; max-width: 440px; padding: 24px 16px; }
.entrar-cartao { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 34px 26px 28px; text-align: center; box-shadow: var(--shadow-up); display: flex; flex-direction: column; gap: 10px; }
.entrar-cartao h1 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.02em; }
.entrar-cartao p { margin: 0; color: var(--mut); }
.entrar-cartao .btn { margin-top: 14px; width: 100%; }
.entrar-nota { font-size: 13px; margin-top: 8px !important; }

/* ---------- utilitários ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.resumos > .erro-estado, .resumos > .vazio { grid-column: 1 / -1; }
.espaco-b { margin-bottom: 16px; }
.tit-det { margin: 0 0 8px; font-size: 20px; letter-spacing: -.015em; line-height: 1.25; }

/* ---------- cards de aprovação ---------- */
.ap-card { display: flex; flex-direction: column; gap: 12px; }
.ap-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-quem { flex: 1 1 200px; min-width: 0; line-height: 1.3; }
.ap-idade { font-size: 12.5px; color: var(--mut); display: flex; align-items: center; gap: 4px; }
.ap-idade.velho { color: var(--bad); font-weight: 700; }
.ap-tit { margin: 0; font-size: 18px; letter-spacing: -.01em; line-height: 1.25; }
.ap-bloco .ap-rot { font-size: 12px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.ap-destino { font-size: 14.5px; font-weight: 600; }
.ap-texto { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.5; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.ap-edita { min-height: 140px; font-size: 14.5px; }
.ap-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-mini { width: 84px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line-2); }
.ap-mini img { width: 100%; height: 100%; object-fit: cover; }
.ap-grande { width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 12px; background: var(--line-2); }
.ap-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.ap-topo p { margin: 0; }
.ap-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.ap-nav.base { margin: 12px 0 0; }
.ap-cont { font-weight: 700; font-size: 14px; }
.ap-card.ap-aprovada { border-left: 4px solid var(--ok); }
.ap-card.ap-rejeitada { border-left: 4px solid var(--bad); }
.ap-card.ap-ajuste { border-left: 4px solid var(--warn); }
.so-mobile-ou-um { display: none; }
@media (max-width: 899px) { .so-mobile-ou-um { display: inline; } }
@media (min-width: 900px) { .lista-aprov { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

/* ---------- card de tarefa pendente ---------- */
.ap-res { overflow-wrap: anywhere; }
.ap-res.recolhido { max-height: 9.6em; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.ap-arqs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ap-arqs li { display: flex; align-items: center; gap: 8px; }
.ap-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13.5px; font-weight: 600; color: var(--mut); }
.ap-tarefa { border-top: 3px solid var(--brand-2); }
.ap-chips { margin-bottom: 12px; }
.chip-ag[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
button.chip-ag { font: inherit; }

.ap-det-bot { display: flex; }
.ap-detalhe { margin: 0; }
.voltar { text-decoration: none; }
@media (min-width: 900px) { .lista-aprov .ap-card:has(.ap-detalhe:not([hidden])) { grid-column: 1 / -1; } }
