:root {
  --bg: #eef0f2;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --line: #dee2e6;
  --text: #212529;
  --muted: #6c757d;
  --accent: #b02a37;
  --accent-hover: #842029;
  --accent-ink: #ffffff;
  --accent-soft: #f8d7da;
  --accent-text: var(--accent);
  --danger: #c0392b;
  --danger-soft: #fdecea;
  --warn: #9a6100;
  --warn-soft: #fdf3dc;
  --ok: #1f7a3d;
  --ok-soft: #e5f4ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(33, 37, 41, .06), 0 2px 8px rgba(33, 37, 41, .04);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Tema escuro: ativado por data-theme="dark" no <html> (o script escolhe: claro, escuro ou automático) */
html[data-theme="dark"] {
  /* Fundo #0B2A58 (azul da marca) e variações dele; o destaque continua #b02a37 (--accent-text é o tom claro, para texto e links) */
  --bg: #0B2A58; --surface: #0F3369; --surface-2: #143C77; --line: #25508F;
  --text: #E8EEF8; --muted: #9FB3D1; --accent: #b02a37; --accent-hover: #c73a48; --accent-ink: #ffffff; --accent-soft: #3c305b; --accent-text: #ff8f9a;
  --danger: #ff8a80; --danger-soft: #432545; --warn: #e8b04b; --warn-soft: #3a3520; --ok: #5fc983; --ok-soft: #12404a;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 620; }
h3 { font-size: .95rem; font-weight: 620; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.boot { padding: 3rem; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

/* Layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; min-height: 100dvh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 4px 10px 18px; font-size: 1.05rem; }
.brand .logo { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); flex: none; }
.brand { min-width: 0; }
/* Com logo da empresa: logo em cima e o nome embaixo (logos costumam ser largos) */
.brand.has-img { flex-direction: column; align-items: center; gap: 8px; }
.side .brand { justify-content: center; text-align: center; }
.brand-img { max-width: 100%; max-height: 52px; object-fit: contain; border-radius: 6px; flex: none; }
.side .brand-img { max-height: 34px; }
.brand-dark { display: none; }
[data-theme=dark] .brand-light { display: none; }
[data-theme=dark] .brand-dark { display: inline; }
.brand.has-img .brand-name { color: var(--muted); font-weight: 600; }
.lg-logo-img { height: 42px; width: auto; display: block; }
.brand.has-img .brand-name { font-size: .92rem; }
.brand-name { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; overflow-wrap: anywhere; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: .85rem; }
.side .foot a { color: var(--muted); }
.shell > div { min-width: 0; }
.main { padding: 26px 30px 60px; min-width: 0; max-width: 1240px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: -4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .kpi .value { font-size: 1.2rem; }
  /* Altura pela tela visível (sem a barra do navegador), para o rodapé do menu não ficar escondido */
  .side { position: fixed; inset: 0 30% 0 0; height: auto; max-height: 100dvh; padding-bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 290px; z-index: 50; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .shell.menu-open .side { transform: none; }
  .shell.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar .title { font-weight: 650; flex: 1; }
  .main { padding: 16px 14px 80px; }
}

/* Cards and KPIs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.sale-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.grid.report-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .grid.two, .grid.three, .grid.sale-grid, .grid.report-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 861px) { .shell { background: linear-gradient(to right, var(--surface) 231px, var(--line) 231px, var(--line) 232px, var(--bg) 232px); } }
@media print { .side, .topbar, .page-head .actions, .filters, #toasts { display: none !important; } .shell { display: block; background: none; } .main { padding: 0; } .card, .kpi { box-shadow: none; break-inside: avoid; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: .82rem; font-weight: 500; }
.kpi .value { font-size: 1.4rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-top: 2px; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi.pos .value { color: var(--ok); }
.kpi.neg .value { color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
tfoot td { font-weight: 650; border-top: 1px solid var(--line); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* Badges */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.qty-pos { color: var(--ok); }
.qty-neg { color: var(--danger); }

/* Forms */
.form { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; }
.form legend { font-weight: 620; padding: 0 6px; }
label { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 5px; font-size: .86rem; font-weight: 550; color: var(--text); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
/* Seta das listas desenhada pelo sistema: igual no tema claro e no escuro, com o mesmo respiro dos campos com sugestões */
select:not([multiple]):not([size]) { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }
select option { background: var(--surface); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 70px; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.row label.small { max-width: 120px; }
.help { font-size: .8rem; color: var(--muted); font-weight: 400; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > * { width: auto; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label { min-width: 140px; }
.filters .grow { flex: 1; min-width: 200px; }

/* Buttons */
.btn { font: inherit; font-weight: 580; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 15px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: .82rem; }
.btn.lg { padding: 12px 20px; font-size: 1rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { background: none; border: 0; padding: 6px; cursor: pointer; color: inherit; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .86rem; font-weight: 550; border: 0; background: var(--surface); padding: 7px 13px; cursor: pointer; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-soft); color: var(--accent-text); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pay-grid button { font: inherit; padding: 12px 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; font-weight: 550; color: var(--text); }
.pay-grid button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; font-size: .9rem; background: var(--surface-2); border: 1px solid var(--line); }
.alert.err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* Combobox */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; }
.combo-list div { padding: 9px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.combo-list div:hover, .combo-list div.hl { background: var(--accent-soft); }
.combo-list .meta { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* Modal */
.modal-bg { grid-template-columns: minmax(0, 1fr); position: fixed; inset: 0; background: rgba(20, 20, 24, .5); z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; min-width: 0; justify-self: center; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* Toasts */
#toasts { position: fixed; pointer-events: none; bottom: 18px; right: 18px; z-index: 200; display: grid; gap: 8px; max-width: calc(100vw - 36px); }
.toast { background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 9px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: .9rem; animation: up .2s; max-width: 420px; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* Auth */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 560px; }
.auth-card .brand { padding: 0 0 18px; }
pre.code { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; font-size: .8rem; }

/* Chart */
.chart { width: 100%; height: 200px; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar2 { fill: var(--ok); opacity: .55; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* Specific */
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 34px 20px; text-align: center; cursor: pointer; transition: .15s; background: var(--surface-2); }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.video-box { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; max-width: 420px; margin: 0 auto; }
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.video-box .frame { position: absolute; inset: 15%; border: 3px solid rgba(255,255,255,.85); border-radius: 12px; }
.inv-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; display: grid; gap: 10px; background: var(--surface); }
.inv-item.off { opacity: .55; }
.inv-item .top { display: flex; gap: 10px; align-items: flex-start; }
.inv-item .top .desc { flex: 1; min-width: 0; }
.inv-item .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inv-item .result { font-size: .85rem; background: var(--surface-2); padding: 8px 10px; border-radius: 6px; }
@media (max-width: 640px) { .inv-item .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cart-total { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.cart-total div { display: flex; justify-content: space-between; }
.cart-total .big { font-size: 1.5rem; font-weight: 700; }
.qty-input { width: 90px; }
.price-input { width: 110px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; font-weight: 550; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .88rem; color: var(--muted); gap: 10px; }
.stock-low { color: var(--danger); font-weight: 650; }

/* Janela "Incluir produto" na venda */
.pb-search { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 500; color: var(--muted); }
.pb-search input { flex: 1; max-width: 360px; }
.pb-wrap { max-height: min(52vh, 520px); overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pb-table thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pb-table td, .pb-table th { padding-top: 9px; padding-bottom: 9px; }
.pb-chk { width: 36px; text-align: center; }
.pb-name { font-weight: 550; color: var(--accent-text); }
.pb-sort { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; font-weight: inherit; }
.pb-sort span { font-size: .7rem; margin-left: 3px; }
.pb-table tr.pb-sel td { background: var(--accent-soft); }
.pb-table tr.pb-off td { opacity: .5; }
.modal .pager { flex-wrap: wrap; }
.modal .pager .actions { gap: 4px; }
@media (max-width: 640px) {
  .modal-bg { padding: 0; place-items: stretch; }
  .modal { max-width: none; max-height: 100vh; max-height: 100dvh; height: 100%; border-radius: 0; }
  .pb-wrap { max-height: none; flex: 1; }
  .pb-search input { max-width: none; }
  .pb-table .small.muted { display: none; }
  .pb-table th, .pb-table td { padding-left: 6px; padding-right: 6px; }
  .pb-table th { font-size: .7rem; }
  .modal-foot .btn { flex: 1; padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 640px) { .hide-m { display: none; } }
@media (max-width: 640px) { #toasts { top: 12px; bottom: auto; left: 12px; right: 12px; } .toast { max-width: none; } }
input[readonly] { background: var(--surface-2); color: var(--muted); cursor: default; }

/* Clientes */
.cust-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 10px; }
.cust-name { font-weight: 650; }
.show-m { display: none; }
@media (max-width: 640px) { .show-m { display: inline; } }
.sale-pay { align-self: start; }
@media (max-width: 640px) { .qty-input { width: 62px; } .price-input { width: 78px; } .card-head .actions .btn { flex: 1; } .card-head .actions { width: 100%; } }

/* Orçamentos */
.qkpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.qkpi { font: inherit; text-align: center; background: var(--surface); border: 1px solid var(--c); border-radius: 10px; padding: 12px 8px; cursor: pointer; color: var(--muted); display: grid; gap: 2px; font-size: .84rem; }
.qkpi .n { font-size: 1.8rem; font-weight: 600; color: var(--c); line-height: 1.1; }
.qkpi:hover, .qkpi.on { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.qkpi.on { box-shadow: inset 0 0 0 2px var(--c); }
.qbadge { display: inline-block; font-size: .72rem; font-weight: 650; padding: 3px 9px; border-radius: 6px; color: #fff; background: var(--c); white-space: nowrap; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-height: 240px; }
.kcol.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.khead { background: var(--c); color: #fff; padding: 9px 12px; border-radius: 9px 9px 0 0; display: grid; font-size: .85rem; }
.khead span { opacity: .9; font-size: .78rem; }
.kbody { padding: 8px; display: grid; gap: 8px; align-content: start; max-height: 70vh; overflow-y: auto; }
.kempty { color: var(--muted); font-size: .8rem; text-align: center; padding: 16px 6px; border: 1px dashed var(--line); border-radius: 8px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font-size: .84rem; cursor: pointer; box-shadow: var(--shadow); }
.qcard:hover { border-color: var(--accent); }
.qcard.drag { opacity: .5; }
.qcard-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; font-weight: 600; }
.qlabel { font-size: .72rem; color: var(--muted); font-weight: 600; }
.qclient { margin-bottom: 6px; text-transform: uppercase; font-size: .78rem; }
.qgrid { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .78rem; margin-bottom: 8px; }
.qstrip { font-size: .75rem; font-weight: 600; text-align: center; padding: 4px 6px; border-radius: 6px; }
.qstrip.info { background: #e0f2fe; color: #075985; } .qstrip.warn { background: var(--warn-soft); color: var(--warn); }
.qstrip.err { background: var(--danger-soft); color: var(--danger); } .qstrip.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok); }
.qform { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.qside { position: sticky; top: 16px; }
.qside-icon { display: grid; place-items: center; color: var(--muted); margin: 4px 0 6px; }
.qside-icon svg { width: 56px; height: 56px; }
.qside-title { text-align: center; font-weight: 650; margin-bottom: 6px; }
.qlabel-f { font-size: .86rem; font-weight: 550; margin-bottom: 5px; }
.qmain > .card { margin-bottom: 14px; }
.qitems input { padding: 7px 9px; }
.qitems .qdesc { min-width: 180px; }
.qsum td { vertical-align: top; font-variant-numeric: tabular-nums; }
.qtotal { font-weight: 700; font-size: 1.15rem; }
/* Orçamento fora de edição: tudo como texto, sem botões de alterar */
.qside { display: grid; gap: 16px; align-content: start; }
.qside > .card { margin: 0; }
.ro-f { margin-bottom: 14px; }
.ro-l { color: var(--muted); font-size: .82rem; font-weight: 550; }
.ro-v { margin-top: 2px; min-height: 1.2em; overflow-wrap: anywhere; }
.qform.locked :is(input, select, textarea) { border-color: transparent !important; background: transparent !important; box-shadow: none !important; cursor: default; pointer-events: none; -webkit-appearance: none; appearance: none; color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1; padding-left: 0; padding-right: 0; resize: none; }
.qform.locked :is(input, textarea)::placeholder { color: transparent; -webkit-text-fill-color: transparent; }
.qform.locked .qnum, .qform.locked .qstep input { text-align: left; }
.qform.locked :is(.qrm, .qstep button, .card-head .btn, .card-head .actions, [data-rme], .pay-grid button:not(.on), #qinst button, #qinst [data-split]) { display: none !important; }
.qform.locked label.check:has(#multi), .qform.locked .combo-add { display: none; }
.qform.locked .pay-grid button.on { cursor: default; pointer-events: none; }
.qform.locked .qimg, .qform.locked .qprod a { cursor: default; }
.qform.locked :is(.qdisc, .qsum .inline) { flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.qform.locked :is(.qdisc select, #dtype) { width: auto !important; min-width: 0; flex: none; }
.qform.locked #dval::placeholder { color: var(--text); -webkit-text-fill-color: var(--text); }
.qform.locked textarea { field-sizing: content; min-height: 1.5em; }
.qform.locked .pay-grid button.on { padding: 8px 16px; }
.send-grid { display: grid; gap: 8px; margin-top: 14px; }
.send-grid .btn { justify-content: center; }
@media (max-width: 1360px) { .qform { grid-template-columns: minmax(0, 1fr); } .qside { position: static; } }
@media (max-width: 640px) { .qkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qkpi .n { font-size: 1.4rem; } .kanban { grid-auto-columns: 82%; } }
@media (max-width: 640px) {
  .qsum thead { display: none; }
  .qsum, .qsum tbody, .qsum tr { display: block; }
  .qsum td { display: flex; justify-content: space-between; align-items: center; border: 0; padding: 5px 0; }
  .qsum td:nth-child(1)::before { content: "Produtos"; } .qsum td:nth-child(2)::before { content: "Serviços"; }
  .qsum td:nth-child(3)::before { content: "Custos adicionais"; } .qsum td:nth-child(4)::before { content: "Desconto"; }
  .qsum td:nth-child(5)::before { content: "Total"; }
  .qsum td:nth-child(4) { flex-wrap: wrap; }
  .qpay { grid-template-columns: 1fr; }
}

/* Menu em grupos */
.nav a span, .nav-gh span { flex: 1; }
.nav-group { margin: 2px 0; }
.nav-gh { font: inherit; font-weight: 600; width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; color: var(--text); border-radius: 8px; cursor: pointer; text-align: left; }
.nav-gh:hover { background: var(--surface-2); }
.nav-gh svg { width: 18px; height: 18px; flex: none; }
.nav-gh svg:last-child { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; }
.nav-group.open .nav-gh svg:last-child { transform: rotate(90deg); }
.nav-gi { display: none; padding-left: 14px; margin-left: 18px; border-left: 1px solid var(--line); }
.nav-group.open .nav-gi { display: block; }
.nav-gi a { padding: 7px 10px; font-size: .92rem; }
.nav-gi a svg { width: 16px; height: 16px; }
.empty > svg { width: 34px; height: 34px; color: var(--muted); }

.perm-table th.perm-user { text-align: center; text-transform: none; font-size: .85rem; color: var(--text); }
.perm-cell { text-align: center; white-space: nowrap; }
.perm-actions td { border-bottom: 0; }

/* Itens do orçamento (produtos e serviços) */
.qbtn-blue { background: #1d8ce0; border-color: #1d8ce0; color: #fff; }
.qbtn-blue:hover { background: #1a7fcc; }
.qbtn-green { background: #2fcc7f; border-color: #2fcc7f; color: #fff; }
.qbtn-green:hover { background: #29b872; }
.qtable { border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; }
.qtable table { min-width: 560px; table-layout: auto; }
.qprod-text input.qdesc { min-width: 90px; }
.qtable thead th { text-transform: none; letter-spacing: 0; font-size: .86rem; font-weight: 500; color: var(--muted); padding: 14px 10px; white-space: normal; }
.qtable tbody td { padding: 16px 10px 22px; vertical-align: top; border-bottom: 0; }
.qtable tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); padding: 16px 12px; font-weight: 700; }
.qtable .qempty td { text-align: center; color: var(--muted); padding: 26px; }
.qprod { display: flex; align-items: flex-start; gap: 8px; min-width: 160px; }
.qrm { border: 0; background: none; padding: 0; margin-top: 6px; color: #ef4060; cursor: pointer; display: grid; }
.qrm svg { width: 17px; height: 17px; }
.qimg { width: 30px; height: 30px; display: grid; place-items: center; background: var(--surface-2); border-radius: 4px; color: var(--muted); flex: none; }
.qimg svg { width: 22px; height: 22px; }
.qprod-text { flex: 1; min-width: 0; }
.qdesc { width: 100%; min-width: 0; border: 1px solid transparent !important; background: transparent !important; color: #6b4fe0; padding: 4px 6px !important; font-weight: 500; }
.qdesc:hover, .qdesc:focus { border-color: var(--line) !important; background: var(--surface) !important; }
html[data-theme="dark"] .qdesc { color: #a594ff; }
.qsub { font-size: .72rem; color: var(--muted); margin: 2px 6px 0; text-transform: uppercase; }
.qstep { display: inline-flex; align-items: center; gap: 4px; }
.qstep button { border: 0; background: none; cursor: pointer; color: var(--text); padding: 2px; display: grid; }
.qstep button svg { width: 16px; height: 16px; stroke-width: 2.4; }
.qstep input { width: 68px; text-align: center; padding-left: 4px; padding-right: 4px; }
.qnum { width: 92px; }
.qdisc { display: inline-flex; }
.qdisc input { width: 78px; border-radius: 6px 0 0 6px; }
.qdisc select { width: auto; border-radius: 0 6px 6px 0; border-left: 0; background-color: var(--surface-2); font-weight: 600; font-size: .85rem; padding: 0 22px 0 8px; background-position: right 6px center; }
.qtable td.num.lt { padding-top: 22px; color: var(--muted); }
@media (max-width: 640px) { .inline[style*="nowrap"] { flex-wrap: wrap !important; } .inline[style*="nowrap"] > input { min-width: 100%; } }

.perm-tools { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.perm-tools .btn { padding: 3px 8px; font-size: .75rem; }
.perm-yes { color: var(--ok); display: inline-grid; }
.perm-yes svg { width: 20px; height: 20px; stroke-width: 2.6; }
.perm-no { color: var(--muted); }
.perm-list { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.perm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; }
.perm-mods { display: grid; gap: 8px; }
.perm-mod { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.perm-mod.has { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.perm-mod > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; font-weight: 600; }
.perm-mod > summary::-webkit-details-marker { display: none; }
.perm-mod > summary input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.perm-mod > summary .perm-mn { flex: 1; }
.perm-mod > summary .perm-cnt { font-size: .8rem; color: var(--muted); font-weight: 500; }
.perm-mod > summary svg { width: 16px; height: 16px; transition: transform .15s; color: var(--muted); }
.perm-mod[open] > summary svg { transform: rotate(90deg); }
.perm-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; padding: 4px 14px 14px 42px; }
.perm-it.is-view { grid-column: 1 / -1; font-weight: 600; }
.perm-it .help { font-weight: 400; }
.tk-host { padding: 4px 0 24px; }
.tk-host .page-head { margin-top: 4px; }
.tk-ttl { flex: 1; font-weight: 700; font-size: 1.05rem; margin-left: 8px; }

.logo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 220px; height: 100px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; text-align: center; background:
  repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; padding: 8px; }
.logo-box { overflow: hidden; }
.logo-box img { display: block; width: 100%; height: 100%; object-fit: contain; min-width: 0; min-height: 0; }
.logo-box svg { width: 26px; height: 26px; }

/* Escolha de tema */
.theme-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-btn svg { width: 18px; height: 18px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-pick button { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 12px; cursor: pointer; display: grid; gap: 8px; justify-items: center; font-weight: 550; }
.theme-pick button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.theme-pick .sw { width: 100%; height: 46px; border-radius: 6px; border: 1px solid var(--line); }
.theme-pick .sw.light { background: linear-gradient(90deg, #ffffff 30%, #eef0f2 30%); }
.theme-pick .sw.dark { background: linear-gradient(90deg, #0F3369 30%, #0B2A58 30%); }
.theme-pick .sw.auto { background: linear-gradient(135deg, #ffffff 50%, #0F3369 50%); }

/* v1.8: ordens de compra, financeiro e fluxo de caixa */
.tabn { font-weight: 700; margin-left: 2px; }
.fin-desc { display: flex; align-items: center; gap: 7px; font-weight: 550; }
.fin-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fin-dot.receber { background: var(--ok); }
.fin-dot.pagar { background: var(--danger); }
.fin-table tfoot td, .cash-table tfoot td { font-weight: 650; border-top: 2px solid var(--line); }
.cash-table tr.today td { background: var(--accent-soft); }
.chart.cash { height: 230px; }
.chart .cin { fill: var(--ok); }
.chart .cout { fill: var(--danger); }
.chart .proj { opacity: .35; }
.chart .cbal { fill: none; stroke: var(--text); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.chart .cbal-dot { fill: var(--text); }
.chart .axis0 { stroke: var(--muted); }
.legend .lg-in { background: var(--ok); }
.legend .lg-out { background: var(--danger); }
.legend .lg-proj { background: var(--muted); opacity: .4; }
.legend .lg-bal { background: var(--text); height: 2px !important; vertical-align: 3px !important; }
.catbar { height: 4px; background: var(--surface-2); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.catbar i { display: block; height: 100%; border-radius: 2px; }
#stbtns { gap: 6px; }
@media (max-width: 640px) { #tabs { width: 100%; } #tabs button { flex: 1 1 auto; padding: 7px 9px; } }
@media (max-width: 640px) {
  .qsum.posum td:nth-child(1)::before { content: "Itens"; } .qsum.posum td:nth-child(2)::before { content: "Frete"; }
  .qsum.posum td:nth-child(3)::before { content: "Desconto"; } .qsum.posum td:nth-child(4)::before { content: "Total"; }
  .fin-table { min-width: 0; }
  .fin-table thead { display: none; }
  .fin-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .fin-table tbody td { border: 0; padding: 0; }
  .fin-table tbody td:nth-child(2) { order: 1; }
  .fin-table tbody td:nth-child(5) { order: 2; font-weight: 650; }
  .fin-table tbody td:nth-child(1) { order: 3; font-size: .85rem; color: var(--muted); }
  .fin-table tbody td:nth-child(1) div { display: inline; margin-left: 4px; }
  .fin-table tbody td:nth-child(4) { order: 4; text-align: right; }
  .fin-table tbody td:nth-child(6) { order: 5; grid-column: 1 / -1; text-align: right; }
  .fin-table tbody td:nth-child(6):empty { display: none; }
  .fin-table tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
  .fin-table tfoot td { border: 0; padding: 10px 2px; }
}
.inv-pay { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.inv-dups input { padding: 6px 8px; }
.inv-dups td { vertical-align: top; }

/* Botão "Novo" (menu suspenso no painel e grupo de destaque no menu lateral) */
.dd { position: relative; display: inline-block; }
.dd-btn svg:last-child { width: 14px; height: 14px; transform: rotate(90deg); margin-left: 2px; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; display: grid; }
.dd-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; color: var(--text); font-weight: 500; }
.dd-menu a:hover { background: var(--surface-2); text-decoration: none; }
.dd-menu svg { width: 18px; height: 18px; color: var(--muted); }
.nav-new > .nav-gh { background: var(--accent); color: var(--accent-ink); margin: 2px 0 4px; }
.nav-new > .nav-gh:hover { background: var(--accent-hover); }
.nav-new > .nav-gh svg:last-child { color: var(--accent-ink); }
.branch-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.branch-row [data-h] { grid-column: 1 / -1; margin-top: -6px; }
.branch-row [data-h]:empty { display: none; }
@media (max-width: 640px) { .branch-row { grid-template-columns: minmax(0, 1fr) auto; } .branch-row label:nth-child(2) { grid-column: 1; } }

/* Telas grandes: o conteúdo usa mais da largura, fica centralizado e a letra cresce um pouco */
@media (min-width: 1500px) {
  .main { max-width: 1560px; margin: 0 auto; padding: 30px 40px 60px; }
}
@media (min-width: 1900px) {
  body { font-size: 16px; }
  .shell { grid-template-columns: 256px 1fr; }
  .main { max-width: 1800px; padding: 34px 48px 60px; }
  .kpi { padding: 16px 20px; }
  .kpi .value { font-size: 1.6rem; }
}
@media (min-width: 2400px) {
  body { font-size: 17px; }
  .main { max-width: 2100px; }
}
.chart-box { width: 100%; overflow: hidden; }
.chart text.today { fill: var(--accent); font-weight: 700; }

/* Campo com sugestões (combo) — mesmo visual dos menus do sistema */
.combo-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px !important; }
.combo-menu { position: fixed; z-index: 200; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 5px; }
html[data-theme="dark"] .combo-menu { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.combo-opt { padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-opt:hover, .combo-opt.active { background: var(--surface-2); }
.combo-opt.sel { color: var(--accent-text); font-weight: 600; }
.icon-btn[data-up] svg { transform: rotate(-90deg); }
.icon-btn.down svg { transform: rotate(90deg); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.inst-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inst-row label { flex: 1 1 140px; }
.inst-row .inst-fix { padding-bottom: 10px; }
.inst-info { margin: 0; }
.inst-info:empty { display: none; }
.inst-table { margin-top: 10px; }
.inst-table input { padding: 6px 8px; }
.inst-table td.num input { text-align: right; width: 130px; }
.inst-table input[type=date] { width: 170px; }
.inst-table input:disabled { background: transparent; border-color: transparent; color: var(--text); opacity: 1; }
.inst-table { width: 100%; } .inst-row label { max-width: 260px; }
@media (max-width: 640px) { .inst-table input[type=date] { width: 138px; } .inst-table td.num input { width: 100px; } .inst-table th, .inst-table td { padding-left: 4px; padding-right: 4px; } }
/* Subgrupo recolhível dentro de um grupo do menu */
.nav-sh { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; font: inherit; font-size: .92rem; font-weight: 500; color: var(--text); background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left; }
.nav-sh:hover { background: var(--surface-2); }
.nav-sh svg { width: 16px; height: 16px; flex: none; }
.nav-sh span { flex: 1; }
.nav-sh svg:last-child { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.nav-sub.open > .nav-sh svg:last-child { transform: rotate(90deg); }
.nav-si { display: none; margin-left: 12px; padding-left: 6px; border-left: 1px solid var(--line); }
.nav-si a { padding-left: 6px; padding-right: 4px; gap: 6px; font-size: .86rem; }
.nav a span { min-width: 0; }
.nav-sub.open > .nav-si { display: block; }
.combo-new { color: var(--accent-text); font-weight: 600; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); margin-top: 3px; border-radius: 0 0 7px 7px; }
.combo-new svg { width: 15px; height: 15px; flex: none; }
.combo-new { white-space: normal; }
.inst-entry { flex: 0 0 auto !important; padding-bottom: 10px; }

/* Botões do orçamento: Visualizar (verde), Mais ações (menu) */
.btn.qbtn-view { background: #22c07a; border-color: #22c07a; color: #fff; }
.btn.qbtn-view:hover { background: #1aa767; border-color: #1aa767; text-decoration: none; }
.btn.qbtn-more { background: #1f7f95; border-color: #1f7f95; color: #fff; }
.btn.qbtn-more:hover { background: #196b7e; border-color: #196b7e; }
.dd-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; color: var(--text); font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; white-space: nowrap; }
.dd-menu button:hover { background: var(--surface-2); }
.dd-menu button svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.dd-menu button.danger, .dd-menu button.danger svg { color: var(--danger); }
.dd-menu { min-width: 240px; }

/* Barra de resumo do orçamento */
.qsumbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.qsb { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 0; }
.qsb-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.qsb-ic svg { width: 24px; height: 24px; }
.qsb-l { color: var(--muted); font-size: .85rem; }
.qsb-v { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.qsb-sel { margin-top: 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 4px 20px 4px 0; background-color: transparent; background-position: right 2px center; font-weight: 500; max-width: 260px; width: 100%; }
@media (max-width: 760px) { .qsumbar { grid-template-columns: minmax(0, 1fr); gap: 10px; } .qsb { padding: 12px 14px; } .qsb-ic { width: 42px; height: 42px; } }
.qform.locked :is(#dval, .qdisc input) { field-sizing: content; width: auto !important; min-width: 2ch; flex: none; }
.qform.locked .qsum .inline { flex-wrap: nowrap !important; }
@media (max-width: 760px) { .qform.locked .qsum .inline { justify-content: flex-start; } }

/* Cores de status */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatch-custom { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--line); cursor: pointer; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); position: relative; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }

/* Filtros da lista de orçamentos: tudo alinhado pela base dos campos */
.filters:has(.seg-field) { align-items: flex-end !important; }
.seg.seg-field { height: 40px; flex-wrap: nowrap; }
.seg.seg-field button { display: grid; place-items: center; padding: 0 14px; }
.bulk-btn { height: 40px; }
.bulk-btn > svg:last-child { width: 14px; height: 14px; transform: rotate(90deg); }
.bulk-n { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .74rem; padding: 1px 7px; font-weight: 650; }
#bulk .dd-menu { right: 0; left: auto; }
.selcol { width: 34px; padding-right: 0 !important; }
.selcol input, .qsel input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.qsel { display: inline-grid; place-items: center; margin-right: 6px; cursor: pointer; }
.qcard-top { align-items: center; }
.qcard.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
tr.sel td { background: var(--accent-soft); }
.radio-list { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-height: 55vh; overflow-y: auto; }
.radio-list label { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.radio-list label:last-child { border-bottom: 0; }
.radio-list label:hover { background: var(--accent-soft); }
.radio-list input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.bulk-err { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
/* Confirmação digitada */
.modal.tc { max-width: 440px; text-align: center; padding: 30px 28px 24px; }
.tc-icon { color: #f43f5e; display: grid; place-items: center; }
.tc-icon svg { width: 76px; height: 76px; }
.tc h2 { font-size: 1.7rem; margin: 10px 0 8px; }
.tc-text { color: var(--muted); margin: 0 0 18px; }
.tc-label { display: grid; gap: 8px; font-size: .95rem; }
.tc-label strong { color: #f43f5e; font-weight: 600; }
.tc-label input { text-align: left; }
.tc-foot { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.tc-foot .btn { min-width: 110px; justify-content: center; }
@media (max-width: 760px) { #bulk, #bulk .bulk-btn { width: 100%; } .seg.seg-field { width: 100%; } .seg.seg-field button { flex: 1; } }
.inst-entry { display: grid; gap: 4px; margin: 10px 0 12px; max-width: 520px; }
.entry-group { display: inline-flex; align-items: stretch; flex: none; }
.entry-group input { width: 150px; border-radius: 8px 0 0 8px; }
.entry-group select { width: auto; min-width: 62px; flex: none; border-radius: 0 8px 8px 0; border-left: 0; background-color: var(--surface-2); font-weight: 600; padding: 0 24px 0 12px; background-position: right 8px center; cursor: pointer; }
.entry-group input:focus, .entry-group select:focus { position: relative; z-index: 1; }
.inst-entry > label { font-weight: 550; font-size: .9rem; }

/* Filtros avançados (orçamentos e vendas) */
.adv-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 14px; align-items: end; padding: 4px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.adv-filters label { display: grid; gap: 5px; font-size: .85rem; font-weight: 550; color: var(--muted); margin: 0; }
.adv-filters input, .adv-filters select { width: 100%; height: 40px; }
.adv-filters .af-wide { grid-column: span 2; }
.af-actions { display: flex; align-items: center; height: 40px; }
.btn.af-toggle { height: 40px; }
.btn.af-toggle.on { border-color: var(--accent); color: var(--accent-text); }
@media (max-width: 760px) { .adv-filters { grid-template-columns: 1fr 1fr; } .adv-filters .af-wide { grid-column: 1 / -1; } }

/* Cadastro de produto: abas Geral/Tributação */
#ptabs, #ftabs { justify-self: start; }
.fiscal { display: grid; gap: 12px; }
.fiscal #ftabs { margin-top: 4px; }

/* Minha conta → Aparência: cor de destaque */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }

/* Cadastro de produto: referências cruzadas */
.ref-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
.ref-row + .ref-row { margin-top: 8px; }
.ref-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; background: var(--surface-2); }
.prod-desc { white-space: pre-wrap; line-height: 1.5; }

/* Importar produtos por planilha */
.imp-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; font-size: .92rem; }
.imp-col { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .8rem; }
.imp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.imp-kpis > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; }
.imp-kpis strong { font-size: 1.35rem; }
.imp-list { max-height: 220px; overflow: auto; font-size: .88rem; display: grid; gap: 4px; padding: 8px 0; }
.imp-bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.imp-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.imp-hist { display: grid; gap: 8px; }
.imp-hist > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Configurações → Sistema → Backup: passos do Google Drive */
.gsteps { padding-left: 20px; margin: 4px 0 14px; font-size: .9rem; line-height: 1.6; }
.gsteps li { margin-bottom: 8px; }

/* Versão do sistema no rodapé do menu lateral */
.side .foot .ver { margin-top: 8px; font-size: .72rem; color: var(--muted); opacity: .8; letter-spacing: .02em; }

/* Foto de perfil */
.avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent-text); font-weight: 650; font-size: .9rem; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 28px; height: 28px; font-size: .72rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-row > :not(.avatar) { flex: 1 1 200px; width: auto; }
.user-cell { display: inline-flex; align-items: center; gap: 10px; }
.side .foot a.foot-user { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; }
.foot-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Botão de tema no modo automático: ícone do tema do aparelho com um "A" no canto */
.theme-auto { position: relative; display: inline-grid; place-items: center; line-height: 0; }
.theme-auto b { position: absolute; right: -5px; bottom: -4px; font-size: 9px; line-height: 1; font-weight: 800; padding: 1px 2px; border-radius: 4px; background: var(--surface); color: var(--accent-text); }

/* ============ Tela de login (sempre escura, com céu estrelado) ============ */
.lg-page { --lg-bg: #0B2A58; --lg-card: #08214A; --lg-line: #25508F; --lg-lime: #c6f04a; --lg-text: #f4f1fb; --lg-muted: #b9b0cf;
  min-height: 100vh; display: flex; flex-direction: column; color: var(--lg-text); padding: 20px clamp(16px, 4vw, 48px) 24px;
  background-color: var(--lg-bg);
  background-image:
    radial-gradient(circle at 20px 30px, #ffffffb0 0 1.1px, transparent 1.6px), radial-gradient(circle at 150px 90px, #ffffff80 0 1px, transparent 1.5px),
    radial-gradient(circle at 80px 170px, #ffffff99 0 1.3px, transparent 1.8px), radial-gradient(circle at 210px 200px, #ffffff70 0 .9px, transparent 1.4px),
    radial-gradient(circle at 40px 60px, #ffffff60 0 .9px, transparent 1.4px), radial-gradient(circle at 120px 20px, #ffffff90 0 1.2px, transparent 1.7px);
  background-size: 260px 230px, 260px 230px, 260px 230px, 260px 230px, 170px 150px, 170px 150px; }
.lg-top, .lg-main, .lg-foot { width: 100%; max-width: 1100px; margin: 0 auto; }
.lg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.lg-logo { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--accent, #b02a37); color: #fff; overflow: hidden; flex: none; }
.lg-logo.img { background: #fff; padding: 3px; }
.lg-logo img { width: 100%; height: 100%; object-fit: contain; }
.lg-logo svg { width: 20px; height: 20px; }
.lg-client { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; background: #ffffff1f; color: var(--lg-text); text-decoration: none; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.lg-client:hover { background: #ffffff30; }
.lg-client svg { width: 16px; height: 16px; }
.lg-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 420px); gap: clamp(24px, 6vw, 96px); align-items: center; padding: 40px 0; }
.lg-hero { position: relative; }
.lg-ver { display: inline-block; background: #061B3D; color: var(--lg-text); font-weight: 700; font-size: .85rem; padding: 5px 9px; border-radius: 5px; }
.lg-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; margin: 22px 0 18px; color: #fff; }
.lg-hero mark { background: var(--lg-lime); color: var(--lg-bg); padding: 0 .12em; border-radius: 2px; white-space: nowrap; }
.lg-hero p { color: var(--lg-muted); font-weight: 600; font-size: 1.05rem; margin: 0; }
.lg-st { position: absolute; width: clamp(70px, 9vw, 110px); filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(0 6px 12px #0006); animation: lg-float 6s ease-in-out infinite; }
.lg-st.st1 { right: 4%; top: -18%; transform: rotate(10deg); }
.lg-st.st2 { right: 24%; bottom: -62%; transform: rotate(-8deg); animation-delay: -3s; }
@keyframes lg-float { 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .lg-st { animation: none; } }
.lg-card { background: var(--lg-card); border: 1px solid var(--lg-line); border-radius: 16px; padding: 30px 32px; display: grid; gap: 16px; box-shadow: 0 20px 50px #0005; }
.lg-card h2 { margin: 0 0 4px; font-size: 1.4rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.lg-card label { color: #fff; font-weight: 700; display: grid; gap: 8px; }
.lg-card label i { color: #ef4444; font-style: normal; margin-left: -4px; }
.lg-card label { grid-template-columns: auto 1fr; } .lg-card label input { grid-column: 1 / -1; }
.lg-card input { background: #e8eef9; color: #111; border: 2px solid transparent; border-radius: 8px; padding: 11px 12px; font-size: .95rem; }
.lg-card input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px #3b82f633; }
.lg-btn { margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 14px; background: var(--accent, #b02a37); color: #fff; font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; transition: filter .15s, transform .15s; }
.lg-btn:hover { filter: brightness(1.08); } .lg-btn:active { transform: translateY(1px); }
.lg-btn svg { width: 18px; height: 18px; } .lg-btn:disabled { opacity: .7; cursor: default; }
.lg-help { margin: 0; color: var(--lg-muted); font-size: .8rem; }
.lg-foot { display: grid; gap: 14px; justify-items: center; color: var(--lg-muted); font-weight: 600; font-size: .9rem; }
.lg-foot svg { width: 100%; height: 12px; }
@media (max-width: 860px) {
  .lg-main { grid-template-columns: 1fr; padding: 28px 0; }
  .lg-st.st1 { top: -6%; right: 0; } .lg-st.st2 { display: none; }
  .lg-card { padding: 24px 20px; }
}

/* Mensagem de campo inválido (substitui o balão do navegador) */
.field-err { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--danger, #c0362c); font-size: .8rem; font-weight: 600; line-height: 1.3; animation: ferr-in .15s ease-out; }
.field-err::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--danger, #c0362c); color: #fff; font-size: .7rem; font-weight: 800; }
:is(input, select, textarea).is-invalid { border-color: var(--danger, #c0362c) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger, #c0362c) 22%, transparent) !important; }
@keyframes ferr-in { from { opacity: 0; transform: translateY(-3px); } }
.lg-card .field-err { color: #ff9b9b; margin-top: -2px; }
.lg-card .field-err::before { background: #ef4444; }
.lg-card input.is-invalid { border-color: #ef4444 !important; box-shadow: 0 0 0 3px #ef444440 !important; }

/* Editor de questionários */
.qtitle { margin: 18px 0 8px; }
.qe-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; display: grid; gap: 8px; }
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qe-num { min-width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.qe-label { flex: 1 1 260px; min-width: 200px; }
.qtype { flex: 0 1 200px; }
.qe-desc { width: 100%; }
.qtools { display: inline-flex; gap: 2px; margin-left: auto; }
.qcond { border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 8px; }
.qcond .grid { margin: 0; }
.qcond-v { display: grid; gap: 5px; align-content: start; }
.qcond-v .lbl { font-size: .86rem; font-weight: 550; }
.qcond-v .qmulti { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* Agenda */
.ag-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ag-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.ag-card b { display: block; font-size: 1.5rem; line-height: 1.1; }
.ag-card span { font-size: .8rem; color: var(--muted); }
.ag-card.red { border-left-color: var(--danger); }
.ag-card.amber { border-left-color: var(--warn); }
.ag-card.green { border-left-color: var(--ok); }
.ag-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ag-bar select, .ag-bar input { width: auto; min-width: 160px; }
.ag-bar #ag-q { flex: 1 1 240px; }
.ag-label { margin: 0 8px; }
.ag-un { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.ag-un-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: grab; }
.ag-un-item:last-child { border-bottom: 0; }
.ag-chip { font-size: .75rem; padding: 3px 6px; border-radius: 4px; margin-top: 3px; background: var(--accent-soft); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-left: 3px solid var(--accent); }
.ag-chip[draggable="true"] { cursor: grab; }
.ag-chip.em_execucao, .ag-block.em_execucao { border-left-color: var(--warn); }
.ag-chip.concluida, .ag-block.concluida { opacity: .7; border-left-color: var(--ok); }
.ag-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ag-wh { padding: 6px; font-size: .75rem; font-weight: 700; text-align: center; background: var(--bg); border-bottom: 1px solid var(--line); }
.ag-day { min-height: 110px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.ag-day:nth-child(7n) { border-right: 0; }
.ag-day.out { opacity: .45; }
.ag-day .dnum { font-size: .8rem; font-weight: 600; margin-bottom: 2px; }
.ag-day.today .dnum { color: var(--accent-text); }
.ag-more { font-size: .72rem; background: none; border: 0; color: var(--accent-text); cursor: pointer; padding: 2px 0; }
.ag-tl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.ag-tl-day { min-width: 900px; }
.ag-tl-week { min-width: 1050px; }
.ag-row { display: grid; border-top: 1px solid var(--line); min-height: 44px; }
.ag-row:first-child { border-top: 0; }
.ag-row.ag-head { min-height: 32px; background: var(--bg); font-size: .75rem; font-weight: 700; }
.ag-name { padding: 8px; font-weight: 600; font-size: .85rem; border-right: 1px solid var(--line); }
.ag-hours { position: relative; height: 32px; }
.ag-hours span { position: absolute; top: 8px; transform: translateX(-50%); color: var(--muted); font-weight: 600; }
.ag-track { position: relative; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 11 - 1px), var(--line) calc(100% / 11 - 1px), var(--line) calc(100% / 11)); }
.ag-block { position: absolute; height: 30px; box-sizing: border-box; padding: 4px 6px; font-size: .72rem; border-radius: 4px; background: var(--accent-soft); border-left: 3px solid var(--accent); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.ag-block[draggable="true"] { cursor: grab; }
.ag-dh { padding: 6px 8px; border-left: 1px solid var(--line); }
.ag-dh.today { color: var(--accent-text); }
.ag-cell { min-height: 44px; padding: 3px; border-left: 1px solid var(--line); }
.ag-day.drop, .ag-cell.drop, .ag-track.drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }

/* Ficha da OS (execução) */
.badge.red { background: var(--danger-soft); color: var(--danger); }
.so-tabs { margin-bottom: 14px; }
.so-tabs .badge { margin-left: 4px; font-size: .7rem; padding: 1px 6px; }
.so-pend { display: flex; gap: 8px; align-items: center; }
.so-pend svg { flex: none; }
.so-pendlist { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.so-pendlist li { display: flex; gap: 8px; align-items: flex-start; }
.so-pendlist svg { color: var(--warn); flex: none; margin-top: 2px; }
.qr-grid { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 12px 18px; }
.qf { display: grid; gap: 6px; align-content: start; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.qf-l { display: grid; gap: 2px; }
.qmulti { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.qsig { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qsig img { max-width: 260px; max-height: 110px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.qph, .so-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.qph figure, .so-photos figure { margin: 0; position: relative; }
.qph img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.so-photos img { width: 150px; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.so-photos figcaption { display: grid; font-size: .8rem; max-width: 150px; }
.qph figure .icon-btn, .so-photos figure .icon-btn { position: absolute; top: 4px; right: 4px; background: var(--surface); border-radius: 50%; }
.qph figure .icon-btn:disabled, .so-photos figure .icon-btn:disabled { display: none; }
.sigpad { width: 100%; height: auto; border: 1px dashed var(--line); border-radius: 8px; touch-action: none; background: #fff; cursor: crosshair; }
.so-itgrid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 12px; }
.so-kpis { margin-top: 12px; }
.stars-v { color: #f5a524; font-size: 1.2rem; }
.stars-v .off { color: var(--line); }
@media (max-width: 760px) { .qr-grid { grid-template-columns: 1fr; } .so-itgrid { grid-template-columns: 1fr; } }
.so-pend svg, .so-pendlist svg, .so-ok svg { width: 18px; height: 18px; flex: none; }
.so-ok { display: flex; gap: 8px; align-items: center; }
.so-ok svg { color: var(--ok); }
/* Controle de horas */
.hr-table tr.del td { text-decoration: line-through; opacity: .55; }
.hr-table tr.del td:nth-child(6), .hr-table tr.del td:last-child { text-decoration: none; opacity: 1; }
.hr-table input { min-width: 150px; }
.warn-t { color: var(--warn); font-weight: 600; }
.hr-add { border: 1px dashed var(--accent); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; display: grid; gap: 8px; }
.hr-add-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 2fr auto; gap: 10px; align-items: end; }
.so-kpis + p svg, [data-pane=horas] > p svg { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 760px) { .hr-add-grid { grid-template-columns: 1fr; } }
/* Edição única da OS e ligação com orçamento */
.alert.info { background: var(--accent-soft); color: var(--text); border-color: transparent; }
.so-editing, .q-os { display: flex; gap: 8px; align-items: center; }
.so-editing svg, .q-os svg { width: 18px; height: 18px; flex: none; color: var(--accent-text); }
.so-photos figure.del img { opacity: .3; }
.so-photos figure.del figcaption { text-decoration: line-through; }
#itbody tr.del td { text-decoration: line-through; opacity: .55; }
#itbody tr.del td:last-child { text-decoration: none; opacity: 1; }
/* Controle de horas */
.hr-top { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.hr-top svg, .hr-hist svg, .hr-el svg, .hr-totals svg, .hr-info svg, .hr-open svg { width: 14px; height: 14px; vertical-align: -2px; }
.hr-dt { display: inline-flex; gap: 6px; }
.hr-dt input[type=date] { width: 150px; min-width: 0; }
.hr-dt input[type=time] { width: 140px; min-width: 0; }
.hr-table .hr-sel { min-width: 150px; }
.hr-table .hr-note { min-width: 160px; }
.hr-web { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.hr-hist { margin-left: 6px; color: var(--muted); cursor: help; }
.hr-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0 8px auto; max-width: 620px; }
.hr-totals > div { padding: 8px 12px; display: grid; gap: 4px; }
.hr-totals > div + div { border-left: 1px solid var(--line); }
.hr-totals span { font-size: .8rem; color: var(--muted); }
.hr-totals b { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .hr-totals { grid-template-columns: 1fr; } .hr-totals > div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* ===== App do técnico (celular): #/m ===== */
.tk-applink { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .85rem; }
.tk-applink svg { width: 16px; height: 16px; }
.tk { min-height: 100vh; background: var(--bg); color: var(--text); }
.tk-main { max-width: 560px; margin: 0 auto; padding: 8px 14px 110px; padding-top: max(8px, env(safe-area-inset-top)); }
.tk svg { width: 20px; height: 20px; flex: none; }
.tk-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.tk-ib { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.tk-ib.b { border: 1px solid var(--line); background: var(--surface); }
.tk-fwd svg { transform: rotate(180deg); }
.tk-save { border: 0; background: none; color: var(--accent-text); font-weight: 650; font-size: 1rem; padding: 8px 4px; cursor: pointer; }
.tk-hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 6px 0 14px; }
.tk-hello span { color: var(--muted); font-size: .9rem; }
.tk-hello h1 { margin: 2px 0 0; font-size: 1.35rem; }
.tk-sync { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--ok); color: var(--ok); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .85rem; cursor: pointer; }
.tk-sync svg { width: 16px; height: 16px; }
.tk-shorts { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.tk-short { flex: none; width: 78px; display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: .72rem; color: var(--text); text-align: center; }
.tk-short:hover { text-decoration: none; }
.tk-si { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.tk-si.p, .tk-ri.p, .tk-ki.p { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
.tk-si.b, .tk-ri.b, .tk-ki.b { background: color-mix(in srgb, #2563eb 14%, transparent); color: #2563eb; }
.tk-si.o, .tk-ri.o, .tk-ki.o { background: color-mix(in srgb, #d97706 16%, transparent); color: #d97706; }
.tk-si.g, .tk-ri.g, .tk-ki.g { background: color-mix(in srgb, #16a34a 14%, transparent); color: #16a34a; }
.tk-ri.r, .tk-ki.r { background: color-mix(in srgb, #dc2626 13%, transparent); color: #dc2626; }
.tk-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.tk-kpi { display: grid; gap: 4px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); }
.tk-kpi:hover { text-decoration: none; }
.tk-kpi b { font-size: 1.45rem; line-height: 1.2; }
.tk-kpi span:last-child { color: var(--muted); font-size: .78rem; }
.tk-ki { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: none !important; }
.tk-sec { display: flex; justify-content: space-between; align-items: center; }
.tk-sec h2 { margin: 0; font-size: 1.1rem; }
.tk-sec a { display: inline-flex; align-items: center; gap: 2px; font-size: .85rem; }
.tk-sec a svg { width: 14px; height: 14px; }
.tk-scope { display: flex !important; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 500; margin: 6px 0 2px; grid-template-columns: none; }
.tk-prog { margin: 8px 0 12px; }
.tk-progl { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 6px; gap: 8px; }
.tk-progl b { color: var(--accent-text); font-weight: 650; }
.tk-bar { height: 5px; background: var(--line); border-radius: 99px; overflow: hidden; flex: 1; }
.tk-bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .2s; }
.tk-bar.thin { height: 4px; margin: 6px 0 12px; }
.tk-bar.thin i { background: var(--accent); }
.tk-list { display: grid; gap: 10px; }
.tk-empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.tk-task { display: flex; gap: 12px; text-align: left; width: 100%; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); cursor: pointer; font: inherit; }
.tk-tt { display: grid; justify-items: center; align-content: center; min-width: 52px; padding-right: 10px; border-right: 3px solid var(--line); }
.tk-tt b { font-size: 1.05rem; }
.tk-tt span { font-size: .66rem; color: var(--muted); letter-spacing: .04em; }
.tk-tb { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tk-th { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tk-th strong { font-size: .98rem; }
.tk-td { color: var(--muted); font-size: .85rem; }
.tk-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tk-tag { font-size: .7rem; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.tk-tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tk-st { font-size: .7rem; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tk-st.done { background: var(--ok-soft); color: var(--ok); }
.tk-st.run { background: color-mix(in srgb, #2563eb 14%, transparent); color: #2563eb; }
.tk-st.pause { background: var(--warn-soft); color: var(--warn); }
.tk-st.sched { background: var(--accent-soft); color: var(--accent-text); }
.tk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.tk-aghead { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.tk-who { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.2rem; font-weight: 700; color: var(--text); padding: 4px 0; }
.tk-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.tk-toggle button { border: 0; background: none; padding: 5px 10px; border-radius: 99px; font-size: .75rem; color: var(--muted); cursor: pointer; }
.tk-toggle button.on { background: var(--surface); color: var(--accent-text); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tk-searchbox { margin-bottom: 10px; }
.tk-searchbox input { width: 100%; }
.tk-wnav { display: flex; align-items: center; justify-content: space-between; text-transform: lowercase; }
.tk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 6px 0 8px; }
.tk-days button { display: grid; justify-items: center; gap: 3px; padding: 6px 0; border: 0; background: none; border-radius: 12px; color: var(--text); cursor: pointer; font: inherit; }
.tk-days button span { font-size: .7rem; color: var(--muted); }
.tk-days button b { font-size: 1.05rem; }
.tk-days button i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tk-days button i.no { background: transparent; }
.tk-days button.today b { color: var(--accent-text); }
.tk-days button.on { background: var(--accent); }
.tk-days button.on span, .tk-days button.on b { color: var(--accent-ink); }
.tk-days button.on i { background: var(--accent-ink); }
.tk-pill { display: block; margin: 0 auto 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 3px 14px; font-size: .78rem; color: var(--muted); cursor: pointer; }
.tk-pill.off { width: max-content; opacity: .6; cursor: default; }
.tk-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.tk-chips button { flex: none; border: 0; background: none; border-radius: 99px; padding: 6px 10px; font-size: .78rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.tk-chips button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tk-chips.dark { margin: 0 0 12px; }
.tk-chips.dark button { border: 1px solid var(--line); background: var(--surface); }
.tk-chips.dark button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.tk-chips i { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: .7rem; margin-left: 2px; }
.tk-btns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-bottom: 10px; }
.tk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 14px; border-radius: 99px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent-text); font-weight: 650; font-size: .92rem; cursor: pointer; margin-bottom: 8px; }
.tk-btn:hover { text-decoration: none; }
.tk-btn.p { background: var(--accent); color: var(--accent-ink); }
.tk-btn.sm { width: auto; padding: 9px 16px; border-radius: 10px; }
.tk-btn[disabled] { opacity: .5; }
.tk-btns .tk-btn, .tk-btns .tk-sync { margin: 0; justify-content: center; }
.tk-mhead { display: flex; justify-content: space-between; align-items: center; }
.tk-mbtn > svg:last-child { transform: rotate(90deg); width: 16px; height: 16px; }
.tk-mbtn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-transform: lowercase; }
.tk-mhead .tk-pill { margin: 0; }
.tk-mday { display: grid; grid-template-columns: 54px 1fr; gap: 6px; margin: 14px 0; }
.tk-mdl { display: flex; align-items: center; gap: 6px; align-self: start; }
.tk-mdl span { font-size: .72rem; color: var(--accent-text); }
.tk-mdl b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font-size: .9rem; }
.tk-mdl b.today { background: var(--accent); color: var(--accent-ink); }
.tk-mdi { display: grid; gap: 8px; }
.tk-mi { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 0; border-left: 3px solid var(--line); background: var(--surface); border-radius: 0 12px 12px 0; color: var(--text); font: inherit; cursor: pointer; }
.tk-mi span { font-size: .8rem; color: var(--muted); }
.tk-yr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 1.2rem; }
.tk-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tk-months button { padding: 10px 0; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; color: var(--text); }
.tk-months button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tk-ohead { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.tk-ohead h1 { margin: 0; font-size: 1.35rem; }
.tk-sub { color: var(--muted); font-size: .85rem; }
.tk-oacts { display: flex; gap: 6px; align-items: flex-start; }
.tk-oacts .tk-ib { width: 38px; height: 38px; }
.tk-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tk-tabs button { flex: 1; border: 0; background: none; padding: 10px 6px; color: var(--muted); font: inherit; font-size: .92rem; border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; }
.tk-tabs button.on { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; }
.tk-line { display: flex; gap: 12px; align-items: center; padding: 8px 2px; color: var(--text); font-size: .9rem; }
a.tk-line:hover { text-decoration: none; }
.tk-line small, .tk-rl small, .tk-arow small, .tk-qh small { display: block; color: var(--muted); font-size: .78rem; }
.tk-ri { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.tk-ri svg { width: 18px; height: 18px; }
.tk-navbtn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 8px; padding: 12px; border-radius: 99px; background: #2563eb; color: #fff; font-weight: 600; }
.tk-navbtn:hover { text-decoration: none; }
.tk-det { display: block; }
.tk-det summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.tk-det summary::-webkit-details-marker { display: none; }
.tk-det summary > svg { margin-left: auto; color: var(--muted); }
.tk-det[open] summary > svg { transform: rotate(90deg); }
.tk-det p { margin: 8px 0 0 46px; white-space: pre-line; color: var(--muted); }
.tk-dur, .tk-ck { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.tk-dur span, .tk-ck span { color: var(--muted); }
.tk-rows { padding: 4px 12px; }
.tk-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.tk-row:last-child { border-bottom: 0; }
.tk-row > svg:last-child { color: var(--muted); width: 16px; height: 16px; }
.tk-rl { flex: 1; min-width: 0; }
.tk-chk { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; }
.tk-chk.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.tk-chk.ok svg { width: 14px; height: 14px; }
.tk-chk.warn { border: 2px dashed var(--warn); background: transparent; }
.tk-hint { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
.tk-pend { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: 14px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; color: var(--warn); }
.tk-pend strong { display: flex; align-items: center; gap: 6px; }
.tk-pitem { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: .88rem; padding: 4px 0; cursor: pointer; }
.tk-pitem svg { width: 16px; height: 16px; flex: none; }
.tk-pline { color: var(--text); font-size: .85rem; }
.tk-actbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; justify-content: center; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.tk-act { flex: 1; max-width: 260px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 99px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent-text); font-weight: 650; cursor: pointer; font-size: .92rem; }
.tk-act.p { background: var(--accent); color: var(--accent-ink); }
.tk-reasons { display: grid; gap: 8px; }
.tk-reasons button { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.tk-ptitle { margin: 4px 0 14px; font-size: 1.35rem; line-height: 1.25; }
.tk-photos, .tk-qph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tk-photos figure, .tk-qph figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.tk-photos img, .tk-qph img { width: 100%; height: 100%; object-fit: cover; }
.tk-photos figure .tk-ib, .tk-qph figure .tk-ib { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; background: rgba(0,0,0,.55); color: #fff; }
.tk-noph { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; }
.tk-noph svg { width: 44px; height: 44px; }
.tk-qph { margin-top: 6px; }
.tk-phadd { aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 4px; border: 1.5px dashed var(--line); border-radius: 10px; background: none; color: var(--muted); cursor: pointer; font-size: .72rem; }
.tk-field { display: grid; gap: 6px; margin-bottom: 10px; }
.tk-field input, .tk-field textarea { width: 100%; }
.tk-sigbox { display: grid; place-items: center; width: 100%; min-height: 140px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; margin-bottom: 6px; color: var(--muted); }
.tk-sigbox.sm { min-height: 90px; margin-top: 6px; }
.tk-sigbox img { max-width: 100%; max-height: 160px; background: #fff; border-radius: 8px; }
.tk-sigbox span { display: inline-flex; align-items: center; gap: 6px; }
.tk-link { border: 0; background: none; color: var(--accent-text); cursor: pointer; padding: 0 0 10px; font-size: .85rem; }
.tk-tot { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.tk-tot span { display: block; font-size: .72rem; color: var(--muted); }
.tk-tot b { font-variant-numeric: tabular-nums; }
.tk-acts { padding: 4px 12px; }
.tk-arow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.tk-arow:last-child { border-bottom: 0; }
.tk-arow > div { flex: 1; min-width: 0; }
.tk-arow.tot { font-size: 1.02rem; }
a.tk-arow:hover { text-decoration: none; }
.tk-qcard { display: block; width: 100%; text-align: left; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font: inherit; cursor: pointer; overflow: hidden; }
.tk-qh { display: flex; gap: 12px; align-items: center; padding: 12px; }
.tk-qh > div { flex: 1; }
.tk-qh > svg:last-child { color: var(--muted); width: 16px; height: 16px; }
.tk-qe { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 6px; font-size: .88rem; }
.tk-qe > span { display: flex; align-items: center; gap: 8px; }
.tk-qe svg { width: 16px; height: 16px; color: var(--accent-text); }
.tk-qp { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.tk-qs { font-size: .66rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tk-qs.and { background: var(--warn-soft); color: var(--warn); }
.tk-qs.fin { background: var(--ok-soft); color: var(--ok); }
.tk-qprog { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.tk-qprog .tk-bar i { background: var(--accent); }
.tk-eq { display: flex !important; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; grid-template-columns: none; }
.tk-eq select { flex: 1; border: 0; background: transparent; font: inherit; color: var(--text); padding: 4px 0; }
.tk-qq { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.tk-qq.req { border-left-color: #dc2626; }
.tk-qq.ok { border-left-color: var(--ok); }
.tk-ql { font-weight: 650; font-size: .92rem; }
.tk-qd { color: var(--muted); font-size: .8rem; margin-top: -4px; }
.tk-qq input:not([type=radio]):not([type=checkbox]), .tk-qq textarea, .tk-qq select { width: 100%; }
.tk-opts { display: grid; gap: 8px; }
.tk-opt { display: flex !important; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; grid-template-columns: none; }
.tk-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.tk-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.tk-fhead { font-size: .75rem; font-weight: 700; color: var(--accent-text); letter-spacing: .04em; }
.tk-fnav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--bg); max-width: 560px; margin: 0 auto; }
.tk-fnav .tk-btn { margin: 0; border-radius: 12px; }
.tk-drawer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); }
.tk-dpanel { width: min(320px, 86vw); height: 100%; background: var(--surface); display: flex; flex-direction: column; overflow-y: auto; }
.tk-dhead { display: flex; gap: 12px; align-items: center; padding: 22px 16px 18px; padding-top: max(22px, env(safe-area-inset-top)); background: var(--accent); color: var(--accent-ink); }
.tk-dhead .small { opacity: .85; }
.tk-dco { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.tk-dwho { flex: 1; min-width: 0; }
.tk-dwho strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-dout { align-self: flex-start; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 10px;
  color: var(--accent-ink); font-size: .72rem; font-weight: 600; background: rgba(255,255,255,.14); }
.tk-dout svg { width: 20px; height: 20px; }
.tk-dnav { display: grid; padding: 10px 8px; gap: 2px; flex: 1; align-content: start; }
.tk-dl { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--text); }
.tk-dl:hover { background: var(--surface-2); text-decoration: none; }
.tk-dli { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.tk-dli svg { width: 18px; height: 18px; }
.tk-dfoot { display: flex; justify-content: space-between; padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.tk-dfoot a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tk-dfoot svg { width: 18px; height: 18px; }
.tk-lock { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: .84rem; color: var(--muted); }
.tk-pk { margin-bottom: 10px; }
.tk-pk button { padding: 7px 18px; font-size: .85rem; }
.tk-arow .tk-ib { width: 34px; height: 34px; color: var(--muted); }
/* Tipo de tarefa: questionários na ordem em que aparecem na OS */
.tt-qlist { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.tt-qlist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tt-qlist li.tt-none { border-style: dashed; }
.tt-qn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: .78rem; font-weight: 700; flex: none; }
.tt-qname { flex: 1; min-width: 0; }
.tt-qlist .qtools { display: inline-flex; gap: 2px; }
.alert > svg { width: 18px; height: 18px; vertical-align: -3px; flex: none; }
.perm-it input { flex-shrink: 0; }
