:root{--bg:#f4f6fa;--panel:#fff;--ink:#172033;--muted:#6e778b;--line:#e2e7ef;--brand:#273790;--brand2:#e63946;--ok:#16794a;--warn:#a26100;--danger:#b42318;--shadow:0 10px 30px rgba(29,42,69,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}a{text-decoration:none;color:inherit}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#111a2e;color:#dfe6f4;padding:22px 14px;display:flex;flex-direction:column;z-index:20}.app-brand{display:flex;align-items:center;gap:11px;padding:0 8px 20px}.app-brand img{width:42px;height:42px;object-fit:contain;background:white;border-radius:10px;padding:4px}.app-brand span{display:flex;flex-direction:column}.app-brand b{font-size:16px;color:#fff}.app-brand small{color:#92a0bc;margin-top:2px}.sidebar nav{display:grid;gap:5px}.sidebar nav a{padding:11px 12px;border-radius:9px;color:#b8c2d6;font-size:14px}.sidebar nav a:hover,.sidebar nav a.active{background:#253254;color:white}.sidebar-foot{margin-top:auto;border-top:1px solid #27324b;padding:16px 10px 2px;display:flex;justify-content:space-between;gap:10px;color:#9da9be}.sidebar-foot a{color:#fff}.main{margin-left:248px;min-height:100vh}.topbar{height:78px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}.topbar h1{font-size:22px;margin:0}.content{padding:26px;max-width:1500px;margin:auto}.nav-toggle{display:none;border:0;background:transparent;font-size:22px}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:9px;padding:10px 14px;background:white;font-weight:700;font-size:14px;cursor:pointer}.btn.primary{background:var(--brand);border-color:var(--brand);color:white}.btn.danger{background:#fff1f0;border-color:#ffd2cf;color:var(--danger)}.btn.small{padding:7px 10px;font-size:12px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.card,.panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.card{padding:20px}.card small{color:var(--muted);font-weight:700}.card strong{display:block;font-size:26px;margin-top:8px}.panel{padding:20px;margin-top:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.panel h2{font-size:17px;margin:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;border-bottom:1px solid var(--line);padding:12px 10px;vertical-align:top}th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.04em}.status{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef2f8;font-size:12px;font-weight:800}.status.aprovado{background:#e9f8ef;color:var(--ok)}.status.recusado{background:#fff0ef;color:var(--danger)}.status.enviado,.status.visualizado{background:#eef1ff;color:var(--brand)}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}.field{grid-column:span 6}.field.span-12{grid-column:span 12}.field.span-4{grid-column:span 4}.field.span-3{grid-column:span 3}.field label{display:block;font-size:12px;font-weight:800;color:#556078;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;border:1px solid #ccd4e2;border-radius:9px;background:#fff;padding:10px 11px;font:inherit;color:var(--ink)}.field textarea{min-height:110px;resize:vertical}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.alert{padding:12px 14px;border-radius:10px;margin-bottom:16px;background:#eef1ff;color:var(--brand)}.alert.success{background:#e9f8ef;color:var(--ok)}.alert.error{background:#fff0ef;color:var(--danger)}.muted{color:var(--muted)}.searchbar{display:flex;gap:10px}.searchbar input{min-width:280px;border:1px solid #ccd4e2;border-radius:9px;padding:10px}.quote-items .item-row{display:grid;grid-template-columns:2fr .65fr .65fr .85fr .7fr .7fr 38px;gap:8px;padding:10px 0;border-bottom:1px solid var(--line);align-items:start}.quote-items input,.quote-items select,.quote-items textarea{width:100%;border:1px solid #ccd4e2;border-radius:8px;padding:9px}.quote-items textarea{min-height:58px}.quote-summary{margin-left:auto;width:min(420px,100%);display:grid;gap:8px}.sum-line{display:flex;justify-content:space-between;padding:7px 0}.sum-line.total{font-size:20px;font-weight:900;border-top:2px solid var(--ink);margin-top:5px;padding-top:12px}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#111a2e,#26377c)}.login-box{width:min(430px,100%);background:white;border-radius:18px;padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.25)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}.login-brand img{width:56px}.login-box h1{margin:0;font-size:22px}.public-page{background:#edf1f7;min-height:100vh;padding:28px 14px}.proposal{width:min(960px,100%);margin:auto;background:#fff;border-radius:16px;box-shadow:var(--shadow);overflow:hidden}.proposal-head{padding:28px 34px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:20px}.proposal-brand{display:flex;gap:14px;align-items:center}.proposal-brand img{width:64px}.proposal-body{padding:30px 34px}.proposal-body h1{font-size:25px}.proposal-body h2{font-size:17px;margin-top:28px}.proposal-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.meta{background:#f7f9fc;border:1px solid var(--line);padding:12px;border-radius:9px}.meta small{display:block;color:var(--muted)}.proposal table{margin-top:10px}.proposal-accept{background:#f8fafc;border-top:1px solid var(--line);padding:28px 34px}.signature-pad{border:1px dashed #8c98ad;border-radius:10px;background:white;width:100%;height:180px;touch-action:none}.accept-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.accept-actions{display:flex;gap:10px;margin-top:14px}.locked-banner{padding:14px 34px;background:#eaf8ef;color:var(--ok);font-weight:800}.installer{max-width:760px;margin:40px auto;padding:24px}.codehint{font-family:ui-monospace,monospace;font-size:12px;background:#101727;color:#d9e2f2;border-radius:9px;padding:12px;overflow:auto}
@media(max-width:1050px){.cards{grid-template-columns:repeat(2,1fr)}.quote-items .item-row{grid-template-columns:1fr 1fr}.main{margin-left:0}.sidebar{transform:translateX(-100%);transition:.2s}.nav-open .sidebar{transform:none}.nav-toggle{display:block}.topbar{padding:0 16px}.content{padding:18px}.top-actions{display:none}}@media(max-width:680px){.cards{grid-template-columns:1fr}.field,.field.span-4,.field.span-3{grid-column:span 12}.proposal-head{padding:20px;display:block}.proposal-body,.proposal-accept{padding:20px}.proposal-meta{grid-template-columns:1fr 1fr}.accept-grid{grid-template-columns:1fr}.searchbar{display:grid}.searchbar input{min-width:0}.quote-items .item-row{grid-template-columns:1fr}.topbar h1{font-size:18px}}
.catalog-results{position:absolute;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);z-index:30;width:min(700px,92vw);max-height:280px;overflow:auto}.catalog-hit{display:flex;width:100%;justify-content:space-between;gap:14px;text-align:left;border:0;border-bottom:1px solid var(--line);background:white;padding:12px;cursor:pointer}.catalog-hit:hover{background:#f5f7fb}.catalog-hit small{color:var(--muted)}
.quote-column-head{display:grid;grid-template-columns:2fr .65fr .65fr .85fr .7fr .7fr 38px;gap:8px;padding:0 0 8px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.discount-line{color:var(--ok)}.public-actions{margin-top:12px}.public-summary{margin-top:22px}.proposal-number{text-align:right}
@media(max-width:1050px){.quote-column-head{display:none}}
@media print{body.public-page{background:#fff;padding:0}.proposal{width:100%;max-width:none;box-shadow:none;border-radius:0}.public-actions,.proposal-accept{display:none!important}.proposal-head,.proposal-body{padding-left:0;padding-right:0}.proposal{overflow:visible}.table-wrap{overflow:visible}a{color:#000}.locked-banner{border:1px solid #ddd}.proposal-number{text-align:right}@page{size:A4;margin:12mm}}
.quote-section{margin-top:28px;border-top:1px solid #e5e8ef;padding-top:18px}.quote-column-head.v2,.item-row{grid-template-columns:minmax(260px,2.6fr) .55fr .65fr .9fr .75fr .9fr .9fr 42px}.section-total{display:flex;justify-content:flex-end;gap:18px;padding:12px 4px;font-size:16px}.catalog-add{position:relative;margin:22px 0}.payment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:12px 0 22px}.pay-card{display:flex;flex-direction:column;gap:8px;border:1px solid #e1e5ed;border-radius:12px;padding:14px;background:#fff}.pay-card>input[type=checkbox]{align-self:flex-start}.pay-card textarea{min-height:70px}.public-payment-options{display:grid;gap:10px;margin-top:10px}.payment-option{border:1px solid #e2e6ee;border-radius:10px;padding:12px}.payment-option input{margin-right:8px}@media(max-width:900px){.payment-grid{grid-template-columns:1fr}.quote-column-head.v2{display:none}.item-row{grid-template-columns:1fr 1fr}.item-row>div:first-of-type{grid-column:1/-1}}


/* v2.0.2 - orçamento: legibilidade e organização */
.quote-editor{max-width:1380px;margin:0 auto}
.quote-section{background:#fbfcfe;border:1px solid #e1e7f0;border-radius:14px;padding:18px;margin-top:22px}
.quote-section .panel-head{margin-bottom:12px}
.quote-column-head.v2{background:#eef2f8;border-radius:9px;padding:10px 8px;margin-bottom:2px;color:#47536b}
.quote-items .item-row{padding:10px 8px;background:#fff}
.quote-items .item-row:nth-child(even){background:#fafbfe}
.quote-items input,.quote-items select,.quote-items textarea{background:#fff;border-color:#bdc7d8}
.quote-items input:focus,.quote-items select:focus,.quote-items textarea:focus,.payment-card input:focus,.payment-card textarea:focus{outline:2px solid rgba(39,55,144,.18);border-color:#5668c7}
.section-total{background:#f2f5fa;border-radius:9px;margin-top:10px;padding:12px 14px;font-weight:700}
.payment-section{margin-top:26px}
.payment-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.payment-section-title h2{margin:0;font-size:19px}
.payment-section-title small{color:#6e778b}
.payment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 24px}
.payment-card{display:block;border:1px solid #dbe2ec;border-radius:14px;padding:16px;background:#fff;box-shadow:0 3px 12px rgba(29,42,69,.04)}
.payment-card:hover{border-color:#b9c5d8}
.payment-card-head{display:flex;align-items:center;gap:9px;margin-bottom:12px;font-size:16px}
.payment-card-head input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:#273790}
.payment-card-head b{font-size:16px}
.payment-card-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.payment-card-body.one{grid-template-columns:1fr}
.payment-field{display:flex;flex-direction:column;gap:5px}
.payment-field.full{grid-column:1/-1}
.payment-field span{font-size:12px;font-weight:800;color:#556078}
.payment-field small{font-size:12px;color:#6e778b;line-height:1.35}
.payment-field input,.payment-field textarea{width:100%;border:1px solid #c7d0df;border-radius:9px;padding:10px 11px;font:inherit;background:#fff;color:#172033}
.payment-field textarea{min-height:86px;resize:vertical}
.payment-help{font-size:12px;color:#6e778b;background:#f5f7fb;border-radius:8px;padding:9px 10px;line-height:1.4}
.quote-summary-card{margin-top:22px;margin-left:auto;width:min(540px,100%);background:#f8fafc;border:1px solid #dce3ed;border-radius:14px;padding:16px 20px}
.quote-summary-card .sum-line{padding:10px 0;border-bottom:1px solid #edf0f5}
.quote-summary-card .sum-line:last-child{border-bottom:0}
.quote-summary-card .sum-line.total{font-size:22px;border-top:2px solid #172033;border-bottom:0;padding-top:15px;margin-top:5px}
.quote-summary-card .discount-line{color:#087b48}
.quote-actions-sticky{position:sticky;bottom:0;z-index:8;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-top:1px solid #e1e6ee;margin:26px -20px -20px;padding:14px 20px;border-radius:0 0 14px 14px}
@media(max-width:1050px){.payment-grid{grid-template-columns:1fr}.quote-summary-card{width:100%}}
@media(max-width:680px){.payment-card-body{grid-template-columns:1fr}.payment-field.full{grid-column:auto}.quote-summary-card{padding:14px}.quote-actions-sticky{margin-left:-18px;margin-right:-18px}}

/* v2.0.4 - consolidação do editor e A4 */
.quote-actions{position:static!important;border-top:0!important;background:transparent!important;margin-top:26px!important;padding:0!important;backdrop-filter:none!important}
.quote-actions-sticky{position:static!important;border-top:0!important;background:transparent!important;margin:26px 0 0!important;padding:0!important;backdrop-filter:none!important}
.catalog-add{display:grid;grid-template-columns:190px minmax(280px,720px);align-items:center;gap:14px;padding:14px 16px;background:#f7f9fc;border:1px solid #e2e7ef;border-radius:12px;margin:22px 0}
.catalog-add label{font-weight:800;color:#47536b}.catalog-add input{width:100%;border:1px solid #bdc7d8;border-radius:9px;padding:11px 12px;font:inherit}.catalog-add .catalog-results{grid-column:2;top:calc(100% - 10px)}
.technical-scope{min-height:120px!important;overflow:hidden!important;resize:none!important;line-height:1.55}
.item-description{overflow:hidden!important;resize:none!important;line-height:1.4}
.quote-items{width:100%}.quote-items .item-row{grid-template-columns:minmax(280px,2.7fr) minmax(58px,.55fr) minmax(70px,.65fr) minmax(105px,.9fr) minmax(85px,.75fr) minmax(110px,.9fr) minmax(105px,.9fr) 42px!important;gap:9px;align-items:start}
.quote-column-head.v2{grid-template-columns:minmax(280px,2.7fr) minmax(58px,.55fr) minmax(70px,.65fr) minmax(105px,.9fr) minmax(85px,.75fr) minmax(110px,.9fr) minmax(105px,.9fr) 42px!important}
.section-total{justify-content:space-between!important;margin-left:auto;max-width:420px;gap:30px}.section-total strong{white-space:nowrap}
.quote-section{overflow:visible}.quote-editor{overflow:visible}
@media(max-width:1180px){.quote-items .item-row{grid-template-columns:1.7fr .55fr .65fr .9fr .75fr .9fr .9fr 42px!important}.quote-column-head.v2{grid-template-columns:1.7fr .55fr .65fr .9fr .75fr .9fr .9fr 42px!important}}
@media(max-width:900px){.catalog-add{grid-template-columns:1fr}.catalog-add .catalog-results{grid-column:1}.quote-items .item-row{grid-template-columns:1fr 1fr!important}.quote-items .item-row>div:first-of-type{grid-column:1/-1}.quote-column-head.v2{display:none}.section-total{max-width:none}}
@media(max-width:600px){.quote-items .item-row{grid-template-columns:1fr!important}.quote-items .item-row>div:first-of-type{grid-column:auto}.payment-section-title{align-items:flex-start;flex-direction:column}}

/* proposta pública responsiva + impressão A4 */
.proposal{max-width:210mm}.proposal-body{overflow:visible}.proposal table{table-layout:auto}.proposal td:first-child{min-width:230px}.proposal td,.proposal th{overflow-wrap:anywhere}.proposal h2{break-after:avoid-page}.proposal .table-wrap{overflow-x:auto}
@media print{
 html,body{background:#fff!important;width:auto!important;height:auto!important}
 body.public-page{padding:0!important;font-size:10.5pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .proposal{width:100%!important;max-width:none!important;margin:0!important;box-shadow:none!important;border:0!important;border-radius:0!important;overflow:visible!important}
 .proposal-head,.proposal-body{padding:0!important}.proposal-head{padding-bottom:7mm!important;margin-bottom:5mm!important}
 .proposal-meta{grid-template-columns:repeat(4,1fr)!important;gap:2mm!important}.meta{padding:2.5mm!important}
 .proposal .table-wrap{overflow:visible!important}.proposal table{font-size:9pt!important;table-layout:fixed!important;width:100%!important}
 .proposal th,.proposal td{padding:2.2mm 1.8mm!important;break-inside:avoid-page;page-break-inside:avoid}.proposal thead{display:table-header-group}.proposal tr{break-inside:avoid-page;page-break-inside:avoid}
 .proposal th:first-child,.proposal td:first-child{width:42%!important}.proposal th:not(:first-child),.proposal td:not(:first-child){width:auto!important}
 .quote-summary,.public-payment-options,.payment-option,.locked-banner{break-inside:avoid-page;page-break-inside:avoid}
 .public-actions,.proposal-accept{display:none!important}
 @page{size:A4 portrait;margin:12mm}
}

.build-badge{display:inline-block;margin:0 0 10px;padding:4px 8px;border:1px solid #d9d9d9;border-radius:999px;font-size:12px;color:#666;background:#fff}

/* v2.1.0 - OS, contratos A4 e catálogo separado */
.os-item-row{display:grid;grid-template-columns:1.2fr 2fr .55fr .65fr;gap:10px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff;margin-bottom:10px}.os-item-row label{display:block;font-size:11px;font-weight:800;color:var(--muted);margin-bottom:4px}.os-item-row input,.os-item-row textarea{width:100%;border:1px solid #cbd4e2;border-radius:8px;padding:9px;font:inherit}.os-item-row textarea{min-height:58px}.admin-photos img{width:160px;height:120px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}
.contract-editor-sheet{width:min(210mm,100%);margin:22px auto;background:#fff;border:1px solid #dfe4ec;box-shadow:0 10px 30px rgba(29,42,69,.08);padding:18mm 16mm;min-height:260mm}.contract-editor-title{font-weight:900;text-align:center;margin-bottom:14px}.contract-body{width:100%;border:0!important;outline:0!important;resize:none!important;min-height:220mm!important;line-height:1.55;font-family:Arial,sans-serif;font-size:14px;background:transparent!important}
.doc-page-bg{background:#e7ebf1;padding:20px 0 50px}.doc-toolbar{width:min(210mm,calc(100% - 24px));margin:0 auto 12px;display:flex;justify-content:flex-end}.a4-sheet{width:210mm;min-height:297mm;margin:0 auto;background:#fff;padding:16mm 16mm 18mm;box-shadow:0 12px 35px rgba(0,0,0,.16);color:#111}.doc-header{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:2px solid #202b63;padding-bottom:8mm;margin-bottom:7mm}.doc-header img{width:42mm;max-height:22mm;object-fit:contain}.doc-header h1{font-size:17pt;margin:0 0 4px}.doc-header>div:last-child{text-align:right}.doc-meta{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px;font-size:10.5pt;margin-bottom:7mm}.doc-block{margin:5mm 0}.doc-block h2{font-size:13pt;margin:0 0 4mm}.doc-block h3,.public-a4 h3{font-size:11.5pt;margin:5mm 0 2.5mm}.pre-text,.contract-text{font-size:10.5pt;line-height:1.55;text-align:justify}.contract-text{white-space:normal}.doc-table{width:100%;border-collapse:collapse;font-size:9.5pt}.doc-table th,.doc-table td{border:1px solid #cfd5de;padding:2.5mm;vertical-align:top}.doc-table th{background:#f1f3f7;color:#333;text-transform:none;letter-spacing:0}.photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4mm}.photo-grid figure{margin:0;break-inside:avoid}.photo-grid img{width:100%;height:48mm;object-fit:contain;border:1px solid #dde2e8;background:#fafafa}.photo-grid figcaption{font-size:8.5pt;margin-top:1mm;color:#555}.signature-box{margin-top:10mm;border-top:1px solid #bbb;padding-top:5mm;font-size:10pt}.sign-area{margin-top:10mm;padding-top:5mm;border-top:1px solid #d8dde5}.avoid-break{break-inside:avoid-page;page-break-inside:avoid}
@media(max-width:900px){.os-item-row{grid-template-columns:1fr 1fr}.a4-sheet{width:calc(100% - 20px);min-height:0;padding:18px}.doc-page-bg{padding-top:10px}.doc-header{align-items:flex-start}.doc-header img{width:130px}.doc-meta{grid-template-columns:1fr}.photo-grid{grid-template-columns:1fr}.photo-grid img{height:auto;max-height:360px}.contract-editor-sheet{padding:18px;min-height:0}.contract-body{min-height:600px!important}}
@media(max-width:620px){.os-item-row{grid-template-columns:1fr}.doc-header{display:block}.doc-header>div:last-child{text-align:left;margin-top:10px}.a4-sheet{width:100%;box-shadow:none;margin:0}.doc-page-bg{padding:0}}
@media print{.no-print{display:none!important}.doc-page-bg{background:#fff!important;padding:0!important}.a4-sheet{width:100%!important;min-height:0!important;margin:0!important;padding:0!important;box-shadow:none!important}.doc-header{break-inside:avoid;page-break-inside:avoid}.doc-table thead{display:table-header-group}.doc-table tr{break-inside:avoid-page;page-break-inside:avoid}.photo-grid figure{break-inside:avoid-page;page-break-inside:avoid}.photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:3.5mm}.photo-grid img{height:45mm}.contract-text{font-size:10pt}.doc-meta{font-size:9.5pt}@page{size:A4 portrait;margin:14mm}}

/* v2.1.2 - documentos e assinaturas */
.dual-signatures{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-top:42px;page-break-inside:avoid;break-inside:avoid}
.signature-party{text-align:center;min-height:125px;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch}
.signature-line{border-top:1px solid #333;margin:10px 10px 8px}
.test-signature,.client-signature{font-family:"Segoe Script","Brush Script MT",cursive;font-size:27px;font-style:italic;min-height:38px;text-align:center}
.signature-party input{display:block;width:100%;margin:7px 0}
.os-item-row{grid-template-columns:minmax(180px,2fr) minmax(220px,3fr) 70px 85px 110px 90px 120px!important;align-items:end}
@media(max-width:900px){.os-item-row{grid-template-columns:1fr!important}.dual-signatures{grid-template-columns:1fr;gap:45px}}
@media print{.doc-toolbar,.no-print{display:none!important}.a4-sheet{box-shadow:none!important;margin:0!important}.dual-signatures{grid-template-columns:1fr 1fr!important}}

/* v2.1.3 assinatura manuscrita + geolocalização */
.signature-canvas-wrap{border:1px solid #bac5d1;border-radius:10px;background:#fff;padding:8px;margin:10px 0}.signature-canvas{display:block;width:100%;height:180px;touch-action:none;background:linear-gradient(#fff,#fbfcfd)}.signature-hint{font-size:12px;color:#667085;margin:6px 0}.signature-img{display:block;max-width:100%;height:70px;object-fit:contain;margin:auto}.sign-evidence{font-size:10.5px;color:#555;margin-top:5px;line-height:1.35}.draft-banner{padding:10px 14px;background:#fff3cd;border:1px solid #ffe69c;border-radius:8px;margin-bottom:14px;color:#664d03}

/* v2.2.2 - dados para pagamento */
.pix-payment-box{display:grid;grid-template-columns:230px 1fr;gap:28px;align-items:center;margin:24px 0;padding:24px;border:1px solid #dde3ea;border-radius:14px;background:#fff}.pix-qr{width:220px;height:220px;object-fit:contain}.pix-data textarea{width:100%;min-height:105px;word-break:break-all;font-family:monospace}.payment-big{font-size:1.35rem;font-weight:700;margin-top:6px}@media(max-width:720px){.pix-payment-box{grid-template-columns:1fr}.pix-qr{margin:auto}}


/* v2.2.9 - revisão mobile/responsiva para uso em APK */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
input,select,textarea,button{font-size:16px}
.mobile-nav-backdrop{display:none}

@media(max-width:1050px){
  .sidebar{width:min(86vw,300px);box-shadow:18px 0 50px rgba(0,0,0,.24);padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(14px,env(safe-area-inset-bottom))}
  .nav-open{overflow:hidden}
  .nav-open .mobile-nav-backdrop{display:block;position:fixed;inset:0;background:rgba(8,15,30,.48);z-index:19}
  .topbar{height:auto;min-height:64px;padding:10px 14px;gap:10px;padding-top:max(10px,env(safe-area-inset-top))}
  .nav-toggle{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;display:inline-flex;align-items:center;justify-content:center}
  .topbar>div:nth-child(2){min-width:0;flex:1}.topbar h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .content{padding:14px 12px 28px;padding-bottom:max(28px,env(safe-area-inset-bottom))}
  .panel{padding:16px;margin-top:14px;border-radius:12px}
  .cards{gap:12px}.card{padding:16px}
}

@media(max-width:760px){
  .top-actions{display:flex}.top-actions .btn{font-size:0;width:44px;height:44px;padding:0;border-radius:12px}.top-actions .btn:after{content:'+';font-size:25px;line-height:1}
  .panel-head{align-items:flex-start;flex-direction:column;margin-bottom:12px}
  .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.actions .btn{width:100%;min-height:44px}
  .form-grid{grid-template-columns:1fr;gap:11px}.field,.field.span-12,.field.span-4,.field.span-3{grid-column:1!important}
  .field input,.field select,.field textarea,.searchbar input{min-height:46px;padding:11px 12px;border-radius:10px}
  .field textarea{min-height:110px}
  .searchbar{grid-template-columns:1fr}.searchbar .btn{width:100%}
  .catalog-add{padding:12px;margin:14px 0}.catalog-results{width:calc(100vw - 36px);max-width:none;left:0}.catalog-hit{display:block}.catalog-hit small{display:block;margin-top:4px}
  .quote-section{padding:12px;margin-top:14px}.quote-items .item-row,.os-item-row{padding:12px;gap:10px}
  .quote-items input,.quote-items select,.quote-items textarea,.os-item-row input,.os-item-row textarea{min-height:44px;font-size:16px}
  .quote-summary{width:100%;margin-top:12px}.sum-line{gap:12px}.sum-line span:last-child{text-align:right;white-space:nowrap}
  .payment-grid{gap:10px}.pay-card,.payment-option{padding:13px}
  .public-page{padding:0;background:#fff}.proposal{border-radius:0;box-shadow:none;width:100%}
  .proposal-head{padding:16px;display:flex;align-items:flex-start}.proposal-brand{align-items:flex-start}.proposal-brand img{width:52px}.proposal-brand b{font-size:13px}.proposal-number{text-align:right;font-size:12px}.proposal-body,.proposal-accept{padding:16px}.proposal-body h1{font-size:21px;margin-top:4px}.proposal-meta{grid-template-columns:1fr;gap:8px}.meta{padding:10px}
  .proposal .table-wrap,.panel>.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-left:-4px;margin-right:-4px;padding-bottom:3px}
  .proposal table{min-width:720px}.proposal td:first-child{min-width:210px}
  table{font-size:13px}th,td{padding:10px 8px}
  .signature-canvas-wrap{padding:6px}.signature-canvas,.signature-pad{height:220px}.accept-actions{display:grid;grid-template-columns:1fr}.accept-actions .btn{width:100%;min-height:46px}
  .dual-signatures{gap:34px;margin-top:28px}.signature-party{min-height:100px}
  .pix-payment-box{padding:14px;gap:16px;margin:16px 0}.pix-qr{width:min(240px,80vw);height:auto}.pix-data textarea{font-size:13px;min-height:120px}
  .payment-big{font-size:1.2rem}
  .doc-toolbar{width:100%;padding:8px 10px;margin:0;justify-content:stretch;gap:8px}.doc-toolbar .btn{flex:1;min-height:44px}.a4-sheet{padding:14px!important}.doc-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}.doc-table tbody,.doc-table thead{min-width:680px}
  .contract-editor-sheet{margin:10px 0;padding:14px;width:100%;box-shadow:none;border-radius:0}.contract-body{font-size:16px!important;min-height:70vh!important}
}

@media(max-width:520px){
  .actions{grid-template-columns:1fr}
  .topbar h1{font-size:17px}
  .card strong{font-size:22px}
  .panel{padding:13px}
  .btn{min-height:44px;padding:10px 12px}
  .btn.small{min-height:38px;padding:8px 9px}
  .sidebar nav a{padding:13px 12px;font-size:15px}
  .proposal-head{display:block}.proposal-number{text-align:left;margin-top:12px}.proposal-brand img{width:48px}
  .public-actions .btn{width:100%}
  .locked-banner{padding:12px 16px}
  .photo-grid img{max-height:none}
}

@media(hover:none) and (pointer:coarse){
  .btn,.sidebar nav a,.payment-option{touch-action:manipulation}
  .btn.small{min-height:40px}
  input[type=radio],input[type=checkbox]{min-width:20px;min-height:20px}
}


/* =========================================================
   ÂNGULO GESTÃO v2.3.0 - MOBILE FIRST VISUAL IMPROVEMENTS
   Somente overrides responsivos. Regras de negócio intactas.
   ========================================================= */

@media (max-width: 768px) {
  html { font-size: 17px; }
  body { font-size: 1rem; line-height: 1.45; }

  /* Header / top bar */
  .topbar, header.topbar, .app-topbar {
    min-height: 58px !important;
    padding: 10px 14px !important;
  }
  .topbar h1, .page-title, .topbar-title {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
  }

  /* Mobile menu button */
  .mobile-menu-btn, .menu-toggle, [data-menu-toggle] {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 10px !important;
    font-size: 1.35rem !important;
  }

  /* Sidebar / drawer */
  .sidebar, aside.sidebar, .app-sidebar {
    width: min(86vw, 330px) !important;
    max-width: 330px !important;
    padding: 16px 12px !important;
  }
  .sidebar .brand, .sidebar-brand {
    min-height: 60px !important;
    padding: 8px 10px 14px !important;
  }
  .sidebar .brand img, .sidebar-brand img {
    width: 46px !important;
    height: 46px !important;
    object-fit: contain !important;
  }
  .sidebar .brand b, .sidebar-brand b {
    font-size: 1.08rem !important;
  }
  .sidebar nav a, .sidebar .nav-link, .sidebar a {
    min-height: 48px !important;
    padding: 12px 14px !important;
    margin: 4px 0 !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .sidebar small, .sidebar .muted { font-size: .85rem !important; }

  /* Content area */
  main, .content, .main-content, .page-content {
    padding: 12px !important;
  }
  .panel, .card {
    border-radius: 14px !important;
    padding: 14px !important;
    margin-bottom: 14px !important;
  }
  .panel-head {
    gap: 10px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
  }
  .panel-head h2, .panel h2, .card h2 {
    font-size: 1.12rem !important;
  }
  .panel h3, .card h3 { font-size: 1rem !important; }

  /* Forms */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .form-grid > *, .field, .field.span-12, .field.span-6, .field.span-4, .field.span-3 {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
  label {
    font-size: .92rem !important;
    margin-bottom: 6px !important;
  }
  input, select, textarea {
    font-size: 16px !important; /* evita zoom automático do Android/iOS */
    min-height: 48px !important;
    padding: 11px 12px !important;
    border-radius: 10px !important;
  }
  textarea { min-height: 110px !important; }

  /* Buttons / actions */
  .btn, button, input[type="submit"] {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: .96rem !important;
    border-radius: 10px !important;
    line-height: 1.2 !important;
  }
  .btn.small {
    min-height: 40px !important;
    padding: 9px 11px !important;
    font-size: .9rem !important;
  }
  .actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .actions .btn {
    flex: 1 1 46% !important;
    text-align: center !important;
  }

  /* Tables: readable on mobile */
  .table-wrap, .panel:has(> table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  table {
    width: 100% !important;
    min-width: 720px !important;
    font-size: .9rem !important;
  }
  th {
    font-size: .78rem !important;
    padding: 11px 10px !important;
    white-space: nowrap !important;
  }
  td {
    padding: 12px 10px !important;
    vertical-align: middle !important;
  }
  td .btn, td button {
    margin: 3px 2px !important;
    white-space: nowrap !important;
  }

  /* Financeiro: bigger action area */
  body:has(a[href*="financeiro"]) table td:last-child {
    min-width: 280px !important;
  }

  /* Status badges */
  .status, .badge {
    font-size: .82rem !important;
    padding: 6px 9px !important;
    border-radius: 999px !important;
    display: inline-block !important;
    line-height: 1.15 !important;
  }

  /* Public quote / signatures */
  .proposal, .document-a4, .a4-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
    box-shadow: none !important;
  }
  .proposal-head, .proposal-meta, .dual-signatures {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 12px !important;
  }
  .proposal-brand {
    align-items: center !important;
  }
  .proposal-brand img {
    max-width: 70px !important;
  }
  .proposal-number {
    text-align: left !important;
  }
  .signature-pad, canvas.signature-pad, [data-signature-canvas] {
    width: 100% !important;
    min-height: 220px !important;
    touch-action: none !important;
  }
  .signature-party {
    min-height: 150px !important;
  }

  /* Payment / Pix */
  .pix-payment-box {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    text-align: center !important;
  }
  .pix-qr {
    width: min(72vw, 300px) !important;
    max-width: 300px !important;
    height: auto !important;
    margin: 0 auto !important;
  }
  .pix-data textarea {
    min-height: 130px !important;
    font-size: .88rem !important;
    word-break: break-all !important;
  }
  .payment-big {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
  }

  /* Lists and dashboard cards */
  .stats-grid, .dashboard-grid, .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Reduce tiny muted text */
  .muted, small {
    font-size: .86rem !important;
  }

  /* Prevent text from becoming microscopic */
  .panel *, .card *, table * {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }
}

@media (max-width: 480px) {
  html { font-size: 18px; }

  .sidebar, aside.sidebar, .app-sidebar {
    width: 88vw !important;
  }

  main, .content, .main-content, .page-content {
    padding: 10px !important;
  }

  .panel, .card {
    padding: 12px !important;
  }

  .actions .btn {
    flex: 1 1 100% !important;
  }

  table {
    min-width: 680px !important;
    font-size: .88rem !important;
  }

  .btn.small {
    font-size: .88rem !important;
  }
}

/* Preserve A4 printing */
@media print {
  .proposal, .document-a4, .a4-page {
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 auto !important;
    padding: 12mm !important;
  }
}


/* =========================================================
   v2.3.1 - MOBILE REAL / SEM MINIATURIZAÇÃO
   Ativado por JS no Android/iPhone mesmo quando o navegador
   usa viewport lógico de desktop (~980px).
   ========================================================= */

html.real-mobile {
  font-size: 18px !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

html.real-mobile body {
  font-size: 18px !important;
  line-height: 1.45 !important;
  overflow-x: hidden !important;
}

html.real-mobile .main {
  margin-left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}

html.real-mobile .sidebar {
  width: min(84vw, 360px) !important;
  transform: translateX(-105%) !important;
  padding: 18px 14px max(16px,env(safe-area-inset-bottom)) !important;
  box-shadow: 16px 0 44px rgba(0,0,0,.30) !important;
}

html.real-mobile body.nav-open .sidebar {
  transform: translateX(0) !important;
}

html.real-mobile .app-brand {
  gap: 13px !important;
  padding: 4px 8px 18px !important;
}
html.real-mobile .app-brand img {
  width: 54px !important;
  height: 54px !important;
}
html.real-mobile .app-brand b {
  font-size: 19px !important;
}
html.real-mobile .app-brand small {
  font-size: 14px !important;
}

html.real-mobile .sidebar nav {
  gap: 5px !important;
}
html.real-mobile .sidebar nav a {
  min-height: 52px !important;
  padding: 13px 14px !important;
  font-size: 17px !important;
  border-radius: 11px !important;
}
html.real-mobile .sidebar-foot {
  font-size: 15px !important;
  padding: 16px 10px 4px !important;
}
html.real-mobile .sidebar-foot small {
  font-size: 14px !important;
}

html.real-mobile .mobile-nav-backdrop {
  z-index: 19 !important;
}
html.real-mobile body.nav-open .mobile-nav-backdrop {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(8,15,30,.52) !important;
}

html.real-mobile .topbar {
  min-height: 64px !important;
  height: auto !important;
  padding: max(8px,env(safe-area-inset-top)) 12px 8px !important;
  gap: 10px !important;
}
html.real-mobile .nav-toggle {
  display: inline-flex !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 25px !important;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
  background: #fff !important;
}
html.real-mobile .topbar h1 {
  font-size: 20px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html.real-mobile .top-actions {
  display: none !important;
}

html.real-mobile .content {
  width: 100% !important;
  max-width: none !important;
  padding: 12px 10px 28px !important;
}
html.real-mobile .panel,
html.real-mobile .card {
  padding: 15px !important;
  margin-top: 12px !important;
  border-radius: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
}
html.real-mobile .panel h2 {
  font-size: 19px !important;
}
html.real-mobile .panel-head {
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

html.real-mobile .form-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}
html.real-mobile .field,
html.real-mobile .field.span-12,
html.real-mobile .field.span-6,
html.real-mobile .field.span-4,
html.real-mobile .field.span-3 {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
}
html.real-mobile .field label,
html.real-mobile .payment-field span {
  font-size: 15px !important;
  margin-bottom: 6px !important;
}
html.real-mobile input,
html.real-mobile select,
html.real-mobile textarea {
  font-size: 17px !important;
  min-height: 50px !important;
  padding: 11px 12px !important;
  border-radius: 10px !important;
}
html.real-mobile textarea {
  min-height: 120px !important;
}

html.real-mobile .btn,
html.real-mobile button {
  min-height: 46px !important;
  padding: 10px 13px !important;
  font-size: 16px !important;
  border-radius: 10px !important;
}
html.real-mobile .btn.small {
  min-height: 43px !important;
  padding: 9px 11px !important;
  font-size: 15px !important;
}
html.real-mobile .actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
html.real-mobile .actions .btn,
html.real-mobile .actions button {
  width: 100% !important;
}

html.real-mobile .status,
html.real-mobile .badge {
  font-size: 14px !important;
  padding: 6px 9px !important;
}

/* ADMIN TABLE -> CARDS no celular */
html.real-mobile table.mobile-card-table {
  min-width: 0 !important;
  width: 100% !important;
  display: block !important;
  font-size: 16px !important;
}
html.real-mobile table.mobile-card-table thead {
  display: none !important;
}
html.real-mobile table.mobile-card-table tbody {
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
}
html.real-mobile table.mobile-card-table tr {
  display: grid !important;
  gap: 0 !important;
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(29,42,69,.05) !important;
}
html.real-mobile table.mobile-card-table td {
  display: grid !important;
  grid-template-columns: minmax(105px,38%) 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 9px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #eef1f5 !important;
  font-size: 16px !important;
  overflow-wrap: anywhere !important;
}
html.real-mobile table.mobile-card-table td:last-child {
  border-bottom: 0 !important;
}
html.real-mobile table.mobile-card-table td::before {
  content: attr(data-label) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
  color: var(--muted) !important;
  font-weight: 800 !important;
}
html.real-mobile table.mobile-card-table td:last-child {
  grid-template-columns: 1fr !important;
}
html.real-mobile table.mobile-card-table td:last-child::before {
  margin-bottom: 2px !important;
}
html.real-mobile table.mobile-card-table td:last-child .btn,
html.real-mobile table.mobile-card-table td:last-child button {
  width: 100% !important;
  margin: 4px 0 !important;
}

/* Cards de OS e formulários internos */
html.real-mobile .os-item-row,
html.real-mobile .item-row,
html.real-mobile .payment-grid,
html.real-mobile .payment-card-body,
html.real-mobile .proposal-meta,
html.real-mobile .accept-grid,
html.real-mobile .dual-signatures {
  grid-template-columns: 1fr !important;
}
html.real-mobile .os-item-row {
  gap: 10px !important;
}
html.real-mobile .catalog-add {
  grid-template-columns: 1fr !important;
}

/* Pix / pagamento */
html.real-mobile .pix-payment-box {
  grid-template-columns: 1fr !important;
  padding: 16px !important;
  gap: 16px !important;
}
html.real-mobile .pix-qr {
  width: min(74vw,300px) !important;
  height: auto !important;
  margin: 0 auto !important;
}
html.real-mobile .payment-big {
  font-size: 24px !important;
}

/* Documento em tela: legível, impressão A4 continua separada */
html.real-mobile .a4-sheet,
html.real-mobile .contract-editor-sheet,
html.real-mobile .proposal {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 14px !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
html.real-mobile .doc-page-bg,
html.real-mobile .public-page {
  padding: 0 !important;
}
html.real-mobile .proposal-head,
html.real-mobile .proposal-body,
html.real-mobile .proposal-accept {
  padding: 16px !important;
}
html.real-mobile .proposal-head,
html.real-mobile .doc-header {
  display: block !important;
}
html.real-mobile .proposal-number,
html.real-mobile .doc-header>div:last-child {
  text-align: left !important;
  margin-top: 10px !important;
}
html.real-mobile .signature-canvas,
html.real-mobile .signature-pad {
  min-height: 240px !important;
  height: 240px !important;
}

/* A impressão permanece A4 mesmo saindo de um celular */
@media print {
  html.real-mobile .a4-sheet {
    width: 210mm !important;
    max-width: 210mm !important;
    padding: 0 !important;
  }
  html.real-mobile .proposal {
    width: 100% !important;
    max-width: none !important;
  }
}


/* =========================================================
   v2.3.2 — MOBILE APP MODE
   Mudança visual forte para celular. Desktop intacto.
   ========================================================= */
html.real-mobile{
  font-size:20px!important;
}
html.real-mobile body{
  font-size:20px!important;
  line-height:1.5!important;
  background:#f3f5f9!important;
}

/* Cabeçalho */
html.real-mobile .topbar{
  min-height:72px!important;
  padding:10px 14px!important;
}
html.real-mobile .topbar h1{
  font-size:23px!important;
  font-weight:800!important;
}
html.real-mobile .nav-toggle{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  font-size:29px!important;
}

/* Menu lateral como app */
html.real-mobile .sidebar{
  width:92vw!important;
  max-width:390px!important;
  padding:20px 16px!important;
}
html.real-mobile .app-brand{
  padding:6px 8px 22px!important;
}
html.real-mobile .app-brand img{
  width:62px!important;
  height:62px!important;
}
html.real-mobile .app-brand b{
  font-size:22px!important;
}
html.real-mobile .app-brand small{
  font-size:15px!important;
}
html.real-mobile .sidebar nav{
  gap:7px!important;
}
html.real-mobile .sidebar nav a{
  min-height:58px!important;
  padding:15px 16px!important;
  font-size:19px!important;
  border-radius:12px!important;
}
html.real-mobile .sidebar-foot{
  font-size:16px!important;
}

/* Conteúdo */
html.real-mobile .content{
  padding:14px 12px 36px!important;
}
html.real-mobile .panel,
html.real-mobile .card{
  border-radius:16px!important;
  padding:18px!important;
  box-shadow:0 5px 18px rgba(29,42,69,.07)!important;
}
html.real-mobile .panel{
  margin-top:14px!important;
}
html.real-mobile .panel h2{
  font-size:22px!important;
}
html.real-mobile .panel-head{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:12px!important;
  margin-bottom:18px!important;
}
html.real-mobile .panel-head .btn{
  width:100%!important;
}

/* Dashboard: uma coluna e números grandes */
html.real-mobile .cards{
  grid-template-columns:1fr!important;
  gap:14px!important;
}
html.real-mobile .card{
  min-height:112px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
html.real-mobile .card small{
  font-size:16px!important;
  margin-bottom:8px!important;
}
html.real-mobile .card strong{
  font-size:32px!important;
  line-height:1.1!important;
  margin-top:4px!important;
}

/* Formulários */
html.real-mobile .form-grid{
  grid-template-columns:1fr!important;
  gap:14px!important;
}
html.real-mobile .field label{
  font-size:16px!important;
  margin-bottom:8px!important;
}
html.real-mobile input,
html.real-mobile select,
html.real-mobile textarea{
  font-size:18px!important;
  min-height:56px!important;
  padding:13px 14px!important;
}
html.real-mobile textarea{
  min-height:140px!important;
}
html.real-mobile .muted,
html.real-mobile small{
  font-size:15px!important;
}

/* Botões grandes */
html.real-mobile .btn,
html.real-mobile button{
  min-height:52px!important;
  padding:12px 16px!important;
  font-size:18px!important;
  font-weight:800!important;
}
html.real-mobile .btn.small{
  min-height:48px!important;
  padding:11px 14px!important;
  font-size:17px!important;
}
html.real-mobile .actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
}

/* Status */
html.real-mobile .status,
html.real-mobile .badge{
  font-size:15px!important;
  padding:8px 12px!important;
}

/* Tabelas em cards realmente mobile */
html.real-mobile table.mobile-card-table tbody{
  gap:16px!important;
}
html.real-mobile table.mobile-card-table tr{
  padding:16px!important;
  border-radius:15px!important;
  box-shadow:0 5px 16px rgba(29,42,69,.06)!important;
}
html.real-mobile table.mobile-card-table td{
  display:block!important;
  padding:12px 0!important;
  font-size:18px!important;
  line-height:1.4!important;
}
html.real-mobile table.mobile-card-table td::before{
  display:block!important;
  margin-bottom:6px!important;
  font-size:13px!important;
  color:#6d768a!important;
  font-weight:900!important;
}
html.real-mobile table.mobile-card-table td b,
html.real-mobile table.mobile-card-table td strong{
  font-size:19px!important;
}
html.real-mobile table.mobile-card-table td:last-child{
  padding-top:14px!important;
}
html.real-mobile table.mobile-card-table td:last-child .btn,
html.real-mobile table.mobile-card-table td:last-child button{
  width:100%!important;
  margin:5px 0!important;
}

/* OS */
html.real-mobile .os-item-row{
  grid-template-columns:1fr!important;
  gap:14px!important;
  padding:16px!important;
}
html.real-mobile .os-item-row label{
  font-size:15px!important;
}
html.real-mobile .os-item-row input,
html.real-mobile .os-item-row textarea{
  font-size:18px!important;
}

/* Orçamento */
html.real-mobile .quote-section{
  padding:16px!important;
  border-radius:16px!important;
}
html.real-mobile .quote-items .item-row{
  grid-template-columns:1fr!important;
  gap:12px!important;
  padding:16px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  margin-bottom:14px!important;
}
html.real-mobile .quote-items input,
html.real-mobile .quote-items select,
html.real-mobile .quote-items textarea{
  font-size:18px!important;
  min-height:54px!important;
}
html.real-mobile .payment-grid{
  grid-template-columns:1fr!important;
}
html.real-mobile .payment-card{
  padding:18px!important;
}
html.real-mobile .payment-card-head b{
  font-size:19px!important;
}
html.real-mobile .quote-summary-card{
  font-size:18px!important;
}
html.real-mobile .quote-summary-card .sum-line.total{
  font-size:26px!important;
}

/* Financeiro / Pix */
html.real-mobile .pix-payment-box{
  padding:18px!important;
}
html.real-mobile .pix-qr{
  width:min(80vw,330px)!important;
}
html.real-mobile .payment-big{
  font-size:30px!important;
}

/* Proposta pública e assinatura */
html.real-mobile .proposal-body h1{
  font-size:26px!important;
}
html.real-mobile .proposal-body h2{
  font-size:21px!important;
}
html.real-mobile .meta{
  padding:14px!important;
}
html.real-mobile .meta small{
  font-size:14px!important;
}
html.real-mobile .meta b{
  font-size:18px!important;
}
html.real-mobile .signature-canvas,
html.real-mobile .signature-pad{
  height:280px!important;
  min-height:280px!important;
}

/* Evita qualquer elemento administrativo microscópico */
html.real-mobile .content *{
  -webkit-text-size-adjust:100%!important;
  text-size-adjust:100%!important;
}

/* Impressão continua A4 */
@media print{
  html.real-mobile{font-size:initial!important}
  html.real-mobile body{font-size:initial!important}
}


/* =========================================================
   v2.3.3 — APARÊNCIA GERAL / ÍCONES / FINANCEIRO / CONFIG
   Somente interface. Funcionalidades preservadas.
   ========================================================= */

:root{
  --brand-soft:#eef2ff;
  --panel-hover:#fbfcff;
  --radius-lg:16px;
}

/* acabamento geral */
body{background:linear-gradient(180deg,#f7f8fb 0,#f2f4f8 100%)}
.topbar{box-shadow:0 1px 0 rgba(20,31,56,.03)}
.panel,.card{transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.panel:hover,.card:hover{border-color:#d8deea}
.btn{gap:7px;transition:transform .12s ease,box-shadow .12s ease,background .12s ease}
.btn:hover{transform:translateY(-1px)}
.btn.primary{box-shadow:0 5px 12px rgba(39,55,144,.16)}
input:focus,select:focus,textarea:focus{outline:3px solid rgba(39,55,144,.10)!important;border-color:#7180cf!important}

/* menu com ícones */
.sidebar nav a{display:flex!important;align-items:center;gap:11px}
.nav-icon{
  width:28px;height:28px;min-width:28px;border-radius:8px;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.06);color:#dce5fa;font-size:13px;font-weight:900;
}
.sidebar nav a.active .nav-icon,.sidebar nav a:hover .nav-icon{
  background:rgba(255,255,255,.14);color:#fff;
}
.nav-label{min-width:0}

/* títulos com ícone */
.section-heading,.settings-title{display:flex;align-items:center;gap:11px}
.section-heading h2,.settings-title h2{margin:0}
.section-icon,.settings-icon{
  width:38px;height:38px;min-width:38px;border-radius:11px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--brand-soft);color:var(--brand);font-weight:900;
}
.settings-title small{display:block;margin-top:2px;color:var(--muted);font-size:12px}

/* Financeiro — nada sai do card */
.finance-create{overflow:visible}.finance-list{overflow:visible}
.finance-list table{table-layout:auto}
.finance-list td,.finance-list th{overflow-wrap:anywhere;word-break:normal}
.finance-actions{
  min-width:260px;
  max-width:420px;
  white-space:normal!important;
}
.finance-actions .btn,.finance-actions button{
  white-space:normal!important;
  line-height:1.25!important;
  max-width:100%;
  overflow-wrap:anywhere;
}
.finance-list-head{margin-bottom:6px}
.finance-create .muted{max-width:900px;line-height:1.5}

/* Configurações — aproveitamento melhor de tela */
.settings-page{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.settings-page .settings-panel{margin-top:0}
.settings-payment{grid-column:1}
.settings-asaas{grid-column:2}
.settings-institution{grid-column:1/-1}
.settings-panel h2{font-size:18px}
.settings-panel code{
  display:block;max-width:100%;overflow:auto;padding:10px 12px;
  background:#f5f7fb;border:1px solid var(--line);border-radius:9px;
  white-space:nowrap;font-size:12px;
}
.settings-panel .actions{margin-top:16px}
.settings-panel textarea{min-height:105px}

/* desktop mais agradável */
@media(min-width:1051px){
  .content{padding:30px}
  .sidebar{width:258px}
  .main{margin-left:258px}
  .sidebar nav a{min-height:44px}
}

/* Mobile */
html.real-mobile .nav-icon{
  width:38px!important;height:38px!important;min-width:38px!important;
  border-radius:10px!important;font-size:16px!important;
}
html.real-mobile .sidebar nav a{gap:13px!important}
html.real-mobile .section-icon,
html.real-mobile .settings-icon{
  width:46px!important;height:46px!important;min-width:46px!important;font-size:18px!important;
}
html.real-mobile .section-heading h2,
html.real-mobile .settings-title h2{font-size:21px!important}
html.real-mobile .settings-title small{font-size:14px!important}

html.real-mobile .settings-page{
  grid-template-columns:1fr!important;
  gap:14px!important;
}
html.real-mobile .settings-payment,
html.real-mobile .settings-asaas,
html.real-mobile .settings-institution{grid-column:1!important}
html.real-mobile .settings-panel{margin-top:0!important}
html.real-mobile .settings-panel code{
  white-space:normal!important;word-break:break-all!important;font-size:14px!important;
}

/* Financeiro em celular: ação não vaza e texto longo quebra corretamente */
html.real-mobile .finance-list{
  overflow:visible!important;
}
html.real-mobile .finance-actions{
  min-width:0!important;
  max-width:none!important;
  width:100%!important;
  overflow:hidden!important;
}
html.real-mobile .finance-actions .btn,
html.real-mobile .finance-actions button{
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  text-align:center!important;
}
html.real-mobile table.mobile-card-table td,
html.real-mobile table.mobile-card-table td *{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}
html.real-mobile .finance-create p,
html.real-mobile .finance-create small{
  overflow-wrap:anywhere!important;
}
html.real-mobile .panel-head.finance-list-head{
  flex-direction:row!important;
}

/* telas estreitas em navegador normal */
@media(max-width:760px){
  .settings-page{grid-template-columns:1fr}
  .settings-payment,.settings-asaas,.settings-institution{grid-column:1}
  .finance-actions{min-width:0;max-width:none}
  .finance-actions .btn,.finance-actions button{white-space:normal;overflow-wrap:anywhere}
}


/* =========================================================
   v2.3.4 — PRODUTOS + CONFIGURAÇÕES
   Apenas layout/aparência.
   ========================================================= */

/* Produtos e Serviços */
.catalog-page{overflow:hidden}
.catalog-titlebar{margin-bottom:14px}
.catalog-titlebar .section-heading>div{display:flex;flex-direction:column;gap:2px}
.catalog-titlebar .section-heading small{font-size:12px}
.catalog-new{flex:0 0 auto}
.catalog-filters{
  display:grid;
  grid-template-columns:minmax(280px,1fr) 210px auto;
  gap:10px;
  align-items:center;
  padding:14px;
  background:#f7f9fc;
  border:1px solid var(--line);
  border-radius:12px;
  margin-bottom:10px;
}
.catalog-filters input,.catalog-filters select{
  width:100%;height:42px;border:1px solid #ccd4e2;border-radius:9px;background:#fff;padding:0 11px;font:inherit
}
.catalog-toolbar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:8px 2px 14px;
}
.catalog-toolbar-label{
  font-size:12px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin-right:3px
}
.catalog-table{table-layout:fixed}
.catalog-table col.c-type{width:105px}
.catalog-table col.c-sku{width:130px}
.catalog-table col.c-item{width:auto}
.catalog-table col.c-category{width:220px}
.catalog-table col.c-price{width:120px}
.catalog-table col.c-action{width:95px}
.catalog-table th,.catalog-table td{vertical-align:middle}
.catalog-table th{white-space:nowrap}
.catalog-table th:nth-child(5),.catalog-table td:nth-child(5){text-align:right}
.catalog-table th:nth-child(6),.catalog-table td:nth-child(6){text-align:center}
.catalog-table td:nth-child(1),.catalog-table td:nth-child(2),.catalog-table td:nth-child(5){white-space:nowrap}
.catalog-actions .btn{min-width:70px}

/* Configurações: fluxo vertical, simples e claro */
.settings-clean{max-width:1180px;margin:0 auto}
.settings-intro{
  padding:2px 2px 4px;
}
.settings-intro h2{font-size:24px;margin:0 0 5px}
.settings-intro p{margin:0;color:var(--muted)}
.settings-clean-panel{
  margin-top:16px;
  padding:22px;
  overflow:hidden;
}
.settings-clean-head{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding-bottom:17px;
  margin-bottom:18px;
  border-bottom:1px solid var(--line);
}
.settings-clean-head>div{min-width:0}
.settings-clean-head h2{font-size:18px;margin:1px 0 4px}
.settings-clean-head p{margin:0;color:var(--muted);font-size:13px}
.settings-asaas-head .badge{margin-left:auto;align-self:center}
.settings-bank-grid .field:last-child{grid-column:span 6}
.settings-save{
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #edf0f5;
}
.settings-save-inline{gap:9px}
.settings-subsection{
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid var(--line);
}
.settings-subsection h3{font-size:15px;margin:0 0 3px}
.settings-subsection>p{margin:0 0 14px}
.settings-connection{
  display:grid;
  gap:10px;
  margin-top:18px;
  padding:14px;
  background:#f7f9fc;
  border:1px solid var(--line);
  border-radius:11px;
}
.settings-connection>div{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;align-items:start}
.settings-connection span{font-size:12px;font-weight:900;color:var(--muted);text-transform:uppercase}
.settings-connection strong{font-size:13px}
.settings-connection code{
  display:block;
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  font-size:12px;
}

/* remove a distribuição antiga em duas colunas */
.settings-page{display:block!important}

/* mobile */
html.real-mobile .catalog-titlebar{
  flex-direction:column!important;
  align-items:stretch!important;
}
html.real-mobile .catalog-new{width:100%!important}
html.real-mobile .catalog-filters{
  grid-template-columns:1fr!important;
  padding:14px!important;
}
html.real-mobile .catalog-filters input,
html.real-mobile .catalog-filters select{height:54px!important}
html.real-mobile .catalog-toolbar{
  display:grid!important;
  grid-template-columns:1fr!important;
}
html.real-mobile .catalog-toolbar-label{margin:3px 0}
html.real-mobile .catalog-toolbar .btn{width:100%!important}
html.real-mobile .catalog-table colgroup{display:none}
html.real-mobile .catalog-table{table-layout:auto!important}

html.real-mobile .settings-clean{max-width:none!important}
html.real-mobile .settings-intro h2{font-size:25px!important}
html.real-mobile .settings-clean-panel{padding:17px!important}
html.real-mobile .settings-clean-head{
  align-items:center!important;
}
html.real-mobile .settings-clean-head h2{font-size:21px!important}
html.real-mobile .settings-clean-head p{font-size:15px!important}
html.real-mobile .settings-asaas-head{flex-wrap:wrap!important}
html.real-mobile .settings-asaas-head .badge{margin-left:58px!important}
html.real-mobile .settings-save{
  display:grid!important;
  grid-template-columns:1fr!important;
}
html.real-mobile .settings-save .btn{width:100%!important}
html.real-mobile .settings-connection>div{
  grid-template-columns:1fr!important;
  gap:5px!important;
}
html.real-mobile .settings-connection code{font-size:14px!important}

@media(max-width:850px){
  .catalog-filters{grid-template-columns:1fr 180px}
  .catalog-filters .btn{grid-column:1/-1}
  .catalog-table{min-width:850px}
}


/* =========================================================
   v2.3.5 — MOBILE FULL WIDTH / SEM CORTES
   Somente interface mobile.
   ========================================================= */

/* mobile real: usar quase toda a largura disponível */
html.real-mobile body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
html.real-mobile .app-shell,
html.real-mobile .main,
html.real-mobile .content{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .content{
  padding-left:6px!important;
  padding-right:6px!important;
  padding-top:10px!important;
}
html.real-mobile .panel,
html.real-mobile .card{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  padding:14px!important;
  border-radius:12px!important;
}
html.real-mobile .cards{
  width:100%!important;
  gap:10px!important;
}

/* evita containers internos herdando largura de desktop */
html.real-mobile .quote-editor,
html.real-mobile .settings-clean,
html.real-mobile .catalog-page,
html.real-mobile .finance-create,
html.real-mobile .finance-list,
html.real-mobile .table-wrap,
html.real-mobile .form-grid,
html.real-mobile form{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .field,
html.real-mobile .field>*,
html.real-mobile .payment-field,
html.real-mobile .payment-field>*{
  min-width:0!important;
  max-width:100%!important;
}

/* texto longo nunca corta */
html.real-mobile p,
html.real-mobile span,
html.real-mobile small,
html.real-mobile strong,
html.real-mobile b,
html.real-mobile label,
html.real-mobile h1,
html.real-mobile h2,
html.real-mobile h3,
html.real-mobile td,
html.real-mobile th,
html.real-mobile a,
html.real-mobile button,
html.real-mobile code{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
html.real-mobile .topbar h1{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  line-height:1.2!important;
}

/* botões: sem texto vazando */
html.real-mobile .btn,
html.real-mobile button{
  max-width:100%!important;
  white-space:normal!important;
  height:auto!important;
  min-width:0!important;
  text-align:center!important;
}

/* selects / inputs não ultrapassam viewport */
html.real-mobile input,
html.real-mobile select,
html.real-mobile textarea{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}

/* cards de tabelas ocupam 100% e não cortam */
html.real-mobile table.mobile-card-table,
html.real-mobile table.mobile-card-table tbody,
html.real-mobile table.mobile-card-table tr,
html.real-mobile table.mobile-card-table td{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile table.mobile-card-table tr{
  padding:13px!important;
}
html.real-mobile table.mobile-card-table td{
  overflow:visible!important;
}
html.real-mobile table.mobile-card-table td::before{
  white-space:normal!important;
}

/* produtos: remover largura mínima desktop no celular */
html.real-mobile .catalog-table-wrap{
  overflow:visible!important;
}
html.real-mobile .catalog-table{
  min-width:0!important;
  width:100%!important;
}
html.real-mobile .catalog-table colgroup{
  display:none!important;
}
html.real-mobile .catalog-titlebar,
html.real-mobile .catalog-filters,
html.real-mobile .catalog-toolbar{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}

/* financeiro */
html.real-mobile .finance-list,
html.real-mobile .finance-list table,
html.real-mobile .finance-list tbody,
html.real-mobile .finance-list tr,
html.real-mobile .finance-list td{
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .finance-actions{
  overflow:visible!important;
}
html.real-mobile .finance-actions .btn,
html.real-mobile .finance-actions button{
  overflow:visible!important;
}

/* orçamento / itens */
html.real-mobile .quote-section,
html.real-mobile .quote-items,
html.real-mobile .quote-items .item-row,
html.real-mobile .payment-card,
html.real-mobile .quote-summary-card{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .quote-items .item-row{
  padding:13px!important;
}
html.real-mobile .quote-summary-card{
  margin-left:0!important;
}

/* documentos públicos em tela */
html.real-mobile .proposal,
html.real-mobile .proposal-head,
html.real-mobile .proposal-body,
html.real-mobile .proposal-accept,
html.real-mobile .a4-sheet,
html.real-mobile .contract-editor-sheet{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .proposal table,
html.real-mobile .doc-table{
  max-width:100%!important;
}

/* configurações */
html.real-mobile .settings-clean-panel,
html.real-mobile .settings-clean-head,
html.real-mobile .settings-connection,
html.real-mobile .settings-connection>div{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .settings-connection code{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-all!important;
}

/* celulares estreitos */
@media(max-width:480px){
  html.real-mobile .content{padding-left:4px!important;padding-right:4px!important}
  html.real-mobile .panel,html.real-mobile .card{padding:12px!important;border-radius:10px!important}
  html.real-mobile .topbar{padding-left:8px!important;padding-right:8px!important}
  html.real-mobile .topbar h1{font-size:21px!important}
  html.real-mobile .settings-clean-panel{padding:12px!important}
  html.real-mobile .catalog-filters{padding:10px!important}
}


/* v2.3.6 — mobile mais aproveitado + seletor financeiro */
html.real-mobile .content{
  padding-left:2px!important;
  padding-right:2px!important;
}
html.real-mobile .panel,
html.real-mobile .card{
  border-left:0!important;
  border-right:0!important;
  border-radius:8px!important;
  padding-left:10px!important;
  padding-right:10px!important;
}
html.real-mobile .finance-quote-picker{
  overflow:hidden!important;
}
html.real-mobile .finance-quote-picker select{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  font-size:16px!important;
  padding-left:10px!important;
  padding-right:32px!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
html.real-mobile .finance-quote-picker option{
  font-size:16px!important;
}
html.real-mobile .actions{
  gap:7px!important;
}
html.real-mobile .actions .btn{
  width:100%!important;
}
@media(max-width:420px){
  html.real-mobile .content{padding-left:0!important;padding-right:0!important}
  html.real-mobile .panel,html.real-mobile .card{padding-left:8px!important;padding-right:8px!important}
}


/* v2.3.7 — menu mobile rolável */
html.real-mobile .sidebar{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
}
html.real-mobile .sidebar nav{
  flex:0 0 auto!important;
}
html.real-mobile .sidebar-foot{
  margin-top:18px!important;
  padding-bottom:max(18px,env(safe-area-inset-bottom))!important;
}


/* v2.3.8 — orçamento mobile: checkbox + título aproveitando a largura */
html.real-mobile input[type="checkbox"],
html.real-mobile input[type="radio"]{
  width:22px!important;
  min-width:22px!important;
  max-width:22px!important;
  height:22px!important;
  min-height:22px!important;
  padding:0!important;
  margin:0!important;
  flex:0 0 22px!important;
}
html.real-mobile .payment-card{
  padding:12px!important;
}
html.real-mobile .payment-card-head{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  width:100%!important;
  margin:0 0 10px!important;
}
html.real-mobile .payment-card-head b{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  font-size:18px!important;
  line-height:1.25!important;
  text-align:left!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
}
html.real-mobile .payment-card-body,
html.real-mobile .payment-card-body.one,
html.real-mobile .payment-field{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.real-mobile .payment-field span{
  display:block!important;
  width:100%!important;
  font-size:15px!important;
  line-height:1.3!important;
}
html.real-mobile .payment-field textarea{
  min-height:105px!important;
}
html.real-mobile .contract-auto-label{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  gap:10px!important;
  width:100%!important;
}
html.real-mobile .contract-auto-label input[type="checkbox"]{
  margin-top:2px!important;
}
html.real-mobile .contract-auto-label b{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  font-size:17px!important;
  line-height:1.35!important;
  text-align:left!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
}
@media(max-width:480px){
  html.real-mobile .payment-card{padding:10px!important}
  html.real-mobile .payment-card-head b{font-size:17px!important}
}

/* v2.3.9 — correção definitiva da tela Novo orçamento em celular */
@media (max-width:680px){
  .payment-card{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding:10px!important;
  }
  .payment-card-head{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    align-items:center!important;
    justify-content:stretch!important;
    column-gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 10px!important;
  }
  .payment-card-head input[type="checkbox"]{
    appearance:auto!important;
    -webkit-appearance:checkbox!important;
    display:block!important;
    width:22px!important;
    min-width:22px!important;
    max-width:22px!important;
    height:22px!important;
    min-height:22px!important;
    margin:0!important;
    padding:0!important;
  }
  .payment-card-head b{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    font-size:17px!important;
    line-height:1.25!important;
    text-align:left!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:break-word!important;
  }
  .payment-card-body,
  .payment-card-body.one,
  .payment-field,
  .payment-field input,
  .payment-field textarea{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .contract-auto-label{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    align-items:start!important;
    column-gap:10px!important;
    width:100%!important;
    max-width:100%!important;
  }
  .contract-auto-label input[type="checkbox"]{
    appearance:auto!important;
    -webkit-appearance:checkbox!important;
    width:22px!important;
    min-width:22px!important;
    max-width:22px!important;
    height:22px!important;
    min-height:22px!important;
    margin:2px 0 0!important;
    padding:0!important;
  }
  .contract-auto-label b{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    font-size:16px!important;
    line-height:1.35!important;
    text-align:left!important;
    white-space:normal!important;
    word-break:normal!important;
  }
}

/* v2.4.0 - upload fotografico da OS */
.os-photo-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.os-photo-card{display:grid;grid-template-columns:140px 1fr;gap:12px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px;align-items:start}.os-photo-card img{width:140px;height:110px;object-fit:cover;border-radius:8px;border:1px solid var(--line);background:#f4f6f9}.os-photo-card-body label{display:block;font-size:12px;font-weight:800;color:var(--muted);margin-top:6px}.os-photo-card-body textarea{width:100%;margin-top:5px;min-height:66px}.os-photo-name{font-size:12px;font-weight:700;overflow-wrap:anywhere}.admin-photos figure{margin:0}.admin-photos figcaption{font-size:12px;color:var(--muted);margin-top:5px}.admin-photos img{width:100%;height:160px}.admin-photos{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){.os-photo-preview{grid-template-columns:1fr}.os-photo-card{grid-template-columns:96px 1fr}.os-photo-card img{width:96px;height:96px}.admin-photos{grid-template-columns:1fr 1fr}.admin-photos img{height:140px}}

/* v2.4.1 - registro fotografico mais compacto no A4 */
@media print{.photo-section{break-before:auto}.photo-grid figcaption{font-size:8pt;line-height:1.25}.photo-grid figure{margin-bottom:1mm}}


/* v2.4.2 - A4 fotografico compacto em web/app + exclusao na edicao */
.public-a4 .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3mm!important}
.public-a4 .photo-grid img{height:32mm!important;max-height:32mm!important;object-fit:contain!important}
.photo-delete-option{display:flex;align-items:center;gap:7px;margin-top:7px;padding:7px 8px;border:1px solid #e2e6ec;border-radius:7px;background:#fafbfc;font-size:12px;font-weight:700;color:#8b1e1e;cursor:pointer}
.photo-delete-option input{width:18px!important;height:18px!important;min-width:18px!important;margin:0}
@media(max-width:900px){
  .public-a4 .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  .public-a4 .photo-grid img{height:90px!important;max-height:90px!important}
}
@media(max-width:520px){
  .public-a4 .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .public-a4 .photo-grid img{height:78px!important;max-height:78px!important}
  .public-a4 .photo-grid figcaption{font-size:9px;line-height:1.15}
}
@media print{
  .public-a4 .photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3mm!important}
  .public-a4 .photo-grid img{height:32mm!important;max-height:32mm!important}
}


/* v2.6.16 - Financeiro: não cortar cobranças no eixo vertical */
.finance-list{max-height:none!important;height:auto!important;overflow-y:visible!important}
.finance-list .table-wrap{max-height:none!important;height:auto!important;overflow-y:visible!important;overflow-x:auto}
.finance-list table{height:auto!important}

/* =========================================================
   v2.6.27 — RESPONSIVIDADE GLOBAL DO SISTEMA
   Camada final para todas as telas administrativas e públicas.
   Não altera regras de negócio.
   ========================================================= */

html,body{max-width:100%;overflow-x:hidden}
.app-shell,.main,.content,.panel,.card,.form-grid,.field,.table-wrap,.actions,.searchbar{min-width:0}
.panel,.card,.proposal,.a4-sheet,.login-box,.installer{max-width:100%}
input,select,textarea,button{max-width:100%}
textarea{overflow-wrap:anywhere}
pre,.codehint,.muted,b,strong,small,td,th{overflow-wrap:anywhere}
.table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
table{max-width:100%}
.panel-head>*{min-width:0}
.actions form{margin:0;max-width:100%}
.actions form .btn{width:100%}
.searchbar select{border:1px solid #ccd4e2;border-radius:9px;padding:10px;background:#fff;min-height:42px}

@media (max-width:1050px){
  .main{width:100%;margin-left:0!important}
  .sidebar{height:100dvh;max-height:100dvh;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important}
  .sidebar nav{flex:0 0 auto!important;padding-bottom:8px}
  .sidebar-foot{margin-top:18px!important;padding-bottom:max(18px,env(safe-area-inset-bottom))!important}
  .content{width:100%;max-width:100%;margin:0;padding:16px}
  .topbar{width:100%;max-width:100%}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .panel-head{flex-wrap:wrap}
  .panel-head .searchbar{flex:1 1 520px;min-width:0}
  .panel-head>.btn{flex:0 0 auto}
  .quote-editor,.contract-editor-sheet{max-width:100%}
}

@media (max-width:768px){
  body{font-size:15px}
  .content{padding:10px 8px 24px!important}
  .topbar{min-height:60px!important;padding:8px 10px!important;gap:8px!important}
  .topbar h1{font-size:17px!important;line-height:1.2;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
  .nav-toggle{flex:0 0 44px}
  .top-actions{flex:0 0 auto}
  .top-actions .btn{width:44px!important;min-width:44px!important;height:44px!important;overflow:hidden}

  .panel,.card{width:100%;padding:12px!important;margin-top:10px!important;border-radius:12px!important}
  .cards{grid-template-columns:1fr!important;gap:10px!important}
  .card strong{font-size:22px!important}
  .panel-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
  .panel-head h2{width:100%}
  .panel-head>.btn,.panel-head>.actions,.panel-head>.searchbar{width:100%!important}

  .form-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .form-grid>.field,.field,.field.span-12,.field.span-6,.field.span-4,.field.span-3{grid-column:1/-1!important;width:100%!important;min-width:0!important}
  .field input,.field select,.field textarea,.searchbar input,.searchbar select{width:100%!important;min-width:0!important;min-height:44px!important;font-size:16px!important}
  input[type=file]{padding:8px!important}
  input[type=checkbox],input[type=radio]{width:21px!important;min-width:21px!important;height:21px!important;min-height:21px!important;padding:0!important}

  .searchbar{display:grid!important;grid-template-columns:1fr!important;width:100%!important;gap:8px!important}
  .searchbar input,.searchbar select,.searchbar .btn{width:100%!important}
  .actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:8px!important;margin-top:10px!important}
  .actions>.btn,.actions>a.btn,.actions>button,.actions>form,.actions>form>.btn{width:100%!important;min-width:0!important}

  .table-wrap{margin:0!important;padding:0 0 4px!important;border-radius:8px}
  .table-wrap table{width:max-content!important;min-width:100%!important;max-width:none!important}
  .table-wrap th,.table-wrap td{white-space:normal!important;min-width:100px}
  .table-wrap td:first-child,.table-wrap th:first-child{min-width:120px}
  .table-wrap td:last-child{min-width:150px}
  .table-wrap .actions{display:flex!important;flex-direction:column!important;min-width:145px!important}
  .table-wrap .actions .btn{width:100%!important}

  .quote-section{width:100%!important;max-width:100%!important;padding:10px!important;margin-top:12px!important;overflow:hidden}
  .quote-items,.quote-items .item-row{width:100%!important;max-width:100%!important}
  .quote-items .item-row,.item-row,.os-item-row{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;padding:11px!important}
  .quote-items .item-row>*{grid-column:1!important;width:100%!important;min-width:0!important}
  .quote-column-head,.quote-column-head.v2{display:none!important}
  .quote-summary,.quote-summary-card{width:100%!important;max-width:100%!important;margin-left:0!important}
  .sum-line{gap:10px!important;align-items:flex-start}
  .sum-line span:first-child{min-width:0}
  .sum-line span:last-child{white-space:nowrap;text-align:right}
  .payment-grid{grid-template-columns:1fr!important}

  .proposal-head{display:block!important;padding:14px!important}
  .proposal-brand{width:100%!important;align-items:flex-start!important}
  .proposal-brand>div{min-width:0}
  .proposal-brand img{width:48px!important;flex:0 0 48px}
  .proposal-number{text-align:left!important;margin-top:12px!important}
  .proposal-body,.proposal-accept{padding:14px!important}
  .proposal-meta{grid-template-columns:1fr!important}
  .public-actions,.public-actions .btn{width:100%!important}
  .public-payment-options{width:100%}
  .payment-option{width:100%;overflow-wrap:anywhere}
  .accept-grid{grid-template-columns:1fr!important}
  .accept-actions{display:grid!important;grid-template-columns:1fr!important}

  .doc-page-bg{padding:0!important}
  .doc-toolbar{position:static!important;width:100%!important;margin:0!important;padding:8px!important;display:grid!important;grid-template-columns:1fr!important}
  .doc-toolbar .btn{width:100%!important}
  .a4-sheet,.public-a4{width:100%!important;max-width:100%!important;min-height:0!important;margin:0!important;padding:12px!important;box-shadow:none!important;border-radius:0!important}
  .doc-header{display:flex!important;align-items:flex-start!important;gap:10px!important}
  .doc-header img{width:48px!important;flex:0 0 48px}
  .doc-header h1{font-size:18px!important;line-height:1.2!important}
  .doc-meta{grid-template-columns:1fr!important;gap:6px!important}
  .doc-table{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .doc-table thead,.doc-table tbody{min-width:680px}
  .dual-signatures{grid-template-columns:1fr!important;gap:32px!important}
  .photo-grid,.public-a4 .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  .pix-payment-box{grid-template-columns:1fr!important;padding:12px!important}
  .pix-qr{max-width:220px!important;width:70vw!important;height:auto!important;margin:auto!important}

  .login-page{padding:12px!important;align-items:center}
  .login-box{width:100%!important;max-width:430px!important;padding:20px!important;border-radius:14px!important}
  .login-brand{align-items:flex-start}
  .login-brand img{width:48px!important}
  .installer{width:100%!important;margin:0 auto!important;padding:10px!important}
  .codehint{white-space:pre-wrap!important;word-break:break-word!important}
}

@media (max-width:520px){
  .content{padding-left:6px!important;padding-right:6px!important}
  .panel,.card{padding:10px!important}
  .actions{grid-template-columns:1fr!important}
  .btn{width:auto;max-width:100%;white-space:normal;text-align:center;line-height:1.25}
  .panel-head>.btn{width:100%!important}
  .table-wrap th,.table-wrap td{padding:9px 7px!important;font-size:12px!important}
  .proposal-body h1{font-size:19px!important}
  .photo-grid,.public-a4 .photo-grid{grid-template-columns:1fr!important}
  .public-a4 .photo-grid img{height:auto!important;max-height:210px!important}
  .signature-canvas,.signature-pad{height:190px!important}
  .sidebar{width:min(90vw,320px)!important}
}

@media print{
  html,body{overflow:visible!important}
  .a4-sheet,.public-a4,.proposal{max-width:none!important}
  .doc-table{overflow:visible!important}
}

/* v2.6.29 - pendências mobile, financeiro sem rolagem lateral, O.S. multi-fotos */
.os-photo-count{grid-column:1/-1;padding:8px 10px;background:#f7f9fc;border:1px solid var(--line);border-radius:8px;font-size:12px}
.os-photo-remove{margin-top:8px}

/* Orçamentos: filtros realmente responsivos */
.orcamentos-head{align-items:flex-start}
.orcamentos-search{display:grid;grid-template-columns:minmax(260px,1fr) minmax(160px,210px) auto;gap:8px;flex:1;max-width:850px}
.orcamentos-search input,.orcamentos-search select,.orcamentos-search .btn{min-width:0;width:100%}

/* Dashboard: usa melhor a largura */
.dashboard-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-cards .card{min-height:104px}
.dashboard-cards .card strong{overflow-wrap:anywhere}

@media(max-width:900px){
  .dashboard-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:760px){
  /* Orçamentos: busca ocupa a primeira linha; status + botão ficam lado a lado */
  .orcamentos-head{display:flex!important;flex-direction:column!important;align-items:stretch!important}
  .orcamentos-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;max-width:none!important;width:100%!important}
  .orcamentos-search input{grid-column:1/-1!important;width:100%!important}
  .orcamentos-search select{grid-column:1!important;width:100%!important;min-width:0!important}
  .orcamentos-search .btn{grid-column:2!important;width:auto!important;min-width:92px!important;white-space:nowrap!important}
  .orcamentos-head>.btn{width:100%!important;margin:0!important}

  /* Financeiro: continua tabela no desktop; no celular cada registro cabe inteiro na tela, sem arrastar lateralmente. */
  .finance-table-wrap{overflow:visible!important;border:0!important;background:transparent!important}
  .finance-table-wrap:after{display:none!important;content:none!important}
  .finance-table{display:block!important;width:100%!important;min-width:0!important;background:transparent!important}
  .finance-table thead{display:none!important}
  .finance-table tbody{display:grid!important;gap:10px!important;width:100%!important}
  .finance-table tr{display:block!important;width:100%!important;background:#fff!important;border:1px solid #dfe4ec!important;border-radius:12px!important;overflow:hidden!important}
  .finance-table td{display:grid!important;grid-template-columns:108px minmax(0,1fr)!important;gap:8px!important;align-items:start!important;width:100%!important;min-width:0!important;max-width:none!important;padding:9px 10px!important;border-bottom:1px solid #edf0f4!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .finance-table td:last-child{border-bottom:0!important}
  .finance-table td::before{font-size:11px;font-weight:800;color:#667085;text-transform:uppercase;letter-spacing:.02em}
  .finance-table td:nth-child(1)::before{content:'Nº'}
  .finance-table td:nth-child(2)::before{content:'Cliente'}
  .finance-table td:nth-child(3)::before{content:'Descrição'}
  .finance-table td:nth-child(4)::before{content:'Origem'}
  .finance-table td:nth-child(5)::before{content:'Vencimento'}
  .finance-table td:nth-child(6)::before{content:'Valor'}
  .finance-table td:nth-child(7)::before{content:'Tipo'}
  .finance-table td:nth-child(8)::before{content:'Asaas'}
  .finance-table td:nth-child(9)::before{content:'Status'}
  .finance-table td:nth-child(10)::before{content:'Ações'}
  .finance-table .col-id,.finance-table .col-client,.finance-table .col-description,.finance-table .col-origin,.finance-table .col-date,.finance-table .col-value,.finance-table .col-type,.finance-table .col-asaas,.finance-table .col-status,.finance-table .col-actions{width:100%!important;min-width:0!important;max-width:none!important}
  .finance-table .actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin:0!important;width:100%!important}
  .finance-table .actions form,.finance-table .actions .btn{width:100%!important;min-width:0!important}

  /* Home: orçamentos recentes sem rolagem horizontal */
  .dashboard-recent-table{overflow:visible!important}
  .dashboard-recent-table table{display:block!important;width:100%!important;min-width:0!important}
  .dashboard-recent-table thead{display:none!important}
  .dashboard-recent-table tbody{display:grid!important;gap:10px!important}
  .dashboard-recent-table tr{display:block!important;border:1px solid var(--line)!important;border-radius:10px!important;background:#fff!important;overflow:hidden!important}
  .dashboard-recent-table td{display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;gap:8px!important;width:100%!important;min-width:0!important;padding:8px 10px!important;border-bottom:1px solid #edf0f4!important;white-space:normal!important}
  .dashboard-recent-table td:last-child{border-bottom:0!important}
  .dashboard-recent-table td::before{font-size:11px;font-weight:800;color:var(--muted);text-transform:uppercase}
  .dashboard-recent-table td:nth-child(1)::before{content:'Nº'}
  .dashboard-recent-table td:nth-child(2)::before{content:'Cliente'}
  .dashboard-recent-table td:nth-child(3)::before{content:'Título'}
  .dashboard-recent-table td:nth-child(4)::before{content:'Status'}
  .dashboard-recent-table td:nth-child(5)::before{content:'Valor'}
  .dashboard-recent-table td:nth-child(6)::before{content:'Atualizado'}
  .dashboard-recent-table td:nth-child(7)::before{content:'Ações'}
  .dashboard-recent-table .actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin:0!important}
}

@media(max-width:520px){
  /* Home: 2 cards por linha aproveitam melhor a tela do celular */
  .dashboard-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .dashboard-cards .card{padding:11px!important;min-height:92px!important}
  .dashboard-cards .card small{font-size:11px!important;line-height:1.2!important}
  .dashboard-cards .card strong{font-size:17px!important;line-height:1.2!important;margin-top:7px!important}
  .finance-table td{grid-template-columns:92px minmax(0,1fr)!important;padding:8px!important}
  .finance-table .actions{grid-template-columns:1fr!important}
}
