/* Agenda Paulicéia Tintas — cores tiradas do logo */
:root {
  --azul: #006BB7;
  --azul-esc: #00548F;
  --azul-claro: #E7F1F9;
  --verm: #ED1C24;
  --verm-esc: #C4141B;
  --verm-claro: #FDECEC;
  --verde: #1E8E5A;
  --verde-claro: #E6F4EC;
  --ambar: #C77700;
  --ambar-claro: #FFF3DC;
  --cinza: #8693A0;
  --cinza-claro: #EEF1F4;
  --ink: #14212B;
  --muted: #5C6B78;
  --linha: #E1E7ED;
  --fundo: #F3F6F9;
  --card: #FFFFFF;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(20, 33, 43, .05), 0 4px 14px rgba(20, 33, 43, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
small { color: var(--muted); }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.dica { color: var(--muted); font-size: 13px; }
.nada { color: var(--muted); margin: 8px 0; text-align: center; padding: 14px 0; }
.texto { white-space: pre-line; margin: 0; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.ic { width: 20px; height: 20px; flex: none; }
.so-imprimir { display: none; }

/* ---------- estrutura ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 236px;
  background: var(--card); border-right: 1px solid var(--linha);
  display: flex; flex-direction: column; gap: 14px; padding: 18px 14px;
}
.marca img { display: block; width: 120px; margin: 0 auto 4px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; color: var(--ink); font-weight: 500;
}
.sidebar nav a:hover { background: var(--fundo); text-decoration: none; }
.sidebar nav a.ativo { background: var(--azul-claro); color: var(--azul-esc); font-weight: 650; }
.quem { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--linha); padding-top: 14px; }
.quem-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.quem-txt strong, .quem-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quem-txt span { color: var(--muted); font-size: 12.5px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--azul); color: #fff; font-weight: 700;
  display: grid; place-items: center;
}
.avatar.mini { width: 20px; height: 20px; font-size: 11px; display: inline-grid; }
.sair { background: none; border: 0; color: var(--verm-esc); font: inherit; font-weight: 600; cursor: pointer; padding: 6px; }
.sair:hover { text-decoration: underline; }

main { margin-left: 236px; padding: 28px 32px 60px; max-width: 1320px; }
.topbar, .bottomnav, .fab { display: none; }

.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.titulo-secao { margin: 22px 0 10px; }

.cartao {
  background: var(--card); border: 1px solid var(--linha); border-radius: var(--raio);
  box-shadow: var(--sombra); padding: 18px; margin-bottom: 16px;
}
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cartao-topo h2 { margin: 0; }
.rodape-cartao { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.borda-alerta { border-left: 4px solid var(--verm); }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.conta {
  display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 99px; text-align: center;
  background: var(--cinza-claro); color: var(--muted); font-size: 12.5px; font-weight: 650; vertical-align: 1px;
}

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--linha); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--fundo); text-decoration: none; }
.btn.primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.primario:hover { background: var(--azul-esc); }
.btn.perigo { background: var(--verm); border-color: var(--verm); color: #fff; }
.btn.perigo:hover { background: var(--verm-esc); }
.btn.perigo-leve { color: var(--verm-esc); }
.btn.bloco { display: flex; width: 100%; }
.btn.grande { min-height: 48px; font-size: 16px; }
.btn.pequeno { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.btn.icone { width: 40px; padding: 0; font-size: 22px; line-height: 1; }

input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #CBD5DE; background: #fff; color: var(--ink); font: inherit; font-size: 16px;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 3px solid rgba(0, 107, 183, .28); outline-offset: 1px; border-color: var(--azul);
}
input[disabled] { background: var(--fundo); color: var(--muted); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 860px; }
.form.uma { grid-template-columns: 1fr; margin-top: 14px; max-width: 640px; }
.form .largo { grid-column: 1 / -1; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-acoes { display: flex; justify-content: flex-end; gap: 10px; }
.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); font-size: 15px; }
.check input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--azul); }

.filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filtros select, .acoes select { width: auto; min-width: 210px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 8px 13px; border-radius: 99px; border: 1px solid var(--linha); background: var(--card);
  color: var(--ink); font-weight: 600; font-size: 14px;
}
.chip:hover { text-decoration: none; background: var(--fundo); }
.chip.ativo { background: var(--azul); border-color: var(--azul); color: #fff; }
.intervalo { display: flex; gap: 8px; align-items: center; margin-left: auto; color: var(--muted); }
.intervalo input { width: 152px; }
.busca { display: flex; gap: 8px; flex: 1; min-width: 240px; max-width: 460px; }

.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--linha); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.abas a { padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.abas a:hover { color: var(--ink); text-decoration: none; }
.abas a.ativo { color: var(--azul-esc); border-bottom-color: var(--azul); }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 550; border: 1px solid; }
.flash.ok { background: var(--verde-claro); border-color: #B9E0CB; color: #12613C; }
.flash.erro { background: var(--verm-claro); border-color: #F6C1C3; color: #9B1016; }
.flash.aviso { background: var(--ambar-claro); border-color: #F3D9A4; color: #7A4A00; }

/* ---------- selos de situação ---------- */
.selo { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.selo.agendado { background: var(--azul-claro); color: var(--azul-esc); }
.selo.em_andamento { background: var(--ambar-claro); color: #7A4A00; }
.selo.concluido { background: var(--verde-claro); color: #12613C; }
.selo.cancelado { background: var(--cinza-claro); color: #4D5A66; }
.selo.atrasado { background: var(--verm-claro); color: #9B1016; }
.ponto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.ponto.agendado, .seg.agendado { background: var(--azul); }
.ponto.em_andamento, .seg.em_andamento { background: var(--ambar); }
.ponto.concluido, .seg.concluido { background: var(--verde); }
.ponto.cancelado, .seg.cancelado { background: var(--cinza); }
.estrelas { color: #E0A100; letter-spacing: 1px; white-space: nowrap; }
.estrelas i { color: #D5DCE3; font-style: normal; }

/* ---------- lista de atendimentos ---------- */
.lista { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 14px; padding: 12px 6px;
  border-bottom: 1px solid var(--linha); color: var(--ink); border-radius: 8px;
}
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--fundo); text-decoration: none; }
.item.inativo { opacity: .6; }
.item-data {
  flex: none; width: 54px; padding: 5px 0; border-radius: 10px; text-align: center;
  background: var(--azul-claro); color: var(--azul-esc); line-height: 1.1;
}
.item-data.hoje { background: var(--azul); color: #fff; }
.item-data.hoje small { color: #fff; }
.item-data b { display: block; font-size: 20px; }
.item-data small { display: block; font-size: 11px; text-transform: uppercase; color: inherit; letter-spacing: .03em; }
.item-corpo { flex: 1; min-width: 0; }
.item-hora { font-size: 13px; color: var(--muted); font-weight: 600; }
.item-titulo { font-weight: 650; overflow-wrap: anywhere; }
.item-sub { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.item-fimem { font-size: 12.5px; color: #12613C; font-weight: 600; margin-top: 2px; }
.item-fim { flex: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.link-pequeno { font-size: 13px; font-weight: 600; }
.campo > select, .campo > input { width: 100%; }
.campo > input[hidden] { display: none; }
.linha-form { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.linha-form input { flex: 1; min-width: 0; }
.tipo-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.tipo-linha:last-child { border-bottom: 0; }
.tipo-linha small { flex-basis: 100%; }
.item-com-acao { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--linha); }
.item-com-acao:last-child { border-bottom: 0; }
.item-com-acao .item { flex: 1; min-width: 0; border-bottom: 0; }
.item-dias { font-size: 12.5px; color: var(--azul-esc); font-weight: 650; margin-top: 2px; }
.dia-linha { display: block; }
.campo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rotulo { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.datas { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.data-linha { display: flex; gap: 6px; }
.data-linha .tirar { flex: none; color: var(--verm-esc); }
.data-linha .tirar[hidden] { display: none; }

/* ---------- painel ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  background: var(--card); border: 1px solid var(--linha); border-radius: var(--raio);
  box-shadow: var(--sombra); padding: 14px 16px; display: flex; flex-direction: column; min-width: 0;
}
.kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12.5px; }
.kpi.alerta { border-color: #F3B4B7; background: var(--verm-claro); }
.kpi.alerta b { color: #9B1016; }

.pilha { display: flex; gap: 2px; height: 18px; }
.seg { min-width: 6px; border-radius: 4px; position: relative; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.legenda b { color: var(--ink); }

.colunas-wrap { display: flex; gap: 8px; height: 210px; }
.eixo-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 11.5px; color: var(--muted); padding-bottom: 20px; min-width: 16px; font-variant-numeric: tabular-nums; }
.colunas {
  flex: 1; display: flex; align-items: stretch; gap: 2px; min-width: 0;
  background: linear-gradient(var(--linha), var(--linha)) 0 0 / 100% 1px no-repeat,
              linear-gradient(var(--linha), var(--linha)) 0 calc((100% - 20px) / 2) / 100% 1px no-repeat;
}
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; position: relative; outline: 0; }
.col-barra { background: var(--azul); border-radius: 4px 4px 0 0; min-height: 0; max-width: 28px; width: 100%; margin: 0 auto; }
.col:hover .col-barra, .col:focus .col-barra { background: var(--azul-esc); }
.col-rot { height: 20px; border-top: 1px solid #C5CED7; font-size: 11px; color: var(--muted); text-align: center; padding-top: 3px; white-space: nowrap; overflow: visible; }

.barras { display: flex; flex-direction: column; gap: 10px; }
.barra-linha { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 34px; align-items: center; gap: 10px; position: relative; }
.barra-rot { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-trilho { height: 16px; }
.barra { height: 100%; background: var(--azul); border-radius: 0 4px 4px 0; min-width: 3px; }
.barra-linha b { text-align: right; font-variant-numeric: tabular-nums; }

/* dica ao passar o mouse nos gráficos */
[data-dica]:hover::after, [data-dica]:focus::after {
  content: attr(data-dica); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 7px;
  white-space: nowrap; z-index: 5; pointer-events: none;
}
.col[data-dica]:hover::after, .col[data-dica]:focus::after { bottom: auto; top: 0; }
.col:nth-child(-n+3)[data-dica]::after { left: 0; transform: none; }
.col:nth-last-child(-n+3)[data-dica]::after { left: auto; right: 0; transform: none; }

.tabela-wrap { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabela th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.tabela td { padding: 10px; border-bottom: 1px solid var(--linha); }
.tabela tr:last-child td { border-bottom: 0; }
.tabela td small { display: block; }
.tabela .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela .ruim { color: #9B1016; font-weight: 700; }
.tabela tr.sel td { background: var(--azul-claro); }

.fb { display: block; padding: 12px 6px; border-bottom: 1px solid var(--linha); color: var(--ink); border-radius: 8px; }
.fb:hover { background: var(--fundo); text-decoration: none; }
.fb-topo { display: flex; justify-content: space-between; gap: 10px; }
.fb-sub { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fb p { margin: 0; }

/* ---------- agenda ---------- */
.mes-nav { display: flex; align-items: center; gap: 10px; }
.mes-nav h1 { min-width: 210px; text-align: center; }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.calendario { padding: 12px; }
.cal-semana, .cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-semana span { text-align: center; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; padding: 4px 0 8px; }
.cal-grade { gap: 4px; }
.cal-dia {
  min-height: 98px; padding: 6px; border-radius: 10px; border: 1px solid var(--linha);
  display: flex; flex-direction: column; gap: 3px; color: var(--ink); min-width: 0; position: relative;
}
.cal-dia:hover { background: var(--fundo); text-decoration: none; }
.cal-dia.fora { background: #FAFBFC; color: #A9B4BE; border-color: transparent; }
.cal-dia.sel { border-color: var(--azul); box-shadow: inset 0 0 0 1px var(--azul); }
.cal-num { font-weight: 650; font-size: 13.5px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-dia.hoje .cal-num { background: var(--verm); color: #fff; }
.cal-ev {
  font-size: 11.5px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--azul-claro); color: var(--azul-esc); font-weight: 600; border-left: 3px solid var(--azul);
}
.cal-ev.em_andamento { background: var(--ambar-claro); color: #7A4A00; border-left-color: var(--ambar); }
.cal-ev.concluido { background: var(--verde-claro); color: #12613C; border-left-color: var(--verde); }
.cal-ev.cancelado { background: var(--cinza-claro); color: #4D5A66; border-left-color: var(--cinza); text-decoration: line-through; }
.cal-mais { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cal-ponto { display: none; }

/* ---------- quadro (kanban) ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kb-col { background: #E9EEF3; border-radius: var(--raio); padding: 12px; border-top: 4px solid var(--azul); }
.kb-col.em_andamento { border-top-color: var(--ambar); }
.kb-col.concluido { border-top-color: var(--verde); }
.kb-col header { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.kb-col header h2 { margin: 0; flex: 1; font-size: 15px; }
.kb-col .conta { background: #fff; }
.kb-cartoes { display: flex; flex-direction: column; gap: 10px; }
.kb-cartao { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: var(--sombra); border: 1px solid var(--linha); }
.kb-cartao.atrasado { border-left: 4px solid var(--verm); }
.kb-cartao > a { display: block; color: var(--ink); }
.kb-cartao > a:hover { text-decoration: none; }
.kb-cartao > a:hover .item-titulo { color: var(--azul-esc); }
.kb-cartao form, .kb-cartao > .btn { margin-top: 10px; }
.kb-func { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; color: var(--muted); font-weight: 600; }
.kb-marca { font-size: 12.5px; font-weight: 650; margin-top: 8px; color: var(--muted); }
.kb-marca.ok { color: #12613C; }
.kb-marca.ruim { color: #9B1016; }

/* ---------- ordem de serviço ---------- */
.os-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.os-topo strong { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dados { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.dados dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.dados dd { margin: 2px 0 0; font-weight: 550; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--linha); padding: 12px 0 2px; }
details:first-child { border-top: 0; padding-top: 0; }
.acao-rapida + details { margin-top: 14px; }
summary { cursor: pointer; font-weight: 650; color: var(--azul-esc); padding: 4px 0; }
.notas { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.notas legend { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
.notas label { flex: 1; min-width: 56px; }
.notas input { position: absolute; opacity: 0; width: 1px; min-height: 1px; height: 1px; }
.notas span {
  display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px;
  border: 1px solid #CBD5DE; color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1.2;
}
.notas span small { font-size: 11px; font-weight: 600; }
.notas input:checked + span { background: var(--azul); border-color: var(--azul); color: #fff; }
.notas input:checked + span small { color: #fff; }
.notas input:focus-visible + span { outline: 3px solid rgba(0, 107, 183, .28); }
.admin-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.vazio { text-align: center; padding: 40px 10px; }
.vazio b { font-size: 46px; color: var(--azul); }

/* ---------- login ---------- */
body.entrada { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(160deg, var(--azul) 0%, var(--azul-esc) 55%, #003A63 100%); }
body.entrada main { margin: 0; padding: 0; width: 100%; max-width: 400px; }
.cartao-entrada {
  background: var(--card); border-radius: 20px; padding: 28px 26px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25); border-top: 5px solid var(--verm);
}
.cartao-entrada img { width: 150px; margin: 0 auto; display: block; }
.cartao-entrada h1 { text-align: center; font-size: 20px; }
.cartao-entrada .dica { text-align: center; margin: 0; }

/* ---------- tablet ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grade-2, .agenda-layout { grid-template-columns: minmax(0, 1fr); }
  .intervalo { margin-left: 0; }
}

/* ---------- celular ---------- */
@media (max-width: 820px) {
  .sidebar { display: none; }
  main { margin: 0; padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  h1 { font-size: 21px; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    background: var(--card); border-bottom: 1px solid var(--linha); padding: 6px 14px;
  }
  .topbar img { height: 44px; display: block; }
  .topbar-nome { flex: 1; text-align: right; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottomnav {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 20; background: var(--card);
    border-top: 1px solid var(--linha); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .bottomnav a {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 10px;
  }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a.ativo { color: var(--azul); }
  .bottomnav .ic { width: 22px; height: 22px; }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 21;
    width: 56px; height: 56px; border-radius: 50%; background: var(--verm); color: #fff; font-size: 32px; line-height: 1;
    box-shadow: 0 6px 16px rgba(237, 28, 36, .4);
  }
  .fab:hover { text-decoration: none; background: var(--verm-esc); }

  .cartao { padding: 14px; }
  .kpis, .kpis.quatro { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi b { font-size: 26px; }
  .form, .dados { grid-template-columns: minmax(0, 1fr); }
  .form-acoes .btn { flex: 1; }
  .filtros select, .acoes select, .acoes form { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .chip { white-space: nowrap; }
  .intervalo { width: 100%; }
  .intervalo input { flex: 1; width: auto; min-width: 0; }
  .busca { max-width: none; flex-basis: 100%; }
  .item { gap: 10px; padding: 12px 2px; }
  .item-data { width: 48px; }
  .colunas-wrap { height: 170px; }

  .mes-nav { width: 100%; justify-content: space-between; }
  .mes-nav h1 { min-width: 0; }
  .calendario { padding: 8px; }
  .cal-grade { gap: 2px; }
  .cal-dia { min-height: 52px; align-items: center; padding: 4px 0; }
  .cal-ev, .cal-mais { display: none; }
  .cal-ponto {
    display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px;
    background: var(--azul); color: #fff; font-size: 11px; font-weight: 700;
  }

  .kanban { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -14px; padding: 0 14px 8px; }
  .kb-col { flex: 0 0 84%; scroll-snap-align: center; }
}

/* ---------- impressão da ordem de serviço ---------- */
@media print {
  .sidebar, .topbar, .bottomnav, .fab, .nao-imprimir, .flash { display: none !important; }
  body { background: #fff; }
  main { margin: 0; padding: 0; max-width: none; }
  .cartao { box-shadow: none; break-inside: avoid; }
  .so-imprimir { display: block; height: 70px; }
  .dados { grid-template-columns: repeat(3, 1fr); }
}
