/* =====================================================================
   Componentes da v2 (25/11/2026): casca com barra superior, painel,
   agenda em grade, tabelas, OS, financeiro e estoque.
   Carregado depois do app.css: o que está aqui prevalece.
   ===================================================================== */

/* ---------- utilitários de cor ---------- */
.azul { color: var(--azul); } .azul-claro { color: #5B7CF0; } .verde { color: var(--verde); } .vermelho { color: var(--vermelho); } .laranja { color: var(--laranja); } .cinza { color: var(--texto-3); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.centro { text-align: center; }

/* ---------- casca ---------- */
.casca { grid-template-columns: 248px minmax(0, 1fr); }
.lateral { background: rgba(255, 255, 255, .72); backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid var(--borda); padding: 18px 12px; }
.lateral > .marca { padding: 6px 10px 18px; font-size: 15px; letter-spacing: -.02em; }
.nav-lateral { gap: 1px; }
.nav-grupo { font-size: 11.5px; font-weight: 600; color: var(--texto-3); padding: 16px 12px 6px; letter-spacing: .01em; }
.nav-grupo:first-child { padding-top: 4px; }
.nav-lateral a { min-height: 38px; font-weight: 500; font-size: 14px; color: var(--tinta); border-radius: 10px; gap: 11px; }
.nav-lateral a .ic { color: var(--texto-2); width: 19px; height: 19px; }
.nav-lateral a:hover { background: rgba(0, 0, 0, .04); }
.nav-lateral a.ativo { background: var(--azul); color: #fff; }
.nav-lateral a.ativo .ic { color: #fff; }
.nav-lateral a.ativo .selo { background: #fff; color: var(--azul); }
.nav-lateral a[data-nav="leads"] .ic { color: var(--texto-2); }
.nav-lateral a.ativo[data-nav="leads"] .ic { color: #fff; }
.lateral-pe { gap: 10px; padding: 12px 6px 2px; }
.lateral-pe .quem { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lateral-pe .quem b { font-size: 13.5px; font-weight: 600; }
.avatar { width: 36px; height: 36px; font-size: 13px; font-weight: 600; letter-spacing: .02em; background: #EEF0F4; color: var(--texto-2); }
.avatar-azul { background: var(--azul); color: #fff; }

.topo { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 28px; background: rgba(245, 245, 247, .8); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topo-marca, .topo-busca-m { display: none; }
.busca-g { display: flex; align-items: center; gap: 10px; flex: 0 1 420px; height: 40px; padding: 0 8px 0 14px; border-radius: 12px; border: 1px solid var(--borda); background: #fff; color: var(--texto-3); font-size: 14px; text-align: left; transition: border-color .15s, box-shadow .15s; }
.busca-g:hover { border-color: var(--borda-2); }
.busca-g span { flex: 1; }
kbd { font: 600 11.5px var(--fonte); color: var(--texto-2); background: var(--fundo); border: 1px solid var(--borda); border-radius: 7px; padding: 3px 7px; }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sino { position: relative; width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--borda); color: var(--tinta); }
.sino-ponto { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--vermelho); box-shadow: 0 0 0 2px #fff; }
.bt-novo { min-height: 40px; padding: 0 16px; border-radius: 12px; }
.eu { display: flex; align-items: center; gap: 10px; padding: 3px 12px 3px 3px; border-radius: 99px; border: 1px solid var(--borda); background: #fff; }
.eu .avatar { width: 34px; height: 34px; }
.eu div { display: flex; flex-direction: column; line-height: 1.2; }
.eu b { font-size: 13.5px; font-weight: 600; }
.eu small { font-size: 12px; color: var(--texto-3); }
#tela { padding: 18px 28px 72px; max-width: 1440px; }
.faixa { padding: 9px 28px; font-size: 13.5px; border-bottom: 1px solid rgba(0, 0, 0, .04); }

/* ---------- popovers (menu + Novo, avisos) ---------- */
.popover { position: absolute; z-index: 1500; min-width: 300px; max-width: calc(100vw - 24px); background: rgba(255, 255, 255, .96); backdrop-filter: blur(20px); border: 1px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra-alta); padding: 6px; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity .16s, transform .2s var(--mola); }
.popover.aberto { opacity: 1; transform: none; }
.menu-pop { display: grid; gap: 1px; }
.menu-pop > button, .menu-pop > a, .busca-res > a, .busca-res > button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; border: 0; background: none; text-align: left; width: 100%; color: var(--tinta); }
.menu-pop > button:hover, .menu-pop > a:hover, .busca-res > a:hover, .busca-res > button:hover { background: var(--fundo); }
.menu-pop .ic { color: var(--azul); }
.menu-pop span, .busca-res span:not(.avatar):not(.os-num) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.menu-pop b, .busca-res b { font-size: 14px; font-weight: 600; }
.menu-pop small, .busca-res small { font-size: 12.5px; color: var(--texto-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-tit { font-size: 12px; font-weight: 600; color: var(--texto-3); padding: 10px 12px 4px; }
.pop-vazio { display: flex; align-items: center; gap: 8px; color: var(--texto-2); padding: 16px 12px; font-size: 14px; }
.pop-vazio .ic { color: var(--verde); }
.pop-alerta .ic:first-child { color: var(--vermelho); }
.folha-busca { max-width: 620px; padding: 14px; align-self: start; margin-top: 10vh; }
.folha-busca .folha-x { display: none; }
.busca-grande { margin: 0; }
.busca-grande input { min-height: 52px; font-size: 17px; border: 0; background: var(--fundo); border-radius: 14px; padding-left: 44px; }
.busca-grande .ic { top: 16px; left: 14px; }
.busca-res { max-height: 56vh; overflow-y: auto; margin-top: 8px; }

/* ---------- títulos ---------- */
.cabeca { margin: 6px 0 22px; align-items: flex-end; }
.cabeca h1 { font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.cabeca p { font-size: 15px; margin-top: 6px; color: var(--texto-2); max-width: 680px; }
.cabeca p b { color: var(--tinta); font-weight: 600; }
.cabeca p b.azul { color: var(--azul); }
.cabeca-acoes { flex-wrap: wrap; justify-content: flex-end; }
.secao-tit { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; margin: 4px 0 12px; }
.secao-tit .ic { color: var(--azul); }
.chamada { border-radius: 16px; padding: 14px 18px; margin-bottom: 22px; background: var(--tinta); }
.chamada b { font-weight: 600; }
.chamada-ir { display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--lima); white-space: nowrap; }

/* ---------- cartões ---------- */
.cartao { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--sombra); min-width: 0; }
.cartao-tit { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cartao-tit h2 { font-size: 16.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cartao-tit h2 .ic { color: var(--azul); }
.cartao-tit small { display: block; color: var(--texto-3); font-size: 13px; margin-top: 2px; }
.cartao-tabela { padding: 0; overflow-x: auto; }
.grade-3 .corta { max-width: 190px; }
.cartao-tabela > .cartao-tit { padding: 18px 22px 0; }
.cartao-alerta { border-color: #F6D0A8; background: #FFFBF6; }
.cartao-alerta h2 .ic { color: var(--laranja); }
.mini-link { font-size: 13px; font-weight: 600; color: var(--azul); white-space: nowrap; }
.mini-link:hover { text-decoration: underline; }
.lista-simples { list-style: none; margin: 0; padding: 0; }
.lista-simples li { display: grid; grid-template-columns: 140px 1fr; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--borda); cursor: pointer; font-size: 14px; }
.lista-simples small { grid-column: 2; color: var(--texto-2); }

/* ---------- indicadores ---------- */
.kpis-hoje { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpis-mes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi2 { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 12px 12px; align-items: start; background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); min-width: 0; transition: transform .2s var(--mola), box-shadow .2s; }
a.kpi2:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .07); }
.kpis-hoje .kpi2 { grid-template-columns: 1fr auto; }
.kpis-hoje .kpi2-ic { width: 44px; height: 44px; }
.kpis-hoje .kpi2-txt { grid-column: 1 / -1; grid-row: 2; }
.kpis-hoje .kpi2-extra { grid-column: 2; grid-row: 1; text-align: right; }
.kpis-hoje .kpi2-txt b { font-size: 30px; }
.kpis-mes .kpi2 { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
.kpis-mes .kpi2-ic { width: 34px; height: 34px; }
.kpis-mes .kpi2-txt b { font-size: 20px; }
.kpis-mes .kpi2-extra { grid-column: 1 / -1; }
.kpi2-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ic-azul { background: var(--azul-claro); color: var(--azul); } .ic-verde { background: var(--verde-claro); color: var(--verde); } .ic-laranja { background: var(--laranja-claro); color: var(--laranja); } .ic-roxo { background: var(--roxo-claro); color: var(--roxo); } .ic-cinza { background: var(--fundo); color: var(--texto-3); }
.kpis-hoje .ic-azul { background: var(--azul); color: #fff; } .kpis-hoje .ic-verde { background: var(--verde); color: #fff; } .kpis-hoje .ic-laranja { background: var(--laranja); color: #fff; }
.kpi2-txt { display: flex; flex-direction: column; min-width: 0; }
.kpi2-txt b { font-size: 21px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi2-txt small { font-size: 12.5px; color: var(--texto-2); margin-top: 3px; }
.kpi2-extra { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.kpis-mes .kpi2-extra { align-items: flex-start; }
.kpi2-conflito { border-color: #F6D0A8; }
.delta { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta-sobe { background: var(--verde-claro); color: var(--verde); } .delta-desce { background: var(--laranja-claro); color: var(--laranja); } .delta-igual { background: var(--fundo); color: var(--texto-2); }
.delta-txt { font-size: 11.5px; color: var(--texto-3); }

/* ---------- grades do painel ---------- */
.grade-3 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .85fr); gap: 18px; align-items: stretch; margin-bottom: 18px; }
.grade-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.grade-3 > .cartao, .grade-2 > .cartao { margin: 0; }

/* ---------- tabelas ---------- */
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-size: 12px; font-weight: 600; color: var(--texto-3); padding: 12px 14px; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela th.num, .tabela td.num { text-align: left; }
.tabela td { padding: 13px 14px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela tbody tr[data-acao], .tabela tbody tr[data-href] { cursor: pointer; transition: background .12s; }
.tabela tbody tr[data-acao]:hover, .tabela tbody tr[data-href]:hover { background: #FAFAFC; }
.tabela td b { font-weight: 600; }
.tabela td small { display: block; font-size: 12.5px; color: var(--texto-3); }
.tabela th:first-child, .tabela td:first-child { padding-left: 22px; }
.tabela th:last-child, .tabela td:last-child { padding-right: 22px; }
.cartao-tabela .tabela th { background: #FBFBFD; }
.corta { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-estreito { display: none !important; }
.ponto { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--azul); margin-right: 10px; vertical-align: 2px; }
.ponto-concluido { background: var(--verde); } .ponto-pedido { background: var(--amarelo); } .ponto-a_caminho, .ponto-em_andamento { background: var(--lima-2); } .ponto-faltou { background: var(--vermelho); }
.tec { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 99px; background: #fff; border: 1px solid var(--borda-2); font-size: 10.5px; font-weight: 700; color: var(--tinta); letter-spacing: .02em; }
.st { min-height: 22px; font-size: 11.5px; font-weight: 600; }
.st-confirmado { background: var(--azul-claro); color: var(--azul); }

/* faturamento 7 dias */
.numero-g { font-size: 30px; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.sub-numero { font-size: 13.5px; color: var(--texto-2); margin: 2px 0 14px; }
.sub-numero span { font-weight: 600; }
.barras7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 190px; align-items: end; }
.b7 { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.b7 small { font-size: 10.5px; color: var(--texto-2); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; min-height: 14px; }
.b7 i { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: var(--azul); transition: height .8s var(--mola); }
.b7 i.b7-hoje { background: linear-gradient(var(--azul), var(--azul)) padding-box; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--lima-2); }
.b7 span { font-size: 12px; color: var(--texto-3); text-transform: capitalize; }

/* OS recentes */
.lista-os { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-os li { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--borda); border-radius: 14px; cursor: pointer; transition: background .12s; }
.lista-os li:hover { background: #FAFAFC; }
.lista-os div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lista-os b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-os small { font-size: 12px; color: var(--texto-3); }
.lista-os .azul { font-variant-numeric: tabular-nums; white-space: nowrap; }
.check { width: 26px; height: 26px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; flex: none; }

/* mais vendidos */
.top-serv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.top-serv li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 10px; align-items: center; }
.pos { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--fundo); color: var(--texto-2); grid-row: 1 / 3; }
.pos-1 { background: #FFE9A8; color: #8A5A00; } .pos-2 { background: #E8EAEE; color: #4A5160; } .pos-3 { background: #F7D9C4; color: #8A4A1C; }
.top-nome { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-serv small { font-size: 12.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; grid-row: 1; grid-column: 3; }
.top-barra { grid-column: 2 / 4; height: 6px; border-radius: 99px; background: var(--fundo); overflow: hidden; }
.top-barra i { display: block; height: 100%; border-radius: 99px; background: var(--azul); }

/* resumo do mês e meta */
.resumo-mes { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-bottom: 16px; }
.resumo-mes > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 6px; border-left: 1px solid var(--borda); }
.resumo-mes > div:first-child { border-left: 0; }
.resumo-mes b { font-size: 18px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.resumo-mes small { font-size: 12px; color: var(--texto-2); }
.meta { border-top: 1px solid var(--borda); padding-top: 14px; }
.meta-l { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; margin-bottom: 8px; }
.meta-l span { display: flex; align-items: center; gap: 6px; color: var(--texto-2); font-weight: 500; }
.meta-l .ic { color: var(--azul); }
.meta-l b { font-variant-numeric: tabular-nums; font-weight: 600; }
.meta-l small { color: var(--texto-3); font-weight: 500; }
.meta-barra { height: 8px; border-radius: 99px; background: var(--fundo); overflow: hidden; }
.meta-barra i { display: block; height: 100%; border-radius: 99px; background: var(--azul); transition: width .9s var(--mola); }
.meta-vazia { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 1px dashed var(--borda-2); border-radius: 12px; color: var(--azul); font-weight: 600; font-size: 14px; }

/* ---------- segmentos com botão/link ---------- */
.seg > button, .seg > a { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: none; font-weight: 600; font-size: 13.5px; color: var(--texto-2); }
.seg > button.sel, .seg > a.sel { background: #fff; color: var(--tinta); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg { background: rgba(0, 0, 0, .05); border-radius: 11px; padding: 3px; gap: 2px; }
.chips-filtro { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.chips-filtro a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--borda); background: #fff; font-weight: 600; font-size: 13.5px; color: var(--texto-2); transition: background .12s, color .12s; }
.chips-filtro a:hover { color: var(--tinta); }
.chips-filtro a.sel { background: var(--azul-claro); border-color: #C9D6FF; color: var(--azul); }
.chips-filtro small { color: var(--texto-3); font-weight: 600; }
.fi-datas { font-size: 13px; margin-left: 6px; }

/* ---------- agenda ---------- */
.ag-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 10px 12px; margin-bottom: 14px; box-shadow: var(--sombra); }
.seg-visao { margin: 0; }
.ag-nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ag-nav .bt { min-height: 34px; }
.ag-rotulo { font-size: 15.5px; font-weight: 600; margin-left: 6px; white-space: nowrap; text-transform: capitalize; }
.ag-nav small { font-size: 13px; white-space: nowrap; }
.ag-filtros { display: flex; gap: 8px; }
.ag-filtros select, .sel-filtro { min-height: 36px; padding: 0 30px 0 12px; border-radius: 10px; border: 1px solid var(--borda); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236E6E73' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-size: 13.5px; font-weight: 500; }
.grade-ag { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.g-cab { display: grid; grid-template-columns: 56px repeat(var(--dias), minmax(0, 1fr)); border-bottom: 1px solid var(--borda); background: rgba(255, 255, 255, .9); }
.g-dia { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; }
.g-dia small { font-size: 11.5px; font-weight: 600; color: var(--texto-3); text-transform: uppercase; letter-spacing: .04em; }
.g-dia b { font-size: 20px; font-weight: 600; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.g-dia-hoje b { background: var(--azul); color: #fff; }
.g-dia:hover b { background: var(--fundo); }
.g-dia-hoje:hover b { background: var(--azul-2); }
.g-lot { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--fundo); color: var(--texto-2); font-variant-numeric: tabular-nums; }
.lot-livre { background: var(--verde-claro); color: var(--verde); } .lot-quase { background: var(--amarelo-claro); color: var(--amarelo); } .lot-lotado { background: var(--vermelho-claro); color: var(--vermelho); }
.g-corpo { display: grid; grid-template-columns: 56px minmax(0, 1fr); max-height: calc(100vh - 290px); min-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.g-horas span { display: block; font-size: 11px; color: var(--texto-3); text-align: right; padding-right: 10px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.g-horas span:first-child { visibility: hidden; }
.g-cols { display: grid; grid-template-columns: repeat(var(--dias), minmax(0, 1fr)); background-image: linear-gradient(to bottom, var(--borda) 1px, transparent 1px); }
.g-col { position: relative; border-left: 1px solid var(--borda); cursor: copy; }
.g-hoje { background: rgba(1, 49, 205, .025); }
.g-folga { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0, 0, 0, .025) 8px 16px); cursor: default; }
.g-fora { position: absolute; left: 0; right: 0; background: rgba(0, 0, 0, .022); pointer-events: none; }
.g-almoco { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, .03) 6px 12px); pointer-events: none; }
.g-almoco span { position: absolute; right: 6px; top: 3px; font-size: 10.5px; color: var(--texto-3); }
.g-agora { position: absolute; left: -1px; right: 0; height: 2px; background: var(--vermelho); z-index: 3; pointer-events: none; }
.g-agora::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--vermelho); }
.bloco { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 10px; border: 1px solid; text-align: left; overflow: hidden; font-size: 12px; line-height: 1.3; cursor: pointer; transition: box-shadow .15s, transform .15s var(--mola); }
.bloco:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); z-index: 4; }
.bl-hora { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .85; }
.bl-serv { font-size: 12.5px; font-weight: 600; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-cli { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-end { color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-pe { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 4px; }
.bl-st { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: #fff; border: 1px solid currentColor; white-space: nowrap; }
.bloco-curto { flex-direction: row; align-items: center; gap: 6px; padding: 4px 8px; }
.bloco-curto .bl-serv { flex: 1; }
.cor-sofa { background: #EEF3FF; border-color: #C7D5FF; color: #1F47C9; }
.cor-colchao { background: #FFF0F1; border-color: #FBCBD0; color: #C0283A; }
.cor-cadeira { background: #FFF7E6; border-color: #F8DDA4; color: #A86400; }
.cor-imper { background: #F5EFFF; border-color: #DCCBFB; color: #6B3FD0; }
.cor-outro { background: #EDF9F1; border-color: #BFE6CB; color: #1B7F3F; }
.bl-cancelado, .bl-faltou { opacity: .45; text-decoration: line-through; }
.bl-concluido { background-image: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .45)); }
.bl-pedido { border-style: dashed; }
.ag-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 4px 0; font-size: 12.5px; color: var(--texto-2); }
.ag-legenda span { display: inline-flex; align-items: center; gap: 7px; }
.ag-legenda i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid; }
.ag-leg-sep { width: 1px; height: 16px; background: var(--borda-2); margin: 0 6px; }
.dia-tira { display: none; }
.dia-grade { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.dia-lado { margin: 0; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.cal-grande .cal-dias { gap: 6px; }
.cal-grande .cal-d { aspect-ratio: auto; min-height: 104px; align-items: stretch; justify-content: flex-start; padding: 6px; border: 1px solid var(--borda); border-radius: 12px; gap: 4px; }
.cal-grande .cal-d i { display: none; }
.cal-grande .cal-d .g-lot { display: inline-block; }
.cal-n { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 600; }
.cal-itens { display: flex; flex-direction: column; gap: 2px; }
.cal-ev { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; border: 1px solid; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-mais { font-size: 11px; color: var(--texto-3); padding-left: 4px; }
.cal-grande .cal-hoje .cal-n > :first-child, .cal-grande .cal-hoje .cal-n { color: var(--azul); }
.cal-grande .cal-lotado { background: #FFF8F8; }

/* ---------- clientes ---------- */
.filtros .campo-busca input { background: #fff; border-color: var(--borda); }
.cel-cli { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cel-cli div { min-width: 0; }
.cel-cli b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cel-loc { display: flex; align-items: center; gap: 6px; color: var(--texto-2); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cel-loc .ic { color: var(--texto-3); }
.acoes-linha { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bt-ic-azul { background: var(--azul-claro); color: var(--azul); }
.bt-ic-azul:hover { background: #DCE6FF; color: var(--azul); }
.bt-ic-zap { background: var(--verde-claro); color: var(--verde); }
.bt-ic-zap:hover { background: #D6F1DF; color: var(--verde); }
.bt-ic-perigo:hover { background: var(--vermelho-claro); color: var(--vermelho); }
.st-cli-feito { background: var(--verde-claro); color: var(--verde); } .st-cli-agendado { background: var(--azul-claro); color: var(--azul); } .st-cli-retorno { background: var(--laranja-claro); color: var(--laranja); } .st-cli-orc { background: var(--roxo-claro); color: var(--roxo); } .st-cli-novo { background: var(--fundo); color: var(--texto-2); }
.previa { max-height: 240px; overflow: auto; border: 1px solid var(--borda); border-radius: 12px; margin-bottom: 10px; }
.previa .tabela td, .previa .tabela th { padding: 8px 12px; }

/* ---------- ordens de serviço ---------- */
.os-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.os-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #fff; border: 1px solid var(--borda); border-radius: 18px; box-shadow: var(--sombra); transition: border-color .15s; }
.os-kpi small { font-size: 12px; font-weight: 600; color: var(--texto-3); }
.os-kpi b { font-size: 28px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.os-kpi.sel { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(1, 49, 205, .1); }
.os-num { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--tinta); background: var(--fundo); border-radius: 7px; padding: 2px 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-sel { min-height: 30px; padding: 0 26px 0 10px; border-radius: 99px; border: 1px solid transparent; font-size: 12.5px; font-weight: 600; appearance: none; cursor: pointer; background: var(--azul-claro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='currentColor' stroke-width='2.4' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; color: var(--azul); }
.st-sel-deslocamento, .st-sel-andamento { background-color: var(--lima-claro); color: #4A6600; }
.st-sel-finalizada { background-color: var(--verde-claro); color: var(--verde); }
.st-sel-cancelada { background-color: var(--vermelho-claro); color: var(--vermelho); }
.st-sel:disabled { cursor: default; opacity: 1; }
.bt-mini { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; gap: 5px; border-color: var(--borda); color: var(--texto-2); }
.bt-mini .ic { color: var(--azul); }
.bt-mini.tem { background: var(--azul-claro); border-color: #C9D6FF; color: var(--azul); }
.tabela-os td:last-child { min-width: 250px; }
.det-selos { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.det-selos .st { margin: 0; }
.det-os { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.fotos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.fotos-grade figure { margin: 0; position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--fundo); }
.fotos-grade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fotos-grade .bt-ic { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; background: rgba(255, 255, 255, .9); color: var(--vermelho); }
.fotos-grade .vazio { grid-column: 1 / -1; }
.fotos-add input { display: none; }
.folha .seg > button small { color: var(--texto-3); }

/* ---------- financeiro ---------- */
.fi-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.fi-k { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: #fff; border: 1px solid var(--borda); border-radius: 18px; box-shadow: var(--sombra); min-width: 0; }
.fi-k > span { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--texto-2); }
.fi-k > span .ic { color: var(--azul); }
.fi-k b { font-size: 24px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-k small { font-size: 12px; color: var(--texto-3); }
.fi-lucro { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.fi-lucro > span, .fi-lucro > span .ic { color: var(--lima); }
.fi-lucro small { color: rgba(255, 255, 255, .6); }
.fi-meta .cartao-tit { margin-bottom: 10px; }
.meta-num { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--texto-2); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.meta-num b { color: var(--tinta); }
.meta-barra-g { height: 12px; }
.meta-pct { text-align: right; font-size: 13px; font-weight: 600; color: var(--azul); margin-top: 6px; }
.fi-tipo { font-size: 13px; font-weight: 600; }
.fi-entrada { color: var(--verde); } .fi-saida { color: var(--vermelho); } .fi-receber { color: var(--azul); }
.fx-linha { display: grid; grid-template-columns: minmax(0, 1fr) 140px 40px; gap: 8px; margin-bottom: 8px; }
.fx-linha input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--borda-2); border-radius: 10px; }
.fx-linha .com-pre i + input { padding-left: 32px; }
.editor-pe > b { margin-right: auto; font-variant-numeric: tabular-nums; }
.linha3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* ---------- estoque ---------- */
.es-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.es-k { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #fff; border: 1px solid var(--borda); border-radius: 18px; box-shadow: var(--sombra); }
.es-k small { font-size: 12px; font-weight: 600; color: var(--texto-3); }
.es-k b { font-size: 26px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.faixa-alerta { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--vermelho-claro); color: #8F1D14; font-size: 14px; margin-bottom: 14px; }
.faixa-alerta .ic { color: var(--vermelho); }
.tag { display: inline-flex; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--fundo); color: var(--texto-2); }
.tag-quimico { background: var(--azul-claro); color: var(--azul); } .tag-equipamento { background: var(--roxo-claro); color: var(--roxo); } .tag-epi { background: var(--amarelo-claro); color: var(--amarelo); }
.passo-es { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--fundo); }
.passo-es .bt-ic { width: 30px; height: 30px; border-radius: 9px; background: #fff; font-size: 17px; font-weight: 600; color: var(--tinta); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.passo-es b { min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 650; }
.passo-es b small { display: inline; margin-left: 3px; color: var(--texto-3); font-weight: 500; }
.passo-es.baixo { background: var(--vermelho-claro); }
.passo-es.baixo b { color: var(--vermelho); }
.tabela-es td:last-child { width: 1%; }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) {
  .kpis-mes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grade-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grade-3 > .cartao:first-child { grid-column: 1 / -1; }
  .fi-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fi-lucro { grid-column: span 1; }
  .eu div { display: none; }
  .eu { padding: 3px; }
}
@media (max-width: 1100px) {
  .grade-2, .dia-grade { grid-template-columns: minmax(0, 1fr); }
  .dia-lado { position: static; max-height: none; }
  .os-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .so-largo { display: none !important; }
  .so-estreito { display: block !important; }
  .busca-g kbd { display: none; }
  .top-serv { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .casca { grid-template-columns: minmax(0, 1fr); }
  .topo { height: auto; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); gap: 8px; background: rgba(255, 255, 255, .86); border-bottom-color: var(--borda); }
  .busca-g, .eu { display: none; }
  .topo-marca { display: flex; font-size: 15px; min-width: 0; flex: 1; }
  .topo-marca .logo { flex: none; }
  .topo-acoes { margin-left: 0; gap: 4px; flex: none; }
  .topo-busca-m { display: inline-grid; }
  .sino { border: 0; background: none; }
  .bt-novo { min-height: 38px; padding: 0 12px; }
  #tela { padding: 16px 16px 104px; }
  .faixa { padding: 9px 16px; }
  .cabeca { margin-top: 0; }
  .cabeca h1 { font-size: 27px; }
  .cabeca-acoes .bt-pri { display: none; }
  .cabeca-acoes { width: 100%; justify-content: flex-start; }
  .kpis-hoje { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis-hoje .kpi2 { padding: 14px; }
  .kpis-hoje .kpi2-txt b { font-size: 24px; }
  .kpis-hoje .kpi2-ic { width: 38px; height: 38px; }
  .kpis-mes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis-mes .kpi2 { padding: 14px; grid-template-columns: 1fr; }
  .kpis-mes .kpi2-ic { width: 34px; height: 34px; }
  .kpis-mes .kpi2-txt b { font-size: 18px; }
  .delta-txt { display: none; }
  .grade-3 { grid-template-columns: minmax(0, 1fr); }
  .cartao { padding: 16px; border-radius: 18px; }
  .tabela th:first-child, .tabela td:first-child { padding-left: 16px; }
  .tabela th:last-child, .tabela td:last-child { padding-right: 16px; }
  .tabela td, .tabela th { padding-left: 10px; padding-right: 10px; }
  .barras7 { height: 160px; gap: 6px; }
  .b7 small { font-size: 9.5px; }
  .resumo-mes { grid-template-columns: repeat(2, 1fr); gap: 14px 0; }
  .resumo-mes > div:nth-child(3) { border-left: 0; }
  .lista-simples li { grid-template-columns: 1fr; }
  .lista-simples small { grid-column: 1; }
  /* agenda no celular: dia em grade + tira de dias */
  .ag-barra { padding: 8px; gap: 8px; }
  .ag-nav { order: 3; width: 100%; flex: none; }
  .ag-filtros { flex: 1; justify-content: flex-end; }
  .ag-filtros select { max-width: 150px; }
  .dia-tira { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; }
  .dt-d { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: #fff; border: 1px solid var(--borda); }
  .dt-d small { font-size: 11px; color: var(--texto-3); text-transform: capitalize; }
  .dt-d b { font-size: 17px; font-weight: 600; }
  .dt-d i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
  .dt-d.lot-livre i { background: var(--verde); } .dt-d.lot-quase i { background: #F2B53A; } .dt-d.lot-lotado i { background: var(--vermelho); }
  .dt-d.lot-livre, .dt-d.lot-quase, .dt-d.lot-lotado { color: inherit; background: #fff; }
  .dt-d.sel { background: var(--azul); border-color: var(--azul); color: #fff; }
  .dt-d.sel small { color: rgba(255, 255, 255, .8); }
  .g-corpo { max-height: 62vh; min-height: 0; grid-template-columns: 44px minmax(0, 1fr); }
  .g-cab { grid-template-columns: 44px repeat(var(--dias), minmax(0, 1fr)); }
  .grade-dia .g-cab { display: none; }
  .cal-grande .cal-d { min-height: 64px; padding: 4px; }
  .cal-ev { display: none; }
  .cal-mais { display: none; }
  .cal-grande .cal-itens::after { content: ''; }
  .cal-grande .cal-n { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ag-legenda { font-size: 11.5px; gap: 6px 12px; }
  /* tabelas que viram lista */
  .tabela-cli thead, .tabela-os thead, .tabela-es thead, .tabela-fi thead { display: none; }
  .tabela-cli td:nth-child(3) { display: none; }
  .tabela-os td { padding-top: 10px; padding-bottom: 10px; }
  .tabela-os tr { display: grid; grid-template-columns: auto 1fr auto; align-items: center; border-bottom: 1px solid var(--borda); padding: 6px 0; }
  .tabela-os td { border: 0; }
  .tabela-os td:nth-child(2) { grid-column: 2 / 4; }
  .tabela-os td:nth-child(4) { grid-column: 1 / 2; grid-row: 2; }
  .tabela-os td:nth-child(6) { grid-row: 2; }
  .tabela-os td:nth-child(7) { grid-row: 2; }
  .os-kpis { grid-template-columns: repeat(5, minmax(108px, 1fr)); overflow-x: auto; padding-bottom: 4px; gap: 8px; }
  .os-kpi { padding: 12px 14px; }
  .os-kpi b { font-size: 22px; }
  .chips-filtro { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -16px; padding-right: 16px; }
  .chips-filtro a { flex: none; }
  .fi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fi-lucro { grid-column: 1 / -1; }
  .fi-k b { font-size: 20px; }
  .tabela-fi tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 10px 16px; border-bottom: 1px solid var(--borda); }
  .tabela-fi td { padding: 0 !important; border: 0; }
  .tabela-fi td:nth-child(3) { grid-column: 1 / 3; grid-row: 2; font-size: 13.5px; }
  .tabela-fi td:nth-child(5) { grid-row: 1 / 3; grid-column: 3; align-self: center; }
  .tabela-fi td:nth-child(6) { display: none; }
  .es-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .linha3 { grid-template-columns: 1fr 1fr; }
  .linha3 .campo:last-child { grid-column: 1 / -1; }
  .popover { left: 12px !important; right: 12px; min-width: 0; }
  .folha-busca { margin-top: 0; align-self: end; }
  .nav-baixo .selo { position: absolute; top: 6px; left: calc(50% + 4px); margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .popover { transition: none; }
}

.chips-filtro, .os-kpis, .dia-tira, .pub-dias { scrollbar-width: none; }
.chips-filtro::-webkit-scrollbar, .os-kpis::-webkit-scrollbar, .dia-tira::-webkit-scrollbar, .pub-dias::-webkit-scrollbar { display: none; }
