/* Sino, busca global, perfil, chamado de TI, agenda e cards novos do Início (visual "Vitrine"). */
:root {
  --ev-feriado: #D64545; --ev-parada: #C98A04; --ev-visita: #1F5BD8; --ev-treinamento: #1F9D55;
  --ev-reuniao: #7A4FD6; --ev-evento: #667085; --ev-aniversario: #D6457E; --ev-reserva: #0E8A8A;
}

/* Avatares com foto */
.avatar { overflow: hidden; padding: 0; }
.avatar .foto-av, .av .foto-av { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 999px; }
.av { overflow: visible; }
.av .foto-av { position: absolute; inset: 0; }
.avatar.ba { width: 34px; height: 34px; font-size: 12px; }

/* Menu do avatar e sino: itens na largura do painel (sem rolagem lateral);
   o subtítulo corta com "…" em vez de alargar o menu. */
.fly.estreito .fa, .fly.notif .fa { width: 100%; }
.fly.estreito .fa small { display: block; }
.fly.estreito .nucleo { overflow-x: hidden; }

/* Sino */
.fly.notif { width: min(440px, calc(100% - 32px)); left: auto; right: 16px; transform: none; animation: none; }
.ntf-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 10px; border-bottom: 1px solid var(--ring); margin-bottom: 6px; }
.ntf-topo b { font-size: 15px; }
.fa.ntf { width: 100%; align-items: flex-start; }
.fa.ntf .ic-box { width: 34px; height: 34px; }
.fa.ntf small { white-space: normal; display: block; }
.fa.ntf .ntf-txt { color: var(--ink2); margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fa.ntf b { white-space: normal; }
.fa.ntf.nova { background: #F3F7FE; }
.fa.ntf.nova:hover { background: #E9F0FD; }
.ntf-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.ntf-cartao .ntf-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; flex: none; color: var(--ink2); }
.ntf-cartao { bottom: 160px; }

/* Busca global */
#busca-extra .fa .ic-box .avatar { width: 38px; height: 38px; }
#busca-extra .fa[disabled] { opacity: .5; cursor: not-allowed; }

/* Perfil */
.dlg-perfil .pf-abas { display: flex; gap: 2px; margin: 0 18px 10px; padding: 3px; border-radius: 999px; background: var(--soft2); }
.pf-abas button { flex: 1; height: 32px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink2); text-align: center; }
.pf-abas button.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--ring); }
.pf-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pf-topo > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.pf-topo small { color: var(--muted); display: block; width: 100%; }
.avatar.pf-foto { width: 72px; height: 72px; font-size: 22px; }
.pf-nome { font-size: 18px; display: block; width: 100%; }
.pf-trocar { cursor: pointer; }
.pf-dados { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 13.5px; }
.pf-dados dt { color: var(--muted); }
.pf-dados dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pf-recado { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; color: var(--ink2); }
.pf-sub { font-weight: 700; margin: 14px 0 4px; }
.pf-sub small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.pf-favs { max-height: 34vh; overflow-y: auto; columns: 2; column-gap: 16px; scrollbar-width: thin; }
.pf-favs .pi-check { break-inside: avoid; }

