:root {
  --ink: #14261b;
  --muted: #6b7a70;
  --line: #e4ebe6;
  --paper: #f4f7f5;
  --card: #ffffff;
  --side: #0f2a1a;
  --side-2: #1a3d28;
  --green: #1f8a3b;
  --green-2: #167a32;
  --ok: #1f7a4d;
  --err: #b42318;
  --shadow: 0 1px 2px rgba(16, 38, 22, 0.04), 0 8px 24px rgba(16, 38, 22, 0.06);
  --radius: 14px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--green); text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { letter-spacing: -0.02em; }
.shell { min-height: 100vh; width: 100%; }
.menu-btn {
  position: fixed; z-index: 30; top: 12px; left: 12px;
  background: white; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow);
}
.side {
  position: fixed; z-index: 25; top: 0; left: 0; height: 100vh; width: 248px;
  background: var(--side); color: #f6f8f6; padding: 64px 16px 18px;
  transform: translateX(-105%); transition: transform .18s ease;
  display: flex; flex-direction: column;
}
.side.open, .side:hover { transform: translateX(0); }
.logo { width: 100%; height: auto; max-height: 84px; border-radius: 12px; object-fit: contain; display: block; background: #038034; }
.logo-login { width: 84px; height: 84px; object-fit: cover; border-radius: 18px; }
.brand { display: grid; gap: 6px; color: inherit; text-decoration: none; }
.brand strong { display: block; font-size: 0.98rem; }
.brand small { color: #b7c4ba; text-align: center; letter-spacing: .04em; font-size: .72rem; text-transform: uppercase; }
.side nav { display: grid; gap: 4px; margin: 22px 0; }
.side nav a, .side-foot a {
  color: #f4efe6; text-decoration: none; padding: 10px 12px; border-radius: 10px;
}
.side nav a:hover { background: rgba(255,255,255,0.06); }
.side nav a.on { background: var(--green); color: white; }
.side-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #c9c0b4; font-size: 0.86rem; }
.main { width: 100%; padding: 48px 8px 24px; max-width: none; margin: 0 auto; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.top h1 { margin: 0; font-size: 1.45rem; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 14px 0; box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 12px; font-size: 1.05rem; }
.panel-head, .btn-row, .cotacao-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  background: white; color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #8ec89a; box-shadow: 0 0 0 3px rgba(31,138,59,0.12); }
input.mini { padding: 6px 8px; }
.btn {
  background: var(--green); color: white; border: 0; border-radius: 10px;
  padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; font-weight: 600;
}
.btn:hover { background: var(--green-2); }
.btn.small { padding: 6px 10px; font-size: 0.84rem; }
.btn.ghost { background: white; color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.btn.ghost:hover { background: #f6faf7; }
.alert { border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.alert.ok { background: #e8f7ee; color: #146c3a; }
.alert.err { background: #fdecec; color: var(--err); }
.table-wrap, .sheet-scroll { width: 100%; max-width: 100%; overflow: auto; }
.sheet { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.sheet th, .sheet td {
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 3px; min-width: 52px; vertical-align: top; background: white; font-size: 0.75rem;
}
.sheet th { background: #f7faf8; color: #3d5346; font-weight: 700; position: sticky; top: 0; z-index: 2; }
.sheet .sticky, .sheet .sticky-2 { position: sticky; background: #fbfefc; z-index: 1; }
.sheet .sticky { left: 0; min-width: 78px; font-weight: 800; color: #102616; }
.sheet .sticky-2 { left: 78px; min-width: 58px; font-weight: 700; }
.plain { width: 100%; border-collapse: collapse; }
.plain th, .plain td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plain th { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.list { display: grid; gap: 8px; }
.row-link {
  display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: inherit; background: #fff;
}
.row-link:hover { border-color: #b7d8c0; }
.row-link strong { color: #12301c; }
.row-link.lida { background: #f7f8f7; color: #667; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 0.88rem;
}
.check input { width: auto; }
.afastado { margin-top: 14px; gap: 12px; }
.quote {
  display: grid; padding: 1px 3px; gap: 0; font-size: 0.60rem; border-radius: 4px;
  margin-bottom: 1px; background: #f7fbf7; max-width: 130px; line-height: 1.1;
  min-height: 0;
}
.quote strong { font-size: 0.70rem; }
.quem { position: relative; }
#dica-user { position: fixed; z-index: 80; background: #12301c; color: white; border-radius: 8px; padding: 3px 7px; font-size: 0.68rem; pointer-events: none; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.item-block.slim { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 8px 0; background: #fbfefc; }
.item-cod { font-weight: 800; color: #102616; margin-bottom: 4px; }
.opcao.linha { display: grid; grid-template-columns: 88px 1fr 1fr 110px; gap: 6px; }
.opcao.linha input { padding: 6px 8px; }
.peca-antiga { display: none; }
.lista-aberta .peca-antiga { display: table-row; }
.link-card { padding: 10px; }
.qtd input { width: 38px; padding: 1px 3px; font-size: 0.68rem; }
.quote.baixo { background: #a8e6b8; }
.quote.medio { background: #ffd966; }
.quote.alto { background: #ffd0d0; }
.quote { position: relative; }
.quote-extra {
  display: none; position: absolute; left: 0; top: 100%; z-index: 7; min-width: 100%; white-space: nowrap;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12); pointer-events: none;
}
.quote-extra .launch { pointer-events: auto; }
.quote:hover .quote-extra, .quote:focus-within .quote-extra { display: grid; }
.faixa { display: grid; gap: 6px; }
.faixa-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 6px 0; }
.atalho { text-decoration: none; color: inherit; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.qtd-fixa { display: inline-block; min-width: 24px; text-align: center; font-weight: 700; }
.leitura .quote { pointer-events: auto; }
.busca input { width: 180px; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 12px; }
.link-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; background: #fff; }
.picker { max-height: 240px; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  width: 156px; display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: white; font-size: 0.82rem;
}
.pick input { width: auto; }
.pick.on { border-color: var(--green); background: #eef8f0; }
.marca-chip, .muted, .eyebrow { font-size: 0.78rem; color: var(--muted); }
.legenda { display: flex; gap: 10px; align-items: center; font-size: 0.78rem; color: var(--muted); }
.cor { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cor.baixo { background: #a8e6b8; }
.cor.medio { background: #ffd966; }
.cor.alto { background: #ffd0d0; }
.quote-wrap { position: relative; }
.quote-more { display: none; border-left: 3px solid var(--green); padding-left: 4px; margin-top: 3px; }
.quote-wrap.open .quote-more { display: block; }
.quote-more .quote { max-width: 130px; }
.mais-marcas {
  display: inline-flex; align-items: center; border: 0; border-radius: 999px; background: #12301c; color: #fff;
  font-size: 0.64rem; font-weight: 700; padding: 2px 8px; cursor: pointer; margin-top: 1px; line-height: 1.2;
}
.mais-marcas:hover, .quote-wrap.open .mais-marcas { background: var(--green); }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: linear-gradient(180deg, #eef6ef, #f7faf8); }
.auth-card { width: min(380px, 100%); background: white; border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; box-shadow: var(--shadow); text-align: center; }
.auth-card.wide { width: min(760px, 100%); text-align: left; }
.auth-form { width: 100%; max-width: 100%; margin: 16px auto 0; display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 4px; text-align: center; font-size: 0.88rem; font-weight: 600; }
.auth-form input, .auth-form input[type="email"], .auth-form input[type="password"] { width: 100%; text-align: center !important; text-align-last: center; }
.auth-form input::placeholder { text-align: center; }
.auth-form .btn { width: 100%; justify-content: center; }
.picker-simples { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; max-height: 160px; overflow: auto; margin-top: 8px; }
.pick-simples { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; }
.pick-simples input { width: auto; }
.lista-simples { margin-top: 8px; }
.split { display: grid; gap: 14px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; }
dialog { border: 0; border-radius: 16px; padding: 16px; width: min(420px, calc(100% - 24px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 42, 26, 0.45); }
.link, button.link { background: none; border: 0; color: var(--green); padding: 0; cursor: pointer; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.stats article {
  background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow);
}
.stats span { display: block; color: var(--muted); font-size: 0.78rem; }
.stats strong { font-size: 1.6rem; color: #12301c; }
.badge {
  display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: 0.74rem;
  background: #eef6ef; color: #146c3a; font-weight: 700; text-transform: capitalize;
}
.badge.finalizada { background: #f2f4f3; color: #667; }
.badge.respondida { background: #e7f0fb; color: #1d4f91; }
.badge.pendente { background: #fff4d6; color: #8a5a00; }
.badge.enviado { background: #e7f0fb; color: #1d4f91; }
.badge.confirmado { background: #e8f5e9; color: #146c3a; }
.badge.recebido { background: #d9f2df; color: #0e5a2c; }
.badge.cancelado { background: #fdeaea; color: #a32b2b; }
.prazo-tag { display: block; color: var(--muted); font-size: 0.72rem; }
.filtros { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.filtros a { border: 1px solid #d7e6d8; border-radius: 999px; padding: 4px 11px; text-decoration: none; font-size: 0.82rem; color: #16301c; }
.filtros a.on { background: #1f8a3b; color: white; border-color: #1f8a3b; }
.pedido-num { font-weight: 800; letter-spacing: 0.02em; }
.stack { display: grid; gap: 10px; }
.mais-box { margin-top: 10px; display: grid; gap: 8px; }
@media (min-width: 1100px) {
  .side { transform: translateX(-200px); }
  .side.open, .side:hover { transform: translateX(0); }
  .main { padding: 22px 22px 28px 72px; }
}
@media (max-width: 720px) {
  .checks { grid-template-columns: 1fr; }
  .opcao.linha { grid-template-columns: 1fr; }
}

.item-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.indisp-btn { color: #c0392b; border-color: #f5c6c6; background: #fff5f5; }
.indisp-btn:hover { background: #fdecec; }
.indisp-btn.on { background: #c0392b; color: white; border-color: #c0392b; }
.item-block.is-indisp { border-color: #f5c6c6; background: #fff8f8; }
.indisp-msg { color: #c0392b; font-weight: 600; font-size: 0.9rem; margin-top: 6px; }
.quote.indisp { background: #fdecec; color: #c0392b; }
.quote.indisp strong { color: #c0392b; }

.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form label { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.alert[hidden] { display: none; }
.hist { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }
.hist a { color: inherit; }
.tag-alto { display: inline-block; background: #fdeaea; color: #a32b2b; border-radius: 999px; padding: 0 6px; font-size: 0.68rem; font-weight: 700; margin-left: 4px; }
.tag-bom { display: inline-block; background: #e8f5e9; color: #146c3a; border-radius: 999px; padding: 0 6px; font-size: 0.68rem; font-weight: 700; margin-left: 4px; }
.grafico { width: 100%; height: auto; max-width: 720px; }
.grafico .guia { stroke: #e3eee4; stroke-width: 1; }
.grafico .linha { fill: none; stroke: #1f8a3b; stroke-width: 2.2; stroke-linejoin: round; }
.grafico circle { fill: #1f8a3b; stroke: #fff; stroke-width: 1.5; }
.grafico text { font-size: 10px; fill: #667a6c; }
.cards-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 10px 0; }
.cards-resumo div { border: 1px solid #d7e6d8; border-radius: 10px; padding: 8px 10px; }
.cards-resumo span { display: block; color: var(--muted); font-size: 0.74rem; }
.cards-resumo strong { font-size: 1.05rem; }
.barra { background: #e8f1e9; border-radius: 999px; height: 8px; min-width: 70px; overflow: hidden; }
.barra i { display: block; height: 100%; background: #1f8a3b; }
.logo-previa { max-width: 120px; max-height: 120px; border-radius: 12px; border: 1px solid #d7e6d8; }

.sheet th:nth-child(3), .sheet td:nth-child(3) {
  min-width: 80px; max-width: 140px; width: 110px;
}

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 36px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 1.15rem; padding: 4px 6px;
  color: var(--muted); line-height: 1; z-index: 2;
}
.pw-eye:hover { color: var(--ink); }
.pw-eye { display: grid; place-items: center; }
.pw-eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye[aria-pressed="true"] { color: var(--green-2); }

.row-link { background: #f0f6ff; border-left: 4px solid #5b9bd5; animation: fadeIn 0.35s ease; transition: box-shadow 0.2s ease, transform 0.15s ease; }
.row-link:hover { box-shadow: 0 2px 8px rgba(91,155,213,0.15); transform: translateY(-1px); }
.row-link.lida { background: #f4f7f4; border-left-color: #a8c5a8; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.quote.alterado { outline: 2px solid #f0ad4e; outline-offset: -1px; }

.presenca { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d64545; margin-right: 6px; vertical-align: middle; flex: none; transition: background 0.2s, box-shadow 0.2s; }
.presenca.on { background: #2eb85c; box-shadow: 0 0 0 3px rgba(46, 184, 92, 0.28); }

.pedido-forn-bar { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.btn-pedido-forn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #cfe3d1; background: #f3faf4; color: #16301c; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.btn-pedido-forn svg { width: 18px; height: 18px; flex: none; }
.btn-pedido-forn .badge-qtd { background: #1f8a3b; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.74rem; }
.btn-pedido-forn .badge-qtd[hidden] { display: none; }
.btn-pedido-forn.novo { border-color: #1f8a3b; animation: pulsa 1.6s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 59, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(31, 138, 59, 0); } }
@media (prefers-reduced-motion: reduce) { .btn-pedido-forn.novo { animation: none; } }
#dlg-pedido-forn { width: min(680px, calc(100% - 24px)); max-height: calc(100% - 32px); overflow: auto; }
#dlg-pedido-forn .pf-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#dlg-pedido-forn h2 { margin: 0; font-size: 1.1rem; }

/* ===== Animações (v9) ===== */
.btn, .btn-pedido-forn { position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(31, 138, 59, .22); }
.btn:active { transform: scale(.97); }
.onda { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .5); transform: scale(0); animation: onda .6s ease-out; pointer-events: none; }
@keyframes onda { to { transform: scale(4); opacity: 0; } }

.stats article, .cards-resumo div { transition: transform .2s, box-shadow .2s, border-color .2s; animation: fadeIn .45s ease both; }
.stats article:hover, .cards-resumo div:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0, 0, 0, .08); border-color: #1f8a3b; }
.stats article:nth-child(2) { animation-delay: .06s; } .stats article:nth-child(3) { animation-delay: .12s; } .stats article:nth-child(4) { animation-delay: .18s; }
a.atalho { transition: transform .2s, box-shadow .2s; }
.entra { animation: fadeIn .4s ease both; }

.presenca.on { animation: pulsaBola 1.6s infinite; }
@keyframes pulsaBola { 0% { box-shadow: 0 0 0 0 rgba(46, 184, 92, .55); } 70% { box-shadow: 0 0 0 9px rgba(46, 184, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 184, 92, 0); } }

.quote { transition: transform .15s, box-shadow .2s; }
.quote:hover { transform: scale(1.03); box-shadow: 0 3px 10px rgba(0, 0, 0, .10); position: relative; z-index: 1; }
.quote.flash-novo { animation: flashNovo 2.2s ease 2; }
@keyframes flashNovo { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 25% { box-shadow: 0 0 0 4px rgba(47, 111, 208, .55); background: #e7f0fb; } }
#aviso-novas:not([hidden]) { animation: sobe .4s ease both; }

.barra i { transform-origin: left center; animation: cresce 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cresce { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#progresso { display: inline-block; }

.esq { height: 14px; border-radius: 7px; margin: 9px 0; background: linear-gradient(90deg, #eef4ee 25%, #f8fbf8 50%, #eef4ee 75%); background-size: 200% 100%; animation: brilho 1.2s linear infinite; }
@keyframes brilho { to { background-position: -200% 0; } }

dialog[open] { animation: dialogEntra .3s cubic-bezier(.2, .8, .2, 1); }
dialog[open]::backdrop { animation: fundoEntra .3s ease; }
@keyframes dialogEntra { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fundoEntra { from { opacity: 0; } to { opacity: 1; } }
dialog.saindo { animation: dialogSai .25s ease forwards; }
dialog.saindo::backdrop { animation: fundoSai .25s ease forwards; }
@keyframes dialogSai { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fundoSai { to { opacity: 0; } }
#dlg-pedido-forn[open] { margin: 0 0 0 auto; height: 100%; max-height: 100%; border-radius: 16px 0 0 16px; animation: gavetaEntra .4s cubic-bezier(.2, .8, .2, 1); }
#dlg-pedido-forn.saindo { animation: gavetaSai .3s ease forwards; }
@keyframes gavetaEntra { from { transform: translateX(100%); } to { transform: none; } }
@keyframes gavetaSai { to { transform: translateX(100%); } }
.badge-qtd.pop { animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.5); } }

#toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(92%, 360px); pointer-events: none; }
.toast { background: #16301c; color: #fff; border-radius: 12px; padding: 11px 14px; font-size: .86rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .22); animation: sobe .35s ease both, some .4s ease 3.8s forwards; }
@keyframes sobe { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes some { to { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Conferência de recebimento (v10) ===== */
.linha-falta td { background: #fdeaea; }
.linha-mais td { background: #fff4d6; }
.dif-falta { color: #a32b2b; font-weight: 700; }
.dif-mais { color: #8a5a00; font-weight: 700; }
.resumo-conf { margin: 8px 0; padding: 8px 12px; border-radius: 10px; border: 1px solid #d7e6d8; background: #f3faf4; }
.resumo-conf.dif { border-color: #f0c9c9; background: #fff8f8; }
.rec-input { width: 90px; text-align: right; font-weight: 700; }
.form-conf .nf-campo { display: grid; gap: 4px; max-width: 260px; margin: 12px 0; font-size: .86rem; }
.badge.divergente { background: #fdeaea; color: #a32b2b; }
.obs-rec { display: block; width: 100%; margin-top: 6px; font-size: .82rem; }
.form-conf .rec-input { width: 76px; }

/* ===== Notas fiscais e confirmação (v11) ===== */
.nf-box { border: 1px solid #d7e6d8; border-radius: 12px; padding: 10px 12px; margin: 12px 0; display: grid; gap: 8px; }
.nf-box legend { font-weight: 700; font-size: .86rem; padding: 0 6px; }
.nf-lista { display: grid; gap: 6px; }
.nf-linha { display: flex; gap: 6px; }
.nf-linha input { flex: 1; min-width: 0; }

/* ===== Busca inteligente (v12) ===== */
.busca { flex: 1 1 200px; max-width: 280px; min-width: 0; }
.busca input { width: 100%; }
.busca-grande { display: flex; gap: 8px; margin-bottom: 8px; }
.busca-grande input { flex: 1; min-width: 0; }
.dicas-busca { margin: 6px 0 0; padding-left: 18px; font-size: .86rem; color: var(--muted); }
.dicas-busca li { margin: 4px 0; }
.bloco-busca { border: 1px solid #d7e6d8; border-radius: 12px; padding: 10px 12px; background: #fff; }
.linha-tempo { margin-top: 10px; }
.linha-pedido { margin: 6px 0; padding: 6px 8px; border-left: 3px solid #1f8a3b; background: #f6fbf6; border-radius: 0 8px 8px 0; font-size: .88rem; }
.linha-pedido.cancelado { opacity: .55; border-left-color: #a32b2b; }
.chip-nf { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 999px; background: #e7f0fb; color: #1d4f91; font-size: .78rem; font-weight: 700; }
.peca-card details > summary { cursor: pointer; font-weight: 700; margin: 8px 0; }
.row-cotacao { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid #d7e6d8; border-radius: 10px; text-decoration: none; color: inherit; }
.row-cotacao:hover { border-color: #1f8a3b; }

/* ===== v13: barra de rolagem que acompanha a tela + editar título ===== */
.barra-fixa { position: fixed; bottom: 0; height: 17px; overflow-x: auto; overflow-y: hidden; z-index: 40; background: rgba(255, 255, 255, .92); border-top: 1px solid #d7e6d8; }
.barra-fixa > div { height: 1px; }
@media (pointer: coarse) { .barra-fixa { display: none; } }
.row-wrap { position: relative; }
.row-wrap .btn-editar { position: absolute; top: 8px; right: 8px; }
.row-wrap .row-link { padding-right: 110px; }

/* ===== v14: consulta rápida de peça + fila da próxima cotação ===== */
.consulta-peca { position: fixed; right: 12px; bottom: 12px; width: min(390px, calc(100vw - 24px)); max-height: 42vh; overflow: auto; z-index: 60; background: #fff; border: 1px solid #1f8a3b; border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); padding: 8px 12px 10px; font-size: .84rem; animation: sobe .25s ease both; }
.consulta-peca[hidden] { display: none; }
.cp-cab { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -8px; background: #fff; padding: 4px 0; }
.cp-x { border: 0; background: #f2f4f3; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; }
.cp-item { border-top: 1px solid #eef4ee; padding: 6px 0; }
.cp-titulo { font-weight: 700; }
.cp-aviso { margin: 4px 0; padding: 3px 8px; border-radius: 8px; background: #fdeaea; color: #a32b2b; font-weight: 700; }
.cp-aviso.cp-fila { background: #fff4d6; color: #8a5a00; }
.cp-sub, .cp-sem, .cp-vazio, .cp-ok { color: var(--muted); font-size: .78rem; margin: 3px 0; }
.cp-cot { margin: 4px 0; padding-left: 8px; border-left: 3px solid #1f8a3b; }
.cp-data, .cp-num { color: var(--muted); }
.cp-ped { margin: 2px 0 2px 6px; }
.cp-ped.cp-cancel { opacity: .55; }
.cp-falta { color: #a32b2b; }
.cp-nf { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #e7f0fb; color: #1d4f91; font-size: .72rem; font-weight: 700; }
.destino-opcoes { display: grid; gap: 4px; margin: 8px 0; padding: 8px 10px; border: 1px solid #d7e6d8; border-radius: 12px; }
.destino-opcoes label { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.destino-opcoes input { width: auto; }
.fila-chip { display: inline-flex; gap: 6px; align-items: center; margin: 3px 6px 3px 0; padding: 3px 4px 3px 10px; border: 1px solid #d7e6d8; border-radius: 999px; background: #f6fbf6; font-size: .84rem; }
.fila-chip button { border: 0; background: #e8f1e9; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }

/* v15: marcador de cor na conferência e chegada tardia */
.marca-conf { display: inline-flex; vertical-align: middle; margin-right: 6px; cursor: pointer; }
.marca-conf input { width: 18px; height: 18px; margin: 0; accent-color: #2563eb; cursor: pointer; }
.form-conf tr.conf-marcada td { background: #dbeafe !important; }
.form-conf tr.conf-marcada td:first-child { box-shadow: inset 4px 0 0 #2563eb; }
.chegou-depois { background: #e6f4ea; color: #1b6b35; border-radius: 6px; padding: 1px 6px; display: inline-block; margin-top: 3px; }
.nf-tardia { border-style: dashed; }
.nf-tardia.precisa { border: 2px solid #f0ad4e; background: #fff8e8; }
.cp-tardia { margin-top: 3px; padding: 3px 6px; border-radius: 6px; background: #e6f4ea; color: #1b6b35; font-size: .74rem; }

/* v17: lembrete de peças sem resposta (formulário do fornecedor) */
.tag-sem { display: none; background: #f0ad4e; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 700; margin-left: 4px; }
.item-block.sem-resposta { border: 2px solid #f0ad4e; background: #fff8e8; }
.item-block.sem-resposta .tag-sem { display: inline-block; }
.aviso-pend { position: sticky; top: 8px; z-index: 6; background: #fff3d6; border: 2px solid #f0ad4e; border-radius: 12px; padding: 10px 12px; margin: 10px 0; box-shadow: var(--shadow); }
.aviso-pend p { margin: 0 0 4px; }
.aviso-pend[hidden] { display: none; }

/* v18: identidade visual com a logomarca */
.shell::before { content: ""; position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #038034, #1f8a3b 55%, #c9a227); pointer-events: none; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.menu-btn img { border-radius: 50%; display: block; }
.side nav a.on { box-shadow: inset 3px 0 0 #c9a227; }
.auth-hero { background: #038034; margin: -28px -24px 18px; border-radius: 18px 18px 0 0; padding: 14px 18px; }
.auth-hero img { display: block; width: min(300px, 100%); height: auto; margin: 0 auto; border-radius: 10px; }
.auth-card.wide .auth-hero { margin: -28px -24px 14px; }
.auth-card h1 { margin-top: 4px; }


/* v19: botão instalar app */
.instalar-app { margin: 0 0 12px; background: rgba(255,255,255,.08); color: #fff; border: 1px dashed rgba(255,255,255,.35); border-radius: 10px; padding: 8px 10px; font-size: .82rem; cursor: pointer; }
.instalar-app:hover { background: rgba(255,255,255,.16); }
.instalar-app[hidden] { display: none; }
.instalar-app:not([hidden]) { margin-top: auto; }
.instalar-app:not([hidden]) + .side-foot { margin-top: 0; }

/* v20: caixa flutuante de avisos da cotação */
.av { position: fixed; right: 0; top: 34%; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 8px); }
.av-pill { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px 0 0 999px; background: #0f2a1a; color: #fff; padding: 9px 12px 9px 14px; font-size: .84rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(16,38,22,.22); }
.av-n { background: #c9a227; color: #14261b; border-radius: 999px; min-width: 20px; padding: 0 6px; text-align: center; font-size: .76rem; }
.av-n[hidden] { display: none; }
.av-pill.nova { animation: avBate .6s ease 2; }
@keyframes avBate { 50% { transform: scale(1.08); } }
.av-card { display: none; width: 320px; max-width: calc(100% - 8px); margin-right: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(16,38,22,.22); overflow: hidden; }
.av-card.on { display: block; }
.av-cab { display: flex; align-items: center; gap: 6px; background: #0f2a1a; color: #fff; padding: 8px 10px; cursor: grab; user-select: none; touch-action: none; }
.av-cab strong { flex: 1; font-size: .86rem; }
.av-cab button { border: 0; background: rgba(255,255,255,.14); color: #fff; border-radius: 7px; padding: 3px 8px; font-size: .74rem; cursor: pointer; }
.av-lista { max-height: min(46vh, 320px); overflow: auto; margin: 0; padding: 4px 0; list-style: none; }
.av-lista li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: start; padding: 7px 12px; font-size: .82rem; border-bottom: 1px solid var(--line); }
.av-lista li:last-child { border-bottom: 0; }
.av-lista li.novo { background: #f1faf3; animation: avEntra .35s ease; }
@keyframes avEntra { from { opacity: 0; transform: translateY(-6px); } }
.av-pt { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; }
.av-pt.e { background: #1f8a3b; } .av-pt.s { background: #c0392b; } .av-pt.r { background: #2563eb; } .av-pt.al { background: #f0ad4e; }
.av-lista small { color: var(--muted); white-space: nowrap; }
.av-lista li.av-vazio { display: block; padding: 14px; color: var(--muted); text-align: center; }
.av-lista li[hidden] { display: none; }
.av-rod { display: flex; padding: 8px 10px; background: #fff8e8; border-top: 1px solid #f0ad4e; gap: 8px; align-items: center; justify-content: space-between; font-size: .8rem; }
.av-rod[hidden] { display: none; }
.av-rod button { border: 0; background: var(--green); color: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.av-bolha { display: none; max-width: 300px; margin-right: 8px; background: #16301c; color: #fff; border-radius: 12px; padding: 9px 12px; font-size: .82rem; box-shadow: 0 10px 30px rgba(16,38,22,.22); animation: avEntra .3s ease both; }
.av-bolha.on { display: block; }
#aviso-novas { display: none !important; }
@media (max-width: 560px) { .av { left: 8px; right: 0; } .av-card { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .av *, .av { animation: none !important; } }

/* v21: peça que chegou fora do pedido */
.tag-extra { display: inline-block; background: #fff1d6; color: #8a5a00; border: 1px solid #f0ad4e; border-radius: 999px; padding: 0 8px; font-size: .7rem; font-weight: 700; margin-left: 4px; }
.extra-campos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-size: .78rem; }
.extra-campos .ex-preco { width: 90px; display: inline-block; margin: 0 0 0 4px; }
.ex-rem { color: #a32b2b; display: inline-flex; gap: 4px; align-items: center; }
.ex-rem input { width: auto; }
.form-conf tr.ex-removida td { opacity: .45; text-decoration: line-through; }
.ex-lista { display: grid; gap: 8px; margin-bottom: 8px; }
.ex-linha { display: grid; grid-template-columns: 1fr 1.6fr 70px 90px auto; gap: 6px; align-items: center; }
.ex-linha input { width: 100%; min-width: 0; }
@media (max-width: 640px) { .ex-linha { grid-template-columns: 1fr 1fr 1fr; } .ex-linha input:nth-child(2) { grid-column: 1 / -1; } .ex-linha input:nth-child(1) { grid-column: 1 / 3; } .ex-linha .ex-tirar { grid-column: 3; } }

/* v22: peças similares */
.ex-sim { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ex-sim select { max-width: 100%; border: 1px solid #cfd9d2; border-radius: 8px; padding: 5px 8px; font: inherit; font-size: .82rem; background: #fff; }
.btn-outro-cod { font-size: .74rem; margin-top: 4px; display: inline-block; }
.tag-similar { display: inline-block; background: #e3eefb; color: #1d4f91; border: 1px solid #9bbde6; border-radius: 999px; padding: 0 8px; font-size: .7rem; font-weight: 700; margin-left: 4px; }
.sim-selo { display: inline-block; border-radius: 999px; padding: 0 7px; font-size: .68rem; font-weight: 700; border: 1px solid; cursor: pointer; background: none; font-family: inherit; line-height: 1.5; }
.sim-selo.sug { background: #fff1d6; color: #8a5a00; border-color: #f0ad4e; }
.sim-selo.conf { background: #e4f5ea; color: #17692f; border-color: #8fd0a3; cursor: default; }
.sim-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(16,38,22,.22); padding: 10px 12px; width: 260px; font-size: .8rem; }
.sim-pop[hidden] { display: none; }
.sim-pop .acoes { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cp-sim { margin-top: 6px; padding: 6px 8px; border-left: 3px solid #1f8a3b; background: #f3faf5; border-radius: 6px; font-size: .78rem; }
.cp-sim.sug { border-left-color: #f0ad4e; background: #fffaf0; }
.sim-lista .card { margin-bottom: 8px; }
.btn.red { background: #fff; color: #a32b2b; border: 1px solid #e6b4b4; }
.ex-sim { white-space: nowrap; }

/* v23: garantias */
.menu-contador { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #c9a227; color: #14261b; font-size: .72rem; font-weight: 800; text-align: center; margin-left: 4px; }
.grid-garantia { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.grid-garantia .largo { grid-column: span 2; }
@media (max-width: 520px) { .grid-garantia .largo { grid-column: span 1; } }
.garantia-form label { display: block; font-size: .8rem; font-weight: 600; }
.garantia-form input, .garantia-form select { width: 100%; margin-top: 3px; }
.acoes-linha { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.tabs-simples { display: flex; gap: 6px; flex-wrap: wrap; }
.garantia { display: flex; gap: 12px; border: 1px solid var(--line); border-left: 5px solid #c9a227; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.garantia.g-aceita { border-left-color: #1f8a3b; }
.garantia.g-recusada { border-left-color: #b42318; }
.g-dias { flex: 0 0 74px; text-align: center; border-radius: 10px; padding: 6px 4px; align-self: flex-start; background: #eef6ef; color: #14261b; }
.g-dias strong { display: block; font-size: 1.7rem; line-height: 1.1; }
.g-dias small { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.g-dias.dias-alerta { background: #fff1d6; color: #8a5a00; }
.g-dias.dias-critico { background: #fdeaea; color: #a32b2b; }
.g-dias.dias-fim { background: #f2f4f3; color: #556; }
.g-corpo { flex: 1; min-width: 0; }
.g-titulo { font-size: .98rem; }
.g-info { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); margin-top: 3px; }
.g-info strong { color: var(--ink); }
.g-status { display: inline-block; border-radius: 999px; padding: 0 9px; font-size: .7rem; font-weight: 800; border: 1px solid; margin-left: 4px; }
.g-status.st-aguardando { background: #fff1d6; color: #8a5a00; border-color: #f0ad4e; }
.g-status.st-aceita { background: #e4f5ea; color: #17692f; border-color: #8fd0a3; }
.g-status.st-recusada { background: #fdeaea; color: #a32b2b; border-color: #e6b4b4; }
.g-resposta { margin-top: 6px; padding: 6px 8px; background: #f6f8f7; border-radius: 8px; font-size: .84rem; }
.g-acoes { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin-top: 8px; }
.g-acoes form { margin: 0; }
details.g-resp summary { list-style: none; cursor: pointer; display: inline-block; }
details.g-resp summary::-webkit-details-marker { display: none; }
.g-resp-form { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb; display: grid; gap: 8px; min-width: min(420px, 78vw); }
.g-resp-form label { font-size: .78rem; font-weight: 600; }
.g-resp-form input { width: 100%; margin-top: 3px; }
.btn.aceita { background: #1f8a3b; color: #fff; }

/* Pastas por mês (v24) */
.mes-pasta { background: #fff; border: 1px solid #e4ebe6; border-radius: 12px; margin: 0 0 10px; overflow: hidden; }
.mes-pasta > summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mes-pasta > summary::-webkit-details-marker { display: none; }
.mes-pasta .seta { color: #6b7a70; transition: transform .2s; font-size: .8rem; }
.mes-pasta[open] > summary .seta { transform: rotate(90deg); }
.mes-nome { font-weight: 700; font-size: 1.02rem; }
.mes-atual { background: #0f2a1a; color: #fff; font-size: .7rem; padding: 2px 8px; border-radius: 10px; }
.mes-res { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: #6b7a70; }
.mes-res b { color: #14261b; }
.mes-pasta .table-wrap, .mes-pasta .list { border-top: 1px solid #e4ebe6; }
.mes-rodape { padding: 9px 14px; border-top: 1px solid #e4ebe6; background: #fafbfa; font-size: .85rem; }
.pend-meses { background: #fff3cd; border: 1px solid #ecd47a; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.pend-meses strong { color: #856404; }
.pend-meses ul { margin: .4rem 0 0; padding-left: 1.1rem; }
@media (max-width: 640px) { .mes-res { margin-left: 0; width: 100%; } }

/* v25.2: menu lateral com muitos itens — o rodapé (nome e "Sair") sempre fica visível e o menu rola se faltar espaço */
.side nav { margin: 14px 0; flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; gap: 2px; }
.side nav a { padding: 8px 12px; }
.side-foot { flex-shrink: 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.instalar-app:not([hidden]) { margin-top: 0; flex-shrink: 0; }
@media (max-height: 860px) { .side { padding-top: 56px; } .side nav a { padding: 6px 12px; } .logo { max-height: 64px; } }

/* Atalho para o Sistema de Vendas (v26) */
.atalho-vendas { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 14px 18px; border-radius: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #0f2a1a, #1f8a3b); box-shadow: 0 6px 18px rgba(16, 38, 22, .18); transition: transform .15s ease, box-shadow .15s ease; }
.atalho-vendas:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 38, 22, .25); }
.atalho-ico { font-size: 1.9rem; line-height: 1; }
.atalho-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.atalho-txt strong { font-size: 1.05rem; }
.atalho-txt small { color: #d6ecd9; font-size: .82rem; }
.atalho-seta { font-size: 1.5rem; opacity: .85; }

/* Atalhos lado a lado + selo de manutenção (v26.1) */
.atalhos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 0 0 16px; }
.atalhos .atalho-vendas { margin: 0; }
.atalho-bot { background: linear-gradient(135deg, #1b2b4a, #2f6fd1); }
.atalho-bot .atalho-txt small { color: #dbe7fb; }
.atalho-selo { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: #ffd24d; color: #4a3500; font-style: normal; font-size: .7rem; font-weight: 800; letter-spacing: .03em; vertical-align: middle; white-space: nowrap; }

/* Etiquetas: busca no catálogo (v27) */
.etq-abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.etq-abas button { border: 1px solid #d7e6d8; background: #fff; padding: 7px 14px; border-radius: 999px; font: inherit; cursor: pointer; color: #16301c; }
.etq-abas button.on { background: #0f2a1a; color: #fff; border-color: #0f2a1a; }
.etq-pane { display: none; } .etq-pane.on { display: block; }
.etq-info { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; background: #eef6f0; border: 1px solid #cfe3d3; border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin-bottom: 10px; }
.etq-res { border: 1px solid #e4ebe6; border-radius: 10px; margin-top: 8px; max-height: 360px; overflow: auto; background: #fff; }
.etq-it { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 12px; border-top: 1px solid #e4ebe6; align-items: center; }
.etq-it:first-child { border-top: 0; }
.etq-cod { font-family: ui-monospace, Consolas, monospace; font-weight: 800; }
.etq-nm { font-size: .88rem; } .etq-fb { font-size: .74rem; color: #6b7a70; }
.etq-res mark { background: #ffe98a; padding: 0 1px; border-radius: 2px; }
.etq-vazio { padding: 16px; color: #6b7a70; text-align: center; font-size: .9rem; }
.etq-dica { margin: .6rem 0 0; }
.etq-tag { display: inline-block; background: #e7eefc; color: #27518f; border-radius: 10px; font-size: .7rem; padding: 1px 8px; margin-left: 6px; vertical-align: middle; font-weight: 600; }
.etq-tab { width: 100%; border-collapse: collapse; font-size: .9rem; }
.etq-tab th, .etq-tab td { padding: 7px 6px; border-top: 1px solid #e4ebe6; text-align: left; }
.etq-tab th { font-size: .75rem; color: #6b7a70; border-top: 0; }
.etq-tab input { width: 60px; padding: 5px; border: 1px solid #cfd8d3; border-radius: 6px; text-align: center; }
.etq-x { background: none; border: 0; color: #b42318; cursor: pointer; font-size: 1.1rem; }

/* ===== v28: menu no cabeçalho ===== */
.main { padding: 18px 22px 32px; }
.topnav { position: sticky; top: 0; z-index: 35; display: flex; align-items: stretch; gap: 6px; height: 60px; padding: 4px 14px 0; background: var(--side); color: #fff; box-shadow: 0 0 0 rgba(0,0,0,0); transition: box-shadow .25s ease; animation: tn-desce .45s ease both; }
.topnav.rolou { box-shadow: 0 6px 20px rgba(0,0,0,.28); }
@keyframes tn-desce { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.tn-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 800; font-size: .92rem; margin-right: 8px; white-space: nowrap; }
.tn-brand img { border-radius: 50%; display: block; transition: transform .4s ease; }
.tn-brand:hover img { transform: rotate(-8deg) scale(1.08); }
.tn-brand small { display: block; font-weight: 400; font-size: .62rem; opacity: .7; margin-top: -1px; }
.tn-nav { display: flex; align-items: stretch; }
.tn-it { position: relative; display: flex; align-items: stretch; }
.tn-link, .tn-ub { position: relative; display: flex; align-items: center; gap: 5px; padding: 0 10px; border: 0; background: none; color: #d6e4d9; font: inherit; font-size: .86rem; cursor: pointer; text-decoration: none; transition: color .2s ease, background .2s ease; }
.tn-link::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #c9a227; transform: scaleX(0); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.tn-link:hover, .tn-it.aberto > .tn-link, .tn-ub:hover { color: #fff; background: rgba(255,255,255,.07); }
.tn-link:hover::after { transform: scaleX(.5); }
.tn-it.ativo > .tn-link { color: #fff; }
.tn-it.ativo > .tn-link::after, .tn-it.aberto > .tn-link::after { transform: scaleX(1); }
.tn-seta { font-size: .6rem; opacity: .8; display: inline-block; transition: transform .25s ease; }
.tn-it.aberto .tn-seta { transform: rotate(180deg); }
.tn-nav .tn-it { animation: tn-entra .5s ease both; }
.tn-nav .tn-it:nth-child(1) { animation-delay: .08s; } .tn-nav .tn-it:nth-child(2) { animation-delay: .14s; } .tn-nav .tn-it:nth-child(3) { animation-delay: .2s; } .tn-nav .tn-it:nth-child(4) { animation-delay: .26s; } .tn-nav .tn-it:nth-child(5) { animation-delay: .32s; }
@keyframes tn-entra { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tn-sub { position: absolute; top: 100%; left: 0; min-width: 214px; background: #fff; color: #0f2a1a; border: 1px solid #dfe8e2; border-top: 0; border-radius: 0 0 14px 14px; box-shadow: 0 16px 34px rgba(0,0,0,.22); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top left; transition: opacity .18s ease, transform .2s cubic-bezier(.2,.8,.2,1), visibility 0s linear .2s; }
.tn-it.aberto > .tn-sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.tn-sub a, .tn-quem, .tn-sub .instalar-app { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: inherit; text-decoration: none; font-size: .88rem; }
.tn-sub a { opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .2s ease, background .15s ease; }
.tn-it.aberto > .tn-sub a { opacity: 1; transform: none; }
.tn-it.aberto > .tn-sub a:nth-child(2) { transition-delay: .04s; } .tn-it.aberto > .tn-sub a:nth-child(3) { transition-delay: .08s; } .tn-it.aberto > .tn-sub a:nth-child(4) { transition-delay: .12s; }
.tn-sub a:hover { background: #eef6f0; } .tn-sub a.on { background: #e3f4e8; font-weight: 700; box-shadow: inset 3px 0 0 #c9a227; }
.tn-sub small { display: block; color: #6b7a70; font-size: .7rem; font-weight: 400; }
.tn-quem { font-weight: 700; color: #6b7a70; font-size: .78rem; }
.tn-sub .instalar-app { width: 100%; margin: 0; background: #eef6f0; color: #0f2a1a; border: 1px dashed #9fd3ae; cursor: pointer; font: inherit; font-size: .82rem; }
.tn-dir { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tn-busca input { width: 150px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #fff; padding: 7px 12px; font: inherit; font-size: .84rem; transition: width .25s ease, background .2s ease, border-color .2s ease; }
.tn-busca input::placeholder { color: #a9c1b0; }
.tn-busca input:focus { width: 230px; background: rgba(255,255,255,.18); border-color: #c9a227; outline: 0; }
.tn-atalho { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 10px; padding: 7px 10px; font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .15s ease, background .2s ease; }
.tn-atalho:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.tn-atalho:active { transform: scale(.96); }
.tn-ub { gap: 8px; padding: 0 6px; }
.tn-av { width: 30px; height: 30px; border-radius: 50%; background: #c9a227; color: #2b2200; display: grid; place-items: center; font-weight: 800; font-size: .8rem; transition: transform .2s ease; }
.tn-ub:hover .tn-av { transform: scale(1.1); }
.tn-nome { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.tn-sub-dir { left: auto; right: 0; min-width: 190px; }
.topnav .menu-contador { animation: tn-pulsa 1.6s ease 2; }
@keyframes tn-pulsa { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.tn-ham, .tn-abas, .tn-gaveta, .tn-fundo { display: none; }
.tn-ham { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); cursor: pointer; align-self: center; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.tn-ham span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.tn-ham[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tn-ham[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.tn-ham[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.tn-fundo { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .25s ease; }
.tn-fundo.on { opacity: 1; }
.tn-gaveta { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(320px, 84vw); background: var(--side); color: #fff; padding: 14px; overflow-y: auto; transform: translateX(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.tn-gaveta.on { transform: none; }
.tn-gtopo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tn-fechar { width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.05rem; cursor: pointer; }
.tn-gaveta h4 { margin: 14px 0 4px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: #8fb59b; }
.tn-gl { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 10px; border-radius: 10px; color: #e6f0e9; text-decoration: none; font-size: .95rem; opacity: 0; transform: translateX(16px); }
.tn-gaveta.on .tn-gl { opacity: 1; transform: none; transition: opacity .3s ease, transform .3s ease, background .15s ease; }
.tn-gl:hover { background: rgba(255,255,255,.08); } .tn-gl.on { background: #1f8a3b; color: #fff; }
.tn-gl small { opacity: .7; font-size: .7rem; }
.tn-sair { margin-top: 12px; background: rgba(255,255,255,.08); }
body.tn-trava { overflow: hidden; }
@media (max-width: 1099px) {
  .tn-nav, .tn-busca, .tn-atalho, .tn-us { display: none; }
  .tn-ham { display: flex; }
  .tn-fundo:not([hidden]), .tn-gaveta { display: block; }
}
@media (max-width: 700px) {
  .main { padding: 14px 12px 92px; }
  .tn-brand small { display: none; }
  .tn-abas { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 36; background: #fff; border-top: 1px solid #dfe8e2; padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 16px rgba(0,0,0,.08); }
  .tn-abas a, .tn-abas button { flex: 1; text-align: center; font: inherit; font-size: .66rem; color: #6b7a70; padding: 5px 0; text-decoration: none; border: 0; background: none; position: relative; cursor: pointer; }
  .tn-abas i { display: block; font-style: normal; font-size: 1.2rem; transition: transform .2s ease; }
  .tn-abas a:active i, .tn-abas button:active i { transform: scale(.82); }
  .tn-abas .on { color: #1f8a3b; font-weight: 700; }
  .tn-abas .on::before { content: ""; position: absolute; top: -5px; left: 30%; right: 30%; height: 3px; border-radius: 3px; background: #c9a227; animation: tn-entra .3s ease both; }
  .barra-fixa { bottom: 62px; } #toasts { bottom: 74px; } .consulta-peca { bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .topnav, .tn-nav .tn-it, .topnav .menu-contador { animation: none !important; }
  .tn-sub, .tn-sub a, .tn-link::after, .tn-gaveta, .tn-gl, .tn-fundo, .tn-brand img, .tn-av, .tn-seta, .tn-ham span { transition: none !important; }
}
.tn-sub .instalar-app[hidden] { display: none; }
/* o menu fixo precisa que a página não vire "caixa de rolagem" (overflow hidden no body desativa o sticky) */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
@media (max-height: 820px) { .tn-gl { padding: 8px 10px; } .tn-gaveta h4 { margin-top: 10px; } }
@media print { .topnav, .tn-abas, .tn-gaveta, .tn-fundo { display: none !important; } }

/* Medidor de força da senha (v30) */
.forca { margin: -4px 0 8px; }
.forca-barra { height: 7px; background: #e4ebe6; border-radius: 99px; overflow: hidden; }
.forca-barra i { display: block; height: 100%; width: 0; border-radius: 99px; background: #dc2626; transition: width .25s ease, background .25s ease; }
.forca[data-nivel="1"] .forca-barra i { background: #f59e0b; } .forca[data-nivel="2"] .forca-barra i { background: #65a30d; } .forca[data-nivel="3"] .forca-barra i { background: #15803d; }
.forca-txt { display: block; margin-top: 3px; color: #6b7a70; font-size: .76rem; }
.campo-erro { border-color: #dc2626 !important; background: #fef2f2 !important; box-shadow: 0 0 0 2px rgba(220,38,38,.15); }
.item-block.item-erro { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,.12); }

/* Permissões por usuário (v31) */
.perm-box { margin-top: 8px; border: 1px solid #dfe8e2; border-radius: 12px; padding: 8px 12px; background: #fafcfb; }
.perm-box summary { cursor: pointer; font-weight: 700; color: #0f2a1a; }
.perm-form { margin-top: 10px; display: grid; gap: 10px; }
.perm-modelos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.perm-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.perm-grade label { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #e4ebe6; }
.perm-grade small { display: block; color: #6b7a70; font-size: .72rem; font-weight: 400; }
.perm-grade select { min-width: 130px; }
.perm-grade .perm-chk { justify-content: flex-start; grid-column: 1 / -1; }
.perm-grade .perm-chk input { width: 20px; height: 20px; flex: none; }

/* ===== v33 · Tela de cotação com visual novo ===== */
[data-aba-painel][hidden] { display: none !important; }
.hero-cot { background: linear-gradient(135deg, #0f2a1a 0%, #1a4a2c 60%, #1f8a3b 140%); color: #fff; border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; margin-bottom: 14px; }
.hero-cot::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.hero-topo { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; position: relative; z-index: 1; }
.hero-cot h1 { margin: 0; font-size: 1.4rem; letter-spacing: -.2px; color: #fff; }
.hero-cot small { color: #b9d3c1; display: block; margin-top: 4px; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .14); padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; vertical-align: middle; margin-left: 8px; letter-spacing: 0; }
.hero-chip i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .25); }
.hero-chip.finalizada i { background: #cbd5ce; box-shadow: none; }
.hero-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.hb { border: 0; border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; transition: .15s; text-decoration: none; display: inline-block; }
.hb.cl { background: rgba(255, 255, 255, .14); color: #fff; }
.hb.cl:hover { background: rgba(255, 255, 255, .26); }
.hb.br { background: #fff; color: #0f2a1a; }
.hb.br:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 20px; position: relative; z-index: 1; }
.hero-kpis .kpi { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 14px; }
.hero-kpis .kpi span { font-size: .75rem; color: #b9d3c1; }
.hero-kpis .kpi b { display: block; font-size: 1.35rem; margin-top: 2px; letter-spacing: -.3px; }
.hero-kpis .kpi.eco { background: rgba(74, 222, 128, .16); border-color: rgba(74, 222, 128, .35); }
.kbar { height: 6px; background: rgba(255, 255, 255, .15); border-radius: 9px; margin-top: 8px; overflow: hidden; }
.kbar i { display: block; height: 100%; background: #4ade80; border-radius: 9px; }

.abas-cot { display: flex; gap: 4px; margin: 6px 0 12px; border-bottom: 1px solid var(--line); overflow: auto; scroll-margin-top: 70px; }
.abas-cot button { border: 0; background: none; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.abas-cot button.on { color: var(--green-2); border-color: var(--green); }
.abas-cot em { font-style: normal; background: #e6f5eb; color: var(--green-2); border-radius: 99px; padding: 1px 8px; font-size: .75rem; margin-left: 6px; }

/* planilha */
.sheet-panel { border-radius: 18px; overflow: hidden; padding: 0; }
.sheet-panel .panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-panel .panel-head h2 { font-size: 1.05rem; margin: 0; }
.sheet-scroll { max-height: 72vh; }
.sheet th { background: #fafcfb; font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.sheet td, .sheet th { padding: 10px 12px; vertical-align: top; }
.sheet tbody tr:hover td { background: #fbfdfc; }
.sheet .sticky, .sheet .sticky-2 { background: #fff; }
.sheet tbody tr:hover td.sticky, .sheet tbody tr:hover td.sticky-2 { background: #fbfdfc; }
.sheet .hist { display: block; margin-top: 5px; font-size: .72rem; background: #f1f5f2; border-radius: 6px; padding: 2px 7px; color: var(--muted); width: fit-content; }
.quote { display: grid; gap: 2px; padding: 8px 10px; font-size: .78rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; max-width: none; min-width: 150px; line-height: 1.25; margin-bottom: 4px; }
.quote:hover { transform: none; box-shadow: 0 4px 14px rgba(16, 38, 22, .12); }
.quote strong { font-size: 1.1rem; font-weight: 800; letter-spacing: -.3px; }
.quote.baixo { background: #ecfdf3; border-color: #86e0a7; }
.quote.baixo > strong { color: #16a34a; }
.quote.baixo > strong::after { content: "MELHOR"; display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .3px; background: #16a34a; color: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: 3px; }
.quote.medio { background: #fff6d6; border-color: #f0cf6b; }
.quote.medio > strong { color: #8a6100; }
.quote.alto { background: #fff1f0; border-color: #f6c9c4; }
.quote.alto > strong { color: #b42318; }
.quote.indisp { background: repeating-linear-gradient(45deg, #f6f7f6, #f6f7f6 8px, #eff1ef 8px, #eff1ef 16px); border-style: dashed; color: var(--muted); }
.quote.indisp strong { color: var(--muted); font-size: .95rem; }
.quote.alterado { outline: 2px solid #f0ad4e; outline-offset: 1px; }
.qtd input { width: 58px; padding: 4px 6px; font-size: .82rem; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.qtd input:focus { outline: 2px solid var(--green); border-color: transparent; }
.mais-marcas { display: block; width: 100%; margin-top: 6px; border: 0; background: #f1f5f2; color: var(--green-2); border-radius: 9px; padding: 6px 8px; font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; text-align: left; }
.mais-marcas:hover, .quote-wrap.open .mais-marcas { background: #e6f5eb; color: var(--green-2); }
.quote-more { border-left: 3px solid #cfe3d5; padding-left: 8px; margin-top: 6px; }
.quote-more .quote { max-width: none; }
.sheet tfoot th, .sheet tfoot td { background: #fafcfb; border-top: 2px solid var(--line); position: sticky; bottom: 0; z-index: 2; font-weight: 700; }

/* barra de baixo */
.dock-cot { position: sticky; bottom: 12px; z-index: 30; margin: 0 12px 12px; background: #0f2a1a; color: #fff; border-radius: 16px; padding: 10px 14px 10px 20px; display: flex; gap: 18px; align-items: center; justify-content: flex-start; box-shadow: 0 14px 40px rgba(0, 0, 0, .28); }
.dock-cot .dk small { display: block; color: #b9d3c1; font-size: .72rem; }
.dock-cot .dk b { font-size: 1.1rem; }
.dock-cot .dk b.eco { color: #4ade80; }
.dock-cot .btn { margin-left: auto; }
.dock-cot .btn + .btn { margin-left: 0; }
.dock-cot .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }

/* cartões de link dos fornecedores */
#links .faixa-linha { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }

@media (max-width: 640px) {
  .hero-cot { padding: 16px; border-radius: 16px; }
  .hero-cot h1 { font-size: 1.15rem; }
  .dock-cot { flex-wrap: wrap; gap: 10px; margin: 0 6px 6px; padding: 10px 12px; }
  .dock-cot .btn { margin-left: 0; }
}

.sheet .legenda .cor, .legenda .cor { border-radius: 3px; }

/* ===== v33 · Cancelar pedido com motivo ===== */
.dlg-cancelar { border: 0; border-radius: 16px; padding: 20px; width: min(460px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dlg-cancelar::backdrop { background: rgba(10, 25, 15, .55); }
.dlg-cancelar h2 { margin: 0 0 4px; font-size: 1.1rem; }
.dlg-cancelar textarea { width: 100%; resize: vertical; }
.dc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dc-chip { border: 1px solid var(--line); background: #f4f7f5; border-radius: 99px; padding: 5px 11px; font: inherit; font-size: .8rem; cursor: pointer; }
.dc-chip:hover { background: #e6f5eb; border-color: #9fd3ae; }
.dc-erro { color: var(--err); font-size: .85rem; margin: 0; }
.dlg-cancelar .dc-ok { background: #b42318; }
.motivo-cancel { background: #fff1f0; border: 1px solid #f6c9c4; color: #7a271a; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.cor.baixo { background: #86e0a7; }
.cor.medio { background: #f0cf6b; }
.cor.alto { background: #f6c9c4; }

/* ===== v33.2 · Cores cheias na planilha (verde / amarelo / vermelho fortes) ===== */
.quote.baixo { background: #16a34a; border-color: #118a3d; color: #fff; }
.quote.baixo > strong { color: #fff; }
.quote.baixo > strong::after { background: #fff; color: #118a3d; }
.quote.medio { background: #facc15; border-color: #e0b400; color: #3b2f00; }
.quote.medio > strong { color: #3b2f00; }
.quote.alto { background: #dc2626; border-color: #b91c1c; color: #fff; }
.quote.alto > strong { color: #fff; }
.quote.baixo span, .quote.alto span { opacity: .95; }
.quote.baixo .prazo-tag, .quote.alto .prazo-tag, .quote.medio .prazo-tag { background: rgba(255, 255, 255, .92); color: #14261b; opacity: 1; }
.quote.baixo .qtd input, .quote.medio .qtd input, .quote.alto .qtd input { background: #fff; color: #14261b; border-color: rgba(0, 0, 0, .25); }
.quote.baixo .qtd-fixa, .quote.alto .qtd-fixa { color: #fff; }
.quote.baixo time, .quote.alto time { color: #fff; }
.quote-extra { color: #14261b; }
.quote-extra time { color: #14261b; }
.cor.baixo { background: #16a34a; }
.cor.medio { background: #facc15; }
.cor.alto { background: #dc2626; }

/* ===== v34 · Fornecedores: só cadastrar (coluna automática) ===== */
.forn-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.dica-forn { margin: 4px 0 0; background: #e6f5eb; color: var(--green-2); border-radius: 10px; padding: 9px 12px; font-size: .85rem; }
.col-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: #e6f5eb; color: var(--green-2); font-weight: 800; font-size: .78rem; }
@media (max-width: 760px) { .forn-form { grid-template-columns: 1fr; } }

/* ===== v33.3 · Cores vivas com texto escuro (opção 2), amarelo mais suave ===== */
.quote.baixo { background: #6ee7a0; border-color: #16a34a; color: #05361a; }
.quote.baixo > strong { color: #05361a; }
.quote.baixo > strong::after { background: #16a34a; color: #fff; }
.quote.medio { background: #fdeb85; border-color: #d4b43a; color: #3b2f00; }
.quote.medio > strong { color: #3b2f00; }
.quote.alto { background: #ff9b94; border-color: #dc2626; color: #4a0b07; }
.quote.alto > strong { color: #4a0b07; }
.quote.baixo span, .quote.alto span { opacity: 1; }
.quote.baixo .qtd-fixa, .quote.alto .qtd-fixa { color: inherit; }
.quote.baixo time, .quote.alto time { color: inherit; }
.cor.baixo { background: #6ee7a0; }
.cor.medio { background: #fdeb85; }
.cor.alto { background: #ff9b94; }

/* ===== v35 · Planilha sem limite de colunas ===== */
.aguardando { display: block; font-size: .65rem; font-weight: 600; color: #8a6100; text-transform: none; letter-spacing: 0; }
.sw-resp { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.sw-resp input { width: auto; }
.sheet.esconde-sem-resp .sem-resp { display: none; }
.add-forn-cot { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; }
.add-forn-cot label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.add-forn-cot[hidden] { display: none !important; }

/* v36: avisos do Painel, sino, saúde do sistema, relatório gerencial */
.avisos { display: grid; gap: 8px; margin-bottom: 14px; }
.aviso { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid; flex-wrap: wrap; }
.aviso-ic { font-size: 22px; line-height: 1; }
.aviso-tx { flex: 1 1 260px; min-width: 0; }
.aviso-tx b { display: block; }
.aviso-tx small { display: block; margin-top: 2px; opacity: .85; font-size: 13px; }
.aviso-v { background: #ffe9e7; border-color: #f2a39b; color: #6b0f08; }
.aviso-a { background: #fff4cf; border-color: #ecc84a; color: #5a4300; }
.aviso-o { background: #e6f7ec; border-color: #8fd5a8; color: #0b4a22; }
.aviso-adiar { margin: 0; }
.tn-sino { position: relative; display: inline-flex; align-items: center; padding: 6px 8px; text-decoration: none; font-size: 18px; }
.tn-sino i { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #dc2626; color: #fff; font: 700 11px/17px system-ui, sans-serif; text-align: center; font-style: normal; }
.saude { margin-bottom: 14px; }
.saude-l { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #e3eae5; font-size: 14px; flex-wrap: wrap; }
.saude-l:first-of-type { border-top: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: #16a34a; }
.dot.am { background: #facc15; }
.dot.er { background: #dc2626; }
.ger-filtros { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ger-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ger-kpi { background: #fff; border: 1px solid #dfe7e1; border-radius: 14px; padding: 14px; }
.ger-kpi span { display: block; color: #66766b; font-size: 12.5px; }
.ger-kpi b { display: block; font-size: 24px; margin: 4px 0; letter-spacing: -.3px; }
.ger-kpi small { color: #66766b; }
.ger-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ger-card { background: #fff; border: 1px solid #dfe7e1; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.ger-grid .ger-card { margin-bottom: 0; }
.ger-card h3 { margin: 0 0 10px; font-size: 15px; }
.ger-bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 18px; }
.ger-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.ger-bars i { display: block; width: 100%; max-width: 44px; background: #16a34a; border-radius: 6px 6px 0 0; min-height: 3px; }
.ger-bars .neg i { background: #dc2626; }
.ger-bars em { font-style: normal; font-size: 11px; color: #44554a; margin-bottom: 3px; }
.ger-bars span { font-size: 11.5px; color: #66766b; margin-top: 5px; }
.ger-nota { font-size: 12.5px; margin: 10px 0 0; }
.ger-scroll { overflow-x: auto; }
.ger-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.ger-tab th, .ger-tab td { text-align: left; padding: 8px 8px; border-top: 1px solid #e3eae5; vertical-align: top; }
.ger-tab th { font-size: 12px; color: #66766b; border-top: 0; }
.ger-tab .num { text-align: right; white-space: nowrap; }
.ger-tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-weight: 700; font-size: 12.5px; background: #e5e9e6; color: #44554a; }
.ger-tag.ok { background: #bff0cf; color: #064a20; }
.ger-tag.am { background: #fde68a; color: #5a4300; }
.ger-tag.er { background: #fecaca; color: #7a0f08; }
.ger-bar { display: inline-block; width: 70px; height: 8px; background: #e5e9e6; border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.ger-bar i { display: block; height: 100%; }
.ger-regra { margin-top: 12px; padding: 10px 12px; background: #f3f7f4; border-radius: 10px; font-size: 13px; color: #44554a; }
.ger-filtros select { width: auto; min-width: 190px; max-width: 100%; }
.sheet.sem-forn { width: auto; min-width: 0; }
.sheet.sem-forn th:nth-child(3), .sheet.sem-forn td:nth-child(3) { min-width: 220px; max-width: none; width: auto; }
.sem-forn-dica { padding: 10px 16px; margin: 0; }
.pedido-so-um { background: #eaf4ff; border: 1px solid #b9d6f5; color: #17406d; padding: 9px 14px; border-radius: 10px; margin: 0 0 12px; }
.pedido-so-um a { margin-left: 6px; font-weight: 700; }

/* v37: rascunho da conferência */
.rasc-status { font-size: .82rem; color: #3d5346; background: #eef6f0; border: 1px solid #cfe3d4; border-radius: 8px; padding: 5px 10px; margin: 0 0 10px; }
.rasc-status.aviso { background: #fff4cf; border-color: #ecc84a; color: #5a4300; }
.rasc-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff4cf; border: 2px solid #ecc84a; color: #5a4300; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.rasc-banner strong { flex: 1 1 100%; }
.rasc-banner span { flex: 1 1 240px; }
.rasc-banner.rasc-lista strong { flex: 0 0 auto; }
.badge-rasc { display: inline-block; background: #fff4cf; color: #5a4300; border: 1px solid #ecc84a; border-radius: 99px; padding: 0 8px; font-size: .72rem; font-weight: 700; margin-left: 4px; }

/* v38: leitor de etiquetas */
.leitor-barra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.leitor-barra input { flex: 1 1 200px; min-width: 0; font: 700 1.25rem ui-monospace, Consolas, monospace; letter-spacing: 1px; text-transform: uppercase; padding: 12px; border: 2px solid #14261b; border-radius: 12px; }
.leitor-dica { margin: 8px 0 0; font-size: .85rem; }
.leitor-camera { position: relative; margin-top: 12px; background: #0b1a11; border-radius: 16px; overflow: hidden; }
.leitor-camera video { display: block; width: 100%; max-height: 52vh; object-fit: cover; }
.leitor-mira { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ef4444; box-shadow: 0 0 12px #ef4444; pointer-events: none; }
.leitor-camera .btn { position: absolute; right: 10px; top: 10px; }
.leitor-camaviso { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 12px; background: rgba(0,0,0,.55); color: #fff; font-size: .85rem; text-align: center; }
.leitor-res { display: grid; gap: 12px; margin-top: 12px; }
.leitor-msg { background: #fff; border: 1px solid #dfe7e1; border-radius: 12px; padding: 14px; }
.leitor-msg.erro { background: #ffe9e7; border-color: #f2a39b; color: #6b0f08; }
.leitor-topo { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.leitor-topo > .leitor-selo { margin-left: auto; }
.leitor-cod { margin: 0; font: 800 1.6rem ui-monospace, Consolas, monospace; }
.leitor-selo { display: inline-block; border-radius: 99px; padding: 3px 12px; font-size: .8rem; font-weight: 800; background: #e5e9e6; color: #44554a; border: 0; }
.leitor-selo.ok { background: #bff0cf; color: #064a20; }
.leitor-selo.am { background: #fde68a; color: #5a4300; }
.leitor-selo.az { background: #dbeafe; color: #17406d; }
.leitor-selo.er { background: #fecaca; color: #7a0f08; }
button.leitor-sim { cursor: pointer; }
.leitor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.leitor-k { border: 1px solid #dfe7e1; border-radius: 12px; padding: 10px 12px; }
.leitor-k span { display: block; color: #66766b; font-size: .75rem; }
.leitor-k b { font-size: 1.05rem; }
.leitor-k small { display: block; color: #66766b; }
.leitor-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.leitor-peca h3 { margin: 14px 0 4px; font-size: .95rem; }
.leitor-tab { overflow-x: auto; }
.tn-atalho.on { background: rgba(255,255,255,.28); }

/* v38.2: busca no celular */
.busca-movel{display:none}
@media (max-width:1099px){
  .busca-movel{display:flex;gap:6px;margin:0 0 12px}
  .busca-movel input{flex:1;min-width:0;padding:11px 12px;border:1.5px solid #cfd8d3;border-radius:10px;font:inherit;font-size:.95rem;background:#fff}
  .busca-movel input:focus{border-color:#1f8a3b;outline:0}
  .busca-movel button{background:#1f8a3b;color:#fff;border:0;border-radius:10px;padding:0 16px;font:inherit;font-weight:600;cursor:pointer}
}

/* v38.3: "chegou com outro código" abre embaixo da peça */
tr.ex-inline > td{padding:4px 8px 10px;background:transparent}
tr.ex-inline .ex-linha{background:#eef7f0;border:1.5px solid #1f8a3b;border-radius:10px;padding:8px}
.ex-rot{order:-1;grid-column:1 / -1;font-size:.8rem;color:#1f6b33;font-weight:600}

/* v39: peça sob encomenda */
.tag-enc{display:flex;align-items:center;gap:6px;width:fit-content;max-width:100%;background:#7a4b00;color:#ffd45a;border-radius:8px;padding:4px 10px 4px 7px;font-size:.72rem;font-weight:800;letter-spacing:.2px;line-height:1.5}
.tag-enc.enc-atraso{background:#c62828}
.enc-obs{color:#7a5a00;font-weight:600}
.enc-linha{margin-top:4px}
.sheet tbody tr.linha-enc td,.sheet tbody tr.linha-enc:hover td,.sheet tbody tr.linha-enc td.sticky,.sheet tbody tr.linha-enc td.sticky-2{background:#fff3cd}
.sheet tbody tr.linha-enc td:first-child{box-shadow:inset 5px 0 0 #e0a800}
table.plain tr.linha-enc>td{background:#fff3cd}
table.plain tr.linha-enc>td:first-child{box-shadow:inset 5px 0 0 #e0a800}
.item-block.item-enc{border:2px solid #e0a800;background:#fff3cd}
.enc-box{margin:8px 0;padding:8px 10px;background:#fff7e0;border:1.5px solid #e0a800;border-radius:10px}
.enc-box .enc-extra{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.enc-box .enc-extra[hidden]{display:none}
.enc-box .enc-extra label{display:flex;flex-direction:column;gap:2px;font-size:.8rem;flex:1 1 180px}
.enc-cel .enc-extra{display:flex;flex-direction:column;gap:4px;margin-top:4px}
.enc-cel .enc-extra[hidden]{display:none}
.enc-mini{display:flex;align-items:center;gap:6px;cursor:pointer;white-space:nowrap;font-size:.85rem}
.enc-mini input{width:auto!important;margin:0}
.enc-cel{min-width:190px}

.enc-ic{width:17px;height:17px;flex:none;color:#ffd45a}
.tag-enc .enc-ic{color:#ffd45a}
.tag-enc{color:#fff}
.enc-ic-box .enc-ic,.enc-mini .enc-ic{color:#7a4b00;width:18px;height:18px;vertical-align:-4px}
.enc-check,.enc-mini{display:flex;align-items:center;gap:6px}
.enc-check input{width:auto!important;margin:0}

/* v39.3: botão "peça sob encomenda" */
.enc-btn{position:relative;display:inline-flex;cursor:pointer;max-width:100%}
.enc-btn input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.enc-btn span{display:inline-flex;align-items:center;gap:7px;border-radius:10px;padding:9px 14px;font-weight:700;font-size:.9rem;line-height:1.2}
.enc-btn .enc-ic{width:18px;height:18px;flex:none}
.enc-btn .enc-off{border:1.5px dashed #b07800;background:#fffaf0;color:#7a4b00}
.enc-btn .enc-on{display:none;border:1.5px solid #7a4b00;background:#7a4b00;color:#ffd45a}
.enc-btn .enc-on small{font-weight:500;opacity:.85}
.enc-btn input:checked ~ .enc-off{display:none}
.enc-btn input:checked ~ .enc-on{display:inline-flex}
.enc-btn input:focus-visible ~ span{outline:3px solid #1f8a3b;outline-offset:2px}
.enc-box{background:transparent;border:0;padding:0;margin:10px 0}
.enc-box .enc-extra{padding:10px;background:#fff7e0;border:1.5px solid #e0a800;border-radius:10px}
.enc-cel .enc-btn span{padding:6px 10px;font-size:.8rem}
.enc-dica{margin:4px 0 8px;font-size:.85rem}
@media (max-width:700px){
  .table-wrap:has(#lista-pecas){overflow:visible}
  .table-wrap:has(#lista-pecas) table,.table-wrap:has(#lista-pecas) tbody{display:block}
  .table-wrap:has(#lista-pecas) thead{display:none}
  #lista-pecas tr{display:grid;grid-template-columns:1fr 1fr;gap:6px 8px;padding:10px 4px;border-bottom:1px solid var(--line)}
  #lista-pecas td{display:block;padding:0;border:0;min-width:0}
  #lista-pecas td:nth-child(1){display:none}
  #lista-pecas td:nth-child(2){grid-column:1}
  #lista-pecas td:nth-child(3){grid-column:2}
  #lista-pecas td:nth-child(4){grid-column:1 / -1}
  #lista-pecas td:nth-child(5){grid-column:1 / -1}
  #lista-pecas td:nth-child(6){grid-column:1 / -1;text-align:right}
  #lista-pecas input.mini{width:100%}
  #lista-pecas .enc-btn,#lista-pecas .enc-btn span{width:100%;justify-content:center}
}

/* v39.4: encomendas na lista de pedidos */
.enc-caminho{border:2px solid #e0a800;background:#fff7e0;border-radius:14px;padding:12px 14px;margin:0 0 14px;scroll-margin-top:90px}
.enc-caminho>p{margin:2px 0 6px;font-size:.85rem}
.enc-item{border-top:1px solid #f0dca0;padding:8px 0}
.enc-item:first-of-type{border-top:0}
.enc-forn{margin-top:4px;font-size:.92rem}
.tag-enc.enc-ped{margin-top:5px;font-size:.7rem;white-space:nowrap}

/* v39.5: chatbot online */
.atalho-selo.online{background:#2ecc71;color:#0b3d1e}

/* v39.8: descrição e marca da peça na tela do fornecedor */
.item-info{display:flex;flex-wrap:wrap;gap:4px 12px;margin:2px 0 6px;font-weight:500;font-size:.92rem;color:#2c3e33}
.item-info .item-desc{font-weight:600;color:#102616}
.item-info .item-marca{color:#4d5f55}
.item-info .item-marca b{color:#102616}

/* v40: cotação em 2 etapas */
.etapa-banner{display:grid;gap:3px;border-radius:12px;padding:11px 13px;margin:8px 0;font-size:.93rem}
.etapa-banner.aberta{background:#fff4d6;border:1.5px solid #e0a800;color:#6b4c00}
.etapa-banner.atrasada{background:#fdeaea;border:1.5px solid #d9534f;color:#8a1f1f}
.etapa-banner.lancada{background:#e6f4ea;border:1.5px solid #1f8a3b;color:#14261b}
.etapa-divisor{display:flex;align-items:center;gap:10px;color:#8a6400;font-weight:800;font-size:.78rem;letter-spacing:.05em;text-transform:uppercase;margin:6px 0}
.etapa-divisor::before,.etapa-divisor::after{content:"";flex:1;border-top:2px dashed #e0a800}
.peca-trava{border:1px solid #dfe5e2;border-radius:12px;padding:8px 10px;margin:8px 0;background:#eef1ef;color:#7a8a80;display:grid;gap:4px}
.peca-trava .item-cod .mono,.peca-trava .item-info .item-desc,.peca-trava .item-info b{color:#6f7f75}
.peca-trava.lancada{background:#e6f4ea;border-color:#1f8a3b;color:#2c3e33}
.peca-trava.lancada .item-cod .mono{color:#102616}
.selo-etapa{display:inline-block;width:fit-content;font-size:.72rem;font-weight:800;border-radius:6px;padding:2px 8px;background:#7a8a80;color:#fff}
.selo-etapa.ok{background:#1f8a3b}
.trava-sua{font-size:.82rem}
.quote .fora-hora{background:#fdeaea;color:#a32b2b}
.sheet tr.etapa-corte-linha td{background:#fff4d6;color:#6b4c00;font-weight:700;font-size:.78rem;text-align:left;padding:6px 12px;border-top:2px dashed #e0a800;border-bottom:2px dashed #e0a800;position:static}
.etapa-box{border:1.5px solid #e0a800;background:#fffaf0;border-radius:12px;padding:12px 14px;margin:12px 0;display:grid;gap:10px}
.etapa-box h3{margin:0;font-size:1rem}
.etapa-box .linha-et{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.etapa-box label{display:flex;flex-direction:column;gap:3px;font-size:.85rem}
.etapa-box .chk{flex-direction:row;align-items:center;gap:8px;font-weight:700;font-size:.95rem}
.etapa-box .chk input{width:auto}
.etapa-ok{background:#e6f4ea;border:1px solid #1f8a3b;border-radius:10px;padding:8px 10px;font-size:.9rem}

/* v40.1: senha para liberar a 2ª etapa */
.etapa-lancar{display:grid;gap:6px;border-top:1px dashed #e0a800;padding-top:10px}
.etapa-desfazer summary{cursor:pointer;color:#8a6400;font-weight:600;font-size:.88rem}
.etapa-desfazer form{margin-top:8px}

/* v40.1: ranking de quem anota peças */
.anot-grid{display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;align-items:center;margin-top:12px}
@media (max-width:700px){.anot-grid{grid-template-columns:1fr}.anot-pizza{max-width:220px;margin:0 auto}}
.anot-pizza{width:100%;height:auto}
.anot-pizza .anot-num{font-size:5.2px;font-weight:800;fill:currentColor}
.anot-pizza .anot-leg{font-size:2.6px;fill:#6b7a70}
.anot-tab .num{font-variant-numeric:tabular-nums;text-align:right}
.anot-dot{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:7px;vertical-align:-1px}
.anot-barcol{width:32%}
.anot-bar{height:10px;border-radius:5px;background:var(--line);overflow:hidden}
.anot-bar i{display:block;height:100%}
.anot-sem td{color:#7a8a80}
.anot-tab td:nth-child(2){display:flex;align-items:center;gap:7px}
.anot-tab td:nth-child(2) .anot-dot{margin-right:0;flex:none}

/* v40.3: cartão "Cotação em 2 etapas" (modelo 1) */
.et-card{border:2px solid #d9a400;background:linear-gradient(180deg,#fff5d8,#ffffff 75%);border-radius:16px;padding:16px 18px;margin:0 0 14px;display:grid;gap:14px;scroll-margin-top:90px}
.et-l1{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.et-ic{width:46px;height:46px;border-radius:12px;background:#d9a400;color:#2a1d00;display:grid;place-items:center;flex:none}
.et-ic svg{width:26px;height:26px}
.et-txt{flex:1;min-width:200px;display:grid;gap:2px}
.et-txt b{font-size:1.12rem;color:#13251a}
.et-txt span{color:#5f7167;font-size:.9rem}
.et-switch{width:56px;height:32px;border-radius:999px;background:#cfd8d3;border:0;position:relative;cursor:pointer;flex:none;transition:background .2s}
.et-switch::after{content:"";position:absolute;top:4px;left:4px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.et-switch[aria-checked="true"]{background:#1f8a3b}
.et-switch[aria-checked="true"]::after{transform:translateX(24px)}
.et-switch:disabled{opacity:.6;cursor:not-allowed}
.et-switch:focus-visible{outline:3px solid #d9a400;outline-offset:2px}
.et-config{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;gap:12px;align-items:end}
.et-config[hidden]{display:none}
@media (max-width:720px){.et-config{grid-template-columns:1fr}}
.et-campo{display:grid;gap:4px;font-size:.85rem;font-weight:600;color:#5f7167}
.et-campo select,.et-campo input{font:inherit;font-size:.95rem;color:#13251a;background:#fff;border:1.5px solid #dbe4de;border-radius:10px;padding:9px 11px;min-width:0;width:100%}
.et-passos{display:flex;gap:6px;flex-wrap:wrap}
.et-passo{display:flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;border-radius:999px;background:#eef1ef;color:#7a8a80;font-weight:700;font-size:.82rem}
.et-passo i{font-style:normal;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#fff;border:1.5px solid currentColor;font-size:.78rem}
.et-passo.feito{background:#e5f3e9;color:#1f8a3b}
.et-passo.agora{background:#fff5d8;color:#6e4f00}
.et-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #dbe4de;border-radius:12px;padding:10px 12px}
.et-status > span:nth-child(2){flex:1;min-width:200px}
.et-pt{width:10px;height:10px;border-radius:50%;background:#d9a400;flex:none}
.et-status.ok .et-pt{background:#1f8a3b}
.btn.et-ouro{background:#d9a400;color:#2a1d00}
.et-dlg{border:0;border-radius:16px;padding:20px;width:min(440px,94vw)}
.et-dlg::backdrop{background:rgba(5,15,9,.55)}
.et-dlg h2{margin:0;font-size:1.15rem}
.et-dlg label{display:grid;gap:4px;font-size:.88rem}
.etapa-nota{margin:8px 0}

/* v41: fornecedor confirma o pedido pelo link */
.btn-pedido-forn.confirmar{background:#1f8a3b;color:#fff;border-color:#1f8a3b;font-weight:800;box-shadow:0 0 0 0 rgba(31,138,59,.5);animation:pf-pulsa 2.2s infinite}
@keyframes pf-pulsa{0%{box-shadow:0 0 0 0 rgba(31,138,59,.45)}70%{box-shadow:0 0 0 10px rgba(31,138,59,0)}100%{box-shadow:0 0 0 0 rgba(31,138,59,0)}}
@media (prefers-reduced-motion: reduce){.btn-pedido-forn.confirmar{animation:none}}
.pf-ok{background:#e5f3e9;border:1.5px solid #1f8a3b;border-radius:12px;padding:10px 12px;display:grid;gap:3px;margin-bottom:10px}
.pf-ok small{color:#4d5f55}
.pf-conf{display:grid;gap:8px;margin-top:12px;border-top:1px solid #e3e8e5;padding-top:12px}
.pf-conf label{display:grid;gap:4px;font-size:.86rem;font-weight:600;color:#4d5f55}
.pf-conf input{font:inherit;padding:9px 10px;border:1px solid #cfd8d3;border-radius:9px}
.pf-conf .pf-btn{padding:12px;font-size:1rem;font-weight:800}
.pf-conf small{text-align:center}
.ped-conf{background:#e5f3e9;border:1.5px solid #1f8a3b;border-radius:10px;padding:8px 12px;margin:8px 0;display:grid;gap:2px;font-size:.92rem}
.ped-conf small{color:#4d5f55}
.ped-conf.manual{background:#f3f6f4;border-color:#b9c4be}
.ped-aguarda{color:#8a6400;font-weight:600;font-size:.88rem}

/* v41.1: confirmar o pedido no próprio link da cotação */
.ped-card{border:2px solid #1f8a3b;background:linear-gradient(180deg,#e5f3e9,#fff 70%);border-radius:16px;padding:14px 16px;margin:6px 0 16px;display:grid;gap:12px;scroll-margin-top:20px}
.ped-card.feito{padding:12px 14px;gap:0}
.ped-card-cab{display:flex;gap:12px;align-items:center}
.ped-card-cab > div{display:grid;gap:2px;min-width:0}
.ped-card-cab strong{font-size:1.08rem;color:#13251a}
.ped-card-cab span{color:#4d5f55;font-size:.9rem}
.ped-card-ic{width:42px;height:42px;border-radius:12px;background:#1f8a3b;color:#fff;display:grid;place-items:center;font-size:1.2rem;flex:none}
.ped-card-tab td,.ped-card-tab th{font-size:.88rem}
.ped-card-form{display:grid;gap:8px}
.ped-card-form label{display:grid;gap:4px;font-size:.86rem;font-weight:600;color:#4d5f55}
.ped-card-form input{font:inherit;padding:10px;border:1px solid #cfd8d3;border-radius:9px}
.ped-card-btn{padding:13px;font-size:1.02rem;font-weight:800}
.ped-card-form small{text-align:center;color:#6b7a70}
.ped-card-cab .ped-card-ic{color:#fff;font-weight:800}

/* v42 — aparelhos autorizados */
.ap-espera { text-align: center; }
.ap-espera .ap-ic { font-size: 54px; line-height: 1; margin: 6px 0 4px; animation: apPulse 2s ease-in-out infinite; }
@keyframes apPulse { 50% { transform: scale(1.08); } }
.ap-info { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; text-align: left; display: grid; gap: 4px; font-size: 14px; }
.ap-info b { color: var(--ink); }
.ap-painel .panel-head { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ap-bloco { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 14px; background: var(--card); }
.ap-bloco h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ap-bloco-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-bloco-cab form { margin: 0 0 8px; }
.ap-pend-bloco { border-color: #f1c27d; background: #fff9ef; }
.ap-cont { background: #d9480f; color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.ap-vazio { margin: 4px 0; font-size: 14px; }
.ap-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ap-bloco h3 + .ap-item, .ap-bloco-cab + .ap-item { border-top: 0; }
.ap-item .ap-ic { font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--paper); border-radius: 10px; flex: none; }
.ap-tx { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.ap-tx small { color: var(--muted); font-size: 13px; }
.ap-tx em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.ap-voce { background: #e6f4ea; color: var(--green-2); }
.ap-adm { background: #e8eefc; color: #2c4fa8; }
.ap-rec { background: #fdecea; color: var(--err); }
.ap-recusado { opacity: .75; }
.ap-acoes, .aviso-ap { display: flex; gap: 6px; margin: 0; flex-wrap: wrap; }
.btn.ap-sim { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ap-nao { color: var(--err); border-color: #f0c6c2; background: #fff; }
.btn.ap-nao:hover { background: #fdecea; }
.ap-regras { display: grid; gap: 12px; justify-items: start; }
.ap-sw { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ap-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ap-sw-t { width: 46px; height: 26px; border-radius: 999px; background: #c9d3cc; position: relative; flex: none; transition: background .2s; }
.ap-sw-t::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.ap-sw input:checked + .ap-sw-t { background: var(--green); }
.ap-sw input:checked + .ap-sw-t::after { transform: translateX(20px); }
.ap-sw input:focus-visible + .ap-sw-t { outline: 2px solid var(--green); outline-offset: 2px; }
.ap-sw span:last-child { display: flex; flex-direction: column; }
.ap-sw small { color: var(--muted); font-size: 13px; }

/* v42.1 — cotação no celular: Cartões ou Planilha compacta (o computador continua igual) */
.m-marca, .m-desc, .modo-cot, .sheet td.c-resumo { display: none; }
@media (max-width: 760px) {
  .modo-cot { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-left: auto; }
  .modo-cot button { border: 0; background: #fff; font: inherit; font-size: .8rem; font-weight: 600; padding: 7px 12px; color: var(--ink); cursor: pointer; }
  .modo-cot button[aria-pressed="true"] { background: var(--ink); color: #fff; }
  .sheet-panel .panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

  /* --- Planilha compacta --- */
  .sheet-panel:not(.modo-cartoes) .sheet .sticky { min-width: 0; width: 86px; max-width: 86px; padding: 7px 6px; font-size: .78rem; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
  .sheet-panel:not(.modo-cartoes) .sheet .sticky-2,
  .sheet-panel:not(.modo-cartoes) .sheet th:nth-child(3),
  .sheet-panel:not(.modo-cartoes) .sheet td:nth-child(3) { display: none; }
  .sheet-panel:not(.modo-cartoes) .m-marca { display: block; font-family: Inter, system-ui, sans-serif; font-weight: 500; font-size: .68rem; color: var(--muted); }
  .sheet-panel:not(.modo-cartoes) tr.ver-desc .m-desc { display: block; font-family: Inter, system-ui, sans-serif; font-weight: 500; font-size: .68rem; color: var(--ink); background: #f1f5f2; border-radius: 6px; padding: 3px 5px; margin-top: 4px; }
  .sheet-panel:not(.modo-cartoes) .sheet td.col-forn, .sheet-panel:not(.modo-cartoes) .sheet th.col-forn { padding: 5px; }
  .sheet-panel:not(.modo-cartoes) .sheet th.col-forn { font-size: .6rem; min-width: 0; max-width: 96px; white-space: normal; }
  .sheet-panel:not(.modo-cartoes) .sheet th.col-forn .btn { padding: 2px 6px; font-size: .62rem; margin-top: 2px; }
  .sheet-panel:not(.modo-cartoes) .sheet td.col-forn { min-width: 0; }
  .sheet-panel:not(.modo-cartoes) .quote { min-width: 0; width: 84px; padding: 4px 6px; font-size: .66rem; }
  .sheet-panel:not(.modo-cartoes) .quote > span { overflow-wrap: anywhere; }
  .sheet-panel:not(.modo-cartoes) .quote > strong { font-size: .9rem; }
  .sheet-panel:not(.modo-cartoes) .quote.baixo > strong::after { display: none; }
  .sheet-panel:not(.modo-cartoes) .qtd input { width: 40px; padding: 2px 3px; }

  /* --- Cartões --- */
  .modo-cartoes .sheet-scroll { max-height: none; overflow: visible; }
  .modo-cartoes .sheet, .modo-cartoes .sheet tbody, .modo-cartoes .sheet tfoot { display: block; width: 100%; min-width: 0; }
  .modo-cartoes .sheet thead { display: none; }
  .modo-cartoes .sheet tr { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 10px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(16, 38, 22, .06); }
  .modo-cartoes .sheet td, .modo-cartoes .sheet th { display: block; position: static; border: 0; padding: 0; min-width: 0; width: auto; max-width: none; background: transparent !important; box-shadow: none !important; }
  .modo-cartoes .sheet td.sticky, .modo-cartoes .sheet tfoot th.sticky { order: -3; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 1.02rem; }
  .modo-cartoes .m-marca { display: inline; font-family: Inter, system-ui, sans-serif; font-weight: 500; font-size: .82rem; color: var(--muted); text-align: right; }
  .modo-cartoes .sheet .sticky-2 { display: none; }
  .modo-cartoes .sheet td:nth-child(3), .modo-cartoes .sheet tfoot th:nth-child(3) { order: -2; font-size: .8rem; color: var(--muted); padding: 2px 0 8px; }
  .modo-cartoes .sheet td.col-forn { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #eef2ef; }
  .modo-cartoes .sheet td.col-forn::before { content: attr(data-nome); flex: 0 0 32%; font-size: .84rem; font-weight: 600; color: #2b3d31; overflow-wrap: anywhere; }
  .modo-cartoes .sheet td.col-forn > * { flex: 1; min-width: 0; }
  .modo-cartoes .quote { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 1px; align-items: center; min-width: 0; margin: 0; padding: 6px 10px; }
  .modo-cartoes .quote > * { grid-column: 1; }
  .modo-cartoes .quote > strong { font-size: 1rem; }
  .modo-cartoes .quote > span { font-size: .72rem; }
  .modo-cartoes .quote .qtd { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .modo-cartoes .quote .quote-extra { grid-column: 1 / -1; }
  .modo-cartoes .quote .qtd input { width: 52px; }
  .modo-cartoes .quote-extra { position: static; box-shadow: none; border: 0; background: transparent; padding: 0; width: 100%; }
  .modo-cartoes .sheet td.c-indisp, .modo-cartoes .sheet td.c-vazio { display: none; }
  .modo-cartoes .sheet tr.ver-mais td.c-indisp, .modo-cartoes .sheet tr.ver-mais td.c-vazio { display: flex; }
  .modo-cartoes .sheet.esconde-sem-resp td.sem-resp { display: none !important; }
  .modo-cartoes .sheet td.c-resumo { display: block; order: 990000000; padding-top: 6px; border-top: 1px solid #eef2ef; }
  .c-mais { border: 0; background: none; padding: 2px 0; font: inherit; font-size: .82rem; font-weight: 600; color: var(--green-2); cursor: pointer; }
  .modo-cartoes .sheet tr.linha-enc { background: #fff3cd; border-color: #e0a800; box-shadow: inset 5px 0 0 #e0a800; }
  .modo-cartoes .sheet tr.etapa-corte-linha { background: #fff4d6; border: 2px dashed #e0a800; }
  .modo-cartoes .sheet tr.etapa-corte-linha td { color: #6b4c00; font-weight: 700; font-size: .8rem; }
  .modo-cartoes .sheet tfoot tr { background: #f7faf8; }
  .modo-cartoes .sheet tfoot th.sticky { font-size: .95rem; }
}
