:root{
 --brand-950:#3f1712;--brand-900:#572018;--brand-800:#702a1f;--brand-700:#8b3527;--brand-600:#a84632;
 --accent:#d9824f;--cream:#fffaf5;--canvas:#f3f1ee;--surface:#fff;--surface-2:#faf8f6;
 --text:#251f1c;--muted:#746b66;--line:#e8e1dc;--success:#18875d;--warning:#d78a14;--danger:#d34c4c;--info:#3478c8;
 --sidebar:272px;--topbar:78px;--radius-sm:10px;--radius:16px;--radius-lg:22px;
 --shadow-sm:0 4px 14px rgba(54,32,24,.06);--shadow:0 12px 34px rgba(54,32,24,.09);--transition:.2s ease;
}
html[data-theme="dark"]{--canvas:#151312;--surface:#211e1c;--surface-2:#292522;--text:#f5efeb;--muted:#b9aea7;--line:#3b3531;--cream:#251f1c;--shadow-sm:0 4px 16px rgba(0,0,0,.22);--shadow:0 18px 45px rgba(0,0,0,.28)}
*{box-sizing:border-box}html{min-height:100%;background:var(--canvas)}body{min-height:100vh;margin:0;background:var(--canvas);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;-webkit-font-smoothing:antialiased}.app-shell{min-height:100vh}.app-sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);z-index:1040;background:linear-gradient(180deg,var(--brand-950),var(--brand-800));color:#fff;display:flex;flex-direction:column;box-shadow:12px 0 38px rgba(49,18,11,.13)}.brand-area{height:var(--topbar);display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid rgba(255,255,255,.1)}.brand-link{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;min-width:0}.brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#fff7ef,#e9b28f);color:var(--brand-900);font-weight:950;letter-spacing:-.05em;box-shadow:0 8px 18px rgba(0,0,0,.18)}.brand-copy{display:flex;flex-direction:column;min-width:0}.brand-copy strong{font-size:.98rem;line-height:1.2;white-space:nowrap}.brand-copy small{font-size:.68rem;color:rgba(255,255,255,.66);letter-spacing:.04em;margin-top:3px}.sidebar-nav{flex:1;padding:18px 13px;overflow-y:auto;scrollbar-width:thin}.nav-group-label{font-size:.66rem;font-weight:850;text-transform:uppercase;letter-spacing:.12em;color:rgba(255,255,255,.44);padding:14px 13px 7px}.sidebar-link{height:44px;display:flex;align-items:center;gap:12px;padding:0 13px;border-radius:12px;color:rgba(255,255,255,.77);text-decoration:none;font-weight:680;margin:3px 0;transition:var(--transition)}.sidebar-link svg{width:19px;height:19px;flex:0 0 auto}.sidebar-link:hover{color:#fff;background:rgba(255,255,255,.09);transform:translateX(2px)}.sidebar-link.active{color:var(--brand-950);background:#fff7ef;box-shadow:0 8px 20px rgba(0,0,0,.14)}.sidebar-footer{padding:14px;border-top:1px solid rgba(255,255,255,.09)}.version-chip{font-size:.7rem;color:rgba(255,255,255,.62);display:flex;align-items:center;gap:6px;padding:10px;border-radius:10px;background:rgba(255,255,255,.06)}.version-chip strong{margin-left:auto;color:#fff}.status-pulse{width:7px;height:7px;border-radius:50%;background:#57d598;box-shadow:0 0 0 5px rgba(87,213,152,.12)}.app-workspace{min-height:100vh;margin-left:var(--sidebar);display:flex;flex-direction:column}.app-topbar{height:var(--topbar);position:sticky;top:0;z-index:1020;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 28px;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}.topbar-left,.topbar-actions,.page-heading,.user-menu{display:flex;align-items:center}.topbar-left{gap:12px;min-width:0}.page-heading{gap:12px;min-width:0}.page-heading-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,#f6dfd1,#fff8f2);color:var(--brand-800);border:1px solid #f0d6c6}.page-heading-icon svg{width:20px}.page-heading h1{font-size:1.06rem;font-weight:850;margin:0;line-height:1.2}.page-heading p{font-size:.76rem;color:var(--muted);margin:3px 0 0}.topbar-actions{gap:9px}.icon-button,.topbar-pill,.user-menu{border:1px solid var(--line);background:var(--surface);color:var(--text);transition:var(--transition)}.icon-button{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;padding:0}.icon-button:hover,.topbar-pill:hover,.user-menu:hover{border-color:#d8c4b9;background:var(--surface-2);box-shadow:var(--shadow-sm)}.icon-button svg{width:19px}.topbar-pill{height:42px;border-radius:13px;padding:0 13px;display:flex;align-items:center;gap:7px;font-size:.78rem}.topbar-pill svg{width:17px}.user-menu{height:48px;border-radius:15px;padding:4px 10px 4px 5px;gap:9px;text-align:left}.user-menu:after{margin-left:5px}.user-avatar{width:37px;height:37px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand-700),var(--brand-900));color:#fff;font-weight:850}.user-copy{line-height:1.1}.user-copy strong{font-size:.8rem;display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis}.user-copy small{font-size:.66rem;color:var(--muted)}.dropdown-menu{background:var(--surface);color:var(--text);border-radius:14px!important;min-width:220px}.dropdown-item{color:var(--text);display:flex;align-items:center;gap:9px;padding:.65rem .75rem}.dropdown-item svg{width:17px}.dropdown-item:hover,.dropdown-item.active{background:var(--surface-2);color:var(--brand-700)}.dropdown-note{font-size:.7rem;color:var(--muted);padding:8px 12px 3px;max-width:220px}.app-content{flex:1;padding:26px 28px 36px;max-width:1760px;width:100%;margin:0 auto}.app-footer{display:flex;justify-content:space-between;gap:12px;padding:14px 28px;color:var(--muted);font-size:.72rem;border-top:1px solid var(--line)}
/* Compatibility and components */
.navbar{background:linear-gradient(90deg,var(--brand-900),var(--brand-700))!important}.page-title{font-weight:850}.card{background:var(--surface);color:var(--text);border:1px solid color-mix(in srgb,var(--line) 78%,transparent);border-radius:var(--radius);box-shadow:var(--shadow-sm);overflow:hidden}.card:hover{box-shadow:var(--shadow)}.card-header{background:var(--surface);color:var(--text);border-bottom:1px solid var(--line);font-weight:800;padding:15px 18px}.card-body{padding:18px}.card-kpi{height:100%;position:relative;isolation:isolate}.card-kpi:after{content:"";position:absolute;right:-30px;top:-35px;width:100px;height:100px;border-radius:50%;background:linear-gradient(135deg,rgba(217,130,79,.18),transparent);z-index:-1}.kpi-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);font-weight:800}.kpi-value{font-size:2rem;font-weight:900;letter-spacing:-.04em}.btn{border-radius:11px;font-weight:700}.btn-primary{background:linear-gradient(135deg,var(--brand-700),var(--brand-900));border-color:var(--brand-800);box-shadow:0 7px 16px rgba(112,42,31,.16)}.btn-primary:hover,.btn-primary:focus{background:linear-gradient(135deg,var(--brand-800),var(--brand-950));border-color:var(--brand-900);transform:translateY(-1px)}.btn-outline-primary{color:var(--brand-700);border-color:var(--brand-600)}.btn-outline-primary:hover{background:var(--brand-700);border-color:var(--brand-700)}.form-label{font-weight:720;color:var(--text)}.form-control,.form-select{background-color:var(--surface);color:var(--text);border-color:var(--line);border-radius:11px;min-height:42px}.form-control:focus,.form-select:focus{background-color:var(--surface);color:var(--text);border-color:var(--brand-600);box-shadow:0 0 0 .22rem rgba(168,70,50,.12)}.form-control::placeholder{color:color-mix(in srgb,var(--muted) 70%,transparent)}.required:after{content:" *";color:var(--danger)}.table{--bs-table-bg:transparent;--bs-table-color:var(--text);--bs-table-border-color:var(--line);margin-bottom:0}.table thead th{font-size:.7rem;text-transform:uppercase;letter-spacing:.075em;color:var(--muted);white-space:nowrap;font-weight:850;border-bottom-width:1px;padding:13px 10px}.table td{vertical-align:middle;padding:13px 10px}.table tbody tr{transition:background-color .15s ease}.table tbody tr:hover{background:color-mix(in srgb,var(--accent) 5%,var(--surface))}.table-responsive{border-radius:12px}.badge{border-radius:999px;font-weight:760}.modal-content{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:20px;box-shadow:0 25px 70px rgba(0,0,0,.24)}.modal-header,.modal-footer{border-color:var(--line)}.modal-header{padding:18px 21px}.modal-body{padding:21px}.btn-close{filter:var(--close-filter,none)}html[data-theme="dark"]{--close-filter:invert(1)}.search-bar{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow-sm)}.empty{padding:40px;text-align:center;color:var(--muted)}.thumb{width:52px;height:52px;object-fit:cover;border-radius:11px;border:1px solid var(--line)}.cost-panel{background:linear-gradient(145deg,var(--surface),var(--surface-2));border:1px solid var(--line);border-radius:var(--radius);padding:20px;position:sticky;top:calc(var(--topbar) + 18px)}.cost-main{font-size:2rem;font-weight:900;color:var(--brand-700);line-height:1.1}.cost-unit,.mini-note,.text-muted{color:var(--muted)!important}.equiv-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.equiv-item,.price-card,.summary-metric,.flow-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:11px}.section-title{font-size:1.05rem;font-weight:850}.badge-soft{background:color-mix(in srgb,var(--brand-600) 12%,var(--surface));color:var(--brand-700);padding:.45rem .7rem;border-radius:999px}.recipe-row{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:10px}.status-dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:6px}.status-ok{background:var(--success)}.status-warn{background:var(--warning)}.status-danger{background:var(--danger)}.conversion-summary{border:1px solid color-mix(in srgb,var(--brand-600) 24%,var(--line));background:linear-gradient(135deg,var(--surface),var(--surface-2));border-radius:var(--radius);padding:18px}.conversion-summary-header{display:flex;align-items:center;gap:12px;margin-bottom:15px}.conversion-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:var(--brand-700);color:#fff;font-size:1.35rem;font-weight:800}.conversion-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:stretch;gap:10px}.flow-card{display:flex;flex-direction:column}.flow-card span,.summary-metric span{font-size:.7rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:800}.flow-card strong{font-size:1.05rem;margin-top:4px}.flow-card.emphasis{background:color-mix(in srgb,var(--brand-600) 9%,var(--surface));border-color:color-mix(in srgb,var(--brand-600) 25%,var(--line))}.flow-card.emphasis strong{color:var(--brand-700)}.flow-arrow{display:grid;place-items:center;color:var(--accent);font-size:1.4rem;font-weight:800}.summary-sentence{margin-top:14px;padding:12px 14px;border-left:4px solid var(--brand-700);background:var(--surface);border-radius:8px;line-height:1.55}.photo-preview{width:100%;max-width:180px;height:120px;object-fit:cover;border-radius:12px;border:1px solid var(--line)}.info-tip{display:inline-flex;align-items:center;justify-content:center;color:var(--brand-700);font-size:.82rem;cursor:help;margin-left:3px}.precision-value{font-variant-numeric:tabular-nums;white-space:nowrap}.table td:has(.precision-currency),.table td:has(.precision-number){text-align:right}.value-positive{color:var(--success);font-weight:750}.value-negative{color:var(--danger);font-weight:750}.sku-open{cursor:pointer;font:inherit}.sku-open:hover{filter:brightness(.96);box-shadow:0 0 0 3px rgba(139,47,34,.12)}.detail-help{background:color-mix(in srgb,var(--warning) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--warning) 35%,var(--line));border-radius:10px;padding:10px 12px}.detail-photo-wrap{min-height:230px;border:1px dashed color-mix(in srgb,var(--brand-600) 26%,var(--line));border-radius:16px;background:var(--surface-2);display:grid;place-items:center;overflow:hidden;cursor:context-menu;position:relative}.detail-photo{width:100%;height:230px;object-fit:cover}.detail-no-photo{color:var(--muted);font-weight:700}.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.detail-field{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--surface);min-height:76px;cursor:context-menu}.detail-field:hover{border-color:color-mix(in srgb,var(--brand-600) 40%,var(--line));background:var(--surface-2)}.detail-field span{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:800;margin-bottom:5px}.field-context-menu{position:fixed;z-index:2000;width:220px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px}.field-context-menu button{display:block;width:100%;border:0;background:transparent;color:var(--text);text-align:left;padding:10px 12px;border-radius:8px}.field-context-menu button:hover{background:var(--surface-2)}.registration-progress{background:color-mix(in srgb,var(--accent) 7%,var(--surface));border:1px solid var(--line);border-radius:14px;padding:14px}.registration-progress .progress{height:10px;background:var(--line)}
/* Professional dashboard */
.hero-panel{position:relative;overflow:hidden;border-radius:var(--radius-lg);padding:26px;background:linear-gradient(125deg,var(--brand-950),var(--brand-700));color:#fff;box-shadow:0 18px 42px rgba(87,32,24,.22)}.hero-panel:before,.hero-panel:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.07)}.hero-panel:before{width:230px;height:230px;right:-65px;top:-120px}.hero-panel:after{width:140px;height:140px;right:110px;bottom:-100px}.hero-panel h2{font-weight:900;letter-spacing:-.03em}.hero-panel p{color:rgba(255,255,255,.72);max-width:650px}.quick-actions{display:flex;gap:9px;flex-wrap:wrap}.quick-action{display:inline-flex;align-items:center;gap:8px;border-radius:12px;padding:10px 13px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);color:#fff;text-decoration:none;font-weight:750}.quick-action:hover{background:#fff;color:var(--brand-900)}.quick-action svg{width:17px}.metric-card{height:100%;padding:18px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-sm)}.metric-head{display:flex;align-items:center;justify-content:space-between}.metric-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand-600) 10%,var(--surface));color:var(--brand-700)}.metric-icon svg{width:19px}.metric-value{font-size:1.7rem;font-weight:900;margin-top:16px;letter-spacing:-.035em}.metric-label{font-size:.74rem;color:var(--muted);font-weight:750}.section-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm)}.section-card-header{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;border-bottom:1px solid var(--line)}.section-card-header h3{font-size:.9rem;font-weight:850;margin:0}.section-card-body{padding:16px 18px}.health-list{display:grid;gap:10px}.health-item{display:flex;align-items:center;gap:11px;padding:11px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line)}.health-item svg{width:18px}.health-copy{min-width:0;flex:1}.health-copy strong{display:block;font-size:.8rem}.health-copy small{color:var(--muted);font-size:.7rem}.health-status{font-size:.68rem;font-weight:850;border-radius:999px;padding:5px 8px}.health-status.ok{background:rgba(24,135,93,.12);color:var(--success)}.health-status.warn{background:rgba(215,138,20,.13);color:var(--warning)}
/* Toasts */
.app-toast{background:var(--surface);color:var(--text);border:1px solid var(--line);border-left:4px solid var(--info);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.app-toast.toast-success{border-left-color:var(--success)}.app-toast.toast-danger{border-left-color:var(--danger)}.app-toast.toast-warning{border-left-color:var(--warning)}.app-toast .toast-header{background:var(--surface);color:var(--text);border-bottom-color:var(--line);gap:8px}.app-toast .toast-header svg{width:18px}.app-toast .toast-body{background:var(--surface)}
.sidebar-backdrop{display:none}.sidebar-close{color:#fff;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12)}
@media(max-width:1199px){.app-content{padding:22px}.app-topbar{padding:0 22px}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:991px){.app-sidebar{transform:translateX(-104%);transition:transform .25s ease}.app-workspace{margin-left:0}.sidebar-open .app-sidebar{transform:translateX(0)}.sidebar-open .sidebar-backdrop{display:block;position:fixed;inset:0;z-index:1030;background:rgba(23,15,11,.55);backdrop-filter:blur(3px)}.cost-panel{position:static}.equiv-grid{grid-template-columns:1fr}.precision-control{margin:.75rem 0}.app-topbar{padding:0 16px}.app-content{padding:18px 15px 28px}.app-footer{padding:14px 16px}.page-heading p{display:none}}
@media(max-width:767px){.conversion-flow{grid-template-columns:1fr}.flow-arrow{transform:rotate(90deg);height:18px}.conversion-summary{padding:14px}.detail-grid{grid-template-columns:1fr}.topbar-actions{gap:6px}.topbar-pill{padding:0 10px}.hero-panel{padding:21px}.hero-panel h2{font-size:1.35rem}.app-footer{flex-direction:column}.table td,.table th{padding:11px 8px}}
@media(max-width:575px){.page-heading-icon{display:none}.app-topbar{height:66px}.brand-area{height:66px}.user-menu{border:0;background:transparent;padding:0}.user-menu:after,.user-copy{display:none!important}.user-avatar{width:40px;height:40px}.app-content{padding-top:14px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important}}

/* V21.2 — pesquisa global e painel aprimorado */
.global-search{position:relative;flex:1;max-width:560px;margin:0 22px}.global-search-box{height:44px;display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid var(--line);border-radius:13px;padding:0 12px;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}.global-search-box:focus-within{background:var(--surface);border-color:color-mix(in srgb,var(--brand-600) 55%,var(--line));box-shadow:0 0 0 4px color-mix(in srgb,var(--brand-600) 10%,transparent)}.global-search-box svg{width:18px;color:var(--muted);flex:0 0 auto}.global-search-box input{width:100%;border:0;outline:0;background:transparent;color:var(--text);font:inherit}.global-search-box input::placeholder{color:var(--muted)}.global-search-box kbd{white-space:nowrap;border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:7px;padding:3px 7px;font-size:.67rem;box-shadow:none}.global-search-results{position:absolute;z-index:1100;top:calc(100% + 9px);left:0;right:0;max-height:min(480px,70vh);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:7px}.global-search-result{display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:11px;color:var(--text);text-decoration:none}.global-search-result:hover,.global-search-result.active{background:var(--surface-2);color:var(--brand-700)}.global-search-result-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand-600) 10%,var(--surface));color:var(--brand-700);flex:0 0 auto}.global-search-result-icon svg{width:17px}.global-search-result-copy{min-width:0;flex:1}.global-search-result-copy strong,.global-search-result-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-search-result-copy small{color:var(--muted);font-size:.72rem}.global-search-result-type{font-size:.63rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800}.global-search-empty{padding:22px;text-align:center;color:var(--muted)}.global-search-trigger{width:42px;height:42px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:12px;display:grid;place-items:center}.sidebar-link-future{opacity:.52;cursor:not-allowed}.sidebar-link-future small{margin-left:auto;font-size:.58rem;text-transform:uppercase;letter-spacing:.05em;background:rgba(255,255,255,.12);border-radius:999px;padding:3px 6px}.mini-metric{height:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 15px;border:1px solid var(--line);background:var(--surface);border-radius:13px}.mini-metric span{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.75rem;font-weight:750}.mini-metric svg{width:16px}.mini-metric strong{font-size:1.05rem}.operation-note{display:flex;gap:9px;align-items:center;margin-top:12px;padding:10px;border-radius:10px;background:var(--surface-2);color:var(--muted);font-size:.72rem}.operation-note svg{width:16px;flex:0 0 auto}.metric-value{font-size:clamp(1.25rem,2vw,1.7rem)}
@media(max-width:1199px){.global-search{max-width:400px;margin:0 12px}.global-search-box kbd{display:none}}
@media(max-width:991px){.global-search{position:static;flex:0;margin:0}.global-search-box{display:none;position:absolute;left:15px;right:15px;top:72px;z-index:1090;background:var(--surface);box-shadow:var(--shadow)}.global-search.search-open .global-search-box{display:flex}.global-search-results{position:absolute;left:15px;right:15px;top:122px}.app-topbar:has(.global-search.search-open){z-index:1095}}