/* Chamado de TI */
.dlg-chamado { width: min(600px, calc(100vw - 32px)); }
.dlg-chamado .dlg-topo .ch-status { margin-right: 4px; }
.ch-contexto { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; color: var(--ink2); }
.ch-contexto svg.ic { width: 15px; height: 15px; }
.dlg-chamado select, .dlg-chamado textarea { width: 100%; border: 0; border-radius: 14px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--ring); padding: 12px 14px; font: inherit; font-size: 14.5px; color: var(--ink); outline: none; resize: vertical; }
.dlg-chamado select { height: 46px; padding: 0 12px; }
.ch-anexar { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; }
.ch-anexar label { cursor: pointer; }
.ch-anexar small { color: var(--muted); }
.ch-lista { display: grid; gap: 4px; max-height: 55vh; overflow-y: auto; }
.ch-lista .ci { text-align: left; }
.ch-status { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; flex: none; background: var(--soft2); color: var(--ink2); }
.ch-status.novo { background: #E9F0FD; color: var(--accent); }
.ch-status.and { background: #FDF3DC; color: #8A5E00; }
.ch-status.ok { background: #E6F4EC; color: #1E6B40; }
.ch-titulo { margin: 0 0 4px; font-size: 17px; }
.ch-desc { white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; line-height: 1.5; overflow-wrap: anywhere; }
.ch-conversa { display: grid; gap: 6px; max-height: 36vh; overflow-y: auto; margin: 8px 0 12px; scrollbar-width: thin; }
.ch-int { background: #fff; box-shadow: inset 0 0 0 1px var(--ring); border-radius: 12px; padding: 8px 12px; }
.ch-int small { color: var(--muted); font-size: 11.5px; }
.ch-int p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ch-int.sis { background: transparent; box-shadow: none; padding: 2px 12px; }
.ch-int.sis p { color: var(--muted); font-size: 12.5px; }

/* Início: favoritos, meu setor, próximos dias */
.pi-favs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; }
.pi-favs > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-right: 4px; }
.pi-favs svg.ic, .pi-favs .emoji { width: 14px; height: 14px; }
.pi-setor-t { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Botão de alternar Produção agora / Meu setor (no título do card) */
.pi-alterna { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft2); }
.pi-alterna button { height: 30px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink2); transition: background .3s var(--mola); }
.pi-alterna button.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--ring), 0 2px 6px -3px rgba(15,23,36,.2); }
.pi-alterna button:not(.on):hover { color: var(--ink); }
.pi-setor { height: 32px; border-radius: 999px; border: 0; background: var(--soft); box-shadow: inset 0 0 0 1px var(--ring); padding: 0 12px; font: inherit; font-weight: 700; color: var(--ink); }
.pi-setor-nome { color: var(--ink); font-size: 14px; }
.pi-baixo3 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.pi-op { display: grid; grid-template-columns: minmax(70px, 120px) minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px 2px; font-size: 13px; }
.pi-op span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.pi-op b { text-align: right; font-variant-numeric: tabular-nums; }
.pi-ult { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 6px 2px; border-top: 1px solid var(--ring); }
.pi-ult:first-of-type { border-top: 0; }
.pi-ult b { font-size: 12.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-ult small { grid-column: 1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-ult time { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pi-evs { display: grid; gap: 4px; margin-top: 12px; }

/* Itens da agenda (cores por tipo, sempre com nome e ícone junto) */
.ag-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; text-align: left; box-shadow: inset 3px 0 0 var(--cor, var(--ev-evento)); background: var(--soft); transition: background .25s var(--mola); min-width: 0; }
.ag-item:hover { background: var(--soft2); }
.ag-item > div { flex: 1; min-width: 0; }
.ag-item b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-item small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-item .ic-box { width: 32px; height: 32px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--cor, var(--ink2)); flex: none; box-shadow: 0 0 0 1px var(--ring); }
.ag-item .ic-box svg.ic { width: 16px; height: 16px; }
.t-feriado { --cor: var(--ev-feriado); } .t-parada { --cor: var(--ev-parada); } .t-visita { --cor: var(--ev-visita); } .t-treinamento { --cor: var(--ev-treinamento); }
.t-reuniao { --cor: var(--ev-reuniao); } .t-evento { --cor: var(--ev-evento); } .t-aniversario { --cor: var(--ev-aniversario); } .t-reserva { --cor: var(--ev-reserva); }

/* Aba Agenda */
.ag { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
.ag-topo { display: flex; align-items: center; gap: 14px; padding: 16px 20px 12px; border-bottom: 1px solid var(--ring); flex-wrap: wrap; }
.ag-topo h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.ag-topo .sp { flex: 1; }
.ag-nav { display: flex; align-items: center; gap: 4px; }
.ag-nav b { min-width: 170px; text-align: center; font-size: 15px; }
.ag-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.ag-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 30px repeat(6, minmax(0, 1fr)); min-height: 0; overflow: hidden; border-right: 1px solid var(--ring); }
.ag-sem { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: grid; place-items: center; border-bottom: 1px solid var(--ring); }
.ag-dia { border-right: 1px solid var(--ring); border-bottom: 1px solid var(--ring); padding: 4px 5px; min-width: 0; min-height: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: background .2s; }
.ag-dia:nth-child(7n + 7) { border-right: 0; }
.ag-dia:hover { background: var(--soft); }
.ag-dia.fora { background: #FAFBFC; }
.ag-dia.fora .ag-n { color: var(--faint); }
.ag-dia.sel { background: #F1F5FE; box-shadow: inset 0 0 0 2px var(--accent); }
.ag-dia.feriado .ag-n { color: var(--ev-feriado); }
.ag-n { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; flex: none; }
.ag-dia.hoje .ag-n { background: var(--ink); color: #fff; }
.ag-chip { display: block; width: 100%; text-align: left; font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; background: var(--soft); box-shadow: inset 3px 0 0 var(--cor, var(--ev-evento)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.ag-chip:hover { background: var(--soft2); }
.ag-chip .mono { font-size: 10.5px; color: var(--muted); }
.ag-mais { font-size: 11px; color: var(--muted); padding-left: 6px; }
.ag-lado { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: #FBFCFD; scrollbar-width: thin; }
.ag-lado-t { font-weight: 700; margin: 0 2px 4px; }
.ag-legenda { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--muted); }
.ag-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.ag-legenda i, .ag-tipo i { width: 10px; height: 10px; border-radius: 3px; background: var(--cor); display: inline-block; }
.ag-tipo { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink2); margin: 0 0 10px; }
.ag-lista { display: none; }
.ag-carregando { position: absolute; inset: 70px 0 0; display: grid; place-items: center; background: rgba(255,255,255,.6); }

@media (max-width: 900px) {
  .pi-baixo3 { grid-template-columns: minmax(0, 1fr); }
  .ag-corpo { display: block; overflow-y: auto; }
  .ag-grade, .ag-lado { display: none; }
  .ag-lista { display: grid; gap: 4px; padding: 10px 12px 20px; }
  .ag-lista-dia { font-size: 12px; font-weight: 700; color: var(--muted); margin: 10px 4px 2px; }
  .ag-topo { padding: 12px; gap: 8px; }
  .ag-nav b { min-width: 0; }
  .pf-favs { columns: 1; }
  .pf-dados { grid-template-columns: 90px 1fr; }
}
/* Ilha no celular estreito: a busca fica no botão "Sistemas" (que também busca pessoas, OFs…) */
@media (max-width: 420px) { .ilha .busca-ilha { display: none; } }
.av i { z-index: 1; }

/* Faixa de aviso no topo do hub (comunicado marcado como "faixa"), em qualquer aba */
#faixa-hub:empty { display: none; }
.faixa { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); z-index: 19; width: min(1000px, calc(100% - 48px)); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 16px; background: #EEF3FD; color: var(--ink); box-shadow: 0 0 0 1px rgba(31,91,216,.25), 0 12px 30px -18px rgba(15,23,36,.35); }
.faixa > svg.ic { color: var(--accent); flex: none; }
.faixa > div { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.faixa b { white-space: nowrap; }
.faixa span { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.faixa small { color: var(--muted); font-weight: 600; flex: none; }
.faixa.imp { background: #FDF6E3; box-shadow: 0 0 0 1px rgba(201,138,4,.35), 0 12px 30px -18px rgba(15,23,36,.35); }
.faixa.imp > svg.ic { color: #9A6A03; }
.faixa.urg { background: #FDEEEE; box-shadow: 0 0 0 1px rgba(214,69,69,.4), 0 12px 30px -18px rgba(15,23,36,.35); }
.faixa.urg > svg.ic { color: var(--bad); }
.faixa .circ { width: 32px; height: 32px; }
#portal.com-faixa .conteudo.moldura { top: 140px; }
#portal.com-faixa .inicio-in { padding-top: 150px; }
#portal.foco .faixa { display: none; }
#portal.foco.com-faixa .conteudo.moldura { top: 8px; }

/* Aba Administração */
.adm { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
.adm-topo { display: flex; align-items: center; gap: 16px; padding: 16px 20px 12px; border-bottom: 1px solid var(--ring); flex-wrap: wrap; }
.adm-topo h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.adm-abas { margin: 0; min-width: 320px; }
.adm-corpo { flex: 1; min-height: 0; position: relative; }
.adm-acessos { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.adm-lista { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--ring); background: #FBFCFD; padding-top: 12px; }
.adm-lista .fly-busca { margin: 0 14px 6px; height: 42px; }
.adm-inativos { margin: 0 16px 6px; font-size: 13px; color: var(--ink2); }
.adm-itens { flex: 1; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; }
.adm-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: #E9F0FD; color: var(--accent); flex: none; }
.adm-tag.off { background: var(--soft2); color: var(--muted); }
.adm-editor { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 18px 22px 0; scrollbar-width: thin; }
.adm-ed-topo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.adm-ed-topo b { font-size: 18px; display: block; }
.adm-ed-topo small { color: var(--muted); }
.avatar.adm-foto { width: 52px; height: 52px; font-size: 17px; }
.adm-voltar { display: none; }
.adm-aviso { display: flex; gap: 8px; align-items: flex-start; background: #EEF3FD; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 13px; color: var(--ink2); }
.adm-aviso svg.ic { color: var(--accent); flex: none; }
.adm-grupos { columns: 2; column-gap: 18px; }
.adm-grupo { break-inside: avoid; border: 0; margin: 0 0 14px; padding: 10px 12px; border-radius: 16px; background: var(--soft); }
.adm-grupo legend { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 0; float: left; width: 100%; margin-bottom: 4px; }
.adm-chave { display: flex; gap: 10px; align-items: flex-start; padding: 7px 6px; border-radius: 10px; cursor: pointer; clear: both; }
.adm-chave:hover { background: #fff; }
.adm-chave input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.adm-chave span { min-width: 0; font-size: 13.5px; line-height: 1.35; }
.adm-chave small { color: var(--muted); }
.adm-chave code { display: block; font: 11px var(--f-mono); color: var(--faint); margin-top: 1px; }
.adm-hub { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 11.5px; color: var(--accent); margin-left: 4px; }
.adm-hub svg.ic { width: 12px; height: 12px; }
.adm-hist { margin: 6px 0 10px; }
.adm-h { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--ring); font-size: 12.5px; }
.adm-h small { color: var(--muted); width: 100%; }
.adm-h .ok { color: #1E6B40; } .adm-h .bad { color: var(--bad); }
.adm-rodape { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 12px 0 16px; background: linear-gradient(transparent, #fff 30%); margin-top: auto; }
.adm-rodape .sp { flex: 1; }
.adm-pend { color: #9A6A03; font-weight: 600; }
.adm-coms { position: absolute; inset: 0; overflow-y: auto; padding: 16px 20px 24px; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; }
.adm-coms-topo { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.adm-coms-topo p { margin: 0; flex: 1; }
.adm-com { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--soft); }
.adm-com.vencido { opacity: .6; }
.adm-com-txt { flex: 1; min-width: 0; }
.adm-com-l1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-com-l1 b { font-size: 14.5px; }
.adm-com small { color: var(--muted); font-size: 12px; }
.adm-com-acoes { display: inline-flex; gap: 2px; flex: none; }
.adm-com-acoes .circ { width: 34px; height: 34px; }
.adm-nivel { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--soft2); color: var(--ink2); }
.adm-nivel.n-urgente { background: #FDE4E4; color: var(--bad); }
.adm-nivel.n-importante { background: #FDF0D3; color: #8A5E00; }

@media (max-width: 900px) {
  .faixa { top: 78px; width: calc(100% - 16px); padding: 6px 6px 6px 12px; }
  .faixa > div { flex-direction: column; gap: 0; align-items: flex-start; }
  .faixa b, .faixa span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #portal.com-faixa .conteudo.moldura { top: 150px; }
  #portal.com-faixa .inicio-in { padding-top: 160px; }
  .adm-abas { min-width: 0; width: 100%; }
  .adm-acessos { grid-template-columns: minmax(0, 1fr); }
  .adm-acessos.com-sel .adm-lista { display: none; }
  .adm-acessos:not(.com-sel) .adm-editor { display: none; }
  .adm-voltar { display: grid; }
  .adm-grupos { columns: 1; }
  .adm-editor { padding: 12px 12px 0; }
  .adm-coms-topo { flex-direction: column; align-items: stretch; }
}

/* Agenda: eventos pessoais, convites e respostas */
.ag-chip.pessoal, .ag-item.pessoal { background: #fff; outline: 1px dashed var(--cor, var(--ev-evento)); outline-offset: -1px; }
.ag-chip.convite { font-weight: 700; }
.ag-chip.convite::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); margin-right: 4px; vertical-align: 1px; }
.ag-novo { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 999px; padding: 3px 8px; }
.ag-legenda .pessoal i { background: #fff; outline: 1px dashed var(--muted); }
.ag-onde { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ag-onde label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--ring); cursor: pointer; }
.ag-onde label:has(input:checked) { background: #EEF3FD; box-shadow: inset 0 0 0 1.5px var(--accent); }
.ag-onde input { margin-top: 3px; accent-color: var(--accent); }
.ag-onde b { display: block; font-size: 13.5px; }
.ag-onde small { color: var(--muted); font-size: 12px; }
.ag-nota { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; color: var(--ink2); }
.ag-nota svg.ic { width: 15px; height: 15px; }
.ag-dica { color: var(--muted); font-weight: 400; font-size: 12px; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.ag-conv-busca { height: 42px; margin: 0; }
.ag-sug { display: grid; gap: 2px; margin-top: 4px; max-height: 220px; overflow-y: auto; }
.ag-sug .ci { text-align: left; }
.ag-convs { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; margin-top: 4px; }
.ag-conv { display: flex; align-items: center; gap: 10px; padding: 5px 4px; font-size: 13.5px; }
.ag-conv > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-conv em { font-style: normal; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.ag-conv em svg.ic { width: 13px; height: 13px; }
.ag-conv.r-participa em { color: #1E6B40; }
.ag-conv.r-nao_participa em { color: var(--bad); }
.ag-conv.r-ciente em { color: var(--accent); }
.ag-resp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #FDF7E8; border-radius: 14px; padding: 10px 12px; margin: 0 0 12px; }
.ag-resp > span { width: 100%; font-weight: 600; font-size: 13px; }
@media (max-width: 900px) { .ag-onde { grid-template-columns: 1fr; } }

/* Notificações no Windows: passos da ativação e computadores ativados */
.nw-passos { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.nw-passos li { display: flex; gap: 12px; align-items: flex-start; }
.nw-passos b { display: block; font-size: 14px; }
.nw-passos small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.nw-n { width: 26px; height: 26px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.nw-status { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--ink2); font-size: 13px; }
.nw-status svg.ic { width: 16px; height: 16px; flex: none; }
.nw-status.ok { background: #E6F4EC; color: #1E6B40; }
.nw-lista { display: grid; gap: 6px; margin-top: 4px; justify-items: start; }
.nw-disp { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; background: var(--soft); }
.nw-disp > div { flex: 1; min-width: 0; }
.nw-disp b { display: block; font-size: 13.5px; }
.nw-disp small { color: var(--muted); font-size: 12px; }
.nw-disp .ic-box { width: 32px; height: 32px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; }
.nw-on { color: #1E6B40; font-weight: 600; }

/* ── Painel Financeiro (ui-financeiro.js) ─────────────────────────────────── */
.fin { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; --fin-ent: #1F9D55; --fin-sai: #D64545; --fin-prev: #F2A7A7; }
.fin-topo { display: flex; align-items: center; gap: 14px; padding: 16px 20px 12px; border-bottom: 1px solid var(--ring); flex-wrap: wrap; }
.fin-topo h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.fin-topo small { color: var(--muted); font-size: 12px; }
.fin-topo .sp, .fin-sec-topo .sp { flex: 1; }
.fin .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft2); }
.fin .seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink2); transition: background .3s var(--mola); white-space: nowrap; }
.fin .seg button.ativo { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--ring), 0 2px 6px -3px rgba(15,23,36,.2); }
.fin .seg button:not(.ativo):hover { color: var(--ink); }
.fin-corpo { flex: 1; overflow: auto; padding: 18px 20px 100px; }
.fin-vazio { display: grid; justify-items: center; gap: 6px; padding: 60px 20px; color: var(--muted); text-align: center; }
.fin-aviso { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: #FFF6E5; color: #7A5300; margin-bottom: 14px; font-size: 13px; }
.fin-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.fin-card { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--ring); transition: transform .3s var(--mola), box-shadow .3s; }
.fin-card:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--ring), 0 8px 18px -12px rgba(15,23,36,.35); }
.fin-card small { color: var(--muted); font-size: 12px; font-weight: 600; }
.fin-card b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fin-card span { color: var(--muted); font-size: 12px; }
.fin-card.ruim b { color: var(--bad); }
.fin-card.bom b { color: var(--ok); }
.fin-sec { display: grid; gap: 14px; }
.fin-sec-topo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fin-sec h3 { margin: 0; font-size: 16px; font-weight: 700; }
.fin-sec h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.fin-sec-topo h4 { margin: 0; }
.fin-campo { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fin-campo select, .fin-campo input { height: 32px; border-radius: 10px; border: 0; box-shadow: inset 0 0 0 1px var(--ring); background: var(--soft); padding: 0 10px; font: inherit; font-weight: 500; color: var(--ink); }
.fin-campo input { width: 140px; text-align: right; }
.fin-graf { background: var(--soft); border-radius: 16px; padding: 10px 8px 0; }
.fin-graf svg { display: block; width: 100%; height: 260px; }
.fin-graf .grade { stroke: rgba(15,23,36,.07); }
.fin-graf .eixo { stroke: rgba(15,23,36,.35); }
.fin-graf .rot { font-size: 11px; fill: var(--muted); font-family: var(--f-ui); }
.fin-graf .b-ent { fill: var(--fin-ent); }
.fin-graf .b-sai { fill: var(--fin-sai); }
.fin-graf .b-prev { fill: var(--fin-prev); }
.fin-graf .saldo { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.fin-graf .saldo-p { fill: #fff; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fin-legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.fin-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.fin-legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.fin-legenda .l-ent { background: var(--fin-ent); } .fin-legenda .l-sai { background: var(--fin-sai); } .fin-legenda .l-prev { background: var(--fin-prev); }
.fin-legenda .l-saldo { height: 3px; background: var(--accent); }
.fin-graf .b-fat { fill: var(--accent); } .fin-graf .b-fat-ant { fill: #A9BFEF; } .fin-graf .b-fat-parcial { fill: #7FA0E8; stroke: var(--accent); stroke-dasharray: 3 2; }
.fin-legenda .l-fat { background: var(--accent); } .fin-legenda .l-fat-ant { background: #A9BFEF; } .fin-legenda .l-fat-parcial { background: #7FA0E8; }
.fin-card span .bom, .fin-card span .ruim { font-weight: 700; }
.fin-destaque { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--soft); font-size: 13.5px; color: var(--ink2); line-height: 1.5; }
.fin-destaque b { display: block; font-size: 28px; color: var(--ink); letter-spacing: -.02em; }
.fin-nota .mini { margin-left: 6px; }
.fin-sec h3 .fraco { font-weight: 500; font-size: 13.5px; }
.fin-filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fin-filtros select { height: 34px; border-radius: 10px; border: 0; box-shadow: inset 0 0 0 1px var(--ring); background: var(--soft); padding: 0 10px; font: inherit; font-size: 13px; color: var(--ink); max-width: 240px; }
.fin-busca { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--ring); color: var(--muted); flex: 1; min-width: 200px; max-width: 360px; }
.fin-busca input { border: 0; background: none; outline: none; font: inherit; font-size: 13px; color: var(--ink); width: 100%; }
.fin-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.fin-itens li.baixado .t, .fin-itens li.baixado b { color: var(--muted); }
.fin-itens li.baixado b { font-weight: 600; }
.fin-selo.ok { background: #E7F5EC; color: #1E6B40; }
.fin-barras li.sem .t { color: var(--muted); font-style: italic; }
.fin-barras li.sem .barra i { background: var(--faint); }
.fin-tabela.larga td:first-child, .fin-tabela.larga th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.fin-tabela.larga th:first-child, .fin-tabela.larga tfoot td:first-child { background: var(--soft); }

/* ── Celular (todas as telas do Hub) ─────────────────────────────────────── */
@media (max-width: 900px) {
  /* Barra de abas: as de trás mostram só o ícone; a aberta mostra nome e "fechar"; Início sempre à vista. */
  .dock .aba:not(.ativa) .nm, .dock .aba:not(.ativa) .fechar { display: none; }
  .dock .aba:not(.ativa) { padding: 0 6px; gap: 0; }
  .dock .aba.ativa { max-width: 56vw; }
  .dock .aba-inicio { position: sticky; left: 0; z-index: 1; }
  .dock .aba-inicio:not(.ativa) { background: var(--card); }
  /* Campos lado a lado (datas, horas, tipo/urgência) encolhem em vez de passar da borda. */
  .pi-linha > * { min-width: 0; }
  .campo input, .campo select, .campo textarea { min-width: 0; max-width: 100%; }
  /* Rodapé das janelas quebra em duas linhas quando os botões não cabem. */
  .dlg-chat .rodape { flex-wrap: wrap; row-gap: 10px; }
}
/* iPhone dá zoom sozinho ao tocar em campo com fonte menor que 16 px. */
@media (max-width: 900px) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}
.fin-legenda .dica { font-style: italic; }
.fin-tabela-rol { overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--ring); }
.fin-tabela { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.fin-tabela th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--soft); position: sticky; top: 0; }
.fin-tabela td { padding: 9px 12px; border-top: 1px solid var(--ring); white-space: nowrap; }
.fin-tabela tfoot td { font-weight: 700; background: var(--soft); }
.fin-tabela .n { text-align: right; }
.fin .bom { color: #1E6B40; } .fin .ruim { color: var(--bad); } .fin .fraco { color: var(--muted); }
.fin-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fin-barras, .fin-lista, .fin-itens { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fin-barras li { display: grid; grid-template-columns: minmax(0, 190px) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.fin-barras .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.fin-barras .barra { height: 10px; border-radius: 99px; background: var(--soft2); overflow: hidden; }
.fin-barras .barra i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.fin-barras.faixas .barra i { background: var(--bad); }
.fin-barras b { font-variant-numeric: tabular-nums; font-size: 12.5px; min-width: 84px; text-align: right; }
.fin-barras small { color: var(--muted); font-weight: 500; }
.fin-lista li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.fin-lista .d { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.fin-lista .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-lista .t small, .fin-itens small, .fin-dia-topo small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-lista b, .fin-itens b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-lista.clicavel li { cursor: pointer; transition: background .2s; }
.fin-lista.clicavel li:hover { background: var(--soft2); }
.fin-lista.clicavel li.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.fin-nota { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12px; color: var(--muted); }
.fin-nota .ic { width: 15px; height: 15px; margin-top: 1px; }
.fin-selo { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--soft2); color: var(--ink2); vertical-align: 1px; }
.fin-selo.ruim { background: #FDECEC; color: var(--bad); }
.fin-dia { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--ring); overflow: hidden; }
.fin-dia.hoje { box-shadow: inset 0 0 0 2px var(--accent); }
.fin-dia.alerta { box-shadow: inset 0 0 0 2px var(--bad); }
.fin-dia-topo { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; background: var(--soft); }
.fin-dia-topo .t { flex: 1; font-weight: 700; }
.fin-dia-topo .t::first-letter { text-transform: uppercase; }
.fin-dia-topo .t small { font-weight: 500; }
.fin-dia-topo b { font-size: 15px; font-variant-numeric: tabular-nums; }
.fin-itens { gap: 0; }
.fin-itens li { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto 130px; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--ring); font-size: 13px; }
.fin-itens li.fora { color: var(--muted); }
.fin-itens .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fin-itens .t small { font-weight: 400; }
.fin-itens .m { font-size: 12.5px; color: var(--ink2); min-width: 0; }
.fin-itens b { text-align: right; }
.fin-itens li.mais { display: block; color: var(--accent); font-weight: 600; cursor: pointer; }
@media (max-width: 900px) {
  .fin-topo { padding: 12px; gap: 8px; }
  .fin .seg { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .fin .seg::-webkit-scrollbar { display: none; }
  .fin-corpo { padding: 12px 12px 100px; }
  .fin-cards { grid-template-columns: 1fr 1fr; }
  .fin-duas { grid-template-columns: 1fr; }
  .fin-itens li { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-itens .m, .fin-itens .selos { display: none; }
  .fin-barras li { grid-template-columns: minmax(0, 120px) 1fr auto; }
}

/* ── App Android (modo app: só Mensagens e Agenda, ver MODO_APP no index.html) ── */
.modo-app .ilha .logo-chip { cursor: default; }
.modo-app .ilha .app-titulo { font-size: 16px; font-weight: 700; letter-spacing: -.01em; padding: 0 6px; }
.modo-app .ilha .sp { flex: 1; }
.modo-app .ilha { left: 12px; right: 12px; transform: none; }
.modo-app .dock .aba { flex: 1; justify-content: center; }
.modo-app .dock { left: 12px; right: 12px; transform: none; }

/* ── Saúde dos Apps e auditoria (ui-saude.js; usa a base .fin do Painel Financeiro) ── */
.sau { --sau-ok: #1F9D55; --sau-alerta: #C98A04; --sau-ruim: #D64545; }
.sau .alerta { color: #8A5D00; }
.sau-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sau .fin-duas { align-items: start; }
.sau .fin-duas .fin-sec { align-content: start; }
.fin-card.alerta b { color: var(--sau-alerta); }
.sau-selo { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--soft2); color: var(--ink2); }
.sau-selo::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.sau-selo.ok { background: #E7F5EC; color: #1E6B40; }
.sau-selo.alerta { background: #FFF3D6; color: #8A5D00; }
.sau-selo.ruim { background: #FDECEC; color: var(--sau-ruim); }
.sau-selo.neutro { background: var(--soft2); color: var(--muted); }
.seg-mini button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.sau-pe { font-size: 12px; }
.sau-tabela tbody tr.clicavel { cursor: pointer; transition: background .2s; }
.sau-tabela tbody tr.clicavel:hover td { background: var(--soft); }
.sau-tabela td b { font-weight: 700; }
.sau-nome b { display: block; }
.sau-nome small { display: block; color: var(--muted); font-size: 11.5px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sau-vazio { text-align: center; padding: 28px 12px !important; }
.sau-quebra { white-space: normal !important; min-width: 220px; }
.sau-tabela tr.sau-falha td { background: #FFF7F7; }
.fin-barras li.clicavel { cursor: pointer; border-radius: 8px; }
.fin-barras li.clicavel:hover .t { color: var(--ink); text-decoration: underline; }
.sau-barras .barra i.bom { background: var(--sau-ok); } .sau-barras .barra i.alerta { background: var(--sau-alerta); } .sau-barras .barra i.ruim { background: var(--sau-ruim); }
.sau-oc li { grid-template-columns: 52px minmax(0, 1fr) auto; }
.sau-oc li.clicavel { cursor: pointer; } .sau-oc li.clicavel:hover { background: var(--soft); }
.sau-oc .d, .fin-lista .d { font-family: var(--f-mono, ui-monospace, monospace); font-size: 12px; color: var(--muted); }

/* Painel lateral de detalhe */
.sau-fundo { position: absolute; inset: 0; background: rgba(15,23,36,.25); backdrop-filter: blur(3px); z-index: 4; animation: sauAparece .25s var(--mola); }
.sau-det { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(760px, calc(100% - 20px)); z-index: 5; display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; box-shadow: 0 0 0 1px var(--ring), 0 40px 80px -30px rgba(15,23,36,.45); animation: sauEntra .45s var(--mola); overflow: hidden; }
.sau-det-topo { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--ring); }
.sau-det-topo h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.sau-det-topo small { color: var(--muted); font-size: 12px; }
.sau-det-topo .sp { flex: 1; }
.sau-det-corpo { flex: 1; overflow: auto; padding: 14px 20px 28px; display: grid; gap: 10px; align-content: start; }
.sau-det-corpo h4 { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--ink2); }
.sau-det-corpo h4 small { font-weight: 500; margin-left: 6px; }
.sau-resumo { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13px; color: var(--muted); }
.sau-resumo b { color: var(--ink); }
.sau-graf svg { height: 160px; }
.sau-graf .b-ok { fill: var(--accent); } .sau-graf .b-lento { fill: var(--sau-alerta); } .sau-graf .b-falha { fill: #F4B4B4; }
.fin-legenda .l-ok { background: var(--accent); } .fin-legenda .l-lento { background: var(--sau-alerta); } .fin-legenda .l-falha { background: #F4B4B4; }
.sau-dias { display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; height: 70px; padding: 8px; border-radius: 14px; background: var(--soft); }
.sau-dias span { flex: 1; min-width: 4px; max-width: 18px; border-radius: 4px 4px 2px 2px; background: var(--sau-ok); }
.sau-dias span.alerta { background: var(--sau-alerta); } .sau-dias span.ruim { background: var(--sau-ruim); } .sau-dias span.fraco { background: var(--faint); }
.sau-log { margin: 0; height: 340px; flex: none; overflow: auto; padding: 12px 14px; border-radius: 14px; background: #0F1724; color: #D6DCE5; font: 11.5px/1.55 var(--f-mono, ui-monospace, Consolas, monospace); white-space: pre-wrap; word-break: break-word; }
.sau-log mark { background: rgba(214,69,69,.28); color: #FFD9D9; border-radius: 3px; }
@keyframes sauAparece { from { opacity: 0; } }
@keyframes sauEntra { from { opacity: 0; transform: translateX(24px); } }
@media (max-width: 1200px) { .sau-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .sau-cards { grid-template-columns: 1fr 1fr; }
  .sau-det { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; }
  .sau-oc li { grid-template-columns: 44px minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) { .sau-fundo, .sau-det { animation: none; } }
