@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#192234;background:#f6f8fc;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;scroll-behavior:smooth}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}a{color:inherit;text-decoration:none}
:root{--ink:#152238;--muted:#7b899e;--paper:#fff;--line:#e8ecf2;--accent:#cc9655;--accent-dark:#a97432;--navy:#111c2f;--bg:#f6f8fc;--green:#138667;--red:#c9505c;--shadow:0 10px 30px rgba(31,45,71,.045)}
.boot{min-height:100vh;display:flex;gap:12px;align-items:center;justify-content:center;color:#677488}.spinner{height:22px;width:22px;border:3px solid #d9e1ea;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.auth-page{min-height:100vh;display:grid;grid-template-columns:1.03fr 1fr;background:#fff}.auth-art{background:linear-gradient(135deg,#101928,#1b3048);color:#fff;padding:58px clamp(28px,6vw,96px);position:relative;display:flex;flex-direction:column;overflow:hidden}.auth-art:after{content:'';position:absolute;width:550px;height:550px;border-radius:50%;border:1px solid #ffffff24;left:20%;bottom:-36%;box-shadow:0 0 0 75px #ffffff06,0 0 0 150px #ffffff05}.brand{display:flex;align-items:center;gap:12px;font-family:Manrope,sans-serif;font-weight:800;letter-spacing:-.5px}.brand-icon{height:40px;width:40px;background:linear-gradient(135deg,#f3d5a5,#b87d3b);border-radius:12px;display:grid;place-items:center;color:#16243a;font-weight:800;font-size:24px}.brand small{display:block;letter-spacing:2px;font-size:8px;font-weight:700;color:#aeb9c7}.auth-art h1{font-family:Manrope,sans-serif;max-width:620px;margin:auto 0 14px;font-size:clamp(34px,4vw,62px);line-height:1.17;letter-spacing:-2.5px;z-index:1}.auth-art h1 span{color:#e6b778}.auth-art p{font-size:16px;line-height:1.7;color:#abb9c9;max-width:470px;margin:0 0 60px;z-index:1}.auth-art footer{font-size:12px;color:#8092a9}.auth-side{display:flex;align-items:center;justify-content:center;padding:32px}.auth-card{width:min(100%,420px)}.eyebrow{text-transform:uppercase;letter-spacing:2px;color:var(--accent-dark);font-size:11px;font-weight:800}.auth-card h2{font-family:Manrope,sans-serif;font-size:29px;letter-spacing:-1px;margin:10px 0}.auth-card>p{color:var(--muted);line-height:1.6;margin-bottom:28px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:15px}.field label{font-size:12px;font-weight:700;color:#46556a}.field input,.field select,.field textarea,.search-input{border:1px solid #dfe5ee;background:#fff;border-radius:10px;padding:12px 13px;outline:none;width:100%;color:var(--ink);transition:border .2s,box-shadow .2s;min-width:0}.field input:focus,.field select:focus,.field textarea:focus,.search-input:focus{border-color:#cf9d62;box-shadow:0 0 0 3px #cc965518}.field textarea{min-height:85px;resize:vertical}.muted{color:var(--muted)}.small{font-size:12px}.btn{border:none;border-radius:10px;min-height:41px;padding:10px 16px;font-weight:700;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;transition:transform .15s,background .15s}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn-primary{background:var(--navy);color:#fff}.btn-primary:hover{background:#233855}.btn-gold{background:var(--accent);color:#172235}.btn-soft{background:#f1f4f8;color:#36475c}.btn-outline{border:1px solid #dce2eb;background:#fff;color:#394a61}.btn-danger{background:#fff0f0;color:#b33c48}.btn-link{border:0;background:none;color:#9b6b34;padding:8px 2px;font-size:13px;font-weight:700}.full{width:100%}.auth-note{border:1px solid #e9edf3;padding:14px 16px;border-radius:10px;background:#fafbfe;font-size:12px;color:#738196;line-height:1.6;margin-top:24px}
.layout{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}.sidebar{background:#142034;color:#e6eef7;display:flex;flex-direction:column;padding:28px 14px;position:sticky;top:0;height:100vh}.sidebar .brand{padding:0 14px 25px;border-bottom:1px solid #ffffff13;margin-bottom:22px;font-size:15px}.sidebar .brand-icon{height:37px;width:37px}.nav-label{font-size:10px;color:#7d90aa;letter-spacing:1.8px;margin:15px 15px 10px;font-weight:800;text-transform:uppercase}.nav-item{width:100%;display:flex;align-items:center;gap:12px;text-align:left;border:0;border-radius:10px;padding:12px 15px;font-weight:600;color:#aebbd0;background:transparent;font-size:13px;transition:background .2s}.nav-item:hover{background:#ffffff0c;color:#fff}.nav-item.active{background:#ffffff13;color:#f3c286;box-shadow:inset 3px 0 #d7a56d}.nav-item svg{height:19px;width:19px;stroke-width:1.8;flex-shrink:0}.nav-bottom{margin-top:auto;border-top:1px solid #ffffff13;padding-top:20px}.user-mini{padding:11px 13px;display:flex;align-items:center;gap:10px}.avatar{height:36px;width:36px;border-radius:11px;background:#30415b;color:#f6c58b;display:grid;place-items:center;font-weight:800}.user-mini strong,.user-mini small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:148px}.user-mini strong{font-size:12px}.user-mini small{font-size:11px;color:#96a9c2;margin-top:2px}.app-content{min-width:0}.topbar{height:83px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,3.2vw,48px)}.breadcrumb{color:#8c99ad;font-size:13px}.breadcrumb strong{color:#29364c}.top-actions{display:flex;align-items:center;gap:14px}.top-date{font-size:12px;color:#8592a4}.top-avatar{height:34px;width:34px;border-radius:11px;background:#f5e9d9;color:#a77536;display:grid;place-items:center;font-weight:800}.page{padding:clamp(20px,3.2vw,48px);max-width:1660px;margin:0 auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.page-heading h1{font-family:Manrope,sans-serif;font-size:29px;letter-spacing:-1px;line-height:1.2;margin:6px 0}.page-heading p{margin:5px 0 0;color:var(--muted);font-size:13px}.section-title{font-family:Manrope,sans-serif;font-size:16px;letter-spacing:-.4px;margin:0 0 15px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:24px}.metric{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px;box-shadow:var(--shadow);min-width:0}.metric .meta{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px;font-size:12px;font-weight:600;color:#8190a3}.metric .bubble{background:#f5f0e9;color:#b48348;height:34px;width:34px;display:grid;place-items:center;border-radius:10px;font-size:18px}.metric strong{font-family:Manrope,sans-serif;display:block;font-size:clamp(22px,2.2vw,30px);letter-spacing:-1.1px;overflow-wrap:anywhere}.metric footer{margin-top:9px;color:#97a2b3;font-size:11px}.content-grid{display:grid;grid-template-columns:1.55fr 1fr;gap:20px}.panel{background:#fff;border:1px solid var(--line);border-radius:15px;padding:21px;box-shadow:var(--shadow);min-width:0;margin-bottom:20px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.panel-head h3{font-family:Manrope,sans-serif;font-size:15px;margin:0;letter-spacing:-.3px}.pill{border-radius:50px;background:#f2f5f9;color:#68778b;font-size:11px;font-weight:700;padding:6px 10px;white-space:nowrap}.pill.green{background:#e8f7f1;color:#15865f}.pill.orange{background:#fcf3e6;color:#b67c36}.pill.red{background:#fcebed;color:#c24d5c}.pill.blue{background:#ebf3fe;color:#4b77b0}.table-wrap{width:100%;overflow-x:auto;border:1px solid #eff1f5;border-radius:12px}.data-table{border-collapse:collapse;width:100%;min-width:580px}.data-table th,.data-table td{padding:13px 15px;text-align:left;border-bottom:1px solid #f0f2f6;vertical-align:middle;font-size:12px}.data-table th{background:#fbfcfe;color:#8491a3;font-size:11px;font-weight:800;letter-spacing:.15px}.data-table td{color:#3b485b}.data-table tbody tr:last-child td{border-bottom:0}.data-table strong{color:#1f2f42}.row-actions{display:flex;align-items:center;gap:7px}.mini-btn{background:#f3f5f9;border:0;padding:7px 9px;border-radius:8px;color:#46566b;font-size:11px;font-weight:700}.mini-btn:hover{background:#e6ecf5}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}.toolbar .search-input{max-width:340px}.empty{border:1px dashed #dce3ed;background:#fafcff;border-radius:12px;padding:35px 15px;text-align:center;color:#8593a6;font-size:13px}.empty .emoji{font-size:30px;margin-bottom:8px}.chart{height:200px;display:flex;align-items:end;gap:14px;padding:16px 2px 0;border-bottom:1px solid #e9eef4}.bar-wrap{flex:1;max-width:85px;display:flex;flex-direction:column;justify-content:end;align-items:center;height:100%;gap:7px}.bar{width:70%;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#cfa269,#e2c6a6);min-height:5px}.bar-wrap span{font-size:10px;color:#97a5b5;margin-bottom:-19px}.legend{margin-top:30px;color:#8997aa;font-size:11px}.info-list{display:flex;flex-direction:column;gap:15px}.info-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;padding-bottom:13px;border-bottom:1px solid #eff1f4}.info-row:last-child{border:0}.info-row strong{font-size:13px}.info-row span{color:#7b899c}.stats-strip{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:22px}.stat-chip{padding:9px 14px;background:#fff;border:1px solid var(--line);border-radius:9px;font-size:12px;color:#75849a}.stat-chip strong{color:#1b2b42}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 15px}.form-grid .span-2{grid-column:span 2}.modal-backdrop{position:fixed;inset:0;background:#0d1829a6;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}.modal{background:#fff;max-height:calc(100vh - 40px);overflow-y:auto;border-radius:17px;box-shadow:0 30px 90px #0b152535;width:min(100%,650px);padding:25px}.modal.wide{width:min(100%,770px)}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:23px}.modal-header h2{font-family:Manrope,sans-serif;letter-spacing:-.5px;font-size:20px;margin:0}.close{border:0;background:#f1f4f8;height:30px;width:30px;border-radius:8px;color:#5c6b7c;font-size:20px;display:grid;place-items:center}.modal-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.help{font-size:11px;color:#8c98aa;margin:7px 0 0}.check-item{padding:12px;display:flex;align-items:center;gap:11px;background:#fbfcfe;border:1px solid #ebeff5;border-radius:10px;margin-bottom:7px;cursor:pointer}.check-item input{accent-color:#bd8a4f}.check-item span{flex:1;font-size:12px}.check-item strong{font-size:12px}.box-subtle{border:1px solid #eceff5;background:#fafbfe;padding:14px;border-radius:12px;margin:13px 0}.quote-row{display:grid;grid-template-columns:minmax(0,2.3fr) 75px 120px 32px;gap:8px;align-items:end;margin-bottom:8px}.quote-row .field{margin:0}.quote-row input{padding:10px}.brand-preview{max-height:64px;max-width:230px;object-fit:contain;display:block;margin:12px 0}.warn{color:#ad6d25;background:#fff8e9;border:1px solid #f5e6c7;padding:12px;border-radius:10px;font-size:12px;line-height:1.5;margin:12px 0}.notice{color:#39719f;background:#edf6fc;border:1px solid #d1e9fa;padding:12px;border-radius:10px;font-size:12px;line-height:1.6;margin:12px 0}.error{color:#b33b48;font-size:12px;margin-top:10px;line-height:1.5}.toast{background:#172437;color:#fff;box-shadow:0 12px 35px #0a15242c;padding:14px 17px;border-radius:11px;font-size:13px;max-width:min(90vw,450px)}.toast.error-toast{background:#9d3442}#toast-root{position:fixed;right:22px;bottom:22px;z-index:300;display:flex;flex-direction:column;gap:8px}.chip-detail{font-size:11px;color:#a7b2bf}.mobile-head{display:none}.mobile-nav{display:none}.setup-page{max-width:840px;margin:45px auto;padding:0 20px}.setup-page .panel{padding:30px}.code{font-family:monospace;background:#eff2f7;padding:3px 6px;border-radius:4px}.icon-inline{font-size:16px}
@media(max-width:1120px){.metric-grid{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:1fr}.sidebar{width:220px}.layout{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:760px){.auth-page{grid-template-columns:1fr}.auth-art{display:none}.auth-side{min-height:100vh}.sidebar{display:none}.layout{display:block;padding-bottom:66px}.mobile-head{display:flex;align-items:center;justify-content:space-between;background:#142034;padding:14px 18px;color:#fff}.mobile-head .brand{font-size:13px}.mobile-head .brand-icon{width:32px;height:32px;font-size:18px}.topbar{height:58px;padding:0 18px}.top-date{display:none}.page{padding:22px 16px}.page-heading h1{font-size:24px}.metric-grid{gap:10px}.metric{padding:15px}.metric strong{font-size:22px}.mobile-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #e5ebf2;display:flex;z-index:40;justify-content:space-around;padding:7px 3px env(safe-area-inset-bottom)}.mobile-nav button{background:none;border:0;padding:4px 6px;color:#8492a6;font-size:10px;display:flex;gap:4px;flex-direction:column;align-items:center}.mobile-nav button.active{color:#a77943;font-weight:800}.mobile-nav button span{font-size:18px}.modal{padding:19px}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:span 1}.quote-row{grid-template-columns:minmax(0,1fr) 54px 85px 28px;gap:5px}.quote-row .field label{font-size:10px}.quote-row input{padding:8px 5px;font-size:11px}.page-heading{flex-wrap:wrap}.toolbar .search-input{max-width:100%}.toolbar{align-items:stretch}.toolbar .search-input{flex:1}.top-actions{gap:5px}}

/* DOM 2.0 — refinamento responsive, prioridade à experiência móvel */
:root{--ink:#16223a;--muted:#74849a;--accent:#e4b66c;--accent-dark:#95672e;--navy:#101e35;--bg:#f5f7fb;--line:#e7ebf2;--green:#158368;--shadow:0 12px 38px rgba(21,36,64,.047)}
html{scroll-padding-top:20px}body{background:var(--bg)}
button,select,input,textarea{font-size:16px}button:focus-visible,a:focus-visible{outline:3px solid #e5b877;outline-offset:3px}
.sidebar{background:linear-gradient(174deg,#111d33 0%,#162a43 100%);padding:29px 17px}
.sidebar::before{content:"";position:absolute;top:0;left:0;right:0;height:5px;background:linear-gradient(90deg,#a26b31,#e9bc76,#946329)}
.sidebar .brand{letter-spacing:.1px;line-height:1.15}.brand-icon{box-shadow:0 5px 16px #0a142a27}
.nav-item{min-height:46px;font-size:13px;border-radius:12px;transition:background .18s,color .18s}
.nav-item.active{background:#ffffff14;box-shadow:inset 3px 0 #e5b46d;color:#f3ca96}
.nav-item:hover{background:#ffffff13}
.nav-label{margin-top:19px;letter-spacing:1.5px}
.topbar{height:76px;padding:0 clamp(24px,4vw,54px);background:#fff}
.crumb-sep{padding:0 9px;color:#c4cbd7}
.page{padding:clamp(22px,3vw,45px) clamp(20px,3vw,48px);max-width:1580px}
.page-heading{margin-bottom:24px}.page-heading h1{font-size:clamp(25px,2.2vw,32px);font-weight:800;letter-spacing:-1.1px}
.page-heading p{font-size:13px;line-height:1.6;max-width:540px}.eyebrow{font-size:10px;letter-spacing:1.7px}
.btn{min-height:44px;border-radius:12px;padding:11px 18px;box-shadow:none;font-size:13px}
.btn-gold{background:linear-gradient(135deg,#f1c889,#e4b16a);color:#17233a;box-shadow:0 6px 18px rgba(206,149,74,.20)}
.btn-primary{background:#162940}.btn-primary:hover{background:#263c56}
.btn-soft{background:#f2f5fa}.btn-outline{border:1px solid #dbe1eb}
.metric-grid{gap:15px}.metric{border:1px solid #e8edf4;border-radius:18px;padding:23px;position:relative;overflow:hidden}
.metric::before{content:"";position:absolute;top:0;left:0;width:100%;height:3px;background:linear-gradient(90deg,#ddb374,transparent)}
.metric strong{font-size:clamp(22px,2vw,30px);font-weight:800;white-space:nowrap}
.metric .meta{font-size:12px;line-height:1.4}.metric .bubble{background:#fbf1e3;color:#a4743a}
.panel{border-radius:18px;border:1px solid #e9edf3;padding:23px}.panel-head h3{font-size:15px}
.pill{padding:7px 11px}.stat-chip{border-radius:12px;padding:11px 14px;font-size:12px;background:#fff}
.table-wrap{border:1px solid #edf0f5;border-radius:13px}.data-table th{background:#f9fafc;color:#8290a5;padding:15px}.data-table td{padding:15px;font-size:12px}
.data-table tbody tr:hover{background:#fcfdfd}.data-table td strong{font-weight:750}.chip-detail{line-height:1.7}
.mini-btn{min-height:33px;padding:8px 12px;border:1px solid #e5eaf1;background:#f6f8fb}
.search-input{min-height:45px}.field{gap:8px;margin-bottom:16px}.field label{font-size:12px;color:#3d4e64}
.field input,.field select,.field textarea,.search-input{min-height:45px;border-radius:12px;background:#fff;border:1px solid #dfe5ee;box-shadow:0 1px 1px #15243b03}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#b58b54;box-shadow:0 0 0 3px #e8c48e33}
.field input[type=checkbox],.check-item input{width:19px;height:19px;min-height:0;accent-color:#b58a4e;flex-shrink:0}
.modal{border-radius:24px;width:min(100%,680px);padding:25px 28px;box-shadow:0 30px 100px #0b142958}
.modal.wide{width:min(100%,850px)}.modal-header{align-items:center;padding-bottom:16px;border-bottom:1px solid #edf0f5;margin-bottom:22px}
.modal-header h2{font-size:22px}.close{background:#f1f4f9;border:0;border-radius:12px;width:36px;height:36px;display:grid;place-items:center;cursor:pointer;font-size:24px}
.modal-footer{padding-top:18px;border-top:1px solid #edf0f4;gap:12px}
.section-subhead{margin:18px 0 12px}.section-subhead h3{margin:0 0 5px;font-family:Manrope,sans-serif;font-size:15px}
.section-subhead p{font-size:12px;color:#8793a3;margin:0;line-height:1.5}
.customer-picker{background:#f8fafc;padding:16px;border-radius:15px;margin-bottom:21px;border:1px solid #edf1f6}
.customer-picker .form-grid{gap:0 12px}.customer-save{background:white;border:1px solid #e6ebf2;border-radius:12px;padding:12px 14px!important;margin-top:3px}
.customer-save strong{font-size:12px;color:#24344c}.customer-save small{color:#8493a5;font-size:11px}
.sale-items{border:1px solid #e9edf3;border-radius:14px;max-height:300px;overflow:auto;margin-bottom:20px}
.sale-product{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 15px;border-bottom:1px solid #eef1f5}
.sale-product:last-child{border-bottom:0}.sale-product-info{min-width:0;display:flex;flex-direction:column;gap:4px}
.sale-product-info strong{font-size:13px;color:#22344c}.sale-product-info span{font-size:11px;color:#8895a7;line-height:1.5}
.sale-quantity{text-align:center;flex-shrink:0}.sale-quantity label{display:block;font-size:10px;color:#91a0b1;margin-bottom:4px}
.sale-quantity input{width:70px;border:1px solid #dfe5ee;border-radius:10px;padding:9px;text-align:center;font-size:15px;background:#fff}
.total-preview{margin:0!important;font-size:20px!important;font-weight:800!important;min-height:45px;display:flex;align-items:center;color:#14253d!important}
.quote-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) 72px 116px 31px;gap:9px;align-items:end;padding:13px 0;border-bottom:1px solid #eef0f4;margin:0}
.quote-row .field{margin:0}.quote-row .field label{font-size:10px}.quote-row input,.quote-row select{font-size:12px;min-height:43px;padding:9px 10px}
.quote-row .q-remove{font-size:19px;height:43px;padding:6px}.help{line-height:1.65}
.top-customer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:19px}
.top-customer{background:linear-gradient(140deg,#14243d,#233d58);border-radius:17px;padding:19px;color:#fff;display:flex;flex-direction:column;gap:9px;box-shadow:0 8px 26px #1e2d4620;min-width:0}
.top-customer .eyebrow{color:#edc58c;font-size:10px}.top-customer strong{font-family:Manrope,sans-serif;font-size:17px;line-height:1.3;overflow:hidden;text-overflow:ellipsis}
.top-customer span:last-child{font-size:12px;color:#bfcbd8}
.mobile-menu-button,.mobile-drawer{display:none}
.drawer-sheet .nav-item{color:#24364e}
@media (max-width:1080px){.content-grid{grid-template-columns:1fr}.metric-grid{grid-template-columns:repeat(2,1fr)}.quote-row{grid-template-columns:1fr 1fr 72px 100px 31px}}
@media (max-width:760px){
 html,body{overflow-x:hidden}.layout{display:block;padding-bottom:calc(85px + env(safe-area-inset-bottom))}
 .sidebar{display:none}.mobile-head{position:sticky;top:0;z-index:36;display:flex;padding:15px 18px 13px;background:#14243a;box-shadow:0 4px 20px #10213e18}
 .mobile-head .brand{font-size:13px;line-height:1.25}.mobile-head .brand-icon{width:39px;height:39px;font-size:22px;border-radius:12px}
 .mobile-head .brand small{letter-spacing:1.5px;font-size:7px}.mobile-menu-button{display:grid;place-items:center;border:1px solid #ffffff28;background:#ffffff12;color:#fff;border-radius:12px;width:42px;height:42px;font-size:21px}
 .topbar{height:43px;padding:0 19px;border-bottom:0;background:#f5f7fb}.breadcrumb{font-size:11px}.top-date,.top-avatar{display:none}
 .page{padding:14px 15px 24px}.page-heading{align-items:stretch;gap:14px;margin-bottom:21px}
 .page-heading h1{font-size:28px;margin:5px 0}.page-heading p{font-size:12px;line-height:1.65}
 .page-heading .btn{width:100%;min-height:48px}
 .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:15px}
 .metric{padding:15px;border-radius:16px;min-height:139px;box-shadow:0 5px 20px #1a2c4710}
 .metric .meta{font-size:10px;align-items:flex-start;gap:5px;line-height:1.4;min-height:27px;margin-bottom:14px}
 .metric .bubble{height:26px;width:26px;font-size:16px;flex-shrink:0;border-radius:9px}
 .metric strong{font-size:clamp(18px,4.8vw,26px);letter-spacing:-.8px;white-space:normal;overflow-wrap:break-word}
 .metric footer{font-size:10px;line-height:1.5;margin-top:6px}
 .content-grid{display:block}.panel{border-radius:17px;padding:16px;margin-bottom:14px;box-shadow:0 7px 23px #2035500a}
 .panel-head{align-items:start}.panel-head h3{font-size:14px}
 .stats-strip{gap:8px;margin-bottom:15px}.stat-chip{font-size:11px;padding:9px 11px}
 .toolbar{display:grid;grid-template-columns:1fr;gap:7px}.toolbar .search-input{max-width:100%}
 .table-wrap{border:0;overflow:visible;border-radius:0}.data-table{display:block;min-width:0;width:100%;border:0}
 .data-table thead{display:none}.data-table tbody{display:grid;gap:11px}.data-table tr{display:block;border:1px solid #e7edf4;border-radius:14px;background:#fff;overflow:hidden}
 .data-table tr:hover{background:#fff}.data-table td{border:0;padding:10px 13px;min-height:36px;display:flex;justify-content:space-between;gap:14px;align-items:flex-start;font-size:12px;text-align:right;overflow-wrap:anywhere}
 .data-table td:before{content:attr(data-label);color:#8695a8;font-size:11px;font-weight:700;max-width:37%;flex:0 0 37%;text-align:left;line-height:1.6}
 .data-table td:first-child{padding-top:15px}.data-table td:last-child{padding-bottom:14px}
 .data-table td strong{font-size:12px}.data-table td .chip-detail{font-size:11px}.data-table td .mini-btn{min-height:37px;font-size:12px}
 .data-table td>*{max-width:100%}.data-table td:has(.row-actions){flex-wrap:wrap}
 .stats-strip .stat-chip{flex:1 1 145px}.top-customer-grid{grid-template-columns:1fr;gap:9px}
 .top-customer{padding:17px;border-radius:15px;gap:6px}.top-customer strong{font-size:16px}
 .mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:40;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;background:#fff;border-top:1px solid #e8ecf3;box-shadow:0 -10px 26px rgba(19,30,54,.06);padding:8px 4px calc(8px + env(safe-area-inset-bottom));}
 .mobile-nav button{padding:5px 1px;gap:4px;font-size:10px;line-height:1.35;min-height:50px;color:#8290a5;border-radius:12px}
 .mobile-nav button span{font-size:22px;line-height:24px}.mobile-nav button.active{color:#9e6b2c;background:#fff6e9}
 .mobile-drawer:not([hidden]){position:fixed;inset:0;display:block;z-index:90}.drawer-backdrop{position:absolute;inset:0;background:#0d1a2cb3}
 .drawer-sheet{position:absolute;top:0;right:0;bottom:0;width:min(86vw,350px);background:#fff;box-shadow:-18px 0 50px #0d1c2f35;padding:19px 16px;overflow-y:auto}
 .drawer-heading{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 17px;border-bottom:1px solid #e9edf4;margin-bottom:12px;color:#20314b}
 .drawer-sheet .nav-item{font-size:14px;min-height:47px}.drawer-sheet .nav-item.active{background:#fff3e2;color:#936128;border:0;box-shadow:none}
 .modal-backdrop{align-items:flex-end;padding:0;overflow:hidden}.modal,.modal.wide{width:100%;height:min(92dvh,900px);max-height:min(92dvh,900px);border-radius:24px 24px 0 0;padding:20px 17px 0;overflow-y:auto;overscroll-behavior:contain;display:block}
 .modal-header{position:sticky;top:-20px;background:#fff;z-index:3;padding:10px 0 15px;margin-bottom:17px}.modal-header h2{font-size:20px}
 .modal-footer{position:sticky;bottom:0;background:#fff;margin:17px -17px 0;padding:14px 17px calc(15px + env(safe-area-inset-bottom));z-index:2;display:grid;grid-template-columns:1fr 1.3fr;box-shadow:0 -8px 20px #17243e08}
 .modal-footer button{white-space:normal;min-height:48px;font-size:12px}
 .form-grid{grid-template-columns:1fr;gap:0}.form-grid .span-2{grid-column:auto}.field{margin-bottom:14px}
 .field label{font-size:12px}.field input,.field select,.field textarea,.search-input{font-size:16px;min-height:47px}
 .customer-picker{padding:13px 13px 7px;margin-bottom:14px}.customer-picker .form-grid{grid-template-columns:1fr}
 .check-item.customer-save{margin-bottom:10px;padding:11px!important}
 .section-subhead{margin:17px 0 9px}.sale-items{max-height:260px}.sale-product{gap:8px;padding:13px 10px}
 .sale-product-info strong{font-size:12px}.sale-product-info span{font-size:10px}.sale-quantity input{width:60px}
 .quote-row{grid-template-columns:1fr 76px 100px 30px;gap:7px;padding:14px 0}
 .quote-row .q-inventory{grid-column:1/-1}.quote-row .q-description{grid-column:1/-1}.quote-row .q-quantity{grid-column:1}.quote-row .q-price-field{grid-column:2/4}.quote-row .q-remove{grid-column:4;height:46px}
 .quote-row .field label{font-size:11px}.quote-row input,.quote-row select{font-size:14px;min-height:44px;padding:10px}
 .topbar .top-date{display:none}.auth-side{padding:22px}.auth-card{padding:20px 5px}
}
@media (max-width:360px){.metric strong{font-size:18px}.metric .meta{font-size:9px}.page{padding:12px 10px}.modal{padding-left:12px;padding-right:12px}}

.demo-banner{position:relative;z-index:31;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 20px;background:#f9ebd1;border-bottom:1px solid #eac995;color:#695032;font-size:11px}
.demo-banner strong{font-size:10px;letter-spacing:1px}.demo-banner span{margin-right:auto}.demo-banner select,.demo-banner button{font-size:11px;border:1px solid #dfbd86;border-radius:8px;padding:6px 9px;background:#fff9ed;color:#7a5525;cursor:pointer}
@media(max-width:760px){.demo-banner{padding:8px 13px;gap:6px;font-size:10px}.demo-banner span{flex-basis:100%;order:1}.demo-banner select,.demo-banner button{font-size:10px}}

/* Vendasflow v3 — identidade azul/turquesa e experiência mobile-first */
:root{--navy:#071e44;--ink:#0b2141;--accent:#00d9c4;--accent-dark:#007baf;--green:#069b85;--bg:#f5f8ff;--line:#e2ebf4}
body{background:#f5f8ff}
.sidebar{background:linear-gradient(170deg,#061738 0%,#0b2d63 100%)}
.sidebar::before{background:linear-gradient(90deg,#087dff,#06dfc7)}
.sidebar .nav-item.active{background:#103b76;color:#fff;box-shadow:inset 3px 0 #00dfc5}
.brand .vf-wordmark{display:block;height:auto;object-fit:contain;max-width:100%}
.vf-wordmark{object-fit:contain;display:block;max-width:100%;height:auto}
.sidebar-logo{width:185px;max-height:65px}
.nav-item{gap:12px}
.nav-item.active{font-weight:800}
.mobile-logo{width:162px;max-height:54px}
.auth-wordmark{width:min(290px,80%);max-height:100px;margin-bottom:clamp(35px,9vh,75px)}
.auth-mobile-logo{display:none}
.setup-card{max-width:650px;margin:0 auto}.setup-card .vf-wordmark{width:230px;margin-bottom:22px}.setup-card ol{line-height:1.85;color:#4b5f78;padding-left:22px}.setup-card a{color:#007bc0}
.btn-gold,.btn-primary{background:linear-gradient(115deg,#0767e8,#00b8b2);color:white;border:0;box-shadow:0 8px 19px #007ab423}
.btn-gold:hover,.btn-primary:hover{background:linear-gradient(115deg,#0756c2,#008f9f)}
.mobile-nav button.active{color:#007ec3}
.metric::before{background:linear-gradient(90deg,#087dff,#00d4bd,transparent)}
.metric .bubble{background:#e6f8ff;color:#067ace}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#078dc5;box-shadow:0 0 0 3px #03a8b129}
.top-customer{background:linear-gradient(140deg,#071d48,#096a95)}.top-customer .eyebrow{color:#73f2e3}
.account-identity{display:flex;gap:17px;align-items:center;padding:13px 0 23px}.account-identity img{border-radius:15px;object-fit:contain}.account-identity div{display:flex;flex-direction:column;align-items:flex-start;gap:5px;overflow-wrap:anywhere}.account-identity strong{font-size:18px}.account-identity small{color:#64748b;font-size:12px}
.auth-actions{display:flex;justify-content:flex-end;margin-top:18px}
.auth-art{background:radial-gradient(circle at 75% 78%,#084e85 0%,#071f43 48%,#04122e 100%)}
.auth-art h1 span{color:#00d9c4}
.auth-art footer{color:#a4c0da}
@media(max-width:760px){
 .mobile-head{background:linear-gradient(115deg,#061736,#0c3b75)}
 .mobile-head .brand{display:flex;align-items:center}
 .auth-mobile-logo{display:block;margin:0 0 27px}.auth-mobile-logo .vf-wordmark{width:210px;max-height:80px}
 .sidebar-logo{width:170px}
 .auth-card{max-width:100%}
 .page{padding-bottom:26px}
 .account-identity{flex-wrap:wrap}
}
/* Vendasflow v4 — fotos, detalhes de venda, ações e orçamento mobile */
.product-title{display:flex;align-items:center;gap:11px;min-width:195px;text-align:left}
.product-title>div{min-width:0}.product-title strong{display:inline-block;max-width:290px;overflow-wrap:anywhere}
.product-thumb{display:block;width:64px;height:64px;border-radius:14px;object-fit:cover;border:1px solid #d8e7f2;background:#eaf4fd;flex:0 0 auto}
.product-no-photo{display:grid;place-items:center;font-size:26px;color:#4185ad}
.product-title .pill{display:inline-flex;margin-top:7px;padding:4px 9px;font-size:10px}
.serial-chip{display:inline-block;margin-top:4px;font-size:11px;line-height:1.5;overflow-wrap:anywhere;color:#006da9;background:#eaf7ff;padding:4px 8px;border-radius:8px;font-weight:700}
.row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-start}
.row-actions .mini-btn{padding:9px 11px;min-height:34px;white-space:normal}
.danger-btn{background:#ffeff1;color:#b43b50}.danger-btn:hover{background:#ffe0e7;color:#a12740}
.whatsapp-btn{color:#056c59;background:#e7faf5}.whatsapp-btn:hover{background:#d0f4eb}
.photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:4px 0 12px}
.photo-tile{aspect-ratio:1;position:relative;border:1px solid #dce6ee;border-radius:13px;overflow:hidden;background:#f4f8fc}
.photo-tile img{width:100%;height:100%;object-fit:cover}
.photo-tile button{position:absolute;right:4px;top:4px;width:28px;height:28px;border:0;background:#071e44e8;color:#fff;border-radius:9px;font-size:20px;display:grid;place-items:center}
#product-photos{border-style:dashed;min-height:57px;padding:15px;cursor:pointer}
.sale-detail-header{display:flex;gap:5px;flex-direction:column;border:1px solid #e9edf4;border-radius:16px;padding:17px;margin-bottom:16px;background:#f9fbfe}
.sale-detail-header strong{font-size:16px}.sale-detail-header span{font-size:12px;color:#687e96}
.sale-detail-list{display:grid;gap:11px;margin-bottom:17px;max-height:55vh;overflow-y:auto}
.sale-detail-item{padding:13px 14px;display:flex;justify-content:space-between;align-items:flex-start;gap:15px;border:1px solid #e4eaf2;border-radius:13px}
.sale-detail-item strong{font-size:13px}.sale-detail-item small{display:block;font-size:11px;line-height:1.6;color:#64768f;margin-top:5px}
.sale-detail-item small b{color:#006da9;overflow-wrap:anywhere}
.sale-detail-item>div:first-child{flex:1;min-width:0}.sale-detail-item>div:last-child{white-space:nowrap;font-weight:700;font-size:12px}
tr[hidden]{display:none!important}
@media(max-width:760px){
 .product-title{min-width:0;gap:10px;justify-content:flex-end}
 .product-thumb{width:76px;height:76px}
 .product-title>div{text-align:right;min-width:0}
 .product-title strong{font-size:13px;max-width:210px}
 .data-table td:first-child:before{padding-top:26px}
 .data-table td .product-title{max-width:67%;min-width:0}
 .data-table td:has(.product-title){align-items:center}
 .row-actions{justify-content:flex-end;max-width:100%;width:auto;gap:6px}
 .data-table td:last-child:has(.row-actions):before{padding-top:8px}
 .row-actions .mini-btn{min-height:41px;white-space:normal;font-size:11px}
 .photo-grid{grid-template-columns:repeat(3,1fr)}
 .photo-tile{aspect-ratio:1}
 .sale-detail-item{flex-wrap:wrap}.sale-detail-item>div:last-child{font-size:11px}
 .sale-detail-list{max-height:48vh}
}
/* Avisos não devem bloquear os botões inferiores do aplicativo no celular. */
#toast-root,#toast-root .toast{pointer-events:none}
@media(max-width:760px){#toast-root{bottom:calc(87px + env(safe-area-inset-bottom));right:12px;left:12px}#toast-root .toast{max-width:100%;font-size:12px}}

/* Vendasflow 4.1 — botões de estoque claros e exclusão confirmada */
.inventory-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:9px;width:max-content;max-width:none}
.inventory-actions .mini-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:10px 13px;border-radius:10px;white-space:nowrap;font-size:12px;font-weight:800;line-height:1.2;border:1px solid #dce7f2;transition:background .15s, border-color .15s, transform .15s}
.inventory-actions .edit-product-btn{color:#25476a;background:#f6f9fd}
.inventory-actions .edit-product-btn:hover{background:#e9f2fa;border-color:#c4dbed}
.inventory-actions .delete-product-btn{color:#ad263b;background:#fff0f2;border:1px solid #f2b9c1}
.inventory-actions .delete-product-btn:hover{background:#ffe0e6;border-color:#e98c99}
.inventory-actions .delete-product-btn svg,.delete-confirm-icon svg{display:block;width:18px;height:18px;flex:0 0 18px}
.inventory-actions .mini-btn:focus-visible,.delete-modal-footer .btn:focus-visible{outline:3px solid #148cba;outline-offset:3px}
.compact-confirm{width:min(100%,440px)}
.delete-confirm{text-align:left;padding:6px 0 5px}
.delete-confirm-icon{height:54px;width:54px;border-radius:17px;background:#fff0f2;color:#b32d40;display:grid;place-items:center;margin-bottom:16px}
.delete-confirm-icon svg{height:26px;width:26px}
.delete-confirm-kicker{font-size:10px;color:#b32d40;font-weight:800;letter-spacing:1.5px;margin:0 0 7px}
.delete-confirm h3{font-family:Manrope,system-ui,sans-serif;color:#172b42;font-size:21px;letter-spacing:-.5px;margin:0 0 10px}
.delete-confirm>p:not(.delete-confirm-kicker){color:#61738a;font-size:13px;line-height:1.6;margin:0 0 14px;overflow-wrap:anywhere}
.delete-confirm>p strong{color:#1d344a}
.delete-confirm-notice{background:#fff8f3;border:1px solid #f4ddcd;padding:14px;border-radius:12px;color:#674b3c;font-size:12px;line-height:1.65}
.delete-modal-footer{display:flex;gap:11px;justify-content:flex-end;margin-top:20px}
.delete-modal-footer .btn{min-height:45px;min-width:127px}
.btn-delete-confirm{background:#c53149;color:#fff;border:none}
.btn-delete-confirm:hover:not(:disabled){background:#a6223a}
@media(max-width:760px){
 .data-table td:has(.inventory-actions){align-items:center;flex-wrap:wrap}
 .inventory-actions{width:100%;max-width:100%;justify-content:flex-end;gap:9px}
 .inventory-actions .mini-btn{min-height:46px;font-size:12px;padding:10px 13px}
 .compact-confirm.modal{height:auto;max-height:min(90dvh,620px);padding:19px 18px 18px;overflow-y:auto}
 .compact-confirm .modal-header{top:0;padding:0 0 10px;margin-bottom:8px}
 .compact-confirm .delete-modal-footer{display:grid;grid-template-columns:1fr 1fr;margin:18px 0 0;padding:0;position:static;box-shadow:none;gap:10px}
 .compact-confirm .delete-modal-footer .btn{min-width:0;min-height:50px;font-size:12px}
}

/* Vendasflow v4.2: ações destrutivas claramente rotuladas nas três listas. */
.record-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-start}
.record-delete-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:10px 13px;white-space:nowrap;border:1px solid #f2b9c1;background:#fff0f2;color:#ad263b;border-radius:10px;font-size:12px;font-weight:800}
.record-delete-btn:hover{background:#ffe0e6;border-color:#e98c99;color:#a12740}
.record-delete-btn svg{display:block;width:18px;height:18px;flex:0 0 18px}
.record-delete-btn:focus-visible{outline:3px solid #148cba;outline-offset:3px}
.cancelled-amount{text-decoration:line-through;color:#98a2ae!important}
@media(max-width:760px){.record-actions{width:100%;justify-content:flex-end;gap:8px}.record-delete-btn{min-height:46px;min-width:100px}.record-actions>.mini-btn{min-height:46px}}

/* Vendasflow v5 – ações separadas e comprovante */
.cancel-sale-btn{border:1px solid #f5d494;background:#fff7e7;color:#94600c;font-weight:800;min-height:42px;border-radius:10px;padding:9px 12px}
.cancel-sale-btn:hover{background:#fff0ca}.receipt-success{text-align:center;padding:8px 8px 16px}.receipt-success-mark{width:64px;height:64px;display:grid;place-items:center;margin:0 auto 12px;border-radius:50%;background:#e0f9f2;color:#07856d;font-size:32px;font-weight:900}.receipt-success h3{font-size:23px;margin:8px 0}.receipt-success>strong{display:block;font-size:28px;color:#092f56;margin:14px}.receipt-success p{color:#677a8b}.receipt-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
@media(max-width:760px){.cancel-sale-btn{min-height:46px}.receipt-actions button{width:100%}}

/* Vendasflow 6: fluxo mobile-first, venda e orçamento rápidos */
.quick-form-tag{font-size:11px;font-weight:900;color:#067d91;letter-spacing:1.1px;margin:24px 0 12px;padding:9px 13px;border-left:3px solid #05c9bb;background:#edfdfa;border-radius:0 10px 10px 0}
.payment-section{margin:14px 0 18px;padding:16px;border:1px solid #dce8f2;border-radius:16px;background:#f8fbff}
.payment-section .field{margin:0 0 10px}.installments-panel:not([hidden]){display:block;background:white;border:1px solid #e0eaf4;border-radius:12px;padding:12px;margin-top:10px}
.installments-panel[hidden]{display:none!important}.payment-summary{font-weight:700;color:#134c66;font-size:12px;margin-top:10px;line-height:1.5}
.premium-total{margin:14px 0 8px;display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:13px;background:#e9f9f6;padding:14px;border-radius:12px}.premium-total strong{font-size:23px;color:#006e6b}
.sale-entry{background:#fff;border:1px solid #e2ecf5;padding:12px;border-radius:14px;margin-bottom:12px}
.report-filters,.report-actions,.report-dates{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.report-dates label{display:flex;gap:8px;flex-direction:column;color:#60748a;font-size:12px;font-weight:700}.report-dates input{min-height:42px;border:1px solid #d8e3ed;border-radius:10px;padding:8px 12px}.report-metrics{margin:20px 0}.finance-report{overflow:hidden}
@media(max-width:760px){.quick-form-tag{margin:18px 0 10px}.sale-entry .field input,.sale-entry .field select,.payment-section input,.payment-section select{min-height:46px;font-size:16px!important}.report-filters .btn{flex:1 1 42%;min-height:44px}.report-dates label{flex:1 1 42%}.report-dates input{width:100%;font-size:16px}.report-actions .btn{flex:1 1 100%;min-height:48px}.premium-total strong{font-size:21px}.modal .modal-footer .btn-primary{min-height:52px}}

/* Vendasflow 6: relatório financeiro mensal, responsivo */
.monthly-sales{border-top:1px solid #e7edf4;padding-top:20px;margin-top:16px}.monthly-sales h3{font-size:15px;color:#123451}.monthly-bars{display:grid;gap:14px;margin:15px 0 6px}.month-bar>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:7px;color:#60748a}.month-bar strong{color:#102f4c}.month-track{height:10px;border-radius:99px;background:#e9f1f6;overflow:hidden}.month-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#1168db,#0bc9b5)}
@media(max-width:760px){.monthly-sales{padding-top:14px}.month-bar>div:first-child{flex-wrap:wrap;line-height:1.5}}

/* Vendasflow v6.1 — entrada rápida de produtos e moeda brasileira */
.quote-row{position:relative;padding-bottom:19px}
.quick-next-btn{grid-column:1/-1;justify-self:end;background:#e7f9f5;border:1px solid #a5e8d9;color:#087f73;border-radius:10px;padding:9px 14px;min-height:37px;font-size:12px;font-weight:800;cursor:pointer}
.quick-next-btn:hover,.quick-next-btn:focus-visible{background:#c8f3e9;outline:2px solid #10c3aa;outline-offset:2px}
.quick-item-added{border-left:3px solid #0ebba5;padding-left:11px;background:linear-gradient(90deg,#f1fffb,transparent)}
.quick-item-added .quick-next-btn{background:#f2f6f8;border-color:#e2eaf0;color:#62788a}
.quote-row .q-price{text-align:right;font-variant-numeric:tabular-nums;min-width:0}
@media(max-width:760px){.quick-next-btn{grid-column:1/-1;justify-self:stretch;width:100%;min-height:45px;font-size:13px}.quote-row .q-price{font-size:15px!important}}

/* Vendasflow 6.3 — cadastro de cliente com endereço */
.customer-address-title{margin-top:10px;padding-top:16px;border-top:1px solid var(--line,#e4eaf0);display:flex;flex-direction:column;gap:4px}.customer-address-title strong{font-size:14px}.customer-address-title small,.cep-status{font-size:12px;color:#61748a}.cep-status{min-height:15px;display:block;margin-top:4px}

/* Visao geral: valores financeiros e controle de privacidade */
.dashboard-heading-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.dashboard-visibility{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #dce5ef;background:#fff;color:#21364e;min-height:42px;padding:10px 14px;border-radius:12px;font-size:12px;font-weight:750;cursor:pointer}
.dashboard-visibility:hover{background:#f1f6fc}
.dashboard-visibility:focus-visible{outline:3px solid #31c9bd;outline-offset:2px}
.dashboard-chart-hidden{display:flex;align-items:center;justify-content:center;min-height:204px;background:#f7f9fd;color:#7b879b;border-radius:12px;font-size:14px;letter-spacing:.3px}
@media(max-width:760px){
 .dashboard-heading-actions{justify-content:stretch;display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}
 .page-heading .dashboard-heading-actions .btn{width:100%;min-height:46px;padding:9px;font-size:11px}
 .dashboard-visibility svg{flex-shrink:0}
}
@media(max-width:375px){.dashboard-heading-actions{grid-template-columns:1fr}.dashboard-heading-actions .btn{font-size:12px!important}}

/* Vendasflow Premium: navegação, categorias, scanner e formulários responsivos */
.nav-icon{display:inline-flex;flex:0 0 38px;width:38px;height:38px;align-items:center;justify-content:center;border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.03));border:1px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.04);transition:transform .18s ease,background .18s ease,border-color .18s ease,color .18s ease}
.nav-icon svg{width:20px;height:20px;stroke-width:1.9}
.nav-item:hover .nav-icon{transform:translateY(-1px);background:linear-gradient(180deg,rgba(0,223,197,.18),rgba(0,223,197,.06));border-color:rgba(0,223,197,.26)}
.nav-item.active .nav-icon{background:linear-gradient(180deg,rgba(0,223,197,.22),rgba(8,125,255,.12));border-color:rgba(0,223,197,.28);color:#dffdfa;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 20px rgba(1,20,43,.18)}
.mobile-nav svg{width:21px;height:21px;stroke-width:1.9}
.mobile-nav button.active span{background:#edf8ff;color:#0a74bf;border-radius:12px}
.category-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.category-card{display:flex;align-items:center;gap:12px;padding:16px;border-radius:14px;border:1px solid #e5ebf4;background:#fbfdff;min-height:80px}
.category-card>span{display:grid;place-items:center;height:38px;width:38px;border-radius:11px;background:#e8f5fc;color:#037fbd;flex-shrink:0}
.category-card>div{min-width:0;flex:1}.category-card strong{display:block;font-size:13px}.category-card small{display:block;font-size:11px;color:#8491a3;margin-top:5px}
.field-with-scan{display:flex;align-items:stretch;gap:7px}.field-with-scan input{flex:1;min-width:0;width:100%}.field-with-scan .mini-btn{white-space:nowrap;min-height:43px;background:#e6f3fc;color:#066a9e;font-size:12px;border:1px solid #c8e7f9;padding:8px 12px}
.quote-row .scan-sale-field,.quote-row .q-serial-field{grid-column:1/-1}
.scan-sale-field label,.q-serial-field label{font-size:11px}.quote-row .scan-sale-field input,.quote-row .q-serial-field input{width:100%;min-height:43px}
.scanner-overlay{position:fixed;inset:0;background:rgba(3,12,27,.88);z-index:1200;display:grid;place-items:center;padding:12px}
.scanner-window{background:#fff;border-radius:22px;padding:20px;max-width:490px;width:100%;box-shadow:0 30px 80px #0007}.scanner-window h3{margin:0 0 16px;font-size:18px}
.scanner-window video{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:14px;background:#0a0d13;margin-bottom:14px}
.scanner-window .btn{width:100%;min-height:46px}
.modal form input,.modal form select,.modal form textarea{font-size:16px;max-width:100%}
@media (max-width:760px){
 .app-content,.page,.panel{min-width:0}
 .layout{padding-bottom:calc(75px + env(safe-area-inset-bottom))}
 .page{padding:17px 13px 26px}
 .panel{padding:15px;border-radius:16px}
 .modal-backdrop{align-items:flex-end;padding:0;overscroll-behavior:contain}
 .modal{width:100%!important;max-width:100%;max-height:94dvh;border-radius:20px 20px 0 0;padding:17px 15px calc(18px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
 .modal-header{position:sticky;top:-17px;background:#fff;z-index:3;padding:12px 0 10px;margin-bottom:12px}
 .modal-footer{position:sticky;bottom:-18px;z-index:3;background:#fff;padding:12px 0 5px;display:grid;grid-template-columns:1fr 1fr;gap:7px;border-top:1px solid #eef1f6}
 .modal-footer .btn{min-height:48px;min-width:0;font-size:12px;white-space:normal}
 .quote-row{grid-template-columns:minmax(0,1fr) 70px 105px 34px;gap:7px}
 .quote-row .q-serial-field,.quote-row .scan-sale-field{grid-column:1/-1}
 .quote-row .q-serial-field .field-with-scan,.quote-row .scan-sale-field .field-with-scan{display:flex;min-width:0}
 .mobile-menu-button{min-width:45px;min-height:45px}
 .mobile-nav button span{display:flex;align-items:center;justify-content:center;height:30px;min-width:30px;padding:4px}
 .category-cards{grid-template-columns:1fr}
 .field-with-scan .mini-btn{min-width:70px;min-height:46px}
}
@media (max-width:390px){.page{padding:14px 10px 24px}.metric{padding:12px}.metric strong{font-size:19px}.quote-row{grid-template-columns:minmax(0,1fr) 60px 95px 30px}.mobile-nav button{font-size:9px}}

/* v6.7: leitura opcional ao lado do preço, sem campos extras no formulário */
.quote-row .compact-scanner{display:flex;align-items:stretch;gap:7px;min-width:0;width:100%}
.quote-row .compact-scanner>.q-price{min-width:0;flex:1;width:100%}
.quote-row .camera-icon-btn{width:42px;min-width:42px;display:flex;align-items:center;justify-content:center;background:#eaf6fb;border:1px solid #bde0ec;border-radius:11px;color:#066e91;cursor:pointer;transition:background .15s}
.quote-row .camera-icon-btn:hover{background:#d8f1f8}
.quote-row .camera-icon-btn:focus-visible{outline:3px solid #20c5c0;outline-offset:2px}
.quote-row .scan-code-input[hidden],.quote-row .scan-result[hidden]{display:none!important}
.quote-row .scan-code-input:not([hidden]){flex-basis:100%;width:100%;margin-top:5px}
.quote-row .compact-scanner:has(.scan-code-input:not([hidden])){flex-wrap:wrap}
.quote-row .scan-result{grid-column:1 / -1;background:#eef9f6;border:1px solid #caebe2;border-radius:10px;color:#126b5e;padding:8px 11px;font-size:12px;overflow-wrap:anywhere}
.quote-row .q-price-field{min-width:0}
.quote-row .payment-section [name=installment_note]{min-width:0}
@media(max-width:760px){.quote-row .compact-scanner{gap:4px}.quote-row .camera-icon-btn{width:38px;min-width:38px;border-radius:9px}.quote-row .q-price-field input.q-price{min-width:0;max-width:100%;padding:8px 4px;font-size:16px}.quote-row .camera-icon-btn svg{width:19px;height:19px}}

/* Vendasflow 7.2 — Mobile-first navigation and cross-device polish */
.mobile-head-spacer{display:none}
@media(max-width:760px){
 html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
 body{overscroll-behavior-y:auto}
 body.mobile-drawer-open{overflow:hidden;touch-action:pan-y}
 .mobile-head{display:grid!important;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:10px;padding:10px 14px!important;min-height:68px;top:0}
 .mobile-head .mobile-menu-button{grid-column:1;grid-row:1;justify-self:start;display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#ffffff15;border:1px solid #ffffff33;touch-action:manipulation}
 .mobile-head .mobile-menu-button svg{width:24px;height:24px}
 .mobile-head .brand{grid-column:2;grid-row:1;justify-self:center;min-width:0;display:flex;align-items:center}
 .mobile-head .brand img{width:min(54vw,190px)!important;max-height:46px!important;object-fit:contain}
 .mobile-head-spacer{display:block;grid-column:3;grid-row:1;width:44px;height:44px}
 .mobile-drawer:not([hidden]){display:block;position:fixed;inset:0;z-index:95;isolation:isolate}
 .mobile-drawer .drawer-backdrop{background:rgba(3,16,35,.62);opacity:0;transition:opacity .25s ease}
 .mobile-drawer.is-open .drawer-backdrop{opacity:1}
 .drawer-sheet{left:0!important;right:auto!important;top:0;bottom:0;width:min(86vw,340px);height:100dvh;max-height:100dvh;padding:calc(16px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(175deg,#092249,#081b3a);color:#fff;box-shadow:15px 0 50px #07112c35;transform:translateX(-102%);transition:transform .27s cubic-bezier(.22,1,.36,1);will-change:transform;outline:0}
 .mobile-drawer.is-open .drawer-sheet{transform:translateX(0)}
 .drawer-heading{flex-shrink:0;color:#fff;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff28;padding:10px 6px 17px;margin:0 0 10px}
 .drawer-heading strong{font-size:18px;display:block}.drawer-heading small{font-size:11px;display:block;color:#a8c4df;margin-top:4px}
 .drawer-heading .close{border:1px solid #ffffff30;background:#ffffff15;color:#fff;width:44px;height:44px;border-radius:12px;flex-shrink:0}
 .drawer-scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:3px 2px 12px;touch-action:pan-y}
 .drawer-section{display:block;color:#8db8d6;letter-spacing:1.5px;font-weight:800;font-size:10px;margin:17px 12px 8px}
 .drawer-sheet .nav-item{display:flex;width:100%;min-height:53px;padding:9px 12px;color:#d9ebfa;font-size:14px;border-radius:13px;gap:12px;touch-action:manipulation;text-align:left}
 .drawer-sheet .nav-item .nav-icon{flex-shrink:0;color:#aed9f3}
 .drawer-sheet .nav-item.active{color:#fff;background:#145086;box-shadow:inset 3px 0 #10e2c5}
 .drawer-sheet .nav-item.active .nav-icon{color:#fff}
 .drawer-sheet .drawer-logout{margin-top:16px;border-top:1px solid #ffffff20;border-radius:0;padding-top:14px}
 .mobile-nav{padding-bottom:calc(7px + env(safe-area-inset-bottom));background:#ffffffeb;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
 .mobile-nav button{min-height:54px;min-width:0;touch-action:manipulation}
 .page,.panel,.metric,.content-grid,.form-grid{min-width:0}
 .panel{overflow-wrap:break-word}
 input,select,textarea{max-width:100%;box-sizing:border-box}
 .quote-row .q-desc,.quote-row .q-price,.quote-row select{min-width:0}
 .modal{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
 .modal .form-grid{grid-template-columns:minmax(0,1fr)!important}
 .modal .form-grid .span-2{grid-column:1!important}
 .receipt-actions{grid-template-columns:1fr 1fr!important}
 .receipt-actions .btn{font-size:12px}
 .table-wrap{overflow-wrap:anywhere}
}
@media(max-width:380px){
 .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .metric{padding:11px;min-height:128px}
 .metric strong{font-size:19px}
 .dashboard-heading-actions{grid-template-columns:1fr}
 .quote-row{gap:5px}
}
@media(prefers-reduced-motion:reduce){.drawer-sheet,.drawer-backdrop,.mobile-head{transition:none!important}html{scroll-behavior:auto!important}}
@media(min-width:761px){.sidebar{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.app-content{min-width:0}.page{width:100%;box-sizing:border-box}}

/* 7.3: rolagem e usabilidade em Safari iOS e desktop */
@media(max-width:760px){
 body.mobile-drawer-open{position:fixed!important;overflow:hidden!important;overscroll-behavior:none;touch-action:auto!important}
 .mobile-drawer .drawer-sheet{height:100%;height:100dvh;max-height:100dvh;min-height:0;overscroll-behavior:contain;touch-action:pan-y!important}
 .mobile-drawer .drawer-scroll{overflow-y:scroll!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;touch-action:pan-y!important;scrollbar-width:thin;min-height:0;max-height:100%;padding-bottom:calc(28px + env(safe-area-inset-bottom))}
 .mobile-drawer .drawer-scroll .nav-item{flex-shrink:0;min-height:54px;line-height:1.25}
 .mobile-drawer .drawer-backdrop{position:absolute;inset:0}
 .mobile-head{grid-template-columns:48px minmax(0,1fr) 48px!important}
 .mobile-head .brand{overflow:hidden}
 .mobile-nav{left:0;right:0;width:100%;box-sizing:border-box;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;align-items:center;padding-left:4px;padding-right:4px}
 .mobile-nav button{max-width:100%;min-width:0;overflow:hidden;min-height:58px;padding:5px 1px;font-size:clamp(9px,2.5vw,11px);white-space:nowrap}
 .mobile-nav button span{height:30px;min-width:30px}
 .mobile-nav button svg{height:22px;width:22px}
 .modal-backdrop,.scanner-overlay{height:100dvh;max-height:100dvh}
 .modal{max-height:92dvh;overscroll-behavior:contain}
 .page-heading>div:first-child{min-width:0}
 .content-grid,.metric-grid{min-width:0}
 .field input,.field select,.field textarea{font-size:16px}
 input[type=number]{appearance:textfield;-moz-appearance:textfield}
 .quote-row{grid-template-columns:minmax(0,1fr) 63px minmax(100px,.75fr) 32px!important;column-gap:6px}
 .quote-row .q-price-field{min-width:0}
 .quote-row .q-price-field input{width:100%;font-size:16px}
 .scanner-window{max-height:94dvh;overflow:auto}
}
@media(max-width:375px){
 .quote-row{grid-template-columns:minmax(0,1fr) 55px minmax(88px,.7fr) 30px!important;gap:4px}
 .modal{padding-left:11px;padding-right:11px}
}
@media(min-width:761px){
 .sidebar{position:sticky;top:0;max-height:100vh;overflow-y:auto;-webkit-overflow-scrolling:touch}
 .data-table th{white-space:nowrap}
}

/* Vendasflow 7.4: categorias editáveis e PF/PJ em vendas e orçamentos */
.category-card .row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-left:auto}
.category-card .row-actions button{min-height:36px;min-width:70px}
.category-card .danger-btn{background:#fff0f1;color:#b83945;border:1px solid #f9cdd1}
.btn-convert-quote{background:#e5f8f2!important;color:#0b8269!important;border:1px solid #c2ebde!important;white-space:nowrap}
.customer-identity-grid{margin-top:8px;padding-top:10px;border-top:1px solid #e9eef3}
.customer-picker .field input,.customer-picker .field select{min-height:43px}
@media(max-width:760px){
 .category-card{flex-wrap:wrap;align-items:flex-start;gap:10px}
 .category-card .row-actions{width:100%;margin-left:0;justify-content:flex-start}
 .category-card .row-actions button{min-height:43px;flex:1}
 .customer-identity-grid{grid-template-columns:minmax(0,1fr);gap:7px}
 .customer-identity-grid .span-2{grid-column:1}
 .btn-convert-quote{min-height:42px;white-space:normal;text-align:center}
 .record-actions,.row-actions{flex-wrap:wrap}
}

/* v7.5: exclusão real, segura e tocável no celular */
.category-card .danger-btn{display:inline-flex;gap:6px;align-items:center;justify-content:center;min-height:41px;border:1px solid #ffd2d5;background:#fff1f2;color:#a72b3c;font-weight:800;padding:9px 14px;border-radius:10px;cursor:pointer}
.category-card .danger-btn:hover{background:#ffe5e8}
.category-card .danger-btn:focus-visible{outline:3px solid #d04354;outline-offset:2px}
.category-delete-confirm h3{font-size:19px;letter-spacing:-.35px;margin:7px 0 5px;color:#152b45}
.category-delete-confirm p{line-height:1.5;font-size:13px;color:#677a8b}
.category-delete-icon{display:grid;place-items:center;width:48px;height:48px;background:#fff0f1;color:#c33149;border-radius:15px}
.category-delete-confirm .warn{margin-top:13px}
@media(max-width:760px){.category-card .danger-btn{min-height:48px}.category-delete-confirm .modal-footer .btn{min-height:50px}}

/* v7.6: campo de endereço opcional e conversão confortável no celular */
@media(max-width:640px){
 .customer-identity-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:11px!important}
 .customer-identity-grid .field.span-2{grid-column:1/-1!important}
 form[data-form="convert-quote"] .field{min-width:0}
 form[data-form="convert-quote"] [name^="unit_cost_"]{min-height:48px}
 form[data-form="convert-quote"] .modal-footer{position:sticky;bottom:0;background:#fff;z-index:1;padding-top:12px}
}

/* Vendasflow 7.7 — conforto mobile e identidade de aplicativo */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,[role="button"],a,select{ -webkit-tap-highlight-color:transparent; }
@media(max-width:760px){
  .mobile-menu-button,.mobile-nav button{touch-action:manipulation;}
  .mobile-nav{padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));}
  .mobile-drawer .drawer-scroll{scroll-behavior:smooth;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
  input,select,textarea{font-size:max(16px,1em)}
}
@media(display-mode:standalone){
  .mobile-head{padding-top:max(10px,env(safe-area-inset-top,0px))!important;}
}


/* Vendasflow 7.8 — refinamento mobile-first, Safari iOS e Chrome Android */
:root{color-scheme:light}
html{scroll-behavior:auto!important;scroll-padding-top:74px}
body{overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,a,[role="button"]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #078bcd;outline-offset:2px}
@media (hover:none){.btn:hover:not(:disabled){transform:none}.nav-item:hover{background:transparent}}
@media (max-width:760px){
  :root{--mobile-bottom-height:calc(71px + env(safe-area-inset-bottom,0px))}
  body{-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
  .layout{min-height:100svh;padding-bottom:calc(var(--mobile-bottom-height) + 12px)}
  .page{padding:clamp(14px,3.5vw,20px) clamp(12px,3.5vw,20px) 24px}
  .mobile-head{position:relative;min-width:0;padding:12px 14px!important;transform:translateZ(0)}
  .mobile-head .brand{min-width:0;max-width:100%}
  .mobile-menu-button{min-width:48px!important;min-height:48px!important;touch-action:manipulation}
  .mobile-nav{position:fixed;z-index:80;bottom:0;left:0;right:0;min-height:var(--mobile-bottom-height);padding:5px 5px calc(8px + env(safe-area-inset-bottom,0px));
    background:rgba(255,255,255,.97);border-top:1px solid #e2eaf4;
    box-shadow:0 -5px 22px rgba(7,30,68,.055);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
  .mobile-nav button{min-height:54px;padding:5px 0 4px;border-radius:13px;line-height:1.3;user-select:none;-webkit-user-select:none}
  .mobile-nav button:active{background:#e9f7fe}
  .mobile-nav button.active{background:#eaf6fd}
  .mobile-nav button svg{height:23px;width:23px}
  .mobile-drawer .drawer-sheet{overflow:hidden!important;transform:translate3d(-102%,0,0);backface-visibility:hidden;max-width:calc(100vw - 42px)}
  .mobile-drawer.is-open .drawer-sheet{transform:translate3d(0,0,0)}
  .mobile-drawer .drawer-scroll{scroll-behavior:auto!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y!important;scrollbar-width:thin}
  .drawer-scroll .nav-item{min-height:54px!important;padding:12px!important}
  .modal-backdrop{align-items:flex-end;overflow:hidden;padding:0;overscroll-behavior:contain;touch-action:auto}
  .modal,.modal.wide{display:block;width:100%!important;max-width:100%!important;min-width:0;max-height:min(94dvh,960px);height:auto;overflow-x:hidden;overflow-y:auto;
    padding:15px clamp(13px,4vw,21px) calc(18px + env(safe-area-inset-bottom,0px));border-radius:23px 23px 0 0;
    -webkit-overflow-scrolling:touch;overscroll-behavior:contain;scroll-behavior:auto}
  .modal-header{position:sticky;top:-15px;margin-bottom:14px;z-index:4;background:#fff;padding:10px 0 13px;min-height:52px}
  .modal-header h2{font-size:clamp(17px,4.3vw,21px);line-height:1.3}
  .modal-header .close{min-width:44px;min-height:44px}
  .modal-footer{position:sticky;bottom:calc(-18px - env(safe-area-inset-bottom,0px));background:#fff;z-index:4;
    margin:14px calc(-1*clamp(13px,4vw,21px)) 0;padding:11px clamp(13px,4vw,21px) calc(12px + env(safe-area-inset-bottom,0px));
    border-top:1px solid #e5ecf4;box-shadow:0 -5px 20px rgba(13,40,80,.06)}
  .modal-footer button{min-height:48px;white-space:normal;line-height:1.3}
  .modal .field input:not([type=checkbox]):not([type=radio]),.modal .field textarea,.modal .field select,
  .field input:not([type=checkbox]):not([type=radio]),.field textarea,.field select,.search-input{font-size:16px!important;min-height:46px;max-width:100%}
  .field textarea{min-height:94px}
  .field input,.field textarea,.field select{scroll-margin-block:100px}
  .page-heading{gap:12px;flex-wrap:wrap;margin-bottom:18px}
  .page-heading h1{font-size:clamp(23px,6vw,29px)}
  .page-heading>div:last-child:not(:first-child){max-width:100%}
  .toolbar{gap:10px}.toolbar .search-input{max-width:none;width:100%}
  .table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
  .data-table{min-width:565px}.data-table th,.data-table td{padding:12px 10px}
  .row-actions .mini-btn,.record-actions button{min-height:42px}
  .metric-grid{gap:12px}.metric{min-width:0}.metric strong{white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
  .panel{padding:clamp(13px,3.4vw,20px);min-width:0}
  .btn{min-height:45px}
  .scanner-overlay{z-index:120}
}
@media(max-width:380px){
 .mobile-nav{padding-left:2px;padding-right:2px}
 .mobile-nav button{font-size:9px;min-width:0}
 .modal-footer{grid-template-columns:repeat(2,minmax(0,1fr))}
 .quote-row{gap:4px}
}
@media(max-width:760px) and (orientation:landscape){
 .mobile-head{min-height:58px;padding:5px 14px!important}
 .mobile-nav{min-height:59px;padding-bottom:env(safe-area-inset-bottom,0px)}
 .layout{padding-bottom:calc(60px + env(safe-area-inset-bottom,0px))}
 .modal,.modal.wide{max-height:97dvh;border-radius:16px 16px 0 0}
 .mobile-nav button{min-height:43px}
 .mobile-nav button span{height:22px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* v8.0 — somente a lista de orçamentos usa cartões sem rolagem lateral no mobile. */
.quotes-mobile-view{display:none}
.quotes-desktop-view{display:block}
@media(max-width:760px){
 .quotes-desktop-view,.quotes-desktop-hint{display:none!important}
 .quotes-mobile-view{display:block;width:100%;min-width:0;max-width:100%}
 .quotes-mobile-tools{margin-bottom:13px;min-width:0}
 .quote-search-label{display:block;font-size:12px;font-weight:750;color:#52687e;margin-bottom:7px}
 .quotes-mobile-tools .search-input{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:49px;border-radius:13px;font-size:16px!important;padding:12px 15px;background:#fff}
 .quote-mobile-filters{display:flex;gap:7px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:10px 1px 8px;max-width:100%;touch-action:pan-x;overscroll-behavior-x:contain}
 .quote-mobile-filters::-webkit-scrollbar{display:none}
 .quote-status-filter{flex:0 0 auto;min-height:40px;border-radius:99px;padding:8px 13px;background:#fff;border:1px solid #dae6ee;color:#506477;font-size:12px;font-weight:700;touch-action:manipulation}
 .quote-status-filter.is-active{background:#0e3557;border-color:#0e3557;color:#fff}
 .quote-mobile-count{display:block;color:#77889a;font-size:12px;padding:0 2px;margin-top:1px}
 .quote-mobile-list{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
 .quote-mobile-card{display:flex;flex-direction:column;gap:11px;min-width:0;max-width:100%;box-sizing:border-box;background:#fff;border:1px solid #e1eaf0;border-radius:18px;padding:16px 14px;box-shadow:0 7px 22px rgba(28,57,83,.045);overflow-wrap:anywhere}
 .quote-mobile-card[hidden]{display:none!important}
 .quote-mobile-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0;flex-wrap:wrap}
 .quote-mobile-number{font-size:11px;letter-spacing:.045em;font-weight:800;color:#54708a}
 .quote-mobile-top .pill{font-size:11px;max-width:100%;white-space:normal}
 .quote-mobile-client{display:block;font-size:clamp(17px,4.6vw,20px);line-height:1.32;color:#162f49;font-weight:800;overflow-wrap:anywhere;word-break:normal}
 .quote-mobile-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:#8192a3}
 .quote-mobile-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:12px 0;border-top:1px solid #edf1f5;border-bottom:1px solid #edf1f5}
 .quote-mobile-bottom>span{font-size:12px;color:#697f94}
 .quote-mobile-bottom>strong{font-size:clamp(18px,5vw,22px);font-variant-numeric:tabular-nums;letter-spacing:-.035em;color:#063e50}
 .quote-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
 .quote-card-actions .mini-btn{display:flex;align-items:center;justify-content:center;text-align:center;min-height:45px;padding:10px 6px;font-size:12px;white-space:normal;line-height:1.25;touch-action:manipulation}
 .quote-card-actions .quote-desktop-print{display:none}
 .quote-card-actions .quote-card-convert{grid-column:1/-1;min-height:48px}
 .quote-card-actions .quote-card-delete{grid-column:1/-1;display:flex;justify-content:flex-end;min-width:0}
 .quote-card-delete .record-delete-btn{min-height:40px;background:transparent!important;color:#a3505a!important}
 .quote-cancel-note{grid-column:1/-1;font-size:12px;line-height:1.4;color:#b44d5e;background:#fff0f2;border-radius:10px;padding:10px}
 .quote-search-empty{color:#667b8c;background:#fff;padding:16px;border-radius:12px;font-size:13px}
 .quote-search-empty[hidden]{display:none!important}
 .page{min-width:0;max-width:100%;overflow-x:clip}
}
@media(min-width:761px){.quotes-mobile-view{display:none!important}}

/* Vendasflow 8.1 — revisão de estabilidade e ergonomia iOS / Android. */
html,body{max-width:100%;overflow-x:clip}
@media(max-width:760px){
  .app-content,.page,.panel,.page-heading,.content-grid,.metric-grid{min-width:0;max-width:100%}
  .page{overflow-wrap:break-word}
  .mobile-head{padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
  .mobile-nav{padding-left:max(5px,env(safe-area-inset-left));padding-right:max(5px,env(safe-area-inset-right))}
  .mobile-nav button{touch-action:manipulation}
  .mobile-drawer .drawer-scroll{scroll-snap-type:none;overflow-anchor:none}
  .modal-backdrop{height:100dvh;max-height:100dvh}
  .modal,.modal.wide{max-height:calc(100dvh - env(safe-area-inset-top,0px) - 8px);overscroll-behavior:contain}
  .modal textarea,.modal input,.modal select{min-width:0}
  .quotes-mobile-view{min-width:0;max-width:100%}
  .quote-mobile-card,.quote-mobile-card *{min-width:0}
  .quote-mobile-card{overflow-wrap:anywhere}
  .field input:focus-visible,.field select:focus-visible,.field textarea:focus-visible{outline-offset:1px}
}
@media(max-width:360px){
  .page{padding-inline:10px}
  .mobile-nav button{font-size:9px;gap:3px}
  .metric-grid{gap:8px}
}
@media(prefers-reduced-motion:reduce){.mobile-drawer .drawer-sheet,.mobile-nav,.modal{animation:none!important;transition:none!important}}

/* Vendasflow 8.2 — painel de vendas compacto no mobile, desktop intacto */
.sales-mobile-view{display:none}
@media(max-width:760px){
 .sales-desktop-view,.sales-desktop-hint{display:none!important}
 .sales-mobile-view{display:block;min-width:0;max-width:100%}
 .sales-mobile-tools{margin:0 0 10px}
 .sales-mobile-tools .search-input{width:100%;max-width:100%;min-width:0;box-sizing:border-box;height:46px;border-radius:13px;font-size:16px!important}
 .sales-mobile-list{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;min-width:0}
 .sale-mobile-card{min-width:0;max-width:100%;box-sizing:border-box;background:#fff;border:1px solid #e4ebf1;border-radius:15px;padding:12px 13px 10px;box-shadow:0 4px 13px rgba(12,48,78,.035);display:flex;flex-direction:column;gap:8px;overflow-wrap:anywhere}
 .sale-mobile-card[hidden]{display:none!important}
 .sale-compact-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#7a8b9a;font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums}
 .sale-compact-number{color:#50677d;font-weight:800;white-space:nowrap}
 .sale-compact-main{display:flex;align-items:baseline;justify-content:space-between;gap:10px;min-width:0}
 .sale-compact-client{min-width:0;flex:1 1 auto;color:#163047;font-size:15px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
 .sale-compact-amount{flex:0 0 auto;color:#0b5260;font-size:17px;font-weight:850;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:-.04em}
 .sale-compact-imei{display:flex;align-items:baseline;gap:8px;min-width:0;font-size:11px;color:#526f82;line-height:1.35}
 .sale-compact-imei>span:first-child{font-size:10px;font-weight:800;color:#60798a;flex-shrink:0}
 .sale-compact-imei>span:last-child{min-width:0;overflow-wrap:anywhere;word-break:break-word}
 .sale-compact-footer{border-top:1px solid #eef2f5;padding-top:7px;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:27px}
 .sale-compact-state{font-size:11px;color:#38836c;font-weight:700}
 .sale-compact-footer .pill{font-size:10px;padding:3px 7px}
 .sale-compact-detail{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:#126881;font-weight:800;font-size:12px;padding:5px 0 5px 9px;min-height:30px;touch-action:manipulation;cursor:pointer}
 .sale-compact-detail span{font-size:19px;line-height:1}
 .sale-mobile-empty{background:#fff;color:#667a8e;font-size:13px;padding:15px;border-radius:12px}
 .sale-mobile-empty[hidden]{display:none!important}
}
@media(max-width:360px){.sale-mobile-card{padding:11px}.sale-compact-main{gap:6px}.sale-compact-amount{font-size:15px}.sale-compact-client{font-size:14px}}
@media(min-width:761px){.sales-mobile-view{display:none!important}}

/* Vendasflow 8.4 — todos os módulos mobile-first, sem mudar desktop */
@media (max-width:760px){
 html,body,#root,.layout,.app-content,.page{max-width:100%;min-width:0;overflow-x:clip}
 .page{padding:12px 12px calc(20px + env(safe-area-inset-bottom,0px))!important}
 .page-heading{margin-bottom:13px;align-items:flex-start;gap:9px}
 .page-heading h1{font-size:clamp(21px,5.6vw,26px);line-height:1.2}
 .page-heading p{font-size:12px;line-height:1.4}
 .page-heading .btn,.dashboard-heading-actions .btn{min-height:44px;max-width:100%;white-space:normal}
 .page-heading>div:last-child{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
 .dashboard-heading-actions{width:100%;justify-content:flex-start}
 .dashboard-heading-actions .btn{flex:1 1 145px}
 .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .metric{padding:12px!important;border-radius:13px}
 .metric .meta{gap:4px;margin-bottom:6px;font-size:10px;line-height:1.35}
 .metric .bubble{height:27px;width:27px;flex:0 0 27px;font-size:15px}
 .metric strong{font-size:clamp(15px,4.3vw,22px)!important;letter-spacing:-.6px}
 .metric footer{font-size:10px;line-height:1.4;margin-top:6px}
 .content-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
 .content-grid>section,.content-grid>div{min-width:0;max-width:100%}
 .panel{padding:13px!important;margin-bottom:12px!important;border-radius:14px}
 .panel-head{flex-wrap:wrap;gap:7px;margin-bottom:11px}
 .panel-head h3{font-size:14px;line-height:1.4}
 .panel-head .pill{white-space:normal;text-align:center}
 .stats-strip{gap:6px;flex-wrap:wrap;margin-bottom:12px}
 .stat-chip{padding:8px 10px;font-size:11px;flex:1 1 96px;line-height:1.35}
 .toolbar{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px}
 .toolbar>.search-input{flex:1 1 100%;width:100%;max-width:none;min-width:0;min-height:46px}
 .toolbar>.mini-btn{min-height:42px}
 .category-cards{grid-template-columns:minmax(0,1fr)!important}
 .category-card{min-width:0;max-width:100%;padding:12px}
 .category-card>div{min-width:0;overflow-wrap:anywhere}
 .top-customer-grid{grid-template-columns:minmax(0,1fr)!important;gap:9px}
 .top-customer{min-width:0;max-width:100%}
 .report-filters{display:flex;flex-wrap:wrap;gap:7px}
 .report-filters>.btn{flex:1 1 110px;min-width:0;white-space:normal}
 .report-dates{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .report-dates>label{min-width:0;max-width:100%}
 .report-dates input{min-width:0;max-width:100%;width:100%;font-size:16px}
 .report-dates>.btn{grid-column:1/-1}
 .report-actions{display:flex;flex-wrap:wrap;gap:8px}
 .report-actions>.btn{flex:1 1 135px;white-space:normal}
 .info-row{align-items:flex-start;gap:8px}
 .info-row span{min-width:0;overflow-wrap:anywhere}
 .info-row strong{text-align:right;min-width:0;overflow-wrap:anywhere}
 .chart{gap:5px;height:165px}
 .bar-wrap span{font-size:9px}
 /* Tabelas genéricas viram cartões no estoque, clientes, financeiro e painel. */
 .table-wrap.vf-mobile-card-table{border:0;overflow:visible;max-width:100%;width:100%;touch-action:pan-y}
 .vf-mobile-card-table .data-table{display:block;min-width:0!important;width:100%;border-collapse:separate}
 .vf-mobile-card-table .data-table thead{display:none}
 .vf-mobile-card-table .data-table tbody{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;min-width:0}
 .vf-mobile-card-table .data-table tbody tr{display:flex;flex-direction:column;gap:0;background:#fff;border:1px solid #e3ebf3;border-radius:13px;padding:10px 12px;min-width:0;max-width:100%;box-shadow:0 3px 12px rgba(18,44,70,.03)}
 .vf-mobile-card-table .data-table td{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0;max-width:100%;width:100%;padding:7px 0!important;line-height:1.4;font-size:12px;text-align:right;border-bottom:1px solid #f1f4f8;overflow-wrap:anywhere;word-break:normal}
 .vf-mobile-card-table .data-table tr td:last-child{border:0}
 .vf-mobile-card-table .data-table td::before{content:attr(data-mobile-label);flex:0 0 35%;max-width:35%;text-align:left;font-size:11px;font-weight:700;color:#718399;line-height:1.4}
 .vf-mobile-card-table .data-table td.vf-mobile-primary-cell{font-size:14px;font-weight:700;justify-content:flex-start;text-align:left;align-items:flex-start;order:-1;padding:5px 0 10px!important;color:#1b324a}
 .vf-mobile-card-table .data-table td.vf-mobile-primary-cell::before{display:none}
 .vf-mobile-card-table .data-table td.vf-mobile-primary-cell .product-title{min-width:0;text-align:left}
 .vf-mobile-card-table .data-table td.vf-mobile-actions-cell{display:block;text-align:left;padding-top:11px!important}
 .vf-mobile-card-table .data-table td.vf-mobile-actions-cell::before{display:block;max-width:100%;margin-bottom:7px}
 .vf-mobile-card-table .data-table .row-actions{width:100%;flex-wrap:wrap;justify-content:flex-start}
 .vf-mobile-card-table .data-table .mini-btn{min-height:43px;flex:1 1 auto}
 .vf-mobile-card-table .data-table .inventory-actions{width:100%;max-width:100%;flex-wrap:wrap}
 .vf-mobile-card-table .data-table .inventory-actions .mini-btn{flex:1 1 100px;min-width:0}
 .vf-mobile-card-table .data-table .serial-chip{white-space:normal;overflow-wrap:anywhere}
 /* Campos de venda e orçamento em duas colunas, descrição em largura total. */
 .modal .quote-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:9px!important;align-items:end;min-width:0;max-width:100%;padding:13px 0!important}
 .modal .quote-row>.q-inventory,.modal .quote-row>.q-description{grid-column:1/-1!important;min-width:0}
 .modal .quote-row>.q-quantity{grid-column:1;min-width:0}
 .modal .quote-row>.q-price-field{grid-column:2;min-width:0}
 .modal .quote-row>.q-remove{grid-column:1;justify-self:start;min-height:38px;min-width:65px}
 .modal .quote-row>.quick-next-btn{grid-column:2;min-width:0;max-width:100%;white-space:normal;font-size:12px;min-height:40px}
 .modal .quote-row>.scan-result{grid-column:1/-1}
 .modal .quote-row .field label{font-size:11px;line-height:1.25}
 .modal .quote-row .q-price-field input{font-size:16px!important;min-width:0}
 .modal .quote-row .camera-icon-btn{min-width:39px;min-height:43px}
 .modal .form-grid{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
 .modal .form-grid .span-2{grid-column:1/-1!important}
 .modal .field{min-width:0;max-width:100%}
 .modal .modal-footer{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .modal .modal-footer .btn{padding-inline:7px;min-width:0}
 .modal-header h2{max-width:calc(100% - 52px);overflow-wrap:anywhere}
 .modal .total-preview{max-width:100%;overflow-wrap:anywhere}
 .mobile-nav button{min-width:0}
 .mobile-nav button:active{transform:scale(.96)}
 .sale-mobile-card,.quote-mobile-card{max-width:100%;min-width:0}
 .quote-mobile-client,.sale-compact-client{overflow-wrap:anywhere}
 .auth-side{padding:20px 15px}
 .auth-card{max-width:100%}
}
@media(max-width:350px){
 .page{padding-inline:9px!important}
 .metric{padding:10px!important}
 .metric strong{font-size:15px!important}
 .modal .quote-row{column-gap:6px!important}
 .modal .modal-footer .btn{font-size:12px}
 .report-dates{grid-template-columns:minmax(0,1fr)}
 .report-dates>.btn{grid-column:1}
}

/* v8.5 — Edição de orçamentos em cartões no celular */
@media(max-width:760px){
 .quote-card-actions .btn-edit-quote{grid-column:1/-1;min-height:44px;background:#eef7fa;color:#174765;border-color:#d5e8ee;font-weight:750}
 .quote-card-actions .btn-convert-quote{grid-column:1/-1}
 .quote-cancel-note{grid-column:1/-1;overflow-wrap:anywhere}
}

/* Vendasflow 8.8 — acabamento premium mobile. Desktop acima de 760px intocado. */
@media (max-width:760px){
 :root{--vf-nav-size:calc(68px + env(safe-area-inset-bottom,0px))}
 html{scrollbar-gutter:auto;overscroll-behavior-x:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body{margin:0;max-width:100%;overflow-x:clip;-webkit-overflow-scrolling:touch}
 #root,.layout,.app-content{width:100%;max-width:100%;min-width:0}
 .layout{padding-bottom:calc(var(--vf-nav-size) + 18px)!important;min-height:100svh}
 .app-content{overflow:clip}
 .mobile-head{display:grid!important;position:sticky!important;top:0!important;z-index:36;box-sizing:border-box;
   grid-template-columns:48px minmax(0,1fr) 48px!important;gap:8px!important;align-items:center!important;
   width:100%;min-height:67px!important;padding:9px max(12px,env(safe-area-inset-left,0px)) 9px!important;
   background:linear-gradient(112deg,#071c40,#0a366c)!important;border-bottom:1px solid #2d5373;
   box-shadow:0 3px 11px rgba(5,32,67,.12);transform:none!important}
 .mobile-head .mobile-menu-button{grid-column:1!important;grid-row:1!important;justify-self:center!important;
   width:46px!important;height:46px!important;border-radius:13px!important;min-width:46px!important;
   display:grid!important;place-items:center!important}
 .mobile-head .brand{grid-column:2!important;grid-row:1!important;justify-self:stretch!important;
   display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;width:100%!important;
   padding:0!important;margin:0!important;overflow:hidden}
 .mobile-head .brand img.mobile-logo{display:block!important;width:min(100%,212px)!important;max-width:100%!important;
   height:43px!important;max-height:43px!important;object-fit:contain!important;object-position:center!important}
 .mobile-head-spacer{grid-column:3!important;grid-row:1!important;display:block!important;width:46px;height:46px;pointer-events:none}
 .topbar{height:38px!important;padding:0 13px!important;background:#f8fbff!important}
 .topbar .breadcrumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
 .topbar .top-actions{display:none!important}
 .page{width:100%;max-width:100%;min-width:0;padding:clamp(12px,3.25vw,16px) clamp(11px,3vw,17px) 18px!important}
 .page-heading{margin-bottom:12px!important;gap:10px!important}
 .page-heading .eyebrow{font-size:10px;letter-spacing:1.15px;line-height:1.35}
 .page-heading h1{font-size:clamp(22px,5.45vw,28px)!important;letter-spacing:-.65px;line-height:1.15}
 .page-heading p{font-size:12px;line-height:1.45;max-width:58ch}
 .page-heading>div{min-width:0;max-width:100%}
 .page-heading .btn{min-height:44px;max-width:100%;white-space:normal}
 .panel{max-width:100%;min-width:0;border-radius:15px!important;padding:12px!important;margin-bottom:11px!important}
 .panel-head{gap:8px;align-items:flex-start}
 .panel-head h3{overflow-wrap:anywhere}
 .metric-grid{gap:9px!important;margin-bottom:12px!important}
 .metric{min-width:0;border-radius:14px!important;padding:12px!important;box-shadow:0 2px 12px rgba(17,53,85,.045)}
 .metric strong{font-size:clamp(16px,4.6vw,23px)!important;line-height:1.25!important;overflow-wrap:anywhere}
 .metric .meta{line-height:1.4!important;gap:6px}
 .toolbar,.report-filters,.report-actions{gap:8px}
 .toolbar .search-input{width:100%;max-width:100%;min-width:0;flex:1 1 100%}
 .quote-mobile-card,.sale-mobile-card,.category-card,.top-customer{min-width:0!important;max-width:100%!important}
 .quote-mobile-client,.sale-compact-client{overflow-wrap:anywhere;word-break:normal;line-height:1.3}
 .quote-card-actions button,.sale-mobile-card button{touch-action:manipulation}
 .vf-mobile-card-table .data-table td{gap:8px;max-width:100%;overflow-wrap:anywhere}
 .vf-mobile-card-table .data-table td>*{max-width:100%;min-width:0}
 .vf-mobile-card-table .data-table td::before{flex:0 0 31%;max-width:31%;line-height:1.4}
 .vf-mobile-card-table .data-table td.vf-mobile-primary-cell .product-title{min-width:0!important;max-width:100%;gap:9px}
 .vf-mobile-card-table .data-table .product-thumb{height:52px;width:52px;flex:0 0 52px}
 .vf-mobile-card-table .data-table td.vf-mobile-actions-cell .row-actions{justify-content:stretch;gap:8px}
 .vf-mobile-card-table .data-table td.vf-mobile-actions-cell .mini-btn{flex:1 1 90px}
 .mobile-nav{bottom:0!important;width:100%;max-width:100vw;min-height:var(--vf-nav-size)!important;
   padding:4px max(5px,env(safe-area-inset-left,0px)) calc(7px + env(safe-area-inset-bottom,0px)) max(5px,env(safe-area-inset-right,0px))!important;
   display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;align-items:start;gap:2px;
   background:rgba(255,255,255,.985);border-top:1px solid #dfebf3;box-shadow:0 -4px 24px rgba(5,31,70,.07);
   -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
 .mobile-nav button{width:100%;min-width:0!important;min-height:55px!important;gap:3px!important;line-height:1.25!important;
   font-size:clamp(9px,2.5vw,11px)!important;border-radius:12px;display:flex;align-items:center;justify-content:center;
   flex-direction:column;padding:4px 0!important}
 .mobile-nav button span{height:28px;min-width:28px;display:grid;place-items:center}
 .mobile-nav button svg{width:22px;height:22px;flex-shrink:0}
 .mobile-drawer .drawer-sheet{height:100dvh;max-height:100dvh;max-width:calc(100vw - 36px);will-change:transform}
 .mobile-drawer .drawer-heading{gap:11px;align-items:center}
 .mobile-drawer .drawer-heading>div{min-width:0;overflow:hidden}
 .mobile-drawer .drawer-scroll{min-height:0;flex:1;overflow-y:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-y!important;
   overscroll-behavior-y:contain;scroll-behavior:auto!important}
 .mobile-drawer .nav-item{min-height:52px;touch-action:manipulation}
 .mobile-drawer .drawer-heading .close{min-height:44px;min-width:44px}
 .modal-backdrop{padding:0!important;align-items:flex-end;overscroll-behavior:contain}
 .modal,.modal.wide{width:100%!important;max-width:100vw!important;min-width:0!important;
   max-height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)))!important;
   border-radius:22px 22px 0 0!important;overflow-x:hidden!important;overflow-y:auto!important;
   overscroll-behavior:contain;padding:14px clamp(12px,3.5vw,18px) calc(16px + env(safe-area-inset-bottom,0px))!important;
   -webkit-overflow-scrolling:touch}
 .modal-header{z-index:5;position:sticky;top:-14px!important;min-height:49px;align-items:center;
   padding:8px 0 10px!important;margin:0 0 11px!important;background:white}
 .modal-header h2{font-size:clamp(17px,4.6vw,21px)!important;line-height:1.3}
 .modal-footer{z-index:5;position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom,0px));
   margin:14px calc(-1*clamp(12px,3.5vw,18px)) 0!important;
   padding:10px clamp(12px,3.5vw,18px) calc(10px + env(safe-area-inset-bottom,0px))!important;
   background:white;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .modal-footer .btn{min-width:0;min-height:49px;padding:8px 6px;white-space:normal;overflow-wrap:anywhere}
 .modal .form-grid{grid-template-columns:minmax(0,1fr)!important}
 .modal .field input,.modal .field select,.modal .field textarea,.search-input{font-size:16px!important;min-width:0;max-width:100%}
 .modal .quote-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .modal .quote-row>.q-description,.modal .quote-row>.q-inventory{grid-column:1/-1}
 .modal .quote-row>.q-price-field{grid-column:2;min-width:0}
 .modal .quote-row>.q-quantity{grid-column:1;min-width:0}
 .modal .quote-row>.q-remove{grid-column:1}
 .modal .quote-row .q-price{min-width:0!important;width:100%}
 .modal .quote-row .camera-icon-btn{flex:0 0 40px;width:40px;min-width:40px;min-height:44px}
 .modal input,.modal select,.modal textarea{scroll-margin-top:78px;scroll-margin-bottom:120px}
 #toast-root{left:12px!important;right:12px!important;bottom:calc(var(--vf-nav-size) + 10px)!important;align-items:stretch}
 #toast-root .toast{max-width:100%;width:100%;border-radius:13px;padding:12px 14px}
 .scanner-overlay{padding:12px max(12px,env(safe-area-inset-left,0px))}
 .scanner-window{max-height:calc(100dvh - 30px);overflow-y:auto;padding:14px;border-radius:18px}
 .scanner-window video{aspect-ratio:4/3;max-height:48dvh}
 .auth-side{min-height:100dvh!important;padding:18px clamp(15px,5vw,24px)!important;align-items:center}
 .auth-card{width:100%;max-width:420px}
 .auth-mobile-logo{display:flex;justify-content:center;margin-bottom:24px}
 .auth-mobile-logo .vf-wordmark{width:min(72vw,232px)!important;max-width:100%;height:auto;object-fit:contain}
}
@media (max-width:365px){
 .mobile-head{grid-template-columns:45px minmax(0,1fr) 45px!important;gap:5px!important}
 .mobile-head .brand img.mobile-logo{max-height:37px!important;height:37px!important;width:min(100%,185px)!important}
 .mobile-head .mobile-menu-button{width:44px!important;height:44px!important;min-width:44px!important}
 .mobile-head-spacer{width:44px;height:44px}
 .metric{padding:10px!important}
 .mobile-nav button{font-size:9px!important}
 .page{padding-inline:10px!important}
}
@media (min-width:430px) and (max-width:760px){
 .mobile-head .brand img.mobile-logo{width:min(100%,224px)!important;max-height:46px!important;height:46px!important}
 .page{padding-inline:17px!important}
 .metric-grid{gap:11px!important}
 .metric{padding:15px!important}
 .modal,.modal.wide{border-radius:24px 24px 0 0!important}
}
@media (max-width:760px) and (orientation:landscape){
 .mobile-head{min-height:52px!important;padding-block:4px!important}
 .mobile-head .brand img.mobile-logo{height:36px!important;max-height:36px!important}
 .topbar{display:none!important}
 .mobile-nav{min-height:56px!important;padding-block:2px env(safe-area-inset-bottom,0px)!important}
 .mobile-nav button{min-height:45px!important}
 .layout{padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))!important}
}
@media(prefers-reduced-motion:reduce){.mobile-drawer .drawer-sheet,.mobile-drawer .drawer-backdrop{transition:none!important}}

@media(max-width:760px){
 .mobile-drawer .drawer-brand{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}
 .mobile-drawer .drawer-wordmark{display:block;width:min(53vw,190px);height:42px;max-width:100%;object-fit:contain;object-position:left center}
 .mobile-drawer .drawer-brand small{margin:0 0 0 3px;max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#add0e1;font-size:11px}
}

/* v9.3: mobile cards enxutos. Tabelas desktop permanecem intactas. */
.stock-mobile-view{display:none}
.vf-compact-card[hidden]{display:none!important}
@media(max-width:760px){
 .stock-desktop-view{display:none!important}
 .stock-mobile-view{display:block;min-width:0;width:100%}
 .stock-mobile-list{display:grid;gap:9px;min-width:0}
 .vf-compact-card{box-sizing:border-box;display:flex;flex-direction:column;gap:10px;min-width:0;width:100%;padding:13px 14px;border:1px solid #e0eaf1;border-radius:15px;background:#fff;box-shadow:0 3px 12px rgba(22,53,82,.04)}
 .vf-compact-top,.vf-compact-main,.vf-compact-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0}
 .vf-compact-top>span:first-child,.vf-compact-foot>span{font-size:11px;color:#74869a;line-height:1.4;min-width:0;overflow-wrap:anywhere}
 .vf-compact-top .pill{font-size:10px;padding:4px 8px;white-space:normal;max-width:50%;text-align:center}
 .vf-compact-product{display:flex;align-items:center;gap:9px;min-width:0;flex:1}
 .vf-compact-product .product-thumb{width:42px!important;height:42px!important;min-width:42px!important;object-fit:cover;border-radius:9px}
 .vf-compact-product>div{min-width:0}
 .vf-compact-product strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:1.32;color:#17324c;overflow-wrap:anywhere}
 .vf-compact-product small{display:block;color:#8291a2;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .vf-compact-price{flex:none;font-size:14px;white-space:nowrap;color:#103c59;font-variant-numeric:tabular-nums}
 .vf-compact-foot{padding-top:8px;border-top:1px solid #eff3f6}
 .vf-detail-trigger{border:0;background:transparent;color:#0878af;font-weight:800;font-size:12px;min-height:38px;padding:6px 0 6px 10px;touch-action:manipulation;white-space:nowrap}
 .vf-detail-trigger span{font-size:19px;vertical-align:-1px}
 .vf-stock-search{flex:1 1 220px;min-width:0;max-width:100%;display:flex;align-items:stretch;gap:6px}
 .vf-stock-search .search-input{flex:1;min-width:0;width:100%;max-width:none;font-size:16px!important;height:46px}
 .vf-stock-scan-btn{border:1px solid #d8e6ef;border-radius:10px;background:#eef7fa;color:#176486;padding:0 10px;font-weight:800;font-size:12px;white-space:nowrap;min-height:46px}
 .quote-mobile-list{gap:9px!important}
 .quote-mobile-card{gap:8px!important;padding:13px 14px!important;border-radius:15px!important}
 .quote-mobile-top{align-items:center!important;flex-wrap:nowrap!important}
 .quote-mobile-top .pill{font-size:10px!important;flex-shrink:1;max-width:52%}
 .quote-mobile-client{font-size:15px!important;line-height:1.32!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .quote-mobile-meta{font-size:11px!important}
 .quote-mobile-bottom{padding:0!important;margin:0!important;border:0!important}
 .quote-mobile-bottom span{font-size:11px!important}
 .quote-mobile-bottom strong{font-size:17px!important}
 .quote-mobile-card .vf-compact-foot{margin-top:1px}
}
.vf-detail-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}
.vf-detail-heading{display:flex;align-items:center;gap:10px;min-width:0}
.vf-detail-heading .product-thumb{width:48px;height:48px;object-fit:cover}
.vf-detail-heading>div{min-width:0}.vf-detail-heading strong{display:block;color:#183651;overflow-wrap:anywhere}.vf-detail-heading span{display:block;color:#7d8fa1;font-size:12px}
.vf-detail-price{font-size:17px;white-space:nowrap;color:#0c6579}
.vf-detail-rows{border:1px solid #e8eef4;border-radius:12px;overflow:hidden;margin-bottom:12px}
.vf-detail-rows>div{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:10px 12px;border-bottom:1px solid #eef2f5;font-size:12px}
.vf-detail-rows>div:last-child{border:0}.vf-detail-rows span{color:#778b9f;flex:0 0 38%}.vf-detail-rows strong{text-align:right;overflow-wrap:anywhere;min-width:0}
.vf-details-note{color:#65798d;font-size:12px;overflow-wrap:anywhere}
.vf-quote-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.vf-quote-detail-heading strong{font-size:17px;overflow-wrap:anywhere}
.vf-detail-lines{border-top:1px solid #e6edf3;margin-top:14px}
.vf-detail-line{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e6edf3;padding:10px 0}
.vf-detail-line>div{min-width:0}.vf-detail-line strong{font-size:12px;overflow-wrap:anywhere}.vf-detail-line small{display:block;color:#8392a5;margin-top:4px}.vf-detail-line>strong{white-space:nowrap;font-size:12px}
.vf-detail-total{display:flex;align-items:center;justify-content:space-between;background:#eaf8f5;border-radius:11px;padding:13px;margin-top:12px;gap:12px}
.vf-detail-total span{font-size:12px}.vf-detail-total strong{font-size:18px;color:#078477}
.vf-detail-quote-actions{margin-top:15px}
.vf-detail-quote-actions .quote-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.vf-detail-quote-actions .quote-card-actions .mini-btn{min-height:44px}
.vf-detail-quote-actions .quote-card-actions .btn-edit-quote,.vf-detail-quote-actions .quote-card-actions .btn-convert-quote{grid-column:1/-1}
.vf-detail-quote-actions .quote-card-actions .quote-card-delete{grid-column:1/-1}
.vf-compact-modal-actions{flex-wrap:wrap}
@media(max-width:380px){.vf-compact-main{flex-wrap:wrap}.vf-compact-price{margin-left:51px}.vf-detail-summary{flex-wrap:wrap}}


/* v9.5: Mobile-first consistency across iPhone, Android and desktop browsers. */
:root{--vf-visible-height:100dvh;--vf-visible-offset:0px}
html{max-width:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body,#root,.layout,.app-content,.page{min-width:0;max-width:100%}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button,a,[role=button]{touch-action:manipulation}
input,textarea,select{min-width:0;max-width:100%;box-sizing:border-box}
img,video,canvas,svg{max-width:100%}
:where(.panel,.metric,.field,.toolbar,.page-heading,.quote-row,.sale-product,.vf-compact-card){min-width:0}
:where(.panel,.vf-compact-card,.modal,.metric) *{overflow-wrap:break-word}
@media (hover:hover) and (pointer:fine){
 .btn,.mini-btn,.vf-detail-trigger,.nav-item{transition:background-color .15s ease,color .15s ease,transform .15s ease}
 .btn:active,.mini-btn:active{transform:translateY(1px)}
}
@media(max-width:760px){
 html{scroll-padding-bottom:calc(85px + env(safe-area-inset-bottom,0px))}
 html,body{width:100%;overscroll-behavior-x:none}
 #root,.layout,.app-content,.page{overflow-x:clip}
 .page{box-sizing:border-box;width:100%;padding-inline:clamp(11px,3.5vw,18px)!important}
 .page-heading{min-width:0;gap:10px!important}
 .page-heading h1{font-size:clamp(21px,6vw,27px)!important;line-height:1.18}
 .page-heading p{line-height:1.45!important}
 .metric-grid,.content-grid,.top-customer-grid{min-width:0;max-width:100%}
 .metric-grid{gap:9px!important}
 .metric{min-width:0;padding:clamp(11px,3vw,16px)!important;min-height:0}
 .metric strong{font-size:clamp(16px,4.65vw,25px)!important;overflow-wrap:anywhere}
 .panel{min-width:0;padding:clamp(12px,3.4vw,18px)!important}
 .panel-head{flex-wrap:wrap;row-gap:8px}
 .info-row{align-items:flex-start}
 .info-row span{min-width:0;flex:1}
 .info-row strong{min-width:0;text-align:right;overflow-wrap:anywhere}
 .toolbar,.toolbar>*{min-width:0;max-width:100%}
 .mobile-nav{box-sizing:border-box;width:100%;padding-inline:max(6px,env(safe-area-inset-left,0px)) max(6px,env(safe-area-inset-right,0px))!important}
 .mobile-nav button{min-width:0;min-height:48px!important;padding-inline:0!important;display:flex;align-items:center;justify-content:center}
 .mobile-nav button svg{width:20px;height:20px}
 .mobile-head{padding-inline:max(10px,env(safe-area-inset-left,0px)) max(10px,env(safe-area-inset-right,0px))!important}
 .mobile-head .brand,.mobile-head .mobile-logo{min-width:0;max-width:100%;object-fit:contain;object-position:center}
 .vf-compact-card,.quote-mobile-card,.sale-mobile-card{max-width:100%;min-width:0;overflow:hidden}
 .vf-compact-product,.vf-compact-main,.vf-compact-top{min-width:0}
 .vf-compact-price{font-size:clamp(12px,3.5vw,15px)!important;max-width:45%;overflow-wrap:anywhere;white-space:normal;text-align:right}
 .vf-detail-trigger{min-height:44px!important}
 .modal-backdrop{box-sizing:border-box;max-width:100vw;max-height:var(--vf-visible-height,100dvh);height:var(--vf-visible-height,100dvh);top:var(--vf-visible-offset,0px);bottom:auto;overflow:hidden}
 .modal,.modal.wide{box-sizing:border-box;max-width:100%;max-height:var(--vf-visible-height,100dvh)!important;height:min(100%,var(--vf-visible-height,100dvh));overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))!important}
 .modal-footer{position:sticky;bottom:calc(-16px - env(safe-area-inset-bottom,0px));padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));background:#fff}
 .modal .form-grid,.modal .field,.modal .quote-row,.modal .quote-row>*{min-width:0;max-width:100%}
 .modal .quote-row .q-price,.modal .quote-row .q-desc,.modal .quote-row input,.modal .quote-row select{box-sizing:border-box;width:100%;font-size:16px!important}
 .modal .quote-row .field{min-width:0}
 .modal :is(input,textarea,select){scroll-margin-bottom:140px}
 .scanner-window{max-width:100%;max-height:var(--vf-visible-height,100dvh)}
 .data-table td{min-width:0;overflow-wrap:anywhere}
 .table-wrap{max-width:100%;min-width:0}
}
@media(max-width:359px){
 .mobile-nav button{font-size:9px!important}
 .vf-compact-card,.quote-mobile-card{padding:10px!important}
 .metric-grid{gap:6px!important}
 .metric{padding:9px!important}
 .modal .modal-footer{gap:6px}
}
@media(min-width:761px) and (max-width:1050px){
 .sidebar{width:auto;min-width:0}
 .page{padding-inline:clamp(18px,3vw,32px)}
 .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .content-grid{grid-template-columns:minmax(0,1fr)}
 .table-wrap{max-width:100%}
}
@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto!important}
 .btn,.mini-btn,.nav-item,.vf-detail-trigger{transition:none!important}
}

/* 9.6: optional per-item identifiers, comfortably editable on phones. */
.vf-item-ids{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;grid-column:1/-1;width:100%;min-width:0}
.vf-item-ids .field{min-width:0}.vf-item-ids input{width:100%;min-width:0}
@media(max-width:640px){.vf-item-ids{grid-template-columns:1fr;gap:8px}.vf-item-ids .field label{font-size:12px}}

/* v9.7: cartões de venda compactos; IMEI apenas em Ver detalhes */
.vf-sale-detail-product .vf-sale-item-main{min-width:0;flex:1}
.vf-sale-detail-product .vf-sale-item-total{white-space:nowrap;font-size:12px;font-weight:800;color:#174c60}
.vf-sale-item-meta{font-size:11px;color:#64768f;margin-top:3px}
.vf-sale-identifier{margin-top:8px;border:1px solid #dcebf2;border-radius:9px;padding:7px 9px;background:#f3f9fb;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.vf-sale-identifier span{font-size:10px;font-weight:700;color:#4b7187;white-space:nowrap}
.vf-sale-identifier strong{font-size:12px;font-weight:800;color:#0b5871;overflow-wrap:anywhere;word-break:break-word;text-align:right;min-width:0}
@media(max-width:600px){
 .vf-sale-detail-content .sale-detail-header{padding:10px 12px;margin-bottom:9px;gap:3px;border-radius:11px}
 .vf-sale-detail-content .sale-detail-header strong{font-size:14px}
 .vf-sale-detail-content .sale-detail-list{gap:7px;margin-bottom:10px;max-height:none;overflow:visible}
 .vf-sale-detail-content .sale-detail-item{padding:10px 11px;gap:8px;flex-wrap:nowrap;border-radius:11px}
 .vf-sale-detail-content .sale-detail-item strong{font-size:12px}
 .vf-sale-detail-content .vf-sale-item-total{font-size:12px}
 .vf-sale-detail-content .vf-sale-identifier{display:block;margin-top:6px;padding:6px 8px}
 .vf-sale-detail-content .vf-sale-identifier span{display:block;margin-bottom:2px}
 .vf-sale-detail-content .vf-sale-identifier strong{display:block;text-align:left;font-size:12px;line-height:1.4}
 .vf-sale-detail-content .total-preview{padding:10px 12px}
}
