:root {
  --bg: #f6f3ee; --card: #fff; --ink: #2b2620; --muted: #8a8177; --line: #e7e1d8;
  --pri: #6f4528; --pri-d: #4f2f19; --ok: #2a9d8f; --neg: #c0392b; --wa: #25d366;
  --c0:#c8a27a; --c1:#2a9d8f; --c2:#8d6e63; --c3:#8ab17d; --c4:#d9c08a; --c5:#7b9acc; --c6:#b08968; --c7:#a3c4bc; --c8:#c9ada7; --c9:#9c7a5b;
  --r: 10px; --side: 220px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--pri); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; } h2 { font-size: 1.1rem; margin: 0 0 .8rem; } h3 { font-size: 1rem; margin: .8rem 0 .5rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .r { text-align: right; }
.pos { color: var(--ok); } .neg { color: var(--neg); } .ok-txt { color: var(--ok); display: block; }

/* layout */
.topbar { position: fixed; inset: 0 0 auto 0; height: 54px; display: flex; align-items: center; gap: .8rem; padding: 0 1rem;
  background: #2b2620; color: #fff; z-index: 20; }
.topbar .user { color: #e8dccb; text-decoration: none; font-size: .9rem; }
.spacer { flex: 1; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sidebar { position: fixed; top: 54px; bottom: 0; left: 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); padding: .6rem; overflow-y: auto; z-index: 15; }
.sidebar a { display: flex; gap: .7rem; align-items: center; padding: .6rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.sidebar a span { width: 1.2rem; text-align: center; color: var(--muted); }
.sidebar a:hover { background: var(--bg); } .sidebar a.on { background: #ece1d4; color: var(--pri-d); font-weight: 600; }
.content { margin: 54px 0 0 var(--side); padding: 1.4rem; max-width: 1400px; }

/* componentes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi small { color: var(--muted); display: block; } .kpi b { font-size: 1.6rem; display: block; margin: .2rem 0; } .kpi { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } .grid2 > .card { margin: 0 0 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem 1rem; }
.span2 { grid-column: span 2; } .span3 { grid-column: 1 / -1; } .grow { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
.inline { display: inline; }
label { display: block; margin-bottom: .7rem; font-size: .88rem; font-weight: 500; }
label small { display: block; font-weight: 400; margin-top: .2rem; }
label.chk { display: flex; align-items: center; gap: .4rem; font-weight: 400; } label.chk.inline { display: inline-flex; }
input, select, textarea { width: 100%; padding: .5rem .6rem; border: 1px solid #d6cec3; border-radius: 7px; font: inherit; background: #fff; margin-top: .25rem; }
input[type=checkbox] { width: auto; margin: 0; } input:focus, select:focus, textarea:focus { outline: 2px solid #c9ab8c; border-color: var(--pri); }
.w4 { width: 4.5rem; } .w6 { width: 6.5rem; } .w10 { width: 10rem; } .full { width: 100%; }
td input, td select { margin: 0; }
.btn { display: inline-block; background: var(--pri); color: #fff; border: 1px solid var(--pri); padding: .55rem 1rem; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--pri-d); } .btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: #fff; color: var(--pri); } .btn.ghost:hover { background: #f5eee6; }
.btn.sm { padding: .3rem .7rem; font-size: .85rem; } .btn.danger { background: #fff; color: var(--neg); border-color: var(--neg); }
.btn.wa { background: var(--wa); border-color: var(--wa); }
.alert { background: #fdecea; border: 1px solid #f5c2bd; color: #8b2a20; padding: .6rem .9rem; border-radius: 8px; margin: .5rem 0; }
.alert.ok { background: #e7f6f3; border-color: #b9e2db; color: #1b6b61; }
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; }
.tbl th, .tbl td { padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl.compact th, .tbl.compact td { padding: .3rem .4rem; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover { background: #faf6f1; }
.tbl tr.sum td { border-top: 2px solid var(--line); } .tbl tr.big td { font-size: 1.15rem; font-weight: 700; }
.tbl tr.cat td { background: #f3ede5; font-weight: 700; } .tbl tr.inativo { opacity: .45; }
.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.x { border: 0; background: none; color: var(--neg); font-size: 1.2rem; cursor: pointer; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #eee; vertical-align: middle; }
.b-orcamento { background: #fff3cd; color: #8a6d00; } .b-aprovado { background: #dbeafe; color: #1e40af; }
.b-producao, .b-cortando, .b-acabamento { background: #e8dacb; color: #4f2f19; } .b-pronto { background: #dcfce7; color: #166534; }
.b-entregue, .b-concluida { background: #e5e7eb; color: #374151; } .b-cancelado { background: #fee2e2; color: #991b1b; } .b-aberta { background: #fff3cd; color: #8a6d00; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.chips a { padding: .3rem .8rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .88rem; }
.chips a.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.search input { max-width: 420px; margin-bottom: .8rem; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 1rem 0; display: flex; gap: .5rem; }
.narrow { max-width: 420px; } .dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; }

/* calculadora */
.calc { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; align-items: start; }
.calc-result { position: sticky; top: 70px; }
.preco-grande small { color: var(--muted); display: block; } .preco-grande b { font-size: 2.2rem; color: var(--pri-d); }
.preco-total { margin: .2rem 0 .8rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.calc-result tr.pos td { color: var(--ok); } .calc-result tr.neg td { color: var(--neg); }
.file-btn { cursor: pointer; margin: 0; }
.prod-head { display: flex; gap: 1.2rem; } .foto-box { width: 180px; flex-shrink: 0; text-align: center; }
.foto-box img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.foto-box > span { display: grid; place-items: center; aspect-ratio: 1; background: var(--bg); border-radius: 8px; }

/* OF */
.steps { display: flex; gap: .3rem; margin-bottom: 1rem; flex-wrap: wrap; }
.step { flex: 1; padding: .55rem; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font: inherit; }
.step.on { background: var(--pri); color: #fff; border-color: var(--pri); font-weight: 700; }
.nest-opts { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } .nest-opts label { margin: 0; display: flex; gap: .4rem; align-items: center; }
.nest-opts select, .nest-opts input { margin: 0; width: auto; }
.folha-grid { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 1rem; align-items: start; }
.folha-svg svg { width: 100%; height: auto; display: block; border-radius: 4px; }
.folha-lista { margin: 0; padding-left: 1rem; columns: 1; font-size: .9rem; }

/* mostruário */
.vitrine { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.prod { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.prod .img { aspect-ratio: 1; background: #efe8de; display: grid; place-items: center; font-size: 3rem; color: #cbbfae; }
.prod .img img { width: 100%; height: 100%; object-fit: cover; }
.prod .info { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.prod h3 { margin: .1rem 0 .3rem; } .prod .desc { font-size: .88rem; color: #5d554c; flex: 1; margin: 0 0 .5rem; }
.prod .preco { font-size: 1.4rem; font-weight: 800; color: var(--pri-d); }
body.publico .content { margin: 0 auto; } .vitrine-top { background: #2b2620; color: #fff; text-align: center; padding: 1.6rem 1rem; }
.vitrine-top h1 { margin: 0; } .vitrine-top p { margin: .3rem 0 0; color: #e8dccb; }

/* login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #2b2620, #5a3b28); }
.login-box { background: #fff; padding: 2rem; border-radius: 14px; width: min(380px, 92vw); }
.login-box .btn { width: 100%; margin-top: .4rem; }

.print-only { display: none; }

/* responsivo */
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.2); }
  body.nav-open .sidebar { transform: none; }
  .content { margin-left: 0; padding: 1rem; }
  .grid2, .calc, .folha-grid { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .calc-result { position: static; }
  .topbar .user { display: none; }
  .tbl { font-size: .88rem; } .prod-head { flex-direction: column; } .foto-box { width: 140px; }
}
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

/* impressão */
@media print {
  .no-print, .topbar, .sidebar, .sticky-save, .chips, .search, .x { display: none !important; }
  .print-only { display: block; } span.print-only { display: inline; }
  .content { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; } .card { border: 0; padding: 0; margin-bottom: .8rem; }
  .folha { page-break-inside: avoid; } .tbl th, .tbl td { padding: .25rem; }
  .grid2 { grid-template-columns: 1fr 1fr; } .folha-grid { grid-template-columns: 60% 1fr; }
}

/* gerador de modelos */
.ger { display: grid; grid-template-columns: 330px 1fr; gap: 1rem; align-items: start; }
.g3d svg { width: 100%; max-height: 380px; display: block; }
.g-chapas { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.g-chapas .folha { margin: 0; } .chapa-prev { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 4px; }
.g-top > .card { margin: 0 0 1rem; }
/* barras de relatório */
.bar { background: #ece1d4; border-radius: 4px; height: .7rem; position: relative; min-width: 2px; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--pri); border-radius: 4px; }
.kpi.pos b { color: var(--ok); } .kpi.neg b { color: var(--neg); }
@media (max-width: 900px) { .ger { grid-template-columns: 1fr; } }

/* fatiador 3D */
.drop { border: 2px dashed #cdb9a2; border-radius: 14px; background: #fffaf4; padding: 1.4rem; text-align: center; margin-bottom: 1rem; transition: .15s; }
.drop.over { border-color: var(--pri); background: #f1e6da; }
.drop-ic { font-size: 2.2rem; color: var(--pri); line-height: 1; }
.drop p { max-width: 760px; margin: .6rem auto 0; }
#fatiador .f-corpo { display: none; grid-template-columns: 360px 1fr; gap: 1rem; align-items: start; }
#fatiador.com-modelo .f-corpo { display: grid; }
#fatiador.com-modelo .drop { padding: .8rem; }
.f-vars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.f-var { margin: 0; display: flex; flex-direction: column; } .f-var .f-stats { flex: 1; }
.f-cv { width: 100%; height: auto; background: radial-gradient(circle at 50% 40%, #fff, #efe6da); border-radius: 8px; cursor: grab; touch-action: none; display: block; }
.f-var .preco-grande b { font-size: 1.7rem; }
@media (max-width: 1300px) { .f-vars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { #fatiador.com-modelo .f-corpo, .f-vars { grid-template-columns: 1fr; } }

/* painel do laser */
.pl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 1rem; align-items: start; }
.j-prev { width: 100%; max-width: 560px; height: auto; display: block; margin: .6rem auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.small-drop { padding: .8rem; margin-bottom: 0; }
.row2 { display: flex; gap: .4rem; } .row2 input { margin-top: .25rem; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.jog { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; justify-content: center; margin: .6rem 0; }
.jog button { height: 48px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 1.2rem; cursor: pointer; }
.jog button:active { background: #ece1d4; }
.prog { height: 10px; background: #eee; border-radius: 6px; overflow: hidden; margin-top: .8rem; } .prog i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s; }
.console { background: #1e1b18; color: #d8f5c8; font-size: .78rem; height: 180px; overflow: auto; padding: .5rem; border-radius: 6px; white-space: pre-wrap; }
.seg { background: #fff7e0; border: 1px solid #f1d58a; padding: .5rem .7rem; border-radius: 8px; margin-top: .8rem; }
@media (max-width: 1000px) { .pl { grid-template-columns: 1fr; } }

/* oficina de arquivos */
#oficina .o-corpo, #oficina .o-saida { display: none; }
#oficina.com-arquivo .o-corpo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); gap: 1rem; align-items: start; }
#oficina.com-arquivo .o-saida { display: block; }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { padding: .35rem 0 .35rem 1.6rem; position: relative; border-bottom: 1px solid var(--line); font-size: .9rem; }
.checklist li::before { position: absolute; left: .2rem; font-weight: 700; }
.checklist li.ok::before { content: '✔'; color: var(--ok); } .checklist li.ruim::before { content: '!'; color: var(--neg); } .checklist li.info::before { content: '•'; color: var(--muted); }
@media (max-width: 1000px) { #oficina.com-arquivo .o-corpo { grid-template-columns: 1fr; } }

/* gerador: imagem e arrastar peças */
.g-thumb { display: block; max-width: 160px; max-height: 110px; margin: .6rem auto 0; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
svg.arrastavel .pc { cursor: grab; } svg.arrastavel .pc.movendo { cursor: grabbing; opacity: .85; }
svg.arrastavel .pc-area { fill: transparent; stroke: none; } svg.arrastavel .pc:hover .pc-area { fill: rgba(111, 69, 40, .10); }
svg.arrastavel .pc.ruim .pc-area { fill: rgba(200, 30, 30, .22); }

/* versão / novidades */
.sidebar a.versao { margin-top: .8rem; border-top: 1px solid var(--line); border-radius: 0; padding-top: .8rem; font-size: .8rem; color: var(--muted); flex-direction: column; align-items: flex-start; gap: 0; }
.sidebar a.versao small { color: var(--pri); text-decoration: underline; }
.historico h2.ver { margin-top: 1.4rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); color: var(--pri-d); }
.historico h2.ver:first-of-type { margin-top: .4rem; }
.historico li { margin: .25rem 0; }

/* logotipo */
.topbar .marca { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; }
.logo-topo { height: 34px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 4px; }
.logo-login { display: block; max-height: 90px; max-width: 220px; margin: 0 auto .6rem; object-fit: contain; }
.login-box h1 { text-align: center; } .login-box > p.muted:first-of-type { text-align: center; }
.logo-vitrine { max-height: 90px; max-width: 260px; background: #fff; border-radius: 10px; padding: 6px 10px; margin-bottom: .5rem; }
.orc-topo { display: flex; align-items: center; gap: 1rem; } .orc-topo h1 { margin: 0; } .orc-topo p { margin: .2rem 0 0; }
.logo-orc { max-height: 80px; max-width: 200px; object-fit: contain; }
.logo-cfg { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .6rem; }
.logo-prev { width: 120px; height: 80px; flex-shrink: 0; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; background: #fff; }
.logo-cfg-img { max-width: 110px; max-height: 70px; object-fit: contain; }
@media print { .orc-topo { margin-bottom: .6rem; } }
/* cabeçalho do pedido com logo */
.orc-head .orc-topo { align-items: center; } .orc-empresa { font-size: 1.25rem; margin: 0; }
.orc-num { text-align: right; display: flex; flex-direction: column; } .orc-num b { font-size: 1.4rem; color: var(--pri-d); }
.logo-of { max-height: 44px; max-width: 140px; object-fit: contain; }
@media print { .orc-head.card { border: 0; padding: 0; } .orc-head .muted { color: #444; } }

/* fotos automáticas / desenho das peças */
.prod .img { position: relative; }
.prod .img.desenho, .foto-prev, .thumb { background: #fbf7f1; }
.prod .img .svg-pecas { width: 86%; height: 86%; }
.prod .troca-foto { position: absolute; right: .5rem; bottom: .5rem; opacity: 0; transition: opacity .15s; }
.prod:hover .troca-foto, .prod .img.desenho .troca-foto { opacity: 1; }
.prod .troca-foto .btn { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.sem-foto { font-size: 3rem; color: #cbbfae; }
.foto-prev { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; margin-bottom: .4rem; }
.foto-prev img { width: 100%; height: 100%; object-fit: cover; border: 0; } .foto-prev .svg-pecas { width: 90%; height: 90%; }
.thumb { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; } .thumb .svg-pecas { width: 90%; height: 90%; } .thumb .sem-foto { font-size: 1.2rem; }
/* painel: destaque do mostruário */
.vitrine-banner { display: flex; gap: 1.2rem; align-items: center; background: linear-gradient(120deg, #6f4528, #4f2f19); color: #fff; border-radius: 14px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; text-decoration: none; }
.vitrine-banner .vb-ic { font-size: 2.6rem; line-height: 1; }
.vitrine-banner h2 { margin: 0; font-size: 1.4rem; color: #fff; } .vitrine-banner p { margin: .2rem 0 0; color: #ecdcc8; }
.vitrine-banner .grow { flex: 1; } .vitrine-banner .actions { margin: 0; }
.vitrine-banner .btn { background: #fff; color: var(--pri-d); border-color: #fff; } .vitrine-banner .btn.ghost { background: transparent; color: #fff; border-color: #ecdcc8; }
.vitrine-fotos { display: flex; gap: .4rem; } .vitrine-fotos > div { width: 54px; height: 54px; border-radius: 8px; overflow: hidden; background: #fbf7f1; display: grid; place-items: center; }
.vitrine-fotos img { width: 100%; height: 100%; object-fit: cover; } .vitrine-fotos .svg-pecas { width: 90%; height: 90%; }
@media (max-width: 900px) { .vitrine-banner { flex-direction: column; align-items: flex-start; } .vitrine-fotos { display: none; } }

/* botões de ação nas listas (CRUD) */
.tbl td.acoes { white-space: nowrap; text-align: right; width: 1%; } .tbl td.acoes .btn, .tbl td.acoes form { margin-left: .25rem; }
.tbl td.acoes .btn.sm { padding: .2rem .5rem; }
/* configurações: chapas e acessórios ocupam a largura toda */
.grid2 > .span-all { grid-column: 1 / -1; }
.sticky-save #naoSalvo { color: #b45309; align-self: center; }
/* recorte de foto */
.recorte-fundo { position: fixed; inset: 0; background: rgba(30, 22, 15, .65); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.recorte-caixa { background: #fff; border-radius: 14px; padding: 1.2rem; width: min(480px, 100%); max-height: 96vh; overflow: auto; }
.recorte-caixa h3 { margin: 0 0 .2rem; }
.recorte-area { position: relative; width: 100%; aspect-ratio: 1; margin: .6rem 0; border-radius: 10px; overflow: hidden; background: #eee; }
.recorte-area canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; } .recorte-area canvas:active { cursor: grabbing; }
.recorte-grade { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
  background: linear-gradient(to right, transparent 33.1%, rgba(255,255,255,.5) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.5) 66.7%, transparent 66.9%),
              linear-gradient(to bottom, transparent 33.1%, rgba(255,255,255,.5) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.5) 66.7%, transparent 66.9%); }
.recorte-ctrl { display: flex; align-items: center; gap: .5rem; margin: .4rem 0; flex-wrap: wrap; }
.recorte-ctrl input[type=range] { flex: 1; margin: 0; } .recorte-ctrl select { width: auto; margin: 0; }
/* todas as fotos do mostruário no mesmo formato */
.prod .img img { width: 100%; height: 100%; object-fit: cover; }
.calc-result .escala tr.atual td { font-weight: 700; background: #f5eee6; }
.usando { margin-top: .6rem; background: #f7f1ea; border-radius: 8px; padding: .5rem .7rem; } .usando summary { cursor: pointer; font-weight: 600; }
.usando ul { margin: .4rem 0; padding-left: 1.1rem; } .usando li { margin: .15rem 0; }
.zona-perigo { display: flex; gap: .8rem; align-items: center; margin: -.4rem 0 1rem; padding: .7rem 1rem; border: 1px dashed #e5b8b2; border-radius: 10px; background: #fdf6f5; }
label.chk.excluir { color: var(--neg); margin: 0; }
/* atalho discreto para a área administrativa no mostruário público */
.vitrine-top { position: relative; }
.adm-link { position: absolute; top: .7rem; right: .9rem; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: #e8dccb; text-decoration: none; padding: .28rem .6rem; border: 1px solid rgba(232,220,203,.35); border-radius: 999px; opacity: .75; }
.adm-link:hover { opacity: 1; background: rgba(255,255,255,.08); color: #fff; }
.alert.info { background: #f6efe4; border-color: #e3d3bb; color: #5a3a20; }
#mDiag ol { margin: .4rem 0 0; padding-left: 1.2rem; } #mDiag li { margin: .25rem 0; }
/* painel do laser: editor de peças */
.j-prev { max-width: none; cursor: crosshair; touch-action: none; outline: none; }
.j-prev:focus { box-shadow: 0 0 0 2px rgba(111,69,40,.25); }
.ed-barra .actions { margin: .35rem 0; flex-wrap: wrap; gap: .35rem; }
.ed-mesas { display: inline-flex; align-items: center; gap: .4rem; margin-left: .4rem; }
.ed-ajuda { margin-top: -.2rem; }
.ed-sel { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: .45rem .6rem; margin: .3rem 0; background: #f6efe4; border: 1px solid #e3d3bb; border-radius: 8px; }
.ed-sel label { display: inline-flex; align-items: center; gap: .25rem; margin: 0; font-size: .85rem; }
.ed-sel input.w5 { width: 4.6rem; } .ed-sel input.w4 { width: 3.4rem; }
/* mesa maior + zoom + tela cheia */
.pl { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
.j-prev { width: 100%; aspect-ratio: 1 / 1; height: auto; max-height: 82vh; }
.ed-vista { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-left: auto; }
.ed-mesa-tam { margin: -.2rem 0 .3rem; }
body.sem-rolar { overflow: hidden; }
.pl-tela #cardTrab { position: fixed; inset: 0; z-index: 1000; margin: 0; border-radius: 0; display: flex; flex-direction: column; overflow: auto; padding: .6rem 1rem; }
.pl-tela #cardTrab .j-prev { flex: 1 1 auto; aspect-ratio: auto; min-height: 300px; max-height: none; height: 0; margin: .3rem 0; }
.pl-tela #cardTrab #jDrop, .pl-tela #cardTrab .ed-ajuda, .pl-tela #cardTrab .ed-mesa-tam { display: none; }
.ed-sel[hidden] { display: none; }
.ed-sel.vazio > :not(#edQtd) { visibility: hidden; } .ed-sel.vazio { background: transparent; border-color: transparent; } .ed-sel.vazio #edQtd { color: var(--muted, #8a7a6a); }
#edQtd { display: inline-block; width: 12.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ================= CALCULADORA (passo a passo) ================= */
.cx-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; } .cx-cab h1 { margin-bottom: .1rem; } .cx-cab p { margin-top: 0; }
.cx { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.cx-passo { display: flex; gap: 1rem; }
.cx-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--pri); color: #fff; font-weight: 700; display: grid; place-items: center; }
.cx-corpo { flex: 1; min-width: 0; } .cx-corpo h2 { margin: .2rem 0 .8rem; } .cx-corpo h3 { margin: 1.1rem 0 .5rem; font-size: 1rem; }
.cx-nome { max-width: 520px; }
.cx-inicio { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .4rem 0 .6rem; }
.cx-op { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: .7rem .85rem; cursor: pointer; display: flex; flex-direction: column; gap: .15rem; margin: 0; font: inherit; transition: border-color .15s, background .15s; }
.cx-op b { font-size: .95rem; } .cx-op span { font-size: .8rem; color: var(--muted, #8a7a6a); font-weight: 400; }
.cx-op:hover { border-color: #cdb79c; } .cx-op.on { border-color: var(--pri); background: #f8f0e6; }
.cx-sub { margin: .3rem 0 .4rem; } .cx-sub select { max-width: 520px; }
.cx-pecas { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .5rem; }
.cx-peca { display: grid; grid-template-columns: 54px minmax(110px, 1.2fr) minmax(80px, 1fr) auto minmax(80px, 1fr) 92px 28px; gap: .5rem; align-items: end; padding: .55rem; border: 1px solid var(--line); border-radius: 12px; background: #fdfaf6; }
.cx-peca label { margin: 0; font-size: .75rem; color: var(--muted, #8a7a6a); } .cx-peca label span { display: block; margin-bottom: .1rem; }
.cx-peca input { margin: 0; } .cx-peca .pl, .cx-peca .pa { font-size: 1.05rem; font-weight: 600; }
.cx-peca .x-mult { padding-bottom: .55rem; color: var(--muted, #8a7a6a); }
.cx-peca .x { align-self: center; }
.cx-cabe { grid-column: 2 / -1; color: var(--muted, #8a7a6a); margin-top: -.15rem; }
.cx-mini { grid-row: span 2; width: 54px; height: 54px; border-radius: 8px; background: #fff; border: 1px dashed #d8c6b0; display: grid; place-items: center; align-self: center; }
.cx-mini i { display: block; background: #e2c8a6; border: 1.5px solid #a97a4f; border-radius: 2px; } .cx-mini i.vazio { width: 26px; height: 26px; background: none; border-style: dashed; border-color: #d8c6b0; }
.cx-chapa { max-width: 520px; margin-top: .8rem; }
.cx-perg { margin: .7rem 0 .35rem; font-weight: 600; }
.cx-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cx-chips button, .cx-outro { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem .9rem; cursor: pointer; font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.cx-chips small { color: var(--muted, #8a7a6a); font-weight: 400; }
.cx-chips button.on, .cx-outro.on { border-color: var(--pri); background: var(--pri); color: #fff; } .cx-chips button.on small { color: #ead9c6; }
.cx-outro { font-weight: 400; padding: .2rem .4rem .2rem .9rem; } .cx-outro input { width: 4.2rem; margin: 0; padding: .25rem .4rem; border-radius: 999px; }
.cx-avancado { margin-top: 1rem; } .cx-avancado summary { cursor: pointer; color: var(--muted, #8a7a6a); font-size: .9rem; } .cx-avancado label { max-width: 420px; margin-top: .5rem; }
.cx-acess { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem; }
.cx-ac { border: 1.5px solid var(--line); border-radius: 12px; padding: .5rem .7rem; background: #fff; }
.cx-ac.on { border-color: var(--pri); background: #f8f0e6; } .cx-ac label { margin: 0; cursor: pointer; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.cx-ac label input { width: auto; margin: 0; }
.mini-qtd { display: flex; align-items: center; gap: .3rem; margin-top: .35rem; } .mini-qtd button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.mini-qtd input { width: 3.6rem; margin: 0; text-align: center; padding: .2rem; } .mini-qtd small { color: var(--muted, #8a7a6a); }
.cx-linha { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.qtdbox { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qtdbox button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; } .qtdbox button:hover { background: #f5ecdf; }
.qtdbox input { width: 80px; text-align: center; border: 0; margin: 0; font-size: 1.2rem; font-weight: 700; background: transparent; }
.cx-rapidos { display: flex; gap: .35rem; } .cx-rapidos button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .4rem .7rem; cursor: pointer; font-weight: 600; }
.cx-rapidos button.on { background: var(--pri); color: #fff; border-color: var(--pri); }
#cxMargemR { width: 100%; accent-color: var(--pri); margin: 0; }
.cx-margem-leg { display: flex; justify-content: space-between; align-items: center; } .link { background: none; border: 0; color: var(--pri); text-decoration: underline; cursor: pointer; font: inherit; }
.cx-res { position: sticky; top: 4.6rem; display: flex; flex-direction: column; gap: .8rem; }
.cx-res .card { margin: 0; }
.cx-preco small { color: var(--muted, #8a7a6a); font-weight: 600; }
.cx-valor { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--pri-d); line-height: 1.1; margin: .1rem 0; }
.cx-tag { background: #e3f4ea; color: #1d7a45; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; margin-left: .3rem; }
.cx-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); margin-top: .7rem; padding-top: .6rem; }
.cx-total span { color: var(--muted, #8a7a6a); } .cx-total b { font-size: 1.5rem; }
.cx-lucro { margin: .4rem 0 .8rem; padding: .5rem .7rem; border-radius: 10px; font-size: .9rem; } .cx-lucro.pos { background: #e9f6ee; color: #1d6b3e; } .cx-lucro.neg { background: #fdecea; color: #8b2a20; }
.cx-barra { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: #f1e9de; }
.cx-barra i { display: block; min-width: 3px; }
.cx-leg { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .88rem; }
.cx-leg li { display: grid; grid-template-columns: 12px 1fr auto 2.6rem; gap: .5rem; align-items: center; padding: .18rem 0; }
.cx-leg li i { width: 12px; height: 12px; border-radius: 3px; } .cx-leg li small { color: var(--muted, #8a7a6a); text-align: right; }
.cx-leg li:last-child { font-weight: 700; color: #1d6b3e; }
.cx-tempo { margin: .7rem 0 0; }
.cx-escala h3 { margin: 0 0 .4rem; font-size: 1rem; } .cx-escala table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cx-escala td { padding: .35rem .3rem; border-bottom: 1px solid var(--line); } .cx-escala td:not(:first-child) { text-align: right; }
.cx-escala tr { cursor: pointer; } .cx-escala tr:hover td { background: #faf4ec; } .cx-escala tr.atual td { background: #f3e4d1; font-weight: 700; }
.cx-det summary { cursor: pointer; font-weight: 600; } .cx-det ul { padding-left: 1.1rem; font-size: .88rem; } .cx-det li { margin: .3rem 0; }
.cx-usar { margin-top: 1rem; } .cx-usar.apagado { opacity: .5; pointer-events: none; }
@media (max-width: 1100px) { .cx { grid-template-columns: 1fr; } .cx-res { position: static; } }
@media (max-width: 760px) {
  .cx-inicio { grid-template-columns: 1fr; }
  .cx-peca { grid-template-columns: 54px 1fr 1fr; } .cx-peca .x-mult { display: none; } .cx-peca .pn { grid-column: 2 / -1; } .cx-cabe { grid-column: 1 / -1; }
  .cx-passo { flex-direction: column; gap: .3rem; }
}
.cx-minimo { background: #fff6e0; border: 1px solid #f0d58f; color: #6b4e0b; border-radius: 10px; padding: .55rem .7rem; font-size: .85rem; margin: .5rem 0; } .cx-minimo a { color: inherit; font-weight: 600; }
.mini-qtd[hidden] { display: none; }
.cx-tam-cab { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; } .cx-tam-cab h3 { margin: 0; }
.cx-un { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--muted, #8a7a6a); }
.cx-un button { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: .25rem .7rem; font-weight: 700; cursor: pointer; }
.cx-un button.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.cx-peca.sem-qtd .qq { visibility: hidden; }
.cx-cabe .link { font-size: inherit; padding: 0; }
.cx-dica { margin: -.5rem 0 .6rem; }
/* ================= GERADOR DE MODELOS ================= */
#gerador [hidden] { display: none !important; }
.g-passo { display: flex; align-items: center; gap: .55rem; margin-top: 0; }
.g-passo > span:first-child { width: 28px; height: 28px; border-radius: 50%; background: var(--pri); color: #fff; font-size: .9rem; display: grid; place-items: center; flex: none; }
.g-tipos { display: grid; grid-template-columns: 1fr; gap: .4rem; }
.g-tipo { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: .6rem .7rem; cursor: pointer; display: grid; grid-template-columns: 34px 1fr; column-gap: .5rem; align-items: center; font: inherit; }
.g-tipo i { grid-row: span 2; font-style: normal; font-size: 1.5rem; text-align: center; }
.g-tipo b { font-size: .92rem; } .g-tipo span { font-size: .76rem; color: var(--muted, #8a7a6a); line-height: 1.25; }
.g-tipo:hover { border-color: #cdb79c; } .g-tipo.on { border-color: var(--pri); background: #f8f0e6; }
.g-avanc { margin: .6rem 0; border-top: 1px dashed var(--line); padding-top: .5rem; } .g-avanc summary { cursor: pointer; font-weight: 600; color: var(--muted, #8a7a6a); margin-bottom: .4rem; }
details.g-mat summary { cursor: pointer; } details.g-mat[open] summary { margin-bottom: .6rem; }
.g-dica { margin: .5rem 0 0; }
/* oficina: veredito */
.o-veredito { border-width: 2px; } .o-veredito h3 { font-size: .95rem; margin: .8rem 0 .3rem; }
.o-veredito .v-titulo { font-size: 1.25rem; font-weight: 800; } .o-veredito .v-resumo { margin: .2rem 0 .4rem; }
.o-veredito.v-ok { border-color: #8fd0a8; background: #f2fbf5; } .o-veredito.v-atencao { border-color: #f0d58f; background: #fffaf0; } .o-veredito.v-ruim { border-color: #f0b4ad; background: #fff6f5; }
/* ================= FATIADOR 3D ================= */
.f-inicio { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: center; }
.f-inicio .drop { margin: 0; } .f-inicio .drop p { margin: .5rem 0 0; }
.f-ex-bts { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .4rem; }
.f-ex-bts button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: .7rem; font: inherit; font-weight: 600; cursor: pointer; }
.f-ex-bts button:hover { border-color: #cdb79c; } .f-ex-bts button.on { border-color: var(--pri); background: #f8f0e6; }
.f-status { margin: .5rem 0 0; font-weight: 600; color: var(--pri-d); }
#fatiador:not(.com-modelo) .f-corpo2 { display: none; }
.f-corpo2 { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.f-esq .card, .f-dir .card { margin-top: 0; margin-bottom: 1rem; }
.f-cv { width: 100%; height: auto; border-radius: 10px; background: #f7f1e8; display: block; }
.f-pos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem; background: #faf6f0; border-radius: 10px; padding: .5rem .7rem; margin: .4rem 0 .6rem; }
.f-pos > span { grid-column: 1 / -1; color: var(--muted, #8a7a6a); }
.f-det-box summary { cursor: pointer; } .f-det-box[open] summary { margin-bottom: .6rem; }
.f-abas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .8rem; }
.f-abas button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: .6rem .7rem; font: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: .05rem; }
.f-abas button small { color: var(--muted, #8a7a6a); } .f-abas button em { font-style: normal; font-weight: 800; font-size: 1.15rem; color: var(--pri-d); margin-top: .2rem; }
.f-abas button.on { border-color: var(--pri); background: #f8f0e6; box-shadow: inset 0 -3px 0 var(--pri); }
.f-vars { display: block; } .f-var { display: none; } .f-var.on { display: block; }
.f-var h3 { display: none; }
.f-stats .tbl { margin-top: .4rem; }
.f-folhas h4 { margin: 1rem 0 .4rem; } .f-folhas-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.f-folhas figure { margin: 0; } .f-folhas svg { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; display: block; }
.f-folhas figcaption { font-size: .75rem; color: var(--muted, #8a7a6a); text-align: center; }
@media (max-width: 1100px) { .f-corpo2, .f-inicio { grid-template-columns: 1fr; } }
.g-estilos { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .7rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--line); }
.g-estilos button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .75rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.g-estilos button:hover { border-color: #cdb79c; } .g-estilos button.on { border-color: var(--pri); background: #f8f0e6; }
.g-estilos .sortear { background: var(--pri); color: #fff; border-color: var(--pri); } .g-estilos .sortear.on { background: var(--pri-d); color: #fff; }
.ed-agrupar { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 0 .3rem; font-size: .85rem; } .ed-agrupar select { width: auto; margin: 0; padding: .25rem .4rem; }
.ed-cores { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .3rem 0; padding: .4rem .6rem; background: #faf6f0; border-radius: 8px; }
.ed-cores[hidden] { display: none; }
.ed-cor { display: inline-flex; align-items: center; gap: .35rem; margin: 0; } .ed-cor i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #0003; }
.ed-cor select { width: auto; margin: 0; padding: .2rem .4rem; font-size: .85rem; }
