:root{--orange:#f58216;--orange-dark:#d65b00;--black:#17191c;--bg:#f5f6f8;--line:#e4e6ea;--muted:#727780}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:#24272c}a{color:var(--orange-dark);text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.top{background:var(--black);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px max(22px,calc((100vw - 1180px)/2));flex-wrap:wrap}.brand{color:white;display:flex;align-items:center;gap:12px;font-size:19px;font-weight:800;letter-spacing:.3px}.brand b{color:var(--orange)}.brand small{display:block;color:#aeb1b7;font-size:11px;letter-spacing:1px;text-transform:uppercase;margin-top:3px}.brand-mark,.logo-circle{display:grid;place-items:center;background:var(--orange);color:#151515;font-weight:900;border-radius:14px}.brand-mark{width:42px;height:42px;font-size:26px}.top nav{display:flex;gap:19px;align-items:center;flex-wrap:wrap}.top nav a,.nav-exit{color:#f1f1f1;font-size:13px}.nav-exit{background:transparent;border:0;padding:0}.top nav a:hover,.nav-exit:hover{color:var(--orange)}main{max-width:1180px;margin:0 auto;padding:30px 20px 70px;min-height:calc(100vh - 125px)}footer{text-align:center;color:#9b9da4;font-size:12px;padding:16px}.heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px;flex-wrap:wrap}h1{font-size:26px;letter-spacing:-.6px;margin:0 0 5px}h2{font-size:18px;margin:0 0 20px}.muted,.meta{color:var(--muted);font-size:13px}.muted{margin:4px 0 0}.meta{margin:7px 0;line-height:1.5}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn{display:inline-flex;justify-content:center;align-items:center;border-radius:9px;padding:10px 14px;font-weight:700;font-size:12px;white-space:nowrap;border:1px solid transparent;transition:.15s}.btn:hover{filter:brightness(.95)}.primary{background:var(--orange);color:#161616}.dark{background:var(--black);color:white}.outline{background:white;color:#32353a;border-color:#d6d9df}.subtle{background:#eceef2;color:#40454c}.danger{background:#fff1f0;color:#b32828;border-color:#f7d7d5}.wide{width:100%;padding:13px}.panel{background:white;border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 20px rgba(20,20,20,.025)}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat{background:white;border:1px solid var(--line);border-radius:13px;padding:18px 20px}.stat span{color:var(--muted);font-size:12px}.stat strong{display:block;font-size:29px;margin-top:7px;color:var(--black)}.filters{display:grid;grid-template-columns:2fr repeat(3,1fr) auto auto;gap:9px;padding:15px;margin-bottom:18px}input,select,textarea{width:100%;border:1px solid #d8dbe1;background:#fff;border-radius:9px;padding:11px 12px;outline:none;color:#24272c;min-width:0}input:focus,select:focus,textarea:focus{border-color:var(--orange);box-shadow:0 0 0 3px #f5821622}.product-list{display:grid;gap:11px}.product{padding:14px;display:flex;align-items:center;gap:15px}.product-image{width:72px;height:72px;flex-shrink:0;border-radius:10px;background:#f5f5f5;display:grid;place-items:center;font-size:27px;overflow:hidden}.product-image img{width:100%;height:100%;object-fit:cover}.product-info{flex:1;min-width:180px}.product-title{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.product-title h3{font-size:15px;margin:0}.pill{font-size:10px;font-weight:800;border-radius:30px;padding:5px 9px}.pill.pending{background:#fff0dc;color:#b75e00}.pill.done{background:#e3f5e8;color:#237b40}.product-actions{display:flex;gap:7px;flex-wrap:wrap}.form-card{padding:24px;margin-bottom:18px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:17px}.form-grid .span2{grid-column:span 2}label{display:block;font-size:12px;font-weight:700;color:#474b52}label input,label select,label textarea{margin-top:7px;font-weight:400}.form-grid small{display:block;margin-top:5px}.checks{display:flex;flex-wrap:wrap;gap:24px;margin:22px 0}.check{display:flex;align-items:center;gap:8px;font-weight:500}.check input{width:17px;height:17px;accent-color:var(--orange);margin:0}.list-panel{padding:10px 20px}.list-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}.list-row:last-child{border:0}.list-row small{color:var(--muted)}.inline-form{display:flex;gap:10px}.narrow{max-width:540px}.narrow label{margin-bottom:16px}.empty{text-align:center;padding:45px;color:var(--muted)}.flash{padding:12px 16px;margin-bottom:16px;border-radius:9px;background:#fff4dc;color:#925200}.flash.error{background:#fff0ee;color:#a72a22}.flash.success{background:#e5f6e8;color:#206a32}.auth-main{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 60px)}.login-card{width:100%;max-width:390px;background:white;border:1px solid var(--line);border-radius:20px;padding:35px;box-shadow:0 16px 45px #1a1a1a0d;text-align:center}.logo-circle{width:66px;height:66px;font-size:43px;margin:0 auto 18px;border-radius:19px}.login-card h1{font-size:25px}.login-card h1 span{color:var(--orange-dark)}.login-card form{margin-top:28px;text-align:left}.login-card label{margin-bottom:17px}.login-card .check{margin-bottom:23px}.auth-note{font-size:11px;color:#a3a5ab;margin-top:24px}@media(max-width:850px){.filters{grid-template-columns:repeat(2,1fr)}.filters input{grid-column:span 2}.stats{grid-template-columns:repeat(2,1fr)}.product{flex-wrap:wrap}.product-actions{width:100%}}@media(max-width:560px){main{padding:20px 13px 60px}.top{padding:15px}.top nav{gap:12px}.heading .actions{width:100%}.filters{grid-template-columns:1fr}.filters input{grid-column:span 1}.form-grid{grid-template-columns:1fr}.form-grid .span2{grid-column:span 1}.product-image{width:56px;height:56px}.stat{padding:14px}.stat strong{font-size:24px}.form-card{padding:17px}.login-card{padding:26px}.list-row{align-items:flex-start;flex-direction:column}}

/* Mobile-first app polish */
:root{--orange:#f58216;--orange-dark:#d96508;--black:#17191c;--bg:#f4f5f7;--line:#e6e8ec;--muted:#747984}
body{background:linear-gradient(180deg,#f8f8f9 0,#f3f4f6 240px);padding-bottom:env(safe-area-inset-bottom)}
.top{position:sticky;top:0;z-index:20;box-shadow:0 6px 20px #11111112}
main{padding-top:28px}
.eyebrow{display:block;font-size:10px;font-weight:900;letter-spacing:1.6px;color:#d96508;margin-bottom:7px}
.heading{align-items:flex-end}
.heading h1{font-size:clamp(25px,4vw,34px);letter-spacing:-1px}
.stats{gap:12px}
.stat{position:relative;overflow:hidden;padding:18px 19px;box-shadow:0 4px 18px #10182805}
.stat:after{content:"";position:absolute;right:-18px;top:-18px;width:70px;height:70px;border-radius:50%;background:#f5821610}
.stat strong{letter-spacing:-1px}
.stat small{display:block;color:#9a9da5;font-size:11px;margin-top:3px}
.purchase-hero{display:flex;align-items:center;gap:14px;background:linear-gradient(120deg,#202226,#303238);border-radius:16px;padding:18px 20px;color:white;margin:0 0 20px;box-shadow:0 10px 26px #11111114}
.hero-icon{width:44px;height:44px;display:grid;place-items:center;background:var(--orange);color:#17191c;border-radius:13px;font-size:24px;font-weight:900;flex-shrink:0}
.purchase-hero span:nth-child(2){flex:1}
.purchase-hero b{display:block;font-size:15px}
.purchase-hero small{display:block;color:#c7c8cb;font-size:12px;margin-top:4px;line-height:1.4}
.hero-arrow{font-size:23px;color:var(--orange);font-weight:800}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:25px 0 12px}
.section-title h2{margin:0;font-size:18px}
.section-title p{margin:5px 0 0}
.section-title>a{font-size:12px;font-weight:800}
.filters{box-shadow:0 4px 20px #10182804}
.product{box-shadow:0 4px 18px #10182804;transition:transform .15s,border-color .15s}
.product:hover{border-color:#f0c89f}
.product-actions .btn{padding:9px 11px}
.stock-tag,.no-stock{font-size:11px;font-weight:800;border-radius:5px;padding:3px 6px;background:#e6f6eb;color:#247a42}
.no-stock{background:#fff0e8;color:#a64a10}
.hidden{display:none!important}
.stock-panel{background:#f8f8f9;border:1px solid var(--line);border-radius:12px;padding:16px;margin-top:20px}
.stock-panel .check{display:flex;align-items:center;gap:9px}
#stock-quantity-wrap{max-width:360px;margin:15px 0 0 26px}
.check input,.buy-check input{accent-color:var(--orange)}
.store-picker{padding:19px;margin-bottom:22px}
.store-select-form{max-width:650px}
.store-select-form label{font-size:14px}
.store-select-form select{margin-top:9px;padding:14px;font-size:15px}
.count-chip{font-size:11px;font-weight:800;background:#fff0df;color:#a95000;padding:7px 10px;border-radius:20px;white-space:nowrap}
.purchase-items{display:grid;gap:10px}
.purchase-item{display:grid;grid-template-columns:34px minmax(0,1fr) minmax(210px, .9fr);align-items:center;gap:13px;padding:15px;transition:border-color .15s,background .15s}
.purchase-item.selected{border-color:#f58216;background:#fffaf4}
.buy-check{display:flex;align-items:center;justify-content:center;cursor:pointer}
.buy-check input{position:absolute;opacity:0;width:1px;height:1px}
.check-visual{display:grid;place-items:center;width:28px;height:28px;border:2px solid #d7d9df;border-radius:9px;color:transparent;font-weight:900;background:white}
.buy-check input:checked+.check-visual{background:var(--orange);border-color:var(--orange);color:#17191c}
.purchase-product{min-width:0}
.purchase-product b{display:block;font-size:14px;line-height:1.4}
.purchase-product small{display:block;color:var(--muted);font-size:11px;margin-top:5px;line-height:1.4}
.purchase-product .last-price{color:#a65300;font-weight:800}
.purchase-fields{display:grid;grid-template-columns:.7fr 1fr;gap:8px}
.purchase-fields label{font-size:10px}
.purchase-fields input{margin-top:5px;padding:10px 9px;font-size:13px}
.extra-product{padding:22px;margin-top:18px;display:grid;gap:18px}
.extra-product h2{margin:3px 0 6px}
.extra-product .muted{margin-bottom:0;line-height:1.5}
.extra-product label{font-size:12px}
.purchase-submit{position:relative;bottom:auto;z-index:2;margin-top:18px;background:#ffffffed;backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:15px;padding:13px;box-shadow:0 10px 32px #11111114}
.purchase-submit p{margin:0 0 10px;font-size:11px;color:var(--muted);text-align:center}
.purchase-submit .btn{font-size:14px;padding:14px;width:100%;display:flex;align-items:center;justify-content:center;min-height:48px;white-space:normal;text-align:center}
.choose-store{padding:50px 20px}
.choose-store>span{font-size:35px}
.choose-store h2{margin:10px 0}
.purchase-total{padding:22px;margin-bottom:14px;display:flex;flex-direction:column;gap:4px;border-left:4px solid var(--orange)}
.purchase-total span,.purchase-total small{font-size:12px;color:var(--muted)}
.purchase-total strong{font-size:32px;letter-spacing:-1px}
.note-panel{padding:16px;margin-top:14px;font-size:13px}
.note-panel p{margin-bottom:0;color:var(--muted)}
.page-actions{margin-top:18px}
.history-search{grid-template-columns:minmax(0,1fr) auto auto}
.history-list{display:grid;gap:10px}
.history-card{display:flex;align-items:center;gap:13px;padding:15px;color:inherit;transition:border-color .15s}
.history-card:hover{border-color:#f58216}
.history-icon{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:#fff0df;color:#a95000;font-size:20px;flex-shrink:0}
.history-main{flex:1;min-width:0}
.history-main b{display:block;font-size:13px}
.history-main small{display:block;color:var(--muted);font-size:11px;margin-top:5px}
.history-card>strong{font-size:14px;white-space:nowrap}
.price-section{margin-top:28px}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;min-width:720px;font-size:12px}
th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:#777b84;background:#f8f8f9}
tr:last-child td{border-bottom:0}
.price-up{color:#b33b2e;font-weight:800}.price-down{color:#21804b;font-weight:800}.price-same{color:#777}
.money-stat{font-size:clamp(17px,2.4vw,27px)!important;letter-spacing:-.5px!important}
.mobile-nav{display:none}
footer{padding-bottom:20px}
@media(max-width:850px){.purchase-item{grid-template-columns:30px minmax(0,1fr);gap:11px}.purchase-fields{grid-column:2;grid-template-columns:1fr 1fr}.purchase-fields input{font-size:16px}.product-actions{gap:6px}.product-actions .btn{font-size:11px}}
@media(max-width:600px){
 body{padding-bottom:calc(74px + env(safe-area-inset-bottom))}
 .top{padding:12px 15px;gap:12px}
 .brand{font-size:16px;gap:9px}.brand-mark{width:38px;height:38px;border-radius:12px}
 .top nav{display:none}
 main{padding:20px 13px 35px;min-height:calc(100vh - 115px)}
 .heading{align-items:flex-start;margin-bottom:17px}
 .heading .actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .heading .actions .btn{width:100%;padding:12px 8px}
 .stats{gap:9px}.stat{padding:13px 14px;border-radius:12px}.stat strong{font-size:25px}.stat span{font-size:11px}
 .purchase-hero{padding:15px;gap:11px;border-radius:14px}.purchase-hero b{font-size:13px}.purchase-hero small{font-size:11px}.hero-icon{width:40px;height:40px}
 .filters{padding:11px;gap:8px}
 .product{display:grid;grid-template-columns:52px minmax(0,1fr);gap:11px;padding:12px;border-radius:13px}
 .product-image{width:52px;height:52px}.product-info{min-width:0}.product-title h3{font-size:14px}
 .product-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr 1fr;width:100%}
 .product-actions form{min-width:0}.product-actions .btn{width:100%;padding:10px 5px;white-space:normal;font-size:10px}
 .form-card{padding:16px}.form-grid{gap:14px}.checks{gap:15px;flex-direction:column}
 .store-picker{padding:15px}.purchase-item{padding:12px;grid-template-columns:28px minmax(0,1fr);gap:9px}
 .purchase-fields{gap:7px}.purchase-fields label{font-size:10px}.purchase-fields input{padding:11px 8px}
 .extra-product{padding:15px}.purchase-submit{position:relative;bottom:auto;margin-bottom:18px;padding:12px}
 .purchase-submit .btn{font-size:12px}
 .history-card{gap:9px;padding:12px}.history-icon{width:34px;height:34px}.history-main b{font-size:12px}.history-card>strong{font-size:12px}
 .history-search{grid-template-columns:1fr auto auto}
 .mobile-nav{display:flex;position:fixed;z-index:30;bottom:0;left:0;right:0;justify-content:space-around;gap:4px;padding:8px 6px calc(8px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -6px 25px #11111112;border-top:1px solid #e7e8eb}
 .mobile-nav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;font-weight:800;color:#777b84;padding:3px}
 .mobile-nav a span{font-size:20px;color:#27292d;line-height:1.1}
 .mobile-nav a.active{color:#b95500;background:#fff2e2;border:1px solid #f5d5ad;border-radius:13px}
 .mobile-nav a .nav-icon{display:grid;place-items:center;width:24px;height:24px;color:currentColor}
 .mobile-nav a .nav-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .mobile-nav a:not(.active){background:transparent;border-color:transparent;color:#777b84}
 .top-brand-group{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0}
 .mobile-header-action{display:none;align-items:center;justify-content:center;white-space:nowrap;text-decoration:none;border:1px solid #f4c58d;background:#fff3e3;color:#a94e00;font-size:12px;font-weight:850;border-radius:11px;padding:9px 11px;min-height:36px}
 .mobile-header-action:active{transform:scale(.97)}
 .top .brand{min-width:0}

 footer{font-size:10px;padding:10px 8px 14px}
 .page-actions .btn{width:100%}.page-actions{display:grid}
}

/* Editor de produto simplificado: foco no uso com uma mão no celular */
.product-editor{max-width:760px;margin:0 auto 28px;padding:0 20px 20px;border-radius:20px;overflow:hidden}
.product-form-heading{max-width:760px;margin:0 auto 18px}
.editor-section{padding:22px 0;border-bottom:1px solid var(--line)}
.editor-section:last-of-type{border-bottom:0}
.editor-section-title{display:flex;align-items:center;gap:12px;margin-bottom:17px}
.editor-section-title h2{margin:0;font-size:16px;letter-spacing:-.2px}
.editor-section-title p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.4}
.editor-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#fff0df;font-size:20px;flex-shrink:0}
.field-full{display:block;margin-bottom:14px}
.compact-grid{gap:13px}
.optional{font-weight:400;color:var(--muted)}
.store-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.store-check{display:flex;align-items:center;gap:10px;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer;min-width:0}
.store-check input{position:absolute;opacity:0;width:1px;height:1px}
.store-check-mark{width:22px;height:22px;border:1.5px solid #d1d4da;border-radius:7px;display:grid;place-items:center;color:transparent;font-size:13px;flex-shrink:0}
.store-check input:checked+.store-check-mark{background:var(--orange);border-color:var(--orange);color:#17191c}
.store-check:has(input:checked){border-color:#f4a85e;background:#fff9f2}
.store-check>span:last-child{font-size:13px;overflow-wrap:anywhere}
.secondary-link{display:inline-flex;margin-top:12px;font-size:12px;font-weight:800}
.empty-inline{font-size:13px;color:var(--muted)}
.stock-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.choice-card{position:relative;display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:14px 11px;background:white;cursor:pointer}
.choice-card input{position:absolute;opacity:0}
.choice-card>span{width:23px;height:23px;border:1.5px solid #d1d4da;border-radius:50%;display:grid;place-items:center;font-size:12px;color:transparent;flex-shrink:0}
.choice-card:has(input:checked){border-color:var(--orange);background:#fff8f0}
.choice-card input:checked+span{background:var(--orange);border-color:var(--orange);color:#17191c}
.choice-card b{font-size:12px;line-height:1.3}
.stock-quantity-wrap{max-width:280px;margin-top:14px}
.request-toggle{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:13px;background:#fff;cursor:pointer}
.request-toggle input{width:19px;height:19px;accent-color:var(--orange);flex-shrink:0}
.request-toggle span{font-size:13px}
#requester-fields{margin-top:14px}
.photo-preview-wrap{display:flex;align-items:center;gap:15px;margin-bottom:13px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fafafa}
.photo-preview{width:100px;height:100px;object-fit:contain;background:white;border:1px solid var(--line);border-radius:10px}
.photo-preview-actions{display:flex;flex-direction:column;align-items:flex-start;gap:9px;font-size:12px;color:var(--muted)}
.small-btn{padding:8px 10px;font-size:11px}
.photo-input-label{display:flex;align-items:center;gap:13px;padding:15px;border:1px dashed #d8a36e;border-radius:14px;background:#fffaf4;cursor:pointer}
.photo-camera{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#ffe9d0;font-size:22px;flex-shrink:0}
.photo-input-label>span:nth-child(2){flex:1;min-width:0}
.photo-input-label b,.photo-input-label small{display:block}
.photo-input-label b{font-size:13px}
.photo-input-label small{font-size:11px;color:var(--muted);margin-top:4px}
.photo-input-label input{max-width:145px;font-size:11px}
.editor-actions{display:grid;grid-template-columns:1fr auto;gap:10px;padding-top:18px}
.editor-actions .wide{min-width:120px}
@media(max-width:600px){.product-editor{padding:0 15px 16px;border-radius:17px}.editor-section{padding:19px 0}.editor-section-title{margin-bottom:14px}.store-check-grid{grid-template-columns:1fr}.store-check{padding:12px}.stock-choice{gap:8px}.choice-card{padding:12px 9px}.choice-card b{font-size:11px}.photo-input-label{align-items:flex-start;flex-wrap:wrap}.photo-input-label input{width:100%;max-width:none;margin-left:56px}.photo-preview{width:84px;height:84px}.editor-actions{grid-template-columns:1fr}.editor-actions .wide{width:100%;padding:14px}.product-form-heading{align-items:center}.product-form-heading .btn{white-space:nowrap}}
.purchased-location{color:#247a42!important;background:#eaf7ed;border-radius:8px;padding:7px 9px;display:inline-block}
.photo-actions-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.photo-actions-grid .photo-input-label{align-items:center;flex-wrap:wrap;min-width:0}
.photo-actions-grid .photo-input-label input{width:100%;max-width:100%;margin:2px 0 0;font-size:11px}
.photo-limit{display:block;color:var(--muted);font-size:11px;margin-top:8px}
@media(max-width:600px){.photo-actions-grid{grid-template-columns:1fr}.photo-actions-grid .photo-input-label{display:grid;grid-template-columns:43px minmax(0,1fr);gap:10px}.photo-actions-grid .photo-input-label input{grid-column:1/-1}}


/* Ajustes de usabilidade: compra presencial, galeria, relatórios e usuários */
.purchase-product{display:flex;align-items:center;gap:12px;min-width:0}
.purchase-product-copy{min-width:0;display:flex;flex-direction:column;gap:5px}
.purchase-photo-button{border:0;background:#fff5e9;padding:5px;border-radius:14px;display:flex;flex-direction:column;align-items:center;gap:3px;flex:0 0 76px;cursor:pointer;color:#b65c00;font-size:11px;font-weight:700}
.purchase-photo-button img{width:64px;height:64px;object-fit:cover;border-radius:10px}
.purchase-no-photo{display:grid;place-items:center;flex:0 0 64px;height:64px;border-radius:14px;background:#f4f4f4;font-size:26px}
.service-panel{margin:14px 0 22px;padding:20px}
.attendant-wrap{margin-top:12px;max-width:420px}
.attendant-wrap.hidden,.hidden{display:none!important}
.photo-modal{position:fixed;inset:0;z-index:1000;background:rgba(12,14,18,.78);display:flex;align-items:center;justify-content:center;padding:18px}
.photo-modal-content{background:#fff;border-radius:22px;padding:20px;max-width:780px;width:100%;max-height:85vh;overflow:auto}
.photo-modal-content h2{margin:0 0 16px}
.photo-modal-close{position:absolute;right:18px;top:12px;border:0;border-radius:50%;width:42px;height:42px;background:#fff;color:#222;font-size:30px;cursor:pointer}
.photo-modal-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.photo-modal-images img{width:100%;max-height:65vh;object-fit:contain;border-radius:14px;background:#f5f5f5}
body.modal-open{overflow:hidden}
.suggestion-list{display:grid;gap:6px;margin:8px 0 14px}
.suggestion-item{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;padding:12px 14px;border:1px solid #e9e9e9;background:#fff;border-radius:12px;cursor:pointer}
.suggestion-item b{font-size:14px}.suggestion-item small{color:#6c7278;text-align:right}
.price-compare{border:1px solid #f3d6b7;background:#fff8f0;padding:14px 16px;border-radius:14px;margin:10px 0 16px}
.price-compare strong{display:block;font-size:18px;margin:4px 0;color:#b65c00}
.price-compare p{margin:4px 0;font-size:13px}.compare-label{font-size:12px;color:#6d6258}
.compare-bars{display:flex;flex-direction:column;gap:5px;margin:8px 0}
.compare-bars span{display:block;height:8px;background:#f08b2c;border-radius:10px;max-width:100%}
.extra-photo-preview img{width:96px;height:96px;object-fit:cover;border-radius:14px;margin-top:10px}
.saved-photo-gallery{margin-top:16px}.saved-photo-grid{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px}
.saved-photo-item{border:1px solid #e5e5e5;padding:8px;border-radius:14px;display:flex;flex-direction:column;gap:8px}
.saved-photo-item img{width:90px;height:90px;object-fit:cover;border-radius:9px}
.small-btn{padding:7px 10px;font-size:12px}
.bulk-products-panel{border:1px solid #e9e9e9;border-radius:14px;padding:14px 16px;margin:0 0 14px;background:#fff}
.bulk-products-panel summary{cursor:pointer;font-weight:750;color:#bd650c}
.bulk-products-panel form{display:grid;gap:12px;margin-top:14px}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.user-management{margin-top:18px}
.user-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(260px,2fr) auto;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid #eee}
.user-reset-form{display:flex;align-items:end;gap:10px}.user-reset-form label{flex:1}
.report-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;margin:18px 0 26px}
.report-panel{padding:18px;min-width:0}
.monthly-chart{display:flex;align-items:stretch;gap:12px;min-height:190px;padding:12px 0 0;overflow-x:auto}
.month-bar{flex:1;min-width:52px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px}
.bar-value{font-size:10px;color:#727272;white-space:nowrap}
.bar-track{height:130px;width:100%;display:flex;align-items:flex-end;justify-content:center;background:#f7f7f7;border-radius:9px 9px 3px 3px;overflow:hidden}
.bar-track span{display:block;width:70%;min-height:3px;background:linear-gradient(0deg,#e96f00,#ffb45f);border-radius:8px 8px 0 0}
.month-bar small{font-size:10px;color:#777}
.top-product-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #eee}
.top-product-row div{display:flex;flex-direction:column;gap:4px;min-width:0}.top-product-row small{color:#777;font-size:12px}
.top-product-row strong{white-space:nowrap;font-size:13px}
@media(max-width:720px){
 .settings-grid,.report-grid{grid-template-columns:1fr}
 .user-row{grid-template-columns:1fr;gap:10px}
 .user-reset-form{align-items:stretch;flex-direction:column}
 .purchase-product{align-items:flex-start}
 .purchase-photo-button{flex-basis:70px}
 .purchase-photo-button img{width:58px;height:58px}
 .purchase-fields{grid-template-columns:1fr 1fr}
 .purchase-heading{align-items:flex-start}
 .purchase-heading .btn{font-size:12px;padding:10px}
 .suggestion-item{align-items:flex-start;flex-direction:column;gap:5px}
 .suggestion-item small{text-align:left}
 .photo-modal-content{padding:16px}
}

/* Cadastro por loja: interface compacta, alinhada e responsiva */
.store-editor{padding:24px;margin-bottom:22px}
.store-editor-head{display:flex;align-items:center;gap:13px;margin-bottom:22px}
.store-editor-head h2{margin:0 0 5px}
.store-editor-head p{margin:0;color:var(--muted);font-size:13px}
.store-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.store-form-grid small{display:block;color:var(--muted);font-weight:400;line-height:1.4;margin-top:7px}
.store-notes-field{grid-column:1/-1}
.store-form-actions{margin-top:20px}
.store-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.store-card{padding:20px;min-width:0}
.store-card-top{display:flex;align-items:center;gap:12px}
.store-avatar{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#fff0df;font-size:21px;flex-shrink:0}
.store-card-title{min-width:0;flex:1}
.store-card-title h2{margin:0 0 6px;font-size:17px;overflow-wrap:anywhere}
.store-category{display:inline-block;border-radius:20px;background:#f3f4f6;color:#666d76;padding:5px 9px;font-size:11px}
.store-product-count{font-size:11px;color:#8a5a24;background:#fff5e9;padding:7px 9px;border-radius:10px;white-space:nowrap}
.store-card-info{padding:16px 0;color:#69707a;font-size:12px;display:flex;gap:8px;flex-wrap:wrap;line-height:1.5}
.store-card-info p{width:100%;margin:0}
.store-card-actions{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:15px}
.store-card-actions form{margin:0}
.store-card-actions .btn{font-size:11px;padding:9px 11px}
.bulk-entry-panel{padding:22px}
.bulk-store-select{padding:18px;background:#fff8f0;border:1px solid #ffe0be;border-radius:15px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:center}
.bulk-category-note{font-size:12px;color:#80562d;line-height:1.5;padding:10px 12px;background:#fff;border-radius:10px}
.bulk-items-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:24px 0 14px}
.bulk-items-heading h2{margin:0 0 5px}
.bulk-rows{display:grid;gap:12px}
.bulk-product-row{display:grid;grid-template-columns:34px minmax(0,1fr) 36px;align-items:start;gap:12px;padding:16px;border:1px solid var(--line);border-radius:15px;background:#fff}
.bulk-row-number{height:32px;width:32px;display:grid;place-items:center;background:#fff0df;color:#b65c00;border-radius:10px;font-weight:800}
.bulk-row-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(120px,.7fr);gap:14px;align-items:start}
.bulk-row-fields>label{min-width:0}
.bulk-remove{border:0;border-radius:10px;background:#fff0ef;color:#b42318;font-size:23px;height:34px;line-height:1}
.bulk-suggestions{grid-column:1/-1;display:grid;gap:6px;margin-top:-6px}
.bulk-suggestion{display:flex;justify-content:space-between;gap:10px;text-align:left;border:1px solid #f1d8bd;background:#fffaf5;padding:10px 12px;border-radius:10px}
.bulk-suggestion b{font-size:12px}.bulk-suggestion small{font-size:11px;color:#737780}
.bulk-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;border-top:1px solid var(--line);padding-top:18px;margin-top:22px}
.extra-details{gap:22px 18px;margin-top:22px}
.extra-details>label{min-width:0}
.extra-details .span2{margin-top:2px}
.extra-photo-fields{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}
.extra-photo-fields .photo-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:12px}
.extra-photo-fields .photo-input-card{padding:16px;border:1px dashed #efb77e;border-radius:14px;background:#fffaf5;min-width:0}
@media(max-width:720px){
 .store-form-grid,.store-cards,.bulk-store-select{grid-template-columns:1fr}
 .store-editor{padding:17px}
 .store-card{padding:16px}
 .store-card-top{align-items:flex-start;flex-wrap:wrap}
 .store-product-count{margin-left:auto}
 .store-card-actions .btn{flex:1}
 .bulk-entry-panel{padding:15px}
 .bulk-items-heading{align-items:flex-start;flex-direction:column}
 .bulk-items-heading .btn{width:100%}
 .bulk-product-row{grid-template-columns:28px minmax(0,1fr) 30px;padding:11px;gap:8px}
 .bulk-row-number{width:28px;height:28px}
 .bulk-row-fields{grid-template-columns:1fr;gap:12px}
 .bulk-suggestions{grid-column:1}
 .bulk-footer{align-items:stretch;flex-direction:column}
 .bulk-footer .actions{display:grid;grid-template-columns:1fr 1fr}
 .extra-details{gap:20px;margin-top:24px}
 .extra-details .span2{grid-column:1/-1}
 .extra-photo-fields .photo-input-grid{grid-template-columns:1fr}
}


/* Sugestões para reutilizar produtos no cadastro individual */
.product-suggestions {
  display: grid;
  gap: 7px;
  margin: 8px 0 12px;
  padding: 8px;
  border: 1px solid #f2c28f;
  border-radius: 14px;
  background: #fffaf4;
}
.product-suggestion-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #f0e3d4;
  border-radius: 10px;
  background: #fff;
  color: #253044;
  text-align: left;
  cursor: pointer;
}
.product-suggestion-option:hover,
.product-suggestion-option:focus-visible {
  border-color: #f58216;
  outline: 2px solid #ffe0bf;
}
.suggestion-main { display: grid; gap: 4px; min-width: 0; }
.suggestion-main strong { overflow-wrap: anywhere; }
.suggestion-main small { color: #667085; font-size: .82rem; }
.suggestion-meta {
  flex: 0 0 auto;
  max-width: 48%;
  color: #8a4b08;
  font-size: .8rem;
  font-weight: 650;
  text-align: right;
}
.reuse-pending-warning {
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px solid #f2c078;
  border-radius: 12px;
  background: #fff5e6;
  color: #814b08;
  font-size: .9rem;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .product-suggestion-option { align-items: flex-start; flex-direction: column; gap: 6px; }
  .suggestion-meta { max-width: none; text-align: left; }
}

.bulk-pending-warning {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #f2c078;
  border-radius: 10px;
  background: #fff5e6;
  color: #814b08;
  font-size: .86rem;
  line-height: 1.45;
}


/* Painel principal: visual de aplicativo e leitura rápida */
.home-welcome{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px;padding:5px 2px}
.home-welcome h1{font-size:clamp(27px,4vw,35px);margin:7px 0 6px;letter-spacing:-1px}
.home-welcome p{margin:0;color:var(--muted);font-size:14px}
.home-add-btn{display:flex;align-items:center;gap:8px;white-space:nowrap;box-shadow:0 5px 14px #f5821628}
.home-add-btn span{font-size:19px;line-height:1}
.home-stats{gap:13px}
.home-stats .stat{position:relative;overflow:hidden;padding:17px 18px;border-radius:17px;box-shadow:0 3px 12px #1b25300a}
.home-stats .stat span{display:flex;align-items:center;gap:7px;font-weight:650;color:#606773}
.home-stats .stat span i{font-style:normal;display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:#fff0df;color:#b65b00;font-size:15px}
.home-stats .stat strong{font-size:30px;line-height:1.2}
.home-stats .stat small{display:block;margin-top:3px}
.home-stats .stat-pending span i{background:#fff2d9;color:#ad6800}
.home-stats .stat-ordered span i{background:#eaf1ff;color:#3868bd}
.home-stats .stat-done span i{background:#e3f8ed;color:#16824d}
.home-purchase-hero{display:flex;align-items:center;gap:15px;margin:0 0 22px;padding:19px 21px;border:1px solid #f6d1a8;border-radius:18px;background:linear-gradient(115deg,#fff8ef,#fff 72%);box-shadow:0 4px 15px #1b253008}
.home-purchase-hero .hero-icon{display:grid;place-items:center;width:50px;height:50px;flex:0 0 50px;border-radius:16px;background:#ffead4;font-size:24px}
.home-purchase-hero .hero-copy{display:grid;gap:5px;flex:1;min-width:0}
.home-purchase-hero .hero-copy b{font-size:16px;color:#282d35}
.home-purchase-hero .hero-copy small{font-size:12px;color:var(--muted);line-height:1.4}
.home-purchase-hero .hero-arrow{font-size:25px;color:var(--orange-dark)}
.home-filters{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(135px,1fr)) auto auto;align-items:center}
.home-search{display:flex;align-items:center;gap:8px;border:1px solid #d8dbe1;border-radius:10px;background:#fff;padding-left:12px;min-width:0}
.home-search span{font-size:23px;color:#8a9099}
.home-search input{border:0!important;outline:0;box-shadow:none!important;min-width:0}
.home-section-title{margin-top:26px;align-items:end}
.home-section-title h2{margin:0 0 4px}
.home-section-title p{margin:0;font-size:12px}
.home-section-title>a{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid var(--line);border-radius:11px;background:#fff;font-size:12px;font-weight:700}
.home-product-list{gap:12px}
.home-product-card{padding:16px;align-items:center;border-radius:17px;box-shadow:0 3px 12px #1b253007;transition:border-color .15s,transform .15s}
.home-product-card:hover{border-color:#f1c18f}
.home-product-image{width:76px;height:76px;border-radius:15px;background:#f7f7f8;color:#8a9099}
.home-product-image img{object-fit:contain}
.home-product-card .product-info{min-width:0}
.home-product-card .product-title{gap:8px}
.home-product-card .product-title h3{font-size:15px;overflow-wrap:anywhere}
.home-product-need{margin:8px 0 7px;font-size:12px;color:#333943}
.home-product-tags{display:flex;gap:7px;flex-wrap:wrap}
.home-product-tags span{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:8px;background:#f5f6f8;color:#626975;font-size:11px}
.home-requester{margin-top:8px!important}
.home-requester span{color:var(--muted)}
.home-order-tag{color:#3868bd!important}
.home-notes{overflow-wrap:anywhere}
.home-product-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;max-width:210px}
.home-product-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:4px}
.empty-icon{display:block;font-size:30px;margin-bottom:9px}
.empty h2{margin-bottom:6px}
.empty .btn{margin-top:10px}

/* Comparação do preço atual com a última compra */
.purchase-price-compare{grid-column:2/-1;display:flex;align-items:center;gap:10px;margin-top:-1px;padding:10px 12px;border:1px solid #dce3eb;border-radius:12px;background:#f7f9fc;color:#596273;min-width:0}
.purchase-price-compare .compare-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e9edf3;font-weight:800;flex:0 0 30px}
.purchase-price-compare>div{display:grid;gap:3px;min-width:0}
.purchase-price-compare b{font-size:12px;overflow-wrap:anywhere}
.purchase-price-compare small{font-size:11px;line-height:1.4;color:inherit;opacity:.85}
.purchase-price-compare.price-up,.price-compare.price-up{color:#b42318;border-color:#f2b8b5;background:#fff2f1}
.purchase-price-compare.price-up .compare-icon{background:#ffe0de}
.purchase-price-compare.price-down,.price-compare.price-down{color:#167647;border-color:#a9dfbf;background:#edfff3}
.purchase-price-compare.price-down .compare-icon{background:#d5f7e1}
.purchase-price-compare.price-same,.price-compare.price-same{color:#596273;border-color:#dce3eb;background:#f7f9fc}

/* Espaçamento e estabilidade dos campos de imagem */
.photo-actions-grid{gap:15px;margin-top:22px}
.photo-actions-grid .photo-input-label{min-width:0;align-content:start}
.photo-actions-grid input[type=file],input[type=file]{display:block;width:100%;min-width:0;max-width:100%;overflow:hidden;font-size:12px}
.product-editor .photo-limit{margin-top:12px;line-height:1.5}
.product-editor .editor-section:has(.photo-actions-grid){padding-bottom:25px}
.extra-details{row-gap:20px}
.purchase-extra-photos{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.extra-photo-preview{margin-top:14px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fafafa}
.extra-photo-preview img{display:block;max-width:100%;width:auto;height:auto;max-height:230px;object-fit:contain;border-radius:9px}
.product-editor .editor-actions button:disabled{opacity:.72;cursor:wait}
.product-editor .editor-actions{gap:12px}

/* Barra inferior móvel: atalhos com área de toque confortável */
.mobile-nav{z-index:50}
.mobile-nav a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;color:#777e89;font-size:10px;font-weight:650}
.mobile-nav a span{display:grid;place-items:center;width:30px;height:26px;border-radius:9px;font-size:19px;line-height:1}
.mobile-nav a.active{color:var(--orange-dark)}
.mobile-nav a.active span{background:#fff0df;color:var(--orange-dark)}
.mobile-nav .mobile-nav-buy{color:#fff;background:var(--orange);border-radius:15px;padding:7px 15px;transform:translateY(-10px);box-shadow:0 5px 14px #f5821640}
.mobile-nav .mobile-nav-buy span{background:transparent;color:#17191c;font-size:21px}
.mobile-nav .mobile-nav-buy small{color:#17191c}
.mobile-nav .mobile-nav-buy.active{background:#ff9a36}

@media(max-width:850px){
 .home-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home-search{grid-column:1/-1}
 .home-product-card{align-items:flex-start}
 .home-product-actions{max-width:none}
}
@media(max-width:600px){
 main{padding:20px 13px calc(95px + env(safe-area-inset-bottom))}
 .home-welcome{align-items:flex-start;gap:12px;margin-bottom:18px}
 .home-welcome .eyebrow{font-size:9px;letter-spacing:1px}
 .home-welcome h1{font-size:27px}
 .home-welcome p{font-size:12px;line-height:1.4;max-width:240px}
 .home-add-btn{padding:11px 12px;font-size:12px}
 .home-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:13px}
 .home-stats .stat{padding:13px;border-radius:14px}
 .home-stats .stat strong{font-size:26px}
 .home-stats .stat span{font-size:11px}
 .home-purchase-hero{gap:11px;padding:14px;border-radius:15px}
 .home-purchase-hero .hero-icon{width:43px;height:43px;flex-basis:43px;font-size:21px;border-radius:13px}
 .home-purchase-hero .hero-copy b{font-size:14px}
 .home-purchase-hero .hero-copy small{font-size:11px}
 .home-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;padding:12px}
 .home-filters select{min-width:0;font-size:12px;padding:10px 7px}
 .home-filters .btn{padding:10px 8px;font-size:12px}
 .home-section-title{align-items:flex-start;gap:10px;margin-top:22px}
 .home-section-title h2{font-size:18px}
 .home-section-title>a{font-size:11px;white-space:nowrap;padding:8px}
 .home-product-card{display:grid;grid-template-columns:58px minmax(0,1fr);gap:11px;padding:12px}
 .home-product-image{width:58px;height:58px;border-radius:12px}
 .home-product-card .product-info{min-width:0;width:100%}
 .home-product-card .product-title{align-items:flex-start}
 .home-product-card .product-title h3{font-size:14px;flex:1}
 .home-product-card .pill{flex-shrink:0}
 .home-product-need{margin-top:6px}
 .home-product-tags span{font-size:10px;padding:5px 6px;max-width:100%;overflow-wrap:anywhere}
 .home-product-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;padding-top:9px;border-top:1px solid var(--line)}
 .home-product-actions form{min-width:0}
 .home-product-actions .btn{width:100%;font-size:11px;padding:10px 7px}
 .purchase-price-compare{grid-column:1/-1;margin-top:0}
 .purchase-fields{grid-template-columns:1fr 1fr}
 .purchase-extra-photos{margin-top:24px;padding-top:18px}
 .extra-details{margin-top:20px}
 .mobile-nav{position:fixed;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:2px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e6e8ec;box-shadow:0 -8px 24px #18202a0c}
 .mobile-nav a{padding:3px 0}
 .mobile-nav .mobile-nav-buy{margin:0 auto;padding:7px 15px}
 .product-editor{padding:0 15px 17px}
 .editor-section{padding:19px 0}
 .photo-actions-grid{grid-template-columns:1fr;gap:12px;margin-top:23px}
 .photo-actions-grid .photo-input-label{display:grid;grid-template-columns:43px minmax(0,1fr);gap:9px;padding:13px}
 .photo-actions-grid .photo-input-label input{grid-column:1/-1;min-width:0}
 .photo-limit{margin-top:12px}
 .purchase-item{grid-template-columns:28px minmax(0,1fr);gap:9px}
 .purchase-item .purchase-price-compare{grid-column:1/-1}
}


/* Redesign da tela de compras: cartões, seletor de loja e ações rápidas */
.purchase-hero{align-items:center;gap:18px;margin-bottom:20px}
.purchase-hero h1{letter-spacing:-.035em}
.purchase-report-link{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border-radius:13px}
.purchase-report-link span{font-size:18px}
.purchase-store-picker{display:grid;grid-template-columns:minmax(0,1fr);gap:15px;padding:20px 22px;border:1px solid #e6e8ed;border-radius:20px;box-shadow:0 8px 24px rgba(20,25,35,.035)}
.picker-heading{display:flex;align-items:center;gap:12px}
.picker-heading>div{display:flex;flex-direction:column;gap:4px}
.picker-heading b{font-size:15px;color:#202630}
.picker-heading small{font-size:12px;color:var(--muted);line-height:1.4}
.picker-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:#fff0df;color:#c96300;font-size:24px;flex-shrink:0}
.purchase-store-picker .store-select-form{width:100%;max-width:100%}
.purchase-store-picker .store-select-form label,.purchase-store-picker .store-select-form select{width:100%;max-width:100%}
.purchase-store-picker select{min-height:49px;border-radius:13px;background-color:#fff}
.purchase-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:20px}
.purchase-item{position:relative;display:grid;grid-template-columns:26px minmax(0,1fr);align-items:start;gap:12px;padding:17px;border-radius:18px;border:1px solid #e6e8ed;box-shadow:0 5px 18px rgba(20,25,35,.025);transition:border-color .18s,box-shadow .18s}
.purchase-item.selected{border-color:#f58216;box-shadow:0 0 0 2px #f5821618}
.purchase-product{min-width:0;gap:12px}
.purchase-product-copy{min-width:0;overflow-wrap:anywhere}
.purchase-product-copy>b{font-size:15px;line-height:1.35}
.purchase-product-copy small{line-height:1.5}
.buy-check{padding-top:4px}
.purchase-fields{grid-column:2;gap:10px}
.purchase-fields label{min-width:0;font-size:11px;color:#687080;font-weight:700}
.purchase-fields input{width:100%;min-width:0;min-height:43px;border-radius:12px}
.purchase-price-compare{grid-column:2;padding:11px 12px;border-radius:12px;background:#f7f8fa;display:flex;gap:10px;align-items:center}
.purchase-price-compare small{line-height:1.4}
.purchase-submit{position:sticky;bottom:12px;z-index:20;margin:20px 0 12px;padding:12px;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border:1px solid #e7e9ee;border-radius:18px;box-shadow:0 8px 30px rgba(20,25,35,.10);text-align:center}
.purchase-submit p{font-size:12px;color:var(--muted);margin:0 0 9px}
.purchase-submit .btn{min-height:49px;border-radius:13px;font-weight:800}
.purchase-store-label{display:block;margin-top:7px;color:#737b88;line-height:1.45}
.quick-store-edit{grid-column:1/-1;margin-top:10px;border-top:1px solid #f0e5d9;padding-top:10px}
.quick-store-edit summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#b95e05;font-size:12px;font-weight:800;padding:5px 0}
.quick-store-edit summary::-webkit-details-marker{display:none}
.quick-store-edit summary:after{content:'＋';font-size:17px;line-height:1}
.quick-store-edit[open] summary:after{content:'−'}
.quick-store-panel{display:grid;gap:11px;padding:13px;margin-top:8px;background:#fffaf5;border:1px solid #ffdfbd;border-radius:14px}
.quick-store-panel label{display:grid;gap:6px;font-size:11px;font-weight:750;color:#525b68}
.quick-store-panel select,.quick-store-panel input{width:100%;min-width:0;min-height:42px;border-radius:11px;background:white}
.quick-store-new{padding-top:10px;border-top:1px dashed #f1c99e}
.quick-store-save{width:100%;min-height:42px;border-radius:11px}
.quick-store-save:disabled{opacity:.65}
.quick-store-feedback{min-height:15px;font-size:11px;line-height:1.4}
.success-text{color:#16834b}.error-text{color:#b42318}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:850px){.purchase-items{grid-template-columns:1fr}}
@media(max-width:600px){
 .purchase-hero{display:flex;align-items:flex-start;gap:10px;margin:3px 0 17px}
 .purchase-hero>div{min-width:0;flex:1}
 .purchase-hero h1{font-size:27px;line-height:1.12;margin:7px 0}
 .purchase-hero p{font-size:12px;line-height:1.45;margin:0}
 .purchase-report-link{font-size:0!important;padding:11px!important;min-width:44px;min-height:44px;justify-content:center;flex-shrink:0}
 .purchase-report-link span{font-size:20px}
 .purchase-store-picker{padding:15px;gap:12px;border-radius:17px}
 .picker-heading b{font-size:14px}
 .picker-heading small{font-size:11px}
 .picker-icon{width:40px;height:40px}
 .purchase-items{gap:11px}
 .purchase-item{grid-template-columns:25px minmax(0,1fr);gap:9px;padding:13px;border-radius:16px}
 .purchase-product{gap:9px}
 .purchase-product-copy>b{font-size:14px}
 .purchase-fields{grid-column:1/-1;grid-template-columns:1fr 1fr;margin-top:3px}
 .purchase-price-compare{grid-column:1/-1}
 .quick-store-edit{grid-column:1/-1}
 .quick-store-panel{padding:11px}
 .purchase-submit{bottom:calc(77px + env(safe-area-inset-bottom));margin:18px 0 10px;padding:10px;border-radius:15px}
 .purchase-submit p{font-size:10px}
 .purchase-submit .btn{width:100%;font-size:13px;min-height:47px}
 .purchase-form{padding-bottom:12px}
}

/* Ajustes da compra móvel e ação independente de adicionar produto */
.extra-product .form-grid{row-gap:18px;column-gap:16px}
.extra-product .form-grid label{display:flex;flex-direction:column;gap:8px;min-width:0}
.extra-product .form-grid label small{font-weight:400;line-height:1.45}
.purchase-extra-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:4px}
.purchase-extra-photos .photo-input-label{min-width:0;min-height:120px;padding:16px;gap:12px}
.extra-product-actions{display:grid;gap:8px;padding-top:4px}
.extra-product-actions .btn{width:100%;min-height:48px;display:flex;align-items:center;justify-content:center;text-align:center;white-space:normal;line-height:1.35}
.extra-product-actions small{font-size:12px;line-height:1.4}
.quick-store-panel{gap:12px}
.quick-store-panel label{display:grid;gap:8px}
.quick-store-panel input{width:100%;min-width:0;box-sizing:border-box}
.quick-store-panel .muted{font-size:11px;line-height:1.45}
.purchase-submit{margin-top:18px;margin-bottom:22px}
@media(max-width:600px){
 body{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
 .mobile-nav{min-height:62px;align-items:stretch;box-sizing:border-box;padding:7px 8px calc(8px + env(safe-area-inset-bottom));gap:5px}
 .mobile-nav a{min-width:0;justify-content:center;align-items:center;text-align:center;border-radius:12px;padding:6px 2px;gap:4px;line-height:1.1}
 .mobile-nav a span{display:grid;place-items:center;width:28px;height:25px;font-size:19px;line-height:1}
 .mobile-nav a small{font-size:10px;line-height:1.1;white-space:nowrap}
 .mobile-nav a.mobile-nav-buy{background:#fff0df;border:1px solid #ffd6a9;border-radius:13px;color:#b95300;box-shadow:0 3px 10px #ef7d1820}
 .mobile-nav a.mobile-nav-buy span{color:#b95300}
 .purchase-submit{position:relative;bottom:auto;margin:18px 0 25px;padding:12px;border-radius:15px}
 .purchase-submit .btn{font-size:14px;min-height:50px;padding:12px 14px}
 .purchase-form{padding-bottom:8px}
 .extra-product{padding:16px;gap:18px}
 .extra-product .form-grid{grid-template-columns:minmax(0,1fr);gap:16px}
 .extra-product .form-grid .span2{grid-column:1}
 .purchase-extra-photos{grid-template-columns:minmax(0,1fr);gap:12px}
 .purchase-extra-photos .photo-input-label{min-height:95px;padding:13px}
 .extra-product-actions .btn{font-size:13px}
 .quick-store-panel{padding:12px}
}


/* Polimento final: menu inferior consistente e sem botão flutuante desalinhado */
.mobile-nav{
  display:none;
}
@media(max-width:600px){
  body{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
  .mobile-nav{
    display:grid!important;
    position:fixed;left:0;right:0;bottom:0;z-index:100;
    grid-template-columns:repeat(4,minmax(0,1fr));
    align-items:stretch;justify-content:stretch;
    gap:5px;margin:0;
    padding:7px 10px calc(7px + env(safe-area-inset-bottom));
    min-height:64px;box-sizing:border-box;
    background:rgba(255,255,255,.97);
    border-top:1px solid #e6e8ec;
    box-shadow:0 -5px 22px rgba(22,29,39,.09);
    backdrop-filter:blur(14px);
  }
  .mobile-nav a,
  .mobile-nav a.mobile-nav-buy{
    position:static!important;transform:none!important;
    display:flex;flex:initial;flex-direction:column;
    align-items:center;justify-content:center;
    gap:4px;min-width:0;width:100%;min-height:48px;
    margin:0;padding:5px 2px!important;
    border:1px solid transparent;border-radius:13px;
    background:transparent;box-shadow:none;
    color:#6b7280;text-align:center;
    font-size:10px;font-weight:700;line-height:1.1;
  }
  .mobile-nav a .nav-icon{
    display:grid;place-items:center;
    width:27px;height:25px;background:transparent!important;
    color:currentColor!important;border-radius:0;
  }
  .mobile-nav a .nav-icon svg{
    display:block;width:22px;height:22px;
    fill:none;stroke:currentColor;stroke-width:1.8;
    stroke-linecap:round;stroke-linejoin:round;
  }
  .mobile-nav a small{display:block;margin:0;color:currentColor!important;font-size:10px;line-height:1.1;white-space:nowrap}
  .mobile-nav a.active{color:#d96508;background:#fff5ea;border-color:#ffdfbd}
  .mobile-nav a.mobile-nav-buy,
  .mobile-nav a.mobile-nav-buy.active{
    color:#b95300;background:#fff0df;border:1px solid #ffd3a1;
    box-shadow:0 2px 7px rgba(217,101,8,.12);
  }
  .mobile-nav a.mobile-nav-buy .nav-icon{color:#b95300!important}
  .purchase-submit{position:relative!important;inset:auto!important;z-index:1;margin:18px 0 24px!important}
  .purchase-form{padding-bottom:8px}
  .quick-store-edit{
    display:grid;grid-template-columns:minmax(0,1fr);gap:7px;
    min-width:0;width:100%;box-sizing:border-box;
    margin-top:11px;padding:11px 0 0;
    border-top:1px solid #f0e5d9;
  }
  .quick-store-label{font-size:11px;font-weight:800;color:#555e6b}
  .quick-store-row{display:grid;grid-template-columns:minmax(0,1fr) 76px;align-items:stretch;gap:8px;min-width:0}
  .quick-store-row input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;height:43px;padding:10px 11px;border:1px solid #d8dde5;border-radius:11px;background:#fff;font-size:14px}
  .quick-store-row .quick-store-save{width:76px;min-width:0;min-height:43px;height:43px;padding:8px 9px;border-radius:11px;white-space:nowrap;font-size:12px}
  .quick-store-hint,.quick-store-feedback{display:block;min-width:0;overflow-wrap:anywhere;font-size:11px;line-height:1.4;color:#747c89}
  .quick-store-hint.store-match{color:#16834b}
  .quick-store-hint.store-new{color:#b95e05}
  .purchase-item{min-width:0;overflow:hidden}
  .purchase-product,.purchase-product-copy{min-width:0}
  .purchase-product-copy{overflow-wrap:anywhere}
  .extra-product{overflow:hidden}
  .extra-product .form-grid{min-width:0}
  .photo-preview-wrap{flex-wrap:wrap}
}
@media(min-width:601px){
  .quick-store-edit{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
  .quick-store-row{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:9px;min-width:0}
  .quick-store-row input{width:100%;min-width:0;box-sizing:border-box}
  .quick-store-row .quick-store-save{min-width:92px}
}


/* Compra presencial: cartões compactos, seleção prioritária e modal de produto avulso */
.purchase-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}
.purchase-item{grid-template-columns:25px minmax(0,1fr);gap:9px;padding:12px;border-radius:15px;box-shadow:0 3px 12px rgba(20,25,35,.035)}
.purchase-item.selected{order:1;background:#fff8ef;border-color:#f58216}
.buy-check{padding-top:2px}
.check-visual{width:25px;height:25px;border-radius:8px}
.purchase-product{align-items:flex-start;gap:9px}
.purchase-photo-button{flex-basis:54px;padding:3px;border-radius:11px;font-size:9px}
.purchase-photo-button img{width:48px;height:48px;border-radius:8px}
.purchase-no-photo{flex-basis:48px;width:48px;height:48px;font-size:21px;border-radius:11px}
.purchase-product-copy{gap:3px}
.purchase-product-copy>b{font-size:13px;line-height:1.3}
.purchase-product-copy small{font-size:10px;line-height:1.35;margin-top:2px}
.purchase-fields{grid-column:2;gap:7px;margin-top:2px}
.purchase-fields label{font-size:10px}
.purchase-fields input{min-height:38px;padding:8px 9px;font-size:14px;border-radius:10px}
.purchase-price-compare{grid-column:2;padding:8px 9px;font-size:11px}
.quick-store-edit{margin-top:5px;padding-top:5px;border-top:1px solid #f0e5d9}
.quick-store-edit summary{padding:4px 0;font-size:11px}
.quick-store-panel{gap:8px;padding:9px;margin-top:5px;border-radius:11px}
.quick-store-row{grid-template-columns:minmax(0,1fr) 66px;gap:6px}
.quick-store-row input{height:39px;min-height:39px;font-size:13px;padding:8px}
.quick-store-row .quick-store-save{width:66px;height:39px;min-height:39px;font-size:11px;padding:6px}
.quick-store-hint,.quick-store-feedback{font-size:10px;line-height:1.35}
.add-extra-launcher{display:flex;align-items:center;justify-content:center;width:100%;min-height:47px;margin:10px 0 14px;border:1px dashed #f3a45b;background:#fff9f2;color:#a95000;border-radius:13px;font-weight:800}
.extra-product-modal{position:fixed;inset:0;z-index:1100;background:rgba(20,23,28,.58);display:flex;align-items:center;justify-content:center;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));overflow-y:auto}
.extra-product-modal.hidden{display:none!important}
.extra-product-dialog{position:relative;width:min(620px,100%);max-height:90dvh;overflow-y:auto;overscroll-behavior:contain;padding:18px;margin:0;border-radius:20px;gap:14px;box-shadow:0 20px 70px rgba(0,0,0,.22)}
.extra-product-modal-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.extra-product-modal-heading h2{font-size:19px;line-height:1.25;margin:4px 0}
.extra-product-modal-heading .muted{font-size:12px;line-height:1.45}
.extra-modal-close{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:0;border-radius:11px;background:#f1f2f4;color:#333;font-size:25px;line-height:1}
.extra-product-dialog .form-grid{gap:11px}
.extra-product-dialog .extra-details{margin-top:0}
.extra-product-dialog .photo-actions-grid{gap:9px}
.extra-product-dialog .photo-input-label{padding:10px;min-width:0}
.extra-product-dialog .photo-input-label input{font-size:11px;max-width:100%}
.extra-product-dialog .extra-product-actions{display:grid;gap:8px}
.extra-product-dialog .extra-product-actions .btn{width:100%;min-height:45px}
.purchase-notes-panel{padding:13px;margin-top:12px;gap:8px}
.purchase-submit{z-index:20}
.mobile-nav .mobile-nav-buy{transform:none!important;position:static;top:auto;box-shadow:none;border-radius:0;background:transparent;color:inherit;padding:3px;min-height:0}
.mobile-nav .mobile-nav-buy span{background:transparent;color:inherit}
.mobile-nav .mobile-nav-buy small{color:inherit}
.mobile-nav .mobile-nav-buy.active{background:transparent;color:var(--orange-dark)}
@media(max-width:850px){
 .purchase-items{grid-template-columns:1fr}
 .purchase-item{grid-template-columns:25px minmax(0,1fr);padding:12px}
 .purchase-product-copy>b{font-size:14px}
 .purchase-product-copy small{font-size:11px}
 .purchase-fields{grid-column:2}
}
@media(max-width:600px){
 body{padding-bottom:calc(92px + env(safe-area-inset-bottom))}
 .purchase-heading{gap:10px}
 .purchase-heading h1{font-size:25px}
 .purchase-store-picker{padding:13px;margin-bottom:12px}
 .service-panel{padding:13px;margin:10px 0 15px}
 .service-panel .editor-section-title{margin-bottom:10px;gap:9px}
 .service-panel .editor-icon{width:34px;height:34px;border-radius:10px;font-size:17px}
 .section-title{margin:15px 0 9px;gap:8px}
 .section-title h2{font-size:17px}
 .count-chip{font-size:10px;padding:6px 8px}
 .purchase-items{gap:8px;margin-bottom:13px}
 .purchase-item{grid-template-columns:24px minmax(0,1fr);gap:8px;padding:10px;border-radius:13px}
 .purchase-product{gap:8px}
 .purchase-photo-button{flex-basis:48px;padding:2px}
 .purchase-photo-button img{width:43px;height:43px}
 .purchase-no-photo{flex-basis:43px;width:43px;height:43px;font-size:19px}
 .purchase-product-copy>b{font-size:13px}
 .purchase-product-copy small{font-size:10px;line-height:1.32}
 .purchase-fields{grid-column:2;gap:8px;margin-top:5px}
 .purchase-fields label{font-size:10px}
 .purchase-fields input{min-height:39px;padding:8px;font-size:15px}
 .purchase-price-compare{grid-column:2;padding:8px;font-size:10px}
 .quick-store-edit{margin-top:4px;padding-top:4px}
 .quick-store-edit summary{font-size:11px}
 .quick-store-panel{padding:8px}
 .quick-store-row{grid-template-columns:minmax(0,1fr) 68px}
 .quick-store-row .quick-store-save{width:68px}
 .add-extra-launcher{margin:8px 0 12px;min-height:45px;font-size:13px}
 .extra-product-dialog{padding:15px;border-radius:17px;max-height:86dvh;gap:12px}
 .extra-product-modal{padding:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
 .extra-product-dialog .form-grid{grid-template-columns:1fr 1fr;gap:10px}
 .extra-product-dialog .form-grid .span2{grid-column:1/-1}
 .extra-product-dialog .photo-actions-grid{grid-template-columns:1fr;gap:8px}
 .extra-product-dialog .photo-input-label{display:grid;grid-template-columns:36px minmax(0,1fr);gap:8px;align-items:center}
 .extra-product-dialog .photo-input-label input{grid-column:1/-1;width:100%}
 .purchase-notes-panel{padding:12px;margin-top:10px}
 .purchase-submit{position:sticky;bottom:calc(68px + env(safe-area-inset-bottom));margin:12px 0 10px;padding:9px;border-radius:14px}
 .purchase-submit p{font-size:10px;margin-bottom:6px}
 .purchase-submit .btn{min-height:43px;font-size:12px;padding:10px}
 .mobile-nav{display:flex;min-height:62px;align-items:stretch;justify-content:space-around;gap:2px;padding:6px 5px calc(6px + env(safe-area-inset-bottom))}
 .mobile-nav a{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:3px;padding:4px 1px;font-size:10px;line-height:1.1}
 .mobile-nav a span{width:27px;height:24px;font-size:19px}
 .mobile-nav .mobile-nav-buy{transform:none!important;margin:0}
 .mobile-nav .mobile-nav-buy.active span{background:#fff0df;color:var(--orange-dark)}
}


/* Resumo da lista de compras: contadores claros e compactos para celular */
.purchase-list-heading{margin-bottom:8px}
.purchase-status-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0 0 14px}
.purchase-status-card{display:flex;align-items:center;gap:9px;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:#fff}
.purchase-status-card .status-dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px;background:#9aa2ad}
.purchase-status-card>div{display:grid;gap:2px;min-width:0}
.purchase-status-card strong{font-size:19px;line-height:1.1;color:#24272c}
.purchase-status-card small{font-size:11px;line-height:1.25;color:var(--muted)}
.purchase-status-card.status-found{background:#f0fbf4;border-color:#c9ecd5}
.purchase-status-card.status-found .status-dot{background:#229653}
.purchase-status-card.status-search{background:#fff8ee;border-color:#f7dfbd}
.purchase-status-card.status-search .status-dot{background:#e87500}
.purchase-status-card.status-missing .status-dot{background:#64748b}
@media(max-width:600px){
 .purchase-status-summary{gap:6px;margin-bottom:10px}
 .purchase-status-card{display:grid;grid-template-columns:8px minmax(0,1fr);gap:6px;padding:9px 7px;border-radius:11px}
 .purchase-status-card .status-dot{width:7px;height:7px;flex-basis:7px}
 .purchase-status-card strong{font-size:17px}
 .purchase-status-card small{font-size:9px;line-height:1.2;overflow-wrap:anywhere}
}

/* Ajustes de navegação e ações rápidas no celular */
.top-brand-group{display:flex;align-items:center;gap:10px}
.mobile-header-action{display:none}
.compact-purchase-hero{align-items:center;justify-content:space-between}
.purchase-title-line{display:flex;align-items:center;gap:12px;min-width:0}
.purchase-title-line h1{margin:2px 0;font-size:clamp(20px,3vw,28px)}
.purchase-title-line .muted{margin:3px 0 0;font-size:12px}
@media(max-width:600px){
 .top{padding:9px 12px}
 .top-brand-group{gap:7px}
 .brand{font-size:13px;gap:7px}
 .brand-mark{width:34px;height:34px;flex:0 0 34px}
 .brand small{font-size:8px;letter-spacing:.7px}
 .mobile-header-action{display:inline-flex;flex:0 0 auto}
 .compact-purchase-hero{padding:12px;gap:8px}
 .purchase-title-line{gap:8px}
 .purchase-title-line .hero-icon{width:34px;height:34px;font-size:18px;border-radius:10px}
 .purchase-title-line h1{font-size:19px}
 .purchase-title-line .eyebrow{font-size:9px}
 .purchase-title-line .muted{font-size:11px;line-height:1.3}
 .purchase-report-link{padding:8px 9px!important;font-size:11px!important;white-space:nowrap}
 .mobile-nav{min-height:58px;padding:5px 7px calc(5px + env(safe-area-inset-bottom));gap:5px}
 .mobile-nav a{justify-content:center;min-height:48px;padding:4px 2px;gap:2px}
 .mobile-nav a .nav-icon{width:21px;height:21px}
 .mobile-nav a .nav-icon svg{width:20px;height:20px}
 .mobile-nav a small{font-size:10px;line-height:1.1}
}

/* Histórico: edição segura de itens comprados */
.history-item-editable{padding:12px 0;border-bottom:1px solid var(--line)}
.history-item-editable:last-child{border-bottom:0}
.history-item-actions{margin-top:8px}
.history-item-actions summary{cursor:pointer;color:#a95000;font-size:12px;font-weight:800;list-style:none;display:inline-flex;align-items:center;gap:6px;padding:6px 0}
.history-item-actions summary:before{content:"✎";font-size:14px}
.history-item-edit-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:10px 0}
.history-item-edit-form label{display:grid;gap:5px;font-size:12px;font-weight:750;min-width:110px}
.history-item-edit-form input{width:130px;max-width:100%;padding:9px 10px}
.history-item-delete-form{margin:6px 0 2px}
.history-item-editable .list-row{padding:0;border:0}
@media(max-width:600px){
 .history-item-edit-form{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .history-item-edit-form label{min-width:0}
 .history-item-edit-form input{width:100%;min-width:0}
 .history-item-edit-form button{grid-column:1/-1;width:100%}
 .history-item-delete-form .btn{width:100%}
}



/* Ajustes finais: navegação sem destaque indevido e resumo no fluxo normal */
@media (max-width: 600px) {
  .mobile-nav {
    min-height: 0 !important;
    height: auto;
    align-items: stretch !important;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;
    gap: 3px !important;
    box-shadow: 0 -3px 14px #17191c12;
  }
  .mobile-nav a,
  .mobile-nav a.mobile-nav-buy,
  .mobile-nav a.mobile-nav-buy.active {
    transform: none !important;
    position: static !important;
    margin: 0 !important;
    min-height: 43px !important;
    padding: 4px 1px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #777e89 !important;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }
  .mobile-nav a .nav-icon,
  .mobile-nav a.mobile-nav-buy .nav-icon,
  .mobile-nav a.mobile-nav-buy.active .nav-icon {
    background: transparent !important;
    color: currentColor !important;
    width: 22px;
    height: 22px;
  }
  .mobile-nav a .nav-icon svg {
    width: 20px !important;
    height: 20px !important;
  }
  .mobile-nav a small {
    color: currentColor !important;
    font-size: 9px !important;
    font-weight: 700;
  }
  .mobile-nav a.active,
  .mobile-nav a.mobile-nav-buy.active {
    background: #fff3e5 !important;
    border-color: #f5d8b4 !important;
    color: #b95500 !important;
  }
  .mobile-nav a.active .nav-icon,
  .mobile-nav a.mobile-nav-buy.active .nav-icon {
    color: #b95500 !important;
  }
  .purchase-status-summary {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    transform: none !important;
    margin-top: 0;
    margin-bottom: 12px;
  }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}
.purchase-hero-icon {display:grid;place-items:center}
.purchase-hero-icon svg {width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.report-link-icon {width:15px;height:15px;display:inline-block;vertical-align:-3px;margin-right:4px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.photo-carousel-content {position:relative}
.photo-carousel {display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:10px;touch-action:pan-y;min-height:200px}
.photo-carousel img {display:block;width:100%;height:min(65vh,620px);min-height:180px;object-fit:contain;border-radius:14px;background:#f5f6f8}
.photo-carousel-arrow {width:40px;height:40px;border:1px solid #e5e7eb;border-radius:50%;background:#fff;color:#27292d;font-size:32px;line-height:1;display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 8px #0000000b}
.photo-carousel-footer {display:flex;align-items:center;justify-content:center;gap:14px;margin-top:12px;min-height:20px}
.photo-carousel-footer>span {font-size:12px;color:var(--muted);font-weight:700}
.photo-dots {display:flex;align-items:center;justify-content:center;gap:6px}
.photo-dot {width:7px;height:7px;border:0;border-radius:50%;padding:0;background:#c6cbd2}
.photo-dot.active {background:var(--orange);width:18px;border-radius:6px}
@media(max-width:600px) {
 .photo-modal {padding:12px}
 .photo-modal-content.photo-carousel-content {padding:14px 10px;border-radius:18px}
 .photo-carousel {grid-template-columns:30px minmax(0,1fr) 30px;gap:5px;min-height:180px}
 .photo-carousel img {height:60vh;min-height:150px}
 .photo-carousel-arrow {width:30px;height:30px;font-size:25px}
 .purchase-hero-icon svg {width:21px;height:21px}
}


/* Correção definitiva da galeria de fotos na tela de compras móvel.
   Setas sobrepostas à imagem evitam que a grade comprima a foto em navegadores móveis. */
.photo-modal {
  box-sizing: border-box;
  padding: 12px;
}
.photo-modal-content.photo-carousel-content {
  box-sizing: border-box;
  width: min(780px, 96vw);
  max-width: 96vw;
  max-height: 88dvh;
  overflow: auto;
}
.photo-carousel {
  position: relative;
  display: block !important;
  width: 100% !important;
  min-width: 0;
  min-height: 0;
  height: auto;
  touch-action: pan-y;
}
#photo-carousel-image {
  display: block !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: min(64vh, 620px) !important;
  min-height: 220px !important;
  margin: 0 auto;
  object-fit: contain !important;
  object-position: center;
  border-radius: 12px;
  background: #f5f6f8;
}
.photo-carousel-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.photo-carousel-arrow.photo-prev { left: 8px; }
.photo-carousel-arrow.photo-next { right: 8px; }
@media(max-width:600px) {
  .photo-modal { padding: 10px; }
  .photo-modal-content.photo-carousel-content {
    width: 100%;
    max-width: 100%;
    padding: 14px;
    max-height: 86dvh;
  }
  #photo-carousel-image {
    height: 62dvh !important;
    min-height: 200px !important;
    max-height: 560px;
  }
  .photo-carousel-arrow { width: 34px; height: 34px; }
}

/* Compra: resumo financeiro e desconto proporcional */
.purchase-discount-panel{display:grid;gap:14px;margin-top:16px}
.purchase-discount-panel>label,.purchase-discount-panel #discount-field-wrap label{display:grid;gap:7px;font-weight:600}
.purchase-discount-panel select,.purchase-discount-panel input{width:100%;max-width:320px}
.purchase-live-total{display:grid;gap:8px;padding:14px;background:var(--surface-soft,#f5f6f8);border-radius:12px}
.purchase-live-total>div{display:flex;justify-content:space-between;gap:12px;align-items:center}
.purchase-live-total .grand-total{border-top:1px solid var(--border,#ddd);padding-top:10px;margin-top:2px;font-size:1.05rem}
.purchase-live-total .grand-total strong{font-size:1.25rem}

/* Assistente de fechamento da compra */
.payment-wizard-card{display:grid;gap:16px;padding:clamp(16px,3vw,26px);border:1px solid var(--border,#e6e8eb);border-radius:18px;background:var(--panel,#fff)}
.payment-wizard-card>label{display:grid;gap:7px;font-weight:600}
.payment-wizard-card input,.payment-wizard-card select{width:100%;min-height:44px;border:1px solid var(--border,#d9dde2);border-radius:10px;padding:10px 12px;background:var(--input-bg,#fff);color:inherit}
.payment-summary,.payment-live-total{display:grid;gap:9px;padding:14px;border-radius:12px;background:var(--soft,#f6f7f8)}
.payment-summary>div,.payment-live-total>div{display:flex;align-items:center;justify-content:space-between;gap:14px}
.payment-summary .grand-total,.payment-live-total .grand-total{border-top:1px solid var(--border,#ddd);padding-top:10px;font-size:1.08rem}
.payment-discount-box{display:grid;gap:12px;padding:15px;border:1px solid var(--border,#e1e4e8);border-radius:14px;background:var(--soft,#fafafa)}
.payment-discount-box h3{margin:0}
.payment-discount-box label{display:grid;gap:7px;font-weight:600}
.payment-discount-box small{color:var(--muted,#6b7280)}
.payment-step-actions{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:8px}
.purchase-wizard-step{display:grid;gap:16px}

/* Compra em foco: lista compacta e tela limpa para uso dentro da loja */
body.purchase-focus-mode .top, body.purchase-focus-mode footer, body.purchase-focus-mode .mobile-nav {display:none!important}
body.purchase-focus-mode main {max-width:none!important;width:100%!important;margin:0!important;padding:12px clamp(10px,2vw,28px) 24px!important}
body.purchase-focus-mode .purchase-heading {margin:0 auto 10px!important;max-width:1500px}
body.purchase-focus-mode .purchase-store-picker, body.purchase-focus-mode .purchase-form {max-width:1500px;margin-left:auto;margin-right:auto}
body.purchase-focus-mode .purchase-status-summary {gap:8px;margin:8px 0}
body.purchase-focus-mode .purchase-status-card {padding:8px 12px;min-height:54px}
body.purchase-focus-mode .purchase-items {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:8px}
body.purchase-focus-mode .purchase-item {padding:10px;gap:9px;align-items:center}
body.purchase-focus-mode .purchase-product-copy b {font-size:14px}
body.purchase-focus-mode .purchase-product-copy small {font-size:11px;line-height:1.3}
body.purchase-focus-mode .purchase-photo-button, body.purchase-focus-mode .purchase-no-photo {width:48px;height:48px;min-width:48px}
body.purchase-focus-mode .purchase-fields {gap:6px;min-width:170px}
body.purchase-focus-mode .purchase-fields label {font-size:11px}
body.purchase-focus-mode .purchase-fields input {padding:8px 7px;min-width:0}
body.purchase-focus-mode .purchase-submit {position:sticky;bottom:8px;z-index:20;padding:10px;background:var(--panel,#fff);border:1px solid var(--line,#ddd);border-radius:14px;box-shadow:0 5px 22px #0002}
.extra-product-modal {z-index:99999!important;position:fixed!important;inset:0!important;padding:12px!important;overflow:auto!important;align-items:stretch!important;justify-content:stretch!important;background:rgba(15,17,20,.78)!important}
.extra-product-dialog {width:100%!important;max-width:760px!important;margin:auto!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;padding:clamp(16px,3vw,28px)!important;border-radius:20px!important}
body.modal-open {overflow:hidden!important}
.customer-orders-list {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:12px}
.customer-order-card {padding:16px;display:flex;flex-direction:column;gap:12px}
.customer-order-top {display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.customer-order-top h2 {font-size:18px;margin:5px 0}
.customer-order-info {display:grid;gap:8px}
.customer-order-info div {display:flex;flex-direction:column;gap:3px}
.customer-order-info small {color:var(--muted,#777);font-size:11px}
.customer-order-actions {display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:auto}
.customer-order-actions form {margin:0}
@media(max-width:640px){body.purchase-focus-mode main{padding:8px 8px 20px!important}body.purchase-focus-mode .purchase-report-link{display:none}.customer-order-actions .btn{flex:1;justify-content:center}}

/* Ajuste de navegação: pedidos ficam dentro de Relatórios; barra inferior enxuta */
.mobile-nav{justify-content:space-evenly;gap:4px}
.mobile-nav>a{flex:1;min-width:0}
.mobile-nav small{font-size:10px;white-space:nowrap}
/* Modo foco intencional: remove navegação externa sem deslocar o cabeçalho da compra */
body.purchase-focus-mode{padding-bottom:12px!important}
body.purchase-focus-mode .top,body.purchase-focus-mode footer,body.purchase-focus-mode .mobile-nav{display:none!important}
body.purchase-focus-mode main{max-width:none!important;width:100%!important;margin:0!important;padding:12px clamp(10px,2vw,28px) 24px!important}
body.purchase-focus-mode .purchase-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:10px!important;margin:0 auto 12px!important;max-width:1500px}
body.purchase-focus-mode .purchase-title-line{display:flex;align-items:center;gap:10px;min-width:0}
body.purchase-focus-mode .purchase-heading .purchase-focus-toggle{display:inline-flex;flex:0 0 auto;min-height:38px;padding:8px 12px;white-space:nowrap}
body.purchase-focus-mode .purchase-heading .purchase-report-link{display:none!important}
body.purchase-focus-mode .purchase-store-picker,body.purchase-focus-mode .purchase-form{max-width:1500px;margin-left:auto;margin-right:auto}
body.purchase-focus-mode .purchase-status-summary{display:flex;gap:8px;margin:8px 0 12px}
body.purchase-focus-mode .purchase-status-card{flex:1;min-width:0;padding:8px 10px;min-height:48px}
body.purchase-focus-mode .purchase-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:8px}
body.purchase-focus-mode .purchase-item{min-width:0;padding:10px;gap:9px;align-items:center}
body.purchase-focus-mode .purchase-product{min-width:0;gap:8px}
body.purchase-focus-mode .purchase-product-copy{min-width:0;overflow-wrap:anywhere}
body.purchase-focus-mode .purchase-fields{gap:7px;min-width:0}
body.purchase-focus-mode .purchase-fields label{min-width:0;font-size:11px}
body.purchase-focus-mode .purchase-fields input{width:100%;min-width:0;padding:8px 7px}
body.purchase-focus-mode .purchase-submit{position:sticky;bottom:8px;z-index:20;padding:10px;background:var(--panel,#fff);border:1px solid var(--line,#ddd);border-radius:14px;box-shadow:0 5px 22px #0002}
/* Modal de avulso deve abrir sempre acima de tudo e ocupar a área útil sem depender de estilo inline */
.extra-product-modal{z-index:99999!important;position:fixed!important;inset:0!important;display:flex;align-items:center;justify-content:center;padding:12px!important;overflow-y:auto!important;background:rgba(15,17,20,.78)!important}
.extra-product-modal.hidden{display:none!important}
.extra-product-dialog{position:relative;width:min(760px,100%)!important;max-height:calc(100dvh - 24px)!important;overflow-y:auto!important;margin:auto!important}
@media(max-width:640px){
 body.purchase-focus-mode main{padding:8px 8px 16px!important}
 body.purchase-focus-mode .purchase-heading{align-items:flex-start!important}
 body.purchase-focus-mode .purchase-heading h1{font-size:22px}
 body.purchase-focus-mode .purchase-heading .purchase-focus-toggle{font-size:11px;min-height:34px;padding:7px 9px}
 body.purchase-focus-mode .purchase-status-card{padding:7px 6px}
 body.purchase-focus-mode .purchase-status-card strong{font-size:17px}
 body.purchase-focus-mode .purchase-status-card small{font-size:9px}
 .mobile-nav small{font-size:9px}
}

/* Ajustes finais da tela de compras e modo foco */
.purchase-heading{position:relative;align-items:center;}
.purchase-heading .purchase-focus-toggle{flex:0 0 auto;white-space:nowrap;min-height:40px;display:inline-flex;align-items:center;justify-content:center;}
.focus-extra-launcher{display:none;white-space:nowrap;min-height:40px;padding:9px 13px;align-items:center;justify-content:center;}
.focus-extra-launcher.focus-extra-visible{display:inline-flex;}
body.purchase-focus-mode .purchase-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;align-items:center!important;gap:8px!important;}
body.purchase-focus-mode .purchase-title-line{min-width:0;}
body.purchase-focus-mode .purchase-heading .purchase-focus-toggle{justify-self:end;min-width:126px;}
body.purchase-focus-mode .purchase-heading .focus-extra-launcher{display:inline-flex!important;justify-self:end;}
body.purchase-focus-mode .purchase-heading .purchase-report-link{display:none!important;}
@media(max-width:640px){
 .purchase-heading{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important;}
 .purchase-title-line{grid-column:1;}
 .purchase-heading .purchase-focus-toggle{grid-column:2;grid-row:1;max-width:145px;font-size:11px;padding:8px 9px;}
 .purchase-heading .purchase-report-link{grid-column:1/-1;justify-self:stretch;}
 body.purchase-focus-mode .purchase-heading{grid-template-columns:minmax(0,1fr) auto auto!important;gap:6px!important;}
 body.purchase-focus-mode .purchase-heading .purchase-focus-toggle{min-width:0;font-size:10px;padding:7px 8px;}
 body.purchase-focus-mode .purchase-heading .focus-extra-launcher{font-size:11px;padding:7px 9px;}
 body.purchase-focus-mode .purchase-title-line h1{font-size:20px;}
}

/* Ações sem recarregar a compra */
.purchase-item.product-not-found-hidden{display:none!important}
.purchase-item.product-moved-away{display:none!important}
.not-found-btn{margin-top:6px;font-size:12px;min-height:32px;padding:6px 10px;color:var(--muted,#666)}
.inline-action-note{display:block;color:var(--success,#287a48);margin-top:6px}

/* Ações do histórico de compras */
.history-card-with-actions{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:12px 14px}
.history-card-link{display:flex;align-items:center;gap:12px;min-width:0;color:inherit;text-decoration:none}
.history-card-link .history-main{flex:1;min-width:0}
.history-card-link .history-main b,.history-card-link .history-main small{display:block}
.history-card-with-actions form{display:flex;justify-content:flex-end;margin:0}
@media(min-width:640px){.history-card-with-actions{flex-direction:row;align-items:center}.history-card-with-actions form{margin-left:auto}.history-card-link{flex:1}}

/* Miniatura de produto avulso: dimensões fixas em ambos os modos */
.purchase-product img.purchase-extra-thumbnail{display:block;flex:0 0 64px;width:64px;min-width:64px;max-width:64px;height:64px;max-height:64px;object-fit:cover;border-radius:10px;align-self:center}
body.purchase-focus-mode .purchase-product img.purchase-extra-thumbnail{flex-basis:48px;width:48px;min-width:48px;max-width:48px;height:48px;max-height:48px}
@media(max-width:600px){.purchase-product img.purchase-extra-thumbnail{flex-basis:48px;width:48px;min-width:48px;max-width:48px;height:48px;max-height:48px}}

/* Captura integrada de foto no avulso: sem abrir o aplicativo externo. */
.extra-camera-trigger{font:inherit;color:inherit;text-align:left;cursor:pointer;width:100%}
.extra-camera-trigger:disabled{opacity:.6;cursor:wait}
.extra-camera-panel{margin:12px 0;padding:12px;border:1px solid #ddd;border-radius:14px;background:#111;color:white}
.extra-camera-panel.hidden{display:none!important}
.extra-camera-panel video{display:block;width:100%;max-height:min(55vh,460px);object-fit:contain;background:#000;border-radius:10px}
.extra-camera-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.extra-camera-controls button{flex:1;min-width:125px}
.extra-camera-panel small{display:block;margin-top:8px;color:#eee}

/* Janela de câmera integrada: ocupa espaço confortável e não altera o formulário avulso. */
#extra-camera-panel.extra-camera-panel{
 position:fixed!important;inset:0!important;z-index:2147483000!important;
 box-sizing:border-box;margin:0!important;padding:16px!important;
 display:flex;flex-direction:column;align-items:stretch;justify-content:center;
 gap:12px;background:rgba(8,13,22,.97);color:#fff;border:0;border-radius:0;
 overflow-y:auto;overscroll-behavior:contain;
 padding-top:max(16px,env(safe-area-inset-top))!important;
 padding-bottom:max(16px,env(safe-area-inset-bottom))!important;
}
#extra-camera-panel.extra-camera-panel.hidden{display:none!important}
#extra-camera-panel .extra-camera-header{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;max-width:680px;margin:0 auto}
#extra-camera-panel .extra-camera-header strong{display:block;font-size:1.12rem;line-height:1.4}
#extra-camera-panel .extra-camera-header small{display:block;margin:3px 0 0;color:#cbd5e1;font-size:.85rem}
#extra-camera-panel .extra-camera-close{flex:none;width:42px;height:42px;border:1px solid #64748b;border-radius:50%;background:#253044;color:white;font-size:1.2rem;cursor:pointer}
#extra-camera-panel video{display:block;width:100%;max-width:680px;max-height:min(65dvh,680px);min-height:0;aspect-ratio:3/4;object-fit:contain;margin:0 auto;border-radius:16px;background:#000}
#extra-camera-panel .extra-camera-controls{width:100%;max-width:680px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:0 auto}
#extra-camera-panel .extra-camera-controls button{min-width:0;min-height:48px;white-space:normal;line-height:1.25}
#extra-camera-panel #extra-camera-message{display:block;width:100%;max-width:680px;margin:0 auto;color:#cbd5e1;text-align:center;font-size:.82rem}
@media(max-width:600px){
 #extra-camera-panel.extra-camera-panel{justify-content:center;padding-left:12px!important;padding-right:12px!important}
 #extra-camera-panel video{max-height:60dvh;aspect-ratio:3/4}
 #extra-camera-panel .extra-camera-controls{grid-template-columns:1fr 1fr}
}
@media(max-height:540px){#extra-camera-panel video{max-height:43dvh;aspect-ratio:auto}}

/* Mesmo layout da câmera integrada para Novo/Editar Produto */
/* Janela de câmera integrada: ocupa espaço confortável e não altera o formulário avulso. */
#product-camera-panel.extra-camera-panel{
 position:fixed!important;inset:0!important;z-index:2147483000!important;
 box-sizing:border-box;margin:0!important;padding:16px!important;
 display:flex;flex-direction:column;align-items:stretch;justify-content:center;
 gap:12px;background:rgba(8,13,22,.97);color:#fff;border:0;border-radius:0;
 overflow-y:auto;overscroll-behavior:contain;
 padding-top:max(16px,env(safe-area-inset-top))!important;
 padding-bottom:max(16px,env(safe-area-inset-bottom))!important;
}
#product-camera-panel.extra-camera-panel.hidden{display:none!important}
#product-camera-panel .extra-camera-header{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;max-width:680px;margin:0 auto}
#product-camera-panel .extra-camera-header strong{display:block;font-size:1.12rem;line-height:1.4}
#product-camera-panel .extra-camera-header small{display:block;margin:3px 0 0;color:#cbd5e1;font-size:.85rem}
#product-camera-panel .extra-camera-close{flex:none;width:42px;height:42px;border:1px solid #64748b;border-radius:50%;background:#253044;color:white;font-size:1.2rem;cursor:pointer}
#product-camera-panel video{display:block;width:100%;max-width:680px;max-height:min(65dvh,680px);min-height:0;aspect-ratio:3/4;object-fit:contain;margin:0 auto;border-radius:16px;background:#000}
#product-camera-panel .extra-camera-controls{width:100%;max-width:680px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:0 auto}
#product-camera-panel .extra-camera-controls button{min-width:0;min-height:48px;white-space:normal;line-height:1.25}
#product-camera-panel #extra-camera-message{display:block;width:100%;max-width:680px;margin:0 auto;color:#cbd5e1;text-align:center;font-size:.82rem}
@media(max-width:600px){
 #product-camera-panel.extra-camera-panel{justify-content:center;padding-left:12px!important;padding-right:12px!important}
 #product-camera-panel video{max-height:60dvh;aspect-ratio:3/4}
 #product-camera-panel .extra-camera-controls{grid-template-columns:1fr 1fr}
}
@media(max-height:540px){#product-camera-panel video{max-height:43dvh;aspect-ratio:auto}}

/* Separação entre pendentes e comprados */
.reposicao-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.reposicao-tabs .btn{flex:1;min-width:145px;justify-content:center;text-align:center}
@media(max-width:520px){.reposicao-tabs{gap:8px}.reposicao-tabs .btn{padding:12px 8px;font-size:.9rem}}

/* Indicadores como navegacao, sem duplicacao */
a.stat[href]{text-decoration:none;color:inherit;cursor:pointer;transition:transform .15s,box-shadow .15s}
a.stat[href]:hover{transform:translateY(-2px)}
a.stat[href]:focus-visible{outline:3px solid #ed7800;outline-offset:3px}
a.stat-selected{box-shadow:inset 0 0 0 2px #ed7800}

/* Paginação de listas e tabelas — 15 por página */
[data-paginate] > [hidden] { display:none !important; }
.list-pagination { display:flex; flex-direction:column; align-items:center; gap:9px; margin:18px 0 24px; }
.list-pagination-buttons { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; }
.list-page-button { border:1px solid #d7d9dd; background:#fff; color:#202124; min-width:37px; height:37px; padding:0 9px; border-radius:9px; cursor:pointer; font-weight:700; }
.list-page-button.active { background:#f58212; border-color:#f58212; color:#151515; }
.list-page-button:disabled { opacity:.35; cursor:default; }
.list-page-button:focus-visible { outline:3px solid #f58212; outline-offset:2px; }
.list-page-ellipsis { padding:0 2px; color:#777; }
.list-pagination-summary { font-size:12px; color:#74777c; text-align:center; }

/* Resumo e histórico de compras, inclusive registros antigos */
.purchase-financial-summary,.purchase-change-log{margin-bottom:16px}
.purchase-financial-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;border-bottom:1px solid rgba(128,128,128,.18)}
.purchase-financial-row b,.purchase-financial-row strong{text-align:right}
.purchase-financial-total{font-size:1.16rem}
.purchase-notes-text{white-space:pre-line;overflow-wrap:anywhere}
.purchase-change-entry{padding:13px 0;border-bottom:1px solid rgba(128,128,128,.18)}
.purchase-change-entry small{display:block;margin-top:4px}
.purchase-change-entry p{margin:7px 0}
.purchase-remove-form{display:grid;gap:12px;padding-top:12px}
.purchase-remove-form label{display:grid;gap:5px}

/* Página de detalhes de compra: alinhamento coerente com os cards do sistema */
main > .purchase-financial-summary,
main > .purchase-change-log,
main > .note-panel,
main > .purchase-detail-items {margin:0 0 16px; padding:20px 22px; min-width:0;}
main > .purchase-financial-summary h2,
main > .purchase-change-log h2,
main > .note-panel h2,
main > .purchase-detail-items h2 {font-size:17px;line-height:1.35;margin:0 0 16px;color:#24272c;}
main > .purchase-financial-summary .purchase-financial-row {display:flex;align-items:center;justify-content:space-between;gap:18px;padding:11px 0;line-height:1.4;border-bottom:1px solid var(--line);font-size:13px;}
main > .purchase-financial-summary .purchase-financial-row:last-of-type{border-bottom:0;}
main > .purchase-financial-summary .purchase-financial-row span{color:#656b74;flex:1;min-width:0;}
main > .purchase-financial-summary .purchase-financial-row b{font-size:13px;white-space:nowrap;}
main > .purchase-financial-summary .purchase-financial-total{margin:4px -10px;padding:13px 10px;background:#fff5e9;border:0;border-radius:10px;}
main > .purchase-financial-summary .purchase-financial-total span{color:#6b420e;font-weight:700;}
main > .purchase-financial-summary .purchase-financial-total strong{font-size:18px;color:#aa4d00;white-space:nowrap;}
main > .purchase-financial-summary > .muted{font-size:12px;line-height:1.5;margin:12px 0 0;}
main > .purchase-detail-items .history-item-editable{padding:14px 0;}
main > .purchase-detail-items .history-item-editable:first-of-type{padding-top:0;}
main > .purchase-detail-items .history-item-editable:last-child{padding-bottom:0;}
main > .purchase-change-log .purchase-change-entry{padding:15px 0;line-height:1.5;}
main > .purchase-change-log .purchase-change-entry:first-of-type{padding-top:0;}
main > .purchase-change-log .purchase-change-entry:last-child{border-bottom:0;padding-bottom:0;}
main > .purchase-change-log .purchase-change-entry > b{display:block;font-size:14px;}
main > .purchase-change-log .purchase-change-entry > small{margin:5px 0 9px;}
main > .purchase-change-log .purchase-change-entry p{font-size:13px;line-height:1.6;overflow-wrap:anywhere;}
main > .purchase-change-log > .muted{margin:0;line-height:1.6;}
main > .note-panel .purchase-notes-text{margin:0;white-space:pre-line;line-height:1.65;font-size:13px;}
main > .page-actions{margin-top:18px;}
@media(max-width:560px){
main > .purchase-financial-summary,main > .purchase-change-log,main > .note-panel,main > .purchase-detail-items{padding:17px 15px;margin-bottom:13px;}
main > .purchase-financial-summary .purchase-financial-row{gap:9px;font-size:12px;}
main > .purchase-financial-summary .purchase-financial-row b{font-size:12px;}
main > .purchase-financial-summary .purchase-financial-total strong{font-size:17px;}
}

.history-item-edit-form .muted{grid-column:1/-1;margin:0;font-size:.82rem}
