:root{
  --bg:#f4f4ef;--panel:#fff;--ink:#151918;--muted:#737b78;--line:#e4e7e3;--sidebar:#101515;
  --sidebar-soft:#1c2422;--accent:#f3b61f;--accent-dark:#c78900;--profit:#167a55;--danger:#b9382f;--warning:#9b6a00;
  --shadow:0 10px 35px rgba(20,25,24,.06);--radius:18px;--sidebar-w:258px;
}
*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}body{margin:0;background:var(--bg);color:var(--ink)}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em;background:#f0f1ee;padding:.14rem .34rem;border-radius:6px}
.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-w);background:var(--sidebar);color:#f6f7f6;padding:24px 18px;display:flex;flex-direction:column;z-index:30}.brand-block{display:flex;align-items:center;gap:12px;padding:0 8px 22px}.brand-block strong{display:block;font-size:15px}.brand-block small{display:block;color:#95a09c;font-size:11px;margin-top:3px}.brand-mark{width:40px;height:40px;border-radius:12px;background:var(--accent);color:#151515;display:grid;place-items:center;font-weight:900;letter-spacing:-1px}.small-mark{width:34px;height:34px;border-radius:10px;font-size:13px}.nav-label{font-size:10px;letter-spacing:.16em;color:#66716d;padding:0 11px;margin:2px 0 10px}.sidebar-nav{display:grid;gap:4px}.nav-item{display:flex;gap:12px;align-items:center;padding:11px 12px;border-radius:11px;color:#bdc5c2;font-size:13px;font-weight:600}.nav-item:hover{background:#171f1d;color:#fff}.nav-item.active{background:#f7f8f5;color:#111514}.nav-icon{width:22px;text-align:center;font-size:16px}.sidebar-user{margin-top:auto;padding:15px 8px 0;border-top:1px solid #27302d;display:grid;grid-template-columns:36px 1fr 28px;align-items:center;gap:9px}.avatar{width:36px;height:36px;border-radius:50%;background:#293431;color:#fff;display:grid;place-items:center;font-weight:800}.user-meta{min-width:0}.user-meta strong,.user-meta small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-meta strong{font-size:12px}.user-meta small{font-size:9px;letter-spacing:.12em;color:#82908b;margin-top:3px}.signout{font-size:18px;color:#9fa9a5;text-align:right}
.main-content{margin-left:var(--sidebar-w);padding:34px 38px 64px;min-height:100vh}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:26px}.page-header h1{font-size:30px;letter-spacing:-.035em;margin:4px 0 0}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:800;color:#8a928f;margin:0}.eyebrow.light{color:#9ca8a4}.btn{border:1px solid transparent;border-radius:11px;padding:10px 15px;font-weight:750;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.15s ease}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--sidebar);color:#fff}.btn.primary:hover{background:#202826}.btn.secondary{background:#fff;border-color:var(--line);color:#313837}.btn.ghost{background:transparent;border-color:var(--line)}.btn.wide{width:100%}.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}.small-btn{padding:7px 10px;font-size:12px}
.alert{border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 14px;margin-bottom:18px;font-size:13px}.alert.success{border-color:#cfe9dd;background:#f5fbf8;color:#1c674b}.alert.danger{border-color:#f0cbc7;background:#fff7f6;color:#8c3029}.alert.warning{border-color:#ead7a0;background:#fffaf0;color:#795b11}.alert a{text-decoration:underline;font-weight:700}
.dashboard-toolbar,.toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.dashboard-toolbar>div:first-child{display:grid;gap:2px}.dashboard-toolbar strong{font-size:13px}.dashboard-toolbar span{font-size:12px;color:var(--muted)}.period-pills{display:flex;gap:6px;flex-wrap:wrap}.pill{font-size:11px;font-weight:750;color:#626a67;border:1px solid var(--line);background:#fff;padding:7px 10px;border-radius:999px}.pill.active{background:var(--sidebar);color:#fff;border-color:var(--sidebar)}
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:16px}.admin-kpis,.report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:var(--shadow);min-width:0;overflow:hidden}.kpi-card>span{display:block;font-size:11px;color:var(--muted);font-weight:700;margin-bottom:8px}.kpi-card strong{display:block;font-size:25px;line-height:1.1;letter-spacing:-.035em;min-width:0}.kpi-card small{display:block;margin-top:8px;color:#8c9491;font-size:10px}.money-value{font-size:clamp(16px,2vw,25px)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}.profit-card{border-color:#cee6dc}.profit-card strong,.profit-text{color:var(--profit)}.net-card{background:#111716;color:#fff;border-color:#111716}.net-card>span,.net-card small{color:#9fa9a5}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.9fr);gap:16px;margin-bottom:16px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;min-width:0}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.panel-head h2{margin:4px 0 0;font-size:17px;letter-spacing:-.02em}.panel-head>a{font-size:12px;color:#4f5855;font-weight:700}.muted{color:var(--muted);font-size:12px}.bar-chart{height:220px;display:flex;align-items:stretch;gap:9px;padding-top:18px;border-bottom:1px solid var(--line)}.bar-day{flex:1;display:flex;flex-direction:column;align-items:center;min-width:0}.bar-stack{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:4px;min-height:160px}.bar{display:block;width:min(20px,37%);border-radius:6px 6px 2px 2px;min-height:3px;transition:height .2s ease}.revenue-bar{background:#1d2926}.profit-bar{background:var(--accent)}.bar-day small{height:26px;padding-top:8px;color:#868e8b;font-size:10px}.chart-legend{display:flex;gap:18px;margin-top:12px;font-size:10px;color:#737b78}.chart-legend span{display:flex;gap:6px;align-items:center}.chart-legend i{width:8px;height:8px;border-radius:2px}.legend-revenue{background:#1d2926}.legend-profit{background:var(--accent)}.team-list{display:grid;gap:4px}.team-row{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid #f0f1ef}.team-row:last-child{border-bottom:0}.small-avatar{width:32px;height:32px;font-size:11px}.team-row strong,.team-row small{display:block}.team-row strong{font-size:12px}.team-row small{font-size:10px;color:var(--muted);margin-top:3px}.money-small{font-size:12px;white-space:nowrap}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.quick-grid a{border:1px solid var(--line);padding:14px;border-radius:12px;font-size:12px;font-weight:750;background:#fafbf9}
.table-panel{padding:0}.table-panel .panel-head{padding:20px 20px 0}.table-wrap{overflow:auto;width:100%;border-radius:0 0 var(--radius) var(--radius)}table{width:100%;border-collapse:collapse;min-width:720px}th,td{text-align:left;padding:12px 16px;border-bottom:1px solid #edf0ec;vertical-align:middle}th{font-size:9px;text-transform:uppercase;letter-spacing:.11em;color:#8a928f;background:#fafbf9;white-space:nowrap}td{font-size:12px;color:#303735}td strong,td small{display:block}td small{color:#919896;font-size:9.5px;margin-top:3px}.money-cell{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:700}.status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;background:#eef0ed;color:#5f6965;white-space:nowrap}.status.paid{background:#e8f6ef;color:#216a50}.status.part-payment{background:#fff3d2;color:#80600c}.status.unpaid{background:#faeaea;color:#9b3a33}.stock-pill{display:inline-flex;padding:5px 8px;border-radius:999px;background:#edf5ef;color:#2f684e;font-size:10px;font-weight:800}.stock-pill.low{background:#fff1d6;color:#8a6108}.empty-state{color:#89918e;text-align:center;padding:28px!important}.details-cell{max-width:340px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-link,.text-button{font-weight:750;color:#53615c;font-size:11px}.text-button{border:0;background:none;padding:0}.inline-form{display:inline}
.search-form{display:flex;gap:8px;max-width:500px;flex:1}.search-form input{flex:1}.payment-pop{margin-top:6px;position:relative}.payment-pop summary{font-size:10px;color:#495651;font-weight:800;cursor:pointer}.mini-form{position:absolute;z-index:8;right:0;top:24px;width:260px;background:#fff;padding:14px;border:1px solid var(--line);box-shadow:0 15px 45px rgba(20,25,24,.16);border-radius:14px;display:grid;gap:9px}.mini-form label{font-size:10px}.mini-form input,.mini-form select{margin-top:4px}
label{display:grid;gap:6px;font-size:11px;font-weight:750;color:#59625f}input,select,textarea{width:100%;border:1px solid #dce1dc;background:#fff;border-radius:10px;padding:10px 11px;color:#17201d;outline:none;min-width:0}input:focus,select:focus,textarea:focus{border-color:#929d98;box-shadow:0 0 0 3px rgba(30,45,40,.06)}textarea{resize:vertical}.stack-form{display:grid;gap:12px}.form-panel{padding:22px}.form-grid{display:grid;gap:12px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-section{padding:5px 0 22px;margin-bottom:20px;border-bottom:1px solid var(--line)}.form-section:last-of-type{border-bottom:0;margin-bottom:0}.form-section h3{font-size:13px;margin:0 0 12px}.section-title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.section-title-row h3{margin:0}.full-label{margin-top:12px}.form-actions{display:flex;justify-content:flex-end;gap:8px}.sale-items{display:grid;gap:9px}.sale-item-row{display:grid;grid-template-columns:minmax(220px,1.7fr) 90px minmax(140px,.9fr) minmax(120px,.8fr) 32px;gap:9px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:13px;background:#fafbf9}.line-total{display:grid;gap:7px;padding:0 0 9px}.line-total span{font-size:9px;color:#7a8480}.line-total strong{font-size:13px}.remove-row{width:30px;height:38px;border:0;background:transparent;color:#9d4c45;font-size:20px;border-radius:8px}.sale-total-box{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px}.sale-total-box span{font-size:11px;color:var(--muted)}.sale-total-box strong{font-size:22px}.hidden{display:none!important}.split-layout{display:grid;grid-template-columns:330px minmax(0,1fr);gap:16px;align-items:start}.compact-form-panel{position:sticky;top:20px}.margin-preview{font-size:11px;background:#f2f7f4;border:1px solid #dcebe3;border-radius:10px;padding:10px;color:#426653}.profile-grid{display:grid;grid-template-columns:320px minmax(0,580px);gap:16px}.profile-card{text-align:center}.profile-avatar{width:76px;height:76px;margin:4px auto 12px;border-radius:50%;display:grid;place-items:center;background:var(--sidebar);color:#fff;font-size:28px;font-weight:850}.profile-card h2{margin:0;font-size:20px}.profile-card>p{color:var(--muted);font-size:12px}.role-badge{display:inline-flex;background:#f2f3ef;padding:5px 9px;border-radius:999px;font-size:9px;font-weight:850;letter-spacing:.12em}.profile-detail{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-top:1px solid var(--line);margin-top:18px;text-align:left}.profile-detail+.profile-detail{margin-top:0}.profile-detail span{font-size:11px;color:var(--muted)}.profile-detail strong{font-size:11px}.privacy-note{margin-top:14px;text-align:left;font-size:10.5px;line-height:1.55;background:#f7f8f5;padding:11px;border-radius:10px;color:#67706d}.settings-panel{max-width:620px}.danger-zone{font-size:12px;color:#5f6764}.danger-zone h3{font-size:13px}.notification-list{display:grid}.notification-row{display:grid;grid-template-columns:10px 1fr;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}.notification-row:last-child{border-bottom:0}.notification-row.unread{background:linear-gradient(90deg,#fff9e9 0,#fff 26%);margin:0 -10px;padding-left:10px;padding-right:10px;border-radius:8px}.notification-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;background:#87928e}.notification-dot.success{background:#2b8b66}.notification-dot.warning{background:#d79c12}.notification-row strong{font-size:12px}.notification-row p{font-size:11px;color:#5f6764;margin:4px 0}.notification-row small{font-size:9.5px;color:#929a97}.report-actions{display:flex;gap:8px;margin-top:16px}
.mobile-topbar,.mobile-bottom-nav,.mobile-more-sheet,.mobile-menu-backdrop{display:none}
.login-body,.setup-body{min-height:100vh;background:#edf0ea;display:grid;place-items:center;padding:24px}.login-shell{width:min(980px,100%);min-height:590px;background:#fff;border:1px solid var(--line);border-radius:26px;overflow:hidden;display:grid;grid-template-columns:minmax(360px,.9fr) 1.15fr;box-shadow:0 30px 90px rgba(20,25,24,.12)}.login-panel{padding:54px 48px;display:flex;flex-direction:column;justify-content:center}.login-mark{margin-bottom:24px}.login-panel h1{font-size:34px;margin:5px 0 8px;letter-spacing:-.045em}.login-copy{font-size:13px;color:var(--muted);margin:0 0 28px}.login-panel .stack-form{gap:14px}.login-panel .muted{margin-top:18px}.login-visual{background:#111716;color:#fff;padding:54px;display:flex;flex-direction:column;justify-content:flex-end;position:relative;overflow:hidden}.login-visual:before{content:"";position:absolute;width:300px;height:300px;border:70px solid rgba(243,182,31,.12);border-radius:50%;top:-110px;right:-80px}.login-visual h2{font-size:34px;line-height:1.05;letter-spacing:-.04em;margin:10px 0 34px;position:relative}.visual-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;position:relative}.visual-metrics div{border:1px solid #34403d;border-radius:12px;padding:13px}.visual-metrics span,.visual-metrics strong{display:block}.visual-metrics span{font-size:9px;color:#8d9995}.visual-metrics strong{margin-top:6px;font-size:14px}.setup-card{width:min(500px,100%);background:#fff;padding:40px;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}.setup-card h1{font-size:28px;margin:6px 0 10px}.setup-card p{font-size:13px;color:#626a67;line-height:1.55}.setup-card form{margin:20px 0}.small{font-size:10px!important}
@media(max-width:1100px){.admin-kpis,.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}.split-layout{grid-template-columns:290px minmax(0,1fr)}.sale-item-row{grid-template-columns:minmax(190px,1.4fr) 80px minmax(130px,1fr) minmax(110px,.8fr) 30px}}
@media(max-width:760px){body{padding-bottom:84px}.sidebar{display:none}.main-content{margin-left:0;padding:78px 14px 24px}.mobile-topbar{display:grid;grid-template-columns:34px 1fr 42px;align-items:center;gap:10px;position:fixed;inset:0 0 auto 0;height:62px;padding:9px 14px;background:rgba(255,255,255,.96);backdrop-filter:blur(16px);border-bottom:1px solid var(--line);z-index:35}.mobile-topbar strong,.mobile-topbar small{display:block}.mobile-topbar strong{font-size:13px}.mobile-topbar small{font-size:8px;letter-spacing:.12em;color:#818a87;margin-top:2px}.top-notify{position:relative;width:38px;height:38px;border:1px solid var(--line);border-radius:11px;display:grid;place-items:center;font-size:18px}.top-notify b,.notification-icon b{position:absolute;min-width:15px;height:15px;padding:0 3px;border-radius:999px;background:#c63d35;color:#fff;font-size:8px;display:grid;place-items:center}.top-notify b{right:-4px;top:-4px}.page-header{align-items:center;margin-bottom:18px}.page-header h1{font-size:24px}.page-header .eyebrow{display:none}.desktop-action{display:none}.dashboard-toolbar{align-items:flex-start;flex-direction:column}.period-pills{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.pill{white-space:nowrap}.kpi-grid,.admin-kpis,.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kpi-card{padding:14px;border-radius:14px}.kpi-card strong{font-size:20px}.money-value{font-size:clamp(14px,4.2vw,20px)!important;white-space:normal;overflow-wrap:anywhere}.dashboard-grid{gap:10px}.panel{border-radius:15px;padding:15px}.table-panel{padding:0}.table-panel .panel-head{padding:16px 15px 0}.panel-head{margin-bottom:14px}.panel-head h2{font-size:15px}.bar-chart{height:190px}.bar-stack{min-height:130px}.toolbar-row{align-items:stretch;flex-direction:column}.search-form{max-width:none}.split-layout,.profile-grid{grid-template-columns:1fr}.compact-form-panel{position:static}.form-grid.two,.form-grid.three{grid-template-columns:1fr}.sale-item-row{grid-template-columns:1fr 76px 1fr 26px;align-items:end}.sale-item-row>label:first-child{grid-column:1/-1}.line-total{grid-column:1/4}.remove-row{grid-column:4;grid-row:2}.form-panel{padding:16px}.form-actions{position:sticky;bottom:76px;background:#fff;padding-top:10px;z-index:5}.payment-pop .mini-form{position:fixed;left:16px;right:16px;bottom:92px;top:auto;width:auto}.mobile-bottom-nav{display:grid;grid-template-columns:1fr 1fr 72px 1fr 1fr;align-items:end;position:fixed;left:0;right:0;bottom:0;height:72px;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:#fff;border-top:1px solid var(--line);z-index:50}.mobile-nav-item{border:0;background:transparent;display:grid;place-items:center;gap:2px;color:#89918e;position:relative;min-height:52px}.mobile-nav-item.active{color:#151918}.mobile-nav-item small{font-size:8px;font-weight:750}.mobile-icon{font-size:19px;line-height:20px;position:relative}.profile-svg svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.notification-icon b{right:-11px;top:-8px}.mobile-plus{width:54px;height:54px;border-radius:50%;background:var(--sidebar);color:#fff;display:grid;place-items:center;font-size:28px;box-shadow:0 8px 22px rgba(16,21,21,.28);margin:0 auto 21px;border:5px solid var(--bg)}.mobile-menu-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.28);z-index:58}.mobile-menu-backdrop.open{display:block}.mobile-more-sheet{position:fixed;left:8px;right:8px;bottom:78px;background:#fff;border:1px solid var(--line);border-radius:20px;z-index:60;padding:10px 14px 14px;box-shadow:0 24px 70px rgba(0,0,0,.2)}.mobile-more-sheet.open{display:block}.sheet-handle{width:34px;height:4px;background:#d8ddda;border-radius:10px;margin:0 auto 9px}.sheet-header{display:flex;justify-content:space-between;align-items:center;padding:2px 3px 10px}.sheet-header strong{font-size:14px}.sheet-header button{border:0;background:#f1f3f0;width:30px;height:30px;border-radius:9px;font-size:20px}.sheet-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sheet-grid a{background:#f7f8f6;border:1px solid #eceeeb;padding:12px;border-radius:11px;font-size:11px;font-weight:750}.login-shell{grid-template-columns:1fr;min-height:auto}.login-visual{display:none}.login-panel{padding:36px 24px}.login-panel h1{font-size:29px}.setup-card{padding:28px 20px}.report-actions{flex-direction:column}.report-actions .btn{width:100%}}
@media(max-width:390px){.kpi-grid,.admin-kpis,.report-kpis{grid-template-columns:1fr}.money-value{white-space:normal}.sale-item-row{grid-template-columns:1fr 70px 1fr 26px}.mobile-bottom-nav{grid-template-columns:1fr 1fr 64px 1fr 1fr}.mobile-plus{width:50px;height:50px}}
.signout-form{margin:0;display:block}.signout{border:0;background:transparent;padding:0;cursor:pointer}.sheet-signout{margin:0}.sheet-signout button{width:100%;height:100%;text-align:left;background:#f7f8f6;border:1px solid #eceeeb;padding:12px;border-radius:11px;font-size:11px;font-weight:750;color:inherit}

/* SolarMarket Hub brand identity */
.brand-logo-box{background:#fff;border-radius:11px;display:grid;place-items:center;overflow:hidden;flex:0 0 auto}
.brand-logo-box img{display:block;width:100%;height:100%;object-fit:contain}
.sidebar-logo{width:44px;height:44px;padding:3px}
.mobile-brand-logo{width:34px;height:34px;border:1px solid var(--line);padding:2px;border-radius:9px}
.login-logo{display:block;width:154px;max-height:86px;object-fit:contain;object-position:left center;margin:0 0 22px}
.setup-logo{display:block;width:150px;max-height:84px;object-fit:contain;object-position:left center;margin:0 0 15px}
@media(max-width:760px){.login-logo{width:142px;max-height:78px}.setup-logo{width:138px;max-height:76px}}


/* Aiby Technologies credit */
.system-footer{margin-top:42px;padding:20px 0 4px;border-top:1px solid var(--line);text-align:center;color:#8a928f;font-size:10.5px;letter-spacing:.01em}
.system-footer a,.public-footer a{color:#4e5955;font-weight:750;text-decoration:none}
.system-footer a:hover,.public-footer a:hover{text-decoration:underline}
.public-footer{position:fixed;left:0;right:0;bottom:12px;z-index:5;text-align:center;color:#808986;font-size:10.5px;pointer-events:none}
.public-footer a{pointer-events:auto}
@media(max-width:760px){.system-footer{margin-top:30px;padding-bottom:8px}.public-footer{position:static;margin-top:14px;padding-bottom:max(10px,env(safe-area-inset-bottom))}.login-body,.setup-body{display:flex;flex-direction:column;justify-content:center}.login-shell,.setup-card{flex:0 0 auto}.setup-public-footer{margin-top:12px}}

/* SolarMarket Hub v1.5 desktop workflow improvements */
.period-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.custom-period{position:relative}.custom-period>summary{list-style:none;cursor:pointer}.custom-period>summary::-webkit-details-marker{display:none}.custom-period-popover{position:absolute;right:0;top:calc(100% + 9px);z-index:25;width:290px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px;box-shadow:0 18px 50px rgba(20,25,24,.16);display:grid;grid-template-columns:1fr 1fr;gap:9px}.custom-period-popover label{font-size:9px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.08em}.custom-period-popover input{width:100%;margin-top:5px;border:1px solid var(--line);border-radius:9px;padding:9px;background:#fff;color:var(--ink);font-size:11px}.custom-period-popover .btn{grid-column:1/-1}
.collection-panel{display:flex;flex-direction:column}.collection-visual{display:grid;grid-template-columns:126px 1fr;gap:18px;align-items:center;margin:3px 0 18px}.collection-ring{--collection-angle:0deg;width:124px;height:124px;border-radius:50%;background:conic-gradient(var(--sidebar) 0 var(--collection-angle),#e9ece8 var(--collection-angle) 360deg);display:grid;place-items:center;position:relative}.collection-ring:after{content:"";position:absolute;inset:13px;border-radius:50%;background:#fff}.collection-ring>div{position:relative;z-index:1;text-align:center}.collection-ring strong,.collection-ring small{display:block}.collection-ring strong{font-size:24px;letter-spacing:-.04em}.collection-ring small{font-size:9px;color:var(--muted);margin-top:2px}.collection-copy{display:grid;grid-template-columns:1fr auto;gap:9px 12px;align-items:center}.collection-copy span{font-size:10px;color:var(--muted)}.payment-status-bars{display:grid;gap:10px;margin-top:auto}.status-bar-row>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:10px;margin-bottom:5px}.status-bar-row span{color:#5f6865}.status-bar-row b{font-size:10px}.status-track{height:6px;border-radius:99px;background:#eef0ed;overflow:hidden}.status-track i{height:100%;display:block;border-radius:99px;background:#1d2926;min-width:0}.status-track i.part-payment{background:var(--accent)}.status-track i.unpaid{background:#d4867f}.status-track i.paid{background:#3e8569}
.clickable-row{cursor:pointer;transition:background .12s ease}.clickable-row:hover,.clickable-row:focus{background:#fbfaf4;outline:none}.sale-primary-link{display:block}.row-arrow{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;font-size:14px;background:#fff}.clickable-row:hover .row-arrow{background:var(--sidebar);color:#fff;border-color:var(--sidebar)}
.detail-topbar{display:flex;align-items:center;justify-content:space-between;margin:-5px 0 14px}.sale-detail-hero{background:#111716;color:#fff;border-radius:19px;padding:23px 25px;margin-bottom:16px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.sale-detail-hero h2{font-size:28px;letter-spacing:-.04em;margin:5px 0}.sale-detail-hero p{margin:0;color:#a8b1ae;font-size:11px}.detail-total{text-align:right}.detail-total span,.detail-total strong{display:block}.detail-total span{font-size:9px;color:#9aa5a1;text-transform:uppercase;letter-spacing:.1em}.detail-total strong{font-size:27px;margin-top:5px;white-space:nowrap}.detail-pattern-title{font-size:17px!important;line-height:1.15!important}.detail-grid{grid-template-columns:minmax(0,1.5fr) minmax(300px,.8fr)}.detail-explainer{font-size:11px;color:var(--muted);margin:-7px 0 18px}.payment-timeline{display:grid}.payment-step{display:grid;grid-template-columns:32px 1fr;gap:12px;position:relative;padding:0 0 18px}.payment-step:not(:last-child):before{content:"";position:absolute;left:15px;top:31px;bottom:0;width:1px;background:var(--line)}.payment-step-number{width:31px;height:31px;border-radius:50%;background:#f1f3ef;display:grid;place-items:center;font-size:10px;font-weight:850;z-index:1}.payment-step-copy{border-bottom:1px solid #f0f1ef;padding-bottom:15px}.payment-step:last-child .payment-step-copy{border-bottom:0}.payment-step-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.payment-step-head strong{font-size:14px}.payment-step-head span{font-size:9px;color:var(--muted)}.payment-step-copy p{font-size:10.5px;margin:5px 0;color:#4f5855}.payment-step-copy small{font-size:9.5px;color:#8a928f}.detail-payment-form{margin-top:5px}.detail-payment-form>summary{list-style:none;width:max-content}.detail-payment-form>summary::-webkit-details-marker{display:none}.detail-mini-form{margin-top:12px;position:static!important;width:auto!important;display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;align-items:end;background:#f8f9f7;border:1px solid var(--line);border-radius:12px;padding:12px}.detail-mini-form label{font-size:9px;color:var(--muted);font-weight:700}.detail-mini-form input,.detail-mini-form select{display:block;width:100%;margin-top:5px;border:1px solid var(--line);border-radius:8px;padding:8px;background:#fff}.detail-list{margin:0;display:grid}.detail-list>div{display:grid;grid-template-columns:120px 1fr;gap:14px;padding:11px 0;border-bottom:1px solid #eef0ed}.detail-list>div:last-child{border-bottom:0}.detail-list dt{font-size:10px;color:var(--muted)}.detail-list dd{margin:0;font-size:11px;font-weight:650;overflow-wrap:anywhere}
.import-center{margin-top:16px}.import-note{background:#f7f8f5;border:1px solid #eceeea;border-radius:11px;padding:11px 12px;font-size:10.5px;color:#646d6a;line-height:1.55;margin:-4px 0 15px}.import-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.import-card{border:1px solid var(--line);border-radius:14px;padding:15px;background:#fbfcfa;display:flex;flex-direction:column;gap:11px;min-width:0}.import-card strong{font-size:13px}.import-card p{font-size:10px;color:var(--muted);margin:4px 0 0;line-height:1.45}.import-card form{display:grid;gap:8px;margin-top:auto}.import-card input[type=file]{max-width:100%;font-size:10px;border:1px dashed #d9ded9;background:#fff;border-radius:9px;padding:9px}.import-card .text-link{width:max-content}
.account-settings-btn{padding:7px 10px;font-size:10px}.modal-backdrop{display:none;position:fixed;inset:0;background:rgba(11,16,15,.42);backdrop-filter:blur(2px);z-index:80}.modal-backdrop.open{display:block}.account-modal{display:none;position:fixed;z-index:81;left:50%;top:50%;transform:translate(-50%,-50%);width:min(650px,calc(100% - 32px));max-height:min(780px,calc(100vh - 48px));overflow:auto;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 30px 100px rgba(0,0,0,.28)}.account-modal.open{display:block}.account-modal-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:20px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}.account-modal-head h2{margin:4px 0 2px;font-size:20px}.account-modal-head small{font-size:10px;color:var(--muted)}.account-modal-head>button{border:0;background:#f0f2ef;width:32px;height:32px;border-radius:9px;font-size:20px}.account-modal-body{padding:0 22px}.account-action-block{padding:18px 0;border-bottom:1px solid var(--line)}.account-action-block:last-child{border-bottom:0}.account-action-block h3{font-size:13px;margin:0 0 5px}.account-action-block>p{font-size:10.5px;color:var(--muted);margin:0 0 12px;line-height:1.45}.compact-stack{max-width:460px}.check-row{display:flex!important;align-items:center;gap:8px!important;font-size:10px!important}.check-row input{width:auto!important;margin:0!important}.danger-account-block{background:#fffafa;margin:0 -22px;padding-left:22px;padding-right:22px}.danger-btn{background:#a9322a;color:#fff;border-color:#a9322a}.danger-btn:hover{background:#8f2923}.danger-btn:disabled{opacity:.4}.audit-explainer{margin-bottom:16px}.audit-explainer h2{font-size:17px;margin:4px 0 8px}.audit-explainer>p{font-size:11px;color:#5e6764;line-height:1.6;max-width:920px}
.settings-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:16px;align-items:start}.settings-intro{font-size:11px;color:var(--muted);margin:-5px 0 16px}.setting-toggle{display:flex!important;align-items:center;justify-content:space-between;gap:18px;border:1px solid var(--line);border-radius:11px;padding:11px 12px;background:#fafbf9}.setting-toggle span,.setting-toggle strong,.setting-toggle small{display:block}.setting-toggle strong{font-size:11px;color:#303735}.setting-toggle small{font-size:9px;color:#89918e;margin-top:3px}.setting-toggle input{width:18px!important;height:18px!important;margin:0!important;accent-color:#151918}.settings-subgroup{display:grid;gap:8px;margin-top:3px}.settings-subgroup>.eyebrow{margin:5px 0 1px}.test-email-form{margin-top:9px}.settings-info-panel .danger-zone{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}
@media(max-width:1100px){.import-grid{grid-template-columns:1fr 1fr}.detail-grid,.settings-grid{grid-template-columns:1fr}.detail-mini-form{grid-template-columns:1fr 1fr}.detail-mini-form .btn{grid-column:1/-1}}
@media(max-width:760px){.period-controls{width:100%;align-items:flex-start;justify-content:flex-start}.custom-period{position:static}.period-toolbar{position:relative}.custom-period-popover{left:0;right:auto;top:auto;margin-top:8px;width:min(330px,calc(100vw - 28px))}.collection-visual{grid-template-columns:100px 1fr}.collection-ring{width:98px;height:98px}.collection-ring strong{font-size:20px}.sale-detail-hero{align-items:flex-start;flex-direction:column;padding:18px}.sale-detail-hero h2{font-size:24px}.detail-total{text-align:left}.detail-total strong{font-size:23px}.detail-kpis{grid-template-columns:1fr 1fr}.detail-mini-form{grid-template-columns:1fr}.import-grid{grid-template-columns:1fr}.account-modal{top:auto;bottom:82px;transform:translateX(-50%);max-height:calc(100vh - 110px);border-radius:20px 20px 14px 14px}.settings-grid{grid-template-columns:1fr}.payment-step-head{align-items:flex-start;flex-direction:column;gap:2px}.detail-list>div{grid-template-columns:100px 1fr}}
@media(max-width:390px){.detail-kpis{grid-template-columns:1fr}.collection-visual{grid-template-columns:1fr}.collection-ring{margin:auto}.collection-copy{max-width:240px;width:100%;margin:auto}}

/* v1.6 receipts + returning-customer history */
.detail-top-actions{display:flex;align-items:center;gap:9px}.receipt-button{font-size:10px;padding:8px 11px}.customer-key-note{font-size:9px;color:var(--muted);font-weight:700}.known-customer-card{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid #cfe5d8;background:#f3faf6;border-radius:12px;padding:11px 13px;margin-bottom:12px}.known-customer-card[hidden]{display:none}.known-customer-card>div{display:flex;align-items:center;gap:10px}.known-customer-icon{width:27px;height:27px;border-radius:50%;background:#2f7b5d;color:#fff;display:grid;place-items:center;font-size:11px;font-weight:900}.known-customer-card strong,.known-customer-card small{display:block}.known-customer-card strong{font-size:11px}.known-customer-card small{font-size:9.5px;color:#65716c;margin-top:2px}.customer-lookup-status{min-height:15px;font-size:9.5px;color:#7c8582;margin:7px 0 0}.phone-key-pill{font-weight:750}.customer-identity-badge{font-size:9px;background:#f1f3ef;border:1px solid var(--line);padding:6px 9px;border-radius:999px;color:#69726f}.customer-detail-hero{background:#111716;color:#fff;border-radius:19px;padding:23px 25px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;gap:20px}.customer-detail-hero h2{font-size:28px;letter-spacing:-.04em;margin:5px 0}.customer-detail-hero p,.customer-detail-hero small{display:block;color:#a8b1ae;font-size:11px;margin:0}.customer-history-count{text-align:center;min-width:110px;border-left:1px solid #34403d;padding-left:20px}.customer-history-count strong,.customer-history-count span{display:block}.customer-history-count strong{font-size:30px}.customer-history-count span{font-size:9px;color:#9da8a4;text-transform:uppercase;letter-spacing:.1em}.customer-sale-actions{display:flex;gap:7px;align-items:center;justify-content:flex-end}.receipt-mini-link{font-size:9px;font-weight:750;text-decoration:none;color:#303936;border:1px solid var(--line);padding:6px 8px;border-radius:7px;background:#fff}.receipt-mini-link:hover{background:#f2f4f0}
@media(max-width:760px){.detail-top-actions{gap:6px}.receipt-button{padding:7px 9px}.known-customer-card{align-items:flex-start;flex-direction:column}.customer-detail-hero{align-items:flex-start}.customer-history-count{border-left:0;border-top:1px solid #34403d;padding:12px 0 0;width:100%;text-align:left}.customer-sale-actions{justify-content:flex-start}}

/* v1.6.2 returning-customer autofill feedback */
.customer-section input.customer-autofilled{border-color:#79b99e!important;background:#f3faf6!important;box-shadow:0 0 0 3px rgba(47,123,93,.08);transition:background .2s ease,border-color .2s ease,box-shadow .2s ease}.customer-lookup-status{transition:color .2s ease}


/* v1.7 filters and clickable notifications */
.filter-toolbar{align-items:flex-end}.filter-form{display:flex;align-items:flex-end;gap:8px;flex:1;flex-wrap:wrap}.filter-search{min-width:240px;max-width:460px;flex:1}.filter-control{display:grid;gap:4px;min-width:180px}.filter-control>span{font-size:9px;text-transform:uppercase;letter-spacing:.09em;color:#858e8a;font-weight:800}.filter-control select{min-width:180px}.compact-filter{flex:0 1 auto}.filter-clear{font-size:10px;font-weight:800;color:#68716e;padding:10px 5px;text-decoration:underline;text-underline-offset:3px}.notification-link{grid-template-columns:10px 1fr 22px;color:inherit;text-decoration:none;align-items:start;transition:background .15s ease,transform .15s ease}.notification-link:hover{background:#f7f9f6;margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px;border-radius:8px}.notification-link:focus-visible{outline:2px solid #74817d;outline-offset:3px}.notification-arrow{align-self:center;color:#8b9490;font-size:17px;font-weight:700}.notification-link.unread:hover{background:linear-gradient(90deg,#fff6db 0,#f8faf7 30%)}
@media(max-width:760px){.filter-form{width:100%;display:grid;grid-template-columns:1fr}.filter-search,.filter-control,.filter-control select{min-width:0;max-width:none;width:100%}.filter-form .btn{width:100%}.filter-clear{text-align:center;padding:4px}.compact-filter{width:100%}.notification-link{grid-template-columns:10px 1fr 20px}}

/* v1.8 mobile-first companion UI + searchable product picker */
.mobile-dashboard-hero,.mobile-dashboard-kpis,.mobile-low-stock-alert,.mobile-dashboard-shortcuts,.mobile-status-tabs,.mobile-back-link{display:none}
.product-picker-field>span{font-size:11px;font-weight:750;color:#59625f}.product-search-wrap{position:relative}.product-search-wrap input[type=search]{padding-left:34px;background:#fff}.product-search-wrap:before{content:"⌕";position:absolute;left:11px;top:50%;transform:translateY(-50%);z-index:1;color:#7c8581;font-size:15px;pointer-events:none}.product-search-results{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:45;background:#fff;border:1px solid #dce1dc;border-radius:12px;box-shadow:0 16px 46px rgba(17,28,24,.16);padding:5px;max-height:260px;overflow:auto}.product-search-results[hidden]{display:none}.product-result{width:100%;border:0;background:#fff;text-align:left;padding:9px 10px;border-radius:8px;display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center;color:#18211e}.product-result:hover,.product-result:focus{background:#f2f7f4;outline:none}.product-result strong{font-size:11px}.product-result small{font-size:9px;color:#7c8581;grid-column:1}.product-result b{font-size:10px;color:#31664f;grid-column:2;grid-row:1/3;white-space:nowrap}.product-no-results{padding:12px;font-size:10px;color:#7c8581;text-align:center}.product-picker-field select{margin-top:7px}

@media(max-width:760px){
  :root{--mobile-green:#11684e;--mobile-green-dark:#123e34;--mobile-green-soft:#e8f4ef;--mobile-pink:#fbeaec;--mobile-blue:#edf0ff;--mobile-orange:#fff1df}
  body{background:#f7f8f7;padding-bottom:86px}
  .main-content{padding:74px 12px 24px;background:#f7f8f7}
  .mobile-topbar{height:58px;padding:8px 12px;border-bottom:0;background:rgba(247,248,247,.94);box-shadow:0 1px 0 rgba(20,29,26,.06)}
  .mobile-brand-logo{width:32px;height:32px;border-radius:10px}.mobile-topbar strong{font-size:12px}.mobile-topbar small{font-size:7.5px}
  .top-notify{width:36px;height:36px;border:0;background:#fff;box-shadow:0 3px 14px rgba(20,29,26,.08);border-radius:50%}
  .page-header{position:relative;min-height:42px;margin:0 0 14px;padding:0 0 0 0;align-items:center;justify-content:flex-start;gap:10px}.page-header>div{min-width:0}.page-header h1{font-size:23px;line-height:1.08;margin:0;letter-spacing:-.035em}.page-header .eyebrow{display:none}.mobile-back-link{display:grid;width:34px;height:34px;place-items:center;border-radius:11px;background:#fff;border:1px solid #edf0ed;font-size:28px;line-height:1;color:#26302c;flex:0 0 auto;box-shadow:0 3px 12px rgba(20,29,26,.05)}
  .page-dashboard .page-header{display:none}
  .alert{font-size:11px;border-radius:12px;padding:11px 12px;margin-bottom:12px}

  /* Mobile dashboard inspired by the supplied app concept. */
  .mobile-dashboard-hero{display:block;position:relative;overflow:hidden;background:linear-gradient(145deg,#163f36 0%,#0e2f29 100%);color:#fff;border-radius:22px;padding:18px 18px 20px;margin:2px 0 12px;min-height:218px;box-shadow:0 14px 32px rgba(16,66,53,.2)}
  .mobile-dashboard-hero:after{content:"";position:absolute;width:170px;height:170px;border:34px solid rgba(44,169,124,.09);border-radius:50%;right:-70px;top:-68px}
  .mobile-hero-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;position:relative;z-index:1}.mobile-hero-top>div span,.mobile-hero-top>div strong,.mobile-hero-top>div small{display:block}.mobile-hero-top>div span{font-size:11px;color:#c8d9d4}.mobile-hero-top>div strong{font-size:18px;margin-top:1px;letter-spacing:-.02em}.mobile-hero-top>div small{font-size:9px;color:#a9c2bb;margin-top:2px}.mobile-hero-period{font-size:9px!important;color:#e5f0ed!important;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.1);padding:7px 9px;border-radius:9px;white-space:nowrap}
  .mobile-hero-revenue{position:relative;z-index:1;margin-top:24px}.mobile-hero-revenue span,.mobile-hero-revenue strong,.mobile-hero-revenue small{display:block}.mobile-hero-revenue span{font-size:10px;color:#d9e6e2}.mobile-hero-revenue strong{font-size:31px;line-height:1.05;letter-spacing:-.045em;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-hero-revenue small{font-size:9px;color:#8fd2b8;margin-top:6px}
  .mobile-hero-bars{position:absolute;z-index:1;right:17px;bottom:20px;width:42%;height:65px;display:flex;gap:4px;align-items:flex-end}.mobile-hero-bars i{display:block;flex:1;min-height:8px;border-radius:4px 4px 2px 2px;background:linear-gradient(#61d0a2,#24a878);opacity:.95}
  .mobile-dashboard-kpis{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:0 0 10px}.mobile-dashboard-kpis>a{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;background:#fff;border:1px solid #edf0ed;border-radius:15px;padding:13px 12px;box-shadow:0 6px 18px rgba(20,29,26,.045);min-width:0}.mobile-kpi-icon{grid-row:1/3;width:30px;height:30px;border-radius:9px;background:var(--mobile-green-soft);color:var(--mobile-green);display:grid;place-items:center;font-weight:900;font-size:13px;align-self:center}.mobile-dashboard-kpis>a:nth-child(2) .mobile-kpi-icon{background:var(--mobile-pink);color:#c85162}.mobile-dashboard-kpis>a:nth-child(3) .mobile-kpi-icon{background:var(--mobile-blue);color:#5965c9}.mobile-dashboard-kpis>a:nth-child(4) .mobile-kpi-icon{background:var(--mobile-orange);color:#d57c1e}.mobile-dashboard-kpis small{font-size:9px;color:#747e79;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-dashboard-kpis strong{font-size:15px;line-height:1.15;letter-spacing:-.025em;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-low-stock-alert{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff7e7;border:1px solid #f2dfb6;padding:11px 13px;border-radius:13px;margin:0 0 11px}.mobile-low-stock-alert span strong,.mobile-low-stock-alert span small{display:block}.mobile-low-stock-alert strong{font-size:10px;color:#79580b}.mobile-low-stock-alert small{font-size:8.5px;color:#987c3e;margin-top:2px}.mobile-low-stock-alert b{font-size:20px;color:#9a741f}
  .page-dashboard>.app-shell .dashboard-toolbar{margin:3px 0 11px}.page-dashboard .dashboard-toolbar>div:first-child{display:none}.page-dashboard .period-controls{width:100%}.page-dashboard .period-pills{gap:6px}.page-dashboard .pill{background:#fff;border-color:#e5e9e5;padding:7px 10px}.page-dashboard .pill.active{background:var(--mobile-green);border-color:var(--mobile-green);color:#fff}.page-dashboard .kpi-grid{display:none}
  .page-dashboard .dashboard-grid{display:block;margin-bottom:11px}.page-dashboard .dashboard-grid>.panel{margin-bottom:10px}.page-dashboard .chart-panel{padding:15px;background:#fff}.page-dashboard .chart-panel .panel-head h2{font-size:16px}.page-dashboard .bar-chart{height:175px;gap:6px;padding-top:12px}.page-dashboard .bar{width:min(15px,42%);border-radius:5px 5px 2px 2px}.page-dashboard .revenue-bar{background:#1c795a}.page-dashboard .profit-bar{background:#6986d6}.page-dashboard .chart-legend{margin-top:9px}.page-dashboard .team-panel,.page-dashboard .collection-panel{border-radius:16px}
  .mobile-dashboard-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.mobile-dashboard-shortcuts a{position:relative;background:#fff;border:1px solid #edf0ed;border-radius:14px;padding:13px 28px 13px 13px;min-height:68px;box-shadow:0 4px 15px rgba(20,29,26,.035)}.mobile-dashboard-shortcuts strong,.mobile-dashboard-shortcuts small{display:block}.mobile-dashboard-shortcuts strong{font-size:12px}.mobile-dashboard-shortcuts small{font-size:9px;color:#828a87;margin-top:4px}.mobile-dashboard-shortcuts b{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:20px;color:#a0a7a4}

  /* Mobile bottom navigation matches the supplied concept: Dashboard, Sales, +, Expenses, More. */
  .mobile-bottom-nav{height:76px;background:rgba(255,255,255,.98);box-shadow:0 -4px 24px rgba(20,29,26,.07);border-top:1px solid #edf0ed;grid-template-columns:1fr 1fr 72px 1fr 1fr;padding-top:5px}.mobile-nav-item{color:#858e8a}.mobile-nav-item.active{color:var(--mobile-green)}.mobile-nav-item small{font-size:8px}.mobile-icon{font-size:20px}.mobile-plus{background:var(--mobile-green);border-color:#f7f8f7;width:56px;height:56px;margin-bottom:22px}.mobile-plus.active{box-shadow:0 0 0 4px rgba(17,104,78,.12),0 8px 22px rgba(16,70,53,.25)}

  /* Sales list becomes touch-friendly cards instead of a squeezed desktop table. */
  .mobile-status-tabs{display:flex;gap:6px;overflow-x:auto;margin:0 0 10px;padding:1px 0 2px;scrollbar-width:none}.mobile-status-tabs::-webkit-scrollbar{display:none}.mobile-status-tabs a{white-space:nowrap;padding:8px 12px;border-radius:10px;background:#eef1ef;color:#6e7773;font-size:9px;font-weight:800}.mobile-status-tabs a.active{background:var(--mobile-green);color:#fff}
  .page-sales .sales-filter-toolbar{gap:8px}.page-sales .sales-filter-toolbar>.btn{display:none}.page-sales .filter-form{display:grid;grid-template-columns:1fr auto;gap:7px;width:100%}.page-sales .filter-search{grid-column:1}.page-sales .filter-search input{height:42px;border-radius:12px;background:#fff;padding-left:13px}.page-sales .filter-control{display:none}.page-sales .filter-form>.btn{grid-column:2;grid-row:1;width:auto!important;min-width:64px;height:42px;background:#fff}.page-sales .filter-clear{grid-column:1/-1;text-align:left;padding:0 3px}.page-sales .table-panel{background:transparent;border:0;box-shadow:none}.page-sales .table-panel>.panel-head{padding:3px 2px 8px}.page-sales .table-panel>.panel-head .eyebrow{display:none}.page-sales .table-panel>.panel-head h2{font-size:16px}.page-sales .table-panel>.panel-head .muted{font-size:8px}
  .mobile-card-table{display:block;min-width:0;width:100%}.mobile-card-table thead{display:none}.mobile-card-table tbody{display:grid;gap:9px;padding:0}.mobile-card-table tbody tr{background:#fff;border:1px solid #edf0ed;border-radius:14px;padding:12px;box-shadow:0 4px 14px rgba(20,29,26,.035);min-width:0}.mobile-card-table td{border:0;padding:0;font-size:10px;min-width:0}.mobile-card-table td small{font-size:8.5px;margin-top:3px}.mobile-card-table .row-arrow{width:27px;height:27px;border-radius:8px}.mobile-card-table .empty-state{display:block!important;padding:20px!important;background:#fff;border-radius:13px}
  .sales-card-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"customer total" "sale status" "balance arrow";gap:7px 12px;align-items:center}.sales-customer-cell{grid-area:customer}.sales-customer-cell strong{font-size:12px;color:#1b2421}.sales-total-cell{grid-area:total;font-size:13px!important;text-align:right}.sales-id-cell{grid-area:sale}.sales-id-cell strong{font-size:9px;color:#6f7874}.sales-id-cell small{display:inline;margin-left:5px}.sales-status-cell{grid-area:status;text-align:right}.sales-balance-cell{grid-area:balance;color:#69736f;font-size:9px!important}.sales-balance-cell:before{content:"Balance ";font-weight:600;color:#9aa19e}.sales-arrow-cell{grid-area:arrow;justify-self:end}.sales-channel-cell,.sales-staff-cell,.sales-profit-cell,.sales-paid-cell{display:none!important}

  /* Customers, inventory and expenses use compact information cards; no product photos. */
  .page-customers .table-panel,.page-inventory .table-panel,.page-expenses .table-panel{background:transparent;border:0;box-shadow:none}.page-customers .table-panel>.panel-head,.page-inventory .table-panel>.panel-head,.page-expenses .table-panel>.panel-head{padding:4px 2px 9px}.page-customers .table-panel>.panel-head .eyebrow,.page-inventory .table-panel>.panel-head .eyebrow,.page-expenses .table-panel>.panel-head .eyebrow{display:none}.page-customers .table-panel>.panel-head h2,.page-inventory .table-panel>.panel-head h2,.page-expenses .table-panel>.panel-head h2{font-size:16px}
  .customers-card-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name balance" "contact arrow" "purchases value";gap:7px 10px;align-items:center}.customer-name-cell{grid-area:name}.customer-name-cell strong{font-size:12px}.customer-balance-cell{grid-area:balance;text-align:right;font-size:12px!important}.customer-balance-cell:before{content:"Outstanding";display:block;font-size:7px;color:#9aa19e;font-weight:600}.customer-contact-cell{grid-area:contact}.customer-purchases-cell{grid-area:purchases}.customer-value-cell{grid-area:value;text-align:right}.customer-value-cell:before{content:"Sales ";font-size:8px;color:#9aa19e}.customer-arrow-cell{grid-area:arrow;justify-self:end}
  .inventory-card-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"product price" "category stock" "cost profit" "action action";gap:8px 10px;align-items:center}.inventory-product-cell{grid-area:product}.inventory-product-cell strong{font-size:12px}.inventory-price-cell{grid-area:price;text-align:right;font-size:12px!important}.inventory-category-cell{grid-area:category;color:#737d78}.inventory-stock-cell{grid-area:stock;text-align:right}.inventory-cost-cell{grid-area:cost;color:#737d78}.inventory-cost-cell:before{content:"Cost ";font-size:8px;color:#9aa19e}.inventory-profit-cell{grid-area:profit;text-align:right}.inventory-profit-cell:before{content:"Profit ";font-size:8px;color:#9aa19e}.inventory-action-cell{grid-area:action;text-align:right;border-top:1px solid #f0f2f0!important;padding-top:8px!important}.inventory-action-cell .text-link{font-size:9px}.role-staff .inventory-card-table tbody tr{grid-template-areas:"product price" "category stock"}
  .expenses-card-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"category amount" "desc amount" "date method" "staff staff";gap:6px 10px;align-items:center}.expense-category-cell{grid-area:category;font-weight:800;color:#2c3632}.expense-amount-cell{grid-area:amount;text-align:right;font-size:13px!important}.expense-description-cell{grid-area:desc;color:#5f6964}.expense-date-cell{grid-area:date;color:#89918e}.expense-method-cell{grid-area:method;text-align:right;color:#89918e}.expense-staff-cell{grid-area:staff;border-top:1px solid #f0f2f0!important;padding-top:7px!important;color:#89918e}

  /* Filters collapse cleanly on a phone. */
  .filter-toolbar{margin-bottom:10px}.filter-form{gap:7px}.filter-control>span{font-size:8px}.filter-control input,.filter-control select{height:42px;border-radius:11px}.filter-form .btn{height:42px;border-radius:11px}.filter-clear{font-size:9px}.compact-filter{display:grid!important;grid-template-columns:1fr auto!important;align-items:end}.compact-filter .filter-control{grid-column:1}.compact-filter .btn{grid-column:2;width:auto!important;min-width:68px}.compact-filter .filter-clear{grid-column:1/-1;text-align:left}

  /* Record sale behaves like a native mobile workflow while preserving the desktop form. */
  .page-record-sale .main-content{padding-left:10px;padding-right:10px}.page-record-sale .form-panel{padding:0;background:transparent;border:0;box-shadow:none}.page-record-sale .form-panel>.panel-head{display:none}.page-record-sale #saleForm{display:grid;gap:10px}.page-record-sale .form-section{background:#fff;border:1px solid #edf0ed;border-radius:15px;padding:14px;margin:0;box-shadow:0 4px 14px rgba(20,29,26,.035)}.page-record-sale .form-section h3{font-size:14px;margin-bottom:10px;color:#141b19}.page-record-sale .section-title-row{margin-bottom:10px}.page-record-sale .customer-key-note{font-size:7.5px}.page-record-sale .known-customer-card{border-radius:11px;padding:10px}.page-record-sale .form-grid.two,.page-record-sale .form-grid.three{grid-template-columns:1fr;gap:9px}.page-record-sale label{font-size:9px}.page-record-sale input,.page-record-sale select,.page-record-sale textarea{border-radius:10px;padding:10px;background:#fff}.page-record-sale .sale-items{gap:9px}.page-record-sale .sale-item-row{display:grid;grid-template-columns:1fr 72px 28px;gap:8px;background:#fafbfa;border:1px solid #e6eae6;border-radius:12px;padding:10px}.page-record-sale .sale-item-row>.product-picker-field{grid-column:1/-1}.page-record-sale .sale-item-row>label[data-price-label]{grid-column:auto}.page-record-sale .sale-item-row>label:nth-of-type(2){grid-column:2}.page-record-sale .sale-item-row>label:nth-of-type(3){grid-column:1}.page-record-sale .line-total{grid-column:1/3;grid-row:auto;padding:0;display:flex;justify-content:space-between;align-items:center;background:#fff;border-radius:9px;padding:8px 9px;border:1px solid #edf0ed}.page-record-sale .remove-row{grid-column:3;align-self:end;height:37px}.page-record-sale .sale-total-box{justify-content:space-between;border-top:1px solid #edf0ed;padding-top:11px;margin-top:10px}.page-record-sale .sale-total-box strong{font-size:20px}.page-record-sale .form-actions{position:sticky;bottom:77px;display:grid;grid-template-columns:84px 1fr;gap:8px;background:rgba(247,248,247,.96);backdrop-filter:blur(12px);padding:8px 0 4px;z-index:12}.page-record-sale .form-actions .btn{height:44px}.page-record-sale .form-actions .primary{background:var(--mobile-green)}.product-search-wrap input[type=search]{height:40px}.product-search-results{position:fixed;left:12px;right:12px;top:50%;transform:translateY(-50%);max-height:min(420px,65vh);border-radius:15px;padding:7px;box-shadow:0 30px 100px rgba(0,0,0,.24)}.product-result{padding:11px}.product-result strong{font-size:11px}.product-result b{font-size:10px}

  /* Existing split screens stay functional without a desktop sidebar. */
  .page-inventory .split-layout,.page-expenses .split-layout{display:block}.page-inventory .compact-form-panel,.page-expenses .compact-form-panel{margin-bottom:10px}.page-inventory .compact-form-panel .panel-head,.page-expenses .compact-form-panel .panel-head{margin-bottom:10px}.page-inventory .compact-form-panel,.page-expenses .compact-form-panel{border-radius:15px}
  .system-footer{font-size:8.5px;margin-top:26px;padding-bottom:4px}
}

@media(max-width:390px){
  .mobile-dashboard-hero{min-height:210px;padding:16px}.mobile-hero-revenue strong{font-size:28px}.mobile-hero-bars{width:39%}.mobile-dashboard-kpis>a{padding:11px 10px}.mobile-dashboard-kpis strong{font-size:13px}.mobile-dashboard-shortcuts{grid-template-columns:1fr}.sales-card-table tbody tr,.customers-card-table tbody tr,.inventory-card-table tbody tr,.expenses-card-table tbody tr{padding:11px}
}

/* v1.8.1 mobile navigation clearance + dashboard period dropdown */
@media(max-width:760px){
  /* Keep page content comfortably above the fixed mobile navigation. */
  body{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
  .main-content{padding-bottom:calc(118px + env(safe-area-inset-bottom))}
  .mobile-bottom-nav{
    min-height:84px;
    height:auto;
    box-sizing:border-box;
    align-items:center;
    padding:8px max(10px,env(safe-area-inset-right)) max(13px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
  }
  .mobile-nav-item{min-height:58px;padding:3px 0 1px;align-content:center}
  .mobile-nav-item small{font-size:9px;line-height:1.15;margin-top:3px}
  .mobile-icon{line-height:22px}
  .mobile-plus{margin-bottom:16px}
  .mobile-more-sheet{bottom:calc(92px + env(safe-area-inset-bottom))}
  .page-record-sale .form-actions{bottom:calc(91px + env(safe-area-inset-bottom))}

  /* On mobile the selected dashboard period lives inside the hero card. */
  .page-dashboard .period-toolbar{display:none}
  .mobile-hero-filter{position:relative;z-index:6;flex:0 0 auto}
  .mobile-hero-filter>summary{list-style:none;cursor:pointer;user-select:none;display:flex;align-items:center;gap:7px}
  .mobile-hero-filter>summary::-webkit-details-marker{display:none}
  .mobile-hero-filter>summary:after{content:"⌄";font-size:11px;line-height:1;transition:transform .16s ease}
  .mobile-hero-filter[open]>summary:after{transform:rotate(180deg)}
  .mobile-period-menu{
    position:absolute;
    right:0;
    top:calc(100% + 7px);
    width:210px;
    padding:8px;
    border-radius:14px;
    background:#fff;
    color:#1d2925;
    border:1px solid #e5eae6;
    box-shadow:0 18px 44px rgba(4,24,18,.24);
  }
  .mobile-period-menu>a{display:flex;align-items:center;justify-content:space-between;padding:10px 11px;border-radius:9px;font-size:10px;font-weight:800;color:#59645f}
  .mobile-period-menu>a.active{background:#e8f4ef;color:var(--mobile-green)}
  .mobile-period-menu>a.active:after{content:"✓";font-size:11px}
  .mobile-period-divider{height:1px;background:#edf0ee;margin:5px 2px 8px}
  .mobile-period-menu>strong{display:block;padding:0 4px 6px;font-size:9px;color:#79827e}
  .mobile-period-custom-form{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .mobile-period-custom-form label{font-size:8px;font-weight:750;color:#68726d}
  .mobile-period-custom-form input{width:100%;margin-top:4px;border:1px solid #dfe5e1;border-radius:8px;padding:7px 6px;font:inherit;background:#fff;color:#1d2925}
  .mobile-period-custom-form button{grid-column:1/-1;border:0;border-radius:9px;background:var(--mobile-green);color:#fff;padding:9px;font-size:9px;font-weight:800;cursor:pointer}
}
@media(max-width:760px){
  .mobile-dashboard-hero:has(.mobile-hero-filter[open]){overflow:visible;z-index:20}
  .mobile-dashboard-hero:has(.mobile-hero-filter[open]):after{display:none}
}


/* v1.8.2 mobile viewport stability
   Prevent iOS/Android form-focus zoom, sideways reflow and login recentering
   when the on-screen keyboard opens. Desktop layout is intentionally untouched. */
html{
  max-width:100%;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  max-width:100%;
  overflow-x:hidden;
}

@media(max-width:760px){
  html,body{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:clip;
  }

  /* iOS Safari zooms focused controls whose text is smaller than 16px. */
  input,
  select,
  textarea{
    font-size:16px!important;
    max-width:100%;
  }
  input[type="checkbox"],
  input[type="radio"]{
    font-size:initial!important;
  }
  button,
  input,
  select,
  textarea,
  a{
    touch-action:manipulation;
  }

  .app-shell,
  .main-content,
  .page-header,
  .panel,
  .form-panel,
  .table-wrap,
  .mobile-topbar,
  .mobile-bottom-nav{
    min-width:0;
    max-width:100%;
  }
  .main-content{
    overflow-x:hidden;
  }
  img,svg,canvas{
    max-width:100%;
  }

  /* Login must not vertically re-centre itself when the keyboard reduces
     the visual viewport. It stays anchored to the top of the phone. */
  .login-body{
    display:block!important;
    width:100%;
    min-height:100vh;
    min-height:100svh;
    padding:max(18px,env(safe-area-inset-top)) 14px max(22px,env(safe-area-inset-bottom));
    overflow-x:hidden;
  }
  .login-shell{
    width:100%;
    max-width:560px;
    min-width:0;
    min-height:0;
    margin:0 auto;
    border-radius:20px;
  }
  .login-panel{
    width:100%;
    min-width:0;
    padding:28px 20px 30px;
    justify-content:flex-start;
  }
  .login-panel h1{
    font-size:29px;
    overflow-wrap:anywhere;
  }
  .login-copy{
    max-width:100%;
    line-height:1.5;
  }
  .login-panel .stack-form{
    width:100%;
    min-width:0;
  }
  .login-panel label{
    min-width:0;
  }
  .login-panel input{
    width:100%;
    min-width:0;
    min-height:48px;
  }
  .public-footer{
    width:100%;
    max-width:560px;
    margin-left:auto;
    margin-right:auto;
  }

  /* Prevent fixed mobile chrome from causing horizontal overflow. */
  .mobile-topbar,
  .mobile-bottom-nav{
    width:100%;
    left:0;
    right:0;
  }
}

/* v1.8.3 mobile dashboard filter + live notification bell */
@media(max-width:760px){
  .mobile-hero-filter{position:relative;z-index:30;flex:0 0 auto}
  .mobile-hero-period{
    appearance:none;
    -webkit-appearance:none;
    border:1px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.11);
    color:#e5f0ed;
    min-height:38px;
    padding:8px 11px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    font-size:10px!important;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
    cursor:pointer;
    position:relative;
    z-index:31;
  }
  .mobile-hero-period .period-chevron{font-size:12px;line-height:1;transition:transform .16s ease}
  .mobile-hero-filter.is-open .period-chevron{transform:rotate(180deg)}
  .mobile-period-menu[data-period-filter-menu]{
    position:absolute;
    right:0;
    top:calc(100% + 8px);
    width:min(268px,calc(100vw - 48px));
    max-width:calc(100vw - 48px);
    box-sizing:border-box;
    padding:9px;
    border-radius:16px;
    background:#fff;
    color:#1d2925;
    border:1px solid #e5eae6;
    box-shadow:0 20px 50px rgba(4,24,18,.26);
    z-index:100;
    pointer-events:auto;
    overflow:hidden;
  }
  .mobile-period-menu[data-period-filter-menu][hidden]{display:none!important}
  .mobile-period-menu[data-period-filter-menu]>a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
    min-height:42px;
    padding:10px 12px;
    border-radius:10px;
    box-sizing:border-box;
    font-size:11px;
    font-weight:800;
    color:#59645f;
    text-decoration:none;
    pointer-events:auto;
    position:relative;
    z-index:101;
  }
  .mobile-period-menu[data-period-filter-menu]>a:active{background:#f0f6f3}
  .mobile-period-menu[data-period-filter-menu]>a.active{background:#e8f4ef;color:var(--mobile-green)}
  .mobile-period-menu[data-period-filter-menu]>a.active:after{content:"✓";font-size:12px}
  .mobile-period-custom-form{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:9px;
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .mobile-period-custom-form label{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:5px;
    width:100%;
    min-width:0;
    box-sizing:border-box;
    font-size:9px;
    font-weight:800;
    color:#68726d;
  }
  .mobile-period-custom-form label>span{display:block}
  .mobile-period-custom-form input[type="date"]{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    min-height:44px;
    box-sizing:border-box;
    margin:0;
    padding:8px 10px;
    border:1px solid #dfe5e1;
    border-radius:10px;
    background:#fff;
    color:#1d2925;
    line-height:1.2;
  }
  .mobile-period-custom-form button{
    width:100%;
    min-height:42px;
    grid-column:auto;
    box-sizing:border-box;
    border:0;
    border-radius:10px;
    background:var(--mobile-green);
    color:#fff;
    padding:10px 12px;
    font-size:10px;
    font-weight:850;
    cursor:pointer;
  }
  .mobile-dashboard-hero.filter-open{overflow:visible;z-index:40}
  .mobile-dashboard-hero.filter-open:after{display:none}

  .top-notify{color:#23312c;overflow:visible}
  .top-notify-bell{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .top-notify b[data-notification-badge]{
    right:-3px;
    top:-3px;
    min-width:17px;
    height:17px;
    padding:0 4px;
    box-sizing:border-box;
    font-size:8px;
    font-weight:900;
    line-height:17px;
    border:2px solid #f7f8f7;
    z-index:2;
  }
  .top-notify b[data-notification-badge][hidden]{display:none!important}
}

/* v1.8.5 mobile dashboard period chooser: true foreground overlay + compact custom dates */
@media(max-width:760px){
  /* The menu is moved to <body> while open so it cannot be trapped behind the
     hero card's stacking context. This guarantees an opaque foreground layer. */
  .mobile-period-menu[data-period-filter-menu]{
    position:fixed!important;
    right:auto!important;
    top:auto;
    width:248px!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 116px);
    box-sizing:border-box!important;
    padding:9px!important;
    border:1px solid #dfe5e1!important;
    border-radius:15px!important;
    background:#fff!important;
    color:#1d2925!important;
    box-shadow:0 22px 60px rgba(4,24,18,.30)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    isolation:isolate;
    z-index:10001!important;
    opacity:1!important;
  }
  .mobile-period-menu[data-period-filter-menu][hidden]{display:none!important}
  .mobile-period-backdrop{
    position:fixed;
    inset:0;
    z-index:10000;
    background:rgba(244,247,245,.10);
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  .mobile-period-menu[data-period-filter-menu]>a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:100%;
    min-height:36px;
    box-sizing:border-box;
    padding:8px 10px;
    border-radius:9px;
    color:#5d6763;
    font-size:10px;
    line-height:1.15;
    font-weight:800;
    text-decoration:none;
    background:#fff;
    position:relative;
    z-index:1;
  }
  .mobile-period-menu[data-period-filter-menu]>a.active{background:#e8f4ef;color:var(--mobile-green)}
  .mobile-period-menu[data-period-filter-menu]>a.active:after{content:"✓";font-size:11px}
  .mobile-period-divider{height:1px;background:#edf0ee;margin:5px 2px 6px}
  .mobile-period-menu[data-period-filter-menu]>strong,
  .mobile-hero-top .mobile-period-menu[data-period-filter-menu]>strong{
    display:block!important;
    margin:0!important;
    padding:3px 3px 6px!important;
    font-size:11px!important;
    line-height:1.2!important;
    letter-spacing:0!important;
    color:#737d79!important;
    font-weight:750!important;
  }
  .mobile-period-custom-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .mobile-period-custom-form label{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:3px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    color:#77807c!important;
    font-size:8px!important;
    line-height:1.1!important;
    font-weight:750!important;
  }
  .mobile-period-custom-form label>span{display:block;padding-left:1px}
  .mobile-period-custom-form input[type="date"]{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:5px 8px!important;
    box-sizing:border-box!important;
    border:1px solid #d8dfda!important;
    border-radius:9px!important;
    background:#fff!important;
    background-clip:padding-box!important;
    color:#25312d!important;
    font-size:13px!important;
    line-height:1.1!important;
    font-weight:600!important;
    letter-spacing:-.01em!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  .mobile-period-custom-form input[type="date"]::-webkit-date-and-time-value{
    min-width:0!important;
    width:100%!important;
    text-align:left!important;
    margin:0!important;
  }
  .mobile-period-custom-form input[type="date"]::-webkit-datetime-edit{
    min-width:0!important;
    overflow:hidden!important;
    padding:0!important;
  }
  .mobile-period-custom-form button{
    width:100%!important;
    min-height:36px!important;
    height:36px!important;
    box-sizing:border-box!important;
    border:0!important;
    border-radius:9px!important;
    background:var(--mobile-green)!important;
    color:#fff!important;
    padding:7px 10px!important;
    font-size:9px!important;
    line-height:1!important;
    font-weight:850!important;
    cursor:pointer!important;
  }
  /* The open state no longer needs to lift hero children because the menu is
     rendered at the viewport level. Keep decorative hero content underneath. */
  .mobile-dashboard-hero.filter-open{z-index:1!important;overflow:hidden!important}
  .mobile-dashboard-hero.filter-open .mobile-hero-revenue,
  .mobile-dashboard-hero.filter-open .mobile-hero-bars{z-index:1!important}
}


/* v1.8.6: keep longer-range dashboard chart dates clean on phones. */
.chart-date-label-mobile{display:none}
@media(max-width:760px){
  .page-dashboard .chart-date-label-desktop{display:none}
  .page-dashboard .chart-date-label-mobile{
    display:block;
    width:100%;
    height:25px;
    padding-top:8px;
    white-space:nowrap;
    overflow:visible;
    text-align:center;
    font-size:8px;
    line-height:1;
    letter-spacing:-.01em;
    color:#858d89;
  }
  .page-dashboard .bar-chart{
    gap:4px;
    padding-bottom:0;
    overflow:visible;
  }
  .page-dashboard .bar-day{overflow:visible}
  .page-dashboard .chart-legend{
    clear:both;
    position:relative;
    z-index:2;
    margin-top:10px;
    padding-top:9px;
    border-top:1px solid #e8ebe8;
    background:#fff;
  }
}
@media(max-width:390px){
  .page-dashboard .chart-date-label-mobile{font-size:7.5px}
  .page-dashboard .bar-chart{gap:3px}
}

/* v1.8.7 mobile navigation sheets
   Desktop is unchanged. The mobile center + opens a Quick Add chooser; More
   opens a role-aware profile/navigation sheet. */
.mobile-quick-add-sheet,.mobile-sheet-backdrop{display:none}

@media(max-width:760px){
  body.mobile-sheet-open{overflow:hidden}

  .mobile-sheet-backdrop{
    position:fixed;
    inset:0;
    z-index:11000;
    background:rgba(18,24,22,.38);
    -webkit-backdrop-filter:blur(3px);
    backdrop-filter:blur(3px);
  }
  .mobile-sheet-backdrop.open{display:block}

  .mobile-quick-add-sheet,
  .mobile-more-sheet{
    display:none;
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-height:calc(100dvh - 36px);
    overflow-y:auto;
    box-sizing:border-box;
    background:#fff;
    border:1px solid #e6e9e6;
    border-radius:24px!important;
    z-index:11001!important;
    padding:10px 14px 16px!important;
    box-shadow:0 28px 85px rgba(4,20,15,.28)!important;
  }
  .mobile-quick-add-sheet.open,
  .mobile-more-sheet.open{display:block!important}

  .sheet-handle{
    width:42px;
    height:4px;
    margin:1px auto 14px;
    border-radius:999px;
    background:#d8ddda;
  }
  .sheet-close{
    border:0;
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:#f1f3f1;
    color:#59615e;
    font-size:25px;
    line-height:1;
    font-weight:700;
    cursor:pointer;
  }

  /* Quick Add */
  .quick-add-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
  }
  .quick-add-heading>div{min-width:0}
  .quick-add-heading span{
    display:block;
    margin-bottom:5px;
    font-size:8px;
    letter-spacing:.18em;
    color:#7d8682;
    font-weight:850;
  }
  .quick-add-heading h2{
    margin:0;
    font-size:21px;
    line-height:1.15;
    letter-spacing:-.035em;
    color:#151918;
  }
  .quick-add-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .quick-add-card{
    min-width:0;
    min-height:148px;
    padding:15px 13px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-end;
    border:1px solid #e2e6e2;
    border-radius:18px;
    background:#fbfbfa;
    box-shadow:0 4px 14px rgba(20,29,26,.025);
  }
  .quick-add-card:active{transform:scale(.985);background:#f5f7f5}
  .quick-add-icon{
    width:42px;
    height:42px;
    margin-bottom:18px;
    border-radius:13px;
    display:grid;
    place-items:center;
    font-size:27px;
    line-height:1;
    font-weight:500;
  }
  .quick-add-icon.sale{background:#e8f4ef;color:var(--mobile-green)}
  .quick-add-icon.expense{background:#f6eee4;color:#8c6740}
  .quick-add-card strong{font-size:15px;line-height:1.2;color:#151918}
  .quick-add-card small{margin-top:5px;font-size:9px;line-height:1.35;color:#818986}

  /* More / profile sheet */
  .mobile-profile-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:2px 0 14px;
    border-bottom:1px solid #e8ebe8;
  }
  .mobile-profile-link{
    min-width:0;
    flex:1;
    display:flex;
    align-items:center;
    gap:12px;
  }
  .mobile-profile-avatar{
    width:48px;
    height:48px;
    flex:0 0 48px;
    display:grid;
    place-items:center;
    border-radius:15px;
    background:#efe8dd;
    color:#5f4931;
    font-size:18px;
    font-weight:900;
  }
  .mobile-profile-link>span:last-child{min-width:0}
  .mobile-profile-link strong,
  .mobile-profile-link small{display:block}
  .mobile-profile-link strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:15px;
    line-height:1.15;
  }
  .mobile-profile-link small{margin-top:4px;font-size:9px;color:#858d89}

  .mobile-more-list{display:block;padding-top:3px}
  .mobile-more-list a{
    min-height:50px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-bottom:1px solid #ecefec;
    font-size:13px;
    font-weight:800;
    color:#171d1b;
  }
  .mobile-more-list a b{
    color:#9aa29f;
    font-size:18px;
    font-weight:500;
  }
  .mobile-more-sheet .sheet-signout{margin-top:15px}
  .mobile-more-sheet .sheet-signout button{
    width:100%;
    min-height:48px;
    border:1px solid #efd4d4;
    border-radius:14px;
    background:#fff5f5;
    color:#a33232;
    text-align:center;
    font-size:14px;
    font-weight:850;
    cursor:pointer;
  }

  /* Bottom nav: Dashboard, Sales, Quick Add, Inventory, More */
  .mobile-plus{
    appearance:none;
    -webkit-appearance:none;
    font-family:inherit;
    cursor:pointer;
  }
  .mobile-nav-item.active{color:var(--mobile-green)}

  /* Quick Add > expense should land directly on the form. */
  #record-expense{scroll-margin-top:76px}
}

@media(max-width:390px){
  .mobile-quick-add-sheet,.mobile-more-sheet{left:9px!important;right:9px!important;padding-left:12px!important;padding-right:12px!important}
  .quick-add-heading h2{font-size:19px}
  .quick-add-grid{gap:8px}
  .quick-add-card{min-height:136px;padding:13px 11px}
}
@media(max-width:760px){.mobile-plus{padding:0}}


/* v1.8.8 mobile polish: SolarMarket Hub colour consistency + one-line report periods. */
@media(max-width:760px){
  /* Keep the More sheet within the same green visual language as the app. */
  .mobile-more-sheet .mobile-profile-avatar{
    background:var(--mobile-green-soft);
    color:var(--mobile-green);
    border:1px solid rgba(17,104,78,.08);
  }
  .mobile-more-sheet .sheet-close{
    background:#eef6f2;
    color:var(--mobile-green);
  }
  .mobile-more-sheet .sheet-handle{background:#cddbd5}
  .mobile-more-list a b{color:#6f8f84}
  .mobile-profile-link small{color:#71807a}

  /* Reports: all five period choices stay on one clean row. */
  .page-reports .dashboard-toolbar.period-toolbar{gap:12px}
  .page-reports .period-controls{
    width:100%;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    align-items:stretch;
  }
  .page-reports .period-pills{display:contents}
  .page-reports .period-controls .pill{
    width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:8px 3px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-size:9px;
    line-height:1;
    white-space:nowrap;
  }
  .page-reports .custom-period{
    position:relative;
    min-width:0;
  }
  .page-reports .custom-period>summary{
    height:100%;
  }
  .page-reports .custom-period>summary .desktop-custom-label{display:none}
  .page-reports .custom-period>summary .mobile-custom-label{display:inline}
  .page-reports .custom-period-popover{
    left:auto;
    right:0;
    top:calc(100% + 8px);
    margin-top:0;
    width:min(300px,calc(100vw - 28px));
  }
}
@media(min-width:761px){
  .mobile-custom-label{display:none}
}

/* v1.8.9 period-filter consistency + compact mobile custom-date cards. */
.period-controls[data-current-period="today"] [data-period-key="today"],
.period-controls[data-current-period="7"] [data-period-key="7"],
.period-controls[data-current-period="30"] [data-period-key="30"],
.period-controls[data-current-period="month"] [data-period-key="month"],
.period-controls[data-current-period="custom"] [data-period-key="custom"]{
  background:var(--sidebar);
  color:#fff;
  border-color:var(--sidebar);
}

@media(max-width:760px){
  /* Reports and any other pill-based custom period picker use the same compact
     treatment as the dashboard chooser: one field per row, fully inside the card. */
  .page-reports .custom-period-popover{
    box-sizing:border-box;
    left:auto;
    right:0;
    top:calc(100% + 8px);
    width:min(252px,calc(100vw - 32px));
    max-width:calc(100vw - 32px);
    margin:0;
    padding:11px;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    overflow:hidden;
    border:1px solid #e2e7e4;
    border-radius:16px;
    background:#fff;
    box-shadow:0 18px 48px rgba(20,29,26,.16);
    z-index:90;
  }
  .page-reports .custom-period-popover label{
    min-width:0;
    display:grid;
    gap:4px;
    font-size:8px;
    line-height:1.1;
    letter-spacing:.08em;
    color:#7c8581;
  }
  .page-reports .custom-period-popover input[type="date"]{
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    height:42px;
    box-sizing:border-box;
    margin:0;
    padding:7px 10px;
    border:1px solid #dce3df;
    border-radius:11px;
    background:#fff;
    color:#17201d;
    font-size:13px!important;
    font-weight:650!important;
    line-height:1.1;
    letter-spacing:-.01em;
    overflow:hidden;
  }
  .page-reports .custom-period-popover input[type="date"]::-webkit-date-and-time-value{
    text-align:left;
    font-size:13px;
    font-weight:650;
  }
  .page-reports .custom-period-popover input[type="date"]::-webkit-datetime-edit{
    font-size:13px;
    font-weight:650;
    padding:0;
  }
  .page-reports .custom-period-popover .btn{
    grid-column:1;
    width:100%;
    min-height:40px;
    padding:9px 10px;
    border-radius:11px;
    margin-top:1px;
    font-size:10px;
    background:var(--mobile-green);
    border-color:var(--mobile-green);
    color:#fff;
  }

  /* Make the selected report period deterministic even on mobile browsers that
     briefly preserve the old :active state while navigating. */
  .page-reports .period-controls .pill.active,
  .page-reports .period-controls[data-current-period="today"] [data-period-key="today"],
  .page-reports .period-controls[data-current-period="7"] [data-period-key="7"],
  .page-reports .period-controls[data-current-period="30"] [data-period-key="30"],
  .page-reports .period-controls[data-current-period="month"] [data-period-key="month"],
  .page-reports .period-controls[data-current-period="custom"] [data-period-key="custom"]{
    background:#111716!important;
    border-color:#111716!important;
    color:#fff!important;
  }
  .page-reports .custom-period[open]>summary{
    background:#111716!important;
    border-color:#111716!important;
    color:#fff!important;
  }
}

/* v1.9.0 mobile minor-page polish
   Keep Dashboard and Sales as the visual reference. These rules only tighten
   secondary/admin pages on phones; desktop stays unchanged. */
@media(max-width:760px){
  /* Shared rhythm for secondary pages. */
  body:not(.page-dashboard):not(.page-sales) .page-header{
    margin-bottom:16px;
  }
  body:not(.page-dashboard):not(.page-sales) .page-header h1{
    font-size:22px;
    line-height:1.06;
    letter-spacing:-.04em;
  }
  body:not(.page-dashboard):not(.page-sales) .panel{
    border-radius:15px;
  }
  body:not(.page-dashboard):not(.page-sales) .panel-head{
    gap:9px;
    margin-bottom:11px;
  }
  body:not(.page-dashboard):not(.page-sales) .panel-head h2{
    font-size:15px;
    line-height:1.18;
    letter-spacing:-.025em;
  }
  body:not(.page-dashboard):not(.page-sales) .panel-head .muted{
    font-size:8.5px;
    line-height:1.35;
    color:#7d8783;
  }
  body:not(.page-dashboard):not(.page-sales) .eyebrow{
    font-size:8px;
    letter-spacing:.17em;
  }
  body:not(.page-dashboard):not(.page-sales) .btn{
    border-radius:11px;
    min-height:40px;
    font-size:10px;
    padding:9px 12px;
  }
  body:not(.page-dashboard):not(.page-sales) label{
    font-size:9px;
    gap:5px;
  }

  /* Customer search: same compact hierarchy as Sales. */
  .page-customers .filter-toolbar{margin-bottom:10px}
  .page-customers .filter-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 76px!important;
    gap:7px!important;
    align-items:end;
  }
  .page-customers .filter-search{grid-column:1;grid-row:1;min-width:0}
  .page-customers .filter-search input{height:42px;border-radius:12px;padding:10px 12px}
  .page-customers .filter-form>.btn{grid-column:2;grid-row:1;width:100%!important;height:42px}
  .page-customers .filter-form>.filter-control:not(.filter-search){grid-column:1/-1;grid-row:2}
  .page-customers .filter-form>.filter-control:not(.filter-search) select{height:42px;border-radius:12px}
  .page-customers .filter-clear{grid-column:1/-1;text-align:left;padding:0 2px;font-size:8.5px}
  .page-customers .filter-control>span{font-size:7.5px;letter-spacing:.13em}

  /* Section headers: never let the title and metadata fight for space. */
  .page-customers .table-panel>.panel-head,
  .page-inventory .table-panel>.panel-head,
  .page-expenses .table-panel>.panel-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:8px;
    padding:3px 3px 10px;
    margin:0;
  }
  .page-customers .table-panel>.panel-head h2,
  .page-inventory .table-panel>.panel-head h2,
  .page-expenses .table-panel>.panel-head h2{
    margin:0;
    font-size:16px;
    white-space:nowrap;
  }
  .page-customers .table-panel>.panel-head .muted,
  .page-inventory .table-panel>.panel-head .muted,
  .page-expenses .table-panel>.panel-head .muted{
    max-width:165px;
    text-align:right;
    font-size:8.25px;
  }

  /* Customer cards: cleaner secondary data, stronger first row. */
  .customers-card-table tbody{gap:8px}
  .customers-card-table tbody tr{padding:12px 12px 11px}
  .customer-name-cell strong{font-size:11.5px!important;line-height:1.2}
  .customer-contact-cell{font-size:9.5px!important;color:#27332f}
  .customer-contact-cell small{font-size:8px!important}
  .customer-purchases-cell{font-size:10px!important}
  .customer-purchases-cell small{font-size:8px!important;color:#8c9591}
  .customer-value-cell,.customer-balance-cell{font-size:11.5px!important}
  .customer-value-cell:before,.customer-balance-cell:before{font-size:7px!important;letter-spacing:.04em}
  .customer-arrow-cell .row-arrow{width:29px;height:29px}

  /* Inventory + Expenses: filters and add forms should read like mobile cards. */
  .page-inventory .filter-form.compact-filter,
  .page-expenses .filter-form.compact-filter{
    grid-template-columns:minmax(0,1fr) 72px!important;
    gap:7px!important;
  }
  .page-inventory .filter-control>span,
  .page-expenses .filter-control>span{font-size:7.5px;letter-spacing:.13em}
  .page-inventory .compact-form-panel,
  .page-expenses .compact-form-panel{
    padding:14px;
    margin-bottom:11px;
    box-shadow:0 4px 14px rgba(20,29,26,.035);
  }
  .page-inventory .compact-form-panel .panel-head,
  .page-expenses .compact-form-panel .panel-head{margin-bottom:9px}
  .page-inventory .compact-form-panel .panel-head h2,
  .page-expenses .compact-form-panel .panel-head h2{font-size:15px}
  .page-inventory .stack-form,
  .page-expenses .stack-form{gap:9px}
  .page-inventory .compact-form-panel input,
  .page-inventory .compact-form-panel select,
  .page-expenses .compact-form-panel input,
  .page-expenses .compact-form-panel select,
  .page-expenses .compact-form-panel textarea{border-radius:10px}
  .page-inventory .compact-form-panel .btn.primary,
  .page-expenses .compact-form-panel .btn.primary{background:var(--mobile-green);border-color:var(--mobile-green)}
  .inventory-card-table tbody,.expenses-card-table tbody{gap:8px}
  .inventory-card-table tbody tr,.expenses-card-table tbody tr{padding:12px}
  .inventory-product-cell strong{font-size:11.5px!important}
  .inventory-product-cell small{font-size:8px!important}
  .inventory-category-cell,.inventory-cost-cell,.inventory-profit-cell{font-size:9px!important}
  .inventory-price-cell{font-size:11.5px!important}
  .inventory-stock-cell .stock-pill{font-size:8.5px;padding:4px 7px}
  .expense-category-cell{font-size:11px!important}
  .expense-description-cell,.expense-date-cell,.expense-method-cell,.expense-staff-cell{font-size:8.75px!important}
  .expense-amount-cell{font-size:12px!important}

  /* Reports: retain the dashboard-like KPI clarity but make supporting blocks lighter. */
  .page-reports .dashboard-toolbar.period-toolbar>div:first-child strong{font-size:14px}
  .page-reports .dashboard-toolbar.period-toolbar>div:first-child span{font-size:9px;margin-top:2px}
  .page-reports .report-kpis{gap:8px;margin-bottom:11px}
  .page-reports .report-kpis .kpi-card{padding:13px 12px;min-height:91px}
  .page-reports .report-kpis .kpi-card>span{font-size:9px;margin-bottom:7px}
  .page-reports .report-kpis .money-value{font-size:17px!important;line-height:1.08;overflow-wrap:normal;white-space:nowrap}
  .page-reports .report-kpis .kpi-card small{font-size:8px;line-height:1.3;margin-top:7px}
  .page-reports .report-grid{display:grid;grid-template-columns:1fr;gap:10px}
  .page-reports .report-grid .table-panel{background:#fff;border:1px solid #edf0ed;box-shadow:0 4px 14px rgba(20,29,26,.035);padding:0}
  .page-reports .report-grid .panel-head{padding:14px 14px 7px;margin:0}
  .page-reports .report-grid .panel-head h2{font-size:15px}
  .page-reports .mobile-report-table{display:block;min-width:0;width:100%}
  .page-reports .mobile-report-table thead{display:none}
  .page-reports .mobile-report-table tbody{display:grid;padding:0 14px 12px;gap:0}
  .page-reports .mobile-report-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px 12px;align-items:center;padding:10px 0;border-bottom:1px solid #edf0ed}
  .page-reports .mobile-report-table tbody tr:last-child{border-bottom:0}
  .page-reports .mobile-report-table td{padding:0;border:0;font-size:9px;color:#66706c;text-align:right}
  .page-reports .mobile-report-table td:first-child{text-align:left;color:#202a26}
  .page-reports .mobile-report-table td:first-child strong{font-size:10.5px}
  .page-reports .mobile-report-table td[data-label]:not(:first-child):before{content:attr(data-label);display:block;font-size:6.5px;text-transform:uppercase;letter-spacing:.08em;color:#a0a7a4;margin-bottom:2px}
  .page-reports .report-team-table tbody tr{grid-template-columns:minmax(0,1fr) auto auto auto}
  .page-reports .report-actions{gap:7px;margin-top:11px}
  .page-reports .report-actions .btn{min-height:42px;font-size:9.5px}
  .page-reports .import-center{padding:14px;margin-top:11px}
  .page-reports .import-center .panel-head{margin-bottom:9px}
  .page-reports .import-center .panel-head h2{font-size:14px}
  .page-reports .import-note{font-size:8.5px;line-height:1.5;margin:0 0 10px;padding:9px}
  .page-reports .import-grid{gap:8px}
  .page-reports .import-card{padding:12px;border-radius:12px;gap:8px}
  .page-reports .import-card strong{font-size:11px}
  .page-reports .import-card p{font-size:8.5px}
  .page-reports .import-card input[type=file]{font-size:9px!important}

  /* Team & roles: turn the wide desktop account table into true phone cards. */
  .page-team .team-layout{display:block}
  .page-team .compact-form-panel{position:static;padding:14px;margin-bottom:11px}
  .page-team .compact-form-panel .panel-head h2{font-size:15px}
  .page-team .compact-form-panel .stack-form{gap:9px}
  .page-team .compact-form-panel .btn.primary{background:var(--mobile-green);border-color:var(--mobile-green)}
  .page-team .table-panel{background:transparent;border:0;box-shadow:none}
  .page-team .table-panel>.privacy-note{margin:0 0 9px!important;font-size:8.5px;line-height:1.45;padding:10px}
  .page-team .table-panel>.panel-head{padding:3px 2px 9px;margin:0;align-items:end}
  .page-team .table-panel>.panel-head h2{font-size:16px}
  .page-team .table-panel>.panel-head .muted{font-size:8px}
  .page-team .mobile-admin-table{display:block;min-width:0;width:100%}
  .page-team .mobile-admin-table thead{display:none}
  .page-team .mobile-admin-table tbody{display:grid;gap:8px}
  .page-team .mobile-admin-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;background:#fff;border:1px solid #edf0ed;border-radius:14px;padding:12px;box-shadow:0 4px 14px rgba(20,29,26,.035)}
  .page-team .mobile-admin-table td{border:0;padding:0;font-size:9.5px}
  .page-team .mobile-admin-table td:before{content:attr(data-label);display:block;font-size:6.5px;text-transform:uppercase;letter-spacing:.09em;color:#9aa29f;margin-bottom:2px}
  .page-team .team-user-cell{grid-column:1/-1}
  .page-team .team-user-cell:before{display:none}
  .page-team .team-user-cell strong{font-size:11.5px}
  .page-team .team-user-cell small{font-size:8px;white-space:normal;overflow-wrap:anywhere}
  .page-team .team-account-actions{grid-column:1/-1;border-top:1px solid #eef1ef!important;padding-top:8px!important}
  .page-team .team-account-actions:before{display:none}
  .page-team .account-settings-btn{width:100%;height:38px;font-size:9.5px}

  /* Audit log: readable activity cards instead of a horizontal desktop table. */
  .page-audit .audit-explainer{padding:14px;margin-bottom:10px}
  .page-audit .audit-explainer h2{font-size:15px;line-height:1.25;margin:3px 0 6px}
  .page-audit .audit-explainer>p{font-size:9px;line-height:1.5;margin:0 0 9px}
  .page-audit .audit-explainer .privacy-note{font-size:8px;line-height:1.45;padding:9px;margin-top:0}
  .page-audit .table-panel{background:transparent;border:0;box-shadow:none}
  .page-audit .table-panel>.panel-head{padding:3px 2px 9px;margin:0;align-items:end}
  .page-audit .table-panel>.panel-head h2{font-size:16px}
  .page-audit .table-panel>.panel-head .muted{font-size:8px}
  .page-audit .mobile-admin-table{display:block;min-width:0;width:100%}
  .page-audit .mobile-admin-table thead{display:none}
  .page-audit .mobile-admin-table tbody{display:grid;gap:8px}
  .page-audit .mobile-admin-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;background:#fff;border:1px solid #edf0ed;border-radius:14px;padding:12px;box-shadow:0 4px 14px rgba(20,29,26,.035)}
  .page-audit .mobile-admin-table td{display:block;border:0;padding:0;font-size:8.75px;color:#4f5a55;min-width:0;overflow-wrap:anywhere}
  .page-audit .mobile-admin-table td:before{content:attr(data-label);display:block;font-size:6.5px;text-transform:uppercase;letter-spacing:.09em;color:#9ca4a1;margin-bottom:2px}
  .page-audit .audit-action-cell{grid-column:1/-1;grid-row:1}
  .page-audit .audit-action-cell:before{display:none}
  .page-audit .audit-action-cell strong{font-size:11.5px;color:#18211e}
  .page-audit .details-cell{grid-column:1/-1;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7a8380}

  /* Settings and Profile: simple native-feeling cards. */
  .page-settings .settings-grid{gap:10px}
  .page-settings .settings-panel,.page-settings .settings-info-panel{padding:14px}
  .page-settings .settings-intro{font-size:9px;line-height:1.45;margin:-2px 0 11px}
  .page-settings .stack-form{gap:8px}
  .page-settings .setting-toggle{padding:10px;border-radius:11px;gap:10px}
  .page-settings .setting-toggle strong{font-size:10px}
  .page-settings .setting-toggle small{font-size:7.75px;line-height:1.35}
  .page-settings .settings-subgroup{gap:7px}
  .page-settings .privacy-note{font-size:8px;line-height:1.45}
  .page-settings .detail-list>div{grid-template-columns:88px 1fr;padding:9px 0;gap:10px}
  .page-settings .detail-list dt{font-size:8px}
  .page-settings .detail-list dd{font-size:9.5px}
  .page-settings .danger-zone{font-size:9px;line-height:1.45}
  .page-settings .danger-zone h3{font-size:11px}

  .page-profile .profile-grid{gap:10px}
  .page-profile .profile-card,.page-profile .form-panel{padding:14px}
  .page-profile .profile-avatar{width:58px;height:58px;font-size:21px;margin:2px auto 9px;background:var(--mobile-green)}
  .page-profile .profile-card h2{font-size:16px}
  .page-profile .profile-card>p{font-size:9px;margin:5px 0 8px;overflow-wrap:anywhere}
  .page-profile .role-badge{font-size:7px;padding:4px 7px}
  .page-profile .profile-detail{padding:10px 0;margin-top:12px}
  .page-profile .profile-detail+.profile-detail{margin-top:0}
  .page-profile .profile-detail span,.page-profile .profile-detail strong{font-size:9px}
  .page-profile .privacy-note{font-size:8px;line-height:1.45}
  .page-profile .form-panel .stack-form{gap:9px}
  .page-profile .form-panel .btn.primary{background:var(--mobile-green);border-color:var(--mobile-green)}

  /* Notifications: each message reads as a compact tappable mobile card. */
  .page-notifications>.app-shell .main-content>.panel,
  .page-notifications .main-content>.panel{background:transparent;border:0;box-shadow:none;padding:0}
  .page-notifications .panel-head{align-items:center;margin-bottom:9px;padding:0 2px}
  .page-notifications .panel-head h2{font-size:16px}
  .page-notifications .panel-head .btn{min-height:36px;font-size:8.5px;padding:7px 9px}
  .page-notifications .notification-list{gap:8px}
  .page-notifications .notification-row{grid-template-columns:9px minmax(0,1fr) 20px;background:#fff;border:1px solid #edf0ed;border-radius:14px;padding:12px;box-shadow:0 4px 14px rgba(20,29,26,.035);margin:0!important}
  .page-notifications .notification-row.unread{background:#fffdf6}
  .page-notifications .notification-row strong{font-size:10.5px}
  .page-notifications .notification-row p{font-size:9px;line-height:1.4;margin:3px 0}
  .page-notifications .notification-row small{font-size:7.5px}

  /* Customer detail: clearer hierarchy and purchase cards. */
  .page-customer-detail .detail-topbar{margin-bottom:9px}
  .page-customer-detail .customer-identity-badge{font-size:7px;padding:5px 7px}
  .page-customer-detail .customer-detail-hero{padding:16px;border-radius:16px;margin-bottom:10px;gap:12px}
  .page-customer-detail .customer-detail-hero h2{font-size:20px;margin:3px 0}
  .page-customer-detail .customer-detail-hero p,.page-customer-detail .customer-detail-hero small{font-size:9px;line-height:1.4}
  .page-customer-detail .customer-history-count{padding-top:10px}
  .page-customer-detail .customer-history-count strong{font-size:22px}
  .page-customer-detail .customer-history-count span{font-size:7px}
  .page-customer-detail .detail-kpis{gap:8px;margin-bottom:10px}
  .page-customer-detail .detail-kpis .kpi-card{padding:12px;min-height:84px}
  .page-customer-detail .detail-kpis .kpi-card>span{font-size:8px;margin-bottom:6px}
  .page-customer-detail .detail-kpis .money-value,.page-customer-detail .detail-kpis .detail-pattern-title{font-size:15px!important}
  .page-customer-detail .detail-kpis .kpi-card small{font-size:7.5px;line-height:1.3;margin-top:6px}
  .page-customer-detail .table-panel{background:transparent;border:0;box-shadow:none}
  .page-customer-detail .table-panel>.panel-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;padding:3px 2px 9px;margin:0;gap:8px}
  .page-customer-detail .table-panel>.panel-head h2{font-size:15px;line-height:1.25}
  .page-customer-detail .table-panel>.panel-head .muted{font-size:8px}
  .customer-history-table tbody{gap:8px}
  .customer-history-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"sale total" "channel status" "balance actions";gap:7px 10px;padding:12px}
  .customer-history-table td{border:0;padding:0;font-size:9px}
  .history-sale-cell{grid-area:sale}.history-sale-cell strong{font-size:10.5px}.history-sale-cell small{font-size:7.5px}
  .history-date-cell{display:none!important}
  .history-channel-cell{grid-area:channel;color:#7a8480}
  .history-total-cell{grid-area:total;text-align:right;font-size:12px!important}
  .history-paid-cell{display:none!important}
  .history-balance-cell{grid-area:balance;color:#77817c}.history-balance-cell:before{content:"Balance ";font-size:7.5px;color:#9aa29f}
  .history-status-cell{grid-area:status;text-align:right}
  .history-actions-cell{grid-area:actions;justify-self:end;justify-content:flex-end!important}
  .history-actions-cell .receipt-mini-link{font-size:8px;padding:5px 7px}

  /* Sale detail: preserve all information, but present it like the Sales cards. */
  .page-sale-detail .detail-topbar{align-items:center;margin-bottom:9px}
  .page-sale-detail .detail-topbar>.text-link{font-size:9px}
  .page-sale-detail .detail-top-actions{gap:5px}
  .page-sale-detail .receipt-button{font-size:8px;min-height:34px;padding:6px 8px}
  .page-sale-detail .sale-detail-hero{padding:16px;border-radius:16px;margin-bottom:10px;gap:9px}
  .page-sale-detail .sale-detail-hero h2{font-size:20px;margin:3px 0}
  .page-sale-detail .sale-detail-hero p{font-size:9px;line-height:1.4}
  .page-sale-detail .detail-total span{font-size:8px}
  .page-sale-detail .detail-total strong{font-size:20px}
  .page-sale-detail .detail-kpis{gap:8px;margin-bottom:10px}
  .page-sale-detail .detail-kpis .kpi-card{padding:12px;min-height:84px}
  .page-sale-detail .detail-kpis .kpi-card>span{font-size:8px;margin-bottom:6px}
  .page-sale-detail .detail-kpis .money-value,.page-sale-detail .detail-kpis .detail-pattern-title{font-size:15px!important}
  .page-sale-detail .detail-kpis .kpi-card small{font-size:7.5px;line-height:1.3;margin-top:6px}
  .page-sale-detail .detail-grid{gap:9px}
  .page-sale-detail .detail-grid .panel{padding:14px}
  .page-sale-detail .detail-grid .panel-head h2{font-size:14px}
  .page-sale-detail .detail-explainer{font-size:8.5px;line-height:1.45}
  .page-sale-detail .payment-step{gap:9px}
  .page-sale-detail .payment-step-number{width:25px;height:25px;font-size:9px}
  .page-sale-detail .payment-step-head strong{font-size:11px}
  .page-sale-detail .payment-step-head span,.page-sale-detail .payment-step-copy p,.page-sale-detail .payment-step-copy small{font-size:8px}
  .page-sale-detail .detail-list>div{grid-template-columns:86px 1fr;gap:9px;padding:9px 0}
  .page-sale-detail .detail-list dt{font-size:8px}
  .page-sale-detail .detail-list dd{font-size:9.5px}
  .page-sale-detail>.app-shell .table-panel,.page-sale-detail .main-content>.table-panel{background:transparent;border:0;box-shadow:none}
  .page-sale-detail .table-panel>.panel-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;padding:3px 2px 9px;margin:0;gap:8px}
  .page-sale-detail .table-panel>.panel-head h2{font-size:15px}
  .page-sale-detail .sale-items-table tbody{gap:8px}
  .page-sale-detail .sale-items-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"product total" "qty price" "cost profit";gap:7px 10px;padding:12px}
  .page-sale-detail .sale-items-table td{border:0;padding:0;font-size:9px}
  .sale-item-product{grid-area:product}.sale-item-product strong{font-size:10.5px}
  .sale-item-total{grid-area:total;text-align:right;font-size:11.5px!important}
  .sale-item-qty{grid-area:qty;color:#7c8581}.sale-item-qty:before{content:"Qty ";font-size:7.5px;color:#9ca4a1}
  .sale-item-price{grid-area:price;text-align:right;color:#7c8581}.sale-item-price:before{content:"Unit ";font-size:7.5px;color:#9ca4a1}
  .sale-item-cost{grid-area:cost;color:#7c8581}.sale-item-cost:before{content:"Cost ";font-size:7.5px;color:#9ca4a1}
  .sale-item-profit{grid-area:profit;text-align:right}.sale-item-profit:before{content:"Profit ";font-size:7.5px;color:#9ca4a1}

  /* Keep footer understated on every secondary screen. */
  body:not(.page-dashboard):not(.page-sales) .system-footer{margin-top:20px;font-size:7.5px;color:#9aa29f}
}

@media(max-width:390px){
  .page-customers .table-panel>.panel-head .muted{max-width:145px}
  .page-reports .report-kpis .money-value{font-size:15.5px!important}
  .page-reports .mobile-report-table tbody tr{gap:7px 8px}
  .page-team .mobile-admin-table tbody tr,.page-audit .mobile-admin-table tbody tr{padding:11px}
}

/* v1.9.1 mobile alignment/readability polish.
   Desktop remains unchanged. */
@media(max-width:760px){
  /* Login: balanced, centred presentation, positioned a little lower. */
  .login-body{
    padding-top:max(48px,calc(env(safe-area-inset-top) + 34px))!important;
    padding-left:16px!important;
    padding-right:16px!important;
  }
  .login-shell{
    max-width:520px;
    margin:18px auto 0!important;
    border-radius:22px;
  }
  .login-panel{
    padding:34px 24px 32px!important;
    text-align:center;
    align-items:stretch;
  }
  .login-logo{
    width:170px!important;
    max-height:100px!important;
    object-position:center center!important;
    margin:0 auto 24px!important;
  }
  .login-panel>.eyebrow,
  .login-panel>h1,
  .login-copy,
  .login-panel>.muted{text-align:center}
  .login-panel h1{font-size:31px!important;margin-top:6px}
  .login-copy{font-size:14px!important;line-height:1.5;margin-left:auto;margin-right:auto;max-width:390px}
  .login-panel .stack-form{max-width:100%;margin-left:auto;margin-right:auto;text-align:left}
  .login-panel label{font-size:13px!important;line-height:1.25}
  .login-panel input{min-height:50px;border-radius:12px}
  .login-panel .btn.wide{min-height:48px;font-size:14px}
  .login-panel>.muted{font-size:11px!important;line-height:1.4}
  .public-footer{margin-top:20px!important;font-size:11px}

  /* Bottom navigation: clearer icons/text and less empty space below. */
  .mobile-bottom-nav{
    min-height:76px!important;
    height:76px!important;
    align-items:end!important;
    padding:8px max(10px,env(safe-area-inset-right)) max(4px,calc(env(safe-area-inset-bottom) - 10px)) max(10px,env(safe-area-inset-left))!important;
  }
  .mobile-nav-item{
    min-height:54px!important;
    padding:6px 0 0!important;
    gap:3px!important;
    align-content:end!important;
  }
  .mobile-nav-item small{
    font-size:10.5px!important;
    line-height:1.1!important;
    margin-top:3px!important;
    font-weight:800!important;
  }
  .mobile-icon{
    font-size:22px!important;
    line-height:23px!important;
    width:25px;
    height:25px;
    display:grid;
    place-items:center;
  }
  .mobile-icon-svg svg{
    width:23px;
    height:23px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  .mobile-plus{
    width:58px!important;
    height:58px!important;
    margin-bottom:8px!important;
    font-size:30px!important;
  }
  .mobile-more-sheet{bottom:calc(82px + env(safe-area-inset-bottom))!important}
  .mobile-quick-add-sheet{bottom:calc(82px + env(safe-area-inset-bottom))!important}
  body{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  .main-content{padding-bottom:calc(102px + env(safe-area-inset-bottom))!important}

  /* Restore comfortable readability on secondary pages after the compact pass. */
  body:not(.page-dashboard):not(.page-sales) .page-header h1{font-size:25px!important}
  body:not(.page-dashboard):not(.page-sales) .panel-head h2{font-size:16px!important}
  body:not(.page-dashboard):not(.page-sales) .muted{font-size:10px}

  .page-customers .table-panel>.panel-head .muted,
  .page-inventory .table-panel>.panel-head .muted,
  .page-expenses .table-panel>.panel-head .muted,
  .page-team .table-panel>.panel-head .muted,
  .page-audit .table-panel>.panel-head .muted,
  .page-customer-detail .table-panel>.panel-head .muted{font-size:9px!important;line-height:1.35}

  .customer-name-cell strong,
  .inventory-product-cell strong,
  .expense-category-cell{font-size:12px!important}
  .customer-contact-cell,
  .customer-purchases-cell,
  .customer-value-cell,
  .inventory-category-cell,
  .inventory-cost-cell,
  .inventory-profit-cell,
  .expense-description-cell,
  .expense-date-cell,
  .expense-method-cell,
  .expense-staff-cell{font-size:9.5px!important;line-height:1.35}
  .inventory-product-cell small{font-size:9px!important}
  .inventory-price-cell,.expense-amount-cell{font-size:12.5px!important}

  .page-reports .report-kpis .kpi-card>span{font-size:10px!important}
  .page-reports .report-kpis .kpi-card small{font-size:9px!important}
  .page-reports .mobile-report-table td{font-size:9.5px!important}
  .page-reports .mobile-report-table td:first-child strong{font-size:11px!important}
  .page-reports .mobile-report-table td[data-label]:not(:first-child):before{font-size:7.5px!important}

  .page-team .mobile-admin-table td,
  .page-audit .mobile-admin-table td{font-size:9.5px!important;line-height:1.35}
  .page-team .mobile-admin-table td:before,
  .page-audit .mobile-admin-table td:before{font-size:7.5px!important}
  .page-team .team-user-cell strong,
  .page-audit .audit-action-cell strong{font-size:12px!important}

  .page-settings .settings-intro,
  .page-profile .profile-card>p,
  .page-notifications .notification-row p,
  .page-customer-detail .customer-detail-hero p,
  .page-customer-detail .customer-detail-hero small,
  .page-sale-detail .sale-detail-hero p{font-size:10px!important}
  .page-settings .setting-toggle strong,
  .page-notifications .notification-row strong{font-size:11px!important}
  .page-settings .setting-toggle small,
  .page-profile .privacy-note,
  .page-customer-detail .detail-kpis .kpi-card small,
  .page-sale-detail .detail-kpis .kpi-card small{font-size:8.5px!important}
}

@media(max-width:390px){
  .login-panel{padding-left:20px!important;padding-right:20px!important}
  .mobile-nav-item small{font-size:10px!important}
  .mobile-icon-svg svg{width:22px;height:22px}
}

/* v1.9.3 mobile nav vertical correction.
   Keep the bar flush to the viewport, but lift its contents so labels remain fully visible. */
@media(max-width:760px){
  .mobile-bottom-nav{
    bottom:0!important;
    height:80px!important;
    min-height:80px!important;
    padding-top:4px!important;
    padding-bottom:max(6px,env(safe-area-inset-bottom))!important;
    align-items:center!important;
  }
  .mobile-bottom-nav .mobile-nav-item{
    transform:translateY(-7px)!important;
    align-content:center!important;
    padding-top:0!important;
    padding-bottom:0!important;
  }
  .mobile-bottom-nav .mobile-plus{
    transform:translateY(-7px)!important;
    margin-bottom:0!important;
  }
}

/* Security hardening: notification opens are POST forms, styled like the previous links. */
.notification-open-form{margin:0}
.notification-open-button{width:100%;border:0;background:transparent;font:inherit;color:inherit;text-align:left;cursor:pointer}
.notification-open-button .notification-message{display:block;font-size:11px;color:#5f6764;margin:4px 0}
@media(max-width:760px){.notification-open-button .notification-message{font-size:9px;line-height:1.4;margin:3px 0}}


/* v1.9.7 final mobile deployment polish.
   Keep the login mark visually transparent and remove the oversized end-of-page
   dead space without changing the fixed navigation or desktop layout. */
@media(max-width:760px){
  .login-logo{
    background:transparent!important;
    object-fit:contain!important;
  }

  /* The footer is the final content item. Let the page height be driven by its
     real content instead of forcing a full extra viewport below it. */
  body:not(.login-body):not(.setup-body){
    padding-bottom:0!important;
  }
  body:not(.login-body):not(.setup-body) .main-content{
    min-height:auto!important;
    padding-bottom:calc(94px + env(safe-area-inset-bottom))!important;
  }
  body:not(.login-body):not(.setup-body) .system-footer{
    margin-top:22px!important;
    padding-top:14px!important;
    padding-bottom:0!important;
  }
}

/* v1.9.8 final mobile form readability + Record Sale action-flow polish.
   Desktop is intentionally unchanged. */
@media(max-width:760px){
  /* Customers: strengthen the small labels, reduce oversized field text. */
  .page-customers .filter-control>span{
    font-size:9.5px!important;
    line-height:1.2;
    letter-spacing:.12em!important;
    margin-bottom:2px;
  }
  .page-customers .filter-search input{
    font-size:14px!important;
    font-weight:650;
  }
  .page-customers .filter-search input::placeholder{
    font-size:14px!important;
    font-weight:650;
    color:#a4aaa7;
    opacity:1;
  }
  .page-customers .filter-form>.filter-control:not(.filter-search) select{
    font-size:15px!important;
    font-weight:750;
  }

  /* Record Sale: field placeholders should guide without dominating the form. */
  .page-record-sale input::placeholder,
  .page-record-sale textarea::placeholder,
  .page-record-sale .product-search-wrap input[type="search"]::placeholder{
    font-size:14px!important;
    font-weight:650!important;
    color:#a4aaa7!important;
    opacity:1;
  }

  /* Keep the final action row in normal document flow. It must never cover
     Notes or any other input above it. */
  .page-record-sale .form-actions{
    position:static!important;
    bottom:auto!important;
    z-index:auto!important;
    background:transparent!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    padding:0!important;
    margin-top:0!important;
  }
  .page-record-sale #saleForm{
    padding-bottom:2px;
  }
}

@media(max-width:390px){
  .page-customers .filter-search input,
  .page-customers .filter-search input::placeholder,
  .page-record-sale input::placeholder,
  .page-record-sale textarea::placeholder{
    font-size:13.5px!important;
  }
  .page-customers .filter-form>.filter-control:not(.filter-search) select{
    font-size:14.5px!important;
  }
}

/* v1.9.9 mobile typography audit
   Reference standard extracted from the approved Dashboard + Sales mobile views.
   Typography only: no layout, colour, or functional changes. Dashboard and Sales
   selectors are intentionally excluded from this pass. */
@media(max-width:760px){
  /* Reference tokens: Sales page title 23px; section title 16px; card primary
     12px; card amount 13px; form label 11px; text control 16px; standard button
     13px; caption/meta 8.5px; eyebrow 10px. */
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .main-content{
    font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  }

  /* Page and section hierarchy — matched to Sales. */
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .page-header h1{
    font-size:23px!important;
    font-weight:700!important;
    line-height:1.08!important;
    letter-spacing:-.035em!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .panel-head h2{
    font-size:16px!important;
    font-weight:700!important;
    line-height:1.2!important;
    letter-spacing:-.02em!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .eyebrow{
    font-size:10px!important;
    font-weight:800!important;
    line-height:1.2!important;
    letter-spacing:.16em!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .panel-head .muted{
    font-size:8.5px!important;
    font-weight:400!important;
    line-height:1.35!important;
    letter-spacing:0!important;
  }

  /* Form labels, controls, placeholders, and actions — same typographic roles as Sales. */
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-settings,.page-profile,.page-sale-detail) label{
    font-size:11px!important;
    font-weight:750!important;
    line-height:1.25!important;
    letter-spacing:0!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-settings,.page-profile,.page-sale-detail) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-settings,.page-profile,.page-sale-detail) select,
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-settings,.page-profile,.page-sale-detail) textarea{
    font-size:16px!important;
    font-weight:400!important;
    line-height:1.25!important;
    letter-spacing:0!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-settings,.page-profile,.page-sale-detail) input::placeholder,
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-settings,.page-profile,.page-sale-detail) textarea::placeholder{
    font-size:16px!important;
    font-weight:400!important;
    line-height:1.25!important;
    letter-spacing:0!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .btn{
    font-size:13px!important;
    font-weight:750!important;
    line-height:1.1!important;
    letter-spacing:0!important;
  }
  body:is(.page-record-sale,.page-reports,.page-notifications,.page-sale-detail) .small-btn,
  .page-sale-detail .receipt-button,
  .page-team .account-settings-btn{
    font-size:11px!important;
    font-weight:750!important;
    line-height:1.1!important;
    letter-spacing:0!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .text-link,
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .text-button{
    font-size:11px!important;
    font-weight:750!important;
    line-height:1.2!important;
    letter-spacing:0!important;
  }

  /* Shared card text hierarchy — matched to the Sales cards. */
  body:is(.page-customers,.page-inventory,.page-expenses,.page-customer-detail,.page-sale-detail) .mobile-card-table td{
    font-size:10px!important;
    line-height:1.35!important;
    letter-spacing:0!important;
  }
  body:is(.page-customers,.page-inventory,.page-expenses,.page-customer-detail,.page-sale-detail) .mobile-card-table td small{
    font-size:8.5px!important;
    line-height:1.35!important;
    letter-spacing:0!important;
  }

  /* Customers */
  .page-customers .filter-control>span{
    font-size:9px!important;
    font-weight:800!important;
    line-height:1.2!important;
    letter-spacing:.12em!important;
  }
  .page-customers .filter-search input,
  .page-customers .filter-search input::placeholder,
  .page-customers .filter-form>.filter-control:not(.filter-search) select{
    font-size:16px!important;
    font-weight:400!important;
    line-height:1.25!important;
    letter-spacing:0!important;
  }
  .page-customers .filter-form>.btn{font-size:12px!important;line-height:1.15!important}
  .page-customers .filter-clear{font-size:9px!important;line-height:1.3!important}
  .page-customers .table-panel>.panel-head h2{font-size:16px!important;line-height:1.2!important}
  .page-customers .table-panel>.panel-head .muted{font-size:8.5px!important;line-height:1.35!important}
  .page-customers .customer-name-cell strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-customers .customer-contact-cell,
  .page-customers .customer-purchases-cell{font-size:10px!important;line-height:1.35!important}
  .page-customers .customer-contact-cell small,
  .page-customers .customer-purchases-cell small{font-size:8.5px!important;line-height:1.35!important}
  .page-customers .customer-value-cell,
  .page-customers .customer-balance-cell{font-size:13px!important;font-weight:700!important;line-height:1.15!important}
  .page-customers .customer-value-cell:before,
  .page-customers .customer-balance-cell:before{font-size:8.5px!important;font-weight:600!important;line-height:1.2!important;letter-spacing:0!important}

  /* Inventory */
  .page-inventory .filter-control>span{font-size:9px!important;font-weight:800!important;line-height:1.2!important;letter-spacing:.12em!important}
  .page-inventory .compact-form-panel .panel-head h2{font-size:16px!important;line-height:1.2!important}
  .page-inventory .margin-preview{font-size:10px!important;font-weight:500!important;line-height:1.4!important;letter-spacing:0!important}
  .page-inventory .inventory-product-cell strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-inventory .inventory-product-cell small{font-size:8.5px!important;line-height:1.35!important}
  .page-inventory .inventory-category-cell,
  .page-inventory .inventory-cost-cell,
  .page-inventory .inventory-profit-cell{font-size:10px!important;line-height:1.35!important}
  .page-inventory .inventory-price-cell{font-size:13px!important;font-weight:700!important;line-height:1.15!important}
  .page-inventory .inventory-cost-cell:before,
  .page-inventory .inventory-profit-cell:before{font-size:8.5px!important;font-weight:600!important;line-height:1.2!important}
  .page-inventory .inventory-stock-cell .stock-pill{font-size:9px!important;font-weight:800!important;line-height:1.1!important}
  .page-inventory .inventory-action-cell .text-link{font-size:11px!important}

  /* Expenses */
  .page-expenses .filter-control>span{font-size:9px!important;font-weight:800!important;line-height:1.2!important;letter-spacing:.12em!important}
  .page-expenses .compact-form-panel .panel-head h2{font-size:16px!important;line-height:1.2!important}
  .page-expenses .expense-category-cell{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-expenses .expense-description-cell,
  .page-expenses .expense-date-cell,
  .page-expenses .expense-method-cell,
  .page-expenses .expense-staff-cell{font-size:10px!important;line-height:1.35!important}
  .page-expenses .expense-amount-cell{font-size:13px!important;font-weight:700!important;line-height:1.15!important}

  /* Record Sale */
  .page-record-sale .form-section h3{
    font-size:14px!important;
    font-weight:700!important;
    line-height:1.2!important;
    letter-spacing:-.01em!important;
  }
  .page-record-sale .customer-key-note,
  .page-record-sale .customer-lookup-status{font-size:8.5px!important;font-weight:600!important;line-height:1.35!important;letter-spacing:0!important}
  .page-record-sale .known-customer-card strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-record-sale .known-customer-card small{font-size:8.5px!important;line-height:1.35!important}
  .page-record-sale .product-picker-field>span{font-size:11px!important;font-weight:750!important;line-height:1.25!important}
  .page-record-sale .product-result strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-record-sale .product-result small{font-size:8.5px!important;line-height:1.35!important}
  .page-record-sale .product-result b{font-size:10px!important;font-weight:700!important;line-height:1.2!important}
  .page-record-sale .line-total span,
  .page-record-sale .sale-total-box span{font-size:9px!important;font-weight:500!important;line-height:1.3!important}
  .page-record-sale .line-total strong{font-size:13px!important;font-weight:700!important;line-height:1.15!important}
  .page-record-sale .sale-total-box strong{font-size:20px!important;font-weight:700!important;line-height:1.08!important;letter-spacing:-.03em!important}

  /* Reports */
  .page-reports .dashboard-toolbar.period-toolbar>div:first-child strong{font-size:14px!important;font-weight:700!important;line-height:1.2!important}
  .page-reports .dashboard-toolbar.period-toolbar>div:first-child span{font-size:9px!important;line-height:1.35!important}
  .page-reports .report-kpis .kpi-card>span{font-size:9px!important;font-weight:600!important;line-height:1.2!important}
  .page-reports .report-kpis .money-value{font-size:15px!important;font-weight:700!important;line-height:1.15!important;letter-spacing:-.025em!important}
  .page-reports .report-kpis .kpi-card small{font-size:8.5px!important;line-height:1.35!important}
  .page-reports .mobile-report-table td{font-size:10px!important;line-height:1.35!important}
  .page-reports .mobile-report-table td:first-child strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-reports .mobile-report-table td[data-label]:not(:first-child):before{font-size:8px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.08em!important}
  .page-reports .import-center .panel-head h2{font-size:16px!important;line-height:1.2!important}
  .page-reports .import-note{font-size:10px!important;line-height:1.45!important}
  .page-reports .import-card strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-reports .import-card p{font-size:10px!important;line-height:1.45!important}
  .page-reports .import-card input[type=file]{font-size:12px!important;font-weight:500!important;line-height:1.25!important}
  .page-reports .custom-period-popover label{font-size:8.5px!important;font-weight:750!important;line-height:1.2!important}
  .page-reports .custom-period-popover input[type="date"]{font-size:13px!important;font-weight:600!important;line-height:1.1!important;letter-spacing:-.01em!important}
  .page-reports .custom-period-popover .btn{font-size:11px!important}

  /* Team & Roles */
  .page-team .compact-form-panel .panel-head h2,
  .page-team .table-panel>.panel-head h2{font-size:16px!important;line-height:1.2!important}
  .page-team .table-panel>.privacy-note{font-size:10px!important;line-height:1.45!important}
  .page-team .mobile-admin-table td{font-size:10px!important;line-height:1.35!important}
  .page-team .mobile-admin-table td:before{font-size:8px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.08em!important}
  .page-team .team-user-cell strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-team .team-user-cell small{font-size:8.5px!important;line-height:1.35!important}
  .page-team .account-modal-head strong{font-size:16px!important;font-weight:700!important;line-height:1.2!important}
  .page-team .account-action-block h3{font-size:14px!important;font-weight:700!important;line-height:1.2!important}

  /* Audit Log */
  .page-audit .audit-explainer h2{font-size:16px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:-.02em!important}
  .page-audit .audit-explainer>p,
  .page-audit .audit-explainer .privacy-note{font-size:10px!important;line-height:1.45!important}
  .page-audit .mobile-admin-table td{font-size:10px!important;line-height:1.35!important}
  .page-audit .mobile-admin-table td:before{font-size:8px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.08em!important}
  .page-audit .audit-action-cell strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}

  /* Settings */
  .page-settings .settings-intro,
  .page-settings .privacy-note,
  .page-settings .danger-zone{font-size:10px!important;line-height:1.45!important}
  .page-settings .setting-toggle strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-settings .setting-toggle small{font-size:8.5px!important;font-weight:400!important;line-height:1.35!important}
  .page-settings .detail-list dt{font-size:8.5px!important;font-weight:600!important;line-height:1.35!important}
  .page-settings .detail-list dd{font-size:10px!important;font-weight:650!important;line-height:1.35!important}
  .page-settings .danger-zone h3{font-size:14px!important;font-weight:700!important;line-height:1.2!important}

  /* Profile */
  .page-profile .profile-card h2{font-size:16px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:-.02em!important}
  .page-profile .profile-card>p,
  .page-profile .privacy-note{font-size:10px!important;line-height:1.45!important}
  .page-profile .role-badge{font-size:8.5px!important;font-weight:800!important;line-height:1.1!important;letter-spacing:.1em!important}
  .page-profile .profile-detail span{font-size:8.5px!important;font-weight:500!important;line-height:1.35!important}
  .page-profile .profile-detail strong{font-size:10px!important;font-weight:700!important;line-height:1.35!important}

  /* Notifications */
  .page-notifications .panel-head .btn{font-size:11px!important}
  .page-notifications .notification-row strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-notifications .notification-row p,
  .page-notifications .notification-open-button .notification-message{font-size:10px!important;font-weight:400!important;line-height:1.4!important;letter-spacing:0!important}
  .page-notifications .notification-row small{font-size:8.5px!important;line-height:1.35!important}

  /* Customer Detail */
  .page-customer-detail .customer-identity-badge{font-size:8.5px!important;font-weight:700!important;line-height:1.1!important}
  .page-customer-detail .customer-detail-hero h2{font-size:20px!important;font-weight:700!important;line-height:1.1!important;letter-spacing:-.035em!important}
  .page-customer-detail .customer-detail-hero p,
  .page-customer-detail .customer-detail-hero small{font-size:10px!important;line-height:1.4!important}
  .page-customer-detail .customer-history-count strong{font-size:15px!important;font-weight:700!important;line-height:1.1!important}
  .page-customer-detail .customer-history-count span{font-size:8.5px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.08em!important}
  .page-customer-detail .detail-kpis .kpi-card>span{font-size:9px!important;font-weight:600!important;line-height:1.2!important}
  .page-customer-detail .detail-kpis .money-value,
  .page-customer-detail .detail-kpis .detail-pattern-title{font-size:15px!important;font-weight:700!important;line-height:1.15!important}
  .page-customer-detail .detail-kpis .kpi-card small{font-size:8.5px!important;line-height:1.35!important}
  .page-customer-detail .history-sale-cell strong{font-size:10px!important;font-weight:700!important;line-height:1.2!important}
  .page-customer-detail .history-sale-cell small{font-size:8.5px!important;line-height:1.35!important}
  .page-customer-detail .history-total-cell{font-size:13px!important;font-weight:700!important;line-height:1.15!important}
  .page-customer-detail .history-balance-cell:before{font-size:8.5px!important;font-weight:600!important;line-height:1.2!important}
  .page-customer-detail .history-actions-cell .receipt-mini-link{font-size:9px!important;font-weight:750!important;line-height:1.1!important}

  /* Sale Detail */
  .page-sale-detail .detail-topbar>.text-link{font-size:11px!important}
  .page-sale-detail .sale-detail-hero h2{font-size:20px!important;font-weight:700!important;line-height:1.1!important;letter-spacing:-.035em!important}
  .page-sale-detail .sale-detail-hero p{font-size:10px!important;line-height:1.4!important}
  .page-sale-detail .detail-total span{font-size:8.5px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.08em!important}
  .page-sale-detail .detail-total strong{font-size:20px!important;font-weight:700!important;line-height:1.08!important;letter-spacing:-.03em!important}
  .page-sale-detail .detail-kpis .kpi-card>span{font-size:9px!important;font-weight:600!important;line-height:1.2!important}
  .page-sale-detail .detail-kpis .money-value,
  .page-sale-detail .detail-kpis .detail-pattern-title{font-size:15px!important;font-weight:700!important;line-height:1.15!important}
  .page-sale-detail .detail-kpis .kpi-card small{font-size:8.5px!important;line-height:1.35!important}
  .page-sale-detail .detail-grid .panel-head h2{font-size:16px!important;line-height:1.2!important}
  .page-sale-detail .detail-explainer{font-size:10px!important;line-height:1.45!important}
  .page-sale-detail .payment-step-number{font-size:9px!important;font-weight:800!important;line-height:1!important}
  .page-sale-detail .payment-step-head strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-sale-detail .payment-step-head span,
  .page-sale-detail .payment-step-copy p,
  .page-sale-detail .payment-step-copy small{font-size:8.5px!important;line-height:1.35!important}
  .page-sale-detail .detail-list dt{font-size:8.5px!important;font-weight:600!important;line-height:1.35!important}
  .page-sale-detail .detail-list dd{font-size:10px!important;font-weight:650!important;line-height:1.35!important}
  .page-sale-detail .sale-item-product strong{font-size:12px!important;font-weight:700!important;line-height:1.2!important}
  .page-sale-detail .sale-item-total{font-size:13px!important;font-weight:700!important;line-height:1.15!important}
  .page-sale-detail .sale-item-qty,
  .page-sale-detail .sale-item-price,
  .page-sale-detail .sale-item-cost,
  .page-sale-detail .sale-item-profit{font-size:10px!important;line-height:1.35!important}
  .page-sale-detail .sale-item-qty:before,
  .page-sale-detail .sale-item-price:before,
  .page-sale-detail .sale-item-cost:before,
  .page-sale-detail .sale-item-profit:before{font-size:8.5px!important;font-weight:600!important;line-height:1.2!important}

  /* Secondary-screen footer caption matches the Sales card caption scale. */
  body:is(.page-customers,.page-inventory,.page-expenses,.page-record-sale,.page-reports,.page-team,.page-audit,.page-settings,.page-profile,.page-notifications,.page-customer-detail,.page-sale-detail) .system-footer{
    font-size:8.5px!important;
    line-height:1.35!important;
    letter-spacing:0!important;
  }

  /* Login is a distinct entry hero, but its form typography uses the same form roles. */
  .login-panel label{font-size:11px!important;font-weight:750!important;line-height:1.25!important;letter-spacing:0!important}
  .login-panel input,.login-panel input::placeholder{font-size:16px!important;font-weight:400!important;line-height:1.25!important;letter-spacing:0!important}
  .login-panel .btn.wide{font-size:13px!important;font-weight:750!important;line-height:1.1!important}
  .login-copy{font-size:10px!important;line-height:1.45!important}
  .login-panel>.muted,.public-footer{font-size:8.5px!important;line-height:1.35!important}

  /* Setup uses the same form roles; installer hero sizing remains intentionally distinct. */
  .setup-body label{font-size:11px!important;font-weight:750!important;line-height:1.25!important;letter-spacing:0!important}
  .setup-body input,.setup-body input::placeholder{font-size:16px!important;font-weight:400!important;line-height:1.25!important;letter-spacing:0!important}
  .setup-body .btn{font-size:13px!important;font-weight:750!important;line-height:1.1!important}
  .setup-card>p{font-size:10px!important;line-height:1.45!important}
}
