/* Anota AI · Meu painel — celular primeiro; no PC centraliza em 560px.
   Cores da marca (logo modelo 5): azul #4f8cff, amarelo #ffd026, fundo #10224d → #07132e. Verde = entrou, vermelho = saiu. */
:root {
  --bg: #f2f5fb; --card: #ffffff; --card2: #f6f8fd; --fg: #0e1a36; --sub: #5d6987; --linha: #e3e8f3;
  --azul: #2f6fea; --azul-claro: #e7efff; --amarelo: #f5b800; --topo1: #10224d; --topo2: #07132e;
  --ent: #11a36b; --sai: #e0474c; --aviso: #b86e00; --aviso-bg: #fff4dd; --ok-bg: #e3f7ee;
  --sombra: 0 1px 2px rgba(16, 34, 77, .06), 0 6px 20px rgba(16, 34, 77, .06);
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --raio: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #07132e; --card: #0f1f45; --card2: #142859; --fg: #e9effd; --sub: #9eabca; --linha: #1e3264;
  --azul: #4f8cff; --azul-claro: #17306a; --amarelo: #ffd026; --ent: #34d399; --sai: #ff7b7b; --aviso: #ffc35a; --aviso-bg: #3a2b0c; --ok-bg: #0f3a2b;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #07132e; --card: #0f1f45; --card2: #142859; --fg: #e9effd; --sub: #9eabca; --linha: #1e3264;
  --azul: #4f8cff; --azul-claro: #17306a; --amarelo: #ffd026; --ent: #34d399; --sai: #ff7b7b; --aviso: #ffc35a; --aviso-bg: #3a2b0c; --ok-bg: #0f3a2b;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 6px; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.ent { color: var(--ent); } .sai { color: var(--sai); }

/* abertura */
.abertura { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; background: linear-gradient(160deg, var(--topo1), var(--topo2)); color: #fff; }
.girando { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #ffd026; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* logo */
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo i { width: 28px; height: 28px; border-radius: 8px; background: #4f8cff; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 16px; position: relative; box-shadow: 0 4px 12px rgba(79, 140, 255, .45); }
.logo i::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 4px; height: 2px; background: #ffd026; border-radius: 2px; }
.logo b { color: #4f8cff; }
.logo.grande { font-size: 30px; gap: 12px; } .logo.grande i { width: 46px; height: 46px; border-radius: 13px; font-size: 26px; }
.logo.grande i::after { left: 11px; right: 11px; bottom: 7px; height: 3px; }

/* topo */
header.topo { position: relative; z-index: 20; background: linear-gradient(160deg, var(--topo1), var(--topo2)); color: #fff;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  box-shadow: 0 8px 24px rgba(7, 19, 46, .25); }
.linha-topo { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.titulo-pg { font-weight: 650; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.btn-ic { width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s, background .15s; }
.btn-ic:active { transform: scale(.88); background: rgba(255, 255, 255, .22); }
.btn-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #ffd026; color: #10224d; font-weight: 700; display: grid; place-items: center; transition: transform .15s; }
.avatar:active { transform: scale(.88); }
.escopos { display: flex; gap: 6px; margin-top: 10px; }
.escopos button { border: 1px solid rgba(255, 255, 255, .25); background: none; color: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; transition: all .2s; }
.escopos button.on { background: #fff; color: #10224d; border-color: #fff; font-weight: 650; }
.modos { display: flex; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 3px; gap: 3px; margin-top: 10px; position: relative; }
.modos button { flex: 1; border: 0; background: none; color: #fff; padding: 7px 4px; border-radius: 9px; font-size: 13px; opacity: .85; position: relative; z-index: 1; transition: color .2s, opacity .2s; }
.modos button.on { color: #10224d; font-weight: 650; opacity: 1; }
.modos .pilula { position: absolute; top: 3px; bottom: 3px; border-radius: 9px; background: #fff; transition: left .25s cubic-bezier(.3, .7, .2, 1), width .25s; }
.nav-per { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.nav-per b { flex: 1; text-align: center; font-size: 16px; font-weight: 650; }
.nav-per > button { width: 42px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); background: none; color: #fff; font-size: 20px; line-height: 1; transition: transform .15s; }
.nav-per > button:active:not(:disabled) { transform: scale(.88); }
.nav-per > button:disabled { opacity: .25; cursor: default; }
.dias { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: none; scroll-behavior: smooth; }
.dias::-webkit-scrollbar { display: none; }
.dias button { flex: none; width: 42px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .18); background: none; color: #fff; padding: 4px 0; line-height: 1.15; transition: transform .15s; }
.dias button small { display: block; font-size: 10px; opacity: .7; }
.dias button.on { background: #ffd026; color: #10224d; border-color: #ffd026; font-weight: 700; }
.dias button:active { transform: scale(.9); }

/* conteúdo */
main { padding: 14px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
.trilha { font-size: 12px; color: var(--sub); margin: -4px 2px 0; }
.trilha a { color: var(--azul); text-decoration: none; }
.bloco { background: var(--card); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); }
.bloco h2 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.bloco h2 .ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul); flex: none; }
.bloco h2 .ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.como-ler { color: var(--sub); font-size: 13px; margin: 6px 0 12px; padding-left: 20px; position: relative; text-wrap: pretty; }
.como-ler::before { content: "💡"; font-size: 12px; position: absolute; left: 0; top: 1px; }

/* números do topo */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border-radius: var(--raio); padding: 14px; box-shadow: var(--sombra); min-width: 0; }
.kpi small { color: var(--sub); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.kpi small i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kpi .v { font-size: 21px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.grande { grid-column: 1 / -1; background: linear-gradient(135deg, var(--card), var(--card2)); }
.kpi.grande .v { font-size: 32px; }
.kpi .rodape-kpi { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--sub); }
.pill { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.bom { background: color-mix(in srgb, var(--ent) 15%, transparent); color: var(--ent); }
.pill.ruim { background: color-mix(in srgb, var(--sai) 15%, transparent); color: var(--sai); }
.pill.neutro { background: var(--azul-claro); color: var(--azul); }
.barra-sobra { height: 8px; border-radius: 6px; background: color-mix(in srgb, var(--sai) 22%, transparent); overflow: hidden; margin-top: 10px; }
.barra-sobra i { display: block; height: 100%; background: var(--ent); border-radius: 6px; transition: width .8s cubic-bezier(.3, .7, .2, 1); }

/* o que mudou */
.insights { display: flex; flex-direction: column; gap: 8px; }
.ins { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 11px 12px; border-radius: 13px; background: var(--azul-claro); border: 0; text-align: left; width: 100%; transition: transform .15s; }
.ins:active:not(:disabled) { transform: scale(.98); }
.ins:disabled { cursor: default; }
.ins.alerta { background: var(--aviso-bg); }
.ins.bom { background: var(--ok-bg); }
.ins .ic { font-size: 17px; line-height: 1.25; }
.ins .seta { margin-left: auto; color: var(--sub); }

/* gráficos */
.graf { position: relative; width: 100%; }
.graf svg { display: block; width: 100%; height: auto; overflow: visible; }
.graf text { fill: var(--sub); font-size: 11px; font-family: var(--f); }
.graf .grade { stroke: var(--linha); stroke-width: 1; }
.graf .alvo { cursor: pointer; }
.graf .alvo:hover rect, .graf .alvo:focus rect { opacity: .85; }
.dica-graf { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12px; padding: 7px 9px; border-radius: 9px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; z-index: 3; line-height: 1.35; box-shadow: var(--sombra); }
.dica-graf.on { opacity: 1; }
.legenda-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--sub); margin-top: 8px; }
.legenda-mini span { display: inline-flex; align-items: center; gap: 6px; }
.legenda-mini i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rosca-wrap { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rosca { max-width: 230px; margin: 0 auto; width: 100%; }
.rosca path { cursor: pointer; transition: transform .2s; transform-origin: 100px 100px; }
.rosca path:hover, .rosca path:focus { transform: scale(1.04); }
.rosca .centro-v { fill: var(--fg); font-size: 20px; font-weight: 700; }
.rosca .centro-r { fill: var(--sub); font-size: 11px; }
.legenda { display: flex; flex-direction: column; gap: 2px; }
.leg { display: grid; grid-template-columns: 12px 1fr auto auto 14px; gap: 10px; align-items: center; padding: 9px 6px; border-radius: 11px; border: 0; background: none; text-align: left; width: 100%; transition: background .15s, transform .15s; }
.leg:hover { background: var(--card2); }
.leg:active { transform: scale(.98); }
.leg .bolinha { width: 12px; height: 12px; border-radius: 4px; }
.leg .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.leg .pc { color: var(--sub); font-size: 12px; }
.leg .vl { font-weight: 650; font-size: 14px; text-align: right; }
.leg .seta { color: var(--sub); font-size: 16px; }
.leg.sem-link { cursor: default; }
.bloco { container-type: inline-size; }
@container (min-width: 470px) { .rosca-wrap { grid-template-columns: 210px 1fr; align-items: center; } }

/* pessoas */
.pessoas { display: flex; flex-direction: column; gap: 8px; }
.pessoa { display: grid; grid-template-columns: 40px 1fr auto; gap: 4px 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--linha); border-radius: 14px; background: none; text-align: left; width: 100%; transition: border-color .15s, transform .15s; }
.pessoa:hover { border-color: var(--azul); }
.pessoa:active { transform: scale(.98); }
.pessoa .ini { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; grid-row: span 2; }
.pessoa .nm { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa .ult { color: var(--sub); font-size: 12px; }
.pessoa .ult.atr { color: var(--aviso); font-weight: 650; }
.pessoa .vals { text-align: right; font-size: 13px; grid-row: span 2; line-height: 1.35; }
.pessoa .barras2 { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.b2 { height: 6px; border-radius: 4px; background: var(--linha); overflow: hidden; }
.b2 i { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.3, .7, .2, 1); }

/* metas e cofrinhos */
.metas { display: flex; flex-direction: column; gap: 12px; }
.meta .lin { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.meta .lin span:last-child { color: var(--sub); white-space: nowrap; }
.meta .trilho { height: 10px; border-radius: 6px; background: var(--linha); overflow: hidden; margin-top: 6px; }
.meta .trilho i { display: block; height: 100%; border-radius: 6px; transition: width .9s cubic-bezier(.3, .7, .2, 1); }
.meta small { color: var(--sub); font-size: 12px; }

/* lista */
.seg { display: flex; background: var(--card2); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 8px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 9px; font-size: 13px; color: var(--sub); transition: all .2s; }
.seg button.on { background: var(--card); color: var(--fg); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.busca { width: 100%; padding: 10px 12px 10px 36px; border-radius: 12px; border: 1px solid var(--linha); background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96b3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center / 16px; margin-bottom: 8px; font-size: 15px; }
.lista { display: flex; flex-direction: column; }
.lan { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--linha); }
.lan:first-child { border-top: 0; }
.lan .dia { font-size: 11px; color: var(--sub); text-align: center; line-height: 1.1; }
.lan .dia b { display: block; font-size: 17px; color: var(--fg); }
.lan .ds { min-width: 0; }
.lan .ds div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lan .ds small { color: var(--sub); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lan .vl { font-weight: 650; white-space: nowrap; }
.mais { border: 0; background: none; color: var(--azul); font-weight: 650; padding: 12px; font-size: 14px; width: 100%; }
.vazio { color: var(--sub); font-size: 14px; text-align: center; padding: 18px 8px; }
.aviso-escopo { font-size: 12px; color: var(--sub); background: var(--card2); border-radius: 10px; padding: 8px 10px; }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: calc(28px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) 28px max(22px, env(safe-area-inset-left, 0px)); max-width: 440px; margin: 0 auto; }
.login-fundo { background: radial-gradient(1200px 500px at 50% -200px, color-mix(in srgb, var(--azul) 28%, transparent), transparent 70%), var(--bg); min-height: 100vh; }
.login h1 { font-size: 26px; margin: 4px 0 0; letter-spacing: -.02em; line-height: 1.2; }
.login p { color: var(--sub); margin: 0; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 13px; font-weight: 650; }
.campo .caixa-in { position: relative; }
.campo input { width: 100%; font-size: 17px; padding: 14px 14px; border-radius: 14px; border: 1.5px solid var(--linha); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.campo input:focus { outline: 0; border-color: var(--azul); box-shadow: 0 0 0 4px color-mix(in srgb, var(--azul) 18%, transparent); }
.campo .olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--sub); padding: 8px; font-size: 13px; }
.campo small { color: var(--sub); font-size: 12px; }
.btn { background: var(--azul); color: #fff; border: 0; border-radius: 14px; padding: 15px; font-size: 16px; font-weight: 650; width: 100%; transition: transform .12s, box-shadow .2s, opacity .2s; box-shadow: 0 8px 22px color-mix(in srgb, var(--azul) 35%, transparent); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; }
.btn.zap { background: #1fa855; box-shadow: 0 8px 22px rgba(31, 168, 85, .35); }
.btn.claro { background: var(--card); color: var(--fg); box-shadow: none; border: 1.5px solid var(--linha); }
.link { background: none; border: 0; color: var(--azul); font-weight: 600; padding: 6px; font-size: 14px; }
.links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.erro { background: color-mix(in srgb, var(--sai) 12%, transparent); color: var(--sai); border-radius: 12px; padding: 10px 12px; font-size: 14px; animation: treme .35s; }
@keyframes treme { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.codigo { font-size: 38px; font-weight: 800; letter-spacing: .14em; text-align: center; padding: 14px; border-radius: 16px; background: var(--card); box-shadow: var(--sombra); font-variant-numeric: tabular-nums; }
.codigo small { display: block; font-size: 12px; letter-spacing: 0; font-weight: 600; color: var(--sub); }
.passos { margin: 0; padding-left: 20px; color: var(--sub); display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.esperando { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 14px; justify-content: center; }
.esperando .girando { width: 18px; height: 18px; border-width: 2px; border-color: var(--linha); border-top-color: var(--azul); }
.rodape { color: var(--sub); font-size: 12px; text-align: center; padding: 14px 16px 4px; }
.sucesso { text-align: center; font-size: 56px; animation: pula .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pula { from { transform: scale(.3); opacity: 0; } }

/* conta */
.ficha { display: flex; flex-direction: column; }
.ficha .item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); font-size: 14px; }
.ficha .item:first-child { border-top: 0; }
.ficha .item span:first-child { color: var(--sub); }
.aparelho { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); font-size: 14px; }
.aparelho:first-child { border-top: 0; }
.aparelho small { color: var(--sub); display: block; font-size: 12px; }

/* esqueleto e entrada animada */
.esq { border-radius: var(--raio); background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: brilho 1.2s infinite; }
@keyframes brilho { to { background-position: -200% 0; } }
.surge > * { animation: sobe .45s cubic-bezier(.2, .8, .2, 1) both; }
.surge > *:nth-child(2) { animation-delay: .04s; } .surge > *:nth-child(3) { animation-delay: .08s; } .surge > *:nth-child(4) { animation-delay: .12s; }
.surge > *:nth-child(5) { animation-delay: .16s; } .surge > *:nth-child(6) { animation-delay: .2s; } .surge > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } }
.vai-esq { animation: entraEsq .3s cubic-bezier(.2, .8, .2, 1); } .vai-dir { animation: entraDir .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes entraEsq { from { opacity: .3; transform: translateX(24px); } }
@keyframes entraDir { from { opacity: .3; transform: translateX(-24px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* login com PIN */
.passo { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--card); box-shadow: var(--sombra); }
.passo small { color: var(--sub); font-size: 12px; }
.rot-passo { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.n-passo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 12px; font-weight: 700; }
.campo.passo label { display: flex; align-items: center; gap: 8px; }
.campo input.pin { font-size: 28px; letter-spacing: .3em; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
.pc-zap { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--sub); }
.pc-zap img { background: #fff; border-radius: 10px; padding: 6px; flex: none; }
.pc-zap.sem-qr img { display: none; }
.ok-mini { color: var(--ent, #1f8a4c); font-weight: 650; }

/* ================= v3: calendário, período, demonstração, layout largo, animações ================= */
.faixa-demo { margin: -10px calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 10px calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 7px 16px; background: #ffd026; color: #10224d; font-size: 12.5px; text-align: center; line-height: 1.3; }
.empresa-nome { font-size: 13px; opacity: .8; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.controles { display: block; }
.nav-per { position: relative; }
.nav-per .per-nome { flex: 1; width: auto; height: 38px; min-width: 0; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15.5px; font-weight: 650; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); transition: background .2s, transform .15s; }
.nav-per .per-nome:hover { background: rgba(255, 255, 255, .22); }
.per-nome svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.per-nome .nm-per { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: troca .35s cubic-bezier(.2, .8, .2, 1); }
.per-nome em { font-style: normal; font-size: 12px; opacity: .8; transition: transform .25s; }
.per-nome[aria-expanded="true"] em { transform: rotate(180deg); }
@keyframes troca { from { opacity: 0; transform: translateY(6px); } }
.vivo { width: 8px; height: 8px; border-radius: 50%; background: #35d49a; flex: none; box-shadow: 0 0 0 0 rgba(53, 212, 154, .7); animation: vivo 1.8s infinite; }
@keyframes vivo { 70% { box-shadow: 0 0 0 8px rgba(53, 212, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(53, 212, 154, 0); } }
.modos button { font-size: 12.5px; padding: 7px 2px; }

#calBox { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; pointer-events: none; }
#calBox.on { pointer-events: auto; }
.cal-fundo { position: fixed; inset: 0; background: rgba(7, 19, 46, .45); animation: fundo .2s both; }
@keyframes fundo { from { opacity: 0; } }
.cal { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); color: var(--fg); border-radius: 22px 22px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 40px rgba(7, 19, 46, .35); max-height: 88vh; overflow: auto; }
.cal.entra { animation: subir .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
.cal.vai-p .cal-grade, .cal.vai-p .cal-meses { animation: entraEsq .3s both; } .cal.vai-a .cal-grade, .cal.vai-a .cal-meses { animation: entraDir .3s both; }
.cal-topo { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--sub); margin-bottom: 8px; gap: 10px; }
.cal-x { border: 0; background: var(--card2); width: 30px; height: 30px; border-radius: 50%; color: var(--sub); flex: none; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 8px; }
.cal-nav b { font-size: 17px; } .cal-nav b span { font-weight: 500; color: var(--sub); }
.cal-nav button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--linha); background: none; font-size: 20px; transition: background .15s, transform .15s; }
.cal-nav button:hover:not(:disabled) { background: var(--azul-claro); } .cal-nav button:active:not(:disabled) { transform: scale(.88); } .cal-nav button:disabled { opacity: .25; cursor: default; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11.5px; color: var(--sub); margin-bottom: 4px; }
.cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 3px; }
.cal-grade .vz { height: 42px; }
.cd { height: 42px; border: 0; background: none; border-radius: 12px; font-size: 15px; position: relative; animation: pop .3s both; animation-delay: calc(var(--i) * 12ms); transition: background .15s, transform .12s; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.cd:hover:not(:disabled):not(.sel) { background: var(--azul-claro); } .cd:active:not(:disabled) { transform: scale(.88); }
.cd:disabled { opacity: .28; cursor: default; }
.cd.tem::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--azul); opacity: .7; }
.cd.hoje { font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--azul); }
.cd.na-faixa { background: var(--azul-claro); border-radius: 0; }
.cd.na-faixa.ini { border-radius: 12px 0 0 12px; } .cd.na-faixa.fim { border-radius: 0 12px 12px 0; } .cd.na-faixa.ini.fim { border-radius: 12px; }
.cd.sel { background: var(--azul); color: #fff; font-weight: 700; } .cd.sel.tem::after { background: #fff; }
.cd.sel.ini { border-radius: 12px 0 0 12px; } .cd.sel.fim { border-radius: 0 12px 12px 0; } .cd.sel.ini.fim { border-radius: 12px; }
.por-semana .cd:hover:not(:disabled) { background: var(--azul-claro); }
.cal-meses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.cm { height: 52px; border: 1px solid var(--linha); background: none; border-radius: 14px; font-size: 15px; font-weight: 600; animation: pop .35s both; animation-delay: calc(var(--i) * 25ms); transition: background .15s, transform .12s, border-color .15s; text-transform: capitalize; }
.cm:hover:not(:disabled) { border-color: var(--azul); background: var(--azul-claro); } .cm:active:not(:disabled) { transform: scale(.94); } .cm:disabled { opacity: .28; cursor: default; }
.cm.hoje { box-shadow: inset 0 0 0 1.5px var(--azul); } .cm.sel { background: var(--azul); color: #fff; border-color: var(--azul); }
.cal-atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.cal-atalhos button { border: 1px solid var(--linha); background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; transition: all .15s; }
.cal-atalhos button:hover, .cal-atalhos button.on { background: var(--azul); border-color: var(--azul); color: #fff; }
.cal-rodape { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linha); font-size: 13px; }
.cal-res { flex: 1; min-width: 0; } .cal-dica { flex-basis: 100%; color: var(--sub); font-size: 12px; order: 3; } .cal-dica:empty { display: none; }
.btn-ap { border: 0; background: var(--azul); color: #fff; border-radius: 12px; padding: 10px 22px; font-weight: 650; transition: transform .15s, opacity .2s; } .btn-ap:disabled { opacity: .35; cursor: default; } .btn-ap:active:not(:disabled) { transform: scale(.94); }
.cal .link { border: 0; background: none; color: var(--azul); font-size: 13px; padding: 4px; }

/* segmentos e setores */
.segmentos { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.seg-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 12px; align-items: center; border: 1px solid var(--linha); border-radius: 16px; background: none; padding: 12px; text-align: left; width: 100%; transition: transform .2s, border-color .2s, box-shadow .2s; }
.seg-card:hover { border-color: var(--azul); transform: translateY(-2px); box-shadow: var(--sombra); } .seg-card:active { transform: scale(.98); }
.seg-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--azul-claro); }
.seg-nm b { display: block; } .seg-nm small, .seg-vl small { color: var(--sub); font-size: 12px; display: block; }
.seg-vl { text-align: right; grid-row: span 2; } .seg-vl b { font-size: 16px; }
.seg-card .barras2 { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 3px; }
.pessoa .nm small.grp { display: block; font-weight: 500; color: var(--sub); font-size: 11.5px; }

/* animações: barras que crescem, cartões que levantam */
@keyframes cresce { from { transform: scaleX(0); } }
.b2 i, .trilho i, .barra-sobra i { transform-origin: left; animation: cresce 1s cubic-bezier(.2, .8, .2, 1) .25s both; }
.surge > *:nth-child(n+9) { animation-delay: .3s; }
@media (hover: hover) { .bloco, .kpi { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; } .bloco:hover, .kpi:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(7, 19, 46, .14); } .pessoa:hover { transform: translateX(3px); } }
.kpi.grande .v { animation: brilhaN 2.4s ease-out .4s 1 both; } @keyframes brilhaN { from { text-shadow: 0 0 18px currentColor; } to { text-shadow: 0 0 0 transparent; } }

/* desktop: usa a tela inteira, em colunas */
@media (min-width: 700px) {
  .cal { position: absolute; left: 50%; right: auto; bottom: auto; top: 8px; width: 372px; margin-left: -186px; border-radius: 20px; padding: 14px 16px 16px; box-shadow: 0 24px 60px rgba(7, 19, 46, .35); border: 1px solid var(--linha); }
  .cal.entra { animation: desce .25s cubic-bezier(.2, .8, .2, 1) both; } @keyframes desce { from { transform: translateY(-10px) scale(.97); opacity: 0; } }
  .cal-fundo { background: transparent; }
}
@media (min-width: 900px) {
  .app { max-width: none; }
  header.topo { padding-left: max(32px, calc((100vw - 1480px) / 2 + 32px)); padding-right: max(32px, calc((100vw - 1480px) / 2 + 32px)); }
  .faixa-demo { margin-left: calc(-1 * max(32px, calc((100vw - 1480px) / 2 + 32px))); margin-right: calc(-1 * max(32px, calc((100vw - 1480px) / 2 + 32px))); font-size: 13px; }
  .controles { display: flex; align-items: center; gap: 18px; margin-top: 10px; } .controles .modos { margin-top: 0; width: 440px; flex: none; } .controles .nav-per { margin-top: 0; width: 460px; flex: none; }
  .dias { margin-top: 12px; } .dias button { width: 48px; }
  main { gap: 18px; max-width: 1480px; margin: 0 auto; padding: 22px 32px 0; }
  .masonry { display: block; column-count: 2; column-gap: 18px; }
  .masonry > .bloco { break-inside: avoid; margin-bottom: 18px; width: 100%; }
  .kpis { grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; } .kpi.grande { grid-column: auto; } .kpi { padding: 20px; } .kpi .v { font-size: 26px; } .kpi.grande .v { font-size: 38px; }
  .pessoas { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
  .lista { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; } .lan:nth-child(2) { border-top: 0; }
  .bloco { padding: 20px; } .bloco h2 { font-size: 17px; }
}
@media (min-width: 1280px) {
  .masonry { column-count: 3; }
  .pessoas { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } .lista { grid-template-columns: 1fr 1fr 1fr; } .lan:nth-child(3) { border-top: 0; }
}

/* v3.1: exportar, atalhos Hoje/Este mês, funcionários */
.acoes-topo { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.exp-wrap { position: relative; }
.btn-exp { height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; transition: background .2s, transform .15s; }
.btn-exp:hover { background: rgba(255, 255, 255, .22); } .btn-exp:active { transform: scale(.93); }
.btn-exp svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 460px) { .btn-exp span { display: none; } .btn-exp { width: 38px; padding: 0; justify-content: center; } }
.acoes-topo .avatar { margin-left: 0; }
#expBox { position: absolute; right: 0; top: 100%; width: 0; z-index: 70; pointer-events: none; } #expBox.on { pointer-events: auto; }
.cal.exp { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
.exp-res { margin: 0 0 10px; font-size: 14px; line-height: 1.4; } .exp-res b { font-size: 16px; }
.exp-ops { display: grid; gap: 8px; }
.exp-op { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--linha); background: none; border-radius: 14px; padding: 10px 12px; transition: border-color .15s, background .15s, transform .12s; }
.exp-op:hover:not(:disabled) { border-color: var(--azul); background: var(--azul-claro); } .exp-op:active { transform: scale(.98); } .exp-op:disabled { opacity: .6; }
.exp-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; font-size: 20px; }
.exp-op b { display: block; } .exp-op small { color: var(--sub); font-size: 12px; display: block; line-height: 1.3; } .exp-ok { color: var(--ent); font-size: 12px; font-weight: 650; }
.exp-aviso { margin: 10px 2px 0; color: var(--sub); font-size: 12px; line-height: 1.4; }
.atalhos-topo { display: flex; gap: 6px; margin-top: 8px; } .atalhos-topo button { border: 1px solid rgba(255, 255, 255, .25); background: none; color: #fff; border-radius: 999px; padding: 4px 13px; font-size: 12.5px; transition: all .2s; } .atalhos-topo button.on { background: #ffd026; border-color: #ffd026; color: #10224d; font-weight: 650; } .atalhos-topo button:not(.on):hover { background: rgba(255, 255, 255, .14); }
@media (min-width: 900px) { .controles { flex-wrap: wrap; } .atalhos-topo { margin-top: 0; } }
.faixa-demo a { color: #10224d; font-weight: 700; text-decoration: underline; margin-left: 4px; }
.funcs { display: grid; gap: 6px; margin-top: 10px; }
.func { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: center; border: 0; background: none; text-align: left; padding: 7px 6px; border-radius: 12px; transition: background .15s; width: 100%; }
.func:hover { background: var(--card2); } .func .ini { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }
.func .nm small, .func .vals small { display: block; color: var(--sub); font-size: 11.5px; font-weight: 400; } .func .nm { min-width: 0; font-weight: 600; } .func .vals { text-align: right; font-weight: 650; grid-row: span 2; }
.func .b2 { grid-column: 2 / 3; }
@media (min-width: 700px) { .cal.exp { left: auto; right: 0; margin-left: 0; width: 400px; top: 8px; } }
.func .vals { white-space: nowrap; }
.logo { white-space: nowrap; flex: none; }
@media (max-width: 560px) { .empresa-nome { display: none; } }

.masonry { display: flex; flex-direction: column; gap: 14px; }
.masonry > * { animation: sobe .45s cubic-bezier(.2, .8, .2, 1) both; } .masonry > *:nth-child(2) { animation-delay: .05s; } .masonry > *:nth-child(3) { animation-delay: .1s; } .masonry > *:nth-child(4) { animation-delay: .15s; } .masonry > *:nth-child(n+5) { animation-delay: .2s; }
@media (min-width: 900px) { .masonry { display: block; } }

/* ================= organizar setores ================= */
.btn-org { border: 1px solid var(--linha); background: var(--card); color: var(--fg); border-radius: 12px; padding: 9px 14px; font-size: 14px; font-weight: 600; transition: transform .15s, background .15s, border-color .15s; }
.btn-org:hover { border-color: var(--azul); background: var(--azul-claro); } .btn-org:active { transform: scale(.95); }
.btn-org.cheio { background: var(--azul); color: #fff; border-color: var(--azul); } .btn-org.cheio:hover { filter: brightness(1.08); }
.bloco > .btn-org { float: right; margin: -2px 0 8px 10px; font-size: 13px; padding: 7px 12px; }
.cta-setores { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; background: linear-gradient(135deg, var(--card), var(--azul-claro)); }
.cta-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--card); display: grid; place-items: center; font-size: 26px; box-shadow: var(--sombra); animation: flutua 3s ease-in-out infinite; } @keyframes flutua { 50% { transform: translateY(-4px); } }
.org-salvo { margin-left: auto; font-size: 12.5px; color: #cfd8ee; min-height: 1em; } .org-salvo.ok { color: #35d49a; font-weight: 650; } .org-salvo.erro { color: #ffb3b3; }
.org-intro { display: grid; gap: 12px; } .org-intro h2 { margin-bottom: 6px; }
.org-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .org-acoes input { flex: 1; min-width: 180px; border: 1px solid var(--linha); background: var(--card2); border-radius: 12px; padding: 9px 12px; }
.org { display: grid; gap: 14px; align-items: start; }
.org-setores { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.org-set { background: var(--card); border-radius: var(--raio); padding: 12px; box-shadow: var(--sombra); border-top: 4px solid var(--c, var(--azul)); transition: box-shadow .2s, transform .2s, outline-color .2s; outline: 2px dashed transparent; outline-offset: 2px; }
.org-set.sobre { outline-color: var(--azul); box-shadow: 0 12px 30px rgba(79, 140, 255, .3); transform: scale(1.015); background: var(--azul-claro); }
.org-em-arrasto .org-set, .em-arrasto .org-set { outline-color: color-mix(in srgb, var(--azul) 35%, transparent); }
.org-set.recebeu { animation: recebe .6s; } @keyframes recebe { 40% { transform: scale(1.025); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ent) 40%, transparent); } }
.org-set > header { display: flex; gap: 6px; align-items: center; } .org-set h3 { margin: 0; font-size: 15px; } .org-set h3 em { font-style: normal; background: var(--card2); border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--sub); margin-left: 6px; }
.org-nome { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 6px; margin-left: -6px; } .org-nome:hover, .org-nome:focus { border-color: var(--linha); background: var(--card2); }
.org-seg { width: 100%; font-size: 12.5px; color: var(--sub); border: 0; border-bottom: 1px dashed var(--linha); background: none; padding: 3px 0; margin: 2px 0 8px; } .org-seg:focus { outline: none; border-color: var(--azul); }
.org-x { border: 0; background: none; color: var(--sub); width: 28px; height: 28px; border-radius: 8px; font-size: 13px; transition: background .15s, color .15s; } .org-x:hover { background: var(--aviso-bg); color: var(--sai); } .org-x.conf { width: auto; padding: 0 8px; background: var(--sai); color: #fff; font-weight: 650; }
.org-cards { display: grid; gap: 6px; min-height: 52px; }
.org-card { display: grid; grid-template-columns: 34px 1fr 32px; gap: 8px; align-items: center; padding: 7px 8px; border: 1px solid var(--linha); border-radius: 12px; background: var(--card); cursor: grab; animation: pop .3s both; transition: box-shadow .15s, transform .15s, opacity .15s; touch-action: manipulation; }
.org-card:hover { box-shadow: var(--sombra); transform: translateY(-1px); } .org-card:active { cursor: grabbing; }
.org-card.arrastando { opacity: .35; transform: scale(.96); } .org-card.caiu { animation: caiu .55s cubic-bezier(.2, .8, .2, 1); } @keyframes caiu { from { transform: translateY(-14px) scale(1.06); box-shadow: 0 14px 28px rgba(7, 19, 46, .3); } }
.org-card.inativo { opacity: .6; } .org-card.oculto { display: none; }
.org-card .ini { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }
.org-card .nm { min-width: 0; } .org-card .nm b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .org-card .nm small { display: block; font-size: 11.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-mv { width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--card2); color: var(--sub); font-size: 15px; } .org-mv:hover { background: var(--azul-claro); color: var(--azul); }
.org-vazio { margin: 0; color: var(--sub); font-size: 12.5px; text-align: center; padding: 14px 6px; border: 1.5px dashed var(--linha); border-radius: 12px; }
.org-set footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--sub); }
.org-bandeja { border-top-color: #94a3b8; background: var(--card2); } .org-bandeja.vazia { opacity: .85; }
.org-novo { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-content: center; min-height: 110px; border: 2px dashed var(--linha); background: none; box-shadow: none; border-top: 2px dashed var(--linha); } .org-novo input { border: 1px solid var(--linha); background: var(--card); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.org-aviso { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px); background: #10224d; color: #fff; padding: 10px 16px; border-radius: 14px; box-shadow: 0 12px 30px rgba(7, 19, 46, .4); font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s cubic-bezier(.2, .8, .2, 1); z-index: 80; max-width: calc(100vw - 32px); }
.org-aviso.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; } .org-aviso button { margin-left: 10px; border: 0; background: #ffd026; color: #10224d; border-radius: 8px; padding: 4px 10px; font-weight: 700; }
.org-menu { position: fixed; } .org-lista { display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.org-lista button { text-align: left; border: 1px solid var(--linha); background: none; border-radius: 12px; padding: 12px 14px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; transition: background .15s, border-color .15s; } .org-lista button small { color: var(--sub); } .org-lista button:hover, .org-lista button.on { border-color: var(--azul); background: var(--azul-claro); } .org-lista .novo { color: var(--azul); font-weight: 650; }
#orgMenu .cal { left: 0; right: 0; bottom: 0; top: auto; margin: 0; width: auto; position: fixed; }
@media (min-width: 700px) { #orgMenu .cal { left: 50%; right: auto; top: 20%; bottom: auto; width: 400px; margin-left: -200px; } #orgMenu .cal-fundo { background: rgba(7, 19, 46, .35); } }
@media (min-width: 900px) { .org { grid-template-columns: 300px 1fr; } .org-bandeja { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; } .org-cards .org-card { cursor: grab; } }

/* setores recolhidos: clique na seta para abrir */
.org-seta { flex: none; width: 30px; height: 30px; border: 0; border-radius: 10px; background: var(--card2); color: var(--sub); font-size: 15px; cursor: pointer; transition: transform .25s, background .2s; display: grid; place-items: center; }
.org-seta:hover { background: var(--azul-claro); }
.org-set.aberto .org-seta { transform: rotate(90deg); }
.org-set.fechado .org-cards, .org-set.fechado .org-vazio { display: none; }
.org.busca .org-set.fechado .org-cards { display: grid; }
.org-set.aberto .org-minis { display: none; }
.org-minis { display: flex; align-items: center; margin: 8px 0 0 2px; }
.org-minis .ini { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 10px; margin-left: -6px; border: 2px solid var(--card); }
.org-minis .ini:first-child { margin-left: 0; } .org-minis em { font-style: normal; font-size: 12px; color: var(--sub); margin-left: 6px; }
.org.busca .org-minis { display: none; }
.org-set.fechado > header { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .org-set.aberto .org-cards { animation: abre .25s ease-out; } @keyframes abre { from { opacity: 0; transform: translateY(-6px); } } }

/* pílulas de segmento (resultado por setor) */
.pilulas { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.pil-seg { border: 1px solid var(--linha); border-radius: 22px; background: var(--card); overflow: hidden; transition: box-shadow .25s, border-color .25s; }
.pil-seg.aberta { border-color: var(--azul); box-shadow: var(--sombra); }
.pil-cab { display: grid; grid-template-columns: 52px 1fr auto 24px; gap: 4px 14px; align-items: center; width: 100%; padding: 16px 18px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.pil-cab:hover { background: var(--card2); }
.pil-cab .seg-ic { width: 52px; height: 52px; font-size: 26px; border-radius: 16px; }
.pil-cab .seg-nm b { font-size: 17px; }
.pil-cab .barras2 { grid-column: 2 / 4; display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.pil-seta { grid-row: span 2; color: var(--sub); font-size: 16px; transition: transform .25s; text-align: center; } .pil-seg.aberta .pil-seta { transform: rotate(90deg); }
.pil-corpo { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; } .pil-seg.aberta .pil-corpo { grid-template-rows: 1fr; }
.pil-int { overflow: hidden; min-height: 0; padding: 0 14px; } .pil-seg.aberta .pil-int { padding: 4px 14px 16px; }
.pil-int .mais { margin-top: 12px; }
.pessoas.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
@container (max-width: 560px) { .pil-cab { grid-template-columns: 44px 1fr 22px; gap: 4px 12px; padding: 14px; } .pil-cab .seg-ic { width: 44px; height: 44px; font-size: 22px; grid-column: 1; grid-row: 1 / span 2; } .pil-cab .seg-nm { grid-column: 2; grid-row: 1; } .pil-seta { grid-column: 3; grid-row: 1; } .pil-cab .seg-vl { grid-column: 2 / -1; grid-row: 2; text-align: left; } .pil-cab .barras2 { grid-column: 1 / -1; grid-row: 3; } .pessoas.grade { grid-template-columns: 1fr; } }

/* colunas montadas por script: cada bloco entra na coluna mais baixa (sem buracos) */
.masonry { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 18px; align-items: start; column-count: auto; }
.masonry > .col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.masonry > * { animation: none; }
.masonry .col > * { animation: sobe .45s cubic-bezier(.2, .8, .2, 1) both; } .masonry .col > *:nth-child(2) { animation-delay: .06s; } .masonry .col > *:nth-child(3) { animation-delay: .12s; } .masonry .col > *:nth-child(n+4) { animation-delay: .18s; }
@media (max-width: 899px) { .masonry, .masonry > .col { gap: 14px; } }

.masonry[data-pre] .col > * { animation: none; }

/* ver por segmento / setor */
.visao { background: var(--card); border-radius: var(--raio); padding: 14px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 10px; }
.visao-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.visao-t > span { font-weight: 700; font-size: 15px; } .visao-t small { color: var(--sub); font-size: 13px; flex: 1 1 260px; line-height: 1.4; }
.visao-x { border: 0; background: var(--card2); color: var(--fg); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 650; cursor: pointer; } .visao-x:hover { background: var(--azul-claro); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--linha); background: var(--card); color: var(--fg); border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, transform .15s, box-shadow .2s; white-space: nowrap; }
.chip:hover { border-color: var(--azul); transform: translateY(-1px); } .chip:active { transform: scale(.97); }
.chip.on { background: var(--azul); border-color: var(--azul); color: #fff; box-shadow: 0 6px 16px rgba(79, 140, 255, .35); }
.chip .ci { font-size: 17px; line-height: 1; }
.chips.sub { padding-top: 10px; border-top: 1px dashed var(--linha); } .chip.peq { padding: 6px 12px; font-size: 13px; font-weight: 550; }
@media (max-width: 899px) { .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; } .chips::-webkit-scrollbar { display: none; } .chips.sub { padding-top: 10px; } }

/* tema claro/escuro manual */
.btn-tema { height: 38px; width: 38px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.btn-tema:hover { background: rgba(255, 255, 255, .22); }
html.troca-tema, html.troca-tema * { transition: background-color .35s, color .35s, border-color .35s !important; }

/* v10: mini-gráficos, atualizado em, projeção */
.spark { display: block; width: 100%; height: 30px; margin-top: 8px; overflow: visible; }
.sp-l { fill: none; stroke: currentColor; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.sp-a { fill: currentColor; opacity: .12; }
.spark.ent { color: var(--ent); } .spark.sai { color: var(--sai); }
.pessoa .spark { grid-column: 1 / -1; height: 22px; margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) { .spark { animation: revela .7s ease-out; } @keyframes revela { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } } }
.atual { font-size: 12px; color: var(--sub); margin: 2px 2px 0; }
.atual .link { background: none; border: 0; padding: 0; font: inherit; color: var(--azul); cursor: pointer; text-decoration: underline; }
.proj-frase { font-size: 16px; margin: 4px 0 10px; } .proj-frase b { font-size: 18px; }
.proj-dias { height: 8px; border-radius: 6px; background: var(--linha); overflow: hidden; } .proj-dias i { display: block; height: 100%; background: var(--azul); border-radius: 6px; }
.proj-leg, .proj-cmp, .proj-nota { font-size: 12px; color: var(--sub); margin: 6px 0 0; } .proj-nota a { color: var(--azul); }
.proj-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.proj-grade div { background: var(--card2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proj-grade small, .proj-grade span { font-size: 12px; color: var(--sub); } .proj-grade b { font-size: 17px; }

/* v11: setor › unidade */
.un-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.un-lin { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--card2); color: inherit; text-decoration: none; }
.un-lin:hover { outline: 2px solid var(--azul); } .un-lin.pend { background: transparent; border: 1.5px dashed var(--sai); }
.un-nm { display: flex; flex-direction: column; min-width: 0; } .un-nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .un-nm small, .un-vl small { color: var(--sub); font-size: 12px; }
.un-bs { display: flex; flex-direction: column; gap: 4px; } .un-vl { text-align: right; display: flex; flex-direction: column; }
@media (max-width: 520px) { .un-lin { grid-template-columns: 1fr auto; } .un-bs { display: none; } }
.esp-res { font-size: 14px; margin: 6px 0 10px; } .esp-res a { color: var(--azul); }
.esp-lista { display: flex; flex-direction: column; gap: 8px; }
.esp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--linha); }
.esp-t { display: flex; flex-direction: column; min-width: 0; } .esp-t small, .esp-amb { color: var(--sub); font-size: 12px; } .esp-v { font-weight: 700; align-self: start; }
.esp select, .esp-dica { grid-column: 1 / -1; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--linha); background: var(--card); color: inherit; }
.esp-dica { cursor: pointer; border-color: var(--azul); text-align: left; } .esp-amb { grid-column: 1 / -1; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: #10224d; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.org-un { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px 12px; }
.org-un-t { font-size: 12px; color: var(--sub); text-transform: uppercase; letter-spacing: .04em; }
.org-u { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--linha); background: var(--card2); color: inherit; cursor: pointer; } .org-u em { font-style: normal; color: var(--sub); font-size: 11px; } .org-u.sobre { outline: 2px solid var(--azul); }
.org-un-nova input { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--linha); background: transparent; color: inherit; width: 190px; max-width: 100%; }
.org-sug { background: var(--card2); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; } .org-sug p { margin: 2px 0 8px; font-size: 13px; color: var(--sub); }
.org-sug-l { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--linha); flex-wrap: wrap; }
.org-ed { display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 8px; } .org-ed label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.org-ed input, .org-ed textarea { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--linha); background: var(--card); color: inherit; } .org-dica { font-size: 12px; color: var(--sub); margin: 0; }
.org-ed-b { display: flex; gap: 8px; flex-wrap: wrap; } .org-lista .sub { padding-left: 28px; font-size: 13px; }

/* v12: compacto — menos rolagem, tudo alinhado */
.esp-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .esp-cab > * { min-width: 0; }
.esp-n { background: var(--aviso, #f5b800); color: #10224d; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 2px 10px; }
.esp-res { font-size: 12.5px; color: var(--sub); margin: 2px 0 8px; } .esp-res b { color: var(--fg); }
.esp-lista { display: flex; flex-direction: column; gap: 6px; }
.esp { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 8px; align-items: center; padding: 6px 8px; border-radius: 12px; border: 1px dashed var(--linha); }
.esp-t b { font-size: 13.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .esp-t small { font-size: 11.5px; } .esp-v { font-size: 13px; }
.esp select { grid-column: auto; font-size: 12px; padding: 5px 6px; border-radius: 999px; max-width: 112px; }
.esp-dica { grid-column: 1 / -1; font-size: 12px; padding: 4px 10px; border-radius: 999px; } .esp-amb { grid-column: 1 / -1; font-size: 11.5px; }
.esp-mais { display: block; text-align: center; font-size: 13px; color: var(--azul); margin-top: 8px; }
.un-lin { padding: 7px 10px; gap: 10px; border-radius: 12px; } .un-lista { gap: 5px; margin-top: 4px; } .un-nm b { font-size: 14px; } .un-vl { font-size: 14px; }
/* lançamentos mais compactos */
.lan { grid-template-columns: 30px 1fr auto; gap: 8px; padding: 6px 2px; } .lan .dia { font-size: 10px; } .lan .dia b { font-size: 14px; }
.lan .ds div { font-size: 13.5px; } .lan .ds small { font-size: 11px; } .lan .vl { font-size: 13.5px; }
/* setores/segmentos e quem anotou mais baixos */
.pil-cab { padding: 10px 14px; grid-template-columns: 40px 1fr auto 20px; gap: 2px 12px; } .pil-cab .seg-ic { width: 40px; height: 40px; font-size: 20px; border-radius: 12px; } .pil-cab .seg-nm b { font-size: 15px; } .pil-seg { border-radius: 16px; }
.pil-cab .barras2 { margin-top: 2px; }
.pessoas.grade, .pessoas { gap: 8px; } .func { padding: 5px 6px; } .bloco { padding: 14px 16px; }
.masonry .col { gap: 14px; } .masonry { gap: 14px; }

/* v13: montar o próprio painel */
.btn-montar.on { background: var(--azul); color: #fff; border-color: var(--azul); }
.ed-topo { background: var(--card); border: 1.5px dashed var(--azul); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.ed-topo p { margin: 2px 0 0; font-size: 13px; color: var(--sub); }
.ed-escondidos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .ed-escondidos span { font-size: 12px; color: var(--sub); }
.ed-chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--azul); background: var(--azul-claro); color: var(--azul); cursor: pointer; }
.ed-fim { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; background: var(--card); border: 1px solid var(--linha); border-radius: 999px; padding: 8px; box-shadow: 0 10px 30px rgba(7, 19, 46, .25); z-index: 60; }
.ed-bloco { position: relative; outline: 2px dashed var(--linha); outline-offset: 0; cursor: default; }
.ed-bloco > :not(.ed-bar) { pointer-events: none; opacity: .85; }
.ed-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px -4px 8px; padding: 6px 8px; border-radius: 12px; background: var(--azul-claro); color: var(--azul); font-size: 13px; position: relative; z-index: 2; }
.ed-alca { cursor: grab; padding: 4px 8px; border-radius: 8px; user-select: none; touch-action: none; } .ed-alca:active { cursor: grabbing; }
.ed-bts { display: flex; gap: 6px; } .ed-bts button { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--azul); background: var(--card); color: var(--azul); cursor: pointer; }
.ed-arrastando { opacity: .35; } .ed-bloco.ed-sobre { outline: 3px solid var(--azul); } .ed-bloco.ed-sobre::after { content: "Soltar aqui: toma o lugar deste"; position: absolute; inset: auto 12px 10px 12px; text-align: center; background: var(--azul); color: #fff; border-radius: 999px; padding: 6px; font-size: 13px; z-index: 3; }
@media (hover: hover) { .ed-bloco:hover { transform: none !important; } }
