:root{
  --bg:#f5f7fb;--surface:#fff;--surface-2:#f8fafc;--text:#162033;--text-2:#344054;
  --muted:#667085;--line:#e5eaf1;--line-strong:#d6dde8;--nav:#0b1220;--accent:#2563eb;
  --accent-hover:#1d4ed8;--accent-soft:#eef4ff;--success:#07875e;--success-soft:#eaf8f2;
  --warning:#b26b00;--warning-soft:#fff6e5;--danger:#c43d4b;--danger-soft:#fff0f2;
  --shadow-xs:0 1px 2px rgba(16,24,40,.04);--shadow-sm:0 4px 12px rgba(16,24,40,.05);
  --shadow-md:0 14px 38px rgba(16,24,40,.10);--radius:14px
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}
.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#7a8699;font-weight:800}

/* Login */
.login-view{min-height:100vh;background:#eef2f7;padding:24px;display:grid;place-items:center}
.login-shell{width:min(1160px,100%);min-height:690px;display:grid;grid-template-columns:1.12fr .88fr;background:#fff;border:1px solid #e2e7ef;border-radius:28px;overflow:hidden;box-shadow:0 30px 80px rgba(16,24,40,.12)}
.login-brand-panel{background:radial-gradient(circle at 85% 15%,rgba(66,133,244,.22),transparent 28%),radial-gradient(circle at 15% 85%,rgba(32,201,151,.14),transparent 30%),linear-gradient(145deg,#0b1220 0%,#101d34 100%);color:#fff;padding:46px;display:flex;flex-direction:column}
.login-brand-top{display:flex;align-items:center;gap:14px}.brand-mark{width:54px;height:54px;border-radius:15px;display:grid;place-items:center;background:#fff;color:#0b1220;font-weight:950;letter-spacing:.05em;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.brand-mark.small{width:40px;height:40px;border-radius:11px;font-size:12px;box-shadow:none}.brand-company{font-size:13px;font-weight:800}.brand-suite{font-size:11px;color:#9eabc0;margin-top:3px}
.login-copy{margin:auto 0 34px;max-width:620px}.system-badge{display:inline-flex;padding:7px 10px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);border-radius:999px;font-size:10px;letter-spacing:.12em;font-weight:800;color:#b8c6da}
.login-copy h1{font-size:42px;line-height:1.1;letter-spacing:-.035em;margin:18px 0 16px}.login-copy p{font-size:15px;line-height:1.7;color:#aab7ca;margin:0}
.login-feature-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.login-feature{padding:14px 15px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.045);border-radius:14px}
.login-feature strong,.login-feature span{display:block}.login-feature strong{font-size:12px}.login-feature span{font-size:10px;line-height:1.5;color:#91a0b6;margin-top:5px}
.login-card-wrap{display:grid;place-items:center;padding:44px}.login-card{width:min(390px,100%)}.login-card-head h2{font-size:30px;letter-spacing:-.025em;margin:6px 0 7px}.login-card-head p{font-size:13px;margin:0}
.stack-form{display:grid;gap:16px;margin-top:28px}label{display:grid;gap:7px;font-size:12px;font-weight:750;color:var(--text-2)}
input,select,textarea{width:100%;border:1px solid var(--line-strong);border-radius:10px;padding:11px 12px;background:#fff;color:var(--text);outline:none;transition:.15s}
input::placeholder,textarea::placeholder{color:#98a2b3}input:focus,select:focus,textarea:focus{border-color:#7ba3f8;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.login-button{height:44px}.demo-box{margin-top:24px;padding:14px;background:#f8fafc;border:1px solid var(--line);border-radius:12px;display:grid;gap:8px}
.demo-title{font-size:10px;letter-spacing:.1em;text-transform:uppercase;font-weight:850;color:var(--muted)}.demo-account{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:var(--text-2)}
.demo-account code{font-size:10px;background:#eef2f7;padding:4px 6px;border-radius:6px;color:#344054}

/* App */
.app{min-height:100vh;display:grid;grid-template-columns:264px minmax(0,1fr)}.sidebar{background:var(--nav);color:#fff;min-height:100vh;padding:18px 14px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;border-right:1px solid #162238}
.sidebar-brand{display:flex;gap:11px;align-items:center;padding:3px 7px 17px}.sidebar-brand-copy strong,.sidebar-brand-copy span{display:block}.sidebar-brand-copy strong{font-size:14px}.sidebar-brand-copy span{font-size:10px;color:#8290a6;margin-top:3px}
.workspace-chip{margin:4px 5px 13px;padding:10px 11px;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.035);border-radius:11px;display:flex;align-items:center;gap:9px}
.workspace-chip strong,.workspace-chip span{display:block}.workspace-chip strong{font-size:10px;color:#c9d4e5}.workspace-chip span{font-size:9px;color:#6f7e94;margin-top:2px}.workspace-dot{width:7px;height:7px;border-radius:50%;background:#32d583;box-shadow:0 0 0 4px rgba(50,213,131,.08)}
.nav{display:grid;gap:13px;overflow:auto;padding:2px 4px 12px}.nav-group{display:grid;gap:3px}.nav-group-label{padding:3px 9px 5px;font-size:9px;text-transform:uppercase;letter-spacing:.13em;font-weight:800;color:#57677f}
.nav button{border:0;background:transparent;color:#aab6c8;text-align:left;padding:9px 10px;border-radius:9px;font-weight:650;display:flex;align-items:center;gap:10px;font-size:12px;transition:.15s}
.nav button:hover{background:#121e33;color:#fff}.nav button.active{background:linear-gradient(90deg,#1a3d75,#17365f);color:#fff;box-shadow:inset 3px 0 0 #5b8def}
.nav .nav-icon{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;background:rgba(255,255,255,.045);font-size:11px;color:#96a8c0}.nav button.active .nav-icon{background:rgba(255,255,255,.10);color:#fff}
.sidebar-footer{margin-top:auto;padding:14px 5px 0;border-top:1px solid rgba(255,255,255,.07)}.user-mini{display:flex;gap:9px;align-items:center;margin-bottom:11px}.avatar{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(145deg,#2f6feb,#5d8df6);font-size:12px;font-weight:900}
.user-mini-copy strong,.user-mini-copy span{display:block}.user-mini-copy strong{font-size:11px}.user-mini-copy span{font-size:9px;color:#78889f;margin-top:2px}.sidebar-logout{background:#121d30!important;border:1px solid #1d2b44!important;color:#aebacf!important;font-size:11px}
.main{min-width:0;background:var(--bg)}.topbar{height:82px;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);padding:0 30px;display:flex;align-items:center;justify-content:space-between;gap:20px;position:sticky;top:0;z-index:20}
.topbar-title h2{font-size:23px;letter-spacing:-.02em;margin:2px 0 0}.topbar-actions{display:flex;gap:9px;align-items:center}.date-chip,.online-chip{padding:8px 10px;border-radius:9px;background:#fff;border:1px solid var(--line);color:#475467;font-size:10px;font-weight:700}
.online-chip{display:flex;align-items:center;gap:6px}.online-chip span{width:6px;height:6px;border-radius:50%;background:#12b76a}.content-shell{padding:24px 30px 42px;max-width:1680px;margin:0 auto}.page{animation:fade .18s ease}@keyframes fade{from{opacity:.55;transform:translateY(3px)}to{opacity:1;transform:none}}

/* Components */
.grid{display:grid;gap:14px}.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-xs)}.card.pad{padding:18px}
.kpi-card{padding:17px 18px;position:relative;overflow:hidden;min-height:128px}.kpi-top{height:25px;display:flex;align-items:flex-start;justify-content:space-between}.kpi-icon{width:27px;height:27px;border-radius:8px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:900}
.kpi-accent{width:28px;height:3px;background:#dbe6fb;border-radius:99px;margin-top:6px}.kpi-card .label{font-size:10px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.055em;margin-top:9px}.kpi-card .value{font-size:24px;font-weight:900;margin-top:5px;letter-spacing:-.025em;color:#101828}.kpi-card .sub{font-size:10px;color:#8a94a6;margin-top:5px;line-height:1.35}
.section-grid{grid-template-columns:1.45fr .85fr;margin-top:14px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:13px}.section-title h3{margin:0;font-size:14px;letter-spacing:-.01em}.section-title .muted{font-size:10px}
.btn{border:0;border-radius:9px;padding:9px 12px;font-weight:750;font-size:11px;transition:.15s;white-space:nowrap}.btn.primary{background:var(--accent);color:#fff;box-shadow:0 3px 8px rgba(37,99,235,.16)}.btn.primary:hover{background:var(--accent-hover)}.btn.soft{background:var(--accent-soft);color:#2259bc}.btn.ghost{background:#fff;border:1px solid var(--line-strong);color:#475467}.btn.danger{background:var(--danger-soft);color:var(--danger)}.btn.success{background:var(--success);color:#fff}.btn.full{width:100%}.table-action{background:#fff;border:1px solid var(--line);color:#344054;padding:7px 9px}
.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap}.toolbar .left,.toolbar .right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.search{min-width:240px}.field-inline{display:flex;align-items:center;border:1px solid var(--line-strong);border-radius:10px;background:#fff;padding-left:10px}.field-inline span{color:#98a2b3}.field-inline input{border:0;box-shadow:none!important}.result-count{font-size:10px;color:var(--muted);font-weight:700}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:11px}table{width:100%;border-collapse:collapse;font-size:11px;background:#fff}th,td{padding:11px 12px;text-align:left;border-bottom:1px solid #edf0f4;white-space:nowrap;vertical-align:middle}th{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#7b8797;background:#f8fafc;font-weight:850}tbody tr:hover{background:#fbfcfe}tr:last-child td{border-bottom:0}.table-sub{display:block;color:#98a2b3;font-size:9px;margin-top:2px}
.badge{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:800;border:1px solid transparent}.badge.success{background:var(--success-soft);color:var(--success);border-color:#cfeee2}.badge.warning{background:var(--warning-soft);color:var(--warning);border-color:#f6dfae}.badge.danger{background:var(--danger-soft);color:var(--danger);border-color:#f8d5da}.badge.info{background:var(--accent-soft);color:#245fc7;border-color:#d6e4ff}.badge.neutral{background:#f2f4f7;color:#667085;border-color:#e4e7ec}.badge.vip{background:#f2efff;color:#6941c6;border-color:#e2dafd}
.info-list{display:grid}.info-row{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #edf0f4;font-size:11px}.info-row:last-child{border-bottom:0}.info-row span:first-child{color:var(--muted)}.info-row span:last-child{font-weight:800;text-align:right}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid .full{grid-column:1/-1}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.permission-item{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:9px 10px;font-size:11px;font-weight:700}.permission-item input{width:auto}
.empty{padding:27px;text-align:center;color:var(--muted);font-size:11px}.empty.compact{padding:16px}.mini-stat{padding:12px;border-radius:11px;background:#f8fafc;border:1px solid var(--line)}.mini-stat span{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;font-weight:800}.mini-stat strong{display:block;font-size:15px;margin-top:5px}.section-divider{height:1px;background:var(--line);margin:18px 0}

/* Dashboard & charts */
.chart-bars{display:flex;align-items:flex-end;gap:9px;height:205px;padding:25px 7px 2px}.bar-col{flex:1;display:grid;gap:6px;align-items:end;height:100%}.bar{width:100%;border-radius:6px 6px 2px 2px;background:linear-gradient(180deg,#7ca4f8,#2f67dc);min-height:4px}.bar-label{text-align:center;font-size:9px;color:var(--muted)}

/* POS */
.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:15px;align-items:start}.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.product-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;cursor:pointer;transition:.15s;box-shadow:var(--shadow-xs)}.product-card:hover{transform:translateY(-1px);box-shadow:var(--shadow-sm);border-color:#cfd9e8}
.product-card .name{font-weight:850;font-size:12px}.product-card .category{color:var(--muted);font-size:9px;margin:4px 0 12px}.product-card .price{font-weight:900;color:var(--accent);font-size:14px}.product-card .meta{display:flex;justify-content:space-between;gap:8px;font-size:9px;color:var(--muted);margin-top:7px}
.cart{position:sticky;top:100px}.cart-list{display:grid;gap:8px;max-height:380px;overflow:auto}.cart-item{border:1px solid var(--line);border-radius:10px;padding:10px;background:#fbfcfe}.cart-item-head{display:flex;justify-content:space-between;gap:12px}.cart-item strong{font-size:11px}.qty-controls{display:flex;align-items:center;gap:7px;margin-top:7px}.qty-controls button{width:26px;height:26px;border:1px solid var(--line);background:#fff;border-radius:7px;font-weight:900}
.summary{border-top:1px solid var(--line);margin-top:13px;padding-top:12px;display:grid;gap:8px}.summary-row{display:flex;justify-content:space-between;font-size:11px}.summary-row.total{font-size:17px;font-weight:900;margin-top:3px}
.shift-banner{display:flex;justify-content:space-between;gap:18px;align-items:center}.shift-banner h3{margin:3px 0 4px;font-size:15px}.shift-banner p{margin:0;color:var(--muted);font-size:10px}.shift-banner.shift-open{border-left:3px solid #12b76a}.shift-banner.shift-closed{border-left:3px solid #f79009}.shift-banner-actions{display:flex;gap:8px;flex-wrap:wrap}

/* CRM */
.page-hero{background:linear-gradient(120deg,#0f1b31,#152848);color:#fff;border-radius:16px;padding:21px 23px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;gap:22px;box-shadow:var(--shadow-sm);position:relative;overflow:hidden}.page-hero:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;background:rgba(58,110,226,.17);right:-70px;top:-110px}.page-hero>div{position:relative;z-index:1}
.hero-kicker{font-size:9px;text-transform:uppercase;letter-spacing:.14em;color:#91a6c5;font-weight:850}.page-hero h3{font-size:20px;margin:5px 0 6px}.page-hero p{font-size:10px;line-height:1.55;color:#aabbd2;margin:0;max-width:660px}.hero-actions{display:flex;gap:8px;align-items:center}
.crm-control-card{padding-top:14px!important}.customer-cell{display:flex;align-items:center;gap:9px}.customer-avatar{width:31px;height:31px;border-radius:9px;background:#eaf1ff;color:#285fbf;display:grid;place-items:center;font-weight:900;font-size:11px;flex:0 0 auto}.customer-avatar.large{width:48px;height:48px;border-radius:13px;font-size:17px}
.customer-cell strong,.customer-cell span{display:block}.customer-cell strong{font-size:11px}.customer-cell span{font-size:9px;color:#98a2b3;margin-top:2px}.branch-list{display:flex;gap:4px;max-width:220px;overflow:hidden}.branch-list span{font-size:9px;background:#f2f4f7;border:1px solid #e4e7ec;padding:3px 5px;border-radius:6px}
.crm-empty{min-height:260px;display:grid;place-items:center;align-content:center;gap:7px;text-align:center;color:var(--muted)}.crm-empty-icon{width:46px;height:46px;border-radius:14px;background:#eef4ff;color:#3668ce;display:grid;place-items:center;font-size:20px}.crm-empty strong{color:var(--text);font-size:12px}.crm-empty span{font-size:10px;max-width:430px}
.customer-detail-head{display:flex;align-items:center;gap:12px;margin-bottom:15px}.customer-detail-head h3{margin:2px 0 5px;font-size:18px}.detail-badges{display:flex;gap:5px}.crm-detail-kpi{grid-template-columns:repeat(4,1fr)}

/* Attendance */
.attendance-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.attendance-button{padding:20px 15px;border-radius:13px;border:1px solid var(--line);background:#fff;text-align:left}.attendance-button strong{display:block;font-size:14px;margin-bottom:3px}.attendance-button span{font-size:10px;color:var(--muted)}.attendance-button.in{border-left:3px solid #12b76a}.attendance-button.out{border-left:3px solid #f04438}

/* Report */
.report-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.report-filter label{min-width:150px}.report-apply{align-self:end}

/* QRIS */
.payment-hint{display:grid;gap:3px;padding:10px 11px;border-radius:9px;background:#f8fafc;border:1px solid var(--line);font-size:10px;color:var(--muted)}.payment-hint strong{color:var(--text);font-size:10px}
.qris-payment{text-align:center;display:grid;justify-items:center;gap:7px}.qris-branch{font-size:11px;font-weight:800;color:var(--muted)}.qris-total-label{font-size:9px;color:var(--muted)}.qris-total{font-size:31px;font-weight:950;letter-spacing:-.03em}.qris-image-wrap{width:min(310px,78vw);aspect-ratio:1/1;border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff;margin:5px 0;display:grid;place-items:center}.qris-image{width:100%;height:100%;object-fit:contain;border-radius:8px}.qris-merchant{font-size:13px}
.qris-instruction{max-width:470px;padding:10px;border-radius:9px;background:var(--accent-soft);font-size:10px;line-height:1.5;color:#315788}.qris-warning{padding:10px 11px;border-radius:9px;background:var(--warning-soft);color:#805700;font-size:10px;line-height:1.5;text-align:left}
.qris-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:13px}.qris-config-card{display:flex;flex-direction:column}.qris-thumb{height:200px;border:1px solid var(--line);border-radius:11px;background:#fafafa;padding:10px;display:grid;place-items:center;margin-bottom:9px}.qris-thumb img{max-width:100%;max-height:100%;object-fit:contain}.qris-empty{height:200px;border:1px dashed #ccd3df;border-radius:11px;background:#fafafa;display:grid;place-items:center;color:var(--muted);font-size:10px;margin-bottom:9px}.qris-upload-preview{min-height:220px;border:1px dashed #ccd3df;border-radius:11px;background:#fafafa;display:grid;place-items:center;padding:12px}.qris-upload-preview img{max-width:300px;width:100%;max-height:300px;object-fit:contain}

/* Cash */
.cash-payment-box{display:grid;gap:11px}.cash-choice-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cash-choice{border:1px solid var(--line-strong);background:#fff;border-radius:10px;padding:11px;text-align:left}.cash-choice.active{border-color:#7da2f5;background:#f4f7ff;box-shadow:0 0 0 2px rgba(37,99,235,.08)}.cash-choice strong,.cash-choice span{display:block}.cash-choice strong{font-size:11px}.cash-choice span{font-size:9px;color:var(--muted);margin-top:3px}.cash-change-box{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;border-radius:10px;background:#f8fafc;border:1px solid var(--line)}.cash-change-box strong{font-size:16px}.cash-change-box.insufficient{background:var(--danger-soft);border-color:#f6ccd2;color:var(--danger)}.cash-change-box.valid{background:var(--success-soft);border-color:#cbeadc;color:var(--success)}

/* Modal */
.modal-backdrop{position:fixed;inset:0;background:rgba(7,13,24,.56);display:grid;place-items:center;padding:20px;z-index:50;backdrop-filter:blur(3px)}.modal{width:min(720px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:16px;border:1px solid var(--line);box-shadow:0 32px 90px rgba(0,0,0,.22)}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 19px;border-bottom:1px solid var(--line)}.modal-head h3{margin:0;font-size:15px}.modal-body{padding:19px}.modal-foot{padding:13px 19px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px;background:#fbfcfe}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:8px;width:31px;height:31px}.toast{position:fixed;right:22px;bottom:22px;background:#101828;color:#fff;padding:11px 13px;border-radius:9px;font-size:10px;font-weight:750;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:100;box-shadow:var(--shadow-md)}.toast.show{opacity:1;transform:none}

/* Receipt */
.receipt{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.45}.receipt h3{text-align:center;margin:0}.receipt .center{text-align:center}.receipt hr{border:0;border-top:1px dashed #999}.receipt-row{display:flex;justify-content:space-between;gap:13px}.receipt-58{width:58mm;max-width:58mm;margin:0 auto}.receipt-80{width:80mm;max-width:80mm;margin:0 auto}.receipt-queue{text-align:center;font-size:12px;line-height:1.2;margin:5px 0}.receipt-queue strong{font-size:30px;letter-spacing:.06em}.receipt-item-name{font-weight:800;margin-top:7px}.receipt-total{font-size:14px;margin-top:4px}.inline-foot{padding:15px 0 0;margin-top:15px}

/* Responsive */
@media(max-width:1180px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.pos-layout{grid-template-columns:1fr}.cart{position:static}.product-grid{grid-template-columns:repeat(2,1fr)}.crm-detail-kpi{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.login-shell{grid-template-columns:1fr;min-height:auto}.login-brand-panel{padding:30px}.login-copy{margin:38px 0 28px}.login-copy h1{font-size:32px}.app{grid-template-columns:1fr}.sidebar{height:auto;min-height:auto;position:static}.workspace-chip,.sidebar-footer{display:none}.nav{grid-template-columns:repeat(2,1fr);gap:8px}.nav-group{display:contents}.nav-group-label{display:none}.main{min-height:100vh}.topbar{position:static;padding:15px 18px;height:auto}.content-shell{padding:18px}.section-grid,.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.page-hero{align-items:flex-start;flex-direction:column}.shift-banner{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.login-view{padding:0;background:#fff}.login-shell{border:0;border-radius:0}.login-brand-panel{display:none}.login-card-wrap{padding:34px 22px;min-height:100vh}.kpi-grid,.product-grid,.permission-grid,.attendance-actions,.cash-choice-row,.report-kpi-grid{grid-template-columns:1fr}.crm-detail-kpi{grid-template-columns:1fr 1fr}.topbar{align-items:flex-start}.topbar-actions{display:none}.nav{grid-template-columns:1fr 1fr}.content-shell{padding:14px}.toolbar .left,.toolbar .right{width:100%}.toolbar input,.toolbar select,.field-inline{width:100%;min-width:0}}
@media print{@page{margin:0}body.printing-receipt *{visibility:hidden!important}body.printing-receipt #printReceiptArea,body.printing-receipt #printReceiptArea *{visibility:visible!important}body.printing-receipt #printReceiptArea{position:absolute;left:0;top:0;margin:0;padding:3mm;box-sizing:border-box;background:#fff;color:#000}body.printing-receipt .receipt-58{width:58mm!important}body.printing-receipt .receipt-80{width:80mm!important}}


/* Advanced CRM analytics */
.birthday-chip{display:block;width:max-content;margin-top:4px;padding:3px 6px;border-radius:999px;background:#fff6e5;color:#9a6700;border:1px solid #f4dda8;font-size:8px;font-weight:800}
.crm-analytics-grid{grid-template-columns:1fr 1fr;gap:14px}
.crm-product-rank{display:grid;gap:7px}
.crm-product-row{display:flex;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#fbfcfe}
.crm-product-row .rank-no{width:23px;height:23px;border-radius:7px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:9px;font-weight:900}
.crm-product-row div{min-width:0}
.crm-product-row strong,.crm-product-row div span{display:block}
.crm-product-row strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-product-row div span{font-size:9px;color:var(--muted);margin-top:2px}
@media(max-width:900px){.crm-analytics-grid{grid-template-columns:1fr}}


/* Member & discount cashier */
.customer-mode-box{display:grid;gap:10px;padding:11px;border:1px solid var(--line);border-radius:11px;background:#fbfcfe}
.customer-mode-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.customer-mode-head strong,.customer-mode-head span{display:block}
.customer-mode-head strong{font-size:11px}
.customer-mode-head span{font-size:9px;color:var(--muted);margin-top:2px}
.customer-mode-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.customer-note{font-size:9px;color:var(--muted);line-height:1.45}
.member-selected{display:flex;align-items:center;gap:9px;padding:9px;border:1px solid #d9e5fb;border-radius:9px;background:#f4f7ff}
.member-avatar{width:32px;height:32px;border-radius:9px;background:#e7efff;color:#245fc7;display:grid;place-items:center;font-size:11px;font-weight:900;flex:0 0 auto}
.member-info{min-width:0;flex:1}
.member-info strong,.member-info span{display:block}
.member-info strong{font-size:11px}
.member-info span{font-size:9px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.discount-box{display:grid;gap:8px;padding:11px;border:1px solid var(--line);border-radius:11px;background:#fff}
.discount-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.discount-head strong{font-size:11px}.discount-head span{font-size:9px;color:var(--muted)}
.discount-controls{display:grid;grid-template-columns:120px 1fr;gap:8px}
.discount-result{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--muted)}
.discount-result strong{color:var(--text);font-size:11px}
.member-picker{display:grid;gap:12px}
.member-list{display:grid;gap:7px;max-height:430px;overflow:auto}
.member-list-item{width:100%;display:flex;align-items:center;gap:10px;text-align:left;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.member-list-item:hover{background:#f8fafc;border-color:#cbd8eb}
.member-select-arrow{margin-left:auto;color:var(--accent);font-weight:900}
.member-register-note{padding:10px 11px;border-radius:9px;background:var(--success-soft);color:#116149;font-size:9px;line-height:1.45;border:1px solid #cfeee2}
@media(max-width:600px){
  .customer-mode-head{flex-direction:column}
  .customer-mode-actions{width:100%;justify-content:stretch}
  .customer-mode-actions .btn{flex:1}
  .discount-controls{grid-template-columns:1fr}
}


/* Bluetooth printer */
.printer-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.printer-status-card{display:flex;align-items:center;gap:11px}
.printer-status-card>div:last-child{min-width:0}
.printer-status-card span,.printer-status-card strong{display:block}
.printer-status-card span{font-size:9px;text-transform:uppercase;letter-spacing:.05em}
.printer-status-card strong{font-size:11px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.printer-status-icon{width:36px;height:36px;border-radius:10px;background:#eef4ff;color:#245fc7;display:grid;place-items:center;font-size:12px;font-weight:900;flex:0 0 auto}
.printer-status-icon.connected{background:#eaf8f2;color:#07875e}
.printer-status-icon.offline{background:#f2f4f7;color:#98a2b3}
.printer-status-icon.bt{background:#eef4ff;color:#2259bc}
.printer-settings-layout{align-items:start}
.printer-actions{flex-wrap:wrap}
.bluetooth-config-box{margin-top:2px;padding:13px;border:1px solid var(--line);border-radius:11px;background:#f8fafc}
.bluetooth-config-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.bluetooth-config-head strong,.bluetooth-config-head span{display:block}
.bluetooth-config-head strong{font-size:11px}
.bluetooth-config-head>div span{font-size:9px;color:var(--muted);margin-top:2px}
.printer-mode-note{padding:9px 10px;border-radius:8px;background:#f2f4f7;color:#667085;font-size:9px;line-height:1.45;margin-top:10px}
.printer-guide{display:grid;gap:2px}
.guide-step{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #edf0f4}
.guide-step:last-child{border-bottom:0}
.guide-step>span{width:24px;height:24px;border-radius:7px;background:#eef4ff;color:#245fc7;display:grid;place-items:center;font-size:9px;font-weight:900;flex:0 0 auto}
.guide-step strong,.guide-step p{display:block;margin:0}
.guide-step strong{font-size:10px}
.guide-step p{font-size:9px;color:var(--muted);line-height:1.45;margin-top:3px}
.browser-support{margin-top:12px;padding:10px 11px;border-radius:9px;border:1px solid var(--line)}
.browser-support strong,.browser-support span{display:block}
.browser-support strong{font-size:10px}
.browser-support span{font-size:9px;line-height:1.45;margin-top:3px}
.browser-support.ok{background:#f3fbf7;border-color:#cfeee2;color:#116149}
.browser-support.bad{background:#fff5f5;border-color:#f6d5da;color:#a53b47}
@media(max-width:900px){.printer-status-grid{grid-template-columns:1fr}}


/* Employee administration & attendance */
.employee-profile-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:19px 21px;border-radius:15px;background:linear-gradient(120deg,#0f1b31,#17345e);color:#fff;margin-bottom:14px;box-shadow:var(--shadow-sm)}
.employee-profile-main{display:flex;align-items:center;gap:13px}
.employee-profile-avatar{width:48px;height:48px;border-radius:13px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.13);display:grid;place-items:center;font-size:17px;font-weight:900}
.employee-profile-main h3{margin:3px 0 4px;font-size:18px}
.employee-profile-main p{margin:0;color:#aebdd3;font-size:10px}
.employee-info-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px}
.employee-info-card span,.employee-info-card strong{display:block}
.employee-info-card span{font-size:9px;text-transform:uppercase;letter-spacing:.06em;font-weight:800;color:var(--muted)}
.employee-info-card strong{font-size:14px;margin-top:5px}
.attendance-today-stats{grid-template-columns:repeat(2,1fr);margin-top:13px}
.employee-self-note{padding:10px 11px;border:1px solid #d9e5fb;border-radius:9px;background:#f4f7ff;color:#315788;font-size:9px;line-height:1.5}
.employee-missing{border-left:3px solid #f79009;margin-bottom:14px;display:grid;gap:4px}
.employee-missing strong{font-size:12px}.employee-missing span{font-size:10px;color:var(--muted)}
.employee-admin-hero{background:linear-gradient(120deg,#102036,#193b65)}
.employee-form-section{padding:7px 9px;border-radius:8px;background:#f2f4f7;color:#475467;font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
@media(max-width:1180px){.employee-info-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.employee-info-grid{grid-template-columns:1fr 1fr}.employee-profile-hero{align-items:flex-start;flex-direction:column}.attendance-today-stats{grid-template-columns:1fr 1fr}}

.employee-sync-note{padding:10px 12px;border:1px solid #dce6f5;border-radius:10px;background:#f6f9fe;color:#4d6380;font-size:9px}


/* ===== F&Biz Colorful Professional Theme ===== */
:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#f9fbff;
  --text:#1d2433;
  --text-2:#374151;
  --muted:#64748b;
  --line:#e6eaf2;
  --line-strong:#d7deeb;
  --nav:#182236;
  --accent:#5b5bd6;
  --accent-hover:#4949c9;
  --accent-soft:#eff0ff;
  --success:#00a86b;
  --success-soft:#eafaf3;
  --warning:#d98a00;
  --warning-soft:#fff5df;
  --danger:#d94c63;
  --danger-soft:#fff1f4;
  --shadow-sm:0 6px 18px rgba(41,53,108,.08);
  --shadow-md:0 18px 44px rgba(41,53,108,.12);
}

body{
  background:
    radial-gradient(circle at 0% 0%, rgba(255,153,102,.08), transparent 25%),
    radial-gradient(circle at 100% 0%, rgba(91,91,214,.08), transparent 25%),
    radial-gradient(circle at 100% 100%, rgba(0,168,107,.07), transparent 25%),
    var(--bg);
}
.login-view{
  background:
    radial-gradient(circle at top left, rgba(255,153,102,.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(91,91,214,.13), transparent 30%),
    #f2f5fb;
}
.login-shell{
  border:1px solid #e8ebf3;
  box-shadow:0 24px 70px rgba(39,52,105,.14);
}
.login-brand-panel{
  background:
    radial-gradient(circle at 15% 20%, rgba(255,170,120,.35), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(91,91,214,.28), transparent 30%),
    radial-gradient(circle at 20% 85%, rgba(0,168,107,.18), transparent 24%),
    linear-gradient(145deg,#1c2440 0%,#28345a 100%);
}
.brand-mark{
  background:linear-gradient(135deg,#ffffff,#f4f6ff);
  color:#4c4ccf;
}
.login-copy h1{
  font-size:46px;
  letter-spacing:-.04em;
}
.login-copy p{
  max-width:500px;
}
.login-card{
  width:min(410px,100%);
}
.login-card-head h2{
  color:#25314f;
}
.demo-box{
  background:linear-gradient(180deg,#fbfcff,#f5f8ff);
  border-color:#dfe6f3;
}
.sidebar{
  background:linear-gradient(180deg,#202a46 0%,#172033 100%);
}
.sidebar-brand strong{font-size:15px}
.nav a.active{
  background:linear-gradient(90deg,rgba(255,255,255,.18),rgba(255,255,255,.07));
  border-color:rgba(255,255,255,.16);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.topbar{
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(14px);
}
.date-chip{
  background:linear-gradient(180deg,#fff,#f7f9ff);
}
.page-hero,.employee-profile-hero,.employee-admin-hero{
  border:1px solid rgba(255,255,255,.25);
  box-shadow:var(--shadow-md);
}
.page-hero{
  background:
    radial-gradient(circle at top left, rgba(255,170,120,.20), transparent 18%),
    radial-gradient(circle at top right, rgba(91,91,214,.17), transparent 24%),
    linear-gradient(135deg,#ffffff,#f8fbff);
}
.page-hero h3{color:#26324f}
.page-hero p{color:#6b7280}

.card{
  border:1px solid #e7ebf3;
  box-shadow:var(--shadow-sm);
}
.kpi-card:nth-child(1){border-top:3px solid #5b5bd6}
.kpi-card:nth-child(2){border-top:3px solid #00a86b}
.kpi-card:nth-child(3){border-top:3px solid #ff9a5c}
.kpi-card:nth-child(4){border-top:3px solid #d94c63}

.btn.primary{
  background:linear-gradient(135deg,#5b5bd6,#7272eb);
  border-color:#5b5bd6;
  box-shadow:0 10px 22px rgba(91,91,214,.18);
}
.btn.primary:hover{
  background:linear-gradient(135deg,#5151ca,#6868e2);
}
.btn.soft{
  background:linear-gradient(180deg,#fff,#f6f8ff);
  border-color:#dbe2f0;
}
.search,input,select,textarea{
  border-radius:12px;
}
.summary,.customer-mode-box,.discount-box,.qris-box,.bluetooth-config-box{
  border-radius:14px;
}
.table-wrap table thead th{
  background:#f8faff;
}
.badge.info{
  background:#eef0ff;
  color:#5252cc;
}
.badge.success{
  background:#eafaf3;
  color:#008957;
}
.badge.warning{
  background:#fff5df;
  color:#b37200;
}
.badge.danger{
  background:#fff1f4;
  color:#c73c56;
}

/* Hide clutter */
.workspace-chip,
.online-chip,
.login-feature-grid,
.result-count:empty{
  display:none !important;
}
.hero-kicker{color:#5b5bd6}
.topbar-title .eyebrow,.eyebrow{color:#7b8496}


/* ===== F&Biz Responsive Compact Layout ===== */
html,body{max-width:100%;overflow-x:hidden}
:root{--topbar-h:64px;--sidebar-w:232px}

/* Compact default density */
.card.pad{padding:14px}
.kpi-card{min-height:100px;padding:12px 14px}
.kpi-card .label{margin-top:6px}
.kpi-card .value{font-size:21px;margin-top:3px}
.kpi-card .sub{margin-top:3px}
.kpi-top{height:22px}
.kpi-icon{width:24px;height:24px}
.section-title{margin-bottom:9px}
.toolbar{margin-bottom:10px}
input,select,textarea{padding:9px 10px}
.btn{padding:8px 10px}
.page-hero{padding:14px 16px;margin-bottom:12px}
.page-hero h3{font-size:17px;margin:3px 0}
.page-hero p{font-size:9px;line-height:1.4}
.employee-profile-hero{padding:13px 15px;margin-bottom:10px}
.employee-profile-avatar{width:40px;height:40px}
.employee-info-grid{margin-bottom:10px}
.employee-info-card{padding:11px!important}
.employee-info-card strong{font-size:12px}
.table-wrap{max-width:100%}
th,td{padding:8px 10px}
.modal-head{padding:12px 15px}
.modal-body{padding:14px}
.modal-foot{padding:10px 14px}

/* Desktop / laptop: app fits viewport and pages scroll internally only when required */
@media (min-width:901px){
  .app{
    grid-template-columns:var(--sidebar-w) minmax(0,1fr);
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  .sidebar{
    width:var(--sidebar-w);
    height:100dvh;
    min-height:0;
    padding:13px 10px;
    overflow:hidden;
  }
  .sidebar-brand{padding:2px 7px 10px}
  .nav{
    gap:7px;
    overflow-y:auto;
    scrollbar-width:thin;
  }
  .nav-group{gap:2px}
  .nav-group-label{padding:2px 8px 3px}
  .nav button{padding:7px 8px;font-size:11px}
  .nav .nav-icon{width:18px;height:18px}
  .sidebar-footer{padding-top:9px}
  .user-mini{margin-bottom:8px}

  .main{
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  .topbar{
    height:var(--topbar-h);
    padding:0 20px;
  }
  .topbar-title h2{font-size:19px}
  .content-shell{
    height:calc(100dvh - var(--topbar-h));
    max-width:none;
    padding:14px 18px 16px;
    overflow:hidden;
  }
  .page{
    height:100%;
    min-height:0;
    overflow:auto;
    padding-right:3px;
    scrollbar-width:thin;
  }
  .grid{gap:10px}
  .kpi-grid{gap:10px}
  .section-grid{gap:10px;margin-top:10px}
  .table-wrap{
    max-height:48dvh;
    overflow:auto;
    scrollbar-width:thin;
  }
  .professional-table{max-height:52dvh}
  .cart{
    top:0;
    max-height:calc(100dvh - var(--topbar-h) - 120px);
    overflow:auto;
    scrollbar-width:thin;
  }
  .cart-list{max-height:190px}
  .product-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
  }
  .product-card{padding:10px}
  .product-card .category{margin:2px 0 7px}
  .product-card .price{font-size:13px}
  .product-card .meta{margin-top:4px}
  .pos-layout{
    grid-template-columns:minmax(0,1fr) 340px;
    gap:10px;
  }
  .shift-banner{padding:10px 12px!important}
  .shift-banner h3{font-size:13px;margin:1px 0 2px}
  .shift-banner p{font-size:9px}
  #posPage>div[style*="height:16px"]{height:8px!important}
  .summary{gap:6px;margin-top:9px;padding-top:9px}
  .customer-mode-box,.discount-box{padding:8px;gap:6px}
  .cart-item{padding:8px}
  .cart-list{gap:6px}
  .printer-status-grid{gap:8px;margin-bottom:10px}
  .printer-status-card{padding:11px!important}
  .qris-card-grid{gap:9px}
}

/* Large screens: more content per row */
@media (min-width:1440px){
  :root{--sidebar-w:240px}
  .content-shell{padding:14px 22px 16px}
  .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .product-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .pos-layout{grid-template-columns:minmax(0,1fr) 350px}
}

/* Compact laptop */
@media (min-width:901px) and (max-width:1180px){
  :root{--sidebar-w:205px}
  .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .kpi-card{min-height:92px}
  .kpi-card .value{font-size:18px}
  .kpi-card .sub{display:none}
  .section-grid{grid-template-columns:1.25fr .75fr}
  .pos-layout{grid-template-columns:minmax(0,1fr) 320px}
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Tablet: slim icon rail keeps content wide */
@media (min-width:768px) and (max-width:900px){
  :root{--topbar-h:58px}
  .app{
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    height:100dvh;
    overflow:hidden;
  }
  .sidebar{
    position:relative;
    width:72px;
    height:100dvh;
    min-height:0;
    padding:10px 7px;
    overflow:hidden;
  }
  .sidebar-brand{justify-content:center;padding:0 0 10px}
  .sidebar-brand-copy,.nav-group-label,.nav button>span:not(.nav-icon),.sidebar-footer{display:none!important}
  .nav{
    display:flex;
    flex-direction:column;
    gap:5px;
    overflow-y:auto;
  }
  .nav-group{display:contents}
  .nav button{
    justify-content:center;
    padding:8px;
    min-height:38px;
  }
  .nav .nav-icon{width:24px;height:24px}
  .main{height:100dvh;overflow:hidden}
  .topbar{
    height:var(--topbar-h);
    position:relative;
    padding:0 14px;
  }
  .topbar-title h2{font-size:18px}
  .content-shell{
    height:calc(100dvh - var(--topbar-h));
    padding:12px 14px;
    overflow:hidden;
  }
  .page{height:100%;overflow:auto;scrollbar-width:thin}
  .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .kpi-card{min-height:88px;padding:10px}
  .kpi-card .value{font-size:17px}
  .kpi-card .sub{display:none}
  .section-grid{grid-template-columns:1fr 1fr}
  .form-grid{grid-template-columns:1fr 1fr}
  .form-grid .full{grid-column:1/-1}
  .pos-layout{grid-template-columns:minmax(0,1fr) 300px}
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .product-card{padding:9px}
  .cart{position:relative;top:auto;max-height:calc(100dvh - 135px);overflow:auto}
  .cart-list{max-height:170px}
  .table-wrap{max-height:50dvh;overflow:auto}
  .page-hero{flex-direction:row;align-items:center}
  .page-hero p{display:none}
  .employee-info-grid{grid-template-columns:repeat(4,1fr)}
  .printer-status-grid{grid-template-columns:repeat(3,1fr)}
}

/* Mobile: single compact top navigation + bottom-sheet cart */
.mobile-cart-trigger,.mobile-cart-close{display:none}

@media (max-width:767px){
  body{background:#f7f8fc}
  .app{
    display:block;
    min-height:100dvh;
  }
  .sidebar{
    position:sticky;
    top:0;
    z-index:45;
    height:auto;
    min-height:0;
    padding:7px 8px;
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .sidebar-brand{
    padding:0 4px 6px;
    gap:7px;
  }
  .brand-mark.small{width:31px;height:31px;border-radius:9px}
  .sidebar-brand-copy strong{font-size:12px}
  .sidebar-brand-copy span{display:none}
  .sidebar-footer,.nav-group-label{display:none!important}
  .nav{
    display:flex;
    flex-wrap:nowrap;
    gap:5px;
    padding:0 0 2px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
  }
  .nav::-webkit-scrollbar{display:none}
  .nav-group{display:contents}
  .nav button{
    flex:0 0 auto;
    width:auto;
    min-width:58px;
    padding:6px 8px;
    gap:5px;
    justify-content:center;
    font-size:9px;
    white-space:nowrap;
  }
  .nav .nav-icon{
    width:18px;height:18px;
  }

  .main{min-height:0}
  .topbar{
    position:sticky;
    top:78px;
    z-index:35;
    height:48px;
    padding:0 10px;
  }
  .topbar-title .eyebrow{display:none}
  .topbar-title h2{font-size:16px}
  .topbar-actions{display:flex!important}
  .topbar-actions .btn{display:none}
  .date-chip{padding:5px 7px;font-size:8px}

  .content-shell{padding:9px 9px 16px}
  .page{overflow:visible}
  .grid{gap:8px}
  .kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px;
  }
  .kpi-card{
    min-height:76px;
    padding:9px 10px;
  }
  .kpi-top{height:18px}
  .kpi-icon{width:20px;height:20px;font-size:9px}
  .kpi-accent{display:none}
  .kpi-card .label{font-size:8px;margin-top:5px}
  .kpi-card .value{font-size:16px;margin-top:2px}
  .kpi-card .sub{display:none}
  .card.pad{padding:10px}
  .page-hero{
    padding:10px 11px;
    margin-bottom:8px;
    border-radius:12px;
    flex-direction:row;
    align-items:center;
  }
  .page-hero h3{font-size:14px;margin:0}
  .page-hero .hero-kicker,.page-hero p{display:none}
  .hero-actions{margin-left:auto}
  .hero-actions .btn{padding:7px 8px;font-size:9px}
  .section-title{margin-bottom:7px}
  .section-title h3{font-size:12px}
  .toolbar{
    gap:6px;
    margin-bottom:7px;
  }
  .toolbar .left,.toolbar .right{
    width:auto;
    flex:1 1 auto;
    gap:5px;
  }
  .toolbar .left{display:grid;grid-template-columns:minmax(0,1fr) auto}
  .toolbar input,.toolbar select,.field-inline{
    width:100%;
    min-width:0;
  }
  input,select,textarea{padding:8px 9px;font-size:11px}
  .btn{padding:7px 8px;font-size:9px}
  .badge{font-size:8px}

  .section-grid{
    grid-template-columns:1fr;
    margin-top:8px;
    gap:8px;
  }
  .form-grid{grid-template-columns:1fr}
  .form-grid .full{grid-column:auto}

  /* tables scroll inside a fixed region rather than extending entire page */
  .table-wrap{
    max-height:52dvh;
    overflow:auto;
    border-radius:9px;
    scrollbar-width:thin;
  }
  table{font-size:9px}
  th,td{padding:7px 8px}
  th{position:sticky;top:0;z-index:2;font-size:8px}

  /* POS */
  .shift-banner{
    padding:8px 9px!important;
    align-items:center;
    flex-direction:row;
    gap:7px;
  }
  .shift-banner h3{font-size:11px;margin:0}
  .shift-banner p,.shift-banner .eyebrow{display:none}
  .shift-banner-actions{margin-left:auto;gap:4px}
  .shift-banner-actions .btn{padding:6px 7px;font-size:8px}
  #posPage>div[style*="height:16px"]{height:6px!important}

  .pos-layout{display:block}
  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px;
  }
  .product-card{
    padding:9px;
    min-height:78px;
  }
  .product-card .name{font-size:10px}
  .product-card .category{font-size:8px;margin:1px 0 5px}
  .product-card .price{font-size:12px}
  .product-card .meta{font-size:8px;margin-top:3px}
  .mobile-cart-trigger{display:inline-flex!important;align-items:center;gap:5px}
  .mobile-cart-trigger span{
    min-width:17px;height:17px;padding:0 4px;border-radius:99px;
    background:rgba(255,255,255,.18);display:grid;place-items:center;font-size:8px;
  }
  .mobile-cart-close{display:inline-flex!important}

  #posPage .cart{
    position:fixed;
    z-index:80;
    left:8px;right:8px;bottom:8px;
    top:auto;
    max-height:78dvh;
    overflow:auto;
    transform:translateY(calc(100% + 20px));
    opacity:0;
    visibility:hidden;
    transition:transform .2s ease,opacity .2s ease,visibility .2s;
    border-radius:16px;
    box-shadow:0 22px 70px rgba(15,23,42,.28);
  }
  #posPage .cart.mobile-open{
    transform:translateY(0);
    opacity:1;
    visibility:visible;
  }
  body.mobile-cart-open::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:70;
    background:rgba(15,23,42,.35);
    backdrop-filter:blur(2px);
  }
  .cart-list{max-height:23dvh}
  .summary{gap:5px}
  .customer-mode-box,.discount-box{padding:7px;gap:5px}
  .customer-mode-head{flex-direction:row}
  .customer-mode-actions{width:auto}
  .customer-mode-actions .btn{flex:0 0 auto}
  .discount-controls{grid-template-columns:100px 1fr}
  .summary-row.total{font-size:14px}

  /* Employee / Member / Printer */
  .employee-profile-hero{
    padding:9px 10px;
    flex-direction:row;
    align-items:center;
  }
  .employee-profile-main{gap:8px}
  .employee-profile-avatar{width:34px;height:34px}
  .employee-profile-main h3{font-size:13px;margin:0}
  .employee-profile-main p{font-size:8px}
  .employee-info-grid{grid-template-columns:repeat(2,1fr)}
  .employee-info-card strong{font-size:11px}
  .attendance-actions{grid-template-columns:1fr 1fr}
  .attendance-button{padding:11px}
  .attendance-button strong{font-size:11px}
  .attendance-button span{display:none}
  .crm-detail-kpi{grid-template-columns:repeat(2,1fr)}
  .crm-analytics-grid{grid-template-columns:1fr}
  .printer-status-grid{grid-template-columns:repeat(3,1fr)}
  .printer-status-card{padding:8px!important}
  .printer-status-icon{width:28px;height:28px}
  .printer-status-card span{display:none}
  .printer-settings-layout{grid-template-columns:1fr}

  .modal-backdrop{padding:7px;align-items:end}
  .modal{
    width:100%;
    max-height:88dvh;
    border-radius:16px 16px 10px 10px;
  }
  .modal-head{padding:10px 12px}
  .modal-body{padding:11px}
  .modal-foot{padding:9px 11px;position:sticky;bottom:0;z-index:3}
}

/* Very small phones */
@media (max-width:380px){
  .topbar{top:76px}
  .nav button{min-width:52px;padding:6px;font-size:8px}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kpi-card{padding:8px}
  .kpi-card .value{font-size:14px}
  .discount-controls{grid-template-columns:88px 1fr}
}

/* Landscape phones: maximize horizontal space */
@media (max-height:520px) and (orientation:landscape){
  .sidebar{position:relative}
  .topbar{position:relative;top:0}
  .content-shell{padding:7px 9px}
  .page-hero{display:none}
  .kpi-card{min-height:68px}
  .table-wrap{max-height:58dvh}
  #posPage .cart{max-height:92dvh}
}


/* ===== F&Biz Professional Clean Refinement ===== */
:root{
  --bg:#f4f6f9;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --surface-3:#eef2f7;
  --text:#182230;
  --text-2:#344054;
  --muted:#667085;
  --line:#e4e7ec;
  --line-strong:#d0d5dd;
  --nav:#172033;
  --nav-2:#202b45;
  --accent:#4f5bd5;
  --accent-hover:#414cc4;
  --accent-soft:#eef0ff;
  --success:#039855;
  --success-soft:#ecfdf3;
  --warning:#dc6803;
  --warning-soft:#fff6ed;
  --danger:#d92d20;
  --danger-soft:#fef3f2;
  --shadow-xs:0 1px 2px rgba(16,24,40,.04);
  --shadow-sm:0 2px 8px rgba(16,24,40,.05);
  --shadow-md:0 8px 24px rgba(16,24,40,.08);
  --radius:12px;
}

html,body{
  background:var(--bg)!important;
  color:var(--text);
}

body{
  background:
    linear-gradient(180deg,#f8fafc 0,#f4f6f9 160px,#f4f6f9 100%)!important;
}

/* Login */
.login-view{
  background:#f4f6f9!important;
}
.login-shell{
  border:1px solid #e4e7ec;
  border-radius:20px;
  box-shadow:0 20px 50px rgba(16,24,40,.10);
}
.login-brand-panel{
  background:
    radial-gradient(circle at 85% 15%,rgba(97,114,255,.20),transparent 24%),
    radial-gradient(circle at 15% 80%,rgba(28,163,127,.12),transparent 26%),
    linear-gradient(145deg,#172033 0%,#202b45 100%)!important;
}
.login-copy h1{
  font-size:42px;
  line-height:1.06;
  margin-bottom:12px;
}
.login-copy p{
  color:#b7c0d2;
  font-size:14px;
}
.system-badge{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
}
.login-card-head h2{
  font-size:28px;
}
.demo-box{
  background:#f8fafc;
  border-color:#e4e7ec;
  box-shadow:none;
}

/* Sidebar */
.sidebar{
  background:linear-gradient(180deg,#172033 0%,#111827 100%)!important;
  border-right:1px solid #202a3d;
}
.sidebar-brand{
  margin-bottom:2px;
}
.sidebar-brand-copy strong{
  letter-spacing:-.01em;
}
.nav button{
  border:1px solid transparent;
  color:#aab4c5;
  border-radius:8px;
}
.nav button:hover{
  background:#202a3d;
  border-color:#2a364d;
}
.nav button.active{
  background:#253150!important;
  border-color:#33405f;
  box-shadow:none!important;
}
.nav button.active .nav-icon{
  background:#35456b;
}
.nav-group-label{
  color:#64748b;
  font-size:8px;
  letter-spacing:.12em;
}

/* Topbar */
.topbar{
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid #e4e7ec;
  box-shadow:0 1px 0 rgba(16,24,40,.02);
}
.topbar-title h2{
  color:#101828;
  font-weight:800;
}
.date-chip{
  background:#f8fafc;
  border-color:#e4e7ec;
  box-shadow:none;
}

/* Cards and layout */
.card{
  border:1px solid #e4e7ec!important;
  border-radius:12px!important;
  box-shadow:var(--shadow-xs)!important;
}
.card:hover{
  box-shadow:var(--shadow-sm)!important;
}
.kpi-card{
  border-top-width:1px!important;
  position:relative;
}
.kpi-card::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:3px;
  border-radius:12px 0 0 12px;
  background:#4f5bd5;
}
.kpi-card:nth-child(2)::before{background:#039855}
.kpi-card:nth-child(3)::before{background:#dc6803}
.kpi-card:nth-child(4)::before{background:#d92d20}
.kpi-card .label{
  color:#667085;
  font-weight:700;
}
.kpi-card .value{
  color:#101828;
  font-weight:850;
}
.kpi-icon{
  border-radius:7px;
  background:#f2f4ff;
}
.kpi-accent{display:none}

.page-hero,
.employee-profile-hero,
.employee-admin-hero{
  background:#fff!important;
  color:var(--text)!important;
  border:1px solid #e4e7ec!important;
  box-shadow:var(--shadow-xs)!important;
  border-radius:12px!important;
}
.page-hero::after{display:none}
.page-hero h3,
.employee-profile-main h3{
  color:#101828!important;
}
.page-hero p,
.employee-profile-main p{
  color:#667085!important;
}
.hero-kicker{
  color:#4f5bd5!important;
}
.employee-profile-avatar{
  background:#eef0ff!important;
  color:#4f5bd5!important;
  border:0!important;
}

/* Buttons */
.btn{
  border-radius:8px;
  font-weight:700;
}
.btn.primary{
  background:#4f5bd5!important;
  border:1px solid #4f5bd5!important;
  box-shadow:none!important;
}
.btn.primary:hover{
  background:#414cc4!important;
}
.btn.soft{
  background:#f8fafc!important;
  color:#344054!important;
  border:1px solid #d0d5dd!important;
}
.btn.ghost{
  background:#fff;
  border:1px solid #d0d5dd;
}
.btn.success{
  background:#039855!important;
}
.btn.danger{
  background:#fef3f2!important;
  color:#b42318!important;
}

/* Inputs */
input,select,textarea{
  background:#fff!important;
  border:1px solid #d0d5dd!important;
  border-radius:8px!important;
  box-shadow:0 1px 2px rgba(16,24,40,.03);
}
input:focus,select:focus,textarea:focus{
  border-color:#8f98ff!important;
  box-shadow:0 0 0 3px rgba(79,91,213,.10)!important;
}

/* Tables */
.table-wrap{
  border:1px solid #e4e7ec!important;
  border-radius:10px!important;
  box-shadow:none!important;
}
table{
  background:#fff;
}
th{
  background:#f8fafc!important;
  color:#667085!important;
  border-bottom:1px solid #e4e7ec!important;
}
td{
  color:#344054;
}
tbody tr:hover{
  background:#fafbfc!important;
}
.table-action{
  color:#4f5bd5;
}

/* Badges */
.badge{
  border-radius:999px;
  font-weight:700;
}
.badge.info{
  background:#eef0ff!important;
  color:#4f46c7!important;
  border-color:#dde1ff!important;
}
.badge.success{
  background:#ecfdf3!important;
  color:#027a48!important;
  border-color:#abefc6!important;
}
.badge.warning{
  background:#fff6ed!important;
  color:#b54708!important;
  border-color:#fedf89!important;
}
.badge.danger{
  background:#fef3f2!important;
  color:#b42318!important;
  border-color:#fecdca!important;
}
.badge.neutral{
  background:#f2f4f7!important;
  color:#475467!important;
}

/* POS */
.product-card{
  border:1px solid #e4e7ec!important;
  box-shadow:none!important;
}
.product-card:hover{
  border-color:#cbd5e1!important;
  box-shadow:var(--shadow-sm)!important;
  transform:none!important;
}
.product-card .price{
  color:#4f5bd5!important;
}
.cart-item{
  background:#fff!important;
}
.customer-mode-box,
.discount-box{
  background:#f8fafc!important;
  border-color:#e4e7ec!important;
}
.member-selected{
  background:#f2f4ff!important;
  border-color:#dfe3ff!important;
}
.summary-row.total{
  color:#101828;
}

/* Attendance */
.attendance-button{
  background:#fff!important;
  border:1px solid #e4e7ec!important;
  box-shadow:none;
}
.attendance-button.in{border-left:3px solid #039855!important}
.attendance-button.out{border-left:3px solid #d92d20!important}
.attendance-button:hover{
  background:#f8fafc!important;
}

/* Modals */
.modal-backdrop{
  background:rgba(15,23,42,.45)!important;
}
.modal{
  border-radius:14px!important;
  border:1px solid #e4e7ec!important;
  box-shadow:0 20px 60px rgba(16,24,40,.18)!important;
}
.modal-head,.modal-foot{
  background:#fff!important;
}
.modal-foot{
  border-top:1px solid #e4e7ec!important;
}

/* Mobile */
@media(max-width:767px){
  .sidebar{
    background:#172033!important;
  }
  .topbar{
    background:#fff!important;
  }
  .page-hero,
  .employee-profile-hero{
    box-shadow:none!important;
  }
  #posPage .cart{
    border:1px solid #d0d5dd!important;
    box-shadow:0 24px 64px rgba(15,23,42,.28)!important;
  }
}

/* Cleaner micro-spacing */
.section-title h3{
  font-weight:800;
}
.mini-stat{
  background:#f8fafc!important;
}
.employee-info-card{
  background:#fff;
}
.customer-avatar,
.member-avatar{
  background:#eef0ff!important;
  color:#4f5bd5!important;
}


/* =========================================================
   F&Biz Device Specific UI
   ========================================================= */

html[data-device]{background:#f4f6f9}
html[data-device] body{min-height:100dvh}

/* LAPTOP */
html[data-device="laptop"]{--device-sidebar:232px;--device-topbar:64px}
html[data-device="laptop"] .app{display:grid;grid-template-columns:var(--device-sidebar) minmax(0,1fr);height:100dvh;overflow:hidden}
html[data-device="laptop"] .sidebar{width:var(--device-sidebar);height:100dvh;position:relative;padding:14px 11px;overflow:hidden}
html[data-device="laptop"] .nav{display:grid;gap:8px;overflow-y:auto;scrollbar-width:thin}
html[data-device="laptop"] .nav-group{display:grid;gap:3px}
html[data-device="laptop"] .nav button{min-height:35px;padding:7px 9px}
html[data-device="laptop"] .main{height:100dvh;overflow:hidden}
html[data-device="laptop"] .topbar{height:var(--device-topbar);position:relative}
html[data-device="laptop"] .content-shell{height:calc(100dvh - var(--device-topbar));overflow:hidden;padding:14px 18px}
html[data-device="laptop"] .page{height:100%;overflow:auto;scrollbar-width:thin}
html[data-device="laptop"] .product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
html[data-device="laptop"] .pos-layout{grid-template-columns:minmax(0,1fr) 340px}
html[data-device="laptop"] .table-wrap{max-height:52dvh;overflow:auto}
@media(min-width:1500px){
  html[data-device="laptop"] .product-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* TABLET */
html[data-device="tablet"]{--tablet-rail:76px;--tablet-topbar:58px}
html[data-device="tablet"] .app{display:grid;grid-template-columns:var(--tablet-rail) minmax(0,1fr);height:100dvh;overflow:hidden}
html[data-device="tablet"] .sidebar{width:var(--tablet-rail);height:100dvh;position:relative;padding:10px 7px;overflow:hidden}
html[data-device="tablet"] .sidebar-brand{justify-content:center;padding:0 0 10px}
html[data-device="tablet"] .sidebar-brand-copy,
html[data-device="tablet"] .nav-group-label,
html[data-device="tablet"] .nav-label,
html[data-device="tablet"] .sidebar-footer{display:none!important}
html[data-device="tablet"] .nav{display:flex;flex-direction:column;gap:5px;overflow-y:auto;scrollbar-width:none}
html[data-device="tablet"] .nav-group{display:contents}
html[data-device="tablet"] .nav button{min-height:42px;padding:8px;justify-content:center}
html[data-device="tablet"] .nav .nav-icon{width:27px;height:27px;font-size:12px}
html[data-device="tablet"] .main{height:100dvh;overflow:hidden}
html[data-device="tablet"] .topbar{height:var(--tablet-topbar);padding:0 14px}
html[data-device="tablet"] .content-shell{height:calc(100dvh - var(--tablet-topbar));overflow:hidden;padding:12px 14px}
html[data-device="tablet"] .page{height:100%;overflow:auto}
html[data-device="tablet"] .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
html[data-device="tablet"] .kpi-card{min-height:86px;padding:10px}
html[data-device="tablet"] .kpi-card .sub{display:none}
html[data-device="tablet"] .section-grid{grid-template-columns:1fr 1fr}
html[data-device="tablet"] .form-grid{grid-template-columns:1fr 1fr}
html[data-device="tablet"] .form-grid .full{grid-column:1/-1}
html[data-device="tablet"] .pos-layout{grid-template-columns:minmax(0,1fr) 300px}
html[data-device="tablet"] .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-device="tablet"] .cart{position:relative;top:auto;max-height:calc(100dvh - 130px);overflow:auto}
html[data-device="tablet"] .table-wrap{max-height:54dvh;overflow:auto}

/* ANDROID */
html[data-device="android"]{--android-topbar:54px;--android-nav:64px}
html[data-device="android"] body{background:#f5f7fb!important;padding-bottom:calc(var(--android-nav) + 8px)}
html[data-device="android"] .app{display:block;min-height:100dvh}
html[data-device="android"] .sidebar{
  position:fixed;z-index:60;left:0;right:0;bottom:0;top:auto;
  height:var(--android-nav);min-height:0;padding:5px 6px;
  background:#fff!important;border-top:1px solid #e4e7ec;border-right:0;
  box-shadow:0 -4px 18px rgba(16,24,40,.08)
}
html[data-device="android"] .sidebar-brand,
html[data-device="android"] .sidebar-footer,
html[data-device="android"] .nav-group-label{display:none!important}
html[data-device="android"] .nav{height:100%;display:flex;flex-wrap:nowrap;gap:2px;padding:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
html[data-device="android"] .nav::-webkit-scrollbar{display:none}
html[data-device="android"] .nav-group{display:contents}
html[data-device="android"] .nav button{
  flex:1 0 60px;min-width:60px;max-width:84px;height:54px;padding:5px 4px;
  display:flex;flex-direction:column;justify-content:center;gap:2px;
  color:#667085;background:transparent;border:0
}
html[data-device="android"] .nav button.active{color:#4f5bd5;background:#f1f2ff!important;border-radius:10px}
html[data-device="android"] .nav .nav-icon{width:22px;height:22px;background:transparent!important;color:inherit!important}
html[data-device="android"] .nav-label{font-size:0}
html[data-device="android"] .nav-label::after{content:attr(data-short);font-size:8px}
html[data-device="android"] .topbar{position:sticky;z-index:45;top:0;height:var(--android-topbar);padding:0 12px;background:#fff!important}
html[data-device="android"] .topbar-title .eyebrow{display:none}
html[data-device="android"] .topbar-title h2{font-size:17px}
html[data-device="android"] .topbar-actions{display:flex!important}
html[data-device="android"] .topbar-actions .btn{display:none}
html[data-device="android"] .date-chip{font-size:8px;padding:5px 7px}
html[data-device="android"] .content-shell{padding:9px 9px 14px}
html[data-device="android"] .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
html[data-device="android"] .kpi-card{min-height:76px;padding:9px 10px}
html[data-device="android"] .kpi-card .sub{display:none}
html[data-device="android"] .page-hero{padding:10px 11px;margin-bottom:8px}
html[data-device="android"] .page-hero .hero-kicker,
html[data-device="android"] .page-hero p{display:none}
html[data-device="android"] .page-hero h3{font-size:14px;margin:0}
html[data-device="android"] .section-grid,
html[data-device="android"] .form-grid{grid-template-columns:1fr}
html[data-device="android"] .form-grid .full{grid-column:auto}
html[data-device="android"] .table-wrap{max-height:52dvh;overflow:auto}
html[data-device="android"] th{position:sticky;top:0;z-index:3}
html[data-device="android"] .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
html[data-device="android"] .product-card{min-height:80px;padding:9px}
html[data-device="android"] .mobile-cart-trigger,
html[data-device="android"] .mobile-cart-close{display:inline-flex!important}
html[data-device="android"] #posPage .cart{
  position:fixed;z-index:80;left:8px;right:8px;bottom:calc(var(--android-nav) + 7px);top:auto;
  max-height:72dvh;overflow:auto;transform:translateY(calc(100% + 90px));
  opacity:0;visibility:hidden;transition:.2s ease;border-radius:16px
}
html[data-device="android"] #posPage .cart.mobile-open{transform:translateY(0);opacity:1;visibility:visible}
html[data-device="android"] .modal-backdrop{padding:8px;align-items:end}
html[data-device="android"] .modal{width:100%;max-height:86dvh;border-radius:16px 16px 10px 10px!important}
html[data-device="android"] .login-view{padding:0;min-height:100dvh}
html[data-device="android"] .login-shell{display:block;min-height:100dvh;border:0;border-radius:0}
html[data-device="android"] .login-brand-panel{display:none}
html[data-device="android"] .login-card-wrap{min-height:100dvh;padding:24px 20px}

/* IPHONE */
html[data-device="iphone"]{--iphone-topbar:50px;--iphone-nav:64px;background:#f5f5f7}
html[data-device="iphone"] body{
  background:#f5f5f7!important;
  padding:env(safe-area-inset-top) 0 calc(var(--iphone-nav) + env(safe-area-inset-bottom) + 10px) 0
}
html[data-device="iphone"] .app{display:block;min-height:100dvh}
html[data-device="iphone"] .sidebar{
  position:fixed;z-index:70;left:10px;right:10px;bottom:max(8px,env(safe-area-inset-bottom));top:auto;
  height:var(--iphone-nav);min-height:0;padding:5px 7px;
  background:rgba(255,255,255,.94)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  border:1px solid rgba(208,213,221,.85);border-radius:18px;
  box-shadow:0 8px 28px rgba(16,24,40,.13)
}
html[data-device="iphone"] .sidebar-brand,
html[data-device="iphone"] .sidebar-footer,
html[data-device="iphone"] .nav-group-label{display:none!important}
html[data-device="iphone"] .nav{height:100%;display:flex;flex-wrap:nowrap;gap:2px;padding:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
html[data-device="iphone"] .nav::-webkit-scrollbar{display:none}
html[data-device="iphone"] .nav-group{display:contents}
html[data-device="iphone"] .nav button{
  flex:1 0 58px;min-width:58px;max-width:78px;height:52px;padding:5px 3px;
  flex-direction:column;justify-content:center;gap:2px;color:#7b8496;
  background:transparent!important;border:0!important;border-radius:12px
}
html[data-device="iphone"] .nav button.active{color:#4f5bd5;background:#f0f1ff!important;box-shadow:none!important}
html[data-device="iphone"] .nav .nav-icon{width:22px;height:22px;background:transparent!important;color:inherit!important}
html[data-device="iphone"] .nav-label{font-size:0}
html[data-device="iphone"] .nav-label::after{content:attr(data-short);font-size:8px}
html[data-device="iphone"] .topbar{
  position:sticky;top:env(safe-area-inset-top);z-index:50;height:var(--iphone-topbar);padding:0 12px;
  background:rgba(245,245,247,.88)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(208,213,221,.65)
}
html[data-device="iphone"] .topbar-title{width:100%;text-align:center}
html[data-device="iphone"] .topbar-title .eyebrow{display:none}
html[data-device="iphone"] .topbar-title h2{font-size:16px;font-weight:800}
html[data-device="iphone"] .topbar-actions{display:none!important}
html[data-device="iphone"] .content-shell{padding:8px 10px 12px}
html[data-device="iphone"] .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
html[data-device="iphone"] .kpi-card{min-height:72px;padding:8px 9px;border-radius:13px!important}
html[data-device="iphone"] .kpi-card .sub{display:none}
html[data-device="iphone"] .page-hero{padding:9px 10px;margin-bottom:7px;border-radius:13px!important}
html[data-device="iphone"] .page-hero .hero-kicker,
html[data-device="iphone"] .page-hero p{display:none}
html[data-device="iphone"] .page-hero h3{margin:0;font-size:14px}
html[data-device="iphone"] .section-grid,
html[data-device="iphone"] .form-grid{grid-template-columns:1fr}
html[data-device="iphone"] .form-grid .full{grid-column:auto}
html[data-device="iphone"] input,
html[data-device="iphone"] select,
html[data-device="iphone"] textarea{min-height:42px;font-size:16px;border-radius:10px!important}
html[data-device="iphone"] .btn{min-height:38px;border-radius:10px}
html[data-device="iphone"] .table-wrap{max-height:50dvh;overflow:auto;-webkit-overflow-scrolling:touch}
html[data-device="iphone"] th{position:sticky;top:0;z-index:3}
html[data-device="iphone"] .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}
html[data-device="iphone"] .product-card{min-height:78px;padding:9px;border-radius:13px!important}
html[data-device="iphone"] .mobile-cart-trigger,
html[data-device="iphone"] .mobile-cart-close{display:inline-flex!important}
html[data-device="iphone"] #posPage .cart{
  position:fixed;z-index:90;left:8px;right:8px;
  bottom:calc(var(--iphone-nav) + env(safe-area-inset-bottom) + 14px);top:auto;
  max-height:70dvh;overflow:auto;transform:translateY(calc(100% + 100px));
  opacity:0;visibility:hidden;transition:.22s ease;border-radius:20px!important;
  box-shadow:0 20px 60px rgba(16,24,40,.22)!important
}
html[data-device="iphone"] #posPage .cart.mobile-open{transform:translateY(0);opacity:1;visibility:visible}
html[data-device="iphone"] .modal-backdrop{padding:0;align-items:end}
html[data-device="iphone"] .modal{width:100%;max-height:84dvh;border-radius:20px 20px 0 0!important;padding-bottom:env(safe-area-inset-bottom)}
html[data-device="iphone"] .modal-foot{padding-bottom:max(11px,env(safe-area-inset-bottom))}
html[data-device="iphone"] .login-view{padding:0;min-height:100dvh;background:#f5f5f7!important}
html[data-device="iphone"] .login-shell{display:block;min-height:100dvh;background:#f5f5f7;border:0;border-radius:0;box-shadow:none}
html[data-device="iphone"] .login-brand-panel{display:none}
html[data-device="iphone"] .login-card-wrap{min-height:100dvh;padding:calc(32px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom))}
html[data-device="iphone"] .login-card{background:#fff;padding:22px;border-radius:20px;box-shadow:0 10px 36px rgba(16,24,40,.08)}

/* Shared phones */
html[data-device="android"] .employee-info-grid,
html[data-device="iphone"] .employee-info-grid{grid-template-columns:repeat(2,1fr)!important}
html[data-device="android"] .attendance-actions,
html[data-device="iphone"] .attendance-actions{grid-template-columns:1fr 1fr!important}
html[data-device="android"] .attendance-button span,
html[data-device="iphone"] .attendance-button span{display:none}
html[data-device="android"] .printer-status-grid,
html[data-device="iphone"] .printer-status-grid{grid-template-columns:repeat(3,1fr)!important}
html[data-device="android"] .printer-status-card span,
html[data-device="iphone"] .printer-status-card span{display:none}

@media(max-height:520px) and (orientation:landscape){
  html[data-device="android"] .topbar,
  html[data-device="iphone"] .topbar{position:relative;top:0}
  html[data-device="android"] .page-hero,
  html[data-device="iphone"] .page-hero{display:none}
  html[data-device="android"] #posPage .cart,
  html[data-device="iphone"] #posPage .cart{max-height:88dvh}
}


/* ===== Enhanced Cash Payment ===== */
.cash-payment-box{
  display:grid;
  gap:10px;
  padding:11px;
  border:1px solid #e4e7ec;
  border-radius:12px;
  background:#fff;
}
.cash-payment-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.cash-payment-title span{
  font-size:10px;
  font-weight:800;
  color:#667085;
}
.cash-payment-title strong{
  font-size:12px;
  color:#101828;
}
.cash-choice-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.cash-choice{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 11px;
  border:1px solid #d0d5dd;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  transition:.15s ease;
}
.cash-choice:hover{
  border-color:#a7aff7;
}
.cash-choice.selected{
  border-color:#6974e8;
  background:#f2f3ff;
  box-shadow:0 0 0 2px rgba(79,91,213,.08);
}
.cash-choice input{
  width:15px!important;
  height:15px!important;
  min-height:0!important;
  accent-color:#4f5bd5;
  padding:0!important;
  box-shadow:none!important;
}
.cash-choice span{
  display:grid;
  gap:2px;
}
.cash-choice strong{
  font-size:10px;
  color:#101828;
}
.cash-choice small{
  font-size:9px;
  color:#667085;
}
.cash-other-wrap{
  display:grid;
  gap:7px;
}
.cash-input-wrap{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:7px;
  border:1px solid #d0d5dd;
  border-radius:9px;
  padding-left:10px;
  background:#fff;
}
.cash-input-wrap span{
  font-size:11px;
  font-weight:800;
  color:#667085;
}
.cash-input-wrap input{
  border:0!important;
  box-shadow:none!important;
  padding-left:0!important;
}
.cash-quick-row{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.cash-quick-btn{
  border:1px solid #d0d5dd;
  background:#f8fafc;
  color:#344054;
  border-radius:8px;
  padding:6px 8px;
  font-size:9px;
  font-weight:700;
}
.cash-quick-btn:hover{
  border-color:#9da6ee;
  color:#4f5bd5;
}
.cash-change-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 11px;
  border-radius:10px;
  border:1px solid #abefc6;
  background:#ecfdf3;
}
.cash-change-box>div{
  display:grid;
  gap:2px;
}
.cash-change-box span{
  font-size:9px;
  font-weight:800;
  color:#475467;
}
.cash-change-box small{
  font-size:8px;
  color:#667085;
}
.cash-change-box strong{
  font-size:17px;
  color:#027a48;
}
.cash-change-box.insufficient{
  border-color:#fecdca;
  background:#fef3f2;
}
.cash-change-box.insufficient strong{
  color:#b42318;
}
.cash-change-box.insufficient small{
  color:#b42318;
}

/* Mobile payment layout */
html[data-device="android"] .cash-payment-box,
html[data-device="iphone"] .cash-payment-box{
  padding:9px;
}
html[data-device="android"] .cash-choice,
html[data-device="iphone"] .cash-choice{
  min-height:52px;
  padding:8px 9px;
}
html[data-device="android"] .cash-change-box,
html[data-device="iphone"] .cash-change-box{
  position:sticky;
  bottom:0;
  z-index:2;
}
@media(max-width:380px){
  .cash-choice-row{grid-template-columns:1fr}
}


/* Payment FIX */
#paymentHint.payment-hint{
  display:block;
  width:100%;
}
#paymentHint.payment-hint.hidden{
  display:none!important;
}
.cash-payment-box{
  visibility:visible!important;
  opacity:1!important;
}


/* ===== F&Biz Employee Portal ===== */
body.employee-portal{
  --nav:#17324d;
}
body.employee-portal .sidebar{
  background:linear-gradient(180deg,#17324d,#10263b)!important;
}
body.employee-portal .sidebar-brand .brand-mark{
  color:#17324d;
}
body.employee-portal .topbar-actions #seedResetBtn{
  display:none!important;
}
body.employee-portal .content-shell{
  max-width:1280px;
}

.employee-portal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px 16px;
  margin-bottom:12px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
}
.employee-portal-head h3{
  margin:3px 0 2px;
  font-size:18px;
}
.employee-portal-head p{
  margin:0;
  font-size:10px;
  color:var(--muted);
}
.employee-date-pill{
  padding:8px 10px;
  background:#eef4ff;
  color:#315fa6;
  border-radius:9px;
  font-size:10px;
  font-weight:800;
}
.employee-attendance-kpi{
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:12px;
}
.employee-att-kpi span,.employee-att-kpi strong{
  display:block;
}
.employee-att-kpi span{
  font-size:9px;
  color:var(--muted);
  font-weight:700;
}
.employee-att-kpi strong{
  margin-top:4px;
  font-size:15px;
}
.employee-attendance-layout{
  grid-template-columns:1.35fr .65fr;
}
.employee-clock-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.employee-clock-btn{
  min-height:110px;
  display:grid;
  place-items:center;
  align-content:center;
  gap:5px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.employee-clock-btn.clockin{
  border-color:#b7e4cf;
  background:#f3fbf7;
}
.employee-clock-btn.clockout{
  border-color:#f3c3c0;
  background:#fff7f6;
}
.employee-clock-btn:disabled{
  filter:grayscale(.3);
}
.employee-clock-icon{
  width:34px;height:34px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:#fff;
  font-size:16px;
}
.employee-clock-btn strong{font-size:13px}
.employee-clock-btn small{font-size:9px;color:var(--muted)}
.attendance-proof-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:10px;
}
.attendance-proof-card{
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  background:#f8fafc;
}
.attendance-proof-card>span{
  display:block;
  padding:7px 9px;
  font-size:9px;
  font-weight:800;
  color:var(--muted);
}
.attendance-proof-card img{
  width:100%;
  height:130px;
  object-fit:cover;
  display:block;
}
.proof-empty{
  height:90px;
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:9px;
}
.attendance-capture{
  display:grid;
  gap:10px;
}
.attendance-photo-preview{
  min-height:260px;
  border:1px dashed #b8c3d2;
  border-radius:12px;
  background:#f8fafc;
  overflow:hidden;
  display:grid;
  place-items:center;
}
.attendance-photo-preview img{
  width:100%;
  max-height:360px;
  object-fit:contain;
  background:#111827;
}
.camera-placeholder{
  text-align:center;
  display:grid;
  gap:4px;
  color:var(--muted);
}
.camera-placeholder strong{font-size:12px;color:var(--text)}
.camera-placeholder span{font-size:10px}
.camera-upload-btn{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:44px;
  border-radius:10px;
  background:#eef4ff;
  color:#315fa6;
  cursor:pointer;
}
.camera-upload-btn input{display:none}
.camera-upload-btn span{font-size:11px;font-weight:800}
.attendance-capture-time{
  text-align:center;
  color:var(--muted);
  font-size:9px;
}
.attendance-thumb-row{
  display:flex;
  gap:5px;
}
.photo-thumb-btn{
  width:34px;height:34px;
  padding:0;
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden;
  background:#fff;
}
.photo-thumb-btn img{
  width:100%;height:100%;object-fit:cover;
}
.attendance-photo-view{
  display:grid;
  gap:8px;
}
.attendance-photo-view img{
  width:100%;
  max-height:65dvh;
  object-fit:contain;
  border-radius:10px;
  background:#111827;
}
.attendance-photo-view span{
  text-align:center;
  font-size:10px;
  color:var(--muted);
}

.employee-profile-grid{
  grid-template-columns:1fr 1fr;
}
.employee-profile-list{
  display:grid;
  gap:0;
}
.employee-profile-list>div{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:10px;
  padding:9px 0;
  border-bottom:1px solid #edf0f4;
}
.employee-profile-list>div:last-child{border-bottom:0}
.employee-profile-list span{
  color:var(--muted);
  font-size:9px;
}
.employee-profile-list strong{
  font-size:10px;
  font-weight:750;
}
.employee-password-card{
  max-width:520px;
}
.employee-role-fixed{
  display:grid;
  gap:4px;
  padding:9px 10px;
  border:1px solid #dbe6f4;
  background:#f6f9fe;
  border-radius:9px;
}
.employee-role-fixed span{
  font-size:9px;color:var(--muted);font-weight:700;
}
.employee-role-fixed strong{
  font-size:10px;color:#315788;
}
.leave-attachment-preview img{
  width:100%;
  max-height:220px;
  object-fit:contain;
  border-radius:9px;
  background:#f8fafc;
}
.inline-actions{
  display:flex;
  gap:5px;
  align-items:center;
  flex-wrap:wrap;
}
.admin-employee-detail{
  display:grid;
  gap:12px;
}
.admin-employee-header{
  display:flex;
  align-items:center;
  gap:10px;
}
.admin-employee-header h3{
  margin:0 0 3px;
}
.admin-employee-header span{
  color:var(--muted);
  font-size:9px;
}
.admin-employee-kpi{
  grid-template-columns:repeat(4,1fr);
}
.admin-employee-tabs{
  display:grid;
  grid-template-columns:.85fr 1.15fr;
  gap:10px;
}

/* Employee portal mobile */
@media(max-width:900px){
  body.employee-portal .sidebar{
    background:#17324d!important;
  }
  .employee-attendance-kpi{
    grid-template-columns:repeat(2,1fr)!important;
  }
  .employee-attendance-layout,
  .employee-profile-grid,
  .admin-employee-tabs{
    grid-template-columns:1fr!important;
  }
  .admin-employee-kpi{
    grid-template-columns:repeat(2,1fr)!important;
  }
}
@media(max-width:767px){
  body.employee-portal .nav button{
    min-width:72px!important;
  }
  .employee-portal-head{
    padding:10px 11px;
  }
  .employee-portal-head h3{font-size:15px}
  .employee-portal-head p{display:none}
  .employee-clock-actions{
    grid-template-columns:1fr 1fr;
  }
  .employee-clock-btn{
    min-height:92px;
  }
  .attendance-proof-card img{
    height:105px;
  }
  .employee-profile-list>div{
    grid-template-columns:100px 1fr;
  }
}


/* ===== Attendance Export Filters ===== */
.attendance-export-card{
  margin-bottom:12px;
}
.attendance-export-filters{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr)) auto;
  gap:9px;
  align-items:end;
}
.attendance-export-filters label{
  min-width:0;
}
.attendance-export-actions{
  display:flex;
  gap:6px;
  align-items:center;
  padding-bottom:1px;
}
.attendance-export-actions .btn{
  white-space:nowrap;
}
@media(max-width:1250px){
  .attendance-export-filters{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .attendance-export-actions{
    grid-column:1/-1;
    justify-content:flex-end;
  }
}
@media(max-width:767px){
  .attendance-export-filters{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .attendance-export-filters label:nth-child(3),
  .attendance-export-filters label:nth-child(4){
    grid-column:auto;
  }
  .attendance-export-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .attendance-export-actions .btn{
    width:100%;
  }
}
@media(max-width:420px){
  .attendance-export-filters{
    grid-template-columns:1fr;
  }
  .attendance-export-actions{
    grid-template-columns:1fr;
  }
}


/* ===== Responsive Modal / Popup Safety Fix ===== */
.modal-backdrop{
  position:fixed!important;
  inset:0!important;
  z-index:999!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:16px!important;
  overflow:hidden!important;
  background:rgba(15,23,42,.48)!important;
}

.modal{
  width:min(760px,calc(100vw - 32px))!important;
  max-width:760px!important;
  max-height:calc(100dvh - 32px)!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  overflow:hidden!important;
  background:#fff!important;
  border-radius:14px!important;
}

.modal-head{
  position:relative!important;
  z-index:3!important;
  flex:0 0 auto!important;
  padding:12px 14px!important;
  border-bottom:1px solid var(--line)!important;
  background:#fff!important;
}

.modal-body{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  padding:14px!important;
}

.modal-foot{
  position:sticky!important;
  bottom:0!important;
  z-index:4!important;
  flex:0 0 auto!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  padding:11px 14px!important;
  border-top:1px solid var(--line)!important;
  background:#fff!important;
}

.modal-foot .btn{
  flex:0 0 auto!important;
  min-width:88px!important;
}

.modal .form-grid{
  min-width:0!important;
}

.modal .table-wrap{
  max-height:42dvh!important;
  overflow:auto!important;
}

/* Medium tablet */
@media(max-width:900px){
  .modal-backdrop{
    padding:10px!important;
  }
  .modal{
    width:min(720px,calc(100vw - 20px))!important;
    max-height:calc(100dvh - 20px)!important;
  }
  .modal-body{
    padding:12px!important;
  }
  .modal-foot{
    padding:10px 12px!important;
  }
}

/* Android phones */
html[data-device="android"] .modal-backdrop{
  align-items:flex-end!important;
  padding:8px!important;
  padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
}
html[data-device="android"] .modal{
  width:100%!important;
  max-width:none!important;
  max-height:calc(100dvh - 16px - env(safe-area-inset-bottom))!important;
  border-radius:16px 16px 10px 10px!important;
}
html[data-device="android"] .modal-head{
  padding:11px 12px!important;
}
html[data-device="android"] .modal-body{
  padding:11px!important;
  max-height:none!important;
}
html[data-device="android"] .modal-foot{
  position:sticky!important;
  bottom:0!important;
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important;
  gap:7px!important;
  padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
}
html[data-device="android"] .modal-foot .btn{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
}

/* iPhone */
html[data-device="iphone"] .modal-backdrop{
  align-items:flex-end!important;
  padding:0!important;
}
html[data-device="iphone"] .modal{
  width:100%!important;
  max-width:none!important;
  max-height:calc(100dvh - env(safe-area-inset-top))!important;
  border-radius:20px 20px 0 0!important;
  padding-bottom:0!important;
}
html[data-device="iphone"] .modal-head{
  padding:12px 14px!important;
  padding-top:max(12px,env(safe-area-inset-top))!important;
}
html[data-device="iphone"] .modal-body{
  padding:12px!important;
  max-height:none!important;
}
html[data-device="iphone"] .modal-foot{
  position:sticky!important;
  bottom:0!important;
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important;
  gap:7px!important;
  padding:9px 10px calc(10px + env(safe-area-inset-bottom))!important;
  background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(14px)!important;
  -webkit-backdrop-filter:blur(14px)!important;
}
html[data-device="iphone"] .modal-foot .btn{
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
}

/* Very small phones: stack actions so none disappear */
@media(max-width:420px){
  .modal-backdrop{
    padding:6px!important;
  }
  .modal{
    width:100%!important;
    max-height:calc(100dvh - 12px)!important;
  }
  .modal-foot{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .modal-foot .btn{
    width:100%!important;
    min-width:0!important;
  }
  .modal .form-grid{
    grid-template-columns:1fr!important;
  }
  .modal .form-grid .full{
    grid-column:auto!important;
  }
}

/* Landscape phones */
@media(max-height:520px) and (orientation:landscape){
  .modal-backdrop{
    align-items:center!important;
    padding:6px!important;
  }
  .modal{
    max-height:calc(100dvh - 12px)!important;
    border-radius:12px!important;
  }
  .modal-head{
    padding:8px 10px!important;
  }
  .modal-body{
    padding:9px 10px!important;
  }
  .modal-foot{
    padding:7px 10px!important;
    display:flex!important;
    flex-wrap:wrap!important;
  }
  .modal-foot .btn{
    min-height:34px!important;
  }
}


/* ===== Detailed Sales Report Download ===== */
.report-download-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:flex-end;
}
.report-detail-title-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
@media(max-width:1100px){
  .report-filter .toolbar{
    align-items:flex-end;
  }
  .report-download-actions{
    width:100%;
    justify-content:flex-start;
  }
}
@media(max-width:767px){
  .report-filter .toolbar .left{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:100%!important;
  }
  .report-filter .toolbar .left label:nth-child(3){
    grid-column:1/-1;
  }
  .report-filter .report-apply{
    grid-column:1/-1;
    width:100%;
  }
  .report-download-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .report-download-actions .btn{
    width:100%;
  }
}
@media(max-width:420px){
  .report-filter .toolbar .left,
  .report-download-actions{
    grid-template-columns:1fr!important;
  }
}


/* ===== F&Biz Online / Cloud Status ===== */
.cloud-status{
  display:flex;
  align-items:center;
  gap:7px;
  width:max-content;
  padding:7px 9px;
  border:1px solid #d0d5dd;
  border-radius:9px;
  background:#f8fafc;
  color:#475467;
  font-size:9px;
  margin:14px 0 0;
}
.cloud-status span{
  width:7px;height:7px;border-radius:50%;
  background:#98a2b3;
}
.cloud-status strong{font-size:9px}
.cloud-status.connecting span,.cloud-status.syncing span{
  background:#f79009;
  box-shadow:0 0 0 3px rgba(247,144,9,.12);
}
.cloud-status.online{
  background:#ecfdf3;
  border-color:#abefc6;
  color:#027a48;
}
.cloud-status.online span{
  background:#12b76a;
  box-shadow:0 0 0 3px rgba(18,183,106,.12);
}
.cloud-status.offline{
  background:#fef3f2;
  border-color:#fecdca;
  color:#b42318;
}
.cloud-status.offline span{
  background:#f04438;
  box-shadow:0 0 0 3px rgba(240,68,56,.12);
}
.cloud-status.compact{
  margin:0;
  padding:5px 7px;
}
@media(max-width:767px){
  #cloudStatusTop{display:none!important}
  .cloud-status{margin-top:10px}
}


/* ===== Dual Receipt: Customer + Production ===== */
.receipt-bundle{
  display:grid;
  gap:14px;
  justify-items:center;
}
.receipt-print-block{
  width:100%;
}
.receipt-copy-title{
  width:max-content;
  margin:0 auto 6px;
  padding:4px 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#4652bd;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}
.receipt-copy-title.production-label{
  background:#fff4e5;
  color:#a15c00;
}
.receipt-separator{
  width:min(100%,80mm);
  text-align:center;
  color:#98a2b3;
  border-top:1px dashed #cfd4dc;
  padding-top:8px;
  font-size:8px;
}
.production-receipt{
  border:1px dashed #d0d5dd;
  padding:8px;
  box-sizing:border-box;
}
.customer-receipt{
  border:1px solid #eaecf0;
  padding:8px;
  box-sizing:border-box;
}
.production-queue strong{
  font-size:34px!important;
}
.production-items{
  display:grid;
  gap:7px;
}
.production-order-item{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:5px;
  align-items:start;
  padding:5px 0;
  border-bottom:1px dotted #ccc;
  font-size:13px;
}
.production-order-item strong{
  font-size:17px;
}
.production-order-item span{
  font-weight:900;
}
.production-note{
  font-size:9px;
  font-weight:800;
  margin-top:7px;
}
.printer-output-box{
  padding:10px;
  border:1px solid #e4e7ec;
  border-radius:10px;
  background:#f8fafc;
}
.printer-output-box>strong{
  display:block;
  font-size:10px;
  margin-bottom:7px;
}

/* More reliable system print for two separate thermal slips */
@media print{
  body.printing-receipt #printReceiptArea{
    width:auto!important;
    max-width:none!important;
  }
  body.printing-receipt .receipt-copy-title,
  body.printing-receipt .receipt-separator{
    display:none!important;
  }
  body.printing-receipt .receipt-print-block{
    visibility:visible!important;
  }
  body.printing-receipt[data-print-receipt-kind="customer"] .production-print-block{
    display:none!important;
  }
  body.printing-receipt[data-print-receipt-kind="production"] .customer-print-block{
    display:none!important;
  }
  body.printing-receipt[data-print-receipt-kind="both"] .customer-print-block{
    break-after:page;
    page-break-after:always;
  }
  body.printing-receipt .customer-receipt,
  body.printing-receipt .production-receipt{
    border:0!important;
    margin:0!important;
  }
}

@media(max-width:767px){
  .production-order-item{
    grid-template-columns:34px 1fr;
  }
}


/* ===== Subscription ===== */
.subscription-status{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;padding:9px 10px;border:1px solid #e4e7ec;background:#f8fafc;border-radius:10px}
.subscription-status>div{display:grid;gap:2px}.subscription-status strong{font-size:10px}.subscription-status span{font-size:9px;color:#667085}.subscription-status>b{font-size:9px;padding:4px 7px;border-radius:999px;background:#eef2ff;color:#4652bd}
.subscription-status.ok{border-color:#abefc6;background:#f6fef9}.subscription-status.blocked{border-color:#fecdca;background:#fef3f2}.subscription-status.blocked span,.subscription-status.blocked strong{color:#b42318}
.subscription-top{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:0 8px;border-radius:8px;border:1px solid #e4e7ec;background:#fff;font-size:9px}.subscription-top>span{width:6px;height:6px;border-radius:50%;background:#12b76a}.subscription-top.blocked>span{background:#f04438}.subscription-top strong{font-size:9px}
.subscription-admin-strip{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;padding:11px 13px;border:1px solid #abefc6;background:#f6fef9;border-radius:11px}.subscription-admin-strip.blocked{border-color:#fecdca;background:#fef3f2}
.subscription-admin-strip>div:first-child{display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 8px}.subscription-admin-strip span{font-size:9px;color:#667085}.subscription-admin-strip strong{font-size:12px}.subscription-admin-strip small{grid-column:1/-1;font-size:9px;color:#667085}
.subscription-usage-mini{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.subscription-usage-mini span{padding:5px 7px;border-radius:7px;background:#fff;border:1px solid #e4e7ec;color:#344054;font-weight:750}
@media(max-width:767px){#subscriptionBadgeTop{display:none!important}.subscription-admin-strip{align-items:flex-start;flex-direction:column}.subscription-usage-mini{justify-content:flex-start}}


/* ===== SaaS Company Login ===== */
.login-step-badge{
  display:inline-flex;
  margin:10px 0 9px;
  padding:4px 7px;
  border-radius:999px;
  background:#eef2ff;
  color:#4652bd;
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
}
.login-help{
  margin-top:9px;
  font-size:9px;
  line-height:1.5;
  color:#667085;
}
.selected-company-card{
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px;
  margin-bottom:8px;
  border:1px solid #dbe4f0;
  border-radius:10px;
  background:#f8fafc;
}
.company-login-icon{
  width:36px;height:36px;
  border-radius:9px;
  background:#172033;
  color:#fff;
  display:grid;
  place-items:center;
  font-size:14px;
  font-weight:900;
  text-transform:uppercase;
}
.selected-company-card>div:last-child{
  display:grid;
  gap:1px;
}
.selected-company-card span,
.selected-company-card small{
  font-size:8px;
  color:#667085;
}
.selected-company-card strong{
  font-size:11px;
  color:#182230;
}
#companyCode{
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:800;
}


/* ===== Master Branch / Outlet ===== */
.branch-action-cell{
  white-space:nowrap;
}
.branch-action-cell .btn{
  min-height:30px;
  padding:0 8px;
  font-size:9px;
  margin:1px;
}
.branch-form-note{
  padding:9px 10px;
  border:1px solid #e4e7ec;
  border-radius:9px;
  background:#f8fafc;
  color:#667085;
  font-size:10px;
  line-height:1.5;
}
#branchForm textarea{
  min-height:76px;
  resize:vertical;
}
@media(max-width:767px){
  .branch-action-cell{
    white-space:normal;
    min-width:175px;
  }
}


/* ===== Transaction Delete / Audit ===== */
.trx-actions{white-space:nowrap}
.trx-actions .btn{min-height:30px;padding:0 8px;font-size:9px;margin:1px}
.delete-trx-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border:1px solid #e4e7ec;border-radius:10px;background:#f8fafc}
.delete-trx-summary>div{display:grid;gap:2px}
.delete-trx-summary span{font-size:9px;color:#667085}
.delete-trx-summary strong{font-size:11px}
.delete-trx-warning{margin-top:10px;padding:9px 10px;border:1px solid #fedf89;border-radius:9px;background:#fffaeb;color:#93370d;font-size:10px;line-height:1.5}
.delete-trx-note{padding:9px 10px;border:1px solid #fecdca;border-radius:9px;background:#fef3f2;color:#b42318;font-size:10px;line-height:1.5}
.required-mark{color:#d92d20}
#deleteTransactionReason{min-height:90px;resize:vertical}
.deletion-log-table table{min-width:760px}
.deletion-reason{white-space:normal;min-width:220px;max-width:360px}
@media(max-width:767px){
  .delete-trx-summary{grid-template-columns:1fr}
  .trx-actions{white-space:normal;min-width:125px}
}


/* ===== Persistent Refresh Boot ===== */
.boot-view{
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  background:#f4f6f9;
  padding:20px;
}
.boot-view.hidden{display:none!important}
.boot-card{
  min-width:min(390px,calc(100vw - 36px));
  display:grid;
  grid-template-columns:52px 1fr 24px;
  align-items:center;
  gap:13px;
  padding:18px;
  border:1px solid #e4e7ec;
  border-radius:16px;
  background:#fff;
  box-shadow:0 16px 42px rgba(16,24,40,.08);
}
.boot-brand-mark{
  width:52px;height:52px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:#172033;
  color:#fff;
  font-size:17px;
  font-weight:900;
}
.boot-copy{display:grid;gap:4px}
.boot-copy strong{font-size:14px}
.boot-copy span{font-size:10px;color:#667085}
.boot-spinner{
  width:20px;height:20px;
  border:2px solid #e4e7ec;
  border-top-color:#4f5bd5;
  border-radius:50%;
  animation:fbizBootSpin .8s linear infinite;
}
@keyframes fbizBootSpin{to{transform:rotate(360deg)}}
body.app-booting{overflow:hidden}


/* ===== QRIS Professional Management ===== */
.qris-overview-grid{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(280px,.5fr);
  gap:14px;
  margin-bottom:14px;
}
.qris-overview-main{
  padding:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:190px;
  overflow:hidden;
}
.qris-overview-copy{
  max-width:720px;
}
.qris-overview-copy h3{
  margin:5px 0 7px;
  font-size:20px;
  letter-spacing:-.02em;
}
.qris-overview-copy p{
  margin:0;
  max-width:680px;
  color:var(--muted);
  font-size:11px;
  line-height:1.6;
}
.qris-overview-badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:14px;
}
.qris-coverage{
  min-width:145px;
  display:grid;
  justify-items:center;
  gap:8px;
}
.qris-coverage-ring{
  --qris-progress:0%;
  width:112px;
  height:112px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(var(--accent) var(--qris-progress),#edf1f6 0);
  position:relative;
}
.qris-coverage-ring:before{
  content:"";
  position:absolute;
  inset:9px;
  border-radius:50%;
  background:#fff;
}
.qris-coverage-ring>div{
  position:relative;
  z-index:1;
  display:grid;
  justify-items:center;
}
.qris-coverage-ring strong{
  font-size:22px;
  letter-spacing:-.03em;
}
.qris-coverage-ring span,
.qris-coverage small{
  font-size:9px;
  color:var(--muted);
}
.qris-flow-card{
  padding:20px;
}
.qris-flow{
  display:grid;
  gap:12px;
  margin-top:14px;
}
.qris-flow>div{
  display:flex;
  align-items:center;
  gap:10px;
}
.qris-flow b{
  width:28px;height:28px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:10px;
}
.qris-flow span{
  font-size:10px;
  color:var(--text-2);
  font-weight:700;
}
.qris-kpi-grid{
  margin-bottom:14px;
}
.qris-master-card{
  padding:0!important;
  overflow:hidden;
}
.qris-master-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-bottom:1px solid var(--line);
}
.qris-master-head h3{
  margin:4px 0 3px;
  font-size:15px;
}
.qris-master-head p{
  margin:0;
  font-size:9px;
}
.qris-master-tools{
  display:flex;
  align-items:center;
  gap:8px;
}
.qris-master-tools .search{
  min-width:250px;
}
.qris-master-tools select{
  min-width:145px;
}
.qris-branch-list{
  display:grid;
}
.qris-branch-row{
  display:grid;
  grid-template-columns:88px minmax(190px,1.15fr) minmax(260px,1.35fr) minmax(145px,.75fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
}
.qris-branch-row:last-child{
  border-bottom:0;
}
.qris-branch-row:hover{
  background:#fbfcfe;
}
.qris-row-preview{
  width:74px;
  height:74px;
  border:1px solid var(--line);
  border-radius:10px;
  display:grid;
  place-items:center;
  padding:5px;
  background:#fff;
}
.qris-row-preview img{
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:5px;
}
.qris-row-preview.empty{
  border-style:dashed;
  background:#f8fafc;
}
.qris-row-placeholder{
  display:grid;
  justify-items:center;
  gap:3px;
  color:#98a2b3;
}
.qris-row-placeholder span{
  font-size:19px;
}
.qris-row-placeholder small{
  font-size:7px;
}
.qris-row-branch{
  display:grid;
  gap:4px;
  min-width:0;
}
.qris-row-title{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.qris-branch-code{
  display:inline-flex;
  width:max-content;
  padding:3px 6px;
  border-radius:6px;
  background:#f2f4f7;
  color:#475467;
  font-size:8px;
  font-weight:900;
  letter-spacing:.04em;
}
.qris-row-branch>strong{
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.qris-row-branch>small{
  font-size:8px;
  color:#98a2b3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.qris-row-info{
  display:grid;
  grid-template-columns:1.2fr .8fr .9fr;
  gap:10px;
}
.qris-row-info>div,
.qris-row-meta{
  min-width:0;
  display:grid;
  gap:3px;
}
.qris-row-info span,
.qris-row-meta span{
  font-size:8px;
  color:#98a2b3;
}
.qris-row-info strong,
.qris-row-meta strong{
  font-size:9px;
  color:var(--text-2);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.qris-row-meta small{
  font-size:8px;
  color:#98a2b3;
}
.qris-row-actions{
  display:flex;
  justify-content:flex-end;
  gap:5px;
  flex-wrap:wrap;
  max-width:220px;
}
.qris-row-actions .btn{
  min-height:31px;
  padding:0 9px;
  font-size:9px;
}
.btn.danger.subtle{
  background:#fff;
  color:var(--danger);
  border:1px solid #f6ccd2;
  box-shadow:none;
}
.qris-list-empty{
  min-height:250px;
  display:grid;
  justify-items:center;
  align-content:center;
  text-align:center;
  gap:7px;
  padding:28px;
}
.qris-list-empty-icon{
  width:46px;height:46px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:18px;
}
.qris-list-empty strong{
  font-size:12px;
}
.qris-list-empty span{
  font-size:10px;
  color:var(--muted);
}
.qris-config-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:11px 12px;
  margin-bottom:14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
}
.qris-config-modal-head>div{
  display:grid;
  gap:3px;
}
.qris-config-modal-head>div>strong{
  font-size:12px;
}
.qris-config-modal-head>div>small{
  font-size:8px;
  color:#98a2b3;
}
.qris-config-form{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(240px,.9fr);
  gap:16px;
}
.qris-form-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  align-content:start;
  gap:11px;
}
.qris-form-fields .full{
  grid-column:1/-1;
}
.qris-config-note{
  padding:9px 10px;
  border:1px solid #fedf89;
  border-radius:9px;
  background:#fffaeb;
  color:#93370d;
  font-size:9px;
  line-height:1.5;
}
.qris-form-preview{
  display:grid;
  align-content:start;
  gap:7px;
}
.qris-preview-label{
  font-size:8px;
  letter-spacing:.1em;
  font-weight:900;
  color:#98a2b3;
}
.qris-form-preview .qris-upload-preview{
  min-height:270px;
  border:1px dashed #cfd7e4;
  background:#f8fafc;
}
.qris-form-preview .qris-upload-preview img{
  max-width:260px;
  max-height:260px;
}
.qris-upload-empty{
  display:grid;
  justify-items:center;
  gap:5px;
  color:#98a2b3;
}
.qris-upload-empty span{
  font-size:26px;
}
.qris-upload-empty strong{
  font-size:10px;
  color:#667085;
}
.qris-upload-empty small{
  font-size:8px;
}
.qris-preview-modal{
  display:grid;
  justify-items:center;
  gap:12px;
  text-align:center;
}
.qris-preview-branch{
  display:grid;
  gap:4px;
}
.qris-preview-branch span{
  font-size:9px;
  font-weight:900;
  color:var(--accent);
}
.qris-preview-branch strong{
  font-size:15px;
}
.qris-preview-box{
  width:min(330px,74vw);
  aspect-ratio:1/1;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}
.qris-preview-box img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.qris-preview-merchant{
  display:grid;
  gap:3px;
}
.qris-preview-merchant strong{
  font-size:12px;
}
.qris-preview-merchant span{
  font-size:9px;
  color:var(--muted);
}

@media(max-width:1180px){
  .qris-overview-grid{
    grid-template-columns:1fr;
  }
  .qris-branch-row{
    grid-template-columns:78px minmax(180px,1fr) minmax(230px,1.2fr) auto;
  }
  .qris-row-meta{
    display:none;
  }
}
@media(max-width:900px){
  .qris-master-head{
    align-items:stretch;
    flex-direction:column;
  }
  .qris-master-tools{
    width:100%;
  }
  .qris-master-tools .search,
  .qris-master-tools select{
    min-width:0;
    flex:1;
  }
  .qris-branch-row{
    grid-template-columns:76px 1fr auto;
    align-items:start;
  }
  .qris-row-info{
    grid-column:2/4;
  }
  .qris-row-actions{
    grid-column:2/4;
    justify-content:flex-start;
    max-width:none;
  }
}
@media(max-width:600px){
  .qris-overview-main{
    align-items:flex-start;
    flex-direction:column;
  }
  .qris-coverage{
    width:100%;
  }
  .qris-master-tools{
    display:grid;
    grid-template-columns:1fr;
  }
  .qris-branch-row{
    grid-template-columns:64px 1fr;
    padding:12px;
  }
  .qris-row-preview{
    width:60px;height:60px;
  }
  .qris-row-info{
    grid-column:1/-1;
    grid-template-columns:1fr 1fr;
    padding-top:4px;
  }
  .qris-row-info>div:last-child{
    grid-column:1/-1;
  }
  .qris-row-actions{
    grid-column:1/-1;
    width:100%;
  }
  .qris-row-actions .btn{
    flex:1;
  }
  .qris-config-form{
    grid-template-columns:1fr;
  }
  .qris-form-fields{
    grid-template-columns:1fr;
  }
  .qris-form-fields .full{
    grid-column:auto;
  }
}


/* ===== POS Sales Channel ===== */
.pos-channel-select{
  display:flex;
  align-items:center;
  gap:7px;
  padding:4px 6px 4px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}
.pos-channel-select>span{
  font-size:8px;
  font-weight:900;
  color:#667085;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.pos-channel-select select{
  min-width:145px;
  height:34px;
  border:0;
  background:#f8fafc;
  font-weight:800;
}
.channel-price-note{
  margin-top:-1px;
  font-size:8px;
  color:#667085;
}
.cart-channel-badge{
  display:inline-flex;
  margin-top:3px;
  padding:3px 7px;
  border-radius:6px;
  background:#eef4ff;
  color:#3538cd;
  font-size:8px;
  font-weight:900;
}

/* ===== E-Commerce Pricing ===== */
.ecom-hero{
  padding:20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:14px;
}
.ecom-hero h3{
  margin:5px 0 6px;
  font-size:18px;
}
.ecom-hero p{
  margin:0;
  max-width:700px;
  color:var(--muted);
  font-size:10px;
  line-height:1.6;
}
.ecom-formula{
  min-width:310px;
  padding:13px 15px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#f8fafc;
  display:grid;
  gap:4px;
}
.ecom-formula span{
  font-size:8px;
  color:#98a2b3;
  text-transform:uppercase;
  font-weight:900;
}
.ecom-formula strong{
  font-size:10px;
}
.ecom-channel-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:14px;
}
.ecom-channel-card{
  padding:16px;
}
.ecom-channel-head{
  display:grid;
  grid-template-columns:38px 1fr auto;
  gap:9px;
  align-items:center;
  margin-bottom:14px;
}
.ecom-platform-icon{
  width:38px;height:38px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:900;
  font-size:15px;
}
.ecom-channel-head>div:nth-child(2){
  display:grid;
  gap:2px;
}
.ecom-channel-head strong{font-size:11px}
.ecom-channel-head span{font-size:8px;color:#98a2b3}
.switch-mini input{display:none}
.switch-mini span{
  display:block;
  width:34px;height:20px;
  border-radius:999px;
  background:#d0d5dd;
  position:relative;
  cursor:pointer;
}
.switch-mini span:after{
  content:"";
  position:absolute;
  width:16px;height:16px;
  left:2px;top:2px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(16,24,40,.2);
  transition:.15s;
}
.switch-mini input:checked+span{background:var(--success)}
.switch-mini input:checked+span:after{transform:translateX(14px)}
.ecom-percent-input{
  display:flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:9px;
  overflow:hidden;
}
.ecom-percent-input input{
  flex:1;
  border:0;
  border-radius:0;
}
.ecom-percent-input span{
  padding:0 11px;
  font-weight:900;
  color:#667085;
}
.ecom-example{
  margin-top:12px;
  padding-top:11px;
  border-top:1px dashed var(--line);
  display:grid;
  gap:5px;
}
.ecom-example>span{
  font-size:8px;
  color:#98a2b3;
}
.ecom-example>div{
  display:flex;
  align-items:center;
  gap:7px;
}
.ecom-example small{
  color:#98a2b3;
  text-decoration:line-through;
}
.ecom-example strong{
  font-size:12px;
  color:var(--success);
}
.ecom-savebar{
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  margin-bottom:14px;
}
.ecom-price-table th small{
  display:block;
  margin-top:2px;
  color:#98a2b3;
  font-size:7px;
  font-weight:600;
}
.ecom-disabled-price{
  opacity:.45;
}
.ecom-disabled-price small{
  display:block;
  font-size:7px;
  color:#98a2b3;
}
@media(max-width:1050px){
  .ecom-channel-grid{grid-template-columns:1fr}
  .ecom-hero{align-items:flex-start;flex-direction:column}
  .ecom-formula{min-width:0;width:100%}
}
@media(max-width:700px){
  .pos-channel-select{
    width:100%;
    justify-content:space-between;
  }
  .pos-channel-select select{flex:1;min-width:0}
  .ecom-savebar .left{align-items:flex-start}
}


/* ===== POS Printer Quick Status ===== */
.pos-toolbar-right{
  align-items:center;
  flex-wrap:wrap;
}
.pos-printer-control{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 6px 5px 9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  box-shadow:0 1px 2px rgba(16,24,40,.03);
}
.pos-printer-indicator{
  width:23px;
  height:23px;
  border-radius:7px;
  display:grid;
  place-items:center;
  background:#f2f4f7;
}
.pos-printer-indicator span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#98a2b3;
}
.pos-printer-copy{
  min-width:122px;
  display:grid;
  line-height:1.15;
}
.pos-printer-copy small{
  color:#98a2b3;
  font-size:7px;
  text-transform:uppercase;
  letter-spacing:.07em;
  font-weight:900;
}
.pos-printer-copy strong{
  margin-top:2px;
  color:#344054;
  font-size:9px;
}
.pos-printer-copy em{
  max-width:150px;
  margin-top:2px;
  color:#98a2b3;
  font-size:7px;
  font-style:normal;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pos-printer-control.connected{
  border-color:#abefc6;
  background:#f6fef9;
}
.pos-printer-control.connected .pos-printer-indicator{
  background:#dcfae6;
}
.pos-printer-control.connected .pos-printer-indicator span{
  background:#039855;
  box-shadow:0 0 0 3px rgba(3,152,85,.10);
}
.pos-printer-control.connected .pos-printer-copy strong{
  color:#027a48;
}
.pos-printer-control.disconnected{
  border-color:#fecdca;
  background:#fffafa;
}
.pos-printer-control.disconnected .pos-printer-indicator{
  background:#fee4e2;
}
.pos-printer-control.disconnected .pos-printer-indicator span{
  background:#d92d20;
}
.pos-printer-control.disconnected .pos-printer-copy strong{
  color:#b42318;
}
.pos-printer-control.reconnecting{
  border-color:#fedf89;
  background:#fffcf5;
}
.pos-printer-control.reconnecting .pos-printer-indicator{
  background:#fef0c7;
}
.pos-printer-control.reconnecting .pos-printer-indicator span{
  background:#dc6803;
  animation:fbizPrinterPulse 1s ease-in-out infinite;
}
.pos-printer-control.reconnecting .pos-printer-copy strong{
  color:#b54708;
}
.pos-printer-control.unsupported .pos-printer-indicator span{
  background:#667085;
}
.pos-printer-control.system{
  background:#f8fafc;
}
.pos-printer-action{
  min-height:30px!important;
  height:30px;
  padding:0 8px!important;
  font-size:8px!important;
  white-space:nowrap;
}
@keyframes fbizPrinterPulse{
  0%,100%{opacity:.35;transform:scale(.8)}
  50%{opacity:1;transform:scale(1.15)}
}
@media(max-width:980px){
  .pos-toolbar-right{
    width:100%;
    justify-content:space-between;
  }
  .pos-printer-control{
    flex:1;
    max-width:360px;
  }
}
@media(max-width:600px){
  .pos-toolbar-right{
    display:grid!important;
    grid-template-columns:1fr auto;
    gap:7px!important;
  }
  .pos-printer-control{
    grid-column:1/-1;
    width:100%;
    max-width:none;
  }
  .pos-printer-copy{
    min-width:0;
    flex:1;
  }
  .pos-printer-copy em{
    max-width:190px;
  }
  .pos-product-count{
    justify-self:start;
  }
}


/* ===== Dashboard Local Calendar Date ===== */
.dashboard-date-basis{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
  padding:8px 11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
}
.dashboard-date-basis>span{
  color:#98a2b3;
  font-size:8px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.dashboard-date-basis>strong{
  color:#344054;
  font-size:9px;
}
.dashboard-date-basis>small{
  margin-left:auto;
  color:#98a2b3;
  font-size:8px;
}
@media(max-width:700px){
  .dashboard-date-basis{
    align-items:flex-start;
    flex-direction:column;
    gap:3px;
  }
  .dashboard-date-basis>small{
    margin-left:0;
  }
}


/* ===== Shift History Detail ===== */
.shift-active-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.shift-detail-btn{
  min-height:30px!important;
  padding:0 9px!important;
  white-space:nowrap;
}
.shift-detail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px;
  margin-bottom:14px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#f8fafc;
}
.shift-detail-head>div:first-child{
  display:grid;
  gap:4px;
}
.shift-detail-head>div:first-child strong{
  font-size:13px;
}
.shift-detail-head>div:first-child small{
  font-size:9px;
  color:#667085;
}
.shift-detail-time{
  display:grid;
  justify-items:end;
  gap:3px;
}
.shift-detail-time span{
  font-size:8px;
  color:#98a2b3;
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:.05em;
}
.shift-detail-time strong{
  font-size:11px;
}
.shift-detail-kpi{
  margin-bottom:14px;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.shift-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:12px;
}
.shift-detail-section{
  margin:0!important;
}
.shift-detail-section .section-title{
  margin-bottom:6px;
}
.shift-detail-total{
  padding-top:8px;
  margin-top:4px;
  border-top:1px solid var(--line);
}
.shift-detail-notes,
.shift-detail-transactions{
  margin-bottom:12px;
}
.shift-note-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.shift-note-grid>div{
  padding:10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#f8fafc;
}
.shift-note-grid span{
  display:block;
  margin-bottom:5px;
  font-size:8px;
  color:#98a2b3;
  font-weight:900;
  text-transform:uppercase;
}
.shift-note-grid p{
  margin:0;
  color:#475467;
  font-size:10px;
  line-height:1.55;
  white-space:pre-wrap;
}
@media(max-width:900px){
  .shift-detail-kpi{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:700px){
  .shift-detail-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .shift-detail-time{
    justify-items:start;
  }
  .shift-detail-grid,
  .shift-note-grid{
    grid-template-columns:1fr;
  }
  .shift-detail-kpi{
    grid-template-columns:1fr 1fr;
  }
  .shift-active-actions{
    width:100%;
  }
  .shift-active-actions .btn{
    flex:1;
  }
}


/* ===== Receipt Logo ===== */
.printer-logo-box{
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fcfcfd;
}
.printer-logo-grid{
  display:grid;
  grid-template-columns:minmax(220px,300px) 1fr;
  gap:14px;
  align-items:start;
}
.printer-logo-preview{
  min-height:140px;
}
.printer-logo-preview-card,
.printer-logo-placeholder{
  min-height:140px;
  border:1px dashed var(--line);
  border-radius:12px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:14px;
}
.printer-logo-preview-card img{
  max-width:100%;
  max-height:110px;
  object-fit:contain;
}
.printer-logo-placeholder{
  flex-direction:column;
  gap:6px;
  color:#98a2b3;
}
.printer-logo-placeholder span{
  font-size:22px;
}
.printer-logo-placeholder strong{
  color:#475467;
  font-size:11px;
}
.printer-logo-placeholder small{
  font-size:9px;
}
.printer-logo-actions{
  display:grid;
  gap:8px;
  align-content:start;
}
.printer-logo-actions small{
  color:#98a2b3;
  font-size:9px;
  line-height:1.5;
}
.printer-upload-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.receipt-logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 auto 8px;
}
.receipt-logo{
  max-width:78%;
  max-height:58px;
  object-fit:contain;
  display:block;
}
.production-receipt .receipt-logo{
  max-height:46px;
}
@media(max-width:760px){
  .printer-logo-grid{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   F&Biz MOBILE PRO V2
   ========================================================= */
html[data-device="android"],
html[data-device="iphone"]{
  --mobile-brand:#4f5bd5;
  --mobile-bg:#f5f7fb;
  --mobile-card:#ffffff;
  --mobile-radius:16px;
}

html[data-device="android"] body,
html[data-device="iphone"] body{
  overscroll-behavior-y:none;
  background:var(--mobile-bg)!important;
}

/* fixed 5-item bottom navigation */
html[data-device="android"] .sidebar,
html[data-device="iphone"] .sidebar{
  overflow:hidden;
}
html[data-device="android"] .nav,
html[data-device="iphone"] .nav{
  width:100%;
  overflow:hidden!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav,
html[data-device="iphone"] .nav-group.mobile-primary-nav{
  width:100%;
  height:100%;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:2px;
}
html[data-device="android"] .nav-group.mobile-primary-nav button,
html[data-device="iphone"] .nav-group.mobile-primary-nav button{
  min-width:0!important;
  max-width:none!important;
  width:100%!important;
}
html[data-device="android"] .nav-label::after,
html[data-device="iphone"] .nav-label::after{
  font-size:9px!important;
  font-weight:800;
}

/* premium mobile topbar */
html[data-device="android"] .topbar,
html[data-device="iphone"] .topbar{
  box-shadow:0 1px 0 rgba(16,24,40,.05);
}
html[data-device="android"] .topbar-title h2,
html[data-device="iphone"] .topbar-title h2{
  letter-spacing:-.02em;
}
html[data-device="android"] .content-shell,
html[data-device="iphone"] .content-shell{
  padding-top:10px!important;
}

/* mobile cards */
html[data-device="android"] .card,
html[data-device="iphone"] .card,
html[data-device="android"] .kpi-card,
html[data-device="iphone"] .kpi-card,
html[data-device="android"] .page-hero,
html[data-device="iphone"] .page-hero{
  border-radius:var(--mobile-radius)!important;
  border-color:#e8ebf0!important;
  box-shadow:0 4px 16px rgba(16,24,40,.045)!important;
}
html[data-device="android"] .kpi-card strong,
html[data-device="iphone"] .kpi-card strong{
  font-size:17px!important;
  letter-spacing:-.025em;
}
html[data-device="android"] .kpi-card .label,
html[data-device="iphone"] .kpi-card .label{
  font-size:9px!important;
  font-weight:800;
  color:#667085;
}

/* controls become thumb-friendly */
html[data-device="android"] input,
html[data-device="android"] select,
html[data-device="android"] textarea,
html[data-device="iphone"] input,
html[data-device="iphone"] select,
html[data-device="iphone"] textarea{
  min-height:44px!important;
  font-size:16px!important;
}
html[data-device="android"] .btn,
html[data-device="iphone"] .btn{
  min-height:40px;
  font-weight:800;
}

/* POS mobile */
html[data-device="android"] #posPage .toolbar,
html[data-device="iphone"] #posPage .toolbar{
  position:sticky;
  top:calc(var(--android-topbar,50px) + 2px);
  z-index:20;
  background:rgba(245,247,251,.96);
  backdrop-filter:blur(12px);
  padding:7px 0;
}
html[data-device="iphone"] #posPage .toolbar{
  top:calc(var(--iphone-topbar,50px) + env(safe-area-inset-top));
}
html[data-device="android"] .product-card,
html[data-device="iphone"] .product-card{
  min-height:104px!important;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
html[data-device="android"] .product-card .price,
html[data-device="iphone"] .product-card .price{
  font-size:14px!important;
  font-weight:900!important;
}
html[data-device="android"] .mobile-cart-trigger,
html[data-device="iphone"] .mobile-cart-trigger{
  min-height:42px!important;
  box-shadow:0 8px 20px rgba(79,91,213,.18);
}

/* cleaner tables on phone */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  border-radius:14px;
  border:1px solid #e8ebf0;
  background:#fff;
}
html[data-device="android"] table,
html[data-device="iphone"] table{
  font-size:10px;
}
html[data-device="android"] th,
html[data-device="iphone"] th{
  background:#f8fafc!important;
}

/* login mobile */
html[data-device="android"] .login-card-wrap,
html[data-device="iphone"] .login-card-wrap{
  display:flex;
  align-items:center;
}
html[data-device="android"] .login-card,
html[data-device="iphone"] .login-card{
  width:100%;
  max-width:420px;
  margin:0 auto;
  padding:24px!important;
  background:#fff;
  border:1px solid #e8ebf0;
  border-radius:22px!important;
  box-shadow:0 18px 50px rgba(16,24,40,.10)!important;
}
html[data-device="android"] .login-card::before,
html[data-device="iphone"] .login-card::before{
  content:"FB";
  width:52px;height:52px;border-radius:16px;
  display:grid;place-items:center;
  margin:0 auto 18px;
  background:linear-gradient(145deg,#172033,#4f5bd5);
  color:#fff;font-weight:950;font-size:16px;
}
html[data-device="android"] .login-card-head,
html[data-device="iphone"] .login-card-head{
  text-align:center;
}
html[data-device="android"] .login-card-head h2,
html[data-device="iphone"] .login-card-head h2{
  font-size:24px!important;
}
html[data-device="android"] .login-button,
html[data-device="iphone"] .login-button{
  min-height:48px!important;
  border-radius:12px!important;
}

/* More menu */
.mobile-app-menu{display:grid;gap:16px}
.mobile-profile-card{
  display:grid;
  grid-template-columns:46px 1fr auto;
  gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid #eaecf0;
  border-radius:14px;
  background:#f8fafc;
}
.mobile-profile-avatar{
  width:46px;height:46px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#172033,#4f5bd5);
  color:#fff;font-weight:900;font-size:16px;
}
.mobile-profile-card strong,.mobile-profile-card span{display:block}
.mobile-profile-card>div:nth-child(2) span{font-size:10px;color:#667085;margin-top:3px}
.mobile-cloud-pill{font-size:9px;font-weight:900;padding:5px 7px;border-radius:999px}
.mobile-cloud-pill.online{background:#ecfdf3;color:#027a48}
.mobile-cloud-pill.offline{background:#fff4ed;color:#c4320a}
.mobile-menu-section{display:grid;gap:8px}
.mobile-menu-label{font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#98a2b3}
.mobile-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.mobile-menu-item{
  min-height:74px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:7px;
  padding:11px;
  border:1px solid #eaecf0;
  border-radius:14px;
  background:#fff;
  color:#344054;
}
.mobile-menu-item span{font-size:17px}
.mobile-menu-item strong{font-size:10px;text-align:left}
.mobile-menu-item.active{background:#f1f2ff;border-color:#c7d0ff;color:#4652bd}
.mobile-menu-footer{padding-top:3px}

/* modal on phone behaves as native bottom sheet */
html[data-device="android"] .modal-head,
html[data-device="iphone"] .modal-head{
  position:sticky;top:0;z-index:5;
  background:#fff;
  border-bottom:1px solid #f0f2f5;
}
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body{
  -webkit-overflow-scrolling:touch;
}

/* hide unnecessary product count in POS toolbar on small phones */
@media(max-width:420px){
  html[data-device="android"] #posPage .pos-product-count,
  html[data-device="iphone"] #posPage .pos-product-count{display:none!important}
  .mobile-menu-grid{grid-template-columns:1fr 1fr}
}


/* =========================================================
   F&Biz MINIMAL PRO V3
   Clean • Compact • Consistent
   ========================================================= */
:root{
  --bg:#f6f7f9!important;
  --panel:#ffffff!important;
  --card:#ffffff!important;
  --line:#e7e9ee!important;
  --text:#172033!important;
  --muted:#7a8494!important;
  --accent:#4652bd!important;
  --accent-soft:#f0f2ff!important;
  --success:#0f9f6e!important;
  --warning:#c77a13!important;
  --danger:#d64545!important;
  --shadow:0 1px 2px rgba(16,24,40,.04)!important;
  --radius:12px!important;
}

/* global */
body{
  background:#f6f7f9!important;
  color:#172033!important;
}
*{
  scrollbar-width:thin;
  scrollbar-color:#d6dae1 transparent;
}
.page,
.content-shell{
  background:transparent!important;
}
.muted,.sub,.meta,small{
  color:#7a8494!important;
}

/* topbar */
.topbar{
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid #eceef2!important;
  box-shadow:none!important;
  backdrop-filter:blur(10px);
}
.topbar-title h2{
  font-weight:800!important;
  letter-spacing:-.025em!important;
}
.topbar-title .eyebrow{
  color:#98a2b3!important;
}

/* sidebar */
.sidebar{
  background:#fff!important;
  border-right:1px solid #eceef2!important;
  box-shadow:none!important;
}
.brand-block{
  border-bottom:1px solid #f0f1f4!important;
}
.brand-mark{
  background:#172033!important;
  box-shadow:none!important;
}
.nav-group-label{
  color:#a0a7b2!important;
  font-size:8px!important;
  letter-spacing:.09em!important;
}
.nav button{
  border-radius:9px!important;
  color:#667085!important;
  font-weight:700!important;
}
.nav button:hover{
  background:#f7f8fa!important;
  color:#344054!important;
}
.nav button.active{
  background:#f0f2ff!important;
  color:#4652bd!important;
  box-shadow:none!important;
}
.nav-icon{
  opacity:.9;
}

/* cards */
.card,
.kpi-card,
.page-hero,
.panel,
.toolbar,
.info-box{
  background:#fff!important;
  border:1px solid #e7e9ee!important;
  box-shadow:0 1px 2px rgba(16,24,40,.025)!important;
  border-radius:12px!important;
}
.card:hover,
.kpi-card:hover{
  box-shadow:0 2px 8px rgba(16,24,40,.035)!important;
}
.kpi-card{
  padding:13px!important;
}
.kpi-card .label{
  text-transform:none!important;
  letter-spacing:0!important;
  color:#7a8494!important;
}
.kpi-card strong{
  color:#172033!important;
  font-weight:850!important;
}

/* buttons */
.btn,
button.btn{
  border-radius:9px!important;
  box-shadow:none!important;
  font-weight:750!important;
}
.btn.primary{
  background:#4652bd!important;
  border-color:#4652bd!important;
  color:#fff!important;
}
.btn.primary:hover{
  background:#3d48aa!important;
}
.btn.soft{
  background:#f7f8fa!important;
  border-color:#e6e8ec!important;
  color:#344054!important;
}
.btn.ghost{
  background:#fff!important;
  border:1px solid #e6e8ec!important;
  color:#475467!important;
}
.btn.danger{
  background:#fff5f5!important;
  color:#c63c3c!important;
  border-color:#f1cccc!important;
}

/* inputs */
input,select,textarea{
  background:#fff!important;
  border-color:#dfe3e8!important;
  border-radius:9px!important;
  box-shadow:none!important;
  color:#172033!important;
}
input:focus,select:focus,textarea:focus{
  border-color:#aeb6ff!important;
  box-shadow:0 0 0 3px rgba(70,82,189,.07)!important;
}
label{
  color:#475467!important;
}

/* badges */
.badge{
  border-radius:999px!important;
  font-weight:800!important;
  box-shadow:none!important;
}
.badge.info{
  background:#f0f2ff!important;
  color:#4652bd!important;
}
.badge.success{
  background:#ecfdf3!important;
  color:#087a55!important;
}
.badge.warning{
  background:#fff8eb!important;
  color:#a76108!important;
}
.badge.danger{
  background:#fff1f1!important;
  color:#c63c3c!important;
}
.badge.neutral{
  background:#f3f4f6!important;
  color:#667085!important;
}

/* tables */
.table-wrap{
  border:1px solid #e7e9ee!important;
  border-radius:11px!important;
  box-shadow:none!important;
  background:#fff!important;
}
table{
  background:#fff!important;
}
thead th{
  background:#fafbfc!important;
  color:#667085!important;
  border-bottom:1px solid #eceef2!important;
  font-size:8px!important;
  text-transform:none!important;
  letter-spacing:.01em!important;
}
tbody td{
  border-bottom:1px solid #f0f1f4!important;
}
tbody tr:hover{
  background:#fafbfc!important;
}

/* dashboard */
.dashboard-date-basis{
  background:#fff!important;
  border-color:#e7e9ee!important;
  box-shadow:none!important;
}
.chart-card,.insight-card{
  box-shadow:none!important;
}

/* POS */
#posPage .toolbar{
  background:#f6f7f9!important;
}
.product-grid{
  gap:8px!important;
}
.product-card{
  border:1px solid #e7e9ee!important;
  border-radius:11px!important;
  box-shadow:none!important;
  background:#fff!important;
  padding:12px!important;
}
.product-card:hover{
  border-color:#cfd4dc!important;
  transform:none!important;
}
.product-card h4{
  color:#172033!important;
  font-weight:800!important;
}
.product-card .price{
  color:#172033!important;
}
.pos-channel-select{
  background:#fff!important;
  border-color:#e1e4e8!important;
  box-shadow:none!important;
}
.cart-panel,
.cart-sheet{
  border-color:#e7e9ee!important;
  box-shadow:none!important;
}

/* printer quick status */
.pos-printer-control{
  border-radius:9px!important;
  box-shadow:none!important;
}
.pos-printer-control.connected{
  background:#f6fbf8!important;
}
.pos-printer-control.disconnected{
  background:#fff8f8!important;
}
.pos-printer-control.reconnecting{
  background:#fffaf1!important;
}

/* ecommerce cards */
.ecom-channel-card,
.ecom-hero{
  box-shadow:none!important;
}
.ecom-platform-icon{
  border-radius:9px!important;
}

/* modal */
.modal-backdrop{
  background:rgba(15,23,42,.28)!important;
  backdrop-filter:blur(3px);
}
.modal-card{
  border-radius:16px!important;
  box-shadow:0 18px 45px rgba(16,24,40,.14)!important;
  border:1px solid #e7e9ee!important;
}
.modal-head{
  border-bottom:1px solid #eef0f3!important;
}
.modal-footer{
  border-top:1px solid #eef0f3!important;
}

/* login */
.login-view{
  background:
    radial-gradient(circle at top left,rgba(70,82,189,.05),transparent 30%),
    #f6f7f9!important;
}
.login-card{
  border:1px solid #e7e9ee!important;
  box-shadow:0 12px 30px rgba(16,24,40,.07)!important;
}
.login-card::before{
  background:#172033!important;
  box-shadow:none!important;
}
.login-card-head h2{
  color:#172033!important;
}
.login-button{
  background:#4652bd!important;
  box-shadow:none!important;
}

/* mobile bottom navigation */
html[data-device="android"] .sidebar,
html[data-device="iphone"] .sidebar{
  background:rgba(255,255,255,.97)!important;
  border-top:1px solid #e7e9ee!important;
  box-shadow:0 -4px 16px rgba(16,24,40,.035)!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav,
html[data-device="iphone"] .nav-group.mobile-primary-nav{
  padding:4px 5px!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav button,
html[data-device="iphone"] .nav-group.mobile-primary-nav button{
  border-radius:10px!important;
  padding:5px 2px!important;
  min-height:49px!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav button.active,
html[data-device="iphone"] .nav-group.mobile-primary-nav button.active{
  background:#f0f2ff!important;
  color:#4652bd!important;
}
html[data-device="android"] .nav-icon,
html[data-device="iphone"] .nav-icon{
  font-size:16px!important;
}
html[data-device="android"] .nav-label::after,
html[data-device="iphone"] .nav-label::after{
  color:inherit!important;
}

/* mobile page rhythm */
@media(max-width:760px){
  .content-shell{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .page-hero{
    padding:14px!important;
  }
  .page-hero h2,.page-hero h3{
    font-size:17px!important;
    margin-bottom:4px!important;
  }
  .grid{
    gap:8px!important;
  }
  .kpi-grid{
    gap:8px!important;
  }
  .kpi-card{
    min-height:82px!important;
  }
  .card.pad{
    padding:12px!important;
  }
  .section-title{
    margin-bottom:9px!important;
  }
  .section-title h3{
    font-size:13px!important;
  }
  .toolbar{
    padding:8px!important;
  }
  .modal-card{
    border-radius:18px 18px 0 0!important;
  }
  .mobile-profile-card,
  .mobile-menu-item{
    box-shadow:none!important;
  }
  .mobile-menu-item{
    border-radius:12px!important;
  }
}

/* reduce visual noise */
hr{
  border-color:#eef0f3!important;
}
.empty{
  background:#fafbfc!important;
  border-color:#eceef2!important;
  color:#98a2b3!important;
}


/* =========================================================
   F&Biz MOBILE CLEAN V4
   Native-like / compact / no obstructive header
   ========================================================= */
html[data-device="android"],
html[data-device="iphone"]{
  --fb-mobile-nav:58px;
  --fb-mobile-gap:8px;
  background:#f6f7f9!important;
}
html[data-device="android"] body,
html[data-device="iphone"] body{
  padding-top:env(safe-area-inset-top,0px)!important;
  padding-bottom:calc(var(--fb-mobile-nav) + env(safe-area-inset-bottom,0px) + 6px)!important;
  background:#f6f7f9!important;
  font-size:11px!important;
}

/* Do not let the web header consume phone screen */
html[data-device="android"] .topbar,
html[data-device="iphone"] .topbar{
  display:none!important;
}
html[data-device="android"] .main,
html[data-device="iphone"] .main{
  min-height:100dvh!important;
  width:100%!important;
}
html[data-device="android"] .content-shell,
html[data-device="iphone"] .content-shell{
  padding:8px 8px 12px!important;
  max-width:100%!important;
}

/* Minimal page intro: keep only what is needed */
html[data-device="android"] .page-hero,
html[data-device="iphone"] .page-hero{
  padding:10px 11px!important;
  margin:0 0 7px!important;
  border-radius:11px!important;
  min-height:0!important;
}
html[data-device="android"] .page-hero .hero-kicker,
html[data-device="iphone"] .page-hero .hero-kicker,
html[data-device="android"] .page-hero p,
html[data-device="iphone"] .page-hero p{
  display:none!important;
}
html[data-device="android"] .page-hero h1,
html[data-device="iphone"] .page-hero h1,
html[data-device="android"] .page-hero h2,
html[data-device="iphone"] .page-hero h2,
html[data-device="android"] .page-hero h3,
html[data-device="iphone"] .page-hero h3{
  margin:0!important;
  font-size:14px!important;
  line-height:1.25!important;
}

/* Bottom nav - 5 stable items, no horizontal mess */
html[data-device="android"] .sidebar,
html[data-device="iphone"] .sidebar{
  position:fixed!important;
  left:8px!important;
  right:8px!important;
  bottom:max(6px,env(safe-area-inset-bottom,0px))!important;
  top:auto!important;
  z-index:70!important;
  height:var(--fb-mobile-nav)!important;
  min-height:0!important;
  padding:4px!important;
  border:1px solid #e4e7ec!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 6px 20px rgba(16,24,40,.07)!important;
  backdrop-filter:blur(14px)!important;
  overflow:hidden!important;
}
html[data-device="android"] .sidebar-brand,
html[data-device="iphone"] .sidebar-brand,
html[data-device="android"] .sidebar-footer,
html[data-device="iphone"] .sidebar-footer,
html[data-device="android"] .nav-group-label,
html[data-device="iphone"] .nav-group-label{
  display:none!important;
}
html[data-device="android"] .nav,
html[data-device="iphone"] .nav{
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  overflow:hidden!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav,
html[data-device="iphone"] .nav-group.mobile-primary-nav{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  width:100%!important;
  height:100%!important;
  gap:2px!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav button,
html[data-device="iphone"] .nav-group.mobile-primary-nav button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:49px!important;
  min-height:49px!important;
  padding:3px 1px!important;
  border:0!important;
  border-radius:10px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:center!important;
  gap:1px!important;
  background:transparent!important;
  color:#7a8494!important;
  overflow:hidden!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav button.active,
html[data-device="iphone"] .nav-group.mobile-primary-nav button.active{
  color:#4652bd!important;
  background:#f0f2ff!important;
}
html[data-device="android"] .nav-icon,
html[data-device="iphone"] .nav-icon{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  font-size:14px!important;
  line-height:20px!important;
}
html[data-device="android"] .nav-label,
html[data-device="iphone"] .nav-label{
  width:100%!important;
  font-size:0!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  text-align:center!important;
}
html[data-device="android"] .nav-label::after,
html[data-device="iphone"] .nav-label::after{
  content:attr(data-short)!important;
  display:block!important;
  font-size:8px!important;
  line-height:11px!important;
  font-weight:800!important;
}

/* Cards / sections: flatter, smaller and predictable */
html[data-device="android"] .card,
html[data-device="iphone"] .card,
html[data-device="android"] .kpi-card,
html[data-device="iphone"] .kpi-card,
html[data-device="android"] .toolbar,
html[data-device="iphone"] .toolbar{
  border-radius:11px!important;
  box-shadow:none!important;
}
html[data-device="android"] .card.pad,
html[data-device="iphone"] .card.pad{
  padding:10px!important;
}
html[data-device="android"] .section-title,
html[data-device="iphone"] .section-title{
  margin-bottom:7px!important;
  gap:6px!important;
}
html[data-device="android"] .section-title h3,
html[data-device="iphone"] .section-title h3{
  font-size:12px!important;
  line-height:1.25!important;
}
html[data-device="android"] .section-title .muted,
html[data-device="iphone"] .section-title .muted{
  display:none!important;
}
html[data-device="android"] .kpi-grid,
html[data-device="iphone"] .kpi-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
html[data-device="android"] .kpi-card,
html[data-device="iphone"] .kpi-card{
  min-height:70px!important;
  padding:9px!important;
}
html[data-device="android"] .kpi-card strong,
html[data-device="iphone"] .kpi-card strong{
  font-size:15px!important;
  line-height:1.2!important;
}
html[data-device="android"] .kpi-card .sub,
html[data-device="iphone"] .kpi-card .sub{
  display:none!important;
}

/* Prevent text/columns from collapsing into unreadable piles */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  max-height:none!important;
  -webkit-overflow-scrolling:touch;
}
html[data-device="android"] .table-wrap table,
html[data-device="iphone"] .table-wrap table{
  min-width:620px!important;
  table-layout:auto!important;
}
html[data-device="android"] .table-wrap th,
html[data-device="iphone"] .table-wrap th{
  position:static!important;
  white-space:nowrap!important;
}
html[data-device="android"] .table-wrap td,
html[data-device="iphone"] .table-wrap td{
  white-space:nowrap!important;
}

/* Forms: one column, no giant helper copy */
html[data-device="android"] .form-grid,
html[data-device="iphone"] .form-grid,
html[data-device="android"] .section-grid,
html[data-device="iphone"] .section-grid{
  grid-template-columns:1fr!important;
  gap:8px!important;
}
html[data-device="android"] label,
html[data-device="iphone"] label{
  font-size:9px!important;
  gap:4px!important;
}
html[data-device="android"] input,
html[data-device="android"] select,
html[data-device="android"] textarea,
html[data-device="iphone"] input,
html[data-device="iphone"] select,
html[data-device="iphone"] textarea{
  min-height:42px!important;
  border-radius:9px!important;
  font-size:16px!important;
}
html[data-device="android"] textarea,
html[data-device="iphone"] textarea{
  min-height:78px!important;
}
html[data-device="android"] .btn,
html[data-device="iphone"] .btn{
  min-height:38px!important;
  padding:0 11px!important;
  font-size:9px!important;
}

/* POS */
html[data-device="android"] #posPage .toolbar,
html[data-device="iphone"] #posPage .toolbar{
  position:static!important;
  padding:6px!important;
  margin-bottom:7px!important;
  background:#fff!important;
  backdrop-filter:none!important;
}
html[data-device="android"] #posPage .toolbar .left,
html[data-device="iphone"] #posPage .toolbar .left,
html[data-device="android"] #posPage .toolbar .right,
html[data-device="iphone"] #posPage .toolbar .right{
  gap:6px!important;
}
html[data-device="android"] .product-grid,
html[data-device="iphone"] .product-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
html[data-device="android"] .product-card,
html[data-device="iphone"] .product-card{
  min-height:92px!important;
  padding:9px!important;
  border-radius:10px!important;
}
html[data-device="android"] .product-card h4,
html[data-device="iphone"] .product-card h4{
  font-size:10px!important;
  line-height:1.25!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden!important;
}
html[data-device="android"] .product-card .meta,
html[data-device="iphone"] .product-card .meta{
  font-size:7px!important;
}
html[data-device="android"] .product-card .price,
html[data-device="iphone"] .product-card .price{
  font-size:12px!important;
}
html[data-device="android"] #posPage .cart,
html[data-device="iphone"] #posPage .cart{
  left:7px!important;
  right:7px!important;
  bottom:calc(var(--fb-mobile-nav) + env(safe-area-inset-bottom,0px) + 9px)!important;
  max-height:70dvh!important;
  border-radius:16px!important;
  box-shadow:0 18px 50px rgba(16,24,40,.15)!important;
}

/* Generic popups become compact bottom sheets instead of large centered boxes */
html[data-device="android"] .modal-backdrop,
html[data-device="iphone"] .modal-backdrop{
  padding:0!important;
  align-items:end!important;
  background:rgba(15,23,42,.24)!important;
  backdrop-filter:blur(2px)!important;
}
html[data-device="android"] .modal,
html[data-device="iphone"] .modal{
  width:100%!important;
  max-width:none!important;
  max-height:78dvh!important;
  margin:0!important;
  border-radius:18px 18px 0 0!important;
  border:0!important;
  box-shadow:0 -12px 36px rgba(16,24,40,.12)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
html[data-device="android"] .modal-head,
html[data-device="iphone"] .modal-head{
  flex:0 0 auto!important;
  min-height:45px!important;
  padding:9px 12px!important;
  background:#fff!important;
  border-bottom:1px solid #eef0f3!important;
}
html[data-device="android"] .modal-head::before,
html[data-device="iphone"] .modal-head::before{
  content:"";
  position:absolute;
  left:50%;
  top:5px;
  width:34px;
  height:4px;
  margin-left:-17px;
  border-radius:999px;
  background:#d0d5dd;
}
html[data-device="android"] .modal-head,
html[data-device="iphone"] .modal-head{
  position:relative!important;
  padding-top:13px!important;
}
html[data-device="android"] .modal-head h3,
html[data-device="iphone"] .modal-head h3{
  margin:0!important;
  font-size:13px!important;
  line-height:1.25!important;
}
html[data-device="android"] .modal-head .icon-btn,
html[data-device="iphone"] .modal-head .icon-btn{
  width:28px!important;
  height:28px!important;
  min-height:28px!important;
  border:0!important;
  background:#f4f5f7!important;
}
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body{
  flex:1 1 auto!important;
  overflow:auto!important;
  padding:10px 11px!important;
  font-size:10px!important;
  line-height:1.45!important;
}
html[data-device="android"] .modal-body p,
html[data-device="iphone"] .modal-body p{
  margin:4px 0 8px!important;
}
html[data-device="android"] .modal-foot,
html[data-device="iphone"] .modal-foot{
  flex:0 0 auto!important;
  position:sticky!important;
  bottom:0!important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px))!important;
  background:#fff!important;
  border-top:1px solid #eef0f3!important;
  gap:6px!important;
}
html[data-device="android"] .modal-foot .btn,
html[data-device="iphone"] .modal-foot .btn{
  flex:1 1 auto!important;
}

/* Login is clean and vertically centered, no oversized banner */
html[data-device="android"] .login-view,
html[data-device="iphone"] .login-view{
  min-height:100dvh!important;
  padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)!important;
  background:#f6f7f9!important;
}
html[data-device="android"] .login-shell,
html[data-device="iphone"] .login-shell{
  min-height:100dvh!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
html[data-device="android"] .login-brand-panel,
html[data-device="iphone"] .login-brand-panel{
  display:none!important;
}
html[data-device="android"] .login-card-wrap,
html[data-device="iphone"] .login-card-wrap{
  min-height:100dvh!important;
  padding:18px!important;
  display:flex!important;
  align-items:center!important;
}
html[data-device="android"] .login-card,
html[data-device="iphone"] .login-card{
  max-width:390px!important;
  padding:20px!important;
  border-radius:18px!important;
  box-shadow:none!important;
}
html[data-device="android"] .login-card::before,
html[data-device="iphone"] .login-card::before{
  width:44px!important;
  height:44px!important;
  border-radius:13px!important;
  margin-bottom:12px!important;
  font-size:13px!important;
}
html[data-device="android"] .login-card-head h2,
html[data-device="iphone"] .login-card-head h2{
  font-size:20px!important;
  margin-bottom:5px!important;
}
html[data-device="android"] .login-card-head p,
html[data-device="iphone"] .login-card-head p{
  font-size:10px!important;
  line-height:1.45!important;
}

/* Hardware-back login choice: tiny action sheet */
#mobileBackChoice{
  position:fixed;
  inset:0;
  z-index:9999;
  pointer-events:none;
}
#mobileBackChoice .mobile-back-shade{
  position:absolute;
  inset:0;
  opacity:0;
  background:rgba(15,23,42,.22);
  transition:.18s ease;
}
#mobileBackChoice .mobile-back-sheet{
  position:absolute;
  left:8px;
  right:8px;
  bottom:calc(8px + env(safe-area-inset-bottom,0px));
  padding:10px;
  border:1px solid #e4e7ec;
  border-radius:15px;
  background:#fff;
  box-shadow:0 14px 38px rgba(16,24,40,.15);
  transform:translateY(calc(100% + 30px));
  transition:.18s ease;
}
#mobileBackChoice.show{
  pointer-events:auto;
}
#mobileBackChoice.show .mobile-back-shade{
  opacity:1;
}
#mobileBackChoice.show .mobile-back-sheet{
  transform:translateY(0);
}
.mobile-back-handle{
  width:32px;
  height:4px;
  margin:0 auto 8px;
  border-radius:999px;
  background:#d0d5dd;
}
.mobile-back-sheet>strong{
  display:block;
  font-size:12px;
  color:#172033;
}
.mobile-back-sheet>span{
  display:block;
  margin:3px 0 9px;
  font-size:9px;
  line-height:1.4;
  color:#7a8494;
}
.mobile-back-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
}

/* More menu: compact */
html[data-device="android"] .mobile-profile-card,
html[data-device="iphone"] .mobile-profile-card{
  grid-template-columns:38px 1fr auto!important;
  padding:8px!important;
  border-radius:11px!important;
}
html[data-device="android"] .mobile-profile-avatar,
html[data-device="iphone"] .mobile-profile-avatar{
  width:38px!important;
  height:38px!important;
  border-radius:10px!important;
}
html[data-device="android"] .mobile-menu-grid,
html[data-device="iphone"] .mobile-menu-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
}
html[data-device="android"] .mobile-menu-item,
html[data-device="iphone"] .mobile-menu-item{
  min-height:62px!important;
  padding:7px!important;
  border-radius:10px!important;
  align-items:center!important;
  text-align:center!important;
}
html[data-device="android"] .mobile-menu-item span,
html[data-device="iphone"] .mobile-menu-item span{
  font-size:15px!important;
}
html[data-device="android"] .mobile-menu-item strong,
html[data-device="iphone"] .mobile-menu-item strong{
  width:100%!important;
  font-size:8px!important;
  text-align:center!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}


/* =========================================================
   F&Biz MOBILE CLEAN V4.3 — TOUCH / SCROLL FIX
   One primary vertical scroller + responsive touch gestures
   ========================================================= */

/* Use one page scroller on phones. Nested scroll areas made the WebView
   feel heavy and required longer swipes. */
html[data-device="android"],
html[data-device="iphone"]{
  scroll-behavior:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  touch-action:manipulation!important;
}

html[data-device="android"] body,
html[data-device="iphone"] body{
  height:auto!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:manipulation!important;
}

/* Prevent nested vertical scroll containers in the regular app pages. */
html[data-device="android"] .app,
html[data-device="iphone"] .app,
html[data-device="android"] .main,
html[data-device="iphone"] .main,
html[data-device="android"] .content-shell,
html[data-device="iphone"] .content-shell,
html[data-device="android"] .page,
html[data-device="iphone"] .page{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  overscroll-behavior:auto!important;
  touch-action:pan-y pinch-zoom!important;
}

/* Controls should react immediately to a tap. */
html[data-device="android"] button,
html[data-device="android"] .btn,
html[data-device="android"] a,
html[data-device="android"] input,
html[data-device="android"] select,
html[data-device="iphone"] button,
html[data-device="iphone"] .btn,
html[data-device="iphone"] a,
html[data-device="iphone"] input,
html[data-device="iphone"] select{
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:rgba(70,82,189,.08);
}

/* Tables need both horizontal and vertical finger movement. */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  touch-action:pan-x pan-y pinch-zoom!important;
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}

/* These are intentional secondary scrollers. Keep momentum enabled. */
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body,
html[data-device="android"] #posPage .cart,
html[data-device="iphone"] #posPage .cart{
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
}

/* Keep the fixed bottom navigation completely outside scroll gesture handling. */
html[data-device="android"] .sidebar,
html[data-device="iphone"] .sidebar,
html[data-device="android"] .nav,
html[data-device="iphone"] .nav{
  touch-action:manipulation!important;
}

/* Avoid accidental text selection while swiping cards/product grids. */
html[data-device="android"] .product-grid,
html[data-device="iphone"] .product-grid,
html[data-device="android"] .kpi-grid,
html[data-device="iphone"] .kpi-grid,
html[data-device="android"] .mobile-menu-grid,
html[data-device="iphone"] .mobile-menu-grid{
  -webkit-user-select:none;
  user-select:none;
  touch-action:pan-y!important;
}


/* =========================================================
   F&Biz MOBILE V5 — ESB-INSPIRED CLEAN POS
   Inspired by the compact information hierarchy of modern
   restaurant POS apps. Not a copy of ESB proprietary UI.
   ========================================================= */

html[data-device="android"],
html[data-device="iphone"]{
  --fb-esb-blue:#2458c6;
  --fb-esb-blue-dark:#1d46a1;
  --fb-esb-blue-soft:#eef4ff;
  --fb-esb-bg:#f4f6f9;
  --fb-esb-card:#ffffff;
  --fb-esb-line:#e5e9f0;
  --fb-esb-text:#172033;
  --fb-esb-muted:#7a8494;
  --fb-esb-green:#18a66a;
  --fb-esb-orange:#f2a23a;
  --fb-esb-red:#e75b5b;
  --fb-esb-cyan:#1eb7c8;
  --fb-mobile-nav:60px;
  background:var(--fb-esb-bg)!important;
}

html[data-device="android"] body,
html[data-device="iphone"] body{
  background:var(--fb-esb-bg)!important;
  color:var(--fb-esb-text)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

/* ---------------------------------------------------------
   Compact blue app header
   --------------------------------------------------------- */
html[data-device="android"] .topbar,
html[data-device="iphone"] .topbar{
  display:flex!important;
  position:sticky!important;
  top:0!important;
  z-index:55!important;
  height:46px!important;
  min-height:46px!important;
  padding:0 11px!important;
  align-items:center!important;
  justify-content:space-between!important;
  background:linear-gradient(135deg,var(--fb-esb-blue),var(--fb-esb-blue-dark))!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
html[data-device="android"] .topbar-title,
html[data-device="iphone"] .topbar-title{
  min-width:0!important;
  width:auto!important;
  text-align:left!important;
}
html[data-device="android"] .topbar-title .eyebrow,
html[data-device="iphone"] .topbar-title .eyebrow{
  display:none!important;
}
html[data-device="android"] .topbar-title h2,
html[data-device="iphone"] .topbar-title h2{
  margin:0!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  letter-spacing:-.01em!important;
}
html[data-device="android"] .topbar-actions,
html[data-device="iphone"] .topbar-actions{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
}
html[data-device="android"] .topbar-actions>*,
html[data-device="iphone"] .topbar-actions>*{
  display:none!important;
}
html[data-device="android"] #cloudStatusTop,
html[data-device="iphone"] #cloudStatusTop{
  display:inline-flex!important;
  min-height:25px!important;
  padding:4px 7px!important;
  border:1px solid rgba(255,255,255,.22)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  font-size:8px!important;
  gap:4px!important;
}
html[data-device="android"] #cloudStatusTop strong,
html[data-device="iphone"] #cloudStatusTop strong{
  color:#fff!important;
  font-size:8px!important;
}

/* ---------------------------------------------------------
   Mobile content spacing
   --------------------------------------------------------- */
html[data-device="android"] .content-shell,
html[data-device="iphone"] .content-shell{
  padding:8px 8px 14px!important;
}

/* page hero becomes a thin information strip */
html[data-device="android"] .page-hero,
html[data-device="iphone"] .page-hero{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:40px!important;
  padding:8px 10px!important;
  margin:0 0 7px!important;
  border:1px solid var(--fb-esb-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html[data-device="android"] .page-hero h1,
html[data-device="android"] .page-hero h2,
html[data-device="android"] .page-hero h3,
html[data-device="iphone"] .page-hero h1,
html[data-device="iphone"] .page-hero h2,
html[data-device="iphone"] .page-hero h3{
  color:var(--fb-esb-text)!important;
  font-size:12px!important;
  font-weight:800!important;
}
html[data-device="android"] .page-hero .hero-actions,
html[data-device="iphone"] .page-hero .hero-actions{
  margin-left:auto!important;
  display:flex!important;
  gap:5px!important;
}

/* ---------------------------------------------------------
   KPI cards: ESB-like colorful summary tiles
   --------------------------------------------------------- */
html[data-device="android"] .kpi-grid,
html[data-device="iphone"] .kpi-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
html[data-device="android"] .kpi-card,
html[data-device="iphone"] .kpi-card{
  position:relative!important;
  overflow:hidden!important;
  min-height:78px!important;
  padding:10px!important;
  border:0!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html[data-device="android"] .kpi-card:nth-child(4n+1),
html[data-device="iphone"] .kpi-card:nth-child(4n+1){
  background:linear-gradient(135deg,#eaf3ff,#f7fbff)!important;
  border-left:4px solid #3b82f6!important;
}
html[data-device="android"] .kpi-card:nth-child(4n+2),
html[data-device="iphone"] .kpi-card:nth-child(4n+2){
  background:linear-gradient(135deg,#eafaf3,#f7fdf9)!important;
  border-left:4px solid var(--fb-esb-green)!important;
}
html[data-device="android"] .kpi-card:nth-child(4n+3),
html[data-device="iphone"] .kpi-card:nth-child(4n+3){
  background:linear-gradient(135deg,#fff6e9,#fffcf6)!important;
  border-left:4px solid var(--fb-esb-orange)!important;
}
html[data-device="android"] .kpi-card:nth-child(4n+4),
html[data-device="iphone"] .kpi-card:nth-child(4n+4){
  background:linear-gradient(135deg,#eef8fb,#f8fdfe)!important;
  border-left:4px solid var(--fb-esb-cyan)!important;
}
html[data-device="android"] .kpi-card .label,
html[data-device="iphone"] .kpi-card .label{
  color:#667085!important;
  font-size:8px!important;
  font-weight:800!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
html[data-device="android"] .kpi-card strong,
html[data-device="iphone"] .kpi-card strong{
  margin-top:4px!important;
  color:#172033!important;
  font-size:16px!important;
  font-weight:900!important;
}

/* ---------------------------------------------------------
   Section cards
   --------------------------------------------------------- */
html[data-device="android"] .card,
html[data-device="iphone"] .card,
html[data-device="android"] .panel,
html[data-device="iphone"] .panel{
  border:1px solid var(--fb-esb-line)!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html[data-device="android"] .card.pad,
html[data-device="iphone"] .card.pad{
  padding:10px!important;
}
html[data-device="android"] .section-title,
html[data-device="iphone"] .section-title{
  min-height:28px!important;
  margin:0 0 7px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
}
html[data-device="android"] .section-title h3,
html[data-device="iphone"] .section-title h3{
  color:#344054!important;
  font-size:11px!important;
  font-weight:850!important;
}
html[data-device="android"] .section-title::before,
html[data-device="iphone"] .section-title::before{
  content:"";
  width:3px;
  height:16px;
  border-radius:999px;
  margin-right:6px;
  background:var(--fb-esb-blue);
}

/* ---------------------------------------------------------
   POS: category / product / checkout feel
   --------------------------------------------------------- */
html[data-device="android"] #posPage .toolbar,
html[data-device="iphone"] #posPage .toolbar{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  padding:7px!important;
  margin:0 0 7px!important;
  border:1px solid var(--fb-esb-line)!important;
  border-radius:10px!important;
  background:#fff!important;
}
html[data-device="android"] #posPage .toolbar input,
html[data-device="iphone"] #posPage .toolbar input{
  background:#f7f9fc!important;
}
html[data-device="android"] .product-grid,
html[data-device="iphone"] .product-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
html[data-device="android"] .product-card,
html[data-device="iphone"] .product-card{
  min-height:102px!important;
  padding:9px!important;
  border:1px solid var(--fb-esb-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html[data-device="android"] .product-card:active,
html[data-device="iphone"] .product-card:active{
  transform:scale(.985)!important;
  border-color:#b8c8ee!important;
  background:#f8fbff!important;
}
html[data-device="android"] .product-card h4,
html[data-device="iphone"] .product-card h4{
  color:#1d2939!important;
  font-size:10px!important;
  font-weight:850!important;
}
html[data-device="android"] .product-card .price,
html[data-device="iphone"] .product-card .price{
  color:var(--fb-esb-blue)!important;
  font-size:12px!important;
  font-weight:900!important;
}
html[data-device="android"] .mobile-cart-trigger,
html[data-device="iphone"] .mobile-cart-trigger{
  min-height:40px!important;
  border-radius:9px!important;
  background:var(--fb-esb-blue)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:none!important;
}

/* ---------------------------------------------------------
   Buttons / fields
   --------------------------------------------------------- */
html[data-device="android"] .btn,
html[data-device="iphone"] .btn{
  min-height:37px!important;
  padding:0 10px!important;
  border-radius:8px!important;
  font-size:9px!important;
  font-weight:800!important;
  box-shadow:none!important;
}
html[data-device="android"] .btn.primary,
html[data-device="iphone"] .btn.primary{
  background:var(--fb-esb-blue)!important;
  border-color:var(--fb-esb-blue)!important;
}
html[data-device="android"] .btn.soft,
html[data-device="iphone"] .btn.soft{
  background:#f5f7fa!important;
  border-color:#e5e9f0!important;
}
html[data-device="android"] input,
html[data-device="android"] select,
html[data-device="android"] textarea,
html[data-device="iphone"] input,
html[data-device="iphone"] select,
html[data-device="iphone"] textarea{
  border:1px solid #dfe4eb!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:none!important;
}

/* ---------------------------------------------------------
   Tables: clean list style
   --------------------------------------------------------- */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  border:1px solid var(--fb-esb-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
}
html[data-device="android"] table,
html[data-device="iphone"] table{
  background:#fff!important;
}
html[data-device="android"] thead th,
html[data-device="iphone"] thead th{
  background:#f6f8fb!important;
  color:#667085!important;
  font-size:8px!important;
  font-weight:850!important;
  border-bottom:1px solid #e5e9f0!important;
}
html[data-device="android"] tbody td,
html[data-device="iphone"] tbody td{
  color:#344054!important;
  font-size:9px!important;
  border-bottom:1px solid #f0f2f5!important;
}

/* ---------------------------------------------------------
   Bottom navigation: close to native mobile POS
   --------------------------------------------------------- */
html[data-device="android"] .sidebar,
html[data-device="iphone"] .sidebar{
  left:0!important;
  right:0!important;
  bottom:0!important;
  height:calc(var(--fb-mobile-nav) + env(safe-area-inset-bottom,0px))!important;
  padding:4px 5px env(safe-area-inset-bottom,0px)!important;
  border:0!important;
  border-top:1px solid #e1e5eb!important;
  border-radius:0!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 -3px 14px rgba(16,24,40,.055)!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav button,
html[data-device="iphone"] .nav-group.mobile-primary-nav button{
  height:51px!important;
  min-height:51px!important;
  border-radius:8px!important;
  color:#8a93a3!important;
}
html[data-device="android"] .nav-group.mobile-primary-nav button.active,
html[data-device="iphone"] .nav-group.mobile-primary-nav button.active{
  background:#eef4ff!important;
  color:var(--fb-esb-blue)!important;
}
html[data-device="android"] .nav-icon,
html[data-device="iphone"] .nav-icon{
  font-size:15px!important;
}
html[data-device="android"] .nav-label::after,
html[data-device="iphone"] .nav-label::after{
  font-size:8px!important;
  font-weight:850!important;
}

/* ---------------------------------------------------------
   Bottom sheet / modal
   --------------------------------------------------------- */
html[data-device="android"] .modal,
html[data-device="iphone"] .modal{
  max-height:76dvh!important;
  border-radius:16px 16px 0 0!important;
  background:#fff!important;
}
html[data-device="android"] .modal-head,
html[data-device="iphone"] .modal-head{
  min-height:44px!important;
  background:#fff!important;
}
html[data-device="android"] .modal-head h3,
html[data-device="iphone"] .modal-head h3{
  color:#1d2939!important;
  font-size:12px!important;
}
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body{
  padding:9px 10px!important;
}
html[data-device="android"] .modal-foot,
html[data-device="iphone"] .modal-foot{
  background:#fff!important;
}

/* more menu: compact 3-column launcher */
html[data-device="android"] .mobile-menu-grid,
html[data-device="iphone"] .mobile-menu-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html[data-device="android"] .mobile-menu-item,
html[data-device="iphone"] .mobile-menu-item{
  min-height:64px!important;
  background:#fff!important;
  border:1px solid #e5e9f0!important;
}
html[data-device="android"] .mobile-menu-item.active,
html[data-device="iphone"] .mobile-menu-item.active{
  background:#eef4ff!important;
  border-color:#c9d8f8!important;
  color:var(--fb-esb-blue)!important;
}

/* ---------------------------------------------------------
   Login: clean POS login
   --------------------------------------------------------- */
html[data-device="android"] .login-view,
html[data-device="iphone"] .login-view{
  background:#f4f6f9!important;
}
html[data-device="android"] .login-card,
html[data-device="iphone"] .login-card{
  max-width:380px!important;
  border:1px solid var(--fb-esb-line)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:none!important;
  padding:18px!important;
}
html[data-device="android"] .login-card::before,
html[data-device="iphone"] .login-card::before{
  background:var(--fb-esb-blue)!important;
  border-radius:11px!important;
}
html[data-device="android"] .login-card-head h2,
html[data-device="iphone"] .login-card-head h2{
  color:#1d2939!important;
  font-size:19px!important;
}
html[data-device="android"] .login-step-badge,
html[data-device="iphone"] .login-step-badge{
  background:#eef4ff!important;
  color:var(--fb-esb-blue)!important;
  border:0!important;
}

/* Small devices */
@media(max-width:380px){
  html[data-device="android"] .product-grid,
  html[data-device="iphone"] .product-grid{
    grid-template-columns:1fr 1fr!important;
  }
  html[data-device="android"] .kpi-card strong,
  html[data-device="iphone"] .kpi-card strong{
    font-size:14px!important;
  }
}


/* =========================================================
   F&Biz MOBILE V5.2 — PULL TO REFRESH
   ========================================================= */
#fbizPullRefresh{
  --ptr-progress:0;
  position:fixed;
  z-index:9998;
  left:50%;
  top:50px;
  transform:translate(-50%,-62px);
  transition:transform .18s ease;
  pointer-events:none;
  will-change:transform;
}
#fbizPullRefresh .ptr-pill{
  height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 11px 0 8px;
  border:1px solid rgba(36,88,198,.14);
  border-radius:999px;
  background:rgba(255,255,255,.98);
  box-shadow:0 5px 18px rgba(16,24,40,.10);
  color:#667085;
  white-space:nowrap;
}
#fbizPullRefresh .ptr-icon{
  width:22px;
  height:22px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#eef4ff;
  color:#2458c6;
  font-size:12px;
  font-weight:900;
  transform:rotate(calc(var(--ptr-progress) * 180deg));
  transition:transform .1s linear,background .15s ease,color .15s ease;
}
#fbizPullRefresh strong{
  font-size:9px;
  font-weight:800;
}
#fbizPullRefresh.ready .ptr-pill{
  border-color:rgba(36,88,198,.28);
  color:#2458c6;
}
#fbizPullRefresh.ready .ptr-icon{
  background:#2458c6;
  color:#fff;
}
#fbizPullRefresh.refreshing .ptr-icon{
  animation:fbizPtrSpin .75s linear infinite;
  background:#2458c6;
  color:#fff;
}
@keyframes fbizPtrSpin{
  to{transform:rotate(360deg)}
}

html[data-device="android"] body,
html[data-device="iphone"] body{
  /* Custom pull-to-refresh handles the downward gesture at scroll top. */
  overscroll-behavior-y:contain!important;
}


/* =========================================================
   F&Biz V5.3 — Native Printer
   ========================================================= */
.native-printer-picker{display:grid;gap:8px}
.native-printer-device{
  width:100%;
  display:grid;
  grid-template-columns:38px 1fr auto;
  gap:9px;
  align-items:center;
  padding:9px;
  border:1px solid #e5e9f0;
  border-radius:10px;
  background:#fff;
  color:#344054;
  text-align:left;
}
.native-printer-device:active{background:#f3f7ff;border-color:#bfd0f5}
.native-printer-device>span:nth-child(2){min-width:0}
.native-printer-device strong,.native-printer-device small{display:block}
.native-printer-device strong{font-size:10px}
.native-printer-device small{margin-top:2px;font-size:8px;color:#7a8494}
.native-printer-device em{font-style:normal;font-size:8px;font-weight:850;color:#2458c6}
.native-printer-icon{
  width:38px;height:38px;border-radius:10px;
  display:grid;place-items:center;
  background:#eef4ff;color:#2458c6;font-weight:900;
}
.native-printer-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
.native-printer-box .info-list{margin-top:9px}


/* =========================================================
   F&Biz MOBILE V5.4 — RESPONSIVE SCROLL
   ========================================================= */

/* Let Android/iOS own vertical gesture physics. */
html[data-device="android"],
html[data-device="iphone"]{
  scroll-behavior:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y pinch-zoom!important;
}

html[data-device="android"] body,
html[data-device="iphone"] body{
  height:auto!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y pinch-zoom!important;
}

/* Main app content must never become a competing vertical scroller. */
html[data-device="android"] .app,
html[data-device="iphone"] .app,
html[data-device="android"] .main,
html[data-device="iphone"] .main,
html[data-device="android"] .content-shell,
html[data-device="iphone"] .content-shell,
html[data-device="android"] .page,
html[data-device="iphone"] .page{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-y:visible!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y pinch-zoom!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Cards, product grids and dashboard blocks should pass vertical swipes
   directly to the page instead of interpreting them as taps. */
html[data-device="android"] .card,
html[data-device="iphone"] .card,
html[data-device="android"] .panel,
html[data-device="iphone"] .panel,
html[data-device="android"] .product-grid,
html[data-device="iphone"] .product-grid,
html[data-device="android"] .kpi-grid,
html[data-device="iphone"] .kpi-grid{
  touch-action:pan-y!important;
}

/* Only actual controls use manipulation. */
html[data-device="android"] button,
html[data-device="android"] a,
html[data-device="android"] input,
html[data-device="android"] select,
html[data-device="android"] textarea,
html[data-device="iphone"] button,
html[data-device="iphone"] a,
html[data-device="iphone"] input,
html[data-device="iphone"] select,
html[data-device="iphone"] textarea{
  touch-action:manipulation!important;
}

/* Horizontal tables still accept both axes naturally. */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  touch-action:pan-x pan-y!important;
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Intentional nested vertical scrollers only. */
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body,
html[data-device="android"] #posPage .cart,
html[data-device="iphone"] #posPage .cart{
  overflow-y:auto!important;
  touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Bottom navigation should not capture swipe gestures outside its buttons. */
html[data-device="android"] .sidebar,
html[data-device="iphone"] .sidebar{
  touch-action:pan-y!important;
}
html[data-device="android"] .sidebar button,
html[data-device="iphone"] .sidebar button{
  touch-action:manipulation!important;
}

/* Pull refresh indicator remains visual-only; it never captures touch. */
#fbizPullRefresh{
  pointer-events:none!important;
}


/* =========================================================
   F&Biz V5.5 — Native Printer option always visible
   ========================================================= */
.native-printer-entry{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
  padding:10px;
  border:1px solid #dfe6f3;
  border-radius:11px;
  background:#fff;
}
.native-printer-entry>div{min-width:0}
.native-printer-entry strong,
.native-printer-entry span{display:block}
.native-printer-entry strong{font-size:11px;color:#1d2939}
.native-printer-entry span{margin-top:2px;font-size:8px;color:#7a8494}
.native-printer-entry.ready{
  border-color:#c9d8f8;
  background:#f5f8ff;
}
.native-printer-entry.needs-apk{
  border-style:dashed;
  background:#fafafa;
}


/* =========================================================
   F&Biz V5.7 — Native printer stability
   ========================================================= */
.native-printer-device:disabled{
  opacity:.58;
  cursor:wait;
}
.native-printer-device:disabled em{
  color:#667085;
}


/* =========================================================
   F&Biz V5.9 — LIGHT APP / MANUAL REFRESH / FREE SCROLL
   ========================================================= */

/* Pull-to-refresh is disabled. */
#fbizPullRefresh{display:none!important}

/* Manual refresh button */
.topbar-refresh-btn{
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 9px;
  border:1px solid #dfe5ed;
  border-radius:9px;
  background:#fff;
  color:#344054;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
  flex:0 0 auto;
}
.topbar-refresh-btn:active{background:#f1f5f9}
.topbar-refresh-btn:disabled{opacity:.6;cursor:wait}
.topbar-refresh-btn .refresh-icon{
  display:inline-block;
  font-size:14px;
  line-height:1;
}
.topbar-refresh-btn.refreshing .refresh-icon{
  animation:fbizManualRefreshSpin .75s linear infinite;
}
@keyframes fbizManualRefreshSpin{to{transform:rotate(360deg)}}

/* IMPORTANT:
   Modal/detail screens must allow both horizontal and vertical finger movement.
   Earlier builds forced pan-y, which made horizontal swipe feel insensitive. */
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body{
  overflow:auto!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  touch-action:pan-x pan-y!important;
  overscroll-behavior:auto!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Employee detail and all wide data areas may be swiped naturally sideways. */
html[data-device="android"] .employee-detail,
html[data-device="iphone"] .employee-detail,
html[data-device="android"] .admin-employee-tabs,
html[data-device="iphone"] .admin-employee-tabs,
html[data-device="android"] .employee-profile-list,
html[data-device="iphone"] .employee-profile-list,
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap,
html[data-device="android"] .report-table-wrap,
html[data-device="iphone"] .report-table-wrap{
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Tables should grab horizontal movement immediately without waiting
   for a large swipe threshold. */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  scroll-behavior:auto!important;
  overscroll-behavior-x:contain!important;
  scrollbar-width:thin;
}

/* Wide modal content can exceed viewport and be swiped horizontally if needed. */
html[data-device="android"] .modal-body > .employee-detail,
html[data-device="iphone"] .modal-body > .employee-detail{
  min-width:0!important;
  width:max-content!important;
  max-width:none!important;
}
@media(max-width:900px){
  html[data-device="android"] .modal-body > .employee-detail,
  html[data-device="iphone"] .modal-body > .employee-detail{
    width:100%!important;
    max-width:100%!important;
  }
}

/* Main page: pure native vertical scrolling, no global touch interception. */
html[data-device="android"],
html[data-device="iphone"],
html[data-device="android"] body,
html[data-device="iphone"] body,
html[data-device="android"] .main,
html[data-device="iphone"] .main,
html[data-device="android"] .content-shell,
html[data-device="iphone"] .content-shell,
html[data-device="android"] .page,
html[data-device="iphone"] .page{
  touch-action:auto!important;
}

/* Keep intentional horizontal/vertical scrolling explicit. */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap,
html[data-device="android"] .modal-body,
html[data-device="iphone"] .modal-body{
  touch-action:pan-x pan-y!important;
}

/* Lighter APK/WebView rendering:
   remove non-essential page animations and expensive blur effects on phones. */
html[data-device="android"] .page,
html[data-device="iphone"] .page{
  animation:none!important;
}
html[data-device="android"] .topbar,
html[data-device="iphone"] .topbar,
html[data-device="android"] .modal-foot,
html[data-device="iphone"] .modal-foot{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-device="android"] .card,
html[data-device="iphone"] .card{
  box-shadow:none!important;
}

/* Compact topbar on phone so Refresh is always accessible. */
@media(max-width:767px){
  .topbar-actions{gap:5px!important}
  .topbar-refresh-btn{
    width:32px;
    height:30px;
    padding:0;
    border-radius:8px;
  }
  .topbar-refresh-btn .refresh-label{display:none}
  .topbar-refresh-btn .refresh-icon{font-size:15px}
  .date-chip{display:none!important}
}


/* =========================================================
   F&Biz V5.10 — Sync Data in Menu
   ========================================================= */

/* Refresh/sync control belongs in Menu only. */
.topbar-refresh-btn{display:none!important}

.sidebar-sync{
  margin-bottom:6px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  background:#eef4ff!important;
  border:1px solid #d7e4ff!important;
  color:#2458c6!important;
}
.sidebar-sync:disabled{opacity:.6!important}

.data-sync-btn .sync-icon{
  display:inline-grid;
  place-items:center;
}
.data-sync-btn.refreshing .sync-icon{
  animation:fbizMenuSyncSpin .75s linear infinite;
}
@keyframes fbizMenuSyncSpin{to{transform:rotate(360deg)}}

/* The mobile More menu displays sync as a normal menu tile. */
.mobile-menu-item.data-sync-btn{
  background:#f5f8ff!important;
  border-color:#dce7ff!important;
  color:#2458c6!important;
}
.mobile-menu-item.data-sync-btn .sync-icon{
  color:#2458c6!important;
  font-size:18px!important;
}
.mobile-menu-item.data-sync-btn:disabled{
  opacity:.62!important;
}

/* On phones the fixed sidebar footer is not used as a settings menu.
   Sync is available from the More/Menu sheet instead. */
html[data-device="android"] .sidebar-footer .sidebar-sync,
html[data-device="iphone"] .sidebar-footer .sidebar-sync{
  display:none!important;
}


/* =========================================================
   F&Biz V5.11 — EMPLOYEE DETAIL TOUCH SCROLL
   ========================================================= */

/* Employee Detail gets one clear vertical scroll container.
   This avoids having to start the swipe on a specific empty area. */
.employee-detail-modal{
  min-height:0!important;
}

.employee-detail-modal .modal-body.employee-detail-scroll{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:auto!important;
  overscroll-behavior-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  scroll-behavior:auto!important;
}

/* Every normal information surface inside Employee Detail lets a vertical
   gesture pass directly to the modal body. */
.employee-detail-modal .admin-employee-detail,
.employee-detail-modal .admin-employee-header,
.employee-detail-modal .admin-employee-kpi,
.employee-detail-modal .admin-employee-tabs,
.employee-detail-modal .card,
.employee-detail-modal .card.pad,
.employee-detail-modal .section-title,
.employee-detail-modal .employee-profile-list,
.employee-detail-modal .employee-profile-list>div,
.employee-detail-modal .employee-profile-list span,
.employee-detail-modal .employee-profile-list strong,
.employee-detail-modal .mini-stat{
  touch-action:pan-y!important;
}

/* Avoid Android interpreting a drag on text as text selection. */
html[data-device="android"] .employee-detail-modal .admin-employee-detail,
html[data-device="iphone"] .employee-detail-modal .admin-employee-detail{
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none!important;
}

/* Buttons remain proper tap targets. */
.employee-detail-modal button,
.employee-detail-modal a,
.employee-detail-modal input,
.employee-detail-modal select,
.employee-detail-modal textarea,
.employee-detail-modal label{
  touch-action:manipulation!important;
}

/* Wide tables: the entire table area is a horizontal swipe target.
   Vertical swipes are still allowed, so users do not need to find a
   special part of the screen to continue scrolling down. */
.employee-detail-modal .table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
  overscroll-behavior-x:auto!important;
  overscroll-behavior-y:auto!important;
  scroll-behavior:auto!important;
}

.employee-detail-modal .table-wrap table{
  width:max-content!important;
  min-width:100%!important;
}

/* Make the horizontal swipe area extend across the full card. */
.employee-detail-modal .table-wrap th,
.employee-detail-modal .table-wrap td{
  touch-action:pan-x pan-y!important;
  -webkit-user-select:none!important;
  user-select:none!important;
}

/* Mobile: Detail Karyawan becomes a full-screen sheet.
   One full-height body is substantially easier to scroll than a nested modal. */
@media(max-width:900px){
  html[data-device="android"] .employee-detail-modal,
  html[data-device="iphone"] .employee-detail-modal{
    width:100%!important;
    height:100dvh!important;
    max-width:none!important;
    max-height:100dvh!important;
    border-radius:0!important;
    margin:0!important;
  }

  html[data-device="android"] .employee-detail-modal .modal-head,
  html[data-device="iphone"] .employee-detail-modal .modal-head{
    flex:0 0 auto!important;
    position:sticky!important;
    top:0!important;
    z-index:5!important;
    background:#fff!important;
  }

  html[data-device="android"] .employee-detail-modal .modal-body.employee-detail-scroll,
  html[data-device="iphone"] .employee-detail-modal .modal-body.employee-detail-scroll{
    flex:1 1 auto!important;
    height:auto!important;
    max-height:none!important;
    padding:10px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    touch-action:pan-y!important;
  }

  html[data-device="android"] .employee-detail-modal .modal-foot,
  html[data-device="iphone"] .employee-detail-modal .modal-foot{
    flex:0 0 auto!important;
    position:sticky!important;
    bottom:0!important;
    z-index:5!important;
  }

  .employee-detail-modal .admin-employee-tabs{
    grid-template-columns:1fr!important;
  }

  .employee-detail-modal .admin-employee-kpi{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* On very small phones keep detail content compact and easy to drag. */
@media(max-width:420px){
  .employee-detail-modal .card.pad{
    padding:10px!important;
  }
  .employee-detail-modal .employee-profile-list>div{
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:7px!important;
  }
}


/* =========================================================
   F&Biz V5.13 — EMPLOYEE DETAIL HORIZONTAL SCROLL
   ========================================================= */

/* The table itself owns horizontal gestures. */
.employee-detail-modal .employee-horizontal-scroll{
  position:relative!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:scroll!important;
  overflow-y:visible!important;
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
  scroll-behavior:auto!important;
  cursor:grab;
}

.employee-detail-modal .employee-horizontal-scroll.is-horizontal-dragging{
  cursor:grabbing;
  scroll-snap-type:none!important;
}

/* Never shrink the table to viewport width when it has many columns. */
.employee-detail-modal .employee-horizontal-scroll table{
  width:max-content!important;
  min-width:720px!important;
  max-width:none!important;
  table-layout:auto!important;
}

.employee-detail-modal .employee-horizontal-scroll th,
.employee-detail-modal .employee-horizontal-scroll td{
  white-space:nowrap!important;
  touch-action:pan-x pan-y!important;
}

/* Visual cue so it is obvious which area can move sideways. */
.employee-scroll-hint{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  margin:2px 0 7px;
  padding:5px 8px;
  border-radius:8px;
  background:#f5f8ff;
  color:#667085;
  font-size:8px;
  font-weight:750;
  border:1px solid #e3eaff;
  user-select:none;
  -webkit-user-select:none;
  pointer-events:none;
}
.employee-scroll-hint span{
  color:#2458c6;
  font-size:11px;
}

/* On phone the scroll surface should occupy the full card width. */
@media(max-width:900px){
  .employee-detail-modal .card.pad:has(.employee-horizontal-scroll){
    overflow:visible!important;
  }
  .employee-detail-modal .employee-horizontal-scroll{
    margin-left:0!important;
    margin-right:0!important;
    width:100%!important;
  }
}

/* Keep vertical scroll natural outside table areas. */
.employee-detail-modal .admin-employee-detail > *:not(.employee-horizontal-scroll){
  touch-action:pan-y!important;
}


/* =========================================================
   F&Biz V5.14 — Attendance Recovery
   ========================================================= */
.sidebar-recovery{
  margin-bottom:6px!important;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:#fff8eb!important;
  border:1px solid #f4dfb5!important;
  color:#9a6700!important;
}
.sidebar-recovery.hidden{display:none!important}

.attendance-recovery-menu-btn{
  background:#fff8eb!important;
  border-color:#f4dfb5!important;
  color:#9a6700!important;
}
.recovery-info,
.recovery-warning{
  padding:10px 11px;
  border-radius:10px;
  font-size:9px;
  line-height:1.55;
}
.recovery-info{
  background:#f5f8ff;
  border:1px solid #dfe8ff;
  color:#475467;
}
.recovery-warning{
  background:#fff8eb;
  border:1px solid #f4dfb5;
  color:#8a5b00;
}
.attendance-recovery-form .field-help{
  display:block;
  color:#98a2b3;
  font-size:8px;
  margin-top:4px;
}


/* =========================================================
   F&Biz V5.15 — ALL TABLES HORIZONTAL SCROLL
   ========================================================= */

/* Every visible table gets a dedicated horizontal scroll surface. */
.table-wrap,
.fbiz-horizontal-table{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
  scroll-behavior:auto!important;
  scrollbar-width:thin!important;
}

/* Preserve full table width instead of compressing columns into the screen. */
.table-wrap > table,
.fbiz-horizontal-table > table{
  width:max-content!important;
  min-width:100%!important;
  max-width:none!important;
  table-layout:auto!important;
}

/* All cells participate in horizontal swipe and remain readable. */
.table-wrap th,
.table-wrap td,
.fbiz-horizontal-table th,
.fbiz-horizontal-table td{
  white-space:nowrap!important;
  touch-action:pan-x pan-y!important;
}

/* While finger-dragging sideways, don't let text selection interfere. */
.fbiz-horizontal-table.is-horizontal-dragging,
.fbiz-horizontal-table.is-horizontal-dragging *{
  user-select:none!important;
  -webkit-user-select:none!important;
  -webkit-touch-callout:none!important;
}

/* Make the native horizontal scrollbar easier to notice on desktop. */
.table-wrap::-webkit-scrollbar{
  height:7px;
}
.table-wrap::-webkit-scrollbar-thumb{
  background:#c7d2e3;
  border-radius:999px;
}
.table-wrap::-webkit-scrollbar-track{
  background:#f3f5f8;
}

/* Mobile: entire table area is an active sideways swipe target. */
html[data-device="android"] .table-wrap,
html[data-device="iphone"] .table-wrap{
  overflow-x:scroll!important;
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Give genuinely wide tables a minimum canvas so hidden columns
   always remain reachable by horizontal swipe. */
@media(max-width:900px){
  .table-wrap > table{
    min-width:max(720px,100%)!important;
  }
}

/* Short/simple tables may still occupy the viewport naturally. */
@media(min-width:901px){
  .table-wrap > table{
    min-width:100%!important;
  }
}


/* =========================================================
   F&Biz V5.16 — TABLE SCROLL + INTERACTION FIX
   Root cause fix: grid/card parents were allowed to grow to the table's
   intrinsic width, leaving no actual overflow inside .table-wrap.
   ========================================================= */

/* Every layout ancestor that can contain a table must be shrinkable. */
.grid,
.section-grid,
.section-grid > *,
.card,
.card.pad,
.admin-employee-detail,
.admin-employee-detail > *,
.admin-employee-tabs,
.admin-employee-tabs > *,
.employee-attendance-layout,
.employee-attendance-layout > *,
.page,
.content-shell,
.main{
  min-width:0!important;
}

/* Do not allow a card to expand to the intrinsic table width. */
.card:has(.table-wrap),
.card.pad:has(.table-wrap){
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
}

/* The horizontal viewport itself is the only element that scrolls sideways. */
.table-wrap,
.fbiz-horizontal-table,
.employee-detail-modal .table-wrap,
.employee-detail-modal .employee-horizontal-scroll{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
  scroll-behavior:auto!important;
  position:relative!important;
}

/* The table remains wider than the viewport so clipped columns are reachable. */
.table-wrap > table,
.fbiz-horizontal-table > table,
.employee-detail-modal .table-wrap > table{
  width:max-content!important;
  min-width:760px!important;
  max-width:none!important;
  table-layout:auto!important;
  border-collapse:collapse!important;
}

/* Employee detail tables specifically: don't let nested cards grow wider. */
.employee-detail-modal .admin-employee-detail,
.employee-detail-modal .admin-employee-tabs,
.employee-detail-modal .admin-employee-tabs > .card,
.employee-detail-modal .card.pad{
  min-width:0!important;
  max-width:100%!important;
}

.employee-detail-modal .employee-detail-scroll{
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

/* Dashboard recent transaction card must stay within viewport. */
#dashboardPage .section-grid,
#dashboardPage .section-grid > .card{
  min-width:0!important;
  max-width:100%!important;
}
#dashboardPage .table-context-dashboard{
  width:100%!important;
  max-width:100%!important;
}

/* Give visual feedback that dashboard transaction rows are actionable. */
.interactive-table-row{
  cursor:pointer;
}
.interactive-table-row:active{
  background:#eef4ff!important;
}
.table-context-dashboard::after{
  content:"Geser kiri/kanan untuk melihat kolom • ketuk baris untuk lihat struk";
  display:block;
  position:sticky;
  left:0;
  width:max-content;
  max-width:calc(100vw - 70px);
  padding:6px 8px;
  color:#667085;
  font-size:8px;
  font-weight:700;
  background:#f8faff;
  border-top:1px solid #edf0f4;
}

/* Keep horizontal swipe possible from cells, badges, and non-button content. */
.table-wrap td,
.table-wrap th,
.table-wrap td span,
.table-wrap td strong,
.table-wrap th span,
.table-wrap th strong{
  touch-action:pan-x pan-y!important;
}

/* Buttons inside tables remain tappable. */
.table-wrap button,
.table-wrap a{
  touch-action:manipulation!important;
}

/* Mobile: use practically full available width and keep visible scrollbar cue. */
@media(max-width:900px){
  .table-wrap > table,
  .fbiz-horizontal-table > table,
  .employee-detail-modal .table-wrap > table{
    min-width:760px!important;
  }

  .table-wrap{
    scrollbar-width:auto!important;
  }

  .table-wrap::-webkit-scrollbar{
    height:6px!important;
  }
}

/* Older browsers without :has still get containment through common card layout. */
@supports not selector(:has(*)){
  #dashboardPage .card.pad,
  .employee-detail-modal .card.pad{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
}


/* =========================================================
   F&Biz V5.17 — Attendance Correction Request
   ========================================================= */
.attendance-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.attendance-correction-admin-card{
  margin-bottom:16px;
  border-left:3px solid #f79009!important;
}
.correction-info{
  padding:10px 11px;
  border-radius:10px;
  background:#f5f8ff;
  border:1px solid #dfe8ff;
  color:#475467;
  font-size:9px;
  line-height:1.55;
}
.attendance-correction-form .field-help{
  display:block;
  color:#98a2b3;
  font-size:8px;
  margin-top:4px;
}
.correction-review-summary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.correction-review-summary>div{
  display:grid;
  gap:3px;
  padding:9px 10px;
  border:1px solid #e4e7ec;
  border-radius:9px;
  background:#fbfcfe;
}
.correction-review-summary>div.full{
  grid-column:1/-1;
}
.correction-review-summary span{
  color:#667085;
  font-size:8px;
  font-weight:700;
}
.correction-review-summary strong{
  color:#101828;
  font-size:10px;
}
.attendance-correction-table td:nth-child(6){
  max-width:280px;
  white-space:normal!important;
}
@media(max-width:767px){
  .attendance-head-actions{
    width:100%;
    justify-content:space-between;
  }
  .attendance-head-actions .btn{
    flex:1 1 auto;
  }
  .correction-review-summary{
    grid-template-columns:1fr;
  }
  .correction-review-summary>div.full{
    grid-column:auto;
  }
}


/* =========================================================
   F&Biz V5.18 — Loyalty Program
   ========================================================= */
.loyalty-hero{
  margin-bottom:14px;
}
.loyalty-kpi-grid .kpi-card::before{background:#7c3aed!important}
.loyalty-settings-grid{
  grid-template-columns:1.2fr .8fr;
}
.loyalty-rule-preview{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #e9e2ff;
  background:#f8f5ff;
  color:#5b21b6;
  border-radius:10px;
  font-size:11px;
  font-weight:800;
}
.loyalty-portal-box{
  display:grid;
  gap:8px;
  padding:12px;
  border:1px solid #e4e7ec;
  border-radius:11px;
  background:#fbfcfe;
}
.loyalty-portal-box>span{
  color:#667085;
  font-size:9px;
  font-weight:700;
}
.loyalty-portal-box>strong{
  display:block;
  word-break:break-all;
  font-size:10px;
  color:#344054;
}
.loyalty-help{
  margin-top:10px;
  padding:9px 10px;
  background:#f8fafc;
  border:1px solid #edf0f4;
  border-radius:9px;
  color:#667085;
  font-size:9px;
  line-height:1.5;
}
.member-points-inline{
  display:block!important;
  margin-top:3px;
  color:#6941c6!important;
  font-weight:800!important;
  font-size:9px!important;
}
.loyalty-cart-preview{
  display:grid;
  grid-template-columns:1fr auto;
  gap:2px 10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #e9e2ff;
  background:#faf8ff;
  border-radius:10px;
  color:#475467;
}
.loyalty-cart-preview span{
  font-size:9px;
  font-weight:700;
}
.loyalty-cart-preview strong{
  color:#6941c6;
  font-size:12px;
}
.loyalty-cart-preview small{
  grid-column:1/-1;
  color:#8b8fa3;
  font-size:8px;
}
.loyalty-plus{color:#027a48!important}
.loyalty-minus{color:#b42318!important}
.redeem-code{
  letter-spacing:.08em;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.loyalty-member-summary{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 11px;
  border:1px solid #e4e7ec;
  border-radius:10px;
  background:#fbfcfe;
}
.loyalty-member-summary strong{font-size:12px}
.loyalty-member-summary span{font-size:9px;color:#667085}
@media(max-width:900px){
  .loyalty-settings-grid{grid-template-columns:1fr!important}
}
@media(max-width:767px){
  .loyalty-hero .hero-actions{
    width:100%;
    display:grid!important;
    grid-template-columns:1fr 1fr;
  }
  .loyalty-settings-grid .card.pad{
    min-width:0!important;
  }
}


/* =========================================================
   F&Biz V5.21 — Cashier Assisted Loyalty Claim
   ========================================================= */
.cashier-benefit-loading{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:10px;
  padding:14px;
  border:1px solid #e4e7ec;
  border-radius:12px;
  background:#fbfcfe;
}
.cashier-benefit-loading div:nth-child(2){
  display:grid;
  gap:2px;
}
.cashier-benefit-loading div:nth-child(2) span{
  color:#667085;
  font-size:9px;
}
.cashier-benefit-loading p{
  grid-column:1/-1;
  margin:3px 0 0;
  color:#667085;
  font-size:9px;
}
.cashier-benefit-member{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:12px;
  border:1px solid #dfe7f2;
  background:#f8fbff;
}
.cashier-benefit-member-info{
  display:grid;
  gap:2px;
  min-width:0;
}
.cashier-benefit-member-info>span{
  color:#667085;
  font-size:9px;
}
.cashier-benefit-points{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:3px;
}
.cashier-benefit-points b{
  font-size:10px;
  color:#2458c6;
}
.cashier-benefit-points small{
  color:#98a2b3;
  font-size:8px;
}
.cashier-benefit-section{
  margin-top:15px;
}
.cashier-benefit-list{
  display:grid;
  gap:8px;
}
.cashier-benefit-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #e4e7ec;
  border-radius:11px;
  background:#fff;
}
.cashier-benefit-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#f1f5ff;
  color:#2458c6;
  font-weight:900;
  font-size:14px;
}
.cashier-benefit-info{
  min-width:0;
}
.cashier-benefit-title{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.cashier-benefit-info p{
  margin:3px 0;
  color:#667085;
  font-size:9px;
  line-height:1.45;
}
.cashier-benefit-info small{
  color:#98a2b3;
  font-size:8px;
}
.benefit-used{
  font-size:7px;
  padding:2px 6px;
  border-radius:999px;
  background:#f2f4f7;
  color:#667085;
  font-weight:800;
}
.cashier-benefit-action{
  display:flex;
  justify-content:flex-end;
  min-width:110px;
}
.cashier-benefit-note{
  margin-top:13px;
  padding:9px 10px;
  border-radius:9px;
  background:#fffaeb;
  border:1px solid #fedf89;
  color:#7a5d00;
  font-size:8px;
  line-height:1.5;
}
.cashier-claim-confirm{
  display:grid;
  gap:10px;
}
.cashier-claim-confirm h3{
  margin:0;
}
.cashier-claim-confirm p{
  margin:0;
  color:#667085;
  font-size:9px;
  line-height:1.5;
}
.cashier-claim-confirm label{
  display:grid;
  gap:5px;
}
.cashier-claim-confirm label small{
  color:#98a2b3;
  font-size:8px;
}
@media(max-width:767px){
  .cashier-benefit-member{
    grid-template-columns:auto 1fr;
  }
  .cashier-benefit-member>.badge{
    grid-column:1/-1;
    justify-self:start;
  }
  .cashier-benefit-card{
    grid-template-columns:auto minmax(0,1fr);
  }
  .cashier-benefit-action{
    grid-column:1/-1;
    min-width:0;
  }
  .cashier-benefit-action .btn{
    width:100%;
  }
}


/* =========================================================
   F&Biz V5.22 — Automatic Promo / Reward Application
   ========================================================= */
.cart-promo-line{
  margin-top:4px;
  padding:4px 7px;
  border-radius:7px;
  background:#ecfdf3;
  color:#027a48;
  font-size:8px;
  font-weight:800;
  width:max-content;
}
.cart-active-benefit{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 11px;
  margin-bottom:10px;
  border:1px solid #abefc6;
  background:#ecfdf3;
  border-radius:10px;
}
.cart-active-benefit>div{
  display:grid;
  gap:2px;
}
.cart-active-benefit span{
  font-size:7px;
  font-weight:900;
  letter-spacing:.05em;
  color:#027a48;
}
.cart-active-benefit strong{
  color:#05603a;
  font-size:10px;
}
.cart-active-benefit small{
  color:#47725f;
  font-size:8px;
}
.promo-auto-result{
  color:#027a48;
  border-top:1px dashed #abefc6;
  margin-top:6px;
  padding-top:7px;
}
#loyaltyPromoForm [data-benefit-field].hidden,
#loyaltyRewardForm [data-benefit-field].hidden{
  display:none!important;
}


/* =========================================================
   F&Biz V5.23 — Promo Image Upload
   ========================================================= */
.loyalty-promo-image-field{
  display:grid;
  gap:8px;
}
.loyalty-promo-image-label{
  font-weight:800;
  font-size:9px;
  color:#344054;
}
.loyalty-promo-image-preview{
  width:min(100%,520px);
  aspect-ratio:16/9;
  border:1.5px dashed #d0d5dd;
  border-radius:12px;
  background:#f8fafc;
  display:grid;
  place-items:center;
  overflow:hidden;
  color:#98a2b3;
  font-size:9px;
  font-weight:700;
}
.loyalty-promo-image-preview.has-image{
  border-style:solid;
}
.loyalty-promo-image-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.loyalty-promo-upload-button{
  width:max-content;
  max-width:100%;
  cursor:pointer;
}
.loyalty-promo-upload-button input{
  position:absolute;
  opacity:0;
  pointer-events:none;
  width:1px;
  height:1px;
}
.loyalty-promo-upload-button span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 13px;
  border-radius:9px;
  background:#eef2ff;
  border:1px solid #d9e0ff;
  color:#3448a8;
  font-size:9px;
  font-weight:850;
}
.loyalty-promo-image-guide{
  display:grid;
  gap:2px;
  width:min(100%,520px);
  padding:9px 10px;
  border-radius:9px;
  background:#f8fafc;
  border:1px solid #eaecf0;
}
.loyalty-promo-image-guide strong{
  color:#344054;
  font-size:8px;
}
.loyalty-promo-image-guide span{
  color:#667085;
  font-size:8px;
  line-height:1.45;
}
.loyalty-promo-image-info{
  min-height:14px;
  color:#027a48;
  font-size:8px;
  line-height:1.45;
}
.loyalty-promo-image-info.warning{
  color:#b54708;
}


/* =========================================================
   F&Biz V5.27 — Loyalty Table Filters
   ========================================================= */
.loyalty-table-filter{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin:10px 0 9px;
  padding:8px;
  border:1px solid #eaecf0;
  border-radius:10px;
  background:#f8fafc;
}
.loyalty-filter-search{
  display:flex;
  align-items:center;
  gap:6px;
  flex:1 1 220px;
  min-width:180px;
  height:36px;
  padding:0 10px;
  border:1px solid #d0d5dd;
  border-radius:8px;
  background:#fff;
}
.loyalty-filter-search span{
  color:#98a2b3;
  font-size:13px;
}
.loyalty-filter-search input{
  width:100%;
  min-width:0;
  padding:0;
  border:0!important;
  outline:0;
  background:transparent;
  box-shadow:none!important;
  font-size:9px;
}
.loyalty-table-filter>select{
  width:auto;
  min-width:135px;
  height:36px;
  padding:0 28px 0 9px;
  font-size:9px;
}
.loyalty-filter-reset{
  min-height:36px;
  padding:0 11px;
}
.loyalty-filter-count{
  margin-left:auto;
  white-space:nowrap;
  color:#667085;
  font-size:8px;
  font-weight:800;
}
.loyalty-filter-empty{
  margin-top:8px;
}
.loyalty-filter-table tr[hidden]{
  display:none!important;
}
@media(max-width:767px){
  .loyalty-table-filter{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .loyalty-filter-search{
    grid-column:1/-1;
    width:100%;
  }
  .loyalty-table-filter>select{
    width:100%;
    min-width:0;
  }
  .loyalty-filter-reset{
    width:100%;
  }
  .loyalty-filter-count{
    margin-left:0;
    align-self:center;
    justify-self:end;
  }
}


/* =========================================================
   F&Biz V5.28 — Realtime Expense & Profit/Loss
   ========================================================= */
.finance-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:linear-gradient(135deg,#ffffff,#f7faff);
}
.finance-hero h2{
  margin:4px 0 5px;
  font-size:18px;
}
.finance-hero p{
  margin:0;
  color:#667085;
  font-size:9px;
}
.finance-eyebrow{
  font-size:8px;
  font-weight:900;
  letter-spacing:.09em;
  color:#4756c7;
}
.finance-hero-actions{
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
}
.finance-filter-card{
  margin-top:12px;
}
.finance-kpi-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
.finance-formula-strip{
  margin-top:12px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  padding:11px 13px;
  border-radius:11px;
  border:1px solid #dfe4ea;
}
.finance-formula-strip.positive{
  background:#ecfdf3;
  border-color:#abefc6;
}
.finance-formula-strip.negative{
  background:#fef3f2;
  border-color:#fecdca;
}
.finance-formula-strip span,
.finance-formula-strip small{
  color:#667085;
  font-size:8px;
}
.finance-formula-strip strong{
  text-align:center;
  font-size:11px;
}
.finance-profit-positive{
  color:#027a48;
}
.finance-profit-negative{
  color:#b42318;
}
.finance-pnl-table td,
.finance-pnl-table th{
  white-space:nowrap;
}
@media(max-width:1100px){
  .finance-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:767px){
  .finance-hero{
    align-items:flex-start;
    flex-direction:column;
  }
  .finance-hero-actions{
    width:100%;
  }
  .finance-hero-actions .btn{
    flex:1 1 auto;
  }
  .finance-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .finance-formula-strip{
    grid-template-columns:1fr;
  }
  .finance-formula-strip strong{
    text-align:left;
  }
}


/* =========================================================
   F&Biz V5.29 — Network Stability
   ========================================================= */
.cloud-status.unstable{
  background:#fffaeb;
  border-color:#fedf89;
  color:#b54708;
}
.cloud-status.unstable span{
  background:#f79009;
  box-shadow:0 0 0 3px rgba(247,144,9,.12);
  animation:fbiz-network-pulse 1.2s ease-in-out infinite;
}
.mobile-cloud-pill.unstable{
  background:#fffaeb;
  color:#b54708;
}
@keyframes fbiz-network-pulse{
  0%,100%{opacity:1}
  50%{opacity:.45}
}


/* =========================================================
   F&Biz V6.0 — Midtrans Dynamic QRIS
   ========================================================= */
.dynamic-qris-hint{
  display:flex;flex-direction:column;gap:3px;
}
.dynamic-qris-hint strong{color:#344054}
.dynamic-qris-modal{display:flex;flex-direction:column;align-items:center;gap:11px;text-align:center}
.dynamic-qris-env{
  width:100%;display:flex;justify-content:space-between;align-items:center;
  padding:9px 12px;border-radius:10px;font-size:9px;font-weight:900;letter-spacing:.05em
}
.dynamic-qris-env.sandbox,.midtrans-environment-banner.sandbox{
  background:#fff6ed;color:#b54708;border:1px solid #fedf89
}
.dynamic-qris-env.production,.midtrans-environment-banner.production{
  background:#ecfdf3;color:#027a48;border:1px solid #abefc6
}
.dynamic-qris-provider{font-size:9px;font-weight:900;letter-spacing:.08em;color:#667085}
.dynamic-qris-amount{font-size:28px;font-weight:950;letter-spacing:-.04em;color:#101828}
.dynamic-qris-code{
  width:min(290px,72vw);aspect-ratio:1/1;padding:10px;background:#fff;border:1px solid #eaecf0;
  border-radius:16px;display:grid;place-items:center;box-shadow:0 8px 24px rgba(16,24,40,.08)
}
.dynamic-qris-code img{width:100%;height:100%;object-fit:contain;image-rendering:auto}
.dynamic-payment-status{
  width:100%;display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:10px;border:1px solid #eaecf0
}
.dynamic-payment-status.success{background:#ecfdf3;border-color:#abefc6;color:#027a48}
.dynamic-payment-status.warning{background:#fffaeb;border-color:#fedf89;color:#b54708}
.dynamic-payment-status.danger{background:#fef3f2;border-color:#fecdca;color:#b42318}
.dynamic-payment-status.neutral{background:#f8fafc;color:#475467}
.dynamic-payment-status strong{font-size:10px}
.dynamic-payment-status span{font-size:8px}
.dynamic-qris-countdown{display:flex;gap:8px;align-items:center;color:#667085;font-size:9px}
.dynamic-qris-countdown strong{font-size:15px;color:#101828;font-variant-numeric:tabular-nums}
.dynamic-qris-info{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dynamic-qris-info>div,.payment-setting-summary>div,.payment-detail-grid>div{
  min-width:0;padding:9px;border-radius:9px;background:#f8fafc;border:1px solid #eaecf0;
  display:flex;flex-direction:column;gap:3px;text-align:left
}
.dynamic-qris-info span,.payment-setting-summary span,.payment-detail-grid span{font-size:7px;text-transform:uppercase;letter-spacing:.05em;color:#667085;font-weight:800}
.dynamic-qris-info strong,.payment-setting-summary strong,.payment-detail-grid strong{font-size:9px;overflow-wrap:anywhere}
.dynamic-qris-note{width:100%;padding:10px;border-radius:9px;background:#f2f4f7;color:#475467;font-size:8px}
.dynamic-qris-loading{min-height:190px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center}
.dynamic-qris-loading span{font-size:8px;color:#667085}
.spinner{width:28px;height:28px;border:3px solid #eaecf0;border-top-color:#4756c7;border-radius:50%;animation:fbiz-spin .75s linear infinite}
@keyframes fbiz-spin{to{transform:rotate(360deg)}}

.payment-admin-hero{
  display:flex;justify-content:space-between;align-items:center;gap:14px;padding:15px 17px;border-radius:13px;border:1px solid #eaecf0
}
.payment-admin-hero.sandbox{background:linear-gradient(135deg,#fff9f1,#fff);border-color:#fedf89}
.payment-admin-hero.production{background:linear-gradient(135deg,#ecfdf3,#fff);border-color:#abefc6}
.payment-admin-hero span{font-size:8px;font-weight:900;letter-spacing:.1em;color:#667085}
.payment-admin-hero h2{font-size:18px;margin:4px 0}
.payment-admin-hero p{font-size:8px;color:#667085;margin:0}
.payment-admin-actions{display:flex;gap:7px;flex-wrap:wrap}
.payment-admin-tabs{display:flex;gap:4px;margin:12px 0;background:#f2f4f7;padding:4px;border-radius:10px;overflow:auto}
.payment-admin-tabs button{
  appearance:none;border:0;background:transparent;padding:8px 11px;border-radius:7px;font-size:9px;font-weight:800;white-space:nowrap;cursor:pointer
}
.payment-admin-tabs button.active{background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.12);color:#344054}
.payment-env-switch{display:flex;gap:5px;background:#f2f4f7;padding:4px;border-radius:9px;margin-bottom:12px}
.payment-env-switch button{flex:1;border:0;border-radius:7px;background:transparent;padding:8px;font-size:9px;font-weight:900;cursor:pointer}
.payment-env-switch .active.sandbox{background:#fff6ed;color:#b54708}
.payment-env-switch .active.production{background:#ecfdf3;color:#027a48}
.payment-setting-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.payment-setting-buttons{margin-top:12px}
.payment-webhook-box{
  margin-top:12px;padding:11px;border:1px dashed #98a2b3;border-radius:10px;background:#f8fafc;
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px
}
.payment-webhook-box>span{font-size:8px;font-weight:900;color:#475467}
.payment-webhook-box code{font-size:8px;overflow-wrap:anywhere}
.payment-webhook-box small{grid-column:1/-1;color:#667085;font-size:7px}
.payment-branch-list{display:flex;flex-direction:column;gap:7px}
.payment-branch-card{
  display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(180px,1fr) auto auto;align-items:center;gap:8px;
  padding:9px;border:1px solid #eaecf0;border-radius:9px;background:#fff
}
.payment-branch-card>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.payment-branch-card>div strong{font-size:9px}
.payment-branch-card>div span,.payment-inherit-note{font-size:7px;color:#667085}
.payment-branch-card select{min-width:0}
.midtrans-environment-banner{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;border-radius:9px}
.midtrans-environment-banner strong{font-size:11px}
.midtrans-environment-banner span{font-size:8px;font-weight:900}
.secret-warning{font-size:8px;color:#475467;padding:9px;border-radius:8px;background:#f2f4f7}
.payment-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.payment-detail-grid .full{grid-column:1/-1}
.payment-anomaly{background:#fef3f2!important;border-color:#fecdca!important;color:#b42318}
.click-row{cursor:pointer}
.click-row:hover td{background:#f8fafc}

@media(max-width:900px){
  .payment-setting-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .payment-branch-card{grid-template-columns:1fr 1fr}
}
@media(max-width:767px){
  .payment-admin-hero{align-items:flex-start;flex-direction:column}
  .payment-admin-actions{width:100%}
  .payment-admin-actions .btn{flex:1}
  .payment-setting-summary{grid-template-columns:1fr 1fr}
  .payment-webhook-box{grid-template-columns:1fr}
  .payment-webhook-box small{grid-column:auto}
  .payment-branch-card{grid-template-columns:1fr}
  .payment-branch-card .btn,.payment-branch-card select{width:100%}
  .dynamic-qris-code{width:min(270px,78vw)}
  .dynamic-qris-info,.payment-detail-grid{grid-template-columns:1fr}
  .payment-detail-grid .full{grid-column:auto}
}


/* =========================================================
   F&Biz V6.2 — Filter Riwayat Kas & Transaksi
   ========================================================= */
.history-filter-toolbar{
  display:grid;
  grid-template-columns:minmax(210px,1.4fr) repeat(5,minmax(130px,1fr)) auto;
  gap:8px;
  align-items:end;
  margin:10px 0 12px;
  padding:10px;
  border:1px solid var(--line,#e5e7eb);
  border-radius:12px;
  background:#f8fafc;
}
.history-filter-toolbar input,
.history-filter-toolbar select{
  width:100%;
  min-width:0;
  height:38px;
}
.history-filter-search{
  min-width:0;
}
.history-filter-search .search{
  min-width:0;
  width:100%;
}
.history-main-toolbar{
  margin-bottom:8px;
}
.history-main-toolbar .result-count{
  white-space:nowrap;
}
@media(max-width:1100px){
  .history-filter-toolbar{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .history-filter-search{
    grid-column:1/-1;
  }
}
@media(max-width:767px){
  .history-filter-toolbar,
  .history-filter-toolbar-transactions{
    grid-template-columns:1fr 1fr;
  }
  .history-filter-search{
    grid-column:1/-1;
  }
  .history-filter-toolbar .btn{
    width:100%;
  }
}
@media(max-width:480px){
  .history-filter-toolbar,
  .history-filter-toolbar-transactions{
    grid-template-columns:1fr;
  }
  .history-filter-search{
    grid-column:auto;
  }
}


/* =========================================================
   F&Biz V6.3 — Payment Module Loading Fix
   ========================================================= */
.dynamic-qris-loading{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:180px;
  gap:8px;
  text-align:center;
}
.dynamic-qris-loading span{
  font-size:9px;
  color:#667085;
}
.payment-module-error{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:14px;
  align-items:center;
  border-color:#fecdca;
  background:#fffafa;
}
.payment-module-error-icon{
  width:38px;
  height:38px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#fef3f2;
  color:#b42318;
  font-size:18px;
  font-weight:900;
}
.payment-module-error-copy h3{
  margin:0 0 4px;
}
.payment-module-error-copy p{
  margin:0 0 4px;
  color:#b42318;
  font-weight:700;
}
.payment-module-error-copy small{
  color:#667085;
}
.payment-module-error-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}
@media(max-width:767px){
  .payment-module-error{
    grid-template-columns:auto 1fr;
  }
  .payment-module-error-actions{
    grid-column:1/-1;
  }
  .payment-module-error-actions .btn{
    flex:1 1 140px;
  }
}


/* =========================================================
   F&Biz V6.4 — Compact In-Table History Filters
   ========================================================= */
.history-table-head{
  margin-bottom:8px;
}
.history-head-actions{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
}
.btn.btn-xs{
  min-height:28px;
  padding:5px 9px;
  font-size:8px;
  border-radius:8px;
}
.history-table-shell{
  border:1px solid var(--line,#e5e7eb);
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.history-filter-inline{
  display:flex;
  gap:5px;
  align-items:center;
  flex-wrap:wrap;
  padding:6px 7px;
  border-bottom:1px solid var(--line,#e5e7eb);
  background:#f8fafc;
}
.history-filter-inline .compact-filter{
  width:auto;
  min-width:105px;
  max-width:150px;
  height:28px;
  min-height:28px;
  padding:3px 7px;
  border-radius:7px;
  font-size:8px;
  line-height:1.1;
  background:#fff;
}
.history-filter-inline .compact-search{
  min-width:125px;
  max-width:175px;
  flex:1 1 140px;
}
.history-filter-inline-transactions .compact-filter{
  min-width:100px;
}
.history-table-shell .table-wrap{
  border:0;
  border-radius:0;
  margin:0;
}
.history-table-shell table{
  margin:0;
}
.history-table-shell table thead th{
  padding-top:8px;
  padding-bottom:8px;
}
@media(max-width:767px){
  .history-filter-inline{
    gap:4px;
    padding:5px;
    overflow-x:auto;
    flex-wrap:nowrap;
    -webkit-overflow-scrolling:touch;
  }
  .history-filter-inline .compact-filter,
  .history-filter-inline-transactions .compact-filter{
    flex:0 0 auto;
    min-width:102px;
    max-width:128px;
    height:27px;
    min-height:27px;
    font-size:8px;
  }
  .history-filter-inline .compact-search{
    min-width:115px;
    max-width:145px;
  }
  .history-head-actions{
    gap:4px;
  }
  .btn.btn-xs{
    min-height:27px;
    padding:4px 7px;
    font-size:8px;
  }
}
