:root{--bg:#f4f1ed;--paper:#fff;--ink:#292726;--muted:#77716b;--line:#e5e0d9;--accent:#8a7663;--dark:#34312f;--soft:#ede6de;--red:#9b3434;--radius:16px;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg);font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}button:disabled{opacity:.5;cursor:wait}input,select,textarea{width:100%;border:1px solid #d8d1c9;border-radius:9px;background:#fff;padding:11px 12px;color:var(--ink);min-height:42px}input:focus,select:focus,textarea:focus{outline:2px solid #b6a492;outline-offset:1px}label{display:flex;flex-direction:column;gap:7px;font-weight:600;font-size:12px;color:#5e5751}textarea{resize:vertical;line-height:1.5}h1,h2,h3,p{margin-top:0}h1{font-size:29px;letter-spacing:-1px;margin-bottom:0}h2{font-size:18px;font-weight:600;margin-bottom:6px}h3{font-size:14px}.muted{color:var(--muted);line-height:1.6;font-weight:400}.eyebrow{letter-spacing:1.6px;color:var(--accent);font-size:10px;font-weight:700;display:block;margin-bottom:9px}.wordmark{font-size:35px;font-weight:800;letter-spacing:-2px}.wordmark span{font-weight:400}.primary,.secondary{padding:12px 18px;border-radius:9px;font-weight:600;min-height:43px}.primary{background:var(--dark);color:#fff}.primary:hover{background:#514740}.secondary{background:var(--soft);color:#5d4d40;border:1px solid #d8cfc4}.secondary:hover{background:#e5dbd0}.link{background:none;color:var(--accent);padding:8px 4px;text-decoration:underline;text-underline-offset:4px}.error{color:var(--red);line-height:1.5;font-size:13px}.error:empty{display:none}[hidden]{display:none!important}.shell{display:flex;min-height:100vh}.sidebar{width:235px;background:#eeebe6;border-right:1px solid var(--line);padding:32px 22px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:3}.brand{color:var(--ink);text-decoration:none;margin-bottom:42px}.brand small{display:block;margin-top:9px;font-size:9px;letter-spacing:2px;color:var(--muted)}nav{display:flex;flex-direction:column;gap:8px}.nav{text-align:left;padding:14px 16px;border-radius:10px;background:transparent;color:#71665c;font-weight:600}.nav.active{background:#fff;color:var(--ink);box-shadow:0 4px 14px #6151450b}.side-bottom{margin-top:auto;display:flex;flex-direction:column;align-items:flex-start;gap:5px;color:var(--muted);font-size:12px}main{margin-left:235px;padding:32px 40px 60px;width:calc(100% - 235px);max-width:1600px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px}.private-badge{border:1px solid var(--line);background:#eee9e2;color:#7f7267;border-radius:30px;padding:9px 14px;font-size:11px}.quote-top{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:24px}.number-tag{font-size:12px;font-weight:500;color:var(--accent);letter-spacing:.4px}.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin-bottom:18px;box-shadow:0 3px 14px #68544604}.section-head{display:flex;align-items:center;gap:14px;margin-bottom:22px}.section-head p{font-size:12px;color:var(--muted);margin-bottom:0}.section-head>.link{margin-left:auto;white-space:nowrap}.step{border:1px solid #d7cabd;border-radius:50%;width:35px;height:35px;display:grid;place-items:center;color:var(--accent);font-size:11px;flex-shrink:0}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.span2{grid-column:span 2}.span3{grid-column:span 3}.item{border:1px solid var(--line);border-radius:12px;padding:18px;background:#faf9f7;margin-bottom:15px}.item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:16px}.item-head h3{margin:0}.remove{background:transparent;color:#997565;padding:5px 9px;font-size:12px}.item-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.item-grid .product-name{grid-column:span 3}.item-values{border-top:1px solid var(--line);margin-top:17px;padding-top:13px;display:flex;flex-wrap:wrap;gap:10px 24px;color:var(--muted);font-size:11px}.item-values strong{color:var(--ink);font-size:13px;margin-left:5px}.item-values .sale{margin-left:auto}.add-button{width:100%;border-style:dashed;background:#f8f5f1}.field-note{align-self:center;font-size:12px;line-height:1.6;color:var(--muted)}.result-card{background:#fff;border:1px solid #d5c9bc;border-radius:16px;padding:26px}.result-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:11px;margin-bottom:16px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.metrics span{font-size:12px;color:var(--muted);display:block;margin-bottom:10px}.metrics strong{font-size:23px;letter-spacing:-.5px;font-weight:600}.total-metric{border-left:1px solid var(--line);padding-left:20px}.total-metric strong{color:#76563e}.actions{display:flex;gap:10px;margin-top:22px}.fineprint{color:var(--muted);font-size:11px;margin:14px 0 0}.formula-note{margin-top:20px;padding:14px 16px;background:#f6f3ef;border-radius:8px;font-size:12px;line-height:1.7;color:var(--muted)}.editor-row{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:12px;align-items:end;margin:14px 0}.editor-row.pack{grid-template-columns:2fr 1fr auto}.account-card{margin-top:26px}.account-card summary{cursor:pointer;font-weight:600;margin-bottom:18px}.account-card button{margin-top:18px}.history-actions{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:24px}.history-actions label{flex:1;max-width:480px}.history-stats{display:flex;gap:24px;margin-bottom:18px;color:var(--muted);font-size:13px}.history-stats strong{color:var(--ink);margin-left:8px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;color:var(--muted);padding:12px 10px;border-bottom:1px solid var(--line);font-size:11px}td{padding:16px 10px;border-bottom:1px solid var(--line)}td .link{font-size:12px}.empty{padding:50px 20px;text-align:center;color:var(--muted);line-height:1.7}.toast{position:fixed;right:24px;top:20px;z-index:20;max-width:450px;padding:15px 22px;border-radius:10px;color:#fff;background:#454239;box-shadow:0 8px 40px #0002;font-size:13px}.toast.bad{background:#9b4545}.auth-screen{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.auth-brand{background:#e9e0d6;padding:70px 12%;display:flex;flex-direction:column;position:relative;overflow:hidden}.auth-brand>p{font-size:36px;line-height:1.3;letter-spacing:-1.5px;margin-top:75px;z-index:1}.auth-brand>small{margin-top:auto;color:#877665;font-size:12px;z-index:1}.auth-card{align-self:center;padding:60px 15%}.auth-card h1{font-size:29px;margin:14px 0}.auth-card label{margin:18px 0}.auth-card .primary{width:100%;margin-top:5px}.auth-note{font-size:11px;line-height:1.8;color:var(--muted);margin-top:25px}.auth-shape{position:absolute;width:300px;height:250px;left:15%;top:52%;transform:rotate(-20deg)}.auth-shape span{display:block;height:60px;position:absolute;width:240px;border:1px solid #c1af9c;background:linear-gradient(150deg,#e3d6c6,#cdb9a2);border-radius:12px;transform:skewY(-13deg)}.auth-shape span:nth-child(2){top:70px;left:20px;opacity:.7}.auth-shape span:nth-child(3){top:140px;left:40px;opacity:.4}.loading{display:grid;place-content:center;text-align:center;min-height:100vh;color:var(--muted)}dialog{width:min(960px,96vw);max-height:94vh;padding:0;border:0;border-radius:12px;box-shadow:0 20px 80px #0003;background:#fff}dialog::backdrop{background:#39312abc}.dialog-toolbar{display:flex;align-items:center;gap:10px;padding:15px 22px;background:#f2eeea;position:sticky;top:0;z-index:1}.dialog-toolbar>span{margin-right:auto;font-size:12px;color:var(--muted)}#proposalContent{padding:35px 42px}.proposal-head{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #777;padding-bottom:20px}.proposal-head img{height:65px;width:68px;object-fit:contain}.proposal-head h2{font-size:23px;margin-bottom:6px}.proposal-head small{font-size:10px;letter-spacing:1px}.proposal-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0;font-size:11px}.proposal-meta strong{margin-right:8px}.proposal-section{margin-top:22px}.proposal-section h3{background:#666;color:#fff;padding:8px 10px;font-size:12px}.proposal-section p{font-size:12px;line-height:1.7;white-space:pre-line}.proposal-table th{background:#eee;color:#333;padding:9px}.proposal-table td{padding:11px 8px}.proposal-totals{text-align:right;margin:15px 0;font-size:13px}.proposal-totals div{margin:8px}.proposal-total{font-size:18px;border-top:1px solid #999;padding-top:12px;font-weight:700}.signature{display:flex;justify-content:space-between;gap:22px;padding:26px 0 15px;font-size:11px}.proposal-footer{margin-top:25px;text-align:center;color:#666;font-size:11px}#costLabel{font-size:11px;margin:18px 0 0}
@media(max-width:1100px){.sidebar{width:190px}main{margin-left:190px;width:calc(100% - 190px);padding:25px}.item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.item-grid .product-name{grid-column:span 2}.metrics strong{font-size:19px}.result-heading{display:block}}@media(max-width:750px){.sidebar{position:static;width:100%;padding:18px;flex-direction:row;align-items:center;gap:18px;flex-wrap:wrap}.brand{margin:0}.brand .wordmark{font-size:27px}.brand small{font-size:8px}.sidebar nav{flex-direction:row;flex-wrap:wrap;gap:5px}.nav{padding:9px 10px;font-size:11px}.side-bottom{margin:0 0 0 auto;align-items:end}.shell{display:block}main{margin:0;width:100%;padding:25px 15px}.topbar{margin-bottom:22px}h1{font-size:25px}.private-badge{display:none}.card{padding:18px}.grid{grid-template-columns:1fr 1fr}.span3{grid-column:span 2}.grid label.span2{grid-column:span 2}.item-grid{grid-template-columns:1fr 1fr}.item-grid .product-name{grid-column:span 2}.metrics{grid-template-columns:1fr 1fr;row-gap:24px}.total-metric{border:0;padding:0}.actions{flex-wrap:wrap}.quote-top{align-items:flex-start}.quote-top .secondary{font-size:11px;max-width:130px;padding:10px}.section-head{flex-wrap:wrap}.section-head>.link{margin-left:48px;font-size:11px}.editor-row{grid-template-columns:1fr 1fr}.editor-row label:first-child{grid-column:span 2}.editor-row.pack{grid-template-columns:1fr 1fr}.history-actions{display:block}.history-actions>div{margin-top:15px}.history-stats{flex-wrap:wrap;gap:12px}.auth-screen{grid-template-columns:1fr}.auth-brand{padding:28px 30px;min-height:170px}.auth-brand>p{font-size:24px;margin:22px 0 0}.auth-brand small,.auth-shape{display:none}.auth-card{padding:35px 30px}.auth-card h1{font-size:25px}.dialog-toolbar{flex-wrap:wrap;padding:12px}.dialog-toolbar span{width:100%}#proposalContent{padding:22px 18px}.proposal-meta{grid-template-columns:1fr}.proposal-head h2{font-size:17px}.signature{flex-direction:column}.toast{left:15px;right:15px;max-width:none}}
.proposal-heading{flex:1;text-align:center;padding:0 16px}.proposal-heading h2{letter-spacing:2px;font-size:19px}.proposal-services{font-size:9px;line-height:1.65;letter-spacing:1px;min-width:155px}.proposal-accept p{margin-bottom:0}.proposal-accept .signature{padding-top:10px}.proposal-footer{border-top:1px solid #999;padding-top:12px;line-height:1.7}
@media(max-width:600px){.proposal-head{flex-wrap:wrap;gap:10px}.proposal-services{width:100%;text-align:right;font-size:8px}.proposal-heading h2{font-size:14px;letter-spacing:1px}}
@page{size:A4;margin:12mm}@media print{body{background:white;color:#222}.shell,.auth-screen,.loading,.toast{display:none!important}dialog{display:block!important;position:static;max-height:none!important;width:100%!important;margin:0!important;padding:0!important;box-shadow:none!important;border-radius:0;overflow:visible}dialog::backdrop{background:transparent}.dialog-toolbar{display:none!important}#proposalContent{padding:0!important;font:10pt Arial}.proposal-head{padding-bottom:12px;flex-wrap:nowrap;gap:10px}.proposal-head h2{font-size:15pt}.proposal-services{width:auto;font-size:7pt;min-width:140px;line-height:1.5}.proposal-section{margin-top:11px}.proposal-section h3{font-size:9pt;padding:5px 8px;background:#e5e5e5!important;color:#222!important;border-bottom:1px solid #999;margin-bottom:6px}.proposal-section p{font-size:9pt;line-height:1.4;margin-bottom:7px}.proposal-table{font-size:8pt}.proposal-table th{font-size:8pt}.proposal-table td{padding:7px 5px}.proposal-meta{grid-template-columns:1fr 1fr;font-size:8pt;margin:15px 0}.proposal-footer{margin-top:12px}.signature{flex-direction:row;padding:12px 0 8px;font-size:8pt}tr{break-inside:avoid}.proposal-totals,.signature,.proposal-footer{break-inside:avoid}thead{display:table-header-group}.proposal-accept{break-inside:avoid}}

/* Proposta A4 compacta: preserva todos os dizeres e valores. */
@page{size:A4;margin:9mm 10mm}
@media print{
 html,body{margin:0!important;padding:0!important;min-height:0!important;height:auto!important}
 dialog{inset:auto!important;border:0!important;height:auto!important;max-width:none!important}
 #proposalContent{font:8.5pt Arial,Helvetica,sans-serif!important}
 .proposal-head{padding-bottom:7px;gap:8px}
 .proposal-head img{height:44px;width:48px}
 .proposal-heading{padding:0 8px}
 .proposal-heading h2{font-size:13pt;letter-spacing:1.3px;margin:0}
 .proposal-services{font-size:6.5pt;line-height:1.3;min-width:135px}
 .proposal-meta{font-size:7.5pt;line-height:1.2;gap:5px 12px;margin:9px 0}
 .proposal-section{margin-top:7px}
 .proposal-section h3{font-size:8pt;line-height:1.15;padding:4px 7px;margin:0 0 4px}
 .proposal-section p{font-size:8.5pt;line-height:1.25;margin:0 0 4px}
 .proposal-table{font-size:8pt}
 .proposal-table th{font-size:7.5pt;padding:5px}
 .proposal-table td{padding:5px;line-height:1.2}
 .proposal-totals{margin:7px 0;font-size:8.5pt}
 .proposal-totals div{margin:4px 0}
 .proposal-total{font-size:12pt;padding-top:5px}
 .proposal-accept .signature{padding:7px 0 4px;gap:12px;font-size:7.5pt}
 .proposal-footer{font-size:7.5pt;margin-top:7px;padding-top:6px;line-height:1.3}
}

/* Custos internos e controle do negócio */
.tracking-row{display:grid;grid-template-columns:1fr 2fr 1fr auto;gap:12px;align-items:end;padding:12px 0;border-bottom:1px solid var(--line)}
.check-label{flex-direction:row;align-items:center;align-self:center}.check-label input{width:20px;min-height:20px;height:20px}
.consumption-table{min-width:1000px}.consumption-table input{min-width:95px;padding:8px}.consumption-table th:first-child{min-width:180px}
#internalTotals{margin-top:18px}#cashForm button{margin:18px 0}#consumptionSummary{margin-top:18px}.editor-row{grid-template-columns:2fr repeat(4,1fr) auto}
@media(max-width:1000px){.editor-row{grid-template-columns:repeat(3,1fr)}}
@media(max-width:750px){.tracking-row{grid-template-columns:1fr 1fr}.tracking-row label:nth-child(2){grid-column:span 2}.editor-row{grid-template-columns:1fr 1fr}}

/* Logo do sistema */
.system-logo{display:block;width:144px;height:144px;object-fit:contain;background:#fff;border-radius:16px;margin:0 auto 16px;padding:10px;box-sizing:border-box}.sidebar .brand{display:flex;flex-direction:column;align-items:center}.sidebar .system-logo{width:112px;height:112px}.auth-brand .system-logo{margin-left:0}

.system-logo{background:transparent;box-shadow:none;border-radius:0}
@media print{#pdfStatus{display:none!important}}

.proposal-money{display:inline-flex;justify-content:space-between;gap:8px;min-width:95px;white-space:nowrap;font-variant-numeric:tabular-nums}.proposal-table td:nth-last-child(-n+2) .proposal-money{display:flex;min-width:0;width:100%}.proposal-totals>div{display:flex;justify-content:flex-end;align-items:baseline;gap:10px}.proposal-totals .proposal-money{width:115px;min-width:115px}

.proposal-table{table-layout:fixed}.proposal-table th:nth-child(1){width:6.72%}.proposal-table th:nth-child(2){width:39.50%}.proposal-table th:nth-child(3){width:6.72%}.proposal-table th:nth-child(4){width:10.08%}.proposal-table th:nth-child(5),.proposal-table th:nth-child(6){width:18.49%}.proposal-totals .proposal-money{width:18.49%;min-width:0;padding:0 5px;box-sizing:border-box}

/* Pedidos de placas */
.nav-count{display:inline-block;background:#d9c7ab;color:#292820;border-radius:12px;padding:1px 8px;margin-left:5px;font-size:12px}.plate-orders{display:grid;gap:18px}.order-state{border-radius:20px;padding:7px 12px;font-size:12px;font-weight:700;background:#eee8dc;color:#6b542f}.state-approved{background:#e3ede3;color:#36563a}.state-production{background:#e4eaf4;color:#2e4f83}.state-completed{background:#dcece6;color:#285e49}.state-cancelled{background:#f2e2e2;color:#843b3b}.plate-detail{border-left:3px solid #a28a62;padding:4px 18px;margin:16px 0;background:#faf8f4}.plate-detail h3{margin:10px 0}.plate-text{white-space:pre-wrap;overflow-wrap:anywhere}.plate-order p{overflow-wrap:anywhere}.plate-order .section-head{flex-wrap:wrap}.plate-order .actions{flex-wrap:wrap}

.production-box{margin:18px 0;padding:16px;border:1px solid #bdb7ad;border-radius:10px}.production-box h4{margin:0 0 8px}.machine-allocation{padding:14px 0;border-top:1px solid #ddd;margin:12px 0}.remove-machine{align-self:end}.allocation-summary{font-weight:600}

/* Cadastro da coleção */
.catalog-toolbar,.catalog-actions{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.catalog-toolbar label{flex:1;min-width:180px}.catalog-row{display:flex;align-items:center;gap:18px;padding:18px 0;border-bottom:1px solid #e4ded5}.catalog-row:last-child{border:0}.catalog-row>img{width:84px;height:84px;object-fit:cover;border-radius:12px}.catalog-row>div{flex:1;min-width:0}.catalog-row h3{margin:0;overflow-wrap:anywhere}.catalog-row p{margin:6px 0}.catalog-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:16px;margin:20px 0}.catalog-photo{border:1px solid #e4ded5;padding:10px;border-radius:12px}.catalog-photo img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}.catalog-photo button{display:block;margin-top:8px}.catalog-check{display:flex;align-items:center;gap:10px}.catalog-check input{width:auto}.catalog-actions{margin-top:24px}#catalogForm input[type=file]{max-width:100%}
@media(max-width:650px){.catalog-row{flex-wrap:wrap;gap:10px}.catalog-row>div{flex-basis:calc(100% - 100px)}.catalog-row>button{flex:1}.catalog-toolbar>*{width:100%}}
