/* AutoLoop Buy • Cotação & Orçamento */
.brand-buy { color: #e8a33d; }
:root {
  --navy: #1f4b70; --navy-2: #24557f; --navy-ink: #13293d;
  --bg: #f3f5f8; --surface: #ffffff; --line: #e1e6ec; --line-2: #eef1f5;
  --ink: #18222d; --muted: #66768a; --soft: #8a98a8;
  --best: #12805c; --best-bg: #e3f6ee; --best-line: #8fd3b5;
  --worst: #b4323a; --worst-bg: #fdf0f0;
  --warn: #a35f00; --accent: #e8a33d;
  --red: #c71920;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,32,48,.06), 0 4px 16px rgba(16,32,48,.05);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--navy-ink); }
p { margin: 4px 0 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.r { text-align: right; } .c { text-align: center; } .nowrap { white-space: nowrap; }
.pos { color: var(--best); } .warn { color: var(--warn); } .strong { font-weight: 700; }
.print-only { display: none; }

/* botões / campos */
button { font: inherit; cursor: pointer; border: 0; border-radius: 9px; padding: 9px 16px; font-weight: 600; transition: background .15s, box-shadow .15s, color .15s; }
button:disabled { opacity: .35; cursor: default; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; border-radius: 9px; padding: 9px 16px; }
.icon.armado { background: var(--worst); color: #fff; font-size: 11.5px; font-weight: 700; }
.noscroll { overflow: hidden; }
.preview { position: fixed; inset: 0; z-index: 60; background: rgba(10,20,32,.62); display: flex; flex-direction: column; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pv-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-note { font-size: 12px; color: var(--muted); max-width: 220px; }
.pv-scroll { flex: 1; overflow: auto; padding: 20px 16px 40px; }
.pv-page { background: #fff; width: 794px; max-width: none; margin: 0 auto; padding: 28px 32px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.primary { background: var(--navy-2); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.primary:hover { background: var(--navy); }
.ghost { background: var(--surface); color: var(--navy-2); border: 1px solid var(--line); }
.ghost:hover { border-color: #c6d1dc; background: #f9fbfc; }
.small { padding: 6px 10px; font-size: 12.5px; }
.full { width: 100%; }
.icon { background: transparent; color: var(--soft); padding: 4px 8px; font-size: 13px; }
.icon:hover { background: var(--line-2); color: var(--ink); }
.icon.danger:hover { color: var(--worst); background: var(--worst-bg); }
.add { margin-top: 10px; background: transparent; color: var(--navy-2); border: 1px dashed #c3cfdb; width: 100%; padding: 9px; }
.add:hover { background: #f2f6fa; border-color: var(--navy-2); }
kbd { font: 11px var(--mono); background: var(--line-2); border-radius: 4px; padding: 1px 5px; color: var(--muted); margin-left: 6px; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(36,85,127,.14); }
textarea { resize: vertical; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--navy-2); cursor: pointer; }
input.upper { text-transform: uppercase; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }

/* topo */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--navy-ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { display: block; font-size: 15px; line-height: 1.1; }
.brand small { color: #9fb3c8; font-size: 11.5px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #3b7fb8, #1f4b70); font-weight: 800; font-size: 13px; letter-spacing: -.03em; color: #fff; }
.brand-mark.big { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; margin-bottom: 10px; }
.topnav { display: flex; gap: 4px; }
.navbtn { background: transparent; color: #b8c7d6; padding: 7px 12px; }
.navbtn:hover { color: #fff; background: rgba(255,255,255,.07); }
.navbtn.on { color: #fff; background: rgba(255,255,255,.12); }
a.navbtn { text-decoration: none; display: inline-flex; align-items: center; border-radius: 8px; font-size: 14px; }
.topright { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.badge { font-size: 12px; color: #b8c7d6; }
.badge.demo { background: rgba(232,163,61,.18); color: #f6c77f; padding: 4px 10px; border-radius: 99px; }
.topright .ghost { background: transparent; color: #b8c7d6; border-color: rgba(255,255,255,.2); }

/* layout */
.wrap { max-width: 1480px; margin: 0 auto; padding: 22px 24px 60px; }
.wrap.narrow { max-width: 860px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead.sticky { position: sticky; top: 52px; z-index: 20; background: var(--bg); padding: 10px 0; margin-top: -10px; border-bottom: 1px solid transparent; }
.ph-left, .ph-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.cardhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.cardhead h2 { margin-bottom: 2px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.col-main, .col-side { min-width: 0; }
.col-side { position: sticky; top: 118px; }
.form4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.form4 .full { grid-column: 1 / -1; }
.loading, .empty { padding: 40px; text-align: center; color: var(--muted); }
.empty strong { color: var(--ink); display: block; font-size: 15px; margin-bottom: 4px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 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); display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 22px; font-weight: 800; font-family: var(--mono); letter-spacing: -.03em; }
.kpi em { font-style: normal; font-size: 12px; color: var(--soft); }
.kpi.ok strong { color: var(--best); }

.filters { display: flex; gap: 10px; margin-bottom: 12px; }
.filters input { flex: 1; } .filters select { width: 200px; }

/* tabelas */
.tblwrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.r { text-align: right; } .tbl th.c { text-align: center; }
.tbl td { padding: 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl.list td { padding: 11px 8px; }
.tbl.list tbody tr { cursor: pointer; }
.tbl.list tbody tr:hover td { background: #f7f9fb; }
.plate { display: inline-block; font: 600 11px var(--mono); background: #f0f3f6; border: 1px solid #d6dde4; padding: 1px 6px; border-radius: 4px; margin-left: 4px; color: var(--navy-ink); }
.status { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.st-rascunho { background: #eef1f5; color: #586779; }
.st-enviado { background: #fff3df; color: #9a5a00; }
.st-aprovado { background: var(--best-bg); color: var(--best); }
.st-recusado { background: var(--worst-bg); color: var(--worst); }
.st-parcial { background: #e6f0fb; color: #1d5fa3; }
.aguarda { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; }
.linkbox { font: 12px var(--mono); background: var(--line-2); padding: 6px 10px; border-radius: 6px; color: var(--navy-ink); max-width: 100%; overflow-wrap: anywhere; }
.resposta { border-width: 2px; }
.resposta.ok { border-color: var(--best-line); background: linear-gradient(0deg, #fff, #f3fbf7); }
.resposta.parcial { border-color: #9cc3ea; background: linear-gradient(0deg, #fff, #f2f7fd); }
.resposta.neg { border-color: #f0b4b4; background: linear-gradient(0deg, #fff, #fdf4f4); }
.resp-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.resp-head h2 { margin: 6px 0 2px; font-size: 18px; }
.resp-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 9px; border-radius: 99px; background: var(--best); color: #fff; }
.resposta.parcial .resp-tag { background: #1d5fa3; } .resposta.neg .resp-tag { background: var(--worst); }
.resp-total { text-align: right; } .resp-total span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.resp-total strong { font-size: 24px; } .resp-total small { display: block; color: var(--soft); font-size: 12px; }
.resp-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; margin-top: 14px; align-items: start; }
.resp-itens { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.resp-itens li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.resp-itens li span { font-size: 10px; font-weight: 800; color: var(--muted); width: 58px; flex: none; }
.resp-itens li b { margin-left: auto; white-space: nowrap; }
.resp-sig { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.resp-sig img { width: 100%; height: 110px; object-fit: contain; }
.resp-sig figcaption { font-size: 11px; color: var(--soft); border-top: 1px solid var(--line); padding-top: 4px; }
.resp-motivo { margin-top: 10px; color: var(--worst); }
.chip-ok, .chip-no { display: inline-block; margin: 3px 0 0 6px; font-size: 10.5px; font-weight: 700; }
.chip-ok { color: var(--best); } .chip-no { color: var(--worst); text-decoration: line-through; opacity: .8; }
@media (max-width: 760px) { .resp-body { grid-template-columns: 1fr; } .resp-total { text-align: left; } }
.status-select { width: auto; font-weight: 700; font-size: 12.5px; padding: 5px 10px; border-radius: 99px; border: 0; }
.savestate { font-size: 12px; color: var(--soft); }
.savestate.ok { color: var(--best); }

/* cotação */
.tbl.cot input, .tbl.serv input { padding: 6px 7px; border-radius: 6px; border-color: transparent; background: #f6f8fa; }
.tbl.cot input:hover, .tbl.serv input:hover { border-color: var(--line); }
.tbl.cot input:focus, .tbl.serv input:focus { background: #fff; border-color: var(--navy-2); }
.w-nome { min-width: 170px; } .w-qtd { width: 62px; } .w-val { width: 120px; }
.tbl.cot td:nth-child(2) { min-width: 170px; }
.tbl.cot td, .tbl.cot th { padding-left: 4px; padding-right: 4px; }
.tbl.cot td:nth-child(3) input { width: 52px; }
th.forn { text-align: center; color: var(--navy-ink); min-width: 116px; }
th.forn small { display: block; font-size: 9.5px; font-weight: 500; color: var(--soft); text-transform: none; letter-spacing: 0; margin-top: 1px; }
.forn-cell { padding: 5px 4px !important; border-left: 1px solid var(--line-2); }
.fc { display: grid; grid-template-columns: 1fr 36px; gap: 3px; }
.fc input { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.fc input.desc { text-align: center; font-size: 11.5px; color: var(--muted); }
.liq { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; margin-top: 3px; padding: 3px 4px; border-radius: 6px; background: transparent; font: 600 12.5px var(--mono); color: var(--muted); border: 1px solid transparent; min-height: 24px; }
.liq:not(:disabled):hover { border-color: var(--line); color: var(--ink); }
.liq i { font: 700 9.5px Inter, sans-serif; font-style: normal; text-transform: uppercase; letter-spacing: .04em; background: var(--best); color: #fff; padding: 1px 5px; border-radius: 4px; }
.forn-cell.best .liq { color: var(--best); }
.forn-cell.worst .liq { color: var(--worst); }
.forn-cell.chosen .liq { background: var(--best-bg); border-color: var(--best-line); color: var(--best); }
.forn-cell.chosen:not(.best) .liq { background: #fff6e8; border-color: #f0c98b; color: var(--warn); }
.tag-best { color: var(--best); }
td.custo { white-space: nowrap; font-size: 13px; }
td.custo small, td.total small { display: block; font-size: 10.5px; font-weight: 600; }
.venda-cell { width: 96px; } .venda-cell input.venda { width: 92px; }
.venda-cell input.venda { font-weight: 700; color: var(--navy-ink); background: #eef4fa !important; }
.venda-cell input.venda.manual { background: #fff6e8 !important; color: var(--warn); }
.mkline { display: flex; align-items: center; justify-content: flex-end; gap: 2px; margin-top: 3px; font-size: 11px; color: var(--soft); }
.mkline input.mk { width: 48px; padding: 2px 5px !important; font-size: 11px; text-align: right; font-family: var(--mono); }
td.total { font-weight: 700; white-space: nowrap; }
tr.off td { opacity: .45; }
tr.off td:first-child { opacity: 1; }
.markup-box { display: flex; align-items: center; gap: 8px; background: #f3f7fb; border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--navy-ink); }
.markup-box input { width: 64px; text-align: center; font-family: var(--mono); font-weight: 700; padding: 5px; }

/* resumo */
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; align-items: center; }
.summary dt { color: var(--muted); font-size: 13px; }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary dd input { width: 110px; text-align: right; padding: 5px 8px; }
.bigtotal { margin: 16px -18px; padding: 16px 18px; background: var(--navy-ink); color: #fff; display: flex; flex-direction: column; gap: 2px; }
.bigtotal span { font-size: 12px; color: #9fb3c8; font-weight: 600; }
.bigtotal strong { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.bigtotal small { color: #9fb3c8; font-size: 12px; }
.internal { background: #f6faf8; border: 1px dashed #b9dccb; border-radius: 10px; padding: 12px; }
.int-title { font-size: 12px; font-weight: 700; color: var(--best); margin-bottom: 8px; }
.int-title span { font-weight: 500; color: var(--soft); }

/* config */
.fornrow { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.fornrow > input { flex: 1; text-transform: uppercase; font-weight: 600; }
.fornrow label input { width: 64px; text-align: center; }

/* login */
.login { min-height: 70vh; display: grid; place-items: center; padding: 24px; }
.login form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.login .err { color: var(--worst); font-size: 13px; }

/* aviso */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy-ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--worst); }

/* responsivo */
@media (max-width: 1320px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; }
  .summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: start; }
  .summary h2 { grid-column: 1 / -1; margin: 0; }
  .summary .bigtotal { margin: 0; border-radius: 10px; }
}
@media (max-width: 1100px) {
  .summary { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; order: -1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .brand small, .badge { display: none; }
  .wrap { padding: 16px 16px 60px; }
  .pagehead.sticky { top: 0; position: static; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi strong { font-size: 18px; }
  .filters { flex-direction: column; } .filters select { width: 100%; }
  .tbl.list th:nth-child(3), .tbl.list td:nth-child(3), .tbl.list th:nth-child(4), .tbl.list td:nth-child(4), .tbl.list th:nth-child(7), .tbl.list td:nth-child(7) { display: none; }
  .tblwrap { margin: 0 -18px; }
}

/* ============ impressão: orçamento no layout MLK ============ */
@page { size: A4; margin: 10mm; }
@media print {
  .no-print { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff; }
}
.doc, .doc * { -webkit-text-size-adjust: none; text-size-adjust: none; }
.doc p, .doc div, .doc td, .doc h3, .doc h4 { max-height: none; }
.doc { font: 10.5px/1.4 Inter, Arial, sans-serif; color: #25384d; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc h4 { font-size: 11px; font-weight: 800; color: #24557f; margin-bottom: 4px; }
.d-head { display: flex; justify-content: space-between; align-items: stretch; gap: 16px; }
.d-logo img { height: 62px; display: block; }
.d-logo p { color: #596b7d; font-style: italic; margin-top: 4px; }
.d-box { background: #24557f; color: #fff; padding: 8px 16px; min-width: 250px; }
.d-box h1 { font-size: 22px; letter-spacing: .02em; text-align: right; margin-bottom: 4px; }
.d-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; }
.d-meta b { font-weight: 800; }
.d-red { height: 4px; background: #c71920; margin: 8px 0 6px; }
.d-sec { background: #eaf2f8; color: #24557f; font-size: 11.5px; text-align: center; padding: 3px; margin: 4px 0; font-weight: 800; }
.d-cli { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1fr; gap: 6px; padding: 3px 2px 6px; }
.d-cli span { color: #58708a; font-weight: 800; }
.d-tbl { width: 100%; border-collapse: collapse; }
.d-tbl th { background: #24557f; color: #fff; font-size: 10px; padding: 3px 6px; }
.d-tbl td { border: 1px solid #cfd8e2; padding: 3px 6px; height: 17px; }
.d-tbl tbody tr:nth-child(even) td { background: #f5f7fa; }
.d-tbl td.peca { color: #24557f; font-weight: 800; } .d-tbl td.serv { color: #c71920; font-weight: 800; }
.d-tbl th:nth-child(1) { width: 62px; } .d-tbl th:nth-child(3) { width: 44px; } .d-tbl th:nth-child(4), .d-tbl th:nth-child(5) { width: 96px; }
.d-obsorc { margin-top: 6px; padding: 5px 8px; background: #f5f7fa; border-left: 3px solid #24557f; }
.d-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 8px; }
.d-obs p { color: #4e6073; }
.d-total { background: #eaf2f8; text-align: center; padding: 8px; display: flex; flex-direction: column; justify-content: center; }
.d-total strong { font-size: 24px; font-weight: 800; color: #172436; }
.d-total small { color: #4e6073; }
.d-pay { margin-top: 8px; background: #fff6eb; border: 1px solid #f3c78f; padding: 6px 10px; text-align: center; }
.d-pay h4 { color: #b43b0a; font-size: 12.5px; }
.d-pay p { font-size: 11.5px; color: #24557f; }
.d-aprov { background: #ecf8f0; text-align: center; padding: 8px; }
.d-aprov h4 { color: #087e72; }
.d-entrega { text-align: center; color: #c71920; font-weight: 800; margin: 8px 0 4px; }
.d-foot { display: flex; justify-content: space-between; border-top: 2px solid #24557f; padding-top: 4px; color: #4b6075; font-size: 9.5px; }
.d-foot .r b { color: #24557f; }
#listaBody { overflow-x: auto; }
@media (max-width: 640px) { .pv-note { display: none; } .pv-bar { padding: 8px 16px; } }

.int-sub { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; padding-top: 10px; border-top: 1px dashed #b9dccb; }
.selo { display: inline-block; font-family: inherit; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: 4px; vertical-align: 1px; }
.selo.ok { background: var(--best-bg); color: var(--best); }
.selo.baixo { background: var(--worst-bg); color: var(--worst); }
.neg-v { color: var(--worst); }
.baixo-v { color: var(--worst) !important; font-weight: 700; }
.int-alerta { margin: 10px 0 6px; background: #fff6d6; border: 1px solid #f0d27a; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #6b4b00; line-height: 1.4; }
.int-alerta b { display: block; margin-bottom: 4px; }
.int-alerta ul { margin: 0; padding-left: 16px; }
.int-alerta li { margin-bottom: 4px; }
.int-alerta li b { display: inline; margin: 0; }

/* condições de pagamento do orçamento */
.pagto { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pagto-tit { width: 100%; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pagto .pagto-op { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0; }
.pagto .pagto-op input { width: 16px; height: 16px; margin: 0; flex: none; }
.pagto p { width: 100%; margin-top: 4px; }
.mkline input.mk.oleo::placeholder { color: var(--warn); font-weight: 700; }

/* aviso de resposta do cliente (lado direito) */
.avisos-resp { position: fixed; bottom: 20px; right: 16px; z-index: 80; display: flex; flex-direction: column-reverse; gap: 10px; width: min(340px, calc(100vw - 32px)); }
.aviso-resp { position: relative; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--best); border-radius: 12px; padding: 14px 36px 14px 14px; box-shadow: 0 12px 32px rgba(16,32,48,.22); animation: arEntra .3s ease-out; }
.aviso-resp.parcial { border-left-color: #1d5fa3; } .aviso-resp.neg { border-left-color: var(--worst); }
.aviso-resp.saindo { opacity: 0; transform: translateX(30px); transition: .25s; }
.ar-ic { font-size: 24px; line-height: 1; }
.ar-corpo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ar-corpo b { font-size: 15px; } .ar-corpo span { font-size: 12.5px; color: var(--muted); }
.ar-corpo strong { font-size: 18px; color: var(--best); margin-top: 2px; } .ar-corpo em { font-size: 12.5px; color: var(--worst); }
.ar-acoes { margin-top: 8px; }
.ar-x { position: absolute; top: 6px; right: 6px; background: transparent; color: var(--muted); padding: 4px 8px; font-size: 13px; }
@keyframes arEntra { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* botão de tema */
.btn-tema { background: rgba(255,255,255,.1); color: #fff; padding: 6px 10px; font-size: 15px; line-height: 1; border-radius: 8px; }
.btn-tema:hover { background: rgba(255,255,255,.18); }

/* ---------- tema escuro ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d151e; --surface: #15202b; --line: #263545; --line-2: #1c2935;
  --ink: #e3eaf1; --muted: #9aabbd; --soft: #7b8da0; --navy-ink: #08111a;
  --best: #43c48e; --best-bg: #11301f; --best-line: #2a6a4f;
  --worst: #f27d7d; --worst-bg: #3a1b1d; --warn: #f2b14d;
}
[data-theme="dark"] h2, [data-theme="dark"] th.forn, [data-theme="dark"] .plate, [data-theme="dark"] .linkbox, [data-theme="dark"] .venda-cell input.venda { color: var(--ink); }
[data-theme="dark"] .ghost, [data-theme="dark"] .add { color: #8fbbe3; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #101923; }
[data-theme="dark"] .tbl.cot input, [data-theme="dark"] .tbl.serv input { background: #1a2734; }
[data-theme="dark"] .tbl.cot input:focus, [data-theme="dark"] .tbl.serv input:focus { background: #101923; }
[data-theme="dark"] .ghost:hover, [data-theme="dark"] .add:hover, [data-theme="dark"] .tbl.list tbody tr:hover td { background: #1c2a38; }
[data-theme="dark"] .plate { background: #1c2935; border-color: #33475a; }
[data-theme="dark"] .st-rascunho { background: #233142; color: #b7c4d2; }
[data-theme="dark"] .st-enviado { background: #3a2a10; color: #f2b14d; }
[data-theme="dark"] .st-parcial { background: #13283f; color: #8fbbe3; }
[data-theme="dark"] .resposta.ok { background: linear-gradient(0deg, var(--surface), #12291f); }
[data-theme="dark"] .resposta.parcial { background: linear-gradient(0deg, var(--surface), #13243a); border-color: #2c5584; }
[data-theme="dark"] .resposta.neg { background: linear-gradient(0deg, var(--surface), #2e1719); border-color: #6b2c30; }
[data-theme="dark"] .resp-sig { background: #fff; }
[data-theme="dark"] .forn-cell.chosen:not(.best) .liq, [data-theme="dark"] .venda-cell input.venda.manual { background: #33260f !important; border-color: #6b5220; }
[data-theme="dark"] .venda-cell input.venda { background: #16283a !important; }
[data-theme="dark"] .markup-box { background: #172433; color: var(--ink); }
[data-theme="dark"] .internal { background: #111f1a; border-color: #2a5242; }
[data-theme="dark"] .int-sub { border-top-color: #2a5242; }
[data-theme="dark"] .int-alerta { background: #33290d; border-color: #6b5520; color: #f3d48a; }
[data-theme="dark"] .bigtotal { background: #0a1520; }
[data-theme="dark"] .aviso-resp { box-shadow: 0 12px 32px rgba(0,0,0,.5); }

.int-sub span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--soft); }
