/* Aplik Serviços · estilos */
:root {
  --escuro: #0b1510;
  --escuro2: #12221a;
  --escuro3: #1b3226;
  --verde: #12a150;
  --verde-esc: #0c7f3e;
  --verde-claro: #e7f6ed;
  --texto: #15201a;
  --texto2: #4b5a52;
  --texto3: #7b8a82;
  --borda: #dfe6e2;
  --borda2: #edf1ef;
  --fundo: #f4f7f5;
  --branco: #fff;
  --perigo: #c62828;
  --perigo-claro: #fdecec;
  --alerta: #b45309;
  --alerta-claro: #fff6e5;
  --azul: #1d4ed8;
  --azul-claro: #e8efff;
  --raio: 10px;
  --raio2: 14px;
  --sombra: 0 1px 2px rgba(16, 32, 24, .06), 0 2px 8px rgba(16, 32, 24, .05);
  --sombra2: 0 10px 40px rgba(10, 25, 16, .18);
  --fonte: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --lateral: 240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fonte); font-size: 15px; color: var(--texto); background: var(--fundo); line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.com-modal { overflow: hidden; }
a { color: var(--verde-esc); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
small { color: var(--texto3); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- marca ---------- */
.marca { display: inline-flex; align-items: center; gap: 8px; }
.marca img { height: 30px; width: auto; display: block; }
.marca .marca-txt { display: none; font-size: 19px; letter-spacing: -.01em; color: var(--escuro); }
.marca.sem-img .marca-txt { display: inline; }
.marca.clara .marca-txt { color: #fff; }
.marca .marca-txt b { color: var(--verde); font-weight: 800; }
.marca.clara .marca-txt b { color: #39d47a; }
.marca.sem-img::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #39d47a, var(--verde-esc)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: var(--raio); border: 1px solid transparent; background: var(--verde); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; font-size: 14.5px; }
.btn:hover { background: var(--verde-esc); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .campo input:focus-visible { outline: 3px solid rgba(18, 161, 80, .35); outline-offset: 1px; }
.btn.sec { background: #fff; color: var(--texto); border-color: var(--borda); }
.btn.sec:hover { background: var(--fundo); }
.btn.ghost { background: transparent; color: var(--verde-esc); }
.btn.ghost:hover { background: var(--verde-claro); }
.btn.perigo { background: var(--perigo); }
.btn.perigo:hover { background: #a31f1f; }
.btn.perigo.sec, .btn.sec.perigo-txt { background: #fff; color: var(--perigo); border-color: #f1c4c4; }
.btn.wa { background: #1f9e55; }
.btn.azul { background: var(--azul); }
.btn.peq { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn.grande { min-height: 54px; font-size: 17px; border-radius: 12px; padding: 12px 20px; }
.btn.bloco { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.carregando { position: relative; color: transparent !important; }
.btn.carregando::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: gira .7s linear infinite; }
.btn.sec.carregando::after { border-color: rgba(0,0,0,.15); border-top-color: var(--verde); }
.btn .ic { width: 18px; height: 18px; flex: none; }
.btn-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--texto3); padding: 4px 8px; border-radius: 8px; }
.btn-x:hover { background: var(--fundo); color: var(--texto); }
.link { background: none; border: 0; padding: 0; color: var(--verde-esc); cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acoes.dir { justify-content: flex-end; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- chips de status ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: #eef1f0; color: #3d4a43; line-height: 1.6; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .75; }
.chip.sem-ponto::before { display: none; }
.st-aberta, .st-rascunho, .st-pendente, .st-nova { background: #eef1f4; color: #475569; }
.st-agendada, .st-enviado, .st-fechada { background: #e8efff; color: #1d4ed8; }
.st-a_caminho, .st-visualizado { background: #f2ebff; color: #6d28d9; }
.st-em_execucao, .st-negociando, .st-parcial { background: #fff3dc; color: #b45309; }
.st-pausada, .st-suspenso { background: #fde9d9; color: #c2410c; }
.st-concluida, .st-aprovado, .st-paga, .st-ativo, .st-convertida { background: #e3f6ea; color: #0c7f3e; }
.st-faturada { background: #d9f2ef; color: #0f766e; }
.st-cancelada, .st-perdido, .st-vencida, .st-descartada { background: #fdecec; color: #b91c1c; }
.st-expirado, .st-encerrado { background: #f1f1f1; color: #6b7280; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--fundo); border: 1px solid var(--borda); font-size: 12px; color: var(--texto2); font-weight: 600; }
.tag.urgente { background: #fdecec; border-color: #f5c2c2; color: #b91c1c; }
.tag.alta { background: #fff3dc; border-color: #f5dcaa; color: #b45309; }

/* ---------- login ---------- */
.tela-login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.login-lado { background: radial-gradient(circle at 20% 15%, #1d3a2a 0, transparent 50%), radial-gradient(circle at 90% 90%, #123222 0, transparent 45%), var(--escuro); color: #e9f3ed; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-lado h2 { font-size: 34px; line-height: 1.15; margin: 48px 0 16px; letter-spacing: -.02em; color: #fff; max-width: 460px; }
.login-lado h2 em { font-style: normal; color: #39d47a; }
.login-lado p { color: #b9cdc1; font-size: 16px; max-width: 440px; }
.login-lado ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.login-lado li { display: flex; gap: 10px; align-items: flex-start; color: #d4e4da; }
.login-lado li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #1f6b43 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; margin-top: 1px; }
.login-lado .rod { font-size: 13px; color: #7d978a; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-caixa { width: 100%; max-width: 400px; }
.login-caixa h1 { font-size: 26px; margin: 0 0 6px; }
.login-caixa .sub { color: var(--texto2); margin: 0 0 24px; }
.login-caixa .campo { margin-bottom: 14px; }
.login-caixa .btn.bloco { margin-top: 6px; min-height: 48px; font-size: 16px; }
.login-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.login-movel-marca { display: none; margin-bottom: 26px; }
.sucesso-box { text-align: center; padding: 20px 0; }
.sucesso-box .ok-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--verde-claro); color: var(--verde); display: grid; place-items: center; margin: 0 auto 16px; }

/* ---------- campos ---------- */
.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo[hidden], [hidden] { display: none !important; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--texto2); }
.campo small { font-size: 12px; }
.campo .obr { color: var(--perigo); font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--borda); border-radius: 9px; background: #fff; font-size: 15px; transition: border .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(18, 161, 80, .15); }
input.invalido, select.invalido { border-color: var(--perigo); box-shadow: 0 0 0 3px rgba(198, 40, 40, .12); }
input[readonly] { background: var(--fundo); }
input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid var(--borda); border-radius: 9px; background: #fff; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5a52' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat; padding-right: 34px; }
.pre { display: flex; align-items: stretch; }
.pre span { display: flex; align-items: center; padding: 0 10px; background: var(--fundo); border: 1px solid var(--borda); border-right: 0; border-radius: 9px 0 0 9px; color: var(--texto2); font-size: 14px; }
.pre input { border-radius: 0 9px 9px 0; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 6px 0; flex-wrap: wrap; }
.check input { width: 20px; height: 20px; accent-color: var(--verde); margin: 1px 0 0; flex: none; }
.check span { font-weight: 500; flex: 1; }
.check small { flex-basis: 100%; padding-left: 30px; margin-top: -4px; }
.grade-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 14px; }
.grade-form .c1 { grid-column: span 1; } .grade-form .c2 { grid-column: span 2; } .grade-form .c3 { grid-column: span 3; } .grade-form .c4 { grid-column: span 4; }
.form-sub { margin: 8px 0 -4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto3); grid-column: 1 / -1; }
.alerta { padding: 10px 14px; border-radius: var(--raio); background: var(--alerta-claro); color: #7a3d03; border: 1px solid #f4dcb0; margin-bottom: 14px; font-size: 14px; }
.alerta.erro { background: var(--perigo-claro); color: #8f1c1c; border-color: #f3c5c5; }
.alerta.ok { background: var(--verde-claro); color: #0a5a2c; border-color: #bfe6cf; }
.alerta.info { background: var(--azul-claro); color: #1e3a8a; border-color: #c9d7fb; }

/* ---------- layout do painel ---------- */
.app { display: flex; min-height: 100vh; }
.lateral { width: var(--lateral); flex: none; background: var(--escuro); color: #cfe0d6; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; }
.lateral .topo { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.lateral .topo .emp { margin-top: 10px; font-size: 12.5px; color: #8fa89a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.menu a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #c3d6cb; text-decoration: none; font-size: 14.5px; font-weight: 500; margin-bottom: 1px; position: relative; }
.menu a:hover { background: var(--escuro2); color: #fff; }
.menu a.ativo { background: var(--escuro3); color: #fff; }
.menu a.ativo::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #39d47a; }
.menu a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.menu .badge { margin-left: auto; background: #39d47a; color: #062413; font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 0 7px; line-height: 19px; }
.menu .grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #5f7a6b; padding: 14px 12px 6px; }
.lateral .usuario { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #1f6b43; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.lateral .usuario .nome { font-size: 13.5px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .usuario small { color: #7d978a; display: block; }
.lateral .usuario button { margin-left: auto; background: none; border: 0; color: #8fa89a; cursor: pointer; padding: 6px; border-radius: 8px; }
.lateral .usuario button:hover { background: var(--escuro2); color: #fff; }
.principal { flex: 1; min-width: 0; margin-left: var(--lateral); }
.barra-movel { display: none; }
.conteudo { padding: 26px 30px 60px; max-width: 1400px; }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.cab .tit { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cab .tit p { margin: 0; color: var(--texto2); font-size: 14px; }
.voltar { display: inline-flex; align-items: center; gap: 4px; color: var(--texto2); text-decoration: none; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.voltar:hover { color: var(--verde-esc); }
.trial-aviso { background: #fff7e0; border-bottom: 1px solid #f3dfa5; color: #6b4a00; padding: 8px 30px; font-size: 13.5px; }

/* ---------- cartões ---------- */
.card { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio2); box-shadow: var(--sombra); }
.card > .card-cab { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--borda2); gap: 10px; flex-wrap: wrap; }
.card > .card-cab h3 { font-size: 15px; }
.card > .card-corpo { padding: 16px 18px; }
.card + .card { margin-top: 16px; }
.grade { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio2); padding: 14px 16px; box-shadow: var(--sombra); text-decoration: none; color: inherit; display: block; transition: border .15s, transform .1s; }
a.kpi:hover { border-color: #b8d9c5; transform: translateY(-1px); }
.kpi .rot { font-size: 13px; color: var(--texto2); font-weight: 600; }
.kpi .val { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--texto3); margin-top: 2px; }
.kpi.destaque { background: var(--escuro); border-color: var(--escuro); color: #fff; }
.kpi.destaque .rot, .kpi.destaque .sub { color: #a8c3b3; }
.kpi.alerta-k .val { color: var(--perigo); }
.kpi.verde .val { color: var(--verde-esc); }
.secao-tit { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texto3); margin: 26px 0 10px; font-weight: 700; }

/* ---------- tabela ---------- */
.tab-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--borda); white-space: nowrap; background: #fbfcfb; }
.tab td { padding: 11px 12px; border-bottom: 1px solid var(--borda2); vertical-align: middle; }
.tab tr:last-child td { border-bottom: 0; }
.tab.clic tbody tr { cursor: pointer; }
.tab.clic tbody tr:hover td { background: #f7faf8; }
.tab .num, .tab th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab .sel { width: 36px; }
.tab .sel input { width: 18px; height: 18px; accent-color: var(--verde); }
.tab .peq { font-size: 12.5px; color: var(--texto3); }
.tab td .sub { display: block; font-size: 12.5px; color: var(--texto3); }
.tab tr.baixo td { background: #fff7f5; }
.vazio { text-align: center; padding: 40px 20px; color: var(--texto2); }
.vazio b { display: block; color: var(--texto); font-size: 16px; margin-bottom: 4px; }
.vazio .btn { margin-top: 14px; }
.vazio svg { width: 44px; height: 44px; color: #b9c9c0; margin-bottom: 8px; }
.erro-box b { color: var(--perigo); }
.carregando-box { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--texto2); }
.spin { width: 20px; height: 20px; border: 2.5px solid #d6e4dc; border-top-color: var(--verde); border-radius: 50%; animation: gira .7s linear infinite; display: inline-block; }
.paginas { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--borda2); font-size: 13.5px; color: var(--texto2); gap: 10px; flex-wrap: wrap; }

/* ---------- filtros ---------- */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 16px; border-bottom: 1px solid var(--borda2); }
.filtros .campo { min-width: 140px; flex: 0 1 auto; }
.filtros .campo.grow { flex: 1 1 220px; }
.filtros input, .filtros select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.busca-in { position: relative; }
.busca-in input { padding-left: 36px; }
.busca-in::before { content: ""; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8a82' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center/contain no-repeat; z-index: 1; }
.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--borda); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--texto2); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 14.5px; }
.abas button:hover { color: var(--texto); }
.abas button.ativo { color: var(--verde-esc); border-bottom-color: var(--verde); }
.abas button .n { background: var(--fundo); border-radius: 99px; padding: 0 7px; font-size: 12px; margin-left: 4px; color: var(--texto2); }
.seg { display: inline-flex; background: #e9efeb; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--texto2); cursor: pointer; }
.seg button.ativo { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- autocomplete ---------- */
.busca-lista { display: none; position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid var(--borda); border-radius: 10px; box-shadow: var(--sombra2); z-index: 80; max-height: 300px; overflow-y: auto; padding: 4px; }
.busca-lista button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.busca-lista button:hover, .busca-lista button.ativo { background: var(--verde-claro); }
.busca-lista button small { display: block; }
.busca-lista button.novo { color: var(--verde-esc); font-weight: 600; border-top: 1px solid var(--borda2); border-radius: 0 0 7px 7px; }
.busca-lista .nada { padding: 10px; color: var(--texto3); font-size: 14px; }

/* ---------- modal ---------- */
.modal-ov { position: fixed; inset: 0; background: rgba(8, 20, 13, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px 16px; overflow-y: auto; animation: aparece .15s ease; }
.modal-ov.sai { opacity: 0; transition: opacity .15s; }
@keyframes aparece { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; box-shadow: var(--sombra2); display: flex; flex-direction: column; animation: sobe .18s ease; margin-bottom: 5vh; }
.modal.largo { max-width: 860px; }
.modal.cheio { max-width: 1100px; }
@keyframes sobe { from { transform: translateY(10px); opacity: 0; } }
.modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; gap: 10px; }
.modal-corpo { padding: 6px 20px 18px; }
.modal-pe { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--borda2); flex-wrap: wrap; background: #fbfcfb; border-radius: 0 0 16px 16px; }
.modal-pe .esq { margin-right: auto; }
.conf-msg { font-size: 15.5px; margin: 4px 0 8px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 460px; }
.toast { background: var(--escuro); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--sombra2); font-weight: 500; animation: sobe .2s ease; display: flex; align-items: center; gap: 10px; pointer-events: auto; max-width: 100%; }
.toast.ok::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: #39d47a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23062413' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat; }
.toast.erro { background: #8f1c1c; }
.toast.aviso { background: #7a4a00; }
.toast.sai { opacity: 0; transform: translateY(6px); transition: all .3s; }

/* ---------- listas simples ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista > li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--borda2); }
.lista > li:last-child { border-bottom: 0; }
.lista > li.clic { cursor: pointer; }
.lista > li.clic:hover { background: #f7faf8; }
.lista .hora { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 46px; color: var(--texto); }
.lista .info { flex: 1; min-width: 0; }
.lista .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista .info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--texto3); font-weight: 600; font-size: 13px; padding-top: 1px; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- gráfico de barras ---------- */
.barras { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding: 10px 4px 0; }
.barras .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.barras .col { width: 100%; max-width: 54px; background: linear-gradient(180deg, #2fbf6b, var(--verde-esc)); border-radius: 7px 7px 3px 3px; min-height: 3px; position: relative; }
.barras .col:hover { filter: brightness(1.08); }
.barras .v { font-size: 11.5px; color: var(--texto2); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.barras .m { font-size: 12px; color: var(--texto3); text-transform: capitalize; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 8px 10px; align-items: center; font-size: 13.5px; }
.hbar .t { height: 10px; background: var(--fundo); border-radius: 99px; overflow: hidden; }
.hbar .t i { display: block; height: 100%; background: var(--verde); border-radius: 99px; }

/* ---------- OS detalhe ---------- */
.os-topo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.os-num { font-size: 13px; font-weight: 700; color: var(--texto3); }
.linha-tempo { list-style: none; margin: 0; padding: 0 0 0 4px; }
.linha-tempo li { position: relative; padding: 0 0 14px 22px; font-size: 14px; }
.linha-tempo li::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 3px var(--verde-claro); }
.linha-tempo li::after { content: ""; position: absolute; left: 4.5px; top: 18px; bottom: 0; width: 1px; background: var(--borda); }
.linha-tempo li:last-child::after { display: none; }
.linha-tempo small { display: block; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.galeria figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--fundo); aspect-ratio: 1; border: 1px solid var(--borda); }
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.galeria figcaption { position: absolute; left: 6px; bottom: 6px; background: rgba(8,20,13,.72); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.galeria .del { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
.galeria .pend { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.55); font-size: 11px; font-weight: 700; color: #7a4a00; text-align: center; padding: 4px; }
.ass-img { max-width: 280px; border: 1px solid var(--borda); border-radius: 10px; background: #fff; padding: 6px; display: block; }
.itens-ed { width: 100%; border-collapse: collapse; }
.itens-ed th { font-size: 12px; text-transform: uppercase; color: var(--texto3); text-align: left; padding: 6px 6px; font-weight: 700; }
.itens-ed td { padding: 4px 4px; vertical-align: top; }
.itens-ed input, .itens-ed select { min-height: 38px; padding: 6px 9px; font-size: 14px; }
.itens-ed .q { width: 80px; } .itens-ed .p { width: 130px; } .itens-ed .tt { width: 120px; text-align: right; padding-top: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.itens-ed .rm { width: 40px; }
.totais { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-top: 12px; font-size: 14.5px; }
.totais .total { font-size: 20px; font-weight: 800; }
.multi { display: flex; flex-wrap: wrap; gap: 8px; }
.multi label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--borda); padding: 7px 12px; border-radius: 99px; cursor: pointer; font-size: 14px; background: #fff; user-select: none; }
.multi label:has(input:checked) { border-color: var(--verde); background: var(--verde-claro); color: var(--verde-esc); font-weight: 600; }
.multi input { accent-color: var(--verde); width: 16px; height: 16px; margin: 0; }
.multi .bolinha { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.kcol { background: #eaf0ec; border-radius: 12px; padding: 10px; min-height: 200px; }
.kcol h4 { font-size: 13px; display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; }
.kcard { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--sombra); cursor: pointer; border: 1px solid transparent; font-size: 13.5px; }
.kcard:hover { border-color: #b8d9c5; }
.kcard b { display: block; }
.kcard .meta { display: flex; justify-content: space-between; color: var(--texto3); font-size: 12.5px; margin-top: 4px; gap: 6px; }

/* ---------- agenda ---------- */
.ag-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ag-barra .data-tit { font-weight: 700; font-size: 16px; min-width: 200px; text-transform: capitalize; }
.ag-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.ag-grade { display: grid; position: relative; background: #fff; border: 1px solid var(--borda); border-radius: var(--raio2); overflow: auto; max-height: calc(100vh - 210px); }
.ag-grade .hcol { position: sticky; left: 0; background: #fbfcfb; z-index: 3; border-right: 1px solid var(--borda); }
.ag-grade .hcab { position: sticky; top: 0; z-index: 4; background: #fbfcfb; border-bottom: 1px solid var(--borda); padding: 8px 10px; font-weight: 700; font-size: 13.5px; height: 44px; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-grade .hcab .bolinha { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ag-grade .hora-l { height: 60px; font-size: 11.5px; color: var(--texto3); text-align: right; padding: 2px 8px 0 0; border-bottom: 1px solid var(--borda2); }
.ag-col { position: relative; border-right: 1px solid var(--borda2); min-width: 170px; }
.ag-col .slot { height: 30px; border-bottom: 1px dashed #eef2ef; }
.ag-col .slot:nth-child(2n) { border-bottom: 1px solid var(--borda2); }
.ag-col .slot.sobre { background: var(--verde-claro); }
.ag-ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 4px 8px; font-size: 12.5px; overflow: hidden; cursor: grab; color: #102018; background: #e8efff; border-left: 4px solid var(--azul); box-shadow: 0 1px 3px rgba(0,0,0,.08); z-index: 2; line-height: 1.3; }
.ag-ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev:hover { z-index: 5; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.ag-ev.arrastando { opacity: .5; }
.ag-bloq { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #f3f4f4, #f3f4f4 6px, #e9ebea 6px, #e9ebea 12px); font-size: 11.5px; color: var(--texto2); padding: 4px 6px; z-index: 1; font-weight: 600; }
.ag-agora { position: absolute; left: 0; right: 0; height: 2px; background: #e11d48; z-index: 6; pointer-events: none; }
.fila { max-height: calc(100vh - 210px); overflow-y: auto; }
.fila .fitem { padding: 10px 12px; border-bottom: 1px solid var(--borda2); cursor: grab; font-size: 13.5px; background: #fff; }
.fila .fitem:hover { background: #f7faf8; }
.fila .fitem b { display: block; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.semana .dia { background: #fff; border: 1px solid var(--borda); border-radius: 12px; min-height: 260px; padding: 8px; }
.semana .dia.hoje { border-color: var(--verde); box-shadow: 0 0 0 2px var(--verde-claro); }
.semana .dia h4 { font-size: 13px; margin: 2px 2px 8px; text-transform: capitalize; display: flex; justify-content: space-between; }
.semana .sev { border-radius: 8px; padding: 6px 8px; font-size: 12.5px; margin-bottom: 6px; cursor: pointer; background: #f4f7f5; border-left: 4px solid var(--azul); }
.semana .sev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mapa { height: calc(100vh - 230px); min-height: 400px; border-radius: var(--raio2); border: 1px solid var(--borda); background: #e9efeb; }
.mapa-falha { display: grid; place-items: center; height: 100%; text-align: center; padding: 20px; color: var(--texto2); }
.pino { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 11px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pino span { transform: rotate(45deg); }
.pino-tec { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }

/* ---------- orçamento editor ---------- */
.opc-bloco { border: 1px solid var(--borda); border-radius: 12px; margin-bottom: 14px; }
.opc-bloco > .ob-cab { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #fbfcfb; border-bottom: 1px solid var(--borda2); border-radius: 12px 12px 0 0; gap: 10px; flex-wrap: wrap; }
.opc-bloco > .ob-corpo { padding: 10px; }
.funil { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.funil button { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 12px; text-align: left; cursor: pointer; }
.funil button.ativo { border-color: var(--verde); box-shadow: 0 0 0 2px var(--verde-claro); }
.funil .n { font-size: 22px; font-weight: 750; display: block; }
.funil small { display: block; }

/* ---------- etiquetas QR ---------- */
.etiquetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.etq { border: 1.5px dashed #9fb3a8; border-radius: 12px; padding: 12px; text-align: center; background: #fff; break-inside: avoid; }
.etq svg { width: 140px; height: 140px; display: block; margin: 0 auto 6px; }
.etq b { display: block; font-size: 13px; }
.etq small { display: block; font-size: 11px; color: #333; }
.qr-falha { width: 140px; height: 140px; margin: 0 auto 6px; display: grid; place-items: center; border: 1px solid #ccc; font-size: 11px; color: #555; word-break: break-all; padding: 6px; }

/* ---------- impressão ---------- */
.so-impr { display: none; }
@media print {
  body { background: #fff; font-size: 12.5px; }
  .lateral, .barra-movel, .nao-impr, .cab .acoes, #toasts, .trial-aviso, .menu-movel { display: none !important; }
  .principal { margin: 0 !important; }
  .conteudo { padding: 0 !important; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .so-impr { display: block; }
  a { color: inherit; text-decoration: none; }
  .modal-ov { position: static; background: none; padding: 0; }
}

/* ---------- utilidades ---------- */
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 16px; } .p0 { padding: 0 !important; }
.dir { text-align: right; } .centro { text-align: center; }
.muted { color: var(--texto3); } .forte { font-weight: 700; } .verde-t { color: var(--verde-esc); } .vermelho { color: var(--perigo); }
.nowrap { white-space: nowrap; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .flex1 { flex: 1; min-width: 0; } .entre { justify-content: space-between; }
.pendente-envio { display: inline-flex; align-items: center; gap: 6px; background: #fff3dc; color: #7a4a00; border-radius: 99px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; }
.ic { width: 18px; height: 18px; vertical-align: middle; }

/* ---------- celular (painel) ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .ag-layout { grid-template-columns: minmax(0, 1fr); }
  .fila { max-height: 320px; }
}
@media (max-width: 860px) {
  .tela-login { grid-template-columns: 1fr; }
  .login-lado { display: none; }
  .login-movel-marca { display: block; }
  .lateral { transform: translateX(-100%); transition: transform .22s ease; width: 280px; box-shadow: var(--sombra2); }
  body.menu-aberto .lateral { transform: none; }
  body.menu-aberto::after { content: ""; position: fixed; inset: 0; background: rgba(8,20,13,.45); z-index: 35; }
  .principal { margin-left: 0; }
  .barra-movel { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--escuro); color: #fff; padding: 8px 12px; min-height: 56px; }
  .barra-movel .hamb { background: none; border: 0; color: #fff; padding: 8px; border-radius: 8px; cursor: pointer; }
  .barra-movel .marca img { height: 26px; }
  .barra-movel .marca-txt { font-size: 17px; }
  .conteudo { padding: 16px 14px 90px; }
  .trial-aviso { padding: 8px 14px; }
  .cab { margin-bottom: 14px; }
  .cab .acoes { width: 100%; }
  .cab .acoes .btn { flex: 1 1 auto; }
  h1 { font-size: 20px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .val { font-size: 21px; }
  .grade-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grade-form .c3, .grade-form .c4 { grid-column: 1 / -1; }
  .grade-form .c2 { grid-column: span 2; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .modal-ov { padding: 0; align-items: flex-end; }
  .modal, .modal.largo, .modal.cheio { max-width: none; border-radius: 18px 18px 0 0; margin: 0; max-height: 94vh; }
  .modal-corpo { overflow-y: auto; }
  .modal-pe { border-radius: 0; position: sticky; bottom: 0; }
  .modal-pe .btn { flex: 1 1 auto; }
  .modal-pe .esq { flex: 0 0 auto; }
  .funil { grid-template-columns: repeat(3, 1fr); }
  .filtros .campo { flex: 1 1 140px; }
  /* tabela vira cartões */
  .tab.cards thead { display: none; }
  .tab.cards, .tab.cards tbody, .tab.cards tr, .tab.cards td { display: block; width: 100%; }
  .tab.cards tr { padding: 10px 14px; border-bottom: 1px solid var(--borda2); }
  .tab.cards td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tab.cards td::before { content: attr(data-t); color: var(--texto3); font-size: 12.5px; font-weight: 600; text-align: left; flex: none; }
  .tab.cards td.sel::before, .tab.cards td.acao-td::before { content: ""; }
  .tab.cards td:first-child { font-weight: 700; }
  .tab.cards td.sel { justify-content: flex-start; }
  .itens-ed thead { display: none; }
  .itens-ed, .itens-ed tbody, .itens-ed tr { display: block; }
  .itens-ed tr { display: grid; grid-template-columns: 1fr 1fr 1fr 40px; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--borda2); }
  .itens-ed td { padding: 0; }
  .itens-ed td.d { grid-column: 1 / -1; }
  .itens-ed .q, .itens-ed .p, .itens-ed .tt { width: auto; }
  .itens-ed .tt { padding-top: 10px; }
  #mapa { height: 60vh; }
}
