/* ============================================================
   Resolv Pedidos — mesmo padrão visual do Resolv ERP
   Tokens e componentes vindos de packages/ui-kit/base.css e
   packages/core-ui/estilos.css do monorepo da Resolv.
   ============================================================ */
:root {
  --bg: #f3f5f8; --card: #fff; --ink: #1a2230; --muted: #667085; --line: #e2e6ec;
  --brand: #1d4f91; --brand-ink: #143a6b; --brand-cl: #eef4fb;
  --verde: #2f9e58; --amarelo: #e6a417; --vermelho: #d64545; --cinza: #98a2b3;
  --radius: 14px; --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  /* apelidos usados pelo bloco de impressão e pelo login */
  --fundo: var(--bg); --borda: var(--line); --texto: var(--ink); --suave: var(--muted);
  --prim: var(--brand); --prim-esc: var(--brand-ink); --prim-cl: var(--brand-cl);
  --topo: #0f2747; --ok: var(--verde); --erro: var(--vermelho); --raio: var(--radius);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
[hidden] { display: none !important; }

/* ---------------- casca: barra lateral + conteúdo ---------------- */
.shell { display: flex; min-height: 100dvh; }
.sidebar { width: 236px; flex: none; color: #fff; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  background: linear-gradient(170deg, #0f2747 0%, #143a6b 60%, #1d4f91 100%); z-index: 30;
  display: flex; flex-direction: column; padding: 16px 12px; }
.side-marca { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; }
.side-marca img { height: 30px; width: auto; display: block; }
.side-marca strong { display: block; font-size: 14.5px; line-height: 1.2; }
.side-marca small { display: block; color: rgba(255,255,255,.6); font-size: 11px; }
.side-grupo { color: rgba(255,255,255,.45); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; padding: 14px 12px 5px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent;
  color: rgba(255,255,255,.82); padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 14.5px; font-weight: 600;
  cursor: pointer; text-align: left; }
.side-nav button:hover { background: rgba(255,255,255,.09); color: #fff; }
.side-nav button.on { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 3px 0 0 #7cb4ff; }
.side-nav .ic { width: 18px; text-align: center; flex: none; opacity: .9; font-size: 13px; }
.side-pe { margin-top: auto; padding: 14px 12px 2px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.5); font-size: 11px; }

.conteudo { flex: 1; min-width: 0; padding: 18px 26px 48px; }
.topo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.topo h1 { margin: 0; font-size: 22px; color: var(--brand-ink); }
.menu-btn { display: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 16px; cursor: pointer; }
.veu { display: none; }

.eu { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.eu b { color: var(--ink); font-weight: 700; }
.eu .papel { background: var(--brand-cl); color: var(--brand-ink); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }

/* ---------------- títulos, cards, textos ---------------- */
.section-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 800; color: var(--brand-ink);
  margin: 4px 0 12px; text-transform: uppercase; letter-spacing: .5px; }
.section-title::before { content: ''; width: 5px; height: 16px; border-radius: 3px; background: var(--brand); flex: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: 13px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0; color: var(--brand-ink); }

/* ---------------- abas em pílula ---------------- */
.cad-sub { display: flex; gap: 4px; margin: 0 0 12px; flex-wrap: wrap; }
.cad-sub button { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); }
.cad-sub button:hover { background: #f1f5fb; }
.cad-sub button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------------- botões ---------------- */
.auth-btn { width: 100%; margin-top: 14px; padding: 12px; color: #fff;
  background: linear-gradient(135deg, #2563b8 0%, var(--brand) 100%); border: 0; border-radius: 11px;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 8px 18px rgba(29,79,145,.22); }
.auth-btn:hover:not(:disabled) { filter: brightness(1.06); }
.auth-btn:disabled { opacity: .6; cursor: default; }
.cad-btn { width: auto !important; margin-top: 0 !important; padding: 10px 16px !important; white-space: nowrap; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 12px; color: var(--ink); white-space: nowrap; }
.mini:hover { background: #f1f5fb; }
.mini.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.mini-danger { color: var(--vermelho); border-color: #f0c9c9; }
.mini-ok { color: var(--verde); border-color: #bfe0cd; }
.linklike, .backlink { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-weight: 600; padding: 0; }
.linklike:hover { text-decoration: underline; }
.icone { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.icone:hover { background: #f1f5fb; color: var(--vermelho); }
@media (pointer: coarse) { .mini { min-height: 38px; padding: 8px 12px; font-size: 13px; display: inline-flex; align-items: center; } }

/* ---------------- formulários (padrão .pf-* do ERP) ---------------- */
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.pf-head h3 { margin: 0; }
.pf-sec { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--brand);
  margin: 18px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.pf-sec:first-of-type { margin-top: 12px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.pf-grid label, label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
input, select, textarea { font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); background: #fff;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #bfd4ee; border-color: var(--brand); }
input:disabled, input:read-only:not(.calc) { background: #f2f4f7; }
textarea { resize: vertical; }
input.inp-erro, select.inp-erro { border-color: var(--vermelho) !important; }
input.inp-erro:focus { outline-color: #f0c9c9; }
.campo-erro { color: var(--vermelho); font-size: 12px; margin-top: 4px; }
.pf-dica { font-size: 11.5px; font-weight: 600; color: var(--cinza); text-transform: none; margin-top: 3px; }
.pf-buscando { color: var(--brand); font-weight: 700; text-transform: none; }
.pf-2 { grid-column: span 2; } .pf-3 { grid-column: 1 / -1; }
.pf-inline { flex-direction: row !important; align-items: center; gap: 8px !important; align-self: end; padding-bottom: 9px; color: var(--ink); font-weight: 600; }
.pf-inline input { width: auto; }
.pf-acoes { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.pf-acoes .auth-btn { max-width: 220px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.com-botao { display: flex; gap: 6px; } .com-botao input { flex: 1; min-width: 0; }

/* ---------------- barra de ferramentas da lista ---------------- */
.pf-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pf-busca { flex: 1; min-width: 220px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.pf-toolbar-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-import { background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.pf-import code { background: #eceff4; border-radius: 6px; padding: 2px 6px; font-size: 12px; word-break: break-word; color: var(--ink); }
.pf-import .mini { margin-top: 10px; }
.fin-filtro { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------------- tabelas ---------------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--brand-ink); background: #f1f5fb; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; }
tbody tr:hover { background: #f8fafd; }
.empty, .vazio { text-align: center; color: var(--muted); padding: 30px; }
.acoes-linha { display: flex; gap: 4px; align-items: center; justify-content: flex-end; white-space: nowrap; }
td.celula-acoes:has(> .acoes-linha) { width: 1%; }

/* menu "⋯" de ações secundárias */
.mais-acoes-menu { position: fixed; z-index: 70; min-width: 160px; padding: 4px; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.mais-acoes-menu button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px;
  font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.mais-acoes-menu button:hover { background: #f1f5fb; }
.mais-acoes-menu button.perigo { color: #b42318; }

/* ---------------- etiquetas de situação ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.b-Bom, .b-Excelente { background: var(--verde); }
.b-Regular { background: var(--amarelo); color: #3b2600; }
.b-Critico { background: var(--vermelho); }
.b-null { background: #667085; }
.b-Info { background: var(--brand); }

/* ---------------- mensagens ---------------- */
.err { color: var(--vermelho); font-size: 13px; margin: 8px 0; font-weight: 600; }
.ok-msg { color: var(--verde); font-size: 13px; margin: 4px 0 10px; font-weight: 600; }
.aviso { margin: 10px 0 0; padding: 9px 13px; border-radius: 10px; background: #fdf6e6; border: 1px solid #f3e0b4; color: #7a5600; font-size: 13px; }

/* ---------------- janelas (confirmação e cadastro rápido) ---------------- */
.modal-veu { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.45); display: grid; place-items: center; padding: 16px; }
.modal-caixa { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overflow-wrap: anywhere; margin: 0; }
.plano-caixa { width: min(820px, 96vw); max-height: 88vh; overflow: auto; }
.modal-caixa h3 { margin-bottom: 10px; }
.modal-caixa p { color: var(--muted); font-size: 14px; margin: 0 0 8px; white-space: pre-line; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.modal-acoes .auth-btn { width: auto; margin: 0; padding: 10px 18px; }
.modal-acoes .auth-btn.perigo { background: var(--vermelho); box-shadow: 0 8px 18px rgba(214,69,69,.22); }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--topo); color: #fff;
  padding: 11px 18px; border-radius: 10px; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; max-width: calc(100vw - 32px); }
#toast.erro { background: var(--vermelho); }

/* ---------------- responsivo ---------------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.aberto { transform: none; }
  .veu { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .menu-btn { display: inline-block; }
  .conteudo { padding: 14px 16px 36px; }
}
@media (max-width: 720px) { .pf-grid { grid-template-columns: 1fr 1fr; } .pf-2 { grid-column: span 2; } }
@media (max-width: 460px) { .pf-grid { grid-template-columns: 1fr; } .pf-2 { grid-column: span 1; } }
@media (max-width: 560px) { input, select, textarea { font-size: 16px !important; } }

/* tabela vira cartões no celular (mesma mágica do ERP: cada td leva data-label) */
@media (max-width: 700px) {
  .tablewrap:has(.tabela-cartoes) { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  table.tabela-cartoes { min-width: 0 !important; width: 100%; border-collapse: separate; }
  table.tabela-cartoes thead { display: none; }
  table.tabela-cartoes tbody tr { display: block; background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; margin-bottom: 10px; padding: 8px 12px; box-shadow: var(--shadow); }
  table.tabela-cartoes tbody tr:hover { background: var(--card); }
  table.tabela-cartoes tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border: 0; padding: 5px 0; text-align: right; }
  table.tabela-cartoes tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: 0 0 auto; font-weight: 600; }
  table.tabela-cartoes tbody td[data-label=""]::before { display: none; }
  table.tabela-cartoes tbody td.vazio, table.tabela-cartoes tbody td.empty { display: block; text-align: center; }
  table.tabela-cartoes td.celula-acoes:has(> .acoes-linha) { width: auto; }
  table.tabela-cartoes tbody td.celula-acoes { justify-content: flex-start; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
  table.tabela-cartoes .acoes-linha { justify-content: flex-start; flex-wrap: wrap; }
}
/* ---------------- IMPRESSÃO ---------------- */
#impressao { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .shell, dialog, #toast, .modal-veu { display: none !important; }
  #impressao { display: block; font-size: 11px; color: #000; }
}
.doc {
  --ink: #111418; --cinza: #5b6472; --linha: #e3e6eb; --fundo-d: #f4f5f7; --acento: #0f5ecb;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); font-size: 9.5pt; line-height: 1.4;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  display: flex; flex-direction: column; min-height: 266mm;
}
.doc b, .doc strong { font-weight: 600; }
.d-topo { display: grid; grid-template-columns: auto 1fr auto; gap: 7mm; align-items: center; padding-bottom: 5mm; border-bottom: 2.5px solid var(--ink); }
.d-logo { height: 21mm; width: auto; display: block; }
.d-emp { display: flex; flex-direction: column; gap: 1px; color: var(--cinza); font-size: 8.5pt; border-left: 1px solid var(--linha); padding-left: 6mm; }
.d-emp strong { color: var(--ink); font-size: 11pt; letter-spacing: .01em; margin-bottom: 1mm; }
.d-num { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1.5mm; }
.d-tipo { font-size: 8pt; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--cinza); }
.d-n { background: var(--ink); color: #fff; font-size: 17pt; font-weight: 800; padding: 1.5mm 4mm; border-radius: 2mm; letter-spacing: .02em; }
.d-status { font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--acento); border: 1px solid var(--acento); border-radius: 99px; padding: .5mm 2.5mm; }

.d-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(28mm, 1fr)); margin: 5mm 0; background: var(--fundo-d); border-radius: 2mm; overflow: hidden; }
.d-info div { padding: 2.5mm 3.5mm; border-right: 1px solid #fff; }
.d-info div:last-child { border-right: 0; }
.d-info span, .d-rot { display: block; font-size: 6.8pt; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--cinza); margin-bottom: .8mm; }
.d-info b { font-size: 9.5pt; }

.d-partes { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 5mm; }
.d-parte { border: 1px solid var(--linha); border-left: 3px solid var(--ink); border-radius: 1.5mm; padding: 3mm 4mm; color: #333a45; font-size: 8.8pt; }
.d-nome { font-size: 10.5pt; font-weight: 700; color: var(--ink); margin-bottom: 1mm; }
.d-contato { margin-top: 1.2mm; color: var(--cinza); }

.d-itens { width: 100%; border-collapse: separate; border-spacing: 0; }
.d-itens th { background: var(--ink); color: #fff; font-size: 7pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2.4mm 3mm; border: 0; }
.d-itens th:first-child { border-radius: 1.5mm 0 0 1.5mm; } .d-itens th:last-child { border-radius: 0 1.5mm 1.5mm 0; }
.d-itens td { padding: 2.6mm 3mm; border-bottom: 1px solid var(--linha); color: var(--ink); vertical-align: top; }
.d-itens tbody tr:nth-child(even) td { background: #fafbfc; }
.d-itens .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-idx { color: #9aa2ae; font-weight: 600; width: 8mm; }
.d-desc { font-weight: 600; }
.d-cod { font-size: 7.5pt; color: var(--cinza); margin-top: .5mm; }
.d-itens tr { break-inside: avoid; }

.d-baixo { display: grid; grid-template-columns: 1fr 80mm; gap: 6mm; margin-top: 5mm; break-inside: avoid; }
.d-obs p { margin: 0; color: #333a45; }
.d-nota { background: #fff7e6; border: 1px solid #f3d9a4; border-left: 3px solid #d98e04; border-radius: 1.5mm; padding: 3mm 4mm; margin-bottom: 4mm; color: #5a4210; font-size: 8.6pt; }
.d-nota > b:first-child { display: block; font-size: 7pt; letter-spacing: .12em; text-transform: uppercase; color: #a26a00; margin-bottom: 1mm; }
.d-totais { background: var(--fundo-d); border-radius: 2mm; padding: 3mm 4mm; align-self: start; }
.d-totais > div { display: flex; justify-content: space-between; gap: 3mm; padding: 1.3mm 0; font-variant-numeric: tabular-nums; }
.d-ref { color: var(--cinza); font-size: 8pt; }
.d-ref span:last-child { white-space: nowrap; }
.d-total { background: var(--ink); color: #fff; margin: 2mm -4mm -3mm; padding: 3.5mm 4mm !important; border-radius: 0 0 2mm 2mm; align-items: baseline; }
.d-total span { white-space: nowrap; font-size: 8pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.d-total strong { font-size: 15pt; font-weight: 800; }
.d-total-usd { font-size: 7.5pt; color: var(--cinza); justify-content: center !important; margin-top: 4mm; text-align: center; }

.d-assin { display: grid; grid-template-columns: 1fr 1fr; gap: 16mm; margin-top: auto; padding-top: 18mm; text-align: center; font-size: 8.8pt; font-weight: 600; break-inside: avoid; }
.d-assin span { display: block; border-top: 1px solid var(--ink); margin-bottom: 1.5mm; }
.d-assin small { display: block; font-weight: 400; color: var(--cinza); font-size: 7.5pt; margin-top: .8mm; }
.d-pe { display: flex; justify-content: space-between; margin-top: 8mm; padding-top: 2.5mm; border-top: 1px solid var(--linha); font-size: 7.2pt; color: #8a929e; }

/* ============================================================
   Telas específicas: pedido, cotações e login
   ============================================================ */

/* ---------------- pedido ---------------- */
.duas { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.duas > .card { margin-bottom: 0; }
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opcao { flex-direction: row !important; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; color: var(--ink); font-weight: 400; font-size: 14px; }
.opcao input { width: auto; margin-top: 3px; flex: none; }
.opcao strong { display: block; font-size: 14.5px; font-weight: 700; }
.opcao small { color: var(--muted); }
.opcao:has(input:checked) { border-color: var(--brand); background: var(--brand-cl); box-shadow: inset 0 0 0 1px var(--brand); }

.ficha { margin-top: 10px; font-size: 13px; color: var(--muted); background: #f8fafd; border-radius: 10px; padding: 0; line-height: 1.6; }
.ficha:not(:empty) { padding: 11px 13px; border: 1px solid var(--line); }
.ficha b { color: var(--ink); }

.itens th, .itens td { padding: 6px 7px; }
.itens input, .itens select { padding: 7px 8px; font-size: 13.5px; border-radius: 8px; }
.itens td.tot { font-weight: 700; white-space: nowrap; vertical-align: middle; }
.itens select[data-f="produto_id"] { min-width: 190px; }
.itens input[data-f="unidade"] { width: 64px; }
.itens input[data-f="qtd"], .itens input[data-f="desconto_pct"] { width: 82px; }
.preco-moeda { display: flex; gap: 4px; }
.preco-moeda select { width: 68px; padding: 7px 4px; }
.preco-moeda input { width: 104px; }
.conv { display: block; color: var(--muted); font-size: 11.5px; text-align: right; }
.itens-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.totais .linha { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); font-weight: 400; }
.totais .linha input { width: 130px; }
.totais .total { border-bottom: 0; padding-top: 14px; font-size: 15px; }
.totais .total strong { font-size: 24px; font-weight: 800; color: var(--brand-ink); }
.interno { margin-top: 14px; padding: 10px 13px 6px; border-radius: 12px; background: #f7f9fc; border: 1px dashed var(--line); }
.interno small { color: var(--cinza); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.interno .linha { font-size: 13px; padding: 6px 0; }
.interno .linha:last-child { border-bottom: 0; }
input.calc { background: #f1f5fb; color: var(--brand-ink); font-weight: 700; text-align: left; }
.neg { color: var(--vermelho) !important; }

/* ---------------- cotações ---------------- */
.cot-grade { display: grid; grid-template-columns: 430px 1fr; gap: 14px; align-items: start; }
.cot-grade > * { min-width: 0; }
.cot-grade > .card { margin-bottom: 0; }
.cot-dolar { flex-direction: row !important; align-items: center; gap: 8px; }
.cot-dolar .com-botao input { width: 112px; }
.cot-itens { table-layout: fixed; }
.cot-itens th, .cot-itens td { padding: 5px 5px; }
.cot-itens input, .cot-itens select { padding: 7px 8px; font-size: 13.5px; border-radius: 8px; width: 100%; min-width: 0; }
.cot-itens th:nth-child(2), .cot-itens td:nth-child(2) { width: 72px; }
.cot-itens th:nth-child(3), .cot-itens td:nth-child(3) { width: 100px; }
.cot-itens th:nth-child(4), .cot-itens td:nth-child(4) { width: 82px; }
.cot-itens th:nth-child(5), .cot-itens td:nth-child(5) { width: 34px; }
.comp { font-size: 13.5px; }
.comp th, .comp td { padding-left: 8px; padding-right: 8px; }
.comp tr.melhor td { background: #eef9f2; }
.comp .dif { color: var(--vermelho); font-weight: 600; }
.comp .icone { padding: 2px 5px; }
.comp-rodape { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
#cotComparativo { margin-top: 12px; }
#cotResumo tbody tr { cursor: pointer; }
.trunc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.check { flex-direction: row !important; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); font-size: 13px; }
.check input { width: auto; }
@media (max-width: 1000px) { .cot-grade, .duas { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .opcoes { grid-template-columns: 1fr; } }

/* ---------------- login ---------------- */
.tela-login { min-height: 100dvh; display: grid; place-items: center;
  background: linear-gradient(170deg, #0f2747 0%, #143a6b 60%, #1d4f91 100%); padding: 20px; }
.login-caixa { background: #fff; border-radius: 18px; padding: 34px 32px; width: min(390px, 100%);
  box-shadow: 0 24px 60px rgba(10,24,45,.35); text-align: center; }
.login-logo { height: 76px; width: auto; margin-bottom: 14px; }
.login-caixa h1 { font-size: 14px; color: var(--muted); font-weight: 700; margin-bottom: 22px; text-transform: uppercase; letter-spacing: .5px; }
.login-caixa form { display: grid; gap: 14px; text-align: left; }
.login-erro { margin: 0; background: #fdeceb; color: var(--vermelho); border-radius: 10px; padding: 10px 13px; font-size: 13px; font-weight: 600; }
