/* Acesselev · plataforma de gestão (demonstração) */
:root {
  --navy: #242d3b; --navy-2: #2e394a; --navy-3: #3a4659;
  --azul: #0170b9; --azul-claro: #e6f1fa;
  --texto: #4b4f58; --forte: #1f2633; --suave: #7a808c; --linha: #e3e7ee; --linha-2: #eef1f5;
  --fundo: #f4f6f9; --branco: #fff;
  --vermelho: #d64545; --vermelho-claro: #fbeaea;
  --verde: #2e9e6a; --verde-claro: #e5f5ed;
  --amarelo: #e0a12e; --amarelo-claro: #fcf3e1;
  --cinza: #8a93a3; --cinza-claro: #eef0f3;
  --raio: 10px; --sombra: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .04);
  --lateral: 236px; --tarja: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 Roboto, system-ui, sans-serif; color: var(--texto); background: var(--fundo); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: Catamaran, Roboto, sans-serif; color: var(--forte); margin: 0; line-height: 1.2; }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.tarja { position: fixed; top: 0; left: 0; right: 0; height: var(--tarja); z-index: 60; background: #1a212c; color: #c9d1dc; font-size: 11.5px; letter-spacing: .02em; display: block; text-align: center; line-height: var(--tarja); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── entrada ── */
.entrada { min-height: 100vh; padding: calc(var(--tarja) + 24px) 16px 24px; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% 0%, #33415a 0%, var(--navy) 55%, #1b222d 100%); }
.entrada-cartao { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 36px 32px 28px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.entrada-logo { width: 150px; height: auto; }
.entrada h1 { font-size: 26px; margin: 18px 0 8px; }
.entrada p { margin: 0 0 22px; }
.entrada-nota { font-size: 12.5px; color: var(--suave); margin: 18px 0 0 !important; }

/* ── botões ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--linha); background: #fff; color: var(--forte); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none !important; }
.btn:hover { background: var(--linha-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn-primario:hover { background: #015f9d; }
.btn-perigo { color: var(--vermelho); border-color: #efc4c4; }
.btn-perigo:hover { background: var(--vermelho-claro); }
.btn-sucesso { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn-sucesso:hover { background: #268558; }
.btn-escuro { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-escuro:hover { background: var(--navy-2); }
.btn-p { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-grande { height: 46px; padding: 0 22px; font-size: 15px; width: 100%; }
.btn-icone { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--linha); background: #fff; border-radius: 8px; cursor: pointer; color: var(--forte); }
.btn-icone:hover { background: var(--linha-2); }
.btn-link { background: none; border: 0; color: var(--azul); cursor: pointer; padding: 0; font-weight: 500; }

/* ── estrutura ── */
.app { display: flex; min-height: 100vh; padding-top: var(--tarja); }
.lateral { position: fixed; top: var(--tarja); bottom: 0; left: 0; width: var(--lateral); background: var(--navy); color: #c3cbd7; display: flex; flex-direction: column; z-index: 40; }
.lateral-topo { display: flex; align-items: center; gap: 10px; padding: 16px 18px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lateral-logo { width: 44px; height: auto; }
.lateral-topo strong { display: block; font-family: Catamaran; font-size: 18px; color: #fff; letter-spacing: .06em; line-height: 1.1; text-transform: uppercase; }
.lateral-topo span { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #8e9bb0; }
.menu { flex: 1; overflow-y: auto; padding: 10px 10px; }
.menu-grupo { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #6f7c92; padding: 14px 10px 6px; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c3cbd7; text-decoration: none; font-weight: 500; margin-bottom: 1px; }
.menu a:hover { background: var(--navy-2); color: #fff; }
.menu a.ativo { background: var(--azul); color: #fff; }
.menu a svg { opacity: .85; }
.menu .contador { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--navy-3); color: #fff; font-size: 11.5px; display: grid; place-items: center; font-weight: 700; }
.menu .contador.alerta { background: var(--vermelho); }
.menu a.ativo .contador { background: rgba(255, 255, 255, .25); }
.lateral-rodape { padding: 12px 18px 16px; font-size: 11.5px; color: #6f7c92; border-top: 1px solid rgba(255, 255, 255, .07); }
.veu { display: none; }
.principal { flex: 1; min-width: 0; margin-left: var(--lateral); display: flex; flex-direction: column; }
.topo { position: sticky; top: var(--tarja); z-index: 30; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 22px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--linha); backdrop-filter: saturate(1.2); }
.busca { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; }
.busca > svg { position: absolute; left: 11px; color: var(--suave); }
.busca input { width: 100%; height: 38px; border: 1px solid var(--linha); background: var(--fundo); border-radius: 9px; padding: 0 12px 0 36px; outline: none; }
.busca input:focus { border-color: var(--azul); background: #fff; box-shadow: 0 0 0 3px var(--azul-claro); }
.busca-resultados { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 30, 50, .16); max-height: 60vh; overflow-y: auto; padding: 6px; }
.busca-resultados a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 7px; color: var(--texto); text-decoration: none; }
.busca-resultados a:hover, .busca-resultados a.foco { background: var(--azul-claro); }
.busca-resultados small { color: var(--suave); display: block; font-size: 12px; }
.busca-resultados .rot { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); background: var(--azul-claro); border-radius: 5px; padding: 2px 6px; flex: none; }
.busca-vazio { padding: 12px; color: var(--suave); }
.vivo { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--suave); padding: 0 10px; height: 30px; border-radius: 15px; background: var(--cinza-claro); white-space: nowrap; }
.vivo i { width: 8px; height: 8px; border-radius: 50%; background: var(--cinza); }
.vivo.on { color: #1f7a50; background: var(--verde-claro); }
.vivo.on i { background: var(--verde); box-shadow: 0 0 0 0 rgba(46, 158, 106, .6); animation: pulso-verde 2s infinite; }
.vivo.off { color: var(--vermelho); background: var(--vermelho-claro); }
.vivo.off i { background: var(--vermelho); }
@keyframes pulso-verde { 0% { box-shadow: 0 0 0 0 rgba(46, 158, 106, .55); } 70% { box-shadow: 0 0 0 7px rgba(46, 158, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 158, 106, 0); } }
.usuario { position: relative; }
.usuario-botao { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px; border: 1px solid var(--linha); border-radius: 19px; background: #fff; cursor: pointer; font-weight: 500; color: var(--forte); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: Catamaran; font-weight: 700; font-size: 14px; flex: none; }
.usuario-botao .seta { width: 14px; height: 14px; }
.usuario-menu { position: absolute; right: 0; top: 46px; width: 250px; background: #fff; border: 1px solid var(--linha); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 30, 50, .16); padding: 6px; z-index: 50; }
.usuario-menu-cab { padding: 8px 10px 10px; font-weight: 700; color: var(--forte); border-bottom: 1px solid var(--linha-2); margin-bottom: 4px; }
.usuario-menu-cab small { display: block; font-weight: 400; color: var(--suave); }
.usuario-menu button, .usuario-menu a { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--texto); text-decoration: none !important; }
.usuario-menu button:hover, .usuario-menu a:hover { background: var(--linha-2); }
.usuario-menu [data-acao="reset"] { color: var(--azul); font-weight: 500; }
.faixa-emergencia { background: var(--vermelho); color: #fff; padding: 10px 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 500; animation: faixa 1.4s ease-in-out infinite alternate; }
.faixa-emergencia strong { font-family: Catamaran; font-size: 16px; }
.faixa-emergencia .btn { height: 30px; border-color: #fff; color: var(--vermelho); }
@keyframes faixa { from { background: var(--vermelho); } to { background: #b83434; } }
.conteudo { padding: 22px 22px 40px; outline: none; min-width: 0; }
.so-celular { display: none !important; }

/* ── cabeçalho de página ── */
.pag-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pag-cab h1 { font-size: 26px; font-weight: 700; }
.pag-cab p { margin: 2px 0 0; color: var(--suave); }
.pag-cab .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.migalha { font-size: 12.5px; color: var(--suave); margin-bottom: 4px; }
.migalha a { color: var(--suave); }

/* ── cartões e grades ── */
.cartao { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra); min-width: 0; }
.cartao-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--linha-2); flex-wrap: wrap; }
.cartao-cab h2, .cartao-cab h3 { font-size: 16.5px; font-weight: 700; }
.cartao-cab small { color: var(--suave); }
.cartao-corpo { padding: 14px 16px; }
.cartao-corpo.sem-pad { padding: 0; }
.grade { display: grid; gap: 16px; }
.g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.g-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.pilha { display: grid; gap: 16px; align-content: start; min-width: 0; }
.mb { margin-bottom: 16px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; box-shadow: var(--sombra); position: relative; overflow: hidden; min-width: 0; text-decoration: none !important; color: inherit; display: block; }
a.kpi:hover { border-color: #c9d6e6; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--azul); }
.kpi.vermelho::before { background: var(--vermelho); }
.kpi.verde::before { background: var(--verde); }
.kpi.amarelo::before { background: var(--amarelo); }
.kpi.cinza::before { background: var(--cinza); }
.kpi-rot { font-size: 11.5px; font-weight: 500; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; line-height: 1.25; min-height: 2.5em; display: flex; align-items: flex-end; }
.kpi-val { font-family: Catamaran; font-size: 28px; font-weight: 800; color: var(--forte); line-height: 1.15; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val.menor { font-size: 22px; }
.kpi-sub { font-size: 12.5px; color: var(--suave); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kpi.vermelho.ativo { background: var(--vermelho-claro); border-color: #efc4c4; }
.kpi.vermelho.ativo .kpi-val { color: var(--vermelho); }

/* etiquetas */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--cinza-claro); color: #59606d; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.sem-ponto::before { display: none; }
.st-aberto { background: var(--amarelo-claro); color: #9a6a12; }
.st-atribuido { background: #ebf0fd; color: #3f62c9; }
.st-aceito { background: var(--azul-claro); color: var(--azul); }
.st-a-caminho { background: #e3f4f6; color: #0b7a8a; }
.st-em-atendimento { background: #e8eaf0; color: var(--navy); }
.st-concluido, .st-concluida, .st-paga, .st-ok, .st-livre, .st-ativo, .st-feita { background: var(--verde-claro); color: #1f7a50; }
.st-cancelado, .st-folga, .st-encerrado { background: var(--cinza-claro); color: #6a7280; }
.st-aberta, .st-agendada { background: var(--azul-claro); color: var(--azul); }
.st-vencida, .st-parado, .st-emergencia { background: var(--vermelho-claro); color: var(--vermelho); }
.st-renovar, .st-alta, .st-baixo { background: var(--amarelo-claro); color: #9a6a12; }
.st-normal { background: var(--cinza-claro); color: #6a7280; }
.st-tec-em-atendimento { background: var(--azul-claro); color: var(--azul); }
.pill.emergencia-forte { background: var(--vermelho); color: #fff; }

/* tabelas */
.tabela-rolagem { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); padding: 10px 14px; border-bottom: 1px solid var(--linha); background: #fafbfc; white-space: nowrap; }
.tabela td { padding: 10px 14px; border-bottom: 1px solid var(--linha-2); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr.clicavel { cursor: pointer; }
.tabela tbody tr.clicavel:hover td { background: #f7f9fc; }
.tabela tr.linha-emergencia td { background: #fff6f6; }
.tabela tr.linha-emergencia td:first-child { box-shadow: inset 3px 0 0 var(--vermelho); }
.tabela .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela .forte { color: var(--forte); font-weight: 500; }
.tabela small { color: var(--suave); display: block; }
.tabela .nw { white-space: nowrap; }
.vazio { padding: 28px 16px; text-align: center; color: var(--suave); }

/* abas / segmentos */
.segmento { display: inline-flex; background: var(--cinza-claro); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmento button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--suave); white-space: nowrap; }
.segmento button.ativo { background: #fff; color: var(--forte); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.barra-ferr { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.barra-ferr .espaco { flex: 1; }

/* fila de chamados */
.fila-item { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--linha-2); cursor: pointer; text-decoration: none !important; color: inherit; }
.fila-item:last-child { border-bottom: 0; }
.fila-item:hover { background: #f7f9fc; }
.fila-item.emergencia { background: #fff4f4; box-shadow: inset 3px 0 0 var(--vermelho); }
.fila-num { font-family: Catamaran; font-weight: 800; color: var(--forte); font-size: 16px; min-width: 50px; }
.fila-meio { flex: 1; min-width: 0; }
.fila-meio strong { color: var(--forte); font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-meio > span { font-size: 12.5px; color: var(--suave); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fila-dir { text-align: right; display: grid; gap: 4px; justify-items: end; flex: none; }
.fila-dir small { color: var(--suave); font-size: 12px; }

/* técnicos */
.tec-linha { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--linha-2); }
.tec-linha:last-child { border-bottom: 0; }
.tec-av { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-family: Catamaran; font-weight: 700; font-size: 15px; flex: none; position: relative; }
.tec-av i { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: var(--cinza); }
.tec-av i.livre { background: var(--verde); }
.tec-av i.em-atendimento { background: var(--azul); }
.tec-meio { flex: 1; min-width: 0; }
.tec-meio strong { color: var(--forte); font-weight: 500; display: block; }
.tec-meio > span { font-size: 12.5px; color: var(--suave); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.passos { display: flex; gap: 3px; margin-top: 6px; }
.passos b { flex: 1; height: 4px; border-radius: 2px; background: var(--linha); }
.passos b.feito { background: var(--azul); }
.passos b.feito.ult { background: var(--verde); }

.tec-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tec-cartao .cartao-corpo { display: grid; gap: 12px; }
.tec-cartao-topo { display: flex; gap: 12px; align-items: center; }
.tec-cartao-topo .tec-av { width: 48px; height: 48px; font-size: 18px; }
.dados { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.dados dt { color: var(--suave); white-space: nowrap; }
.dados dd { margin: 0; color: var(--forte); min-width: 0; overflow-wrap: anywhere; }
.pin { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .2em; background: var(--fundo); border: 1px dashed #c8d0dc; border-radius: 6px; padding: 1px 8px; color: var(--navy); }

/* agenda */
.agenda-item { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--linha-2); align-items: flex-start; cursor: pointer; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item:hover { background: #f7f9fc; }
.agenda-hora { font-family: Catamaran; font-weight: 700; color: var(--forte); width: 46px; flex: none; font-size: 15px; }
.agenda-item.feita .agenda-hora { color: var(--verde); }
.agenda-item.atrasada .agenda-hora { color: var(--vermelho); }
.agenda-txt { flex: 1; min-width: 0; }
.agenda-txt strong { display: block; color: var(--forte); font-weight: 500; }
.agenda-txt > span { color: var(--suave); font-size: 12.5px; }
.alerta-linha { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--linha-2); }
.alerta-linha:last-child { border-bottom: 0; }
.alerta-linha .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.alerta-linha .ico.v { background: var(--vermelho-claro); color: var(--vermelho); }
.alerta-linha .ico.a { background: var(--amarelo-claro); color: #9a6a12; }
.alerta-linha .ico svg { width: 16px; height: 16px; }
.alerta-linha div { flex: 1; min-width: 0; }
.alerta-linha strong { display: block; color: var(--forte); font-weight: 500; }
.alerta-linha div > span { font-size: 12.5px; color: var(--suave); }

/* quadro (kanban) */
.quadro { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; -webkit-overflow-scrolling: touch; }
.coluna { background: #eaedf2; border-radius: var(--raio); padding: 10px; min-height: 120px; }
.coluna-cab { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.coluna-cab h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.coluna-cab h3 i { width: 8px; height: 8px; border-radius: 50%; }
.coluna-cab span { font-size: 12px; font-weight: 700; color: var(--suave); background: #fff; border-radius: 10px; padding: 1px 8px; }
.coluna-lista { display: grid; gap: 8px; }
.ch-cartao { background: #fff; border: 1px solid var(--linha); border-radius: 9px; padding: 10px 12px; cursor: pointer; display: block; color: inherit; text-decoration: none !important; box-shadow: 0 1px 2px rgba(20, 30, 50, .05); transition: box-shadow .15s, transform .15s; }
.ch-cartao:hover { box-shadow: 0 4px 12px rgba(20, 30, 50, .1); }
.ch-cartao-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ch-cartao-topo b { font-family: Catamaran; font-size: 15px; color: var(--forte); }
.ch-cartao strong { display: block; color: var(--forte); font-weight: 500; font-size: 13.5px; }
.ch-cartao > span { display: block; font-size: 12.5px; color: var(--suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-cartao-rodape { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--suave); gap: 6px; }
.ch-cartao-rodape .quem { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-av { width: 20px; height: 20px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.ch-cartao.emergencia { border-color: #f0b4b4; background: #fff6f6; box-shadow: inset 3px 0 0 var(--vermelho); }
.ch-cartao.emergencia.pendente { animation: piscar 1.2s ease-in-out infinite; }
@keyframes piscar { 0%, 100% { box-shadow: inset 3px 0 0 var(--vermelho), 0 0 0 0 rgba(214, 69, 69, .0); } 50% { box-shadow: inset 3px 0 0 var(--vermelho), 0 0 0 4px rgba(214, 69, 69, .25); } }
.novo { animation: chegou 1.2s ease-out 3; }
.novo.emergencia { animation: chegou-v 1s ease-out infinite; }
@keyframes chegou { 0% { box-shadow: 0 0 0 0 rgba(1, 112, 185, .5); } 100% { box-shadow: 0 0 0 10px rgba(1, 112, 185, 0); } }
@keyframes chegou-v { 0% { box-shadow: inset 3px 0 0 var(--vermelho), 0 0 0 0 rgba(214, 69, 69, .6); } 100% { box-shadow: inset 3px 0 0 var(--vermelho), 0 0 0 12px rgba(214, 69, 69, 0); } }
.selo-novo { font-size: 10px; font-weight: 700; letter-spacing: .08em; background: var(--azul); color: #fff; border-radius: 4px; padding: 1px 5px; text-transform: uppercase; }
.emergencia .selo-novo { background: var(--vermelho); }

/* ficha */
.ficha-cab { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ficha-cab h1 { font-size: 28px; }
.etapas { display: flex; gap: 0; margin: 4px 0 2px; overflow-x: auto; }
.etapa { flex: 1; min-width: 92px; text-align: center; position: relative; font-size: 12px; color: var(--suave); padding-top: 22px; }
.etapa::before { content: ''; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--linha); z-index: 1; }
.etapa::after { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--linha); }
.etapa:first-child::after { display: none; }
.etapa.feita { color: var(--forte); font-weight: 500; }
.etapa.feita::before { background: var(--azul); border-color: var(--azul); }
.etapa.feita::after { background: var(--azul); }
.etapa.atual::before { box-shadow: 0 0 0 4px var(--azul-claro); }
.etapa.fim.feita::before { background: var(--verde); border-color: var(--verde); }
.linha-tempo { list-style: none; margin: 0; padding: 0; }
.linha-tempo li { position: relative; padding: 0 0 16px 24px; }
.linha-tempo li::before { content: ''; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--azul); }
.linha-tempo li::after { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--linha); }
.linha-tempo li:last-child { padding-bottom: 0; }
.linha-tempo li:last-child::after { display: none; }
.linha-tempo strong { color: var(--forte); font-weight: 500; }
.linha-tempo small { display: block; color: var(--suave); font-size: 12px; }
.bloco-acao { display: grid; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--linha-2); }
.bloco-acao:last-child { border-bottom: 0; }
.bloco-acao h4 { font-size: 14px; }
.linha-form { display: flex; gap: 8px; }
.linha-form > *:first-child { flex: 1; min-width: 0; }
.caixa-desc { background: var(--fundo); border-radius: 8px; padding: 12px 14px; color: var(--forte); white-space: pre-wrap; }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px; background: var(--azul-claro); color: #0b4f80; font-size: 13.5px; }
.aviso.amarelo { background: var(--amarelo-claro); color: #7d560c; }
.aviso.vermelho { background: var(--vermelho-claro); color: #9b2c2c; }
.aviso.verde { background: var(--verde-claro); color: #1f6b47; }
.aviso svg { margin-top: 1px; }

/* formulários */
.campo { display: grid; gap: 5px; min-width: 0; }
.campo label, .rotulo { font-size: 12.5px; font-weight: 500; color: var(--forte); }
.inp, .campo input, .campo select, .campo textarea { width: 100%; height: 38px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 11px; background: #fff; outline: none; min-width: 0; }
.campo textarea, textarea.inp { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; }
.inp:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }
.form-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.form-grade .inteiro { grid-column: 1 / -1; }
.ajuda { font-size: 12px; color: var(--suave); }
.canais { display: flex; gap: 8px; flex-wrap: wrap; }
.canais label { display: flex; align-items: center; gap: 6px; border: 1px solid #d5dbe4; border-radius: 8px; padding: 0 12px; height: 36px; cursor: pointer; font-weight: 500; }
.canais input { accent-color: var(--azul); }
.canais label:has(input:checked) { border-color: var(--azul); background: var(--azul-claro); color: var(--azul); }

/* OS editor */
.itens-os { display: grid; gap: 8px; }
.item-os { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.peca-os { display: grid; grid-template-columns: minmax(0, 1fr) 80px 110px 36px; gap: 8px; align-items: center; }
.peca-os .sub { text-align: right; font-variant-numeric: tabular-nums; color: var(--forte); font-weight: 500; }
.peca-cab { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); }
.totais { display: grid; gap: 8px; }
.totais div { display: flex; justify-content: space-between; gap: 10px; }
.totais .total { border-top: 1px solid var(--linha); padding-top: 10px; font-family: Catamaran; font-size: 22px; font-weight: 800; color: var(--forte); }
.estoque-aviso { font-size: 12px; color: var(--vermelho); grid-column: 1 / -1; margin-top: -4px; }

/* calendário semanal */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.dia { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); min-height: 170px; display: flex; flex-direction: column; min-width: 0; }
.dia-cab { padding: 8px 10px; border-bottom: 1px solid var(--linha-2); display: flex; justify-content: space-between; align-items: baseline; }
.dia-cab b { font-family: Catamaran; font-size: 20px; color: var(--forte); }
.dia-cab span { font-size: 12px; color: var(--suave); text-transform: uppercase; letter-spacing: .05em; }
.dia.hoje { border-color: var(--azul); box-shadow: 0 0 0 1px var(--azul); }
.dia.hoje .dia-cab { background: var(--azul-claro); }
.dia-lista { padding: 6px; display: grid; gap: 6px; align-content: start; }
.prev { border-radius: 7px; padding: 6px 8px; font-size: 12px; background: var(--azul-claro); border-left: 3px solid var(--azul); cursor: pointer; color: var(--forte); text-align: left; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; min-width: 0; overflow: hidden; display: block; }
.prev b { display: block; font-size: 12.5px; }
.prev span { color: var(--suave); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prev.feita { background: var(--verde-claro); border-left-color: var(--verde); }
.prev.atrasada { background: var(--vermelho-claro); border-left-color: var(--vermelho); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--fundo); }
.checklist li.ok { background: var(--verde-claro); color: #1f6b47; }
.checklist li.nok { background: var(--vermelho-claro); color: #9b2c2c; }
.checklist label { display: flex; gap: 10px; align-items: center; cursor: pointer; width: 100%; }
.checklist input { width: 18px; height: 18px; accent-color: var(--verde); }

/* estoque */
.qtd-ctrl { display: inline-flex; align-items: center; border: 1px solid #d5dbe4; border-radius: 8px; overflow: hidden; background: #fff; }
.qtd-ctrl button { width: 30px; height: 30px; border: 0; background: var(--fundo); cursor: pointer; font-size: 16px; font-weight: 700; color: var(--forte); }
.qtd-ctrl button:hover { background: var(--linha); }
.qtd-ctrl input { width: 56px; height: 30px; border: 0; text-align: center; outline: none; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qtd-ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; }
.barra-nivel { height: 5px; border-radius: 3px; background: var(--linha); overflow: hidden; width: 90px; margin-top: 5px; }
.barra-nivel i { display: block; height: 100%; background: var(--verde); }
.barra-nivel i.baixo { background: var(--vermelho); }
.barra-nivel i.limite { background: var(--amarelo); }

/* modal */
.modal-fundo { position: fixed; inset: 0; z-index: 80; background: rgba(20, 27, 38, .5); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); display: flex; flex-direction: column; overflow: hidden; animation: modal-in .18s ease-out; }
.modal.largo { max-width: 720px; }
@keyframes modal-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--linha-2); gap: 10px; }
.modal-cab h2 { font-size: 19px; }
.modal-corpo { padding: 18px 20px; overflow-y: auto; display: grid; gap: 14px; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--linha-2); background: #fafbfc; flex-wrap: wrap; }

/* toasts */
.toasts { position: fixed; z-index: 90; top: calc(var(--tarja) + 70px); right: 18px; display: grid; gap: 10px; width: 360px; max-width: calc(100vw - 32px); }
.toast { background: var(--navy); color: #fff; border-radius: 11px; padding: 12px 14px; box-shadow: 0 14px 36px rgba(0, 0, 0, .25); display: flex; gap: 12px; align-items: flex-start; animation: toast-in .25s ease-out; }
.toast.sai { animation: toast-out .25s ease-in forwards; }
.toast .t-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex: none; }
.toast .t-txt { flex: 1; min-width: 0; }
.toast strong { display: block; font-family: Catamaran; font-size: 15.5px; }
.toast .t-txt > span { font-size: 13px; color: #cfd6e0; display: block; }
.toast .t-acoes { display: flex; gap: 8px; margin-top: 8px; }
.toast .t-acoes .btn { height: 28px; font-size: 12.5px; }
.toast .fechar { background: none; border: 0; color: #9aa6b8; cursor: pointer; padding: 2px; }
.toast.emergencia { background: var(--vermelho); }
.toast.emergencia .t-txt > span { color: #ffe3e3; }
.toast.emergencia .fechar { color: #ffd0d0; }
.toast.sucesso .t-ico { background: var(--verde); }
.toast.erro { background: #8f2a2a; }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateX(30px); opacity: 0; } }

/* documentos (OS e DANFSe) */
.doc-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.doc-barra .espaco { flex: 1; }
.doc-palco { overflow-x: auto; padding-bottom: 10px; }
.folha { width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; box-shadow: 0 4px 24px rgba(20, 30, 50, .14); padding: 14mm 14mm 12mm; color: #222; font-size: 12px; line-height: 1.4; position: relative; overflow: hidden; }
.folha h1, .folha h2, .folha h3 { color: #111; }
.doc-cab { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; border-bottom: 2px solid var(--navy); padding-bottom: 10px; }
.doc-cab img { width: 74px; height: auto; }
.doc-emp strong { font-family: Catamaran; font-size: 17px; color: var(--navy); display: block; }
.doc-emp div { font-size: 11px; color: #555; }
.doc-num { text-align: right; }
.doc-num h1 { font-size: 18px; font-family: Catamaran; letter-spacing: .03em; }
.doc-num b { font-family: Catamaran; font-size: 24px; color: var(--navy); display: block; }
.doc-num small { color: #666; display: block; }
.doc-sec { margin-top: 12px; }
.doc-sec h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--navy); padding: 4px 8px; font-family: Roboto; font-weight: 700; }
.doc-caixa { border: 1px solid #c9ced6; border-top: 0; padding: 8px 10px; }
.doc-campos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.doc-campos .l2 { grid-column: span 2; }
.doc-campos .l4 { grid-column: 1 / -1; }
.doc-campos small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: #777; }
.doc-campos span { color: #111; }
table.doc-tab { width: 100%; border-collapse: collapse; }
.doc-tab th { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; text-align: left; color: #555; border-bottom: 1px solid #c9ced6; padding: 5px 6px; background: #f3f5f8; }
.doc-tab td { padding: 5px 6px; border-bottom: 1px solid #e3e6eb; }
.doc-tab .num { text-align: right; white-space: nowrap; }
.doc-totais { display: grid; grid-template-columns: 1fr 230px; gap: 12px; margin-top: 12px; }
.doc-totais .caixa-tot { border: 1px solid #c9ced6; }
.doc-totais .caixa-tot div { display: flex; justify-content: space-between; padding: 5px 10px; border-bottom: 1px solid #e3e6eb; }
.doc-totais .caixa-tot div:last-child { border-bottom: 0; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; }
.doc-assin { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; }
.doc-assin div { border-top: 1px solid #333; padding-top: 5px; text-align: center; font-size: 11px; color: #444; }
.doc-assin em { display: block; font-family: 'Brush Script MT', cursive; font-size: 22px; color: #1d3f75; font-style: normal; margin-top: -36px; margin-bottom: 8px; min-height: 26px; }
.doc-rodape { position: absolute; left: 14mm; right: 14mm; bottom: 8mm; font-size: 9.5px; color: #888; text-align: center; border-top: 1px solid #e3e6eb; padding-top: 5px; }
.marca-dagua { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.marca-dagua span { transform: rotate(-32deg); font-family: Catamaran; font-weight: 800; font-size: 34px; letter-spacing: .04em; color: rgba(214, 69, 69, .15); white-space: nowrap; border: 4px solid rgba(214, 69, 69, .15); padding: 4px 20px; border-radius: 10px; }
.nfs-faixa { background: var(--vermelho-claro); color: #9b2c2c; border: 1px solid #efc4c4; text-align: center; font-weight: 700; padding: 6px; margin-top: 10px; letter-spacing: .03em; font-size: 11.5px; }
.nfs-valor { font-size: 16px; font-weight: 700; color: #111; }
.nfs-verif { font-family: ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: .06em; }

/* ── telas menores ── */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .g-7-5, .g-8-4, .g3 { grid-template-columns: minmax(0, 1fr); }
  .semana { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --tarja: 22px; }
  .tarja { font-size: 9.5px; letter-spacing: 0; padding: 0 4px; }
  .lateral { transform: translateX(-100%); transition: transform .22s ease; width: 270px; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.menu-aberto .lateral { transform: none; }
  body.menu-aberto .veu { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(20, 27, 38, .45); }
  .principal { margin-left: 0; }
  .so-celular { display: inline-grid !important; }
  .so-pc { display: none; }
  .topo { padding: 0 12px; gap: 8px; height: 56px; }
  .vivo span { display: none; }
  .vivo { padding: 0 9px; }
  .usuario-botao { padding: 0 4px; }
  .conteudo { padding: 16px 16px 40px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .kpis, .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis.k3 { grid-template-columns: minmax(0, 1fr); }
  .kpi-val { font-size: 24px; }
  .semana { grid-template-columns: minmax(0, 1fr); }
  .dia { min-height: 0; }
  .dia-lista:empty::after { content: 'Nada agendado'; color: var(--suave); font-size: 12px; padding: 2px 4px; }
  .form-grade { grid-template-columns: minmax(0, 1fr); }
  .pag-cab h1 { font-size: 22px; }
  .faixa-emergencia { padding: 10px 16px; }
  .toasts { top: auto; bottom: 14px; right: 16px; left: 16px; width: auto; }
  .peca-os { grid-template-columns: minmax(0, 1fr) 70px 36px; }
  .peca-os .sub { grid-column: 1 / 3; text-align: left; font-size: 12.5px; }
  .peca-os .peca-cab:nth-child(3), .peca-os .peca-cab:nth-child(4) { display: none; }
  .modal-fundo { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 16px 16px 0 0; }
  .fila-item { padding: 11px 12px; gap: 10px; }
  .fila-num { min-width: 42px; font-size: 15px; }
  .quadro { grid-auto-columns: minmax(240px, 82vw); }
  .tabela th, .tabela td { padding: 9px 10px; }
  .tec-cartoes { grid-template-columns: minmax(0, 1fr); }
}

/* ── impressão: só a folha ── */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .tarja, .lateral, .veu, .topo, .faixa-emergencia, .doc-barra, .toasts, .modal-fundo, .migalha { display: none !important; }
  .app { padding: 0; display: block; }
  .principal { margin: 0; }
  .conteudo { padding: 0; }
  .doc-palco { overflow: visible; padding: 0; }
  .conteudo > .aviso { display: none !important; }
  .folha { box-shadow: none; margin: 0; width: 210mm; min-height: 296mm; page-break-after: avoid; }
  .folha, .folha * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