/* Fase 2.1 — PDV */
.pdv-shell{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:18px;height:calc(100vh - 155px);min-height:620px}.pdv-catalog,.pdv-cart-panel{background:var(--surface,#fff);border:1px solid var(--border,#eadfd9);border-radius:18px;box-shadow:0 8px 28px rgba(52,25,18,.06);overflow:hidden}.pdv-catalog{display:flex;flex-direction:column}.pdv-toolbar{display:flex;gap:12px;padding:15px;border-bottom:1px solid var(--border,#eadfd9)}.pdv-search{position:relative;flex:1}.pdv-search svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px}.pdv-search input{width:100%;height:46px;border:1px solid var(--border,#ddd);border-radius:12px;padding:0 14px 0 42px;background:var(--surface-soft,#faf8f6)}.pdv-categories{display:flex;gap:8px;overflow:auto;padding:12px 15px;border-bottom:1px solid var(--border,#eadfd9);scrollbar-width:thin}.pdv-categories button{white-space:nowrap;border:1px solid var(--border,#ddd);background:var(--surface,#fff);border-radius:999px;padding:8px 14px;font-weight:700}.pdv-categories button.active{background:var(--primary,#702a1f);color:#fff;border-color:var(--primary,#702a1f)}.pdv-products{padding:15px;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;overflow:auto}.pdv-product{display:flex;text-align:left;gap:12px;padding:10px;border:1px solid var(--border,#e8ddd8);border-radius:15px;background:var(--surface,#fff);min-height:108px;transition:.18s}.pdv-product:hover{transform:translateY(-2px);border-color:var(--primary,#702a1f);box-shadow:0 8px 20px rgba(112,42,31,.12)}.pdv-product:disabled{opacity:.55;filter:grayscale(.6)}.pdv-product-photo{width:82px;min-width:82px;height:82px;border-radius:12px;background:var(--surface-soft,#f4efec);display:grid;place-items:center;overflow:hidden}.pdv-product-photo img{width:100%;height:100%;object-fit:cover}.pdv-product-photo svg{width:28px;height:28px;color:var(--primary,#702a1f)}.pdv-product-info{display:flex;flex-direction:column;min-width:0}.pdv-product-info strong{font-size:.94rem;line-height:1.2}.pdv-product-info small{font-size:.72rem;color:var(--muted,#786b65);margin-top:5px}.pdv-product-info b{margin-top:auto;color:var(--primary,#702a1f);font-size:1rem}.pdv-cart-panel{display:flex;flex-direction:column}.pdv-cart-head{display:flex;justify-content:space-between;align-items:center;padding:17px 18px;border-bottom:1px solid var(--border,#eadfd9)}.pdv-cart-head h2{font-size:1.15rem;margin:0}.pdv-cart-head small{color:var(--muted,#786b65)}.pdv-cart-items{flex:1;overflow:auto;padding:12px}.pdv-cart-empty{height:100%;min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted,#786b65);text-align:center;gap:8px}.pdv-cart-empty svg{width:42px;height:42px;opacity:.45}.pdv-cart-item{padding:12px;border:1px solid var(--border,#eadfd9);border-radius:13px;margin-bottom:10px;background:var(--surface-soft,#fcfaf9)}.pdv-cart-item-top,.pdv-cart-item-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px}.pdv-cart-item-top small{display:block;color:var(--muted,#786b65)}.qty-control{display:flex;align-items:center;border:1px solid var(--border,#ddd);border-radius:10px;overflow:hidden;background:#fff}.qty-control button{width:34px;height:32px;border:0;background:transparent;font-size:1.2rem}.qty-control b{min-width:30px;text-align:center}.pdv-cart-summary{border-top:1px solid var(--border,#eadfd9);padding:16px 18px;background:var(--surface,#fff)}.pdv-cart-summary>div{display:flex;justify-content:space-between;margin-bottom:8px}.pdv-cart-summary .pdv-total{font-size:1.25rem;padding-top:8px;border-top:1px dashed var(--border,#ddd);margin-bottom:14px}.pdv-cart-summary kbd{float:right;margin-left:auto}.checkout-total{background:var(--surface-soft,#f7f2ef);border-radius:14px;padding:16px;display:flex;align-items:center;gap:15px}.checkout-total strong{margin-left:auto;font-size:1.55rem;color:var(--primary,#702a1f)}.checkout-total small{display:block;color:#21804a}.cash-open-card{display:flex;gap:15px;align-items:center;padding:15px;border-radius:14px;background:#edf8f1;color:#195f36}.cash-open-card svg{width:36px;height:36px}.cash-open-card div{display:flex;flex-direction:column}.cash-open-card strong{font-size:1.08rem}.cash-open-card span{font-size:.85rem}
@media(max-width:1199px){.pdv-shell{grid-template-columns:minmax(0,1fr) 330px}.pdv-products{grid-template-columns:repeat(auto-fill,minmax(175px,1fr))}}
@media(max-width:991px){.pdv-shell{display:block;height:auto}.pdv-catalog{min-height:650px}.pdv-cart-panel{position:fixed;z-index:1050;left:10px;right:10px;bottom:10px;max-height:55vh;transform:translateY(calc(100% - 82px));transition:.25s}.pdv-cart-panel:focus-within,.pdv-cart-panel:hover{transform:translateY(0)}.pdv-cart-items{min-height:180px}.pdv-products{padding-bottom:100px}}

/* Fase 2.2: pedidos e caixa */
.metric-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin-bottom:16px}.metric-card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:18px;box-shadow:0 8px 24px rgba(52,25,18,.05);display:flex;flex-direction:column;min-height:104px}.metric-card small{color:var(--muted);font-weight:700}.metric-card strong{font-size:1.45rem;margin-top:auto}.metric-card>svg{position:absolute;right:16px;top:16px;width:25px;color:var(--primary);opacity:.55}.filter-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:14px;display:flex;align-items:flex-end;gap:12px;margin-bottom:16px;box-shadow:0 8px 24px rgba(52,25,18,.04)}.filter-card label{font-size:.76rem;font-weight:800;color:var(--muted);margin-bottom:5px}.filter-grow{flex:1;min-width:220px}.data-card{background:var(--surface);border:1px solid var(--border);border-radius:17px;box-shadow:0 8px 26px rgba(52,25,18,.05);overflow:hidden}.data-card-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:17px 18px;border-bottom:1px solid var(--border)}.data-card-head h2{font-size:1.05rem;margin:0}.data-card-head p{margin:3px 0 0;color:var(--muted);font-size:.82rem}.app-table{margin:0}.app-table thead th{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);padding:12px 14px;border-bottom:1px solid var(--border);white-space:nowrap}.app-table tbody td{padding:12px 14px;border-color:var(--border)}.app-table td small{display:block;color:var(--muted);font-size:.75rem}.empty-cell{text-align:center;color:var(--muted);padding:35px!important}.order-number-link{border:0;background:none;color:var(--primary);padding:0;text-align:left}.order-items-summary{max-width:330px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:.72rem;font-weight:800}.status-new{background:#fff3cd;color:#7a5900}.status-confirmed{background:#e6f0ff;color:#2455a4}.status-preparing{background:#fff0df;color:#954c00}.status-ready{background:#e5f8ee;color:#176b3c}.status-out_for_delivery{background:#eee8ff;color:#5d3caf}.status-completed{background:#dcf5e7;color:#146b3a}.status-cancelled{background:#fee6e6;color:#9b2020}.order-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}.order-detail-grid>div{background:var(--surface-soft);border:1px solid var(--border);border-radius:12px;padding:12px;display:flex;flex-direction:column}.order-detail-grid small{color:var(--muted)}.order-detail-grid span{font-size:.8rem;color:var(--muted)}.order-detail-items{border:1px solid var(--border);border-radius:13px;overflow:hidden}.order-detail-items>div{display:flex;justify-content:space-between;gap:15px;padding:12px;border-bottom:1px solid var(--border)}.order-detail-items>div:last-child{border-bottom:0}.order-detail-items small{display:block;color:var(--muted)}.order-note{margin-top:14px;background:var(--surface-soft);border-radius:12px;padding:12px}.order-note p{margin:4px 0 0}.order-status-select{width:auto;min-width:180px}.loading-state{padding:50px;text-align:center;color:var(--muted)}.cash-hero{background:linear-gradient(135deg,#5d2119,#973b2d);color:#fff;border-radius:18px;padding:22px;display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:16px;box-shadow:0 12px 30px rgba(93,33,25,.18)}.cash-hero h2{font-size:1.25rem;margin:8px 0 4px}.cash-hero p{margin:0;color:#fffbd9}.cash-hero-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.empty-hero{min-height:310px;background:var(--surface);border:1px solid var(--border);border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}.empty-hero>svg{width:50px;height:50px;color:var(--primary);margin-bottom:12px}.empty-hero p{color:var(--muted)}
@media(max-width:900px){.filter-card{flex-wrap:wrap}.filter-card>div{flex:1 1 180px}.filter-card .btn{width:100%}.order-detail-grid{grid-template-columns:repeat(2,1fr)}.cash-hero{align-items:flex-start;flex-direction:column}.cash-hero-actions{justify-content:flex-start}.order-items-summary{max-width:180px}}
@media(max-width:560px){.order-detail-grid{grid-template-columns:1fr}.metric-row{grid-template-columns:1fr}.data-card-head{align-items:flex-start;flex-direction:column}.order-status-select{width:100%}}


/* V22.5 - Centro de Configurações */
.settings-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}.settings-nav{background:var(--surface);border:1px solid var(--line);border-radius:17px;padding:10px;position:sticky;top:86px;box-shadow:0 8px 24px rgba(52,25,18,.05)}.settings-nav a{display:flex;align-items:center;gap:10px;min-height:46px;padding:12px 13px;border:1px solid transparent;border-radius:11px;color:var(--text)!important;text-decoration:none;font-weight:700;margin:2px 0;transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease}.settings-nav a span{display:block;color:inherit!important;opacity:1!important;visibility:visible!important}.settings-nav a svg{width:19px;height:19px;flex:0 0 auto;color:inherit!important;stroke:currentColor!important;opacity:1!important;visibility:visible!important}.settings-nav a:hover{background:var(--surface-2);color:var(--brand-800)!important;border-color:var(--line);transform:translateX(2px)}.settings-nav a.active,.settings-nav a.active:hover,.settings-nav a.active:focus{background:linear-gradient(135deg,var(--brand-800),var(--brand-700))!important;color:#fff!important;border-color:var(--brand-800)!important;box-shadow:0 8px 18px rgba(112,42,31,.20);transform:none}.settings-nav a.active span,.settings-nav a.active svg{color:#fff!important;stroke:#fff!important;fill:none!important;opacity:1!important;visibility:visible!important}.settings-nav a:focus-visible{outline:3px solid rgba(168,70,50,.22);outline-offset:2px}.settings-content{min-width:0}.whatsapp-preview{display:flex;justify-content:center;background:linear-gradient(135deg,#f2eee9,#e6ddd6);border-radius:16px;padding:22px}.wa-phone{width:min(100%,360px);border:8px solid #262626;border-radius:27px;background:#efeae2;overflow:hidden;box-shadow:0 18px 42px #0002}.wa-head{background:#075e54;color:#fff;padding:14px 17px;font-weight:800}.wa-chat{padding:28px 14px;background-color:#efeae2;background-image:radial-gradient(#8c817322 1px,transparent 1px);background-size:12px 12px}.wa-bubble{background:#d9fdd3;border-radius:12px 4px 12px 12px;padding:12px;font-size:.88rem;line-height:1.45;box-shadow:0 2px 4px #0001}.hours-list{display:grid;gap:10px}.hours-row{display:grid;grid-template-columns:minmax(180px,1fr) 140px 32px 140px;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:13px;background:var(--surface-soft)}
@media(max-width:800px){.settings-layout{grid-template-columns:1fr}.settings-nav{position:static;display:flex;overflow:auto}.settings-nav a{min-width:max-content}.hours-row{grid-template-columns:1fr 1fr}.hours-row>span{display:none}.hours-row .form-check{grid-column:1/-1}}

/* Fase 2.3 — Cozinha / KDS */
.kds-page{min-height:calc(100vh - 150px)}
.kds-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}.kds-toolbar h2{margin:0;font-size:1.35rem}.kds-toolbar p{margin:3px 0 0;color:var(--text-muted)}.kds-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
.kds-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.kds-summary>div{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:13px 16px;display:grid;grid-template-columns:auto 1fr;column-gap:9px;align-items:center;box-shadow:var(--shadow-sm)}.kds-summary strong{font-size:1.35rem;line-height:1}.kds-summary small{grid-column:2;color:var(--text-muted)}.kds-summary i{width:13px}
.kds-dot{width:10px;height:10px;border-radius:999px;display:inline-block}.dot-new{background:#e8a317}.dot-preparing{background:#da6b28}.dot-ready{background:#2f9e62}
.kds-board{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:14px;align-items:start}.kds-column{background:color-mix(in srgb,var(--surface) 88%,var(--bg));border:1px solid var(--border);border-radius:18px;min-height:520px;overflow:hidden}.kds-column>header{padding:14px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background:var(--surface)}.kds-column>header>div{display:flex;align-items:center;gap:9px}.kds-column h3{font-size:1rem;margin:0}.kds-count{min-width:28px;height:28px;border-radius:999px;display:grid;place-items:center;background:var(--bg);font-weight:800}.kds-list{padding:12px;display:flex;flex-direction:column;gap:11px;max-height:calc(100vh - 330px);overflow:auto}
.kds-order-card{background:var(--surface);border:1px solid var(--border);border-left:5px solid #8aa0ad;border-radius:14px;padding:13px;box-shadow:var(--shadow-sm);transition:.2s}.kds-order-card.age-warning{border-left-color:#e8a317}.kds-order-card.age-danger{border-left-color:#d54545;box-shadow:0 0 0 2px rgba(213,69,69,.08)}.kds-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.kds-card-head>div:first-child{display:flex;flex-direction:column}.kds-card-head strong{font-size:1.05rem}.kds-card-head span{font-size:.76rem;color:var(--text-muted);text-transform:uppercase;font-weight:700}.kds-timer{display:flex;align-items:center;gap:5px;font-weight:800;font-size:.85rem;background:var(--bg);padding:5px 8px;border-radius:9px;white-space:nowrap}.kds-timer i{width:14px}.kds-customer{margin-top:9px;display:flex;align-items:center;gap:6px;font-size:.85rem;color:var(--text-muted)}.kds-customer i{width:14px}.kds-items{list-style:none;margin:12px 0;padding:0;display:flex;flex-direction:column;gap:7px}.kds-items li{font-weight:750;line-height:1.3;padding-left:12px;position:relative}.kds-items li:before{content:'•';position:absolute;left:0;color:var(--brand)}.kds-note{display:flex;gap:8px;padding:9px 10px;border-radius:10px;background:#fff5d9;color:#664b00;font-size:.84rem;margin-bottom:10px}.kds-note i{width:15px;flex:0 0 auto}.kds-card-actions{display:flex;gap:7px;align-items:center}.kds-awaiting{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:8px;background:var(--bg);border-radius:9px;color:var(--text-muted);font-weight:700;font-size:.83rem}.kds-awaiting i{width:15px}.kds-empty{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--text-muted);gap:5px}.kds-empty i{width:28px}.kds-empty strong{color:var(--text)}.kds-footer-status{display:flex;justify-content:space-between;align-items:center;padding:12px 4px;color:var(--text-muted)}.kds-online,.kds-offline{display:flex;align-items:center;gap:7px}.kds-online span,.kds-offline span{width:8px;height:8px;border-radius:99px;background:#2f9e62;box-shadow:0 0 0 4px rgba(47,158,98,.12)}.kds-offline span{background:#d54545;box-shadow:0 0 0 4px rgba(213,69,69,.12)}
.kds-page.is-fullscreen{background:var(--bg);padding:18px;overflow:auto}.kds-page.is-fullscreen .kds-list{max-height:calc(100vh - 230px)}
@media(max-width:1050px){.kds-board{grid-template-columns:1fr}.kds-column{min-height:260px}.kds-list{max-height:none}.kds-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.kds-toolbar{align-items:flex-start;flex-direction:column}.kds-toolbar-actions{width:100%}.kds-toolbar-actions .btn{flex:1}.kds-summary{grid-template-columns:repeat(2,1fr)}.kds-summary>div{padding:11px}.kds-board{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px}.kds-column{min-width:88vw;scroll-snap-align:start}.kds-footer-status{align-items:flex-start;gap:8px;flex-direction:column}}
/* V25 consolidated modules */
.health-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--app-border,#eadfd9)}
.health-row:last-child{border-bottom:0}
@media print{.app-sidebar,.app-topbar,.app-footer,.filter-card,.btn{display:none!important}.app-workspace{margin:0!important}.app-content{padding:0!important}}

/* V25.3 - submenu de configurações com classe exclusiva */
.settings-nav a.settings-nav-active,
.settings-nav a.settings-nav-active:hover,
.settings-nav a.settings-nav-active:focus,
.settings-nav a.settings-nav-active:visited {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-height:46px !important;
  background:#702a1f !important;
  background-image:linear-gradient(135deg,#702a1f,#8b3527) !important;
  color:#ffffff !important;
  border:1px solid #702a1f !important;
  opacity:1 !important;
  visibility:visible !important;
  box-shadow:0 8px 18px rgba(112,42,31,.22) !important;
}
.settings-nav a.settings-nav-active span,
.settings-nav a.settings-nav-active i,
.settings-nav a.settings-nav-active svg,
.settings-nav a.settings-nav-active svg * {
  color:#ffffff !important;
  stroke:#ffffff !important;
  opacity:1 !important;
  visibility:visible !important;
}

/* V25.4 - turnos, pausas e horários especiais */
.multi-hours-list{display:grid;gap:14px}.multi-day{border:1px solid var(--app-border);border-radius:16px;padding:14px;background:var(--app-surface)}.multi-day-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.slot-list{display:grid;gap:9px}.slot-row{display:grid;grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr) auto;align-items:center;gap:10px}.empty-slots{padding:12px;border:1px dashed var(--app-border);border-radius:12px;color:var(--app-muted);text-align:center}.holiday-suggestions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.holiday-chip{border:1px solid #e3c7bf;background:#fff8f5;color:#7d2b1c;border-radius:999px;padding:7px 11px;font-weight:700;font-size:.82rem}.holiday-chip:hover{background:#7d2b1c;color:#fff}.settings-content .table td{vertical-align:middle}@media(max-width:700px){.slot-row{grid-template-columns:1fr auto 1fr auto}.multi-day-head{align-items:flex-start;flex-direction:column}.holiday-chip{font-size:.76rem}}

/* V25.6 - horários: botões confiáveis e fechamento rápido por dia */
.remove-slot svg,.remove-slot svg *,.remove-special-slot svg,.remove-special-slot svg *{pointer-events:none!important}
.day-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.day-closed-toggle{display:inline-flex;align-items:center;gap:7px;margin:0;padding:7px 10px;border:1px solid var(--app-border);border-radius:10px;background:var(--app-surface);font-weight:700;cursor:pointer;user-select:none}
.day-closed-toggle .form-check-input{margin:0;cursor:pointer}
.multi-day.day-is-closed .slot-list{opacity:.45}
.multi-day.day-is-closed .slot-row{display:none}
.multi-day.day-is-closed .empty-slots{display:block!important}
@media(max-width:700px){.day-actions{width:100%;justify-content:space-between}.day-closed-toggle{flex:1;justify-content:center}}

.topbar-pause-button{height:42px;border:1px solid #e5c6b9;background:#fff8f4;color:var(--brand-800);border-radius:13px;padding:0 13px;display:flex;align-items:center;gap:8px;font-size:.78rem;font-weight:800;white-space:nowrap}.topbar-pause-button.is-paused{background:#9d3427;color:#fff;border-color:#9d3427}.topbar-pause-button svg{width:18px}.quick-pause-dot{width:8px;height:8px;border-radius:50%;background:#55b982}.topbar-pause-button.is-paused .quick-pause-dot{background:#ffd1c8}.modal-kicker{display:block;color:var(--brand-700);font-size:.68rem;font-weight:850;text-transform:uppercase;letter-spacing:.11em}.quick-pause-current{display:flex;gap:12px;padding:14px;border:1px solid #cfe9da;background:#f1fbf5;border-radius:14px;margin-bottom:18px}.quick-pause-current.is-active{border-color:#efc0b7;background:#fff1ee}.quick-pause-current div{display:flex;flex-direction:column}.quick-pause-current small{color:var(--muted)}.quick-duration-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.quick-duration{height:42px;border:1px solid var(--line);border-radius:11px;background:var(--surface);font-weight:750}.quick-duration.active{background:var(--brand-800);border-color:var(--brand-800);color:#fff}.quick-pause-feedback{padding:11px 13px;border-radius:10px;margin-top:14px}.quick-pause-feedback.success{background:#eaf8ef;color:#26754e}.quick-pause-feedback.error{background:#ffeded;color:#a82e25}@media(max-width:1100px){.topbar-pause-button{width:42px;padding:0;justify-content:center}}@media(max-width:520px){.quick-duration-grid{grid-template-columns:repeat(2,1fr)}}

.erp-emoji-field{position:relative;display:block;width:100%}.erp-emoji-field>input,.erp-emoji-field>textarea{padding-right:42px!important}.erp-emoji-button{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:30px;height:30px;border:0;border-radius:8px;background:transparent;cursor:pointer;font-size:18px;line-height:1;z-index:3}.erp-emoji-button:hover{background:#0000000d}.erp-emoji-field>textarea+.erp-emoji-button{top:8px;transform:none}.erp-emoji-panel{position:fixed;z-index:99999;width:284px;max-height:330px;padding:10px;background:#fff;border:1px solid #d9dde3;border-radius:14px;box-shadow:0 18px 55px #0003}.erp-emoji-search{width:100%;padding:9px 10px;border:1px solid #ddd;border-radius:9px;margin-bottom:8px}.erp-emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;max-height:260px;overflow:auto}.erp-emoji-item{border:0;background:transparent;border-radius:7px;font-size:22px;padding:4px;cursor:pointer}.erp-emoji-item:hover{background:#f1f3f5}input,textarea,button{font-family:inherit,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}


/* ===== Bendito Food 4.0.8: topo responsivo + identidade visual ===== */
.app-topbar{
  overflow:visible;
}
.topbar-left{
  flex:0 1 250px;
  width:min(250px,22vw);
  max-width:250px;
  overflow:hidden;
}
.page-heading{
  width:100%;
  overflow:hidden;
}
.page-heading>div{
  min-width:0;
  overflow:hidden;
}
.page-heading h1,
.page-heading p{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.global-search{
  min-width:180px;
}
.topbar-shortcuts,
.topbar-actions{
  flex:0 0 auto;
}
.brand-mark-logo{
  overflow:hidden;
  background:#fff;
  padding:3px;
}
.brand-mark-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  border-radius:10px;
}
.backend-bg-color{
  background:var(--custom-backend-bg,#f6f3f1);
}
.backend-bg-image{
  background:
    linear-gradient(rgba(246,243,241,var(--custom-backend-overlay,.88)),rgba(246,243,241,var(--custom-backend-overlay,.88))),
    var(--custom-backend-image) center/cover fixed;
}
.backend-bg-color .app-workspace,
.backend-bg-image .app-workspace{
  background:transparent;
}
.backend-bg-color .app-content,
.backend-bg-image .app-content{
  background:transparent;
}

.branding-preview{
  min-height:72px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface-2);
}
.branding-preview img{
  width:60px;height:60px;object-fit:contain;border-radius:12px;background:#fff;padding:4px;
}
.backend-bg-preview{
  height:130px;
  border-radius:16px;
  background-position:center;
  background-size:cover;
  display:flex;
  align-items:flex-end;
  padding:12px;
  border:1px solid var(--line);
}
.backend-bg-preview span{
  padding:5px 9px;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  font-size:.72rem;
  font-weight:800;
}
.appearance-demo{
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--line);
  background:var(--surface-2);
  padding:14px;
  border-radius:16px;
}
.appearance-demo-mark{
  width:48px;height:48px;border-radius:14px;background:#fff;
  display:grid;place-items:center;font-weight:950;overflow:hidden;
  color:var(--brand-900);border:1px solid var(--line);
}
.appearance-demo-mark img{width:100%;height:100%;object-fit:contain;padding:3px}
.appearance-demo strong,.appearance-demo small{display:block}
.appearance-demo small{color:var(--muted);margin-top:3px}

@media(max-width:1550px){
  .topbar-left{flex-basis:190px;width:190px;max-width:190px}
  .page-heading p{display:none}
  .global-search{margin-left:8px;margin-right:8px}
}
@media(max-width:1350px){
  .topbar-shortcuts{display:none!important}
  .topbar-left{flex-basis:220px;width:220px;max-width:220px}
}
@media(max-width:1100px){
  .topbar-left{flex-basis:180px;width:180px;max-width:180px}
}
@media(max-width:991px){
  .topbar-left{flex:1 1 auto;width:auto;max-width:none}
  .page-heading h1{max-width:52vw}
}


/* ===== Bendito Food 4.0.9: correção definitiva do topo e fundo ===== */

/* No desktop, o título da página sai da barra superior. A página já possui seu
   próprio cabeçalho no conteúdo e isso elimina qualquer disputa com a busca. */
@media (min-width: 992px){
  .app-topbar{
    justify-content:flex-start !important;
    gap:12px !important;
    min-width:0;
    overflow:hidden !important;
  }
  .app-topbar .topbar-left{
    display:none !important;
  }
  .app-topbar .global-search{
    flex:1 1 360px !important;
    min-width:220px !important;
    max-width:520px !important;
    margin:0 !important;
  }
  .app-topbar .global-search-box{
    width:100% !important;
    min-width:0 !important;
  }
  .app-topbar .topbar-shortcuts{
    flex:0 0 auto !important;
    min-width:0;
  }
  .app-topbar .topbar-actions{
    flex:0 0 auto !important;
    margin-left:auto !important;
    min-width:0;
  }
}
@media (min-width:992px) and (max-width:1250px){
  .app-topbar .topbar-shortcuts{display:none !important}
  .app-topbar .global-search{max-width:none !important}
}
@media (min-width:992px) and (max-width:1100px){
  .app-topbar .topbar-pause-button span:not(.quick-pause-dot){display:none!important}
  .app-topbar .precision-dropdown .topbar-pill span{display:none!important}
}

/* A personalização agora pinta a área de trabalho, e não apenas o body atrás dela. */
body.backend-bg-default,
body.backend-bg-default .backend-workspace{
  background:var(--canvas) !important;
}
body.backend-bg-color,
body.backend-bg-color .backend-workspace,
body.backend-bg-color .app-content{
  background:var(--custom-backend-bg,#f6f3f1) !important;
}
body.backend-bg-image{
  background:var(--custom-backend-bg,#f6f3f1) !important;
}
body.backend-bg-image .backend-workspace{
  position:relative;
  background:
    linear-gradient(
      rgba(246,243,241,var(--custom-backend-overlay,.88)),
      rgba(246,243,241,var(--custom-backend-overlay,.88))
    ),
    var(--custom-backend-image) center center / cover fixed no-repeat !important;
}
body.backend-bg-image .app-content{
  background:transparent !important;
}

/* Não deixe o rodapé repintar uma faixa opaca por cima da personalização. */
body.backend-bg-color .app-footer,
body.backend-bg-image .app-footer{
  background:rgba(255,255,255,.54);
  backdrop-filter:blur(10px);
}

/* prévia visual da configuração */
.appearance-live-preview{
  min-height:150px;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--preview-bg,#f6f3f1);
  background-size:cover;
  background-position:center;
}
.appearance-live-preview::after{
  content:"";
  position:absolute;inset:0;
  background:rgba(246,243,241,var(--preview-overlay,.88));
  opacity:var(--preview-image-active,0);
}
.appearance-live-preview .preview-card{
  position:relative;z-index:2;
  min-width:260px;
  padding:16px 18px;
  border-radius:16px;
  background:rgba(255,255,255,.9);
  box-shadow:0 10px 30px rgba(35,20,14,.12);
  display:flex;align-items:center;gap:12px;
}


/* ===== Bendito Food 4.0.10: PDV sem sobreposição ===== */
.page-pdv .app-content{
  flex:1 1 auto;
  min-height:0;
  padding-top:18px !important;
  overflow:hidden;
}
.page-pdv .pdv-shell{
  height:calc(100dvh - var(--topbar) - 36px) !important;
  min-height:0 !important;
  max-height:calc(100dvh - var(--topbar) - 36px);
  align-items:stretch;
}
.page-pdv .pdv-catalog,
.page-pdv .pdv-cart-panel{
  min-height:0;
  height:100%;
}
.page-pdv .pdv-products,
.page-pdv .pdv-cart-items{
  min-height:0;
}
.page-pdv .pdv-toolbar{
  flex:0 0 auto;
}
.page-pdv .pdv-categories{
  flex:0 0 auto;
}
.page-pdv .pdv-products{
  flex:1 1 auto;
  overflow:auto;
}
.page-pdv .pdv-cart-items{
  flex:1 1 auto;
  overflow:auto;
}
.page-pdv .pdv-cart-summary{
  flex:0 0 auto;
}
@media(max-width:991px){
  .page-pdv .app-content{
    overflow:visible;
    padding-top:14px !important;
  }
  .page-pdv .pdv-shell{
    height:auto !important;
    max-height:none;
  }
  .page-pdv .pdv-catalog{
    height:auto;
    min-height:650px;
  }
}


/* ===== Bendito Food 4.0.12 — Temas completos + topo definitivo ===== */

/* TOPO: grid previsível, sem sobreposição */
@media (min-width:992px){
  .app-topbar{
    display:grid !important;
    grid-template-columns:minmax(240px,1fr) auto auto !important;
    align-items:center !important;
    gap:14px !important;
    overflow:hidden !important;
  }
  .app-topbar .topbar-left{display:none!important}
  .app-topbar .global-search{
    grid-column:1;
    width:100%!important;
    max-width:560px!important;
    min-width:0!important;
    margin:0!important;
  }
  .app-topbar .topbar-shortcuts{
    grid-column:2;
    display:flex!important;
    min-width:0;
    white-space:nowrap;
  }
  .app-topbar .topbar-actions{
    grid-column:3;
    margin-left:0!important;
    min-width:0;
    white-space:nowrap;
  }
}
@media (min-width:992px) and (max-width:1320px){
  .app-topbar{grid-template-columns:minmax(220px,1fr) auto!important}
  .app-topbar .topbar-shortcuts{display:none!important}
  .app-topbar .topbar-actions{grid-column:2}
}
@media (min-width:992px) and (max-width:1120px){
  .topbar-pause-button{display:none!important}
}

/* Variáveis personalizáveis */
body{
  --brand-900:var(--custom-sidebar,#4a170f);
  --brand-800:color-mix(in srgb,var(--custom-sidebar,#4a170f) 90%,white 10%);
  --brand-700:var(--custom-accent,#a33625);
  --brand-600:var(--custom-accent,#a33625);
  --surface:var(--custom-card,#ffffff);
  --ink:var(--custom-text,#231713);
}
.app-sidebar{
  background:var(--custom-sidebar,#4a170f)!important;
}
.app-topbar{
  background:var(--custom-topbar,#ffffff)!important;
}
.btn-primary,.quick-pause,.nav-link.active,.settings-nav-active{
  --bs-btn-bg:var(--custom-accent,#a33625);
  --bs-btn-border-color:var(--custom-accent,#a33625);
}
.data-card,.app-panel,.metric-card,.panel-card{
  background:var(--custom-card,#ffffff)!important;
}
.app-content,.app-workspace{
  color:var(--custom-text,#231713);
}

/* Presets */
body.theme-brasa{
  --custom-sidebar:#4a170f;--custom-topbar:#fffaf7;--custom-accent:#a33625;--custom-card:#ffffff;--custom-text:#231713;
}
body.theme-carvao{
  --custom-sidebar:#171717;--custom-topbar:#202020;--custom-accent:#d94332;--custom-card:#252525;--custom-text:#f5f2ee;
  --canvas:#121212;--surface-2:#202020;--line:#393939;--muted:#bfb9b5;
}
body.theme-carvao .app-topbar,body.theme-carvao .topbar-pill,body.theme-carvao .global-search-box{color:#f5f2ee}
body.theme-claro{
  --custom-sidebar:#f1e8e2;--custom-topbar:#ffffff;--custom-accent:#8b2f21;--custom-card:#ffffff;--custom-text:#2a211d;
}
body.theme-claro .app-sidebar,body.theme-claro .app-sidebar a,body.theme-claro .sidebar-section-title{color:#3b2a23!important}
body.theme-noturno{
  --custom-sidebar:#101217;--custom-topbar:#171a21;--custom-accent:#ff5b45;--custom-card:#1d2129;--custom-text:#f7f7f7;
  --canvas:#11141a;--surface-2:#171b23;--line:#343946;--muted:#aeb5c2;
}
body.theme-noturno .app-topbar,body.theme-noturno .topbar-pill,body.theme-noturno .global-search-box{color:#f7f7f7}
body.theme-verde{
  --custom-sidebar:#18392c;--custom-topbar:#f6fbf8;--custom-accent:#26845d;--custom-card:#ffffff;--custom-text:#1b2d25;
}

/* Presets UI */
.theme-preset-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.theme-preset{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  cursor:pointer;
  background:var(--surface-2);
  transition:.18s ease;
}
.theme-preset input{display:none}
.theme-preset:hover,.theme-preset.active{border-color:var(--brand-700);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand-700) 16%,transparent)}
.theme-preset-preview{display:flex;height:36px;border-radius:10px;overflow:hidden;margin-bottom:8px}
.theme-preset-preview i:nth-child(1){width:30%}.theme-preset-preview i:nth-child(2){width:50%}.theme-preset-preview i:nth-child(3){width:20%}
.theme-preset strong{font-size:.86rem}
@media(max-width:900px){.theme-preset-grid{grid-template-columns:1fr 1fr}}


/* ===== Bendito Food 4.0.13 — aplicação final das cores ===== */
.app-sidebar{background-color:var(--custom-sidebar)!important}
.app-topbar{background-color:var(--custom-topbar)!important}
.app-content,.backend-workspace{color:var(--custom-text)!important}
.data-card,.app-panel,.metric-card,.panel-card,.settings-nav,.pdv-catalog,.pdv-cart-panel{
  background-color:var(--custom-card)!important;
}
.btn-primary,
.btn.btn-primary{
  background-color:var(--custom-accent)!important;
  border-color:var(--custom-accent)!important;
}
.settings-nav-active,
.settings-nav a.settings-nav-active{
  background-color:var(--custom-accent)!important;
  color:#fff!important;
}
/* cor personalizada do fundo */
body.backend-bg-color .backend-workspace,
body.backend-bg-color .app-content{
  background-color:var(--custom-backend-bg)!important;
}

/* Bendito Food 4.0.14 — cores de texto personalizáveis */
body{color:var(--custom-text,#231713)!important}
h1,h2,h3,h4,h5,h6,.page-head h1,.data-card-head h2,.app-panel h1,.app-panel h2,.modal-title,.panel-title,.metric-card strong,.table th,.form-label,strong,b{color:var(--custom-heading,#1f1714)!important}
.text-muted,.muted,.form-text,.page-head p,.data-card-head p,.metric-card span,.empty-state p,.small,.small-muted,.eyebrow{color:var(--custom-muted,#786d68)!important}
a:not(.btn):not(.nav-link){color:var(--custom-link,#a33625)}
.app-sidebar,.app-sidebar a,.app-sidebar .nav-link,.app-sidebar .sidebar-section-title,.app-sidebar .brand-copy strong,.app-sidebar .brand-copy small,.app-sidebar .sidebar-footer{color:var(--custom-sidebar-text,#fff8f4)!important}
.app-sidebar svg{color:currentColor!important}
.app-topbar,.app-topbar a,.app-topbar button,.app-topbar .topbar-pill,.app-topbar .topbar-user,.app-topbar .global-search-box,.app-topbar .global-search-box input{color:var(--custom-topbar-text,#2a211d)!important}
.form-control,.form-select,textarea,input:not([type=color]),select,.input-group-text,.form-check-label{color:var(--custom-input-text,#2a211d)!important}
.form-control::placeholder,textarea::placeholder,input::placeholder{color:color-mix(in srgb,var(--custom-input-text,#2a211d) 55%,transparent)!important}
.btn-primary,.btn-danger,.btn-success,.quick-pause,.add-btn,.action-primary{color:var(--custom-button-text,#fff)!important}
.btn-outline-primary{color:var(--custom-link,#a33625)!important}
.btn-outline-primary:hover{color:var(--custom-button-text,#fff)!important}
body.theme-carvao .form-control,body.theme-carvao .form-select,body.theme-carvao textarea,body.theme-noturno .form-control,body.theme-noturno .form-select,body.theme-noturno textarea{background-color:color-mix(in srgb,var(--custom-card,#252525) 88%,#000 12%)!important;border-color:color-mix(in srgb,var(--custom-muted,#aaa) 28%,transparent)!important}
body.theme-carvao .settings-nav a,body.theme-noturno .settings-nav a{color:var(--custom-text,#f7f7f7)!important}
body.theme-carvao .settings-nav a.settings-nav-active,body.theme-noturno .settings-nav a.settings-nav-active{color:var(--custom-button-text,#fff)!important}


/* Bendito Food 4.0.15 — temas clicáveis */
.theme-preset{position:relative;user-select:none;cursor:pointer}
.theme-preset.active{
  border-color:var(--custom-accent,#a33625)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--custom-accent,#a33625) 22%,transparent)!important;
}
.theme-preset.active::after{
  content:"✓";
  position:absolute;right:9px;top:8px;
  width:22px;height:22px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--custom-accent,#a33625);
  color:#fff;font-size:.75rem;font-weight:900;
}
.theme-preset:active{transform:scale(.995)}


/* ===== Bendito Food 4.0.16 — MENU LATERAL: configuração é a fonte única ===== */

/*
  Os blocos antigos body.theme-* definiam --custom-sidebar e outras variáveis
  novamente. A partir daqui, as variáveis inline geradas pelo PHP têm prioridade
  e todos os elementos do menu consomem exclusivamente essas variáveis.
*/
body.theme-brasa,
body.theme-carvao,
body.theme-claro,
body.theme-noturno,
body.theme-verde,
body.theme-custom{
  --brand-900:var(--custom-sidebar,#4a170f) !important;
  --brand-800:var(--custom-sidebar,#4a170f) !important;
  --brand-700:var(--custom-accent,#a33625) !important;
  --brand-600:var(--custom-accent,#a33625) !important;
}

/* Fundo inteiro do menu */
html body .app-sidebar{
  background:var(--custom-sidebar,#4a170f) !important;
  background-image:none !important;
  color:var(--custom-sidebar-text,#fff8f4) !important;
}

/* Marca */
html body .app-sidebar .brand-link,
html body .app-sidebar .brand-copy strong,
html body .app-sidebar .brand-copy small{
  color:var(--custom-sidebar-text,#fff8f4) !important;
}
html body .app-sidebar .brand-copy small{
  opacity:.72 !important;
}

/* Títulos de seção */
html body .app-sidebar .nav-group-label,
html body .app-sidebar .sidebar-section-title{
  color:var(--custom-sidebar-text,#fff8f4) !important;
  opacity:.58 !important;
}

/* Links e ícones */
html body .app-sidebar .sidebar-link,
html body .app-sidebar .sidebar-link span,
html body .app-sidebar .sidebar-link svg,
html body .app-sidebar .nav-link,
html body .app-sidebar .nav-link span,
html body .app-sidebar .nav-link svg{
  color:var(--custom-sidebar-text,#fff8f4) !important;
  stroke:currentColor !important;
}
html body .app-sidebar .sidebar-link{
  opacity:.82 !important;
}

/* Hover usa a própria cor do texto com transparência */
html body .app-sidebar .sidebar-link:hover{
  color:var(--custom-sidebar-text,#fff8f4) !important;
  opacity:1 !important;
  background:color-mix(in srgb,var(--custom-sidebar-text,#fff8f4) 10%,transparent) !important;
}

/* Item ativo: contraste calculado sem cor fixa antiga */
html body .app-sidebar .sidebar-link.active{
  color:var(--custom-sidebar,#4a170f) !important;
  background:var(--custom-sidebar-text,#fff8f4) !important;
  opacity:1 !important;
}
html body .app-sidebar .sidebar-link.active svg{
  color:var(--custom-sidebar,#4a170f) !important;
}

/* Rodapé / versão */
html body .app-sidebar .sidebar-footer,
html body .app-sidebar .version-chip,
html body .app-sidebar .version-chip strong{
  color:var(--custom-sidebar-text,#fff8f4) !important;
}
html body .app-sidebar .version-chip{
  background:color-mix(in srgb,var(--custom-sidebar-text,#fff8f4) 8%,transparent) !important;
  border-color:color-mix(in srgb,var(--custom-sidebar-text,#fff8f4) 12%,transparent) !important;
}

/* Bordas do menu respeitam a cor de texto */
html body .app-sidebar .brand-area,
html body .app-sidebar .sidebar-footer{
  border-color:color-mix(in srgb,var(--custom-sidebar-text,#fff8f4) 12%,transparent) !important;
}

/* Topo também fica sem gradiente/cores herdadas */
html body .app-topbar{
  background:var(--custom-topbar,#ffffff) !important;
  color:var(--custom-topbar-text,#2a211d) !important;
}

/* Modo personalizado: os campos salvos controlam tudo */
body.theme-custom .app-sidebar{
  background:var(--custom-sidebar) !important;
}
body.theme-custom .app-sidebar .sidebar-link,
body.theme-custom .app-sidebar .nav-group-label,
body.theme-custom .app-sidebar .brand-copy strong,
body.theme-custom .app-sidebar .brand-copy small{
  color:var(--custom-sidebar-text) !important;
}

/* Bendito Food 4.0.17 — editor visual */
.hero-panel h1,.hero-panel h2,.hero-panel h3{color:var(--custom-heading,#1f1714)}
.hero-panel p,.hero-panel p strong{color:inherit}
.ve-selected{outline:2px dashed #2f80ed!important;outline-offset:3px!important}
#visualEditorPanel{position:fixed;z-index:99999;width:350px;max-height:calc(100dvh - 16px);overflow:auto;display:none;background:#fff;color:#1d1d1f;border:1px solid #d7d7dc;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.25);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
#visualEditorPanel.open{display:block}
#visualEditorPanel *{box-sizing:border-box}
#visualEditorPanel .ve-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:14px 15px;background:#f8f8fa;border-bottom:1px solid #e5e5e9}
#visualEditorPanel .ve-head strong,#visualEditorPanel .ve-head small{display:block;color:#19191b!important}
#visualEditorPanel .ve-head small{font-size:11px;color:#777!important;max-width:270px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#visualEditorPanel .ve-head button{border:0;background:#ececf0;width:30px;height:30px;border-radius:9px;font-size:20px;color:#222!important}
#visualEditorPanel .ve-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px}
#visualEditorPanel label{font-size:11px;font-weight:700;color:#444!important}
#visualEditorPanel input,#visualEditorPanel select{display:block;width:100%;margin-top:5px;height:36px;border:1px solid #d5d5da;border-radius:9px;background:#fff;color:#222!important;padding:6px 8px}
#visualEditorPanel input[type=color]{padding:3px}
#visualEditorPanel .ve-scope{padding:0 14px 12px}
#visualEditorPanel .ve-scope label{display:flex;align-items:center;gap:8px;font-size:12px}
#visualEditorPanel .ve-scope input{width:auto;height:auto;margin:0}
#visualEditorPanel .ve-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:12px 14px;border-top:1px solid #ececf0}
#visualEditorPanel .ve-actions button{height:40px;border-radius:10px;border:1px solid #d5d5da;background:#fff;color:#222!important;font-weight:800}
#visualEditorPanel .ve-actions .ve-primary{background:#9b3426;border-color:#9b3426;color:#fff!important}
#visualEditorPanel .ve-tip{padding:0 14px 14px;color:#777!important;font-size:11px}
@media(max-width:600px){#visualEditorPanel{width:calc(100vw - 16px)!important;left:8px!important;top:8px!important}}


/* ===== Bendito Food 4.0.18 — TEMAS PROFISSIONAIS ===== */

/* Os presets apenas fornecem valores; as variáveis inline salvas continuam sendo a fonte final. */
body.theme-material,
body.theme-fluent,
body.theme-carbon,
body.theme-enterprise,
body.theme-graphite,
body.theme-neutral,
body.theme-emerald,
body.theme-contrast,
body.theme-custom{
  --brand-900:var(--custom-sidebar)!important;
  --brand-800:var(--custom-sidebar)!important;
  --brand-700:var(--custom-accent)!important;
  --brand-600:var(--custom-accent)!important;
}

/* Superfícies */
body.theme-carbon,
body.theme-graphite,
body.theme-contrast{
  --canvas:var(--custom-backend-bg)!important;
  --surface:var(--custom-card)!important;
  --surface-2:color-mix(in srgb,var(--custom-card) 88%,#fff 12%)!important;
  --line:color-mix(in srgb,var(--custom-text) 18%,transparent)!important;
  --muted:var(--custom-muted)!important;
}

/* Inputs em temas escuros */
body.theme-carbon .form-control,
body.theme-carbon .form-select,
body.theme-carbon textarea,
body.theme-graphite .form-control,
body.theme-graphite .form-select,
body.theme-graphite textarea,
body.theme-contrast .form-control,
body.theme-contrast .form-select,
body.theme-contrast textarea{
  background:color-mix(in srgb,var(--custom-card) 88%,#000 12%)!important;
  border-color:color-mix(in srgb,var(--custom-text) 28%,transparent)!important;
  color:var(--custom-input-text)!important;
}

/* High contrast */
body.theme-contrast *:focus-visible{
  outline:3px solid var(--custom-accent)!important;
  outline-offset:2px!important;
}
body.theme-contrast .btn-primary{
  background:var(--custom-accent)!important;
  color:var(--custom-button-text)!important;
  border-color:var(--custom-accent)!important;
}

/* Tema Material */
body.theme-material .data-card,
body.theme-material .metric-card,
body.theme-material .app-panel{
  border-radius:18px!important;
}
body.theme-material .btn,
body.theme-material .form-control,
body.theme-material .form-select{
  border-radius:14px!important;
}

/* Tema Fluent */
body.theme-fluent .data-card,
body.theme-fluent .metric-card,
body.theme-fluent .app-panel{
  border-radius:8px!important;
}
body.theme-fluent .btn,
body.theme-fluent .form-control,
body.theme-fluent .form-select{
  border-radius:6px!important;
}

/* Enterprise */
body.theme-enterprise .data-card,
body.theme-enterprise .metric-card,
body.theme-enterprise .app-panel{
  border-radius:10px!important;
}

/* Graphite */
body.theme-graphite .data-card,
body.theme-graphite .metric-card,
body.theme-graphite .app-panel{
  box-shadow:none!important;
}

/* Warm neutral */
body.theme-neutral .data-card,
body.theme-neutral .metric-card,
body.theme-neutral .app-panel{
  box-shadow:0 8px 30px rgba(59,52,49,.08)!important;
}

/* Emerald */
body.theme-emerald .btn-primary{
  box-shadow:0 6px 14px color-mix(in srgb,var(--custom-accent) 24%,transparent)!important;
}

/* Cards de seleção de tema */
.theme-preset-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.theme-preset-preview{
  height:44px!important;
}
.theme-preset strong{
  line-height:1.25;
}
@media(max-width:1200px){.theme-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:800px){.theme-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:520px){.theme-preset-grid{grid-template-columns:1fr!important}}


/* ===== Bendito Food 4.0.19 — editor visual vence estilos fixos ===== */
.settings-nav a[style],
.settings-nav a[style] span,
.settings-nav a[style] svg,
.app-sidebar a[style],
.app-sidebar a[style] span,
.app-sidebar a[style] svg,
.app-topbar a[style],
.app-topbar button[style],
.btn[style]{
  color:inherit;
}
.ve-selected{
  position:relative;
}


/* Bendito Food 4.0.20 — editor visual: fundo substitui gradientes antigos */
.settings-nav a[style*="background"],
.app-sidebar a[style*="background"],
.btn[style*="background"],
.card[style*="background"],
.data-card[style*="background"],
.app-panel[style*="background"]{
  background-image:none!important;
}


/* ===== Bendito Food 4.0.21 — fundo uniforme em menus/botões ===== */
.settings-nav a[style*="background"] > *,
.app-sidebar a[style*="background"] > *,
.btn[style*="background"] > *,
.topbar-pill[style*="background"] > *,
.quick-action[style*="background"] > *{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
}


/* Bendito Food 4.0.22 — restauração do tema */
#visualEditorPanel .ve-reset-all{
  padding:0 14px 12px;
}
#visualEditorPanel .ve-reset-all button{
  width:100%;
  min-height:38px;
  border:1px solid #e3b6b1;
  background:#fff6f5;
  color:#9b3426!important;
  border-radius:10px;
  font-size:11px;
  font-weight:800;
}


/* ===== Bendito Food 4.0.23 — TEMA VOVÓ CEMA ORIGINAL ===== */
body.theme-vovo_cema{
  --brand-900:var(--custom-sidebar,#4B201A)!important;
  --brand-800:color-mix(in srgb,var(--custom-sidebar,#4B201A) 90%,#fff 10%)!important;
  --brand-700:var(--custom-accent,#A63B2C)!important;
  --brand-600:var(--custom-accent,#A63B2C)!important;
  --canvas:var(--custom-backend-bg,#F7F1EC)!important;
  --surface:var(--custom-card,#fff)!important;
  --surface-2:#FCF8F5!important;
  --line:#E8DCD4!important;
  --muted:var(--custom-muted,#7A6A63)!important;
}
body.theme-vovo_cema .app-sidebar{
  background:var(--custom-sidebar,#4B201A)!important;
}
body.theme-vovo_cema .app-topbar{
  background:var(--custom-topbar,#FFF9F4)!important;
  border-bottom:1px solid #E8DCD4!important;
}
body.theme-vovo_cema .data-card,
body.theme-vovo_cema .metric-card,
body.theme-vovo_cema .app-panel,
body.theme-vovo_cema .panel-card{
  background:var(--custom-card,#fff)!important;
  border:1px solid #E8DCD4!important;
  border-radius:18px!important;
  box-shadow:0 10px 28px rgba(75,32,26,.07)!important;
}
body.theme-vovo_cema .btn{
  border-radius:12px!important;
}
body.theme-vovo_cema .btn-primary{
  background:var(--custom-accent,#A63B2C)!important;
  border-color:var(--custom-accent,#A63B2C)!important;
  box-shadow:0 6px 16px rgba(166,59,44,.16)!important;
}
body.theme-vovo_cema .form-control,
body.theme-vovo_cema .form-select,
body.theme-vovo_cema textarea{
  background:#FFFDFC!important;
  border-color:#DED0C8!important;
  border-radius:12px!important;
}
body.theme-vovo_cema .sidebar-link.active{
  background:#FFF7F1!important;
  color:#4B201A!important;
  border-radius:12px!important;
}
body.theme-vovo_cema .sidebar-link:hover{
  background:rgba(255,247,241,.10)!important;
}
body.theme-vovo_cema .hero-panel{
  background:
    radial-gradient(circle at 92% 10%,rgba(255,255,255,.09) 0 70px,transparent 71px),
    linear-gradient(135deg,#6A2A21,#9C3A2B)!important;
  color:#fff!important;
  border-radius:22px!important;
}
body.theme-vovo_cema .hero-panel h1,
body.theme-vovo_cema .hero-panel h2,
body.theme-vovo_cema .hero-panel h3,
body.theme-vovo_cema .hero-panel p{
  color:#fff!important;
}


/* ===== Bendito Food 4.0.26 — texto do item selecionado sempre legível ===== */

/* O item ativo usa uma cor exclusiva de texto/ícone. */
html body .app-sidebar .sidebar-link.active,
html body .app-sidebar .sidebar-link.active span,
html body .app-sidebar .sidebar-link.active strong,
html body .app-sidebar .sidebar-link.active small,
html body .app-sidebar .sidebar-link.active i,
html body .app-sidebar .sidebar-link.active svg,
html body .app-sidebar .nav-link.active,
html body .app-sidebar .nav-link.active span,
html body .app-sidebar .nav-link.active svg,
html body .settings-nav a.settings-nav-active,
html body .settings-nav a.settings-nav-active span,
html body .settings-nav a.settings-nav-active svg{
  color:var(--custom-sidebar-active-text,#4B201A)!important;
  fill:currentColor;
  stroke:currentColor!important;
}

/* Se o item ativo recebeu uma cor pelo editor visual, os filhos seguem o pai. */
html body .app-sidebar .sidebar-link.active[style],
html body .app-sidebar .sidebar-link.active[style] *,
html body .settings-nav a.settings-nav-active[style],
html body .settings-nav a.settings-nav-active[style] *{
  color:inherit!important;
}

/* O item ativo não pode herdar opacidade reduzida. */
html body .app-sidebar .sidebar-link.active,
html body .app-sidebar .nav-link.active,
html body .settings-nav a.settings-nav-active{
  opacity:1!important;
}

/* Ícone ativo acompanha a cor do texto. */
html body .app-sidebar .sidebar-link.active svg,
html body .app-sidebar .nav-link.active svg,
html body .settings-nav a.settings-nav-active svg{
  color:currentColor!important;
  stroke:currentColor!important;
}


/* Bendito Food 4.0.35 — item ativo permanece visível no menu lateral */
.app-sidebar .sidebar-link.active,
.app-sidebar .nav-link.active{
  scroll-margin-block:72px;
}


/* ===== Bendito Food 4.0.40 — BARRA HORIZONTAL DE SEÇÃO ===== */
.section-tabs-shell{
  position:relative;
  z-index:30;
  display:flex!important;
  align-items:center;
  gap:14px;
  width:100%;
  min-height:64px;
  margin:0 0 20px!important;
  padding:9px 12px!important;
  background:var(--custom-card,#fff)!important;
  border:1px solid color-mix(in srgb,var(--custom-muted,#786d68) 22%,transparent)!important;
  border-radius:18px!important;
  box-shadow:0 8px 24px rgba(35,23,19,.06)!important;
  overflow:hidden;
}
.section-tabs-heading{
  flex:0 0 140px;
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:3px 15px 3px 7px!important;
  border-right:1px solid color-mix(in srgb,var(--custom-muted,#786d68) 20%,transparent)!important;
}
.section-tabs-kicker{
  display:block;
  margin:0 0 3px;
  font-size:.64rem!important;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:.1em;
  font-weight:900!important;
  color:var(--custom-muted,#786d68)!important;
}
.section-tabs-heading strong{
  font-size:.84rem!important;
  line-height:1.25;
  color:var(--custom-heading,#231713)!important;
}
.section-tabs-scroll{
  flex:1 1 auto;
  min-width:0;
  display:flex!important;
  align-items:center;
  gap:5px;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:2px 2px 4px!important;
  scrollbar-width:thin;
}
.section-tab{
  flex:0 0 auto;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  padding:8px 13px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  text-decoration:none!important;
  white-space:nowrap;
  font-size:.8rem!important;
  font-weight:800!important;
  color:var(--custom-muted,#6f625d)!important;
  background:transparent!important;
}
.section-tab svg{
  width:16px!important;height:16px!important;
  stroke:currentColor!important;
}
.section-tab:hover{
  background:color-mix(in srgb,var(--custom-accent,#a33625) 8%,transparent)!important;
  border-color:color-mix(in srgb,var(--custom-accent,#a33625) 14%,transparent)!important;
  color:var(--custom-heading,#231713)!important;
}
.section-tab.active{
  background:var(--custom-accent,#a33625)!important;
  border-color:var(--custom-accent,#a33625)!important;
  color:var(--custom-button-text,#fff)!important;
  box-shadow:0 5px 13px color-mix(in srgb,var(--custom-accent,#a33625) 20%,transparent)!important;
}
.section-tab.active svg{stroke:currentColor!important}

@media(min-width:992px){
  .section-tabs-shell{
    position:sticky!important;
    top:82px!important;
  }
}
@media(max-width:900px){
  .section-tabs-shell{
    min-height:54px;
    display:block!important;
    padding:8px!important;
  }
  .section-tabs-heading{display:none!important}
  .section-tabs-scroll{width:100%}
  .section-tab{min-height:38px;padding:7px 10px!important}
}


/* ===== Bendito Food 4.0.41 — ABAS DE SEÇÃO: LARGURA TOTAL + TRANSPARÊNCIA AO ROLAR ===== */

/*
 * A app-content possui 28px de padding horizontal no desktop.
 * Compensamos esse padding para a barra ocupar 100% da coluna direita,
 * de ponta a ponta da área útil do conteúdo.
 */
.section-tabs-shell{
  box-sizing:border-box!important;
  width:calc(100% + 56px)!important;
  max-width:none!important;
  margin-left:-28px!important;
  margin-right:-28px!important;
  padding-left:28px!important;
  padding-right:28px!important;

  /* Estado normal: box sólido e claramente separado do conteúdo. */
  background:var(--custom-card,#fff)!important;
  border-left:0!important;
  border-right:0!important;
  border-top:1px solid color-mix(in srgb,var(--custom-muted,#786d68) 18%,transparent)!important;
  border-bottom:1px solid color-mix(in srgb,var(--custom-muted,#786d68) 20%,transparent)!important;
  border-radius:0!important;
  box-shadow:0 8px 24px rgba(35,23,19,.055)!important;

  transition:
    background-color .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    backdrop-filter .18s ease;
}

/* Ao ficar sticky, ganha transparência e blur para não cobrir o conteúdo de forma pesada. */
.section-tabs-shell.is-stuck{
  background:color-mix(in srgb,var(--custom-card,#fff) 78%,transparent)!important;
  border-top-color:color-mix(in srgb,var(--custom-muted,#786d68) 12%,transparent)!important;
  border-bottom-color:color-mix(in srgb,var(--custom-muted,#786d68) 20%,transparent)!important;
  box-shadow:0 10px 28px rgba(35,23,19,.10)!important;
  backdrop-filter:blur(16px) saturate(135%)!important;
  -webkit-backdrop-filter:blur(16px) saturate(135%)!important;
}

/* Mantém o conteúdo interno alinhado e elegante. */
.section-tabs-heading{
  min-height:46px;
}
.section-tabs-scroll{
  min-height:46px;
}

/* No modo escuro, transparência equivalente e contraste preservado. */
body.erp-quick-dark .section-tabs-shell.is-stuck{
  background:rgba(27,29,32,.80)!important;
  border-color:rgba(255,255,255,.10)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.24)!important;
  backdrop-filter:blur(16px) saturate(125%)!important;
  -webkit-backdrop-filter:blur(16px) saturate(125%)!important;
}

/* Breakpoints: compensam exatamente o padding usado pela app-content. */
@media(max-width:1199px){
  .section-tabs-shell{
    width:calc(100% + 44px)!important;
    margin-left:-22px!important;
    margin-right:-22px!important;
    padding-left:22px!important;
    padding-right:22px!important;
  }
}
@media(max-width:991px){
  .section-tabs-shell{
    width:calc(100% + 30px)!important;
    margin-left:-15px!important;
    margin-right:-15px!important;
    padding-left:15px!important;
    padding-right:15px!important;
  }
}


/* ===== Bendito Food 4.0.42 — REMOVE VÃO ENTRE TOPO E ABAS DA SEÇÃO ===== */

/*
 * Remove o espaço visual entre a topbar e a navegação horizontal da seção.
 * A barra passa a "encaixar" diretamente abaixo do cabeçalho.
 */
.app-content{
  padding-top:0!important;
}

/* Se houver wrappers internos aplicando margem no primeiro bloco, neutraliza. */
.app-content > .section-tabs-shell:first-child{
  margin-top:0!important;
}

/* Barra da seção sem vão superior. */
.section-tabs-shell{
  margin-top:0!important;
  margin-bottom:20px!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}

/*
 * No desktop, cola exatamente sob a topbar.
 * Usamos 70px porque a topbar atual ocupa aproximadamente essa altura.
 */
@media(min-width:992px){
  .section-tabs-shell{
    top:70px!important;
  }
}

/* Remove qualquer faixa branca causada por background/margem entre header e conteúdo. */
.app-main,
.app-content{
  border-top:0!important;
}
.app-content::before{
  display:none!important;
}

/* Quando sticky, continua encostada ao topo sem gerar faixa vazia. */
.section-tabs-shell.is-stuck{
  margin-top:0!important;
  transform:none!important;
}

/* Pequeno ajuste visual: união entre topbar e barra da seção */
.app-topbar{
  margin-bottom:0!important;
}


/* ===== Bendito Food 4.0.45 — COMPORTAMENTO CORRETO DAS ABAS NO PDV ===== */

/*
 * O PDV não usa a rolagem normal da página:
 * catálogo e carrinho possuem suas próprias áreas roláveis.
 * Portanto a navegação de seção NÃO deve usar sticky nesta tela.
 */
body.page-pdv .app-content{
  height:calc(100dvh - var(--topbar))!important;
  min-height:0!important;
  overflow:hidden!important;

  display:flex!important;
  flex-direction:column!important;

  padding-top:0!important;
  padding-bottom:14px!important;
}

/* A barra Vendas fica sempre visível no topo do conteúdo do PDV. */
body.page-pdv .section-tabs-shell{
  position:relative!important;
  top:auto!important;
  left:auto!important;

  flex:0 0 auto!important;
  width:calc(100% + 56px)!important;
  max-width:none!important;

  margin-top:0!important;
  margin-bottom:12px!important;

  /* No PDV ela não deve receber aparência de sticky/transparente. */
  background:var(--custom-card,#fff)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:0 5px 16px rgba(35,23,19,.05)!important;
  z-index:20!important;
}

body.page-pdv .section-tabs-shell.is-stuck{
  position:relative!important;
  top:auto!important;
  background:var(--custom-card,#fff)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:0 5px 16px rgba(35,23,19,.05)!important;
}

/*
 * O shell do PDV passa a ocupar somente o espaço que sobrou
 * depois da barra horizontal da seção.
 */
body.page-pdv .pdv-shell{
  flex:1 1 auto!important;
  min-height:0!important;

  height:auto!important;
  max-height:none!important;

  margin-top:0!important;
}

/* Catálogo e carrinho continuam preenchendo toda a altura útil. */
body.page-pdv .pdv-catalog,
body.page-pdv .pdv-cart-panel{
  height:100%!important;
  min-height:0!important;
}

/* Busca e categorias permanecem paradas; somente os produtos rolam. */
body.page-pdv .pdv-toolbar,
body.page-pdv .pdv-categories{
  flex:0 0 auto!important;
}

body.page-pdv .pdv-products,
body.page-pdv .pdv-cart-items{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}

/* Não deixa a barra de categorias colidir com a navegação da seção. */
body.page-pdv .pdv-categories{
  position:relative!important;
  top:auto!important;
  z-index:5!important;
}

/* Tema escuro */
body.page-pdv.erp-quick-dark .section-tabs-shell,
body.page-pdv.erp-quick-dark .section-tabs-shell.is-stuck{
  background:#1b1d20!important;
  border-color:#3a3e44!important;
}

/* Tablets/celulares: PDV volta ao fluxo vertical normal. */
@media(max-width:991px){
  body.page-pdv .app-content{
    height:auto!important;
    min-height:calc(100dvh - var(--topbar))!important;
    overflow:visible!important;
    display:block!important;
    padding-bottom:28px!important;
  }

  body.page-pdv .section-tabs-shell{
    width:calc(100% + 30px)!important;
    margin-left:-15px!important;
    margin-right:-15px!important;
    padding-left:15px!important;
    padding-right:15px!important;
    margin-bottom:12px!important;
  }

  body.page-pdv .pdv-shell{
    height:auto!important;
    max-height:none!important;
  }

  body.page-pdv .pdv-catalog,
  body.page-pdv .pdv-cart-panel{
    height:auto!important;
  }
}


/* Bendito Food 4.1.0 — modo rápido consolidado */
/* Bendito Food 4.0.40 — modo rápido claro/escuro independente */
body.erp-quick-dark{
  --canvas:#101214!important;
  --surface:#1b1d20!important;
  --surface-2:#24272b!important;
  --text:#f4f6f8!important;
  --muted:#b7bcc3!important;
  --line:#3a3e44!important;

  --custom-backend-bg:#101214!important;
  --custom-card:#1b1d20!important;
  --custom-text:#f4f6f8!important;
  --custom-heading:#ffffff!important;
  --custom-muted:#b7bcc3!important;
  --custom-topbar:#17191c!important;
  --custom-topbar-text:#f4f6f8!important;
  --custom-input-text:#f4f6f8!important;
  --custom-link:#8ab4f8!important;

  background:#101214!important;
  color:#f4f6f8!important;
}
body.erp-quick-dark .app-main,
body.erp-quick-dark .app-content{
  background:#101214!important;
  color:#f4f6f8!important;
}
body.erp-quick-dark .app-topbar{
  background:#17191c!important;
  color:#f4f6f8!important;
  border-color:#34383e!important;
}
body.erp-quick-dark .global-search-box,
body.erp-quick-dark .topbar-pill,
body.erp-quick-dark .icon-button,
body.erp-quick-dark .user-menu,
body.erp-quick-dark .topbar-user{
  background:#22252a!important;
  color:#f4f6f8!important;
  border-color:#3b4047!important;
}
body.erp-quick-dark .global-search-box input,
body.erp-quick-dark .app-topbar input{
  color:#f4f6f8!important;
  background:transparent!important;
}
body.erp-quick-dark .section-tabs-shell,
body.erp-quick-dark .card,
body.erp-quick-dark .data-card,
body.erp-quick-dark .metric-card,
body.erp-quick-dark .app-panel,
body.erp-quick-dark .panel-card,
body.erp-quick-dark .dash-kpi,
body.erp-quick-dark .dash-count,
body.erp-quick-dark .dash-panel,
body.erp-quick-dark .pricing-kpi,
body.erp-quick-dark .settings-card,
body.erp-quick-dark .modal-content{
  background:#1b1d20!important;
  color:#f4f6f8!important;
  border-color:#3a3e44!important;
}
body.erp-quick-dark h1,
body.erp-quick-dark h2,
body.erp-quick-dark h3,
body.erp-quick-dark h4,
body.erp-quick-dark h5,
body.erp-quick-dark h6{
  color:#fff!important;
}
body.erp-quick-dark .text-muted,
body.erp-quick-dark .muted,
body.erp-quick-dark .form-text,
body.erp-quick-dark .section-tabs-kicker,
body.erp-quick-dark .section-tab:not(.active){
  color:#b7bcc3!important;
}
body.erp-quick-dark .form-control,
body.erp-quick-dark .form-select,
body.erp-quick-dark textarea,
body.erp-quick-dark input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
body.erp-quick-dark select{
  background:#24272b!important;
  color:#f4f6f8!important;
  border-color:#454a52!important;
}
body.erp-quick-dark .table{
  --bs-table-bg:transparent!important;
  --bs-table-color:#f4f6f8!important;
  --bs-table-border-color:#3a3e44!important;
  color:#f4f6f8!important;
}
body.erp-quick-dark .dropdown-menu{
  background:#202328!important;
  border-color:#3a3e44!important;
}
body.erp-quick-dark .dropdown-item{color:#f4f6f8!important}
body.erp-quick-dark .dropdown-item:hover{background:#2b2f35!important}

/* botão mostra estado inequívoco */
body.erp-quick-dark #erpThemeToggle{
  background:#f4f6f8!important;
  color:#111315!important;
  border-color:#f4f6f8!important;
}

/* preserva sidebar escolhida pelo tema; modo rápido altera principalmente conteúdo/topo */


/* ===== Bendito Food 4.1.4 — MODO NOTURNO CONFIÁVEL ===== */
html[data-erp-color-mode="dark"] body.erp-night-mode{
  --canvas:#0e1013!important;
  --surface:#181b20!important;
  --surface-2:#21252b!important;
  --text:#f5f7fa!important;
  --muted:#aeb5bf!important;
  --line:#353a42!important;
  --cream:#1b1e23!important;

  --custom-backend-bg:#0e1013!important;
  --custom-card:#181b20!important;
  --custom-text:#f5f7fa!important;
  --custom-heading:#ffffff!important;
  --custom-muted:#aeb5bf!important;
  --custom-topbar:#15181d!important;
  --custom-topbar-text:#f5f7fa!important;
  --custom-input-text:#f5f7fa!important;
  --custom-link:#8ab4f8!important;

  background:#0e1013!important;
  color:#f5f7fa!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .app-main,
html[data-erp-color-mode="dark"] body.erp-night-mode .app-content{
  background:#0e1013!important;color:#f5f7fa!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .app-topbar,
html[data-erp-color-mode="dark"] body.erp-night-mode .section-tabs-shell,
html[data-erp-color-mode="dark"] body.erp-night-mode .data-card,
html[data-erp-color-mode="dark"] body.erp-night-mode .card,
html[data-erp-color-mode="dark"] body.erp-night-mode .metric-card,
html[data-erp-color-mode="dark"] body.erp-night-mode .dash-kpi,
html[data-erp-color-mode="dark"] body.erp-night-mode .dash-count,
html[data-erp-color-mode="dark"] body.erp-night-mode .dash-panel,
html[data-erp-color-mode="dark"] body.erp-night-mode .settings-card,
html[data-erp-color-mode="dark"] body.erp-night-mode .modal-content{
  background:#181b20!important;color:#f5f7fa!important;border-color:#353a42!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .app-topbar{
  background:#15181d!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .global-search-box,
html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pill,
html[data-erp-color-mode="dark"] body.erp-night-mode .icon-button,
html[data-erp-color-mode="dark"] body.erp-night-mode .user-menu,
html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-user{
  background:#20242a!important;color:#f5f7fa!important;border-color:#383e47!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode input:not([type="color"]):not([type="checkbox"]):not([type="radio"]),
html[data-erp-color-mode="dark"] body.erp-night-mode textarea,
html[data-erp-color-mode="dark"] body.erp-night-mode select,
html[data-erp-color-mode="dark"] body.erp-night-mode .form-control,
html[data-erp-color-mode="dark"] body.erp-night-mode .form-select{
  background:#20242a!important;color:#f5f7fa!important;border-color:#404650!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode h1,
html[data-erp-color-mode="dark"] body.erp-night-mode h2,
html[data-erp-color-mode="dark"] body.erp-night-mode h3,
html[data-erp-color-mode="dark"] body.erp-night-mode h4,
html[data-erp-color-mode="dark"] body.erp-night-mode h5,
html[data-erp-color-mode="dark"] body.erp-night-mode h6{
  color:#fff!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .table{
  --bs-table-bg:transparent!important;
  --bs-table-color:#f5f7fa!important;
  --bs-table-border-color:#353a42!important;
  color:#f5f7fa!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .dropdown-menu{
  background:#1b1f24!important;border-color:#353a42!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .dropdown-item{color:#f5f7fa!important}
html[data-erp-color-mode="dark"] body.erp-night-mode .dropdown-item:hover{background:#292e35!important}
html[data-erp-color-mode="dark"] body.erp-night-mode #erpThemeToggle{
  background:#f5f7fa!important;color:#111318!important;border-color:#f5f7fa!important;
}

/* ===== CASAS DECIMAIS POR CAMPO ===== */
.numeric-precision-menu{
  position:fixed;
  z-index:2147483000;
  width:290px;
  padding:10px;
  border:1px solid var(--line,#ddd);
  border-radius:16px;
  background:var(--custom-card,#fff);
  color:var(--custom-text,#221915);
  box-shadow:0 18px 55px rgba(0,0,0,.18);
}
.numeric-precision-menu[hidden]{display:none!important}
.numeric-menu-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:4px 5px 10px;border-bottom:1px solid var(--line,#eee)}
.numeric-menu-head strong,.numeric-menu-head small{display:block}
.numeric-menu-head small{margin-top:2px;color:var(--custom-muted,#756963);font-size:.69rem}
.numeric-menu-close{border:0;background:transparent;color:inherit;font-size:1.4rem;line-height:1;padding:1px 5px;border-radius:8px}
.numeric-menu-close:hover{background:var(--surface-2,#f3efec)}
.numeric-menu-options{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:10px 0}
.numeric-menu-options button{
  min-height:58px;border:1px solid var(--line,#ddd);border-radius:11px;
  background:var(--surface-2,#f7f4f2);color:var(--custom-text,#221915);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  font-weight:800;
}
.numeric-menu-options button:first-child{grid-column:span 2}
.numeric-menu-options button span{font-size:.84rem}
.numeric-menu-options button small{font-size:.59rem;color:var(--custom-muted,#756963);font-weight:600}
.numeric-menu-options button:hover{border-color:var(--custom-accent,#6750A4)}
.numeric-menu-options button.active{
  background:var(--custom-accent,#6750A4)!important;
  border-color:var(--custom-accent,#6750A4)!important;
  color:var(--custom-button-text,#fff)!important;
}
.numeric-menu-options button.active small{color:inherit!important;opacity:.82}
.numeric-menu-foot{padding:8px 5px 3px;border-top:1px solid var(--line,#eee);font-size:.66rem;color:var(--custom-muted,#756963)}
html[data-erp-color-mode="dark"] body.erp-night-mode .numeric-precision-menu{
  background:#1b1f24!important;color:#f5f7fa!important;border-color:#3b414a!important;
}
html[data-erp-color-mode="dark"] body.erp-night-mode .numeric-menu-options button{
  background:#242930!important;color:#f5f7fa!important;border-color:#3b414a!important;
}


/* ===== Bendito Food 4.1.9 — MENU DA CONTA INDEPENDENTE ===== */
.account-menu-wrap{position:relative;display:block;z-index:1100}
.account-menu-trigger{cursor:pointer;position:relative;padding-right:9px!important}
.account-menu-trigger .account-menu-chevron{width:15px;height:15px;margin-left:1px;transition:transform .16s ease;flex:0 0 auto}
.account-menu-wrap.is-open .account-menu-trigger{background:var(--surface-2);border-color:color-mix(in srgb,var(--custom-accent,#6750A4) 38%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--custom-accent,#6750A4) 10%,transparent)}
.account-menu-wrap.is-open .account-menu-chevron{transform:rotate(180deg)}
.account-menu-panel{position:absolute;right:0;top:calc(100% + 8px);width:270px;padding:9px;background:var(--custom-card,var(--surface,#fff));color:var(--custom-text,var(--text,#231713));border:1px solid var(--line,#e5ddd8);border-radius:16px;box-shadow:0 18px 48px rgba(20,16,14,.18);z-index:3000}
.account-menu-panel[hidden]{display:none!important}
.account-menu-head{display:flex;align-items:center;gap:10px;padding:8px 8px 10px}.account-menu-head>div{min-width:0}.account-menu-head strong,.account-menu-head small{display:block}.account-menu-head strong{font-size:.84rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-menu-head small{font-size:.67rem;color:var(--custom-muted,var(--muted,#786d68));margin-top:2px}.account-menu-avatar{width:38px;height:38px;flex:0 0 auto}
.account-menu-separator{height:1px;background:var(--line,#e8e1dd);margin:3px 4px}
.account-menu-item{min-height:42px;display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;color:inherit;text-decoration:none;font-size:.79rem;font-weight:720;outline:none}.account-menu-item svg{width:17px;height:17px;flex:0 0 auto}.account-menu-item:hover,.account-menu-item:focus{background:var(--surface-2,#f6f2ef);color:var(--custom-accent,#6750A4)}.account-menu-item.is-danger{color:#b42318}.account-menu-item.is-danger:hover,.account-menu-item.is-danger:focus{background:#fff0ef;color:#a31f15}
html[data-erp-color-mode="dark"] body.erp-night-mode .account-menu-panel{background:#1b1f24!important;color:#f5f7fa!important;border-color:#3b414a!important;box-shadow:0 20px 52px rgba(0,0,0,.42)!important}html[data-erp-color-mode="dark"] body.erp-night-mode .account-menu-item:hover,html[data-erp-color-mode="dark"] body.erp-night-mode .account-menu-item:focus{background:#292e35!important}
@media(max-width:575px){.account-menu-trigger .account-menu-chevron{display:none}.account-menu-panel{position:fixed;right:10px;top:62px;width:min(300px,calc(100vw - 20px))}}


/* ===== Bendito Food 4.2.0 — CAMADAS DO MENU DA CONTA ===== */

/*
 * O menu horizontal da seção usa sticky e possui z-index próprio.
 * O dropdown da conta precisa ficar acima de qualquer navegação sticky.
 */
.app-topbar{
  position:relative!important;
  z-index:5000!important;
  overflow:visible!important;
}

.topbar-actions,
.account-menu-wrapper,
.account-menu{
  position:relative;
  overflow:visible!important;
}

.account-menu-wrapper{
  z-index:5100!important;
}

.account-menu{
  z-index:5200!important;
}

.account-menu-panel,
.account-dropdown,
[data-account-menu-panel]{
  position:absolute!important;
  z-index:5300!important;
}

/* As abas horizontais continuam acima do conteúdo, mas abaixo do topo/menu da conta. */
.section-tabs-shell{
  z-index:1200!important;
}

.section-tabs-shell.is-stuck{
  z-index:1200!important;
}

/* Garante que wrappers da workspace não recortem o dropdown. */
.app-workspace,
.backend-workspace,
.app-main{
  overflow:visible;
}

/* O conteúdo pode manter seu overflow próprio, mas não deve competir em camada. */
.app-content{
  z-index:auto!important;
}

/* Se Bootstrap ou estilos antigos adicionarem stacking context ao dropdown. */
.app-topbar .dropdown,
.app-topbar .user-menu,
.app-topbar .account-menu{
  z-index:5250!important;
}

/* O painel visual do menu da conta sempre vence sticky/header secundário. */
.app-topbar .dropdown-menu,
.app-topbar .account-menu-panel,
.app-topbar [role="menu"]{
  z-index:5400!important;
}


/* ===== Bendito Food 4.2.1 — CATEGORIAS DO PDV SEGUEM O TEMA ===== */

body.page-pdv .pdv-categories button{
  background:var(--custom-card,var(--surface,#fff))!important;
  color:var(--custom-text,var(--text,#231713))!important;
  border-color:color-mix(
    in srgb,
    var(--custom-muted,var(--muted,#786d68)) 28%,
    transparent
  )!important;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease!important;
}

body.page-pdv .pdv-categories button:hover{
  background:color-mix(
    in srgb,
    var(--custom-accent,#6750A4) 9%,
    var(--custom-card,#fff)
  )!important;
  color:var(--custom-accent,#6750A4)!important;
  border-color:color-mix(
    in srgb,
    var(--custom-accent,#6750A4) 42%,
    transparent
  )!important;
}

body.page-pdv .pdv-categories button.active{
  background:var(--custom-accent,#6750A4)!important;
  color:var(--custom-button-text,#fff)!important;
  border-color:var(--custom-accent,#6750A4)!important;
  box-shadow:0 5px 14px color-mix(
    in srgb,
    var(--custom-accent,#6750A4) 22%,
    transparent
  )!important;
}

body.page-pdv .pdv-categories button.active:hover{
  background:color-mix(
    in srgb,
    var(--custom-accent,#6750A4) 88%,
    black 12%
  )!important;
  color:var(--custom-button-text,#fff)!important;
  transform:translateY(-1px);
}

/* Demais destaques do catálogo do PDV também acompanham a cor do tema. */
body.page-pdv .pdv-product:hover{
  border-color:var(--custom-accent,#6750A4)!important;
  box-shadow:0 8px 20px color-mix(
    in srgb,
    var(--custom-accent,#6750A4) 12%,
    transparent
  )!important;
}

body.page-pdv .pdv-product-info b,
body.page-pdv .pdv-product-photo svg{
  color:var(--custom-accent,#6750A4)!important;
}

/* Modo noturno */
html[data-erp-color-mode="dark"] body.page-pdv.erp-night-mode .pdv-categories button{
  background:var(--custom-card,#181b20)!important;
  color:var(--custom-text,#f5f7fa)!important;
  border-color:#3b414a!important;
}

html[data-erp-color-mode="dark"] body.page-pdv.erp-night-mode .pdv-categories button.active{
  background:var(--custom-accent,#6750A4)!important;
  color:var(--custom-button-text,#fff)!important;
  border-color:var(--custom-accent,#6750A4)!important;
}


/* ===== Bendito Food 4.2.2 — CONTRASTE DO BOTÃO PAUSAR CARDÁPIO ===== */

/*
 * O modo noturno tinha uma regra global de texto claro no topo,
 * enquanto o botão de pausa mantinha fundo claro. Isso deixava
 * o rótulo praticamente invisível.
 */
.topbar-pause-button{
  color:var(--custom-accent,#8b3325)!important;
}

.topbar-pause-button svg,
.topbar-pause-button i{
  color:currentColor!important;
  stroke:currentColor!important;
}

html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button{
  background:#2a2423!important;
  color:#ffd9d2!important;
  border-color:#6a4640!important;
  box-shadow:none!important;
}

html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button:hover{
  background:#352b29!important;
  color:#ffffff!important;
  border-color:#8c5b52!important;
}

html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button .status-dot,
html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button .dot{
  background:#43c58a!important;
}

/* Quando o cardápio estiver efetivamente pausado, diferencia o estado. */
html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button.is-paused,
html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button[data-paused="1"]{
  background:#4a2421!important;
  color:#ffd5cf!important;
  border-color:#9a5149!important;
}

html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button.is-paused .status-dot,
html[data-erp-color-mode="dark"] body.erp-night-mode .topbar-pause-button[data-paused="1"] .status-dot{
  background:#ff806f!important;
}


/* ===== Bendito Food 4.2.3 — CABEÇALHO CARDÁPIO ONLINE SEGUE O TEMA ===== */
/* Remove a cor vinho fixa do ícone/tile do cabeçalho da gestão do cardápio. */
body.page-cardapio-admin .page-hero-icon,
body.page-cardapio-admin .cardapio-hero-icon,
body.page-cardapio-admin .page-title-icon,
body.page-cardapio-admin .cardapio-title-icon,
body.page-cardapio-admin .cardapio-admin-icon{
  background:var(--custom-accent,var(--brand-700,#6750a4))!important;
  color:var(--custom-button-text,#fff)!important;
  border-color:var(--custom-accent,var(--brand-700,#6750a4))!important;
}
body.page-cardapio-admin .page-hero-icon svg,
body.page-cardapio-admin .cardapio-hero-icon svg,
body.page-cardapio-admin .page-title-icon svg,
body.page-cardapio-admin .cardapio-title-icon svg,
body.page-cardapio-admin .cardapio-admin-icon svg{
  color:currentColor!important;
  stroke:currentColor!important;
}

body.page-cardapio-admin .editor-top-title{background:var(--custom-accent,var(--brand-700,#6750a4))!important;color:var(--custom-button-text,#fff)!important;border-color:var(--custom-accent,var(--brand-700,#6750a4))!important;}

body.page-cardapio-admin .menu-module-hero{background:var(--custom-accent,var(--brand-700,#6750a4))!important;color:var(--custom-button-text,#fff)!important;border-color:var(--custom-accent,var(--brand-700,#6750a4))!important;}

body.page-cardapio-admin .menu-module-icon{background:var(--custom-accent,var(--brand-700,#6750a4))!important;color:var(--custom-button-text,#fff)!important;border-color:var(--custom-accent,var(--brand-700,#6750a4))!important;}

/* Exact cardápio header icon */
.menu-module-icon{background:var(--custom-accent,var(--brand-700,#6750a4))!important;color:var(--custom-button-text,#fff)!important;border-color:var(--custom-accent,var(--brand-700,#6750a4))!important;}


/* ===== Bendito Food 4.2.4 — BUSCA EM PRATOS E FICHAS ===== */

.products-search-form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:14px!important;
}

.products-search-form .form-control,
.products-search-form .products-search-input,
.products-search-form input[type="search"],
.products-search-form input[name="q"]{
  width:100%!important;
  min-width:0!important;
  height:44px!important;
  margin:0!important;
}

.products-search-form .btn,
.products-search-form .products-search-button,
.products-search-form button[type="submit"]{
  width:auto!important;
  min-width:110px!important;
  height:44px!important;
  margin:0!important;
  align-self:center!important;
  justify-self:end!important;
  white-space:nowrap!important;
}

/* Evita regras antigas que forçavam o botão para uma segunda linha encostada no input. */
.products-search-form > *{
  position:static!important;
  transform:none!important;
}

/* Em telas estreitas o botão ocupa a largura inteira, mas com espaço correto. */
@media(max-width:640px){
  .products-search-form{
    grid-template-columns:1fr!important;
  }
  .products-search-form .btn,
  .products-search-form .products-search-button,
  .products-search-form button[type="submit"]{
    width:100%!important;
    justify-self:stretch!important;
  }
}


/* ===== Bendito Food 4.2.5 — ESPAÇAMENTO REAL NA BUSCA DE PRATOS ===== */

body.page-products .products-search-form,
.products-search-form{
  display:block!important;
  margin-bottom:16px!important;
}

body.page-products .products-search-row,
.products-search-row{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  width:100%!important;
  padding:14px!important;
  border-radius:16px!important;
  background:var(--custom-card,var(--surface,#fff))!important;
  border:1px solid var(--line,#e7dfda)!important;
  box-shadow:0 4px 14px rgba(0,0,0,.03)!important;
}

body.page-products .products-search-input,
.products-search-input{
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  height:44px!important;
  margin:0!important;
  border-radius:11px!important;
}

body.page-products .products-search-button,
.products-search-button{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:112px!important;
  height:44px!important;
  margin:0!important;
  position:static!important;
  transform:none!important;
}

/* Neutraliza definitivamente estilos antigos do Bootstrap input-group nessa tela. */
body.page-products .products-search-form .input-group,
.products-search-form .input-group{
  display:contents!important;
}

@media(max-width:680px){
  body.page-products .products-search-row,
  .products-search-row{
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
  }

  body.page-products .products-search-input,
  .products-search-input,
  body.page-products .products-search-button,
  .products-search-button{
    width:100%!important;
  }
}


/* ===== Bendito Food 4.2.6 — GAP VISÍVEL NA BUSCA DE PRATOS ===== */
.products-search-form{
  display:block!important;
  padding:14px!important;
  background:var(--custom-card,var(--surface,#fff))!important;
  border:1px solid var(--line,#e7dfda)!important;
  border-radius:16px!important;
}
.products-search-stack{
  display:block!important;
  width:100%!important;
}
.products-search-input{
  display:block!important;
  width:100%!important;
  height:44px!important;
  margin:0!important;
}
.products-search-action{
  display:block!important;
  margin-top:14px!important;
  padding:0!important;
}
.products-search-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:0!important;
  height:40px!important;
  padding:0 20px!important;
  margin:0!important;
  position:static!important;
  transform:none!important;
}


/* ===== Bendito Food 4.2.7 — EDITOR DO CARDÁPIO ACIMA DO BACKEND ===== */

/*
 * O editor visual abre em modal com iframe. As barras sticky do backend
 * tinham stacking context maior e apareciam por cima do editor.
 * Esta faixa de z-index fica reservada para o Studio do Cardápio.
 */
#cardapioEditorModal,
.menu-editor-modal{
  z-index:20000!important;
}

#cardapioEditorModal.show,
.menu-editor-modal.show{
  z-index:20000!important;
}

#cardapioEditorModal .modal-dialog,
.menu-editor-modal .modal-dialog{
  position:relative!important;
  z-index:20010!important;
}

#cardapioEditorModal .modal-content,
.menu-editor-modal .modal-content{
  position:relative!important;
  z-index:20020!important;
  overflow:hidden!important;
  isolation:isolate!important;
}

#cardapioEditorModal .modal-body,
.menu-editor-modal .modal-body{
  position:relative!important;
  z-index:20021!important;
  overflow:hidden!important;
}

#cardapioEditorModal iframe,
.menu-editor-modal iframe,
.menu-editor-frame{
  position:relative!important;
  z-index:20022!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  border:0!important;
}

/*
 * Bootstrap normalmente coloca o backdrop em 1050.
 * Subimos somente o backdrop correspondente ao editor.
 */
body:has(#cardapioEditorModal.show) .modal-backdrop.show{
  z-index:19990!important;
}

/* Fallback para navegadores sem :has(): backdrop ainda fica acima das barras sticky. */
.modal-backdrop{
  z-index:15000!important;
}

/* Navegações do backend continuam prioritárias sobre o conteúdo normal,
   mas nunca sobre o editor visual. */
.app-topbar{
  z-index:5000!important;
}

.section-tabs-shell,
.section-tabs-shell.is-stuck{
  z-index:1200!important;
}

/* Remove stacking contexts/recortes dos pais enquanto o editor está aberto. */
body.modal-open .app-shell,
body.modal-open .app-main,
body.modal-open .app-content,
body.modal-open .app-workspace,
body.modal-open .backend-workspace{
  overflow:visible!important;
}

/* O próprio modal precisa ocupar a viewport e não herdar transformações. */
#cardapioEditorModal{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  overflow:hidden!important;
  transform:none!important;
}

#cardapioEditorModal .modal-dialog{
  max-width:none!important;
  width:calc(100vw - 24px)!important;
  height:calc(100vh - 24px)!important;
  max-height:calc(100vh - 24px)!important;
  margin:12px!important;
  transform:none!important;
}

#cardapioEditorModal .modal-content{
  width:100%!important;
  height:100%!important;
  max-height:100%!important;
}

/* Evita que o topo horizontal continue capturando cliques acima do modal. */
body.modal-open .section-tabs-shell,
body.modal-open .app-topbar{
  pointer-events:none;
}

body.modal-open #cardapioEditorModal,
body.modal-open #cardapioEditorModal *{
  pointer-events:auto;
}


/* ===== Bendito Food 4.2.9 — MODAL UNIVERSAL DE CADASTROS ===== */
.crud-record-modal{z-index:21000!important}
.crud-record-modal .modal-dialog{width:calc(100vw - 32px);max-width:1480px;height:calc(100dvh - 32px);margin:16px auto}
.crud-record-modal .modal-content{height:100%;overflow:hidden;border:0;border-radius:20px}
.crud-record-modal .modal-header{flex:0 0 auto}
.crud-record-modal .modal-body{flex:1 1 auto;min-height:0;padding:0;background:var(--custom-backend-bg,var(--canvas,#f6f3f1));overflow:hidden}
.crud-record-frame{display:block;width:100%;height:100%;border:0;background:var(--custom-backend-bg,var(--canvas,#f6f3f1))}
.crud-record-actions{position:relative;z-index:2;flex:0 0 auto;gap:8px;background:var(--custom-card,var(--surface,#fff));box-shadow:0 -8px 24px rgba(0,0,0,.06)}
.crud-record-actions .btn{min-width:110px}
.crud-record-actions .crud-save-close{min-width:150px}

html.crud-modal-embedded-root,
html.crud-modal-embedded-root body{background:var(--custom-backend-bg,var(--canvas,#f6f3f1))!important}
body.crud-modal-embedded .app-sidebar,
body.crud-modal-embedded .app-topbar,
body.crud-modal-embedded .section-tabs-shell,
body.crud-modal-embedded .app-footer{display:none!important}
body.crud-modal-embedded .app-workspace{margin-left:0!important;min-height:100dvh!important}
body.crud-modal-embedded .app-content{padding:18px!important;max-width:none!important;margin:0!important}
body.crud-modal-embedded .page-title{scroll-margin-top:12px}
body.crud-modal-embedded [data-crud-hide-embedded]{display:none!important}
body.crud-modal-embedded .content-card,
body.crud-modal-embedded .data-card,
body.crud-modal-embedded .card{box-shadow:none}

@media(max-width:720px){
  .crud-record-modal .modal-dialog{width:100vw;height:100dvh;margin:0}
  .crud-record-modal .modal-content{border-radius:0}
  .crud-record-actions{display:grid!important;grid-template-columns:1fr 1fr}
  .crud-record-actions .crud-save-close{grid-column:1/-1}
  .crud-record-actions .btn{width:100%;min-width:0}
}


/* ===== Bendito Food 4.3.0 — PRIORIDADE GLOBAL DE TODOS OS MODAIS ===== */

/*
 * Regra estrutural:
 * qualquer modal ativo deve estar acima de todo o backend.
 * O JS também move o modal para body, eliminando stacking contexts ancestrais.
 */
body > .modal[data-erp-modal-priority="1"],
body > .modal.show{
  position:fixed!important;
  inset:0!important;
  z-index:50000!important;
  isolation:isolate!important;
}

body > .modal[data-erp-modal-priority="1"] .modal-dialog,
body > .modal.show .modal-dialog{
  position:relative!important;
  z-index:50010!important;
}

body > .modal[data-erp-modal-priority="1"] .modal-content,
body > .modal.show .modal-content{
  position:relative!important;
  z-index:50020!important;
}

/* Backdrop sempre abaixo do modal e acima de qualquer parte do ERP. */
body > .modal-backdrop{
  z-index:49900!important;
}

/* Camadas comuns do backend ficam muito abaixo da faixa reservada aos modais. */
.app-topbar,
.account-menu-wrapper,
.account-menu,
.account-menu-panel,
.account-dropdown,
.app-topbar .dropdown-menu,
.app-topbar [role="menu"]{
  z-index:6000!important;
}

.section-tabs-shell,
.section-tabs-shell.is-stuck{
  z-index:3000!important;
}

/* Enquanto um modal estiver aberto, elementos sticky do backend não competem
   por clique nem camada visual. */
body.erp-has-priority-modal .app-topbar,
body.erp-has-priority-modal .section-tabs-shell,
body.erp-has-priority-modal .account-menu-wrapper{
  pointer-events:none!important;
}

/* O modal e tudo dentro dele continuam interativos. */
body.erp-has-priority-modal > .modal,
body.erp-has-priority-modal > .modal *{
  pointer-events:auto;
}

/* Corrige recortes por wrappers/containers antigos. */
body.erp-has-priority-modal .app-shell,
body.erp-has-priority-modal .app-main,
body.erp-has-priority-modal .app-content,
body.erp-has-priority-modal .app-workspace,
body.erp-has-priority-modal .backend-workspace{
  transform:none!important;
}

/*
 * Mantém modais grandes de cadastro dentro da viewport.
 * Não altera a largura específica definida pelo próprio módulo.
 */
body > .modal .modal-dialog{
  max-height:calc(100dvh - 24px);
}

body > .modal .modal-content{
  max-height:calc(100dvh - 24px);
}

/* Modais com corpo rolável continuam com rodapé/cabeçalho visíveis. */
body > .modal .modal-dialog-scrollable .modal-content,
body > .modal .modal-content:has(> form){
  overflow:hidden;
}

@media(max-width:767.98px){
  body > .modal .modal-dialog{
    max-height:100dvh;
  }
  body > .modal .modal-content{
    max-height:100dvh;
  }
}

/* ===== Bendito Food 4.3.1 — LOTES E MÚLTIPLOS FORNECEDORES ===== */
.supplier-lots-card .metric-card{height:100%}
.supplier-lots-card table td,.supplier-lots-card table th{vertical-align:middle}
#newIngredientPurchaseModal{z-index:50000!important}
#newIngredientPurchaseModal .modal-content{border-radius:18px}


/* ===== Bendito Food 4.3.2 — correção de modal dentro do cadastro =====
   Qualquer modal aberto a partir de outro modal deve ficar integralmente
   acima do cadastro pai, inclusive acima do rodapé fixo dele. */
body.modal-open .modal.show { isolation:isolate; }
#newIngredientPurchaseModal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100100 !important;
    padding: 18px !important;
    overflow: hidden !important;
}
#newIngredientPurchaseModal .modal-dialog {
    position: relative !important;
    z-index: 100102 !important;
    width: min(800px, calc(100vw - 36px)) !important;
    max-width: 800px !important;
    height: auto !important;
    max-height: calc(100vh - 36px) !important;
    margin: 0 auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}
#newIngredientPurchaseModal .modal-content {
    max-height: calc(100vh - 36px) !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.35) !important;
}
#newIngredientPurchaseModal .modal-header,
#newIngredientPurchaseModal .modal-footer {
    position: relative !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    background: var(--bs-body-bg, #fff) !important;
}
#newIngredientPurchaseModal .modal-body {
    overflow-y: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 190px) !important;
}
body:has(#newIngredientPurchaseModal.show) > .modal-backdrop:last-of-type {
    z-index: 100090 !important;
}
@media (max-width: 767.98px) {
    #newIngredientPurchaseModal { padding: 8px !important; }
    #newIngredientPurchaseModal .modal-dialog {
        width: calc(100vw - 16px) !important;
        max-height: calc(100vh - 16px) !important;
    }
    #newIngredientPurchaseModal .modal-content {
        max-height: calc(100vh - 16px) !important;
    }
    #newIngredientPurchaseModal .modal-body {
        max-height: calc(100vh - 170px) !important;
    }
}


/* ===== Bendito Food 4.3.3 — ALERTAS DE VALIDADE E AÇÕES DE ENTRADA ===== */
.expiry-badge{display:inline-flex;margin-left:6px;padding:4px 7px;border-radius:999px;font-size:.65rem;font-weight:900;letter-spacing:.02em;vertical-align:middle}
.expiry-badge.expiry-soon{background:#fff1c7;color:#805b00;border:1px solid #ead18a}
.expiry-badge.expiry-expired{background:#ffe0dd;color:#a4251a;border:1px solid #efaca5}
tr.expiry-soon>td{background:color-mix(in srgb,#ffd75e 8%,transparent)}
tr.expiry-expired>td{background:color-mix(in srgb,#ef4b3f 8%,transparent)}
.expiry-dashboard-alerts{background:var(--custom-card,#fff);border:1px solid var(--line,#e6ded9);border-radius:18px;padding:16px 18px;box-shadow:0 7px 22px #00000008}
.expiry-dashboard-alerts strong svg{width:18px;height:18px;vertical-align:-3px;margin-right:5px}
.expiry-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.expiry-dashboard-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border-radius:12px;border:1px solid}
.expiry-dashboard-item.warning{background:#fff8e5;border-color:#edd79a;color:#735300}
.expiry-dashboard-item.danger{background:#fff0ee;border-color:#efb2ab;color:#8d2118}
.expiry-dashboard-item strong,.expiry-dashboard-item small{display:block}.expiry-dashboard-item small{font-size:.72rem;opacity:.78;margin-top:2px}.expiry-dashboard-item>span{font-size:.7rem;font-weight:900;white-space:nowrap}
#editStockLotModal{z-index:100200!important}
#editStockLotModal .modal-dialog{z-index:100202!important}
@media(max-width:760px){.expiry-dashboard-grid{grid-template-columns:1fr}}


/* ===== Bendito Food 4.3.5 — AÇÕES DOS LOTES ===== */
.edit-stock-lot:not(:disabled),
.delete-stock-lot:not(:disabled){cursor:pointer!important}
.delete-stock-lot:disabled{opacity:.48!important;cursor:not-allowed!important}
#editStockLotModal .modal-dialog{z-index:100202!important}
#editStockLotModal .modal-content{z-index:100203!important}


/* ===== Bendito Food 4.3.6 — MODAL ADMINISTRATIVO DE USUÁRIOS ===== */
#editUserModal.user-admin-modal{
  z-index:100300!important;
}
#editUserModal .modal-dialog{
  width:min(1180px,calc(100vw - 28px))!important;
  max-width:1180px!important;
  height:min(820px,calc(100dvh - 28px))!important;
  max-height:calc(100dvh - 28px)!important;
  margin:14px auto!important;
}
#editUserModal .modal-content{
  height:100%!important;
  max-height:100%!important;
  overflow:hidden!important;
  border-radius:20px!important;
}
#editUserModal .user-admin-form{
  height:100%!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
#editUserModal .modal-header{
  flex:0 0 auto!important;
  padding:18px 20px!important;
  background:var(--custom-card,var(--surface,#fff))!important;
}
#editUserModal .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  padding:20px!important;
}
#editUserModal .modal-footer{
  flex:0 0 auto!important;
  position:relative!important;
  bottom:auto!important;
  z-index:5!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  flex-wrap:wrap!important;
  padding:14px 18px!important;
  background:var(--custom-card,var(--surface,#fff))!important;
  border-top:1px solid var(--line,#e5ded9)!important;
  box-shadow:0 -10px 26px rgba(0,0,0,.07)!important;
}
.user-edit-section{
  padding:16px!important;
  margin-bottom:14px!important;
  border:1px solid var(--line,#e5ded9)!important;
  border-radius:15px!important;
  background:var(--custom-card,var(--surface,#fff))!important;
}
.user-edit-section-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  margin-bottom:13px!important;
}
.user-edit-section-head strong,
.user-edit-section-head small{display:block!important}
.user-edit-section-head small{
  margin-top:2px!important;
  color:var(--custom-muted,var(--muted,#756a65))!important;
  font-size:.78rem!important;
}
.user-security-switch{
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:9px 12px!important;
  border:1px solid var(--line,#e5ded9)!important;
  border-radius:11px!important;
}
.user-security-switch strong,
.user-security-switch small{display:block!important}
.user-security-switch small{
  color:var(--custom-muted,var(--muted,#756a65))!important;
  font-size:.74rem!important;
}
#editUserModal .user-admin-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
#editUserModal .user-role-option{
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  cursor:pointer!important;
}
.user-admin-actions-danger,
.user-admin-actions-security,
.user-admin-actions-main{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
#editUserModal .modal-footer .btn{
  min-height:40px!important;
  white-space:nowrap!important;
}
#editUserModal .modal-footer .btn:disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
}

@media(max-width:900px){
  #editUserModal .modal-dialog{
    width:calc(100vw - 14px)!important;
    height:calc(100dvh - 14px)!important;
    max-height:calc(100dvh - 14px)!important;
    margin:7px auto!important;
  }
  #editUserModal .user-admin-grid{
    grid-template-columns:1fr!important;
  }
  #editUserModal .modal-footer{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .user-admin-actions-danger,
  .user-admin-actions-security,
  .user-admin-actions-main{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .user-admin-actions-main .btn:last-child{
    grid-column:1/-1!important;
  }
  #editUserModal .modal-footer .btn{
    width:100%!important;
  }
}


/* ===== Bendito Food 4.3.7 — RODAPÉ DO MODAL EDITAR ENTRADA ===== */
#editStockLotModal .modal-footer{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  padding:14px 16px!important;
}
#editStockLotModal .modal-footer .btn{
  margin:0!important;
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
#editStockLotModal .modal-footer .btn + .btn{
  margin-left:0!important;
}


/* ===== Bendito Food 4.3.8 — EMPILHAMENTO CORRETO DE MODAIS ANINHADOS ===== */

/*
 * Quando há um modal filho, o pai continua visível atrás do backdrop,
 * mas nenhuma parte dele (inclusive rodapé fixo) pode ultrapassar a camada
 * do filho.
 */
body.erp-has-nested-modal > .modal.erp-modal-parent-covered{
  pointer-events:none!important;
}

body.erp-has-nested-modal > .modal.erp-modal-parent-covered .modal-dialog,
body.erp-has-nested-modal > .modal.erp-modal-parent-covered .modal-content,
body.erp-has-nested-modal > .modal.erp-modal-parent-covered .modal-header,
body.erp-has-nested-modal > .modal.erp-modal-parent-covered .modal-body,
body.erp-has-nested-modal > .modal.erp-modal-parent-covered .modal-footer{
  pointer-events:none!important;
}

/* O modal superior continua 100% interativo. */
body.erp-has-nested-modal > .modal.erp-modal-topmost,
body.erp-has-nested-modal > .modal.erp-modal-topmost *{
  pointer-events:auto!important;
}

/*
 * Neutraliza z-index locais antigos. O valor final da pilha agora é definido
 * dinamicamente por modal-priority.js.
 */
body > #editStockLotModal[data-erp-modal-priority="1"],
body > #newIngredientPurchaseModal[data-erp-modal-priority="1"],
body > #editUserModal[data-erp-modal-priority="1"]{
  isolation:isolate!important;
}

/* Modal Editar entrada: composição limpa e centralizada. */
#editStockLotModal .modal-dialog{
  width:min(800px,calc(100vw - 32px))!important;
  max-width:800px!important;
  height:auto!important;
  max-height:calc(100dvh - 32px)!important;
  margin:16px auto!important;
}

#editStockLotModal .modal-content{
  height:auto!important;
  max-height:calc(100dvh - 32px)!important;
  overflow:hidden!important;
  border-radius:18px!important;
}

#editStockLotModal .modal-header{
  flex:0 0 auto!important;
  padding:18px 20px!important;
}

#editStockLotModal .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  padding:20px!important;
}

#editStockLotModal .modal-footer{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  padding:14px 16px!important;
  border-top:1px solid var(--line,#e6ded9)!important;
  background:var(--custom-card,var(--surface,#fff))!important;
  box-shadow:none!important;
}

#editStockLotModal .modal-footer .btn{
  margin:0!important;
}

/*
 * Remove o efeito visual do rodapé pai "vazando" por baixo do filho.
 * Ele permanece no DOM, mas o backdrop do filho fica acima dele pela nova
 * ordem de camadas.
 */
body.erp-has-nested-modal > .modal.erp-modal-parent-covered .crud-record-actions{
  z-index:auto!important;
}

@media(max-width:767.98px){
  #editStockLotModal .modal-dialog{
    width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    margin:8px auto!important;
  }
  #editStockLotModal .modal-content{
    max-height:calc(100dvh - 16px)!important;
  }
}


/* ===== Bendito Food 4.3.9 — PADRÃO GLOBAL DE 2 CASAS DECIMAIS ===== */
.numeric-precision-menu{
  z-index:200000!important;
}
.precision-value{
  font-variant-numeric:tabular-nums;
}


/* ===== Bendito Food 4.4.0 — PADRÃO VISUAL GLOBAL 2 DECIMAIS ===== */
.precision-value,
[data-numeric-decimals]{
  font-variant-numeric:tabular-nums;
}
.numeric-precision-menu{
  z-index:250000!important;
}


/* ===== Bendito Food 4.4.1 — PROTEÇÃO DE TEXTOS COM NÚMEROS ===== */
/* Marcador sem efeito visual: impede que motores de precisão tratem nomes como números. */
[data-no-numeric-format]{}


/* ===== Bendito Food 4.4.3 — TELEFONE / WHATSAPP ===== */
.erp-phone-value{
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
input.erp-phone-value{
  letter-spacing:.01em;
}

/* ===== Bendito Food 4.4.5 — CRUD DE FORNECEDORES ===== */
.supplier-table td,.supplier-table th{vertical-align:middle}
.supplier-actions{display:inline-flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap}
.supplier-inactive-row{opacity:.66}
.supplier-crud-modal .modal-dialog{width:min(900px,calc(100vw - 28px));max-width:900px}
.supplier-crud-modal .modal-content{border-radius:18px;overflow:hidden}
.supplier-crud-modal .modal-body{padding:20px}
.supplier-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.supplier-modal-actions .btn{margin:0!important}
@media(max-width:680px){.supplier-modal-actions{display:grid;grid-template-columns:1fr 1fr}.supplier-modal-actions .btn:last-child{grid-column:1/-1}.supplier-modal-actions .btn{width:100%}}


/* ===== Bendito Food 4.4.6 — MODAL FORNECEDOR + UTF-8 ===== */
.supplier-crud-modal .modal-dialog{
  width:min(900px,calc(100vw - 28px))!important;
  max-width:900px!important;
  height:min(760px,calc(100dvh - 28px))!important;
  max-height:calc(100dvh - 28px)!important;
  margin:14px auto!important;
}
.supplier-crud-modal .modal-content{
  height:100%!important;
  max-height:100%!important;
  overflow:hidden!important;
  border-radius:18px!important;
}
.supplier-crud-modal .modal-content>form{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
  min-height:0!important;
}
.supplier-crud-modal .modal-header{
  flex:0 0 auto!important;
  padding:18px 20px!important;
}
.supplier-crud-modal .modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  padding:20px!important;
}
.supplier-crud-modal .modal-footer{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  padding:14px 16px!important;
  margin:0!important;
  background:var(--custom-card,var(--surface,#fff))!important;
  border-top:1px solid var(--line,#e6ded9)!important;
  box-shadow:0 -8px 22px rgba(0,0,0,.06)!important;
}
.supplier-crud-modal .modal-footer .btn{
  margin:0!important;
  min-height:40px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
}
@media(max-width:680px){
  .supplier-crud-modal .modal-dialog{
    width:calc(100vw - 12px)!important;
    height:calc(100dvh - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
    margin:6px auto!important;
  }
  .supplier-crud-modal .modal-footer{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .supplier-crud-modal .modal-footer .btn{width:100%!important}
  .supplier-crud-modal .supplier-modal-actions .btn:last-child{grid-column:1/-1!important}
}


/* ===== Bendito Food 5.0.17 — identidade oficial azul ===== */
body.theme-bendito_blue{
  --brand-950:#082751!important;
  --brand-900:#0B356B!important;
  --brand-800:#0B438E!important;
  --brand-700:#0C63E7!important;
  --brand-600:#1675F3!important;
  --canvas:#F1F6FD!important;
  --surface:#FFFFFF!important;
  --surface-2:#F6F9FE!important;
  --line:#D9E5F5!important;
  --muted:#66758F!important;
  --accent:#0C63E7!important;
}
body.theme-bendito_blue .app-sidebar{background:linear-gradient(180deg,#0A2E5D,#0B407F)!important;box-shadow:12px 0 38px rgba(8,39,81,.14)}
body.theme-bendito_blue .brand-mark{background:linear-gradient(135deg,#0C63E7,#0A4FBF)!important;color:#fff!important;overflow:hidden}
body.theme-bendito_blue .brand-mark img{width:100%;height:100%;object-fit:cover}
body.theme-bendito_blue .sidebar-link.active{background:#F5F9FF!important;color:#0B356B!important;box-shadow:0 8px 20px rgba(4,34,79,.15)}
body.theme-bendito_blue .page-heading-icon{background:linear-gradient(135deg,#EAF2FF,#F8FBFF)!important;color:#0C63E7!important;border-color:#D3E2FB!important}
body.theme-bendito_blue .user-avatar{background:linear-gradient(135deg,#0C63E7,#094FB9)!important}
body.theme-bendito_blue .btn-primary{background:linear-gradient(135deg,#0C63E7,#0955C6)!important;border-color:#0A58CF!important;box-shadow:0 7px 16px rgba(12,99,231,.20)!important}
body.theme-bendito_blue .btn-primary:hover,body.theme-bendito_blue .btn-primary:focus{background:linear-gradient(135deg,#0B5CDD,#0848AB)!important;border-color:#0848AB!important}
body.theme-bendito_blue .settings-nav a.settings-nav-active,
body.theme-bendito_blue .settings-nav a.settings-nav-active:hover,
body.theme-bendito_blue .settings-nav a.settings-nav-active:focus,
body.theme-bendito_blue .settings-nav a.settings-nav-active:visited,
body.theme-bendito_blue .settings-nav a.active{background:linear-gradient(135deg,#0C63E7,#0A54C4)!important;border-color:#0A58CF!important;color:#fff!important;box-shadow:0 8px 18px rgba(12,99,231,.22)!important}
body.theme-bendito_blue .topbar-pause-button{border-color:#CFE0FA!important;background:#F3F7FF!important;color:#0B4FAF!important}
body.theme-bendito_blue .topbar-pause-button.is-paused{background:#0C63E7!important;border-color:#0C63E7!important;color:#fff!important}
body.theme-bendito_blue .conversion-icon{background:#0C63E7!important}
body.theme-bendito_blue .cost-main{color:#0C63E7!important}
body.theme-bendito_blue a:not(.btn):not(.nav-link){color:var(--custom-link,#0C63E7)}
