: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;
  }
}
