@layer project {
:root{
  --green:#0f8b4c;--green-strong:#08753e;--green-soft:#e8f6ee;--lime:#a9dfbf;
  --ink:#202620;--muted:#66706a;--line:#e2e8e4;--surface:#fff;--surface-2:#f5f7f6;
  --danger:#c43b3b;--warning:#9b6500;--info:#2563a8;--shadow:0 10px 30px rgba(25,54,39,.09);
  --radius-sm:12px;--radius:18px;--radius-lg:26px;--max:1280px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--surface-2);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}a{color:inherit}.anva-icon{font-size:22px;line-height:1;vertical-align:middle}.skip-link{position:fixed;left:16px;top:-80px;background:#111;color:#fff;padding:10px 14px;z-index:9999;border-radius:10px}.skip-link:focus{top:16px}
.market-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}.header-inner{max-width:var(--max);margin:auto;height:76px;display:flex;align-items:center;gap:24px;padding:0 24px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;min-width:max-content}.brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,var(--green),#25ad68);display:grid;place-items:center;color:#fff;box-shadow:0 8px 18px rgba(15,139,76,.25)}.brand-mark .anva-icon{font-size:26px}.brand-copy{display:grid;line-height:1}.brand-copy strong{font-size:13px;font-weight:700;color:var(--muted)}.brand-copy b{font-size:19px;color:var(--green)}.global-search{height:46px;max-width:650px;flex:1;display:flex;align-items:center;gap:8px;border:1px solid #cfd8d2;border-radius:14px;padding:0 8px 0 14px;background:#fff;transition:.2s}.global-search:focus-within{border-color:var(--green);box-shadow:0 0 0 4px rgba(15,139,76,.10)}.global-search input{border:0;outline:0;flex:1;min-width:0}.global-search button{border:0;background:var(--green-soft);color:var(--green-strong);font-weight:800;border-radius:10px;padding:8px 14px;cursor:pointer}.header-actions{display:flex;align-items:center;gap:8px}.button,.icon-button{border:0;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:800}.button{min-height:42px;padding:0 18px;border-radius:12px}.button.primary{background:var(--green);color:#fff;box-shadow:0 8px 20px rgba(15,139,76,.22)}.button.primary:hover{background:var(--green-strong)}.button.tonal{background:var(--green-soft);color:var(--green-strong)}.button.text{color:var(--green-strong);background:transparent}.button.danger{background:#fff0f0;color:var(--danger)}.button.full{width:100%}.button.small{min-height:36px;padding:0 12px;font-size:13px}.icon-button{width:42px;height:42px;background:transparent;border-radius:50%}.icon-button:hover{background:var(--surface-2)}.account-menu{position:relative}.account-trigger{display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:5px 7px;border-radius:14px;cursor:pointer}.account-trigger:hover{background:var(--surface-2)}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft);color:var(--green-strong);font-weight:900}.account-copy{display:grid;text-align:left;line-height:1.15}.account-copy small{color:var(--muted);font-size:11px}.account-copy strong{font-size:13px}.account-dropdown{display:none;position:absolute;right:0;top:52px;width:230px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:8px;box-shadow:var(--shadow)}.account-dropdown.open{display:block}.menu-label{padding:8px 10px;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}.menu-item{display:block;width:100%;border:0;background:transparent;text-decoration:none;text-align:left;padding:10px 12px;border-radius:10px;cursor:pointer}.menu-item:hover,.menu-item.active{background:var(--green-soft);color:var(--green-strong)}.menu-item.danger{color:var(--danger)}
.app-frame{max-width:var(--max);margin:auto;display:grid;grid-template-columns:220px minmax(0,1fr);gap:24px;padding:24px}.desktop-sidebar{position:sticky;top:100px;height:calc(100vh - 124px);display:flex;flex-direction:column;justify-content:space-between}.desktop-sidebar nav{display:grid;gap:6px}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;text-decoration:none;color:#4c5750;font-weight:700}.nav-item:hover{background:#edf3ef}.nav-item.active{background:var(--green-soft);color:var(--green-strong)}.nav-item.active .anva-icon{font-variation-settings:'FILL' 1}.sidebar-help{background:linear-gradient(145deg,#0f8b4c,#08683a);color:#fff;padding:18px;border-radius:20px;display:grid;gap:4px}.sidebar-help .anva-icon{font-size:28px}.sidebar-help small{opacity:.8}.main-content{min-width:0;max-width:1050px;width:100%;margin:0 auto;padding-bottom:40px}.main-content.wide{max-width:none}.is-public .main-content{max-width:none;padding:0}.mobile-bottom-nav{display:none}.offline-banner{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:100;background:#242a26;color:#fff;border-radius:999px;padding:10px 18px;font-size:13px;box-shadow:var(--shadow)}
.flash{display:flex;align-items:center;gap:10px;padding:13px 16px;border-radius:14px;margin-bottom:16px;border:1px solid}.flash.success{background:#ecf9f1;color:#176438;border-color:#c7ebd5}.flash.error{background:#fff0f0;color:#9d2929;border-color:#f5c8c8}.flash.info{background:#eef6ff;color:#245f98;border-color:#d0e3f6}.flash-close{margin-left:auto;border:0;background:transparent;cursor:pointer;color:inherit}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px}.page-head h1{font-size:30px;line-height:1.1;margin:0}.page-head p{margin:7px 0 0;color:var(--muted)}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.11em;color:var(--green-strong);font-weight:900;margin-bottom:6px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:28px 0 14px}.section-title h2{margin:0;font-size:21px}.section-title a{color:var(--green-strong);font-weight:800;text-decoration:none;font-size:13px}
.card{background:var(--surface);border:1px solid rgba(219,227,222,.9);border-radius:var(--radius);box-shadow:0 3px 12px rgba(25,54,39,.045)}.card.pad{padding:20px}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.stat-card{padding:18px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.stat-card small{display:block;color:var(--muted);font-weight:700}.stat-card strong{display:block;font-size:25px;margin-top:4px}.stat-icon{width:44px;height:44px;border-radius:14px;background:var(--green-soft);display:grid;place-items:center;color:var(--green-strong)}
.hero{background:linear-gradient(120deg,#effaf3 0%,#ffffff 62%,#e0f4e8 100%);min-height:520px;display:grid;align-items:center;overflow:hidden}.hero-inner{max-width:var(--max);width:100%;margin:auto;padding:70px 24px;display:grid;grid-template-columns:1.1fr .9fr;gap:54px;align-items:center}.hero h1{font-size:55px;line-height:1.05;margin:0;letter-spacing:-.035em}.hero h1 span{color:var(--green)}.hero p{font-size:19px;color:var(--muted);max-width:620px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.hero-visual{position:relative;min-height:350px}.mock-phone{position:absolute;right:8%;top:0;width:270px;background:#fff;border:9px solid #25302a;border-radius:38px;padding:14px;box-shadow:0 30px 80px rgba(15,71,42,.22);transform:rotate(4deg)}.mock-notch{width:76px;height:18px;background:#25302a;border-radius:20px;margin:-8px auto 12px}.mock-screen{border-radius:24px;background:#f4f7f5;overflow:hidden;padding:14px}.mock-banner{height:98px;border-radius:18px;background:linear-gradient(135deg,var(--green),#42b878);padding:15px;color:#fff}.mock-products{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.mock-product{height:105px;background:#fff;border-radius:15px;padding:10px}.mock-bag{height:56px;border-radius:10px;background:#e8efe9;margin-bottom:8px}.mock-product span{font-size:10px;font-weight:800}.benefit-float{position:absolute;left:0;bottom:25px;background:#fff;padding:16px 18px;border-radius:18px;box-shadow:var(--shadow);display:flex;gap:12px;align-items:center}.benefit-float .stat-icon{background:#fff3d8;color:#926100}.public-section{max-width:var(--max);margin:auto;padding:70px 24px}.public-section.center{text-align:center}.benefit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:30px}.benefit-card{padding:24px;text-align:left}.benefit-card .stat-icon{margin-bottom:18px}.benefit-card h3{margin:0 0 8px}.benefit-card p{margin:0;color:var(--muted)}
.category-chips{display:flex;gap:9px;overflow:auto;padding:2px 2px 9px;scrollbar-width:none}.chip{white-space:nowrap;border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;font-weight:700;font-size:13px;text-decoration:none}.chip.active,.chip:hover{background:var(--green-soft);border-color:#b8dec7;color:var(--green-strong)}.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.product-card{overflow:hidden;transition:.2s}.product-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.product-media{height:170px;background:linear-gradient(145deg,#f1f4f2,#e4ebe6);display:grid;place-items:center;position:relative}.cement-bag{width:90px;height:120px;background:#fff;border-radius:8px 8px 14px 14px;box-shadow:0 12px 28px #18362422;display:grid;place-items:center;border-top:12px solid var(--green)}.cement-bag strong{font-size:14px;color:var(--green);transform:rotate(-2deg)}.product-badge{position:absolute;left:12px;top:12px;background:#fff1c7;color:#7f5b00;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:900}.product-body{padding:15px}.product-title{font-size:15px;font-weight:800;min-height:45px}.product-price{font-size:18px;font-weight:900;margin-top:5px}.product-meta{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:12px;margin-top:8px}.product-actions{display:flex;gap:8px;margin-top:13px}.product-actions form{flex:1}.product-actions .button{width:100%}
.table-card{overflow:hidden}.table-wrap{overflow:auto}.data-table{border-collapse:collapse;width:100%;min-width:720px}.data-table th,.data-table td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--line);vertical-align:middle}.data-table th{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);background:#fafcfb}.data-table tr:last-child td{border-bottom:0}.data-table tr:hover td{background:#fbfdfc}.status{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900}.status.success{background:#e5f7ec;color:#176b3b}.status.warning{background:#fff4d8;color:#815d00}.status.info{background:#e9f3ff;color:#225f9c}.status.danger{background:#ffe8e8;color:#9c2929}.status.neutral{background:#edf1ee;color:#59635d}
.form-card{max-width:720px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:13px;font-weight:800}.field input,.field select,.field textarea{width:100%;border:1px solid #cfd8d2;background:#fff;border-radius:12px;padding:12px 13px;outline:none}.field textarea{min-height:100px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--green);box-shadow:0 0 0 4px rgba(15,139,76,.1)}.field small{color:var(--muted)}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.auth-shell{min-height:calc(100vh - 76px);display:grid;grid-template-columns:1fr 1fr}.auth-promo{background:linear-gradient(145deg,#075f35,#0f8b4c);color:#fff;display:grid;place-items:center;padding:50px}.auth-promo-inner{max-width:480px}.auth-promo h1{font-size:44px;line-height:1.08}.auth-promo p{font-size:17px;opacity:.85}.auth-list{display:grid;gap:14px;margin-top:28px}.auth-list div{display:flex;align-items:center;gap:12px}.auth-list .anva-icon{background:#ffffff1c;padding:9px;border-radius:12px}.auth-panel{display:grid;place-items:center;padding:40px;background:#fff}.auth-card{width:min(440px,100%)}.auth-card h2{font-size:30px;margin:0}.auth-card>p{color:var(--muted);margin-bottom:24px}.divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:22px 0}.divider:before,.divider:after{content:"";height:1px;background:var(--line);flex:1}
.order-list{display:grid;gap:12px}.order-card{padding:18px}.order-top{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding-bottom:13px;margin-bottom:13px}.order-top strong{display:block}.order-top small{color:var(--muted)}.order-body{display:flex;justify-content:space-between;gap:20px;align-items:center}.order-items{display:grid;gap:4px}.order-total{text-align:right}.order-total strong{font-size:19px}.timeline{display:grid;gap:0;margin:20px 0}.timeline-step{position:relative;display:grid;grid-template-columns:32px 1fr;gap:10px;padding-bottom:18px}.timeline-step:before{content:"";position:absolute;left:15px;top:28px;bottom:0;width:2px;background:var(--line)}.timeline-step:last-child:before{display:none}.timeline-dot{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#e6ece8;color:#69756e}.timeline-step.done .timeline-dot{background:var(--green);color:#fff}.timeline-copy strong{display:block}.timeline-copy small{color:var(--muted)}
.cart-layout,.checkout-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}.sticky-summary{position:sticky;top:100px}.cart-item{display:grid;grid-template-columns:90px 1fr auto;gap:15px;padding:16px;border-bottom:1px solid var(--line)}.cart-item:last-child{border-bottom:0}.mini-product{width:90px;height:90px;border-radius:14px;background:#edf2ee;display:grid;place-items:center}.mini-product .cement-bag{transform:scale(.55)}.quantity{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;overflow:hidden;width:max-content}.quantity button{width:36px;height:36px;border:0;background:#fff;color:var(--green);font-size:18px;cursor:pointer}.quantity input{width:46px;text-align:center;border:0;outline:0}.summary-row{display:flex;justify-content:space-between;gap:12px;padding:7px 0}.summary-row.total{font-size:19px;font-weight:900;border-top:1px solid var(--line);margin-top:8px;padding-top:14px}.empty-state{text-align:center;padding:50px 22px}.empty-state .anva-icon{font-size:64px;color:#a5b3aa}.empty-state h2{margin-bottom:6px}.empty-state p{color:var(--muted);max-width:430px;margin:0 auto 20px}
.mobile-only{display:none}.desktop-only{display:block}
@media(max-width:1000px){.product-grid{grid-template-columns:repeat(3,1fr)}.grid.four{grid-template-columns:repeat(2,1fr)}.header-inner{gap:12px}.account-copy{display:none}.app-frame{grid-template-columns:190px minmax(0,1fr);padding:18px;gap:16px}}
@media(max-width:760px){body{padding-bottom:76px}.market-header{position:sticky}.header-inner{height:auto;min-height:64px;padding:10px 14px;display:grid;grid-template-columns:auto 1fr auto;gap:10px}.brand-copy,.header-actions .account-menu,.header-actions>a.button,.header-actions>.button{display:none}.brand-mark{width:40px;height:40px}.global-search{height:42px}.global-search button{display:none}.header-actions{gap:0}.app-frame{display:block;padding:14px}.desktop-sidebar{display:none}.main-content{padding-bottom:20px}.mobile-bottom-nav{position:fixed;z-index:60;left:0;right:0;bottom:0;height:68px;background:rgba(255,255,255,.98);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding-bottom:env(safe-area-inset-bottom)}.mobile-bottom-nav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-decoration:none;color:#748078}.mobile-bottom-nav a.active{color:var(--green)}.mobile-bottom-nav a.active .anva-icon{font-variation-settings:'FILL' 1}.mobile-bottom-nav small{font-size:10px;font-weight:800}.page-head{align-items:flex-start;flex-direction:column}.page-head h1{font-size:25px}.page-head .button{width:100%}.grid.two,.grid.three,.grid.four{grid-template-columns:1fr 1fr}.hero{min-height:auto}.hero-inner{padding:44px 18px 80px;grid-template-columns:1fr}.hero h1{font-size:39px}.hero p{font-size:16px}.hero-visual{min-height:310px}.mock-phone{right:7%;width:235px}.benefit-float{left:2%;bottom:0}.public-section{padding:48px 18px}.benefit-grid{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-media{height:135px}.cement-bag{transform:scale(.8)}.product-body{padding:12px}.product-title{font-size:13px}.product-price{font-size:16px}.product-actions{display:block}.product-actions .button.text{display:none}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.form-actions{position:sticky;bottom:76px;background:#fff;padding:12px 0;margin-bottom:-4px}.auth-shell{display:block}.auth-promo{display:none}.auth-panel{min-height:calc(100vh - 64px);padding:24px 18px}.auth-card h2{font-size:27px}.cart-layout,.checkout-layout{grid-template-columns:1fr}.sticky-summary{position:static}.cart-item{grid-template-columns:72px 1fr}.mini-product{width:72px;height:72px}.cart-item>div:last-child{grid-column:2}.order-body{align-items:flex-start;flex-direction:column}.order-total{text-align:left}.table-card{border-radius:14px}.mobile-only{display:block}.desktop-only{display:none}.stat-card strong{font-size:21px}}
@media(max-width:430px){.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-actions .button{padding:0 9px;font-size:12px}.hero h1{font-size:35px}.mock-phone{right:1%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.icon-button.has-badge{position:relative}.icon-badge{position:absolute;right:0;top:0;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#d93636;color:#fff;font-size:10px;line-height:17px;font-weight:900;border:2px solid #fff}.public-footer{background:#fff;border-top:1px solid var(--line);margin-top:40px}.footer-inner{max-width:var(--max);margin:auto;padding:48px 24px;display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:40px}.footer-inner>div p{max-width:440px;color:var(--muted)}.footer-inner nav{display:grid;align-content:start;gap:10px}.footer-inner nav a{text-decoration:none;color:var(--muted)}.footer-inner nav a:hover{color:var(--green)}.footer-bottom{border-top:1px solid var(--line);padding:16px 24px;text-align:center;color:var(--muted);font-size:13px}@media(max-width:760px){.footer-inner{grid-template-columns:1fr;gap:25px;padding:36px 18px}.is-public{padding-bottom:76px}}
/* Consolidated production additions */
.brand-image{width:44px;height:44px;object-fit:contain;border-radius:12px}.password-field{position:relative}.password-field input{padding-right:50px}.password-field button{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:40px;height:40px;border:0;background:transparent;color:var(--muted);cursor:pointer;border-radius:10px}.password-field button:hover{background:#eef5f0;color:var(--green)}.full-width{width:100%}.metric-progress{height:10px;border-radius:999px;background:#e8eee9;overflow:hidden;margin:10px 0}.metric-progress>span{display:block;height:100%;background:var(--green);border-radius:inherit}.metric-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}.metric-row small{color:var(--muted)}.kpi-number{font-size:28px;font-weight:900}.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:28px 0 14px}.section-title h2{margin:0}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.media-preview{width:100px;height:100px;border:1px solid var(--line);border-radius:16px;object-fit:cover;background:#f2f6f3}.image-input{display:flex;gap:14px;align-items:center}.wa-button{background:#1ba75b!important;color:white!important}.split-panel{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:20px}.soft-box{padding:16px;border-radius:16px;background:#f6faf7;border:1px solid #e4ebe6}.report-filter{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.report-filter .field{min-width:160px}.notice-inline{padding:12px 14px;border-radius:12px;background:#eef7f1;color:#245f3b}.invoice{max-width:900px;margin:auto;background:white;padding:32px;border:1px solid var(--line);border-radius:20px}.invoice-head{display:flex;justify-content:space-between;gap:24px;border-bottom:2px solid #1f2c24;padding-bottom:18px}.invoice-logo{max-width:170px;max-height:70px}.invoice-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:24px 0}.invoice table{width:100%;border-collapse:collapse}.invoice th,.invoice td{padding:10px;border-bottom:1px solid var(--line);text-align:left}.invoice-total{margin-left:auto;max-width:360px}.simulation-box{padding:18px;border-radius:16px;background:#f7faf8;border:1px solid var(--line)}
@media(max-width:760px){.split-panel,.invoice-grid{grid-template-columns:1fr}.invoice{padding:18px;border-radius:14px}.invoice-head{flex-direction:column}.report-filter{display:grid}.report-filter .field{min-width:0}.image-input{align-items:flex-start;flex-direction:column}}
@media print{.market-header,.desktop-sidebar,.mobile-bottom-nav,.public-footer,.no-print,.flash{display:none!important}.app-frame{display:block!important;padding:0!important}.main-content{max-width:none!important;padding:0!important}.invoice{border:0!important;box-shadow:none!important;max-width:none!important}}

.product-photo{width:100%;height:100%;min-height:220px;object-fit:contain;padding:18px;box-sizing:border-box;background:#fff}.product-media{overflow:hidden}

/* v1.3 financial planning and network workspace */
.grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}.commission-recipient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.recipient-row{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:12px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fbfdfc}.recipient-toggle{display:flex;align-items:center;gap:9px;font-weight:800}.recipient-row .field{position:relative}.recipient-row .field small{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-weight:800}.recipient-row .field input{padding-right:30px}.check-row{display:flex;flex-wrap:wrap;gap:10px 18px}.check-row label{display:flex;align-items:center;gap:7px;font-weight:700}.status-pill{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:900;background:#edf1ee;color:#59635d}.status-pill.active{background:#e5f7ec;color:#176b3b}.status-pill.inactive{background:#fff0e5;color:#8a5424}.edit-focus{border-color:#b9ddc6;box-shadow:0 12px 34px rgba(15,139,76,.10)}
@media(max-width:1000px){.grid.five{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.grid.five{grid-template-columns:1fr 1fr}.commission-recipient-grid{grid-template-columns:1fr}}
@media(max-width:430px){.grid.five{grid-template-columns:1fr}.recipient-row{grid-template-columns:1fr}}

/* v1.3.1 — desktop navigation stability */
.app-frame{align-items:start}
.desktop-sidebar{
  position:sticky;
  top:88px;
  height:auto;
  max-height:calc(100dvh - 100px);
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  padding:0 4px 16px 0;
  scrollbar-width:thin;
  scrollbar-color:#c8d5cd transparent;
}
.desktop-sidebar nav{display:grid;gap:6px;flex:0 0 auto;min-height:max-content}
.desktop-sidebar .nav-item{min-height:48px;flex:0 0 auto;position:relative;z-index:2}
.desktop-sidebar .nav-item:active{transform:translateY(1px)}
.sidebar-help{
  margin-top:18px;
  flex:0 0 auto;
  min-height:112px;
  text-decoration:none;
  cursor:pointer;
  position:relative;
  z-index:1;
}
.sidebar-help:hover{filter:brightness(.97);box-shadow:0 10px 24px rgba(8,104,58,.18)}
.main-content{scroll-margin-top:96px}
@media (min-width:761px) and (max-height:760px){
  .desktop-sidebar{top:84px;max-height:calc(100dvh - 92px);padding-bottom:10px}
  .desktop-sidebar nav{gap:3px}
  .desktop-sidebar .nav-item{min-height:42px;padding:9px 12px}
  .sidebar-help{margin-top:12px;min-height:92px;padding:14px;border-radius:16px}
  .sidebar-help .anva-icon{font-size:24px}
}

/* v1.3.2 — PWA install experience: always-visible call to action with native prompt + guided fallback */
.pwa-install-banner{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:95;
  width:min(440px,calc(100vw - 32px));
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  padding:12px;
  background:rgba(255,255,255,.98);
  border:1px solid #d7e4dc;
  border-radius:20px;
  box-shadow:0 18px 48px rgba(16,53,32,.18);
  backdrop-filter:blur(16px);
}
.pwa-install-banner[hidden]{display:none!important}
.pwa-install-banner-icon{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:var(--green-soft);color:var(--green-strong)}
.pwa-install-banner-icon .anva-icon{font-size:27px}
.pwa-install-banner-copy{display:grid;min-width:0;line-height:1.25}
.pwa-install-banner-copy strong{font-size:14px}
.pwa-install-banner-copy small{margin-top:3px;color:var(--muted);font-size:12px}
.pwa-install-dismiss{width:36px;height:36px;color:var(--muted)}
.pwa-install-backdrop{position:fixed;inset:0;z-index:109;background:rgba(15,25,19,.46);backdrop-filter:blur(3px)}
.pwa-install-backdrop[hidden],.pwa-install-sheet[hidden]{display:none!important}
.pwa-install-sheet{position:fixed;z-index:110;left:50%;bottom:24px;transform:translateX(-50%);width:min(520px,calc(100vw - 32px));max-height:min(78dvh,620px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:26px;padding:18px 20px 22px;box-shadow:0 30px 90px rgba(9,34,20,.3)}
.pwa-install-sheet-handle{display:none;width:48px;height:5px;margin:0 auto 13px;background:#d3ddd6;border-radius:999px}
.pwa-install-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.pwa-install-sheet-head h2{margin:0;font-size:24px;line-height:1.15}
.pwa-install-sheet-body{display:grid;gap:12px;padding-top:16px}
.pwa-install-step,.pwa-install-note{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:flex-start;padding:14px;background:#f6faf7;border:1px solid #e0eae3;border-radius:16px}
.pwa-step-number{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--green);color:#fff;font-weight:900;font-size:13px}
.pwa-install-step strong,.pwa-install-note strong{display:block;margin:1px 0 3px}
.pwa-install-step p,.pwa-install-note p{margin:0;color:var(--muted);font-size:13px}
.pwa-install-note>.anva-icon{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:var(--green-soft);color:var(--green-strong)}
body.pwa-sheet-open{overflow:hidden}
@media(max-width:760px){
  .pwa-install-banner{left:12px;right:12px;bottom:14px;width:auto;grid-template-columns:auto minmax(0,1fr) auto;padding:11px;border-radius:18px}
  .is-authenticated .pwa-install-banner,.is-public .pwa-install-banner{bottom:80px}
  .pwa-install-banner>.button{grid-column:2/4;width:100%;min-height:40px}
  .pwa-install-dismiss{grid-column:3;grid-row:1}
  .pwa-install-banner-copy{padding-right:34px}
  .pwa-install-sheet{left:0;right:0;bottom:0;transform:none;width:100%;max-height:82dvh;border-radius:26px 26px 0 0;border-left:0;border-right:0;border-bottom:0;padding:10px 18px calc(22px + env(safe-area-inset-bottom))}
  .pwa-install-sheet-handle{display:block}
  .pwa-install-sheet-head h2{font-size:22px}
}

@media(max-width:760px){.public-mobile-bottom-nav small{max-width:64px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.public-mobile-bottom-nav{display:flex}}

/* v1.3.7 — Demo Data workspace polish */
@media(min-width:761px){
  .desktop-sidebar .nav-item>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .desktop-sidebar .nav-item{font-size:14px}
}
.demo-page-head{align-items:center;margin-bottom:22px}.demo-page-head>div{max-width:760px}.demo-status-badge{gap:6px;padding:8px 12px;font-size:12px}.demo-status-badge .anva-icon{font-size:17px}
.demo-overview-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:18px;align-items:stretch}.demo-control-card,.demo-summary-card{min-width:0}.demo-card-title{display:flex;align-items:flex-start;gap:13px;margin-bottom:18px}.demo-card-title h2{margin:0;font-size:21px}.demo-card-title p{margin:4px 0 0;color:var(--muted);font-size:13px}.demo-card-title .stat-icon{flex:0 0 44px}
.demo-message{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:flex-start;padding:15px;border-radius:15px;border:1px solid}.demo-message>.anva-icon{font-size:23px;margin-top:1px}.demo-message strong{display:block;margin-bottom:3px}.demo-message p{margin:0;color:var(--muted);font-size:13px}.demo-message.success{background:#eef9f2;border-color:#ccebd7;color:#176b3b}.demo-message.warning{background:#fff9ec;border-color:#f0dfb4;color:#805d00}.demo-message.neutral{background:#f6f8f7;border-color:#e1e7e3;color:#4f5b54}.demo-safety-note,.demo-rule-note,.demo-security-note{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:flex-start;margin-top:14px;padding:13px 14px;background:#f6faf7;border:1px solid #e0ebe3;border-radius:14px}.demo-safety-note>.anva-icon,.demo-rule-note>.anva-icon,.demo-security-note>.anva-icon{color:var(--green-strong);font-size:21px}.demo-safety-note p,.demo-rule-note p,.demo-security-note p{margin:2px 0 0;color:var(--muted);font-size:13px}.demo-primary-action{margin-top:16px}.demo-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.demo-action-grid form{margin:0}.demo-date{font-size:12px;margin:12px 0 0}
.demo-metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.demo-metric{padding:13px 12px;border:1px solid var(--line);border-radius:14px;background:#fbfdfc;display:grid;gap:3px}.demo-metric span{color:var(--muted);font-size:12px;font-weight:700}.demo-metric strong{font-size:22px;line-height:1.1}.demo-metric.wide{grid-column:span 3;display:flex;align-items:center;justify-content:space-between}.demo-rule-note{margin-top:14px}
.demo-accounts-section,.demo-delete-section{margin-top:18px}.demo-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:17px}.demo-section-head h2{margin:0;font-size:24px}.demo-section-head p{margin:5px 0 0;color:var(--muted);font-size:14px;max-width:760px}.demo-section-head.compact{margin-bottom:14px}.demo-account-count{white-space:nowrap;padding:7px 11px;border-radius:999px;background:var(--green-soft);color:var(--green-strong);font-size:12px;font-weight:900}
.demo-account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.demo-account-card{min-width:0;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fcfefd;transition:border-color .18s,box-shadow .18s}.demo-account-card:hover{border-color:#bfdcca;box-shadow:0 9px 24px rgba(25,54,39,.06)}.demo-account-head{display:flex;align-items:center;gap:12px;padding-bottom:13px;border-bottom:1px solid #edf1ee}.demo-role-icon{width:42px;height:42px;border-radius:13px;background:var(--green-soft);color:var(--green-strong);display:grid;place-items:center;flex:0 0 42px}.demo-account-identity{display:grid;min-width:0}.demo-role-label{font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--green-strong);font-weight:900}.demo-account-identity strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.demo-credential-row{margin-top:12px}.demo-credential-label{display:block;margin-bottom:5px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.demo-credential-value{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:center;gap:5px;padding:7px 7px 7px 10px;border:1px solid #e2e9e4;background:#f7faf8;border-radius:11px}.demo-password-value{grid-template-columns:minmax(0,1fr) 34px 34px}.demo-credential-value code{min-width:0;overflow-wrap:anywhere;word-break:break-word;font-size:12px;color:#29332d;background:transparent}.demo-copy-button{width:32px;height:32px;border:0;border-radius:9px;background:#fff;color:#657169;display:grid;place-items:center;cursor:pointer}.demo-copy-button:hover{background:var(--green-soft);color:var(--green-strong)}.demo-copy-button .anva-icon{font-size:18px}.demo-security-note{margin-top:14px}
.demo-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.demo-choice-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;align-items:flex-start;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fbfdfc}.demo-choice-card strong{display:block;font-size:15px;margin-bottom:3px}.demo-choice-card p{margin:0;color:var(--muted);font-size:13px}.demo-choice-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center}.demo-choice-icon.pause{background:#fff4dd;color:#866000}.demo-choice-icon.delete{background:#fff0f0;color:var(--danger)}.demo-choice-card.danger{background:#fffdfd;border-color:#f1dddd}
.demo-copy-toast{position:fixed;left:50%;bottom:28px;z-index:200;transform:translate(-50%,12px);opacity:0;display:flex;align-items:center;gap:8px;padding:10px 14px;background:#202a24;color:#fff;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.18);font-size:13px;font-weight:800;transition:.18s}.demo-copy-toast.show{opacity:1;transform:translate(-50%,0)}.demo-copy-toast .anva-icon{font-size:19px;color:#9ee2b8}
@media(max-width:1000px){.demo-overview-grid{grid-template-columns:1fr}.demo-account-grid{grid-template-columns:1fr}.demo-summary-card .demo-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.demo-metric.wide{grid-column:span 2}}
@media(max-width:760px){.demo-page-head{align-items:flex-start}.demo-status-badge{align-self:flex-start}.demo-overview-grid{display:grid;grid-template-columns:1fr;gap:12px}.demo-card-title h2{font-size:19px}.demo-metric-grid,.demo-summary-card .demo-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.demo-metric.wide{grid-column:span 2}.demo-action-grid{grid-template-columns:1fr}.demo-section-head{display:grid;gap:8px}.demo-section-head h2{font-size:21px}.demo-account-count{width:max-content}.demo-account-grid{grid-template-columns:1fr}.demo-choice-grid{grid-template-columns:1fr}.demo-account-card{padding:14px}.demo-credential-value code{font-size:11px}.demo-copy-toast{bottom:88px}.demo-accounts-section,.demo-delete-section{margin-top:12px}}
@media(max-width:420px){.demo-metric-grid,.demo-summary-card .demo-metric-grid{grid-template-columns:1fr 1fr}.demo-metric{padding:11px}.demo-metric strong{font-size:20px}.demo-password-value{grid-template-columns:minmax(0,1fr) 32px 32px}.demo-credential-value{grid-template-columns:minmax(0,1fr) 32px}.demo-copy-button{width:30px;height:30px}}

/* v1.3.8 — TOTAL MOBILE PRESENTATION REBUILD
   Scope: every mobileview. The document itself never scrolls sideways; only
   explicit horizontal components such as tables/chips may scroll internally. */
html,body{width:100%;max-width:100%;overflow-x:hidden;overflow-x:clip}
body{overscroll-behavior-x:none}
body>*{max-width:100%}
img,svg,video,canvas{max-width:100%}
.app-frame,.main-content,.main-content.wide,.is-public .main-content,.market-header,.header-inner,.hero,.hero-inner,.public-section,.public-footer,.footer-inner{min-width:0;max-width:100%}
.table-wrap,.category-chips{overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.table-wrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden}
.data-table{max-width:none}

/* Public catalog gets a real page container instead of letting its heading/grid
   touch the viewport edge. */
.public-catalog-shell{width:min(100%,var(--max));margin:0 auto;padding:34px 24px 64px;min-width:0}
.public-info-title{font-size:42px;line-height:1.08;max-width:760px;margin:0}
.public-info-intro{font-size:18px;color:var(--muted);max-width:760px}

@media(max-width:760px){
  :root{--mobile-nav-height:76px;--mobile-page-gutter:16px;--mobile-header-height:70px}
  html{scroll-padding-top:calc(var(--mobile-header-height) + 8px)}
  body{width:100%;min-width:0;max-width:100%;padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));overflow-x:hidden;overflow-x:clip;background:var(--surface-2);-webkit-text-size-adjust:100%}
  body.is-public{padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom))}
  body.pwa-sheet-open{overflow:hidden}

  /* Header: fixed three-column geometry so search never pushes viewport width. */
  .market-header{top:0;width:100%;max-width:100%;overflow:clip;background:rgba(255,255,255,.985);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .header-inner{width:100%;height:var(--mobile-header-height);min-height:var(--mobile-header-height);padding:8px 12px;display:grid;grid-template-columns:46px minmax(0,1fr) 42px;align-items:center;gap:8px;overflow:hidden}
  .brand{width:46px;min-width:0;max-width:46px;overflow:hidden;gap:0}
  .brand-mark,.brand-image{width:44px;height:44px;min-width:44px;max-width:44px;border-radius:14px}
  .brand-copy{display:none!important}
  .global-search{width:100%;max-width:none;min-width:0;height:46px;padding:0 12px;gap:8px;border-radius:15px;overflow:hidden}
  .global-search input{width:100%;min-width:0;font-size:16px;text-overflow:ellipsis}
  .global-search button{display:none}
  .header-actions{width:42px;min-width:42px;max-width:42px;display:flex;align-items:center;justify-content:center;overflow:hidden}
  .header-actions>*{flex:0 0 auto}
  .header-actions .icon-button{display:inline-grid;width:42px;height:42px;place-items:center}
  .header-actions .account-menu,.header-actions>a.button,.header-actions>.button:not(.icon-button){display:none!important}

  /* One stable content column for every role. */
  .app-frame{display:block;width:100%;max-width:100%;padding:14px var(--mobile-page-gutter) 18px;overflow:visible}
  .desktop-sidebar{display:none!important}
  .main-content,.main-content.wide{width:100%;min-width:0;max-width:100%;margin:0;padding-bottom:24px;overflow:visible}
  .is-public .main-content{width:100%;max-width:100%;padding:0;overflow-x:hidden;overflow-x:clip}
  .card,.card.pad,.soft-box,.simulation-box,.invoice,.form-card,.auth-card,.table-card{min-width:0;max-width:100%}
  .card.pad{padding:16px}

  /* Headings/actions stack without width spill. */
  .page-head{width:100%;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:14px;margin-bottom:18px}
  .page-head>div{min-width:0}
  .page-head h1{font-size:27px;line-height:1.12;overflow-wrap:anywhere}
  .page-head p{font-size:15px;line-height:1.55}
  .page-head>.button,.page-head>a.button{width:100%;max-width:100%}
  .section-title{width:100%;min-width:0;align-items:flex-start;gap:10px}
  .section-title h2{min-width:0;font-size:20px;line-height:1.2;overflow-wrap:anywhere}
  .section-title>a{flex:0 0 auto}

  /* Public home hero rebuilt for portrait screens. */
  .hero{width:100%;min-height:0;display:block;overflow-x:hidden;overflow-x:clip;background:linear-gradient(155deg,#effaf3 0%,#fff 58%,#e5f6eb 100%)}
  .hero-inner{width:100%;max-width:100%;padding:34px var(--mobile-page-gutter) 28px;display:grid;grid-template-columns:minmax(0,1fr);gap:28px;align-items:start;overflow:hidden}
  .hero-inner>div{min-width:0;max-width:100%}
  .hero .eyebrow{font-size:12px;margin-bottom:10px}
  .hero h1{max-width:100%;margin:0;font-size:clamp(36px,10.5vw,44px);line-height:1.03;letter-spacing:-.035em;overflow-wrap:normal;word-break:normal}
  .hero p{max-width:100%;margin:18px 0 0;font-size:16px;line-height:1.58}
  .hero-actions{width:100%;max-width:340px;margin-top:22px;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .hero-actions .button{width:100%;min-height:48px;padding:0 16px;font-size:16px}
  .hero-visual{position:relative;width:100%;max-width:100%;height:360px;min-height:360px;overflow:hidden;border-radius:24px}
  .mock-phone{position:absolute;left:50%;right:auto;top:26px;width:min(268px,78vw);max-width:78vw;padding:12px;border-width:8px;border-radius:34px;transform:translateX(-43%) rotate(2deg);transform-origin:center top;box-shadow:0 22px 56px rgba(15,71,42,.18)}
  .mock-screen{padding:12px;border-radius:21px}
  .mock-banner{height:92px;padding:13px;border-radius:16px}
  .mock-products{gap:7px}
  .mock-product{height:96px;padding:8px}
  .benefit-float{left:10px;right:10px;bottom:14px;width:auto;max-width:calc(100% - 20px);min-width:0;padding:13px 14px;border-radius:17px;gap:10px;box-shadow:0 12px 35px rgba(25,54,39,.13)}
  .benefit-float>div{min-width:0}
  .benefit-float small,.benefit-float strong{display:block;white-space:normal;overflow-wrap:anywhere}
  .benefit-float small{font-size:12px;line-height:1.3}
  .benefit-float strong{margin-top:2px;font-size:14px;line-height:1.25}

  /* Public sections are always contained inside viewport gutters. */
  .public-section{width:100%;max-width:100%;padding:38px var(--mobile-page-gutter);overflow:hidden}
  .public-section .section-title{margin-top:0}
  .public-info-title{max-width:100%;font-size:clamp(31px,8.5vw,38px);line-height:1.1}
  .public-info-intro{max-width:100%;font-size:16px;line-height:1.6}
  .benefit-grid{grid-template-columns:minmax(0,1fr);gap:12px;margin-top:22px}
  .benefit-card{min-width:0;padding:18px}

  /* Catalog: compact two-column commerce cards without content bleed. */
  .public-catalog-shell{width:100%;max-width:100%;padding:24px var(--mobile-page-gutter) 32px;overflow:hidden}
  .public-catalog-shell .page-head{margin-bottom:18px}
  .public-catalog-shell .category-chips{margin:0 0 14px;padding:2px 0 8px;max-width:100%;display:flex;flex-wrap:wrap;overflow:visible;scrollbar-width:none}
  .category-chips::-webkit-scrollbar{display:none}
  .chip{flex:0 0 auto;padding:9px 13px;font-size:13px}
  .product-grid{width:100%;min-width:0;max-width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .product-card{min-width:0;max-width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:17px}
  .product-card:hover{transform:none;box-shadow:0 3px 12px rgba(25,54,39,.045)}
  .product-media{width:100%;height:138px;min-height:138px;max-height:138px;overflow:hidden}
  .product-photo{width:100%;height:100%;min-height:0;max-height:100%;padding:10px;object-fit:contain}
  .cement-bag{width:72px;height:96px;border-top-width:10px;border-radius:7px 7px 12px 12px;transform:none}
  .cement-bag strong{font-size:12px}
  .product-badge{left:9px;top:9px;max-width:calc(100% - 18px);padding:4px 7px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .product-body{min-width:0;flex:1;display:flex;flex-direction:column;padding:12px}
  .product-title{min-width:0;min-height:38px;max-height:38px;font-size:13px;line-height:1.42;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
  .product-price{font-size:17px;line-height:1.2;margin-top:8px}
  .product-meta{min-width:0;margin-top:7px;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
  .product-meta .anva-icon{font-size:18px;flex:0 0 auto}
  .product-actions{margin-top:auto;padding-top:12px;display:block}
  .product-actions form{width:100%;min-width:0}
  .product-actions .button{width:100%;min-width:0;min-height:40px;padding:0 8px;font-size:12px;white-space:nowrap}

  /* Generic grids/forms never force viewport wider than the screen. */
  .grid,.grid.two,.grid.three,.grid.four,.grid.five,.commission-recipient-grid,.split-panel,.invoice-grid,.cart-layout,.checkout-layout,.form-grid,.demo-overview-grid,.demo-account-grid,.demo-choice-grid,.demo-action-grid{min-width:0;max-width:100%}
  .grid.two,.grid.three,.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .form-grid,.split-panel,.invoice-grid,.cart-layout,.checkout-layout,.commission-recipient-grid{grid-template-columns:minmax(0,1fr)}
  .field,.field.full,.field input,.field select,.field textarea{min-width:0;max-width:100%}
  .inline-actions,.report-filter,.check-row{max-width:100%}
  .image-input{max-width:100%;align-items:flex-start;flex-direction:column}
  .media-preview{max-width:100%}

  /* Tables may scroll internally; the document must never follow them sideways. */
  .table-card{width:100%;max-width:100%;overflow:hidden}
  .table-wrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;border-radius:inherit}
  .data-table{width:max-content;min-width:720px;max-width:none}
  .data-table th,.data-table td{white-space:normal}

  /* Cart/order/invoice blocks */
  .cart-item{min-width:0;grid-template-columns:64px minmax(0,1fr);gap:12px;padding:14px 12px}
  .mini-product{width:64px;height:64px}
  .cart-item>div{min-width:0}
  .cart-item>div:last-child{grid-column:2}
  .sticky-summary{position:static}
  .invoice{width:100%;max-width:100%;padding:16px;border-radius:14px;overflow:hidden}
  .invoice-head{min-width:0;flex-direction:column;gap:12px}
  .invoice-head>div{min-width:0;max-width:100%}
  .invoice-total{width:100%;max-width:100%;margin-left:0}

  /* Bottom navigation is a stable safe-area bar; labels never get clipped. */
  .mobile-bottom-nav,.public-mobile-bottom-nav{left:0;right:0;bottom:0;width:100%;max-width:100%;height:auto;min-height:var(--mobile-nav-height);display:flex;align-items:stretch;justify-content:stretch;padding:6px 3px max(7px,env(safe-area-inset-bottom));overflow:hidden;background:rgba(255,255,255,.985);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 -6px 20px rgba(25,54,39,.05)}
  .mobile-bottom-nav a{min-width:0;max-width:20%;flex:1 1 20%;padding:4px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;overflow:hidden}
  .mobile-bottom-nav .anva-icon{font-size:24px;flex:0 0 auto}
  .mobile-bottom-nav small,.public-mobile-bottom-nav small{display:block;width:100%;max-width:100%;font-size:10px;line-height:1.15;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* PWA surfaces stay above bottom navigation and inside viewport. */
  .pwa-install-banner{left:10px;right:10px;bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px);width:auto;max-width:calc(100% - 20px);grid-template-columns:40px minmax(0,1fr) 34px;padding:10px;gap:9px;border-radius:17px;overflow:hidden}
  .pwa-install-banner-icon{width:40px;height:40px;border-radius:13px}
  .pwa-install-banner-copy{min-width:0;padding-right:0}
  .pwa-install-banner-copy strong,.pwa-install-banner-copy small{white-space:normal;overflow-wrap:anywhere}
  .pwa-install-banner>.button{grid-column:2/4;width:100%;max-width:100%}
  .pwa-install-dismiss{grid-column:3;grid-row:1;width:34px;height:34px}
  .pwa-install-sheet{left:0;right:0;bottom:0;width:100%;max-width:100%;max-height:82dvh;transform:none;padding:10px var(--mobile-page-gutter) calc(20px + env(safe-area-inset-bottom));overflow-x:hidden}

  /* Long values never create a document-width overflow. */
  code,pre,.demo-credential-value,.demo-credential-value code,.metric-row,.summary-row,.notice-inline{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
  pre{white-space:pre-wrap}
  .offline-banner{left:12px;right:12px;bottom:calc(var(--mobile-nav-height) + 10px);width:auto;max-width:none;transform:none;text-align:center}
  .public-footer{max-width:100%;margin-top:0;overflow:hidden}
  .footer-inner{width:100%;max-width:100%;padding:34px var(--mobile-page-gutter);grid-template-columns:minmax(0,1fr);gap:22px}
  .footer-bottom{padding:15px var(--mobile-page-gutter) calc(15px + env(safe-area-inset-bottom));overflow-wrap:anywhere}
}

@media(max-width:430px){
  .grid.two,.grid.three,.grid.four,.grid.five{grid-template-columns:minmax(0,1fr)}
  .stat-card{min-width:0}
  .stat-card>div{min-width:0}
  .stat-card strong{overflow-wrap:anywhere}
}

@media(max-width:350px){
  .product-grid{grid-template-columns:minmax(0,1fr)}
  .product-media{height:154px;min-height:154px;max-height:154px}
  .product-title{min-height:auto;max-height:none;-webkit-line-clamp:3}
}

/* v1.3.9 — TOTAL DASHBOARD & ANALYTICS REBUILD
   Shared across Admin, Warga, RT, Toko, Distributor and Relawan. */
.dashboard-page{width:100%;min-width:0;display:grid;gap:0}
.dashboard-page-head{margin-bottom:18px}
.dashboard-section-gap{margin-top:20px}
.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;min-width:0}
.dashboard-kpi-card{min-width:0;padding:17px;display:flex;align-items:flex-start;gap:13px;overflow:hidden}
.dashboard-kpi-card>div{min-width:0;display:grid;gap:3px}
.dashboard-kpi-card small{color:var(--muted);font-size:12px;font-weight:800;line-height:1.25}
.dashboard-kpi-card span:not(.anva-icon):not(.dashboard-kpi-icon){color:var(--muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.dashboard-kpi-icon{width:42px;height:42px;min-width:42px;border-radius:13px;background:var(--green-soft);color:var(--green-strong);display:grid;place-items:center}
.dashboard-kpi-value{display:block;min-width:0;max-width:100%;font-size:clamp(22px,1.55vw,30px);line-height:1.08;font-weight:900;letter-spacing:-.035em;font-variant-numeric:tabular-nums;white-space:nowrap}
.dashboard-kpi-value.money{font-size:clamp(19px,1.35vw,26px)}
.dashboard-main-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.85fr);gap:16px;align-items:stretch;min-width:0}
.dashboard-two-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch;min-width:0}
.dashboard-chart-card{min-width:0;overflow:hidden;height:100%}
.dashboard-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0;margin-bottom:14px}
.dashboard-card-head>div{min-width:0}
.dashboard-card-head h2{margin:0;font-size:19px;line-height:1.2;letter-spacing:-.018em}
.dashboard-card-head p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
.chart-total{flex:0 0 auto;text-align:right;display:grid;gap:2px;max-width:44%}
.chart-total small{color:var(--muted);font-size:10px;font-weight:800}
.chart-total strong{font-size:17px;line-height:1.1;white-space:nowrap;font-variant-numeric:tabular-nums}
.dashboard-chart-badge{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:var(--green-soft);color:var(--green-strong);font-size:11px;font-weight:900;white-space:nowrap}
.dashboard-chart-wrap{width:100%;min-width:0;overflow:hidden;border-radius:14px;background:linear-gradient(180deg,#fbfdfc 0%,#f7faf8 100%)}
.dashboard-line-chart{display:block;width:100%;height:auto;min-width:0;overflow:visible;color:var(--green)}
.chart-grid-line{stroke:#e3ebe6;stroke-width:1}
.chart-area{fill:rgba(15,139,76,.11);stroke:none}
.chart-line{fill:none;stroke:var(--green);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.chart-point{fill:#fff;stroke:var(--green);stroke-width:3}
.chart-x-label{fill:#778078;font-size:10px;font-weight:700}
.dashboard-chart-foot{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:10px;color:var(--muted);font-size:11px}
.dashboard-chart-foot strong{color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}
.dashboard-chart-empty{min-height:220px;display:grid;place-items:center;align-content:center;text-align:center;gap:5px;color:var(--muted);padding:24px}
.dashboard-chart-empty .anva-icon{font-size:36px;color:#9fb0a5}
.dashboard-chart-empty strong{color:var(--ink);font-size:14px}
.dashboard-chart-empty small{font-size:11px;max-width:360px}
.dashboard-chart-empty.compact{min-height:120px;padding:16px}
.status-bars{display:grid;gap:13px;padding-top:2px}
.status-bar-row{display:grid;gap:6px;min-width:0}
.status-bar-label{display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0;font-size:12px}
.status-bar-label span{min-width:0;color:#46514a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.status-bar-label strong{flex:0 0 auto;font-variant-numeric:tabular-nums}
.status-bar-track,.ranking-track{height:8px;background:#e9efeb;border-radius:999px;overflow:hidden}
.status-bar-fill,.ranking-track span{display:block;height:100%;min-width:0;border-radius:inherit;background:var(--green)}
.status-bar-fill.warning{background:#d89622}.status-bar-fill.info{background:#4e87bd}.status-bar-fill.success{background:var(--green)}.status-bar-fill.danger{background:#c85151}.status-bar-fill.neutral{background:#87938b}
.ranking-bars{display:grid;gap:14px;min-width:0}
.ranking-row{display:grid;gap:7px;min-width:0}
.ranking-copy{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;min-width:0}
.ranking-copy>div{min-width:0;display:grid;gap:1px}
.ranking-copy strong{font-size:12px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ranking-copy small{color:var(--muted);font-size:10px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ranking-copy b{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.ranking-number{width:27px;height:27px;border-radius:9px;background:var(--green-soft);color:var(--green-strong);display:grid;place-items:center;font-size:11px;font-weight:900}
.dashboard-performance-card{margin:0!important;min-width:0;height:100%;overflow:hidden}
.performance-card-head{margin-bottom:16px}
.performance-layout{display:grid;grid-template-columns:142px minmax(0,1fr);gap:18px;align-items:center;min-width:0}
.performance-gauge{--progress-angle:0deg;width:132px;height:132px;border-radius:50%;background:conic-gradient(var(--green) var(--progress-angle),#e7eee9 0);padding:11px;display:grid;place-items:center}
.performance-gauge-inner{width:100%;height:100%;border-radius:50%;background:#fff;display:grid;place-items:center;align-content:center;text-align:center;box-shadow:inset 0 0 0 1px #edf2ee}
.performance-gauge-inner strong{font-size:24px;line-height:1;font-variant-numeric:tabular-nums}
.performance-gauge-inner small{margin-top:5px;color:var(--muted);font-size:10px;font-weight:800}
.performance-kpi-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.performance-kpi{min-width:0;padding:12px;border:1px solid var(--line);border-radius:13px;background:#f9fbfa;display:grid;gap:4px;overflow:hidden}
.performance-kpi small{color:var(--muted);font-size:10px;font-weight:800}
.performance-kpi .dashboard-kpi-value{font-size:clamp(17px,1.15vw,22px)}
.performance-kpi .dashboard-kpi-value.money{font-size:clamp(16px,1.05vw,20px)}
.performance-progress{margin:15px 0 0;height:8px}
.dashboard-list-card{min-width:0;overflow:hidden}
.dashboard-list{display:grid;min-width:0}
.dashboard-list-row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 0;border-top:1px solid #edf1ee}
.dashboard-list-row:first-child{border-top:0}
.dashboard-list-copy{min-width:0;display:grid;gap:2px}
.dashboard-list-copy strong{font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.dashboard-list-copy small,.dashboard-list-copy span{color:var(--muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.dashboard-list-side{min-width:0;display:grid;justify-items:end;gap:5px;text-align:right}
.dashboard-list-side b{font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}
.dashboard-list-side small{color:var(--muted);font-size:10px}
.dashboard-list-link{text-decoration:none;border-radius:10px;padding-left:7px;padding-right:7px;margin-left:-7px;margin-right:-7px}
.dashboard-list-link:hover{background:#f7faf8}
.dashboard-quick-card{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0}
.dashboard-quick-card>div{display:flex;align-items:center;gap:12px;min-width:0}
.dashboard-quick-card h2{margin:0;font-size:17px}.dashboard-quick-card p{margin:3px 0 0;color:var(--muted);font-size:12px}
.dashboard-system-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.dashboard-system-grid>div{min-width:0;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fafcfb;display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:9px;align-items:center}
.dashboard-system-grid .anva-icon{grid-row:1/3;width:36px;height:36px;border-radius:11px;background:var(--green-soft);color:var(--green-strong);display:grid;place-items:center}
.dashboard-system-grid strong{font-size:12px}.dashboard-system-grid small{color:var(--muted);font-size:10px;line-height:1.35}

/* Generic protection against numerical collisions in summary/list/card surfaces. */
.stat-card,.soft-box,.metric-row,.summary-row,.order-top,.order-body{min-width:0}
.stat-card>div,.soft-box>*,.metric-row>*,.summary-row>*,.order-top>*,.order-body>*{min-width:0}
.stat-card strong,.soft-box strong,.summary-row strong,.order-total strong{font-variant-numeric:tabular-nums}

@media(max-width:1120px){
  .dashboard-main-grid,.dashboard-two-grid{grid-template-columns:minmax(0,1fr)}
  .dashboard-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .performance-layout{grid-template-columns:122px minmax(0,1fr)}
  .performance-gauge{width:112px;height:112px}
}
@media(max-width:760px){
  .dashboard-page{width:100%;max-width:100%;overflow:visible}
  .dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .dashboard-kpi-card{padding:13px;gap:9px;display:grid;grid-template-columns:34px minmax(0,1fr)}
  .dashboard-kpi-icon{width:34px;height:34px;min-width:34px;border-radius:10px}.dashboard-kpi-icon .anva-icon{font-size:20px}
  .dashboard-kpi-value{font-size:21px}.dashboard-kpi-value.money{font-size:18px;letter-spacing:-.04em}
  .dashboard-main-grid,.dashboard-two-grid{grid-template-columns:minmax(0,1fr);gap:12px}
  .dashboard-section-gap{margin-top:14px}
  .dashboard-card-head{gap:10px;margin-bottom:12px}.dashboard-card-head h2{font-size:17px}.dashboard-card-head p{font-size:11px}
  .chart-total{max-width:46%}.chart-total strong{font-size:14px}
  .dashboard-chart-wrap{margin-left:-4px;margin-right:-4px;width:calc(100% + 8px)}
  .dashboard-line-chart{min-height:190px}
  .dashboard-chart-foot{gap:10px}
  .performance-layout{grid-template-columns:minmax(0,1fr);justify-items:center;gap:14px}
  .performance-kpi-grid{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .performance-kpi{padding:10px}.performance-kpi .dashboard-kpi-value,.performance-kpi .dashboard-kpi-value.money{font-size:17px}
  .performance-gauge{width:112px;height:112px}.performance-gauge-inner strong{font-size:21px}
  .dashboard-list-row{gap:9px;padding:10px 0}.dashboard-list-side b{font-size:12px}
  .dashboard-quick-card{align-items:stretch;flex-direction:column}.dashboard-quick-card>div{align-items:flex-start}.dashboard-quick-card>.button{width:100%}
  .dashboard-system-grid{grid-template-columns:minmax(0,1fr)}
  .ranking-copy{grid-template-columns:26px minmax(0,1fr);gap:8px}.ranking-copy b{grid-column:2;justify-self:start;font-size:11px}.ranking-number{width:25px;height:25px}
}
@media(max-width:390px){
  .dashboard-kpi-grid{grid-template-columns:minmax(0,1fr)}
  .dashboard-kpi-card{grid-template-columns:38px minmax(0,1fr);padding:13px 14px}
  .dashboard-kpi-value{font-size:23px}.dashboard-kpi-value.money{font-size:20px}
  .performance-kpi-grid{grid-template-columns:minmax(0,1fr)}
  .dashboard-card-head{display:grid;grid-template-columns:minmax(0,1fr)}.chart-total{max-width:100%;text-align:left}.dashboard-chart-badge{width:max-content}
  .dashboard-list-row{grid-template-columns:minmax(0,1fr)}.dashboard-list-side{justify-items:start;text-align:left}
}

/* v1.4.0 — TOTAL AUTHENTICATED MOBILE APP SHELL REBUILD
   One stable app bar, full hamburger drawer, quick bottom navigation, no header collisions. */
.mobile-menu-trigger,.mobile-drawer,.mobile-drawer-backdrop{display:none}

@media(max-width:760px){
  body.is-authenticated{--mobile-header-height:118px;--mobile-nav-height:82px;padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));}
  body.is-authenticated.mobile-drawer-open{overflow:hidden;touch-action:none}

  /* Authenticated header is deliberately two rows: navigation/identity above,
     search below. No action is allowed to steal width from the search field. */
  .is-authenticated .market-header{height:auto;min-height:var(--mobile-header-height);overflow:visible}
  .is-authenticated .header-inner{
    width:100%;max-width:100%;height:auto;min-height:var(--mobile-header-height);
    padding:8px 12px 10px;display:grid;
    grid-template-areas:"menu brand actions" "search search search";
    grid-template-columns:44px minmax(0,1fr) auto;grid-template-rows:48px 48px;
    gap:4px 8px;align-items:center;overflow:visible;
  }
  .is-authenticated .mobile-menu-trigger{grid-area:menu;display:inline-grid!important;width:44px;height:44px;place-items:center;background:#f3f7f4;color:var(--ink);border:1px solid #e1e9e3;border-radius:14px}
  .is-authenticated .mobile-menu-trigger .anva-icon{font-size:26px}
  .is-authenticated .header-inner>.brand{grid-area:brand;width:auto;max-width:100%;min-width:0;justify-self:start;gap:9px;overflow:hidden}
  .is-authenticated .header-inner>.brand .brand-mark,.is-authenticated .header-inner>.brand .brand-image{width:42px;height:42px;min-width:42px;max-width:42px;border-radius:13px}
  .is-authenticated .header-inner>.brand .brand-copy{display:grid!important;min-width:0;max-width:100%;line-height:1.15}
  .is-authenticated .header-inner>.brand .brand-copy strong{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#465149}
  .is-authenticated .global-search{grid-area:search;width:100%;max-width:100%;height:46px;margin:0;padding:0 13px;border-radius:15px;overflow:hidden;background:#fff}
  .is-authenticated .global-search .anva-icon{font-size:23px;flex:0 0 auto}
  .is-authenticated .global-search input{font-size:15px;line-height:1;min-width:0}
  .is-authenticated .header-actions{grid-area:actions;width:auto;min-width:0;max-width:none;justify-self:end;display:flex;align-items:center;gap:2px;overflow:visible}
  .is-authenticated .header-actions .install-app{display:none!important}
  .is-authenticated .header-actions .account-menu{display:none!important}
  .is-authenticated .header-actions .icon-button{display:inline-grid!important;width:40px;height:40px;min-width:40px;place-items:center;border-radius:13px}
  .is-authenticated .header-actions .icon-button .anva-icon{font-size:23px}
  .is-authenticated .header-actions .has-badge{position:relative}
  .is-authenticated .header-actions .icon-badge{position:absolute;right:1px;top:1px;min-width:16px;height:16px;padding:0 4px;display:grid;place-items:center;border-radius:999px;background:#c43b3b;color:#fff;font-size:9px;font-weight:900;border:2px solid #fff}

  /* Full mobile drawer: every role gets every navigation item here. */
  .mobile-drawer-backdrop{display:block;position:fixed;inset:0;z-index:139;background:rgba(13,27,18,.45);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);opacity:0;transition:opacity .2s ease;touch-action:none}
  .mobile-drawer-backdrop[hidden]{display:none!important}
  .mobile-drawer-backdrop.open{opacity:1}
  .mobile-drawer{display:flex;position:fixed;z-index:140;left:0;top:0;bottom:0;width:min(88vw,360px);max-width:360px;min-width:0;flex-direction:column;background:#fff;box-shadow:24px 0 60px rgba(12,38,23,.24);transform:translate3d(-105%,0,0);transition:transform .22s cubic-bezier(.2,.8,.2,1);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:calc(10px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom))}
  .mobile-drawer.open{transform:translate3d(0,0,0)}
  .mobile-drawer-head{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:10px;padding:4px 2px 12px;border-bottom:1px solid var(--line)}
  .mobile-drawer-brand{display:flex;align-items:center;gap:10px;min-width:0;text-decoration:none}
  .mobile-drawer-brand .brand-mark,.mobile-drawer-brand .brand-image{width:42px;height:42px;min-width:42px;max-width:42px;border-radius:13px}
  .mobile-drawer-brand>span:last-child{display:grid;min-width:0;line-height:1.2}
  .mobile-drawer-brand strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-drawer-brand small{margin-top:2px;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-drawer-close{width:40px;height:40px;background:#f4f7f5}
  .mobile-drawer-user{display:grid;grid-template-columns:44px minmax(0,1fr);gap:11px;align-items:center;margin:12px 2px 8px;padding:12px;background:#f5faf7;border:1px solid #dfebe3;border-radius:16px;min-width:0}
  .mobile-drawer-user .avatar{width:44px;height:44px}
  .mobile-drawer-user>span:last-child{display:grid;min-width:0;line-height:1.25}
  .mobile-drawer-user small{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--green-strong);font-weight:900}
  .mobile-drawer-user strong{margin-top:2px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-drawer-user em{margin-top:2px;color:var(--muted);font-size:10px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-drawer-nav{display:grid;gap:3px;padding:5px 0 8px}
  .mobile-drawer-link{position:relative;width:100%;min-width:0;min-height:46px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 11px;border:0;border-radius:13px;background:transparent;color:#465149;text-decoration:none;text-align:left;font:inherit;font-size:13px;font-weight:800;cursor:pointer}
  .mobile-drawer-link>.anva-icon{font-size:22px;color:#657169}
  .mobile-drawer-link>span:nth-child(2){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-drawer-link.active{background:var(--green-soft);color:var(--green-strong)}
  .mobile-drawer-link.active>.anva-icon{color:var(--green-strong);font-variation-settings:'FILL' 1}
  .mobile-drawer-link.danger{color:var(--danger)}
  .mobile-drawer-link.danger>.anva-icon{color:var(--danger)}
  .mobile-drawer-button{appearance:none;-webkit-appearance:none}
  .mobile-drawer-badge{min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:#dff3e7;color:var(--green-strong);font-size:10px}
  .mobile-drawer-section{display:grid;gap:3px;padding:10px 0 4px;border-top:1px solid #edf1ee}
  .mobile-drawer-section-title{padding:0 11px 5px;color:#7b857f;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
  .mobile-role-form,.mobile-drawer-logout{margin:0}
  .mobile-drawer-logout{margin-top:8px;padding-top:10px;border-top:1px solid #edf1ee}

  /* Main content always starts cleanly below the two-row app bar. */
  .is-authenticated .app-frame{width:100%;max-width:100%;padding:12px 12px 20px;overflow:visible}
  .is-authenticated .main-content,.is-authenticated .main-content.wide{width:100%;max-width:100%;min-width:0;margin:0;padding:0 0 22px;overflow:visible}
  .is-authenticated .main-content>*{max-width:100%}
  .is-authenticated .flash{width:100%;min-width:0;margin:0 0 12px;padding:11px 12px;display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:start;gap:8px;border-radius:14px;font-size:12px;line-height:1.45}
  .is-authenticated .flash>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
  .is-authenticated .flash .anva-icon{font-size:20px;margin-top:1px}
  .is-authenticated .flash-close{width:30px;height:30px;margin:-4px -4px 0 0;padding:0;display:grid;place-items:center}
  .is-authenticated .page-head{margin-top:2px;margin-bottom:16px;gap:8px}
  .is-authenticated .page-head h1{font-size:25px;line-height:1.1}
  .is-authenticated .page-head p{margin-top:6px;font-size:13px;line-height:1.5}
  .is-authenticated .eyebrow{font-size:10px;margin-bottom:5px}

  /* Dense admin/workspace forms become a predictable single mobile column. */
  .is-authenticated .form-card,.is-authenticated .card.pad,.is-authenticated .table-card,.is-authenticated .simulation-box,.is-authenticated .soft-box{width:100%;min-width:0;max-width:100%;overflow:hidden}
  .is-authenticated .form-card,.is-authenticated .card.pad{padding:14px}
  .is-authenticated .form-grid,.is-authenticated .grid.two,.is-authenticated .grid.three,.is-authenticated .grid.four,.is-authenticated .grid.five{grid-template-columns:minmax(0,1fr)!important;gap:11px}
  .is-authenticated .inline-actions,.is-authenticated .report-filter{width:100%;min-width:0;display:flex;flex-wrap:wrap;gap:8px}
  .is-authenticated .inline-actions>.button,.is-authenticated .report-filter>.button{max-width:100%}
  .is-authenticated input,.is-authenticated select,.is-authenticated textarea,.is-authenticated button{max-width:100%}

  /* Bottom nav remains the quick 5-item bar; hamburger exposes the complete menu. */
  .is-authenticated .mobile-bottom-nav{z-index:90;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;min-height:var(--mobile-nav-height);padding:6px 3px max(7px,env(safe-area-inset-bottom));overflow:hidden}
  .is-authenticated .mobile-bottom-nav a{width:100%;max-width:none;min-width:0;min-height:64px;padding:5px 2px;display:grid;grid-template-rows:26px minmax(20px,auto);place-items:center;align-content:center;gap:3px;overflow:hidden}
  .is-authenticated .mobile-bottom-nav .anva-icon{font-size:23px}
  .is-authenticated .mobile-bottom-nav small{display:-webkit-box;width:100%;min-width:0;max-width:100%;max-height:24px;padding:0 1px;font-size:9px;line-height:1.15;text-align:center;white-space:normal;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .is-authenticated .mobile-bottom-nav a.active{color:var(--green-strong)}

  .is-authenticated .pwa-install-banner{bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px)}
}

@media(max-width:390px){
  .is-authenticated .header-inner{grid-template-columns:44px minmax(0,1fr) auto;padding-left:8px;padding-right:8px;gap:4px 6px}
  .is-authenticated .header-inner>.brand .brand-copy{display:none!important}
  .is-authenticated .header-actions .icon-button{width:38px;height:38px;min-width:38px}
  .is-authenticated .app-frame{padding-left:10px;padding-right:10px}
}

}
