*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f4f1fa;--surface:#fff;--surface-2:#f7f5fc;--sidebar:#1e1035;--sidebar-2:#2a1755;
  --text:#0f172a;--muted:#64748b;--line:#e6e0f5;--accent:#8b5cf6;--accent-2:#7c3aed;
  --accent-soft:#ede9fe;--blue:#3b82f6;--amber:#f59e0b;--danger:#ef4444;
  --shadow:0 1px 2px rgba(80,55,150,.05),0 8px 24px -12px rgba(80,55,150,.18);
  --shadow-lg:0 20px 50px -20px rgba(80,55,150,.35);
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
}
html,body{height:100%;overscroll-behavior-y:contain}
body{font-family:'Inter','Segoe UI',system-ui,-apple-system,'Noto Sans Devanagari',sans-serif;
  background:radial-gradient(1200px 600px at 100% -10%,#efe8fc 0%,var(--bg) 45%) fixed;color:var(--text);
  -webkit-font-smoothing:antialiased;overflow-x:hidden;padding-top:var(--safe-top)}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit;outline:none}
button{cursor:pointer;border:none;background:none;-webkit-tap-highlight-color:transparent}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-thumb{background:#c7d0dd;border-radius:9px}
#app{display:flex;min-height:100vh}

/* ---- LOGIN / WELCOME / CASHIER ---- */
.auth-overlay{position:fixed;inset:0;z-index:9990;
  background:radial-gradient(900px 600px at 20% 0%,#2a1755 0%,#1e1035 60%,#120822 100%);
  display:grid;place-items:center;padding:20px;color:#fff;animation:fadeIn .3s both}
.auth-overlay[style*="none"]{display:none!important}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.auth-card{width:100%;max-width:420px;background:rgba(255,255,255,.06);backdrop-filter:blur(20px);
  border:1px solid rgba(255,255,255,.12);border-radius:24px;padding:32px 28px;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7);animation:authIn .5s cubic-bezier(.2,1.1,.35,1) both}
@keyframes authIn{from{opacity:0;transform:translateY(30px) scale(.94)}to{opacity:1;transform:none}}
.auth-logo{width:76px;height:76px;margin:0 auto 14px;border-radius:22px;
  background:linear-gradient(180deg,#c084fc,#8b5cf6 50%,#7c3aed);display:grid;place-items:center;font-size:38px;
  box-shadow:0 14px 40px -10px rgba(124,58,237,.75),inset 0 1px 0 rgba(255,255,255,.4)}
.auth-card h2{text-align:center;font-size:22px;font-weight:900;letter-spacing:-.4px;margin-bottom:4px}
.auth-card .auth-sub{text-align:center;font-size:12.5px;color:#a78bfa;margin-bottom:22px}
.auth-card .field label{color:#c4b5fd}
.auth-card .inp{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.18);color:#fff}
.auth-card .inp::placeholder{color:#7c6ba8}
.auth-card .inp:focus{border-color:#c084fc;background:rgba(255,255,255,.12)}
.auth-msg{margin-top:12px;text-align:center;font-size:12.8px;font-weight:800;min-height:18px;color:#f87171}
.auth-hint{margin-top:16px;text-align:center;font-size:11.5px;color:#7c6ba8}
.auth-hint code{background:rgba(255,255,255,.08);padding:2px 6px;border-radius:6px;color:#c4b5fd;font-size:11px}

.cashier-list{display:grid;gap:9px;margin-bottom:14px}
.cashier-item{display:flex;align-items:center;gap:12px;padding:13px 15px;border-radius:14px;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);cursor:pointer;transition:.18s;color:#fff}
.cashier-item:hover{background:rgba(139,92,246,.28);transform:translateX(4px);border-color:#c084fc}
.cashier-item .c-avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(180deg,#c084fc,#7c3aed);
  display:grid;place-items:center;font-weight:900;font-size:16px;color:#fff}
.cashier-item .c-info{flex:1}
.cashier-item .c-info b{display:block;font-size:14px}
.cashier-item .c-info span{font-size:11.5px;color:#a78bfa}
.cashier-item .c-arrow{font-size:18px;color:#c084fc}

/* WELCOME CARD */
.welcome-card{text-align:center;color:#fff;padding:20px;
  animation:welcomeZoom .8s cubic-bezier(.2,1.2,.4,1) both}
@keyframes welcomeZoom{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}
.welcome-logo{width:120px;height:120px;margin:0 auto 20px;border-radius:32px;
  background:linear-gradient(180deg,#c084fc,#8b5cf6 50%,#ec4899);display:grid;place-items:center;font-size:64px;
  box-shadow:0 30px 80px -10px rgba(236,72,153,.7),0 0 0 8px rgba(255,255,255,.06);
  animation:logoFloat 2.4s ease-in-out infinite}
@keyframes logoFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
.welcome-card h2{font-size:42px;font-weight:900;letter-spacing:-1.5px;
  background:linear-gradient(135deg,#fff,#c4b5fd);-webkit-background-clip:text;background-clip:text;color:transparent;
  margin-bottom:14px;text-shadow:0 0 40px rgba(196,181,253,.5)}
.welcome-card p{font-size:22px;font-weight:800;line-height:1.5;color:#ede9fe;margin-bottom:20px;letter-spacing:-.3px}
.welcome-sub{font-size:13px;color:#a78bfa;letter-spacing:2px;text-transform:uppercase;font-weight:700;margin-top:20px}
.welcome-wave{display:flex;gap:6px;justify-content:center;align-items:center;height:50px;margin-top:14px}
.welcome-wave span{width:6px;height:14px;border-radius:3px;background:linear-gradient(180deg,#c084fc,#ec4899);
  animation:welcomeBar .9s ease-in-out infinite}
.welcome-wave span:nth-child(2){animation-delay:.1s}
.welcome-wave span:nth-child(3){animation-delay:.2s}
.welcome-wave span:nth-child(4){animation-delay:.3s}
.welcome-wave span:nth-child(5){animation-delay:.4s}
@keyframes welcomeBar{0%,100%{height:14px;opacity:.6}50%{height:46px;opacity:1}}

/* SIDEBAR */
.sidebar{width:250px;flex:0 0 250px;background:linear-gradient(175deg,var(--sidebar),var(--sidebar-2));
  color:#cbd5e1;position:fixed;inset:0 auto 0 0;z-index:60;display:flex;flex-direction:column;transition:transform .35s}
.brand{display:flex;align-items:center;gap:11px;padding:20px 20px 16px}
.brand-logo{width:44px;height:44px;border-radius:13px;flex:0 0 44px;
  background:linear-gradient(180deg,#c084fc,#8b5cf6 50%,#7c3aed);display:grid;place-items:center;font-size:22px;overflow:hidden}
.brand-logo img{width:100%;height:100%;object-fit:cover}
.brand-txt b{display:block;color:#fff;font-size:14.5px}
.brand-txt span{font-size:10.5px;color:#a695c9;letter-spacing:.7px;text-transform:uppercase}
.nav{flex:1;overflow-y:auto;padding:6px 12px 20px}
.nav-group{margin-top:14px}
.nav-title{font-size:10px;letter-spacing:1.4px;color:#7a68a3;padding:8px 12px 6px;font-weight:700}
.nav-item{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:11px;color:#a9b7cb;
  font-size:13.3px;font-weight:500;position:relative;transition:.18s;width:100%;text-align:left}
.nav-item i{width:18px;text-align:center;font-style:normal;font-size:15px}
.nav-item:hover{background:rgba(255,255,255,.06);color:#fff}
.nav-item.active{background:linear-gradient(90deg,rgba(139,92,246,.24),rgba(139,92,246,.05));color:#fff}
.nav-item.active::before{content:'';position:absolute;left:-12px;top:50%;transform:translateY(-50%);
  width:4px;height:22px;border-radius:0 4px 4px 0;background:var(--accent)}
.nav-badge{margin-left:auto;background:linear-gradient(180deg,#f472b6,#db2777);color:#fff;font-size:10px;font-weight:800;
  padding:2px 7px;border-radius:20px}
.nav-foot{padding:14px 20px;font-size:10.5px;color:#6d5c8f;border-top:1px solid rgba(255,255,255,.06)}

.main{flex:1;margin-left:250px;min-width:0;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:14px;padding:14px 24px;
  background:rgba(255,255,255,.86);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.hamburger{display:none;font-size:20px;padding:8px 10px;border-radius:10px;background:var(--surface-2)}
.page-title h1{font-size:19px;font-weight:800}
.page-title p{font-size:12px;color:var(--muted);margin-top:1px}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.search-global{display:flex;align-items:center;gap:9px;background:var(--surface-2);border:1px solid var(--line);
  border-radius:12px;padding:9px 13px;width:300px;transition:.2s}
.search-global input{border:none;background:none;flex:1;font-size:13px}
.kbd{font-size:10px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:2px 6px;color:var(--muted);font-weight:700}
.icon-btn{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-size:16px;background:#fff;
  border:1px solid var(--line);position:relative;box-shadow:0 2px 0 #dbe2ec;transition:.15s}
.icon-btn:hover{transform:translateY(-2px)}
.icon-btn:active{transform:translateY(2px);box-shadow:none}
.icon-btn.active{background:linear-gradient(180deg,#f472b6,#db2777);color:#fff;box-shadow:0 0 0 3px rgba(236,72,153,.2)}
.dot{position:absolute;top:7px;right:8px;width:8px;height:8px;border-radius:50%;background:var(--danger);box-shadow:0 0 0 2px #fff}
.avatar{width:40px;height:40px;border-radius:12px;background:linear-gradient(180deg,#c084fc,#7c3aed);color:#fff;
  font-weight:800;display:grid;place-items:center;font-size:13px;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}

.view-root{flex:1;padding:22px 24px 90px;min-width:0}
.view{animation:fadeUp .42s cubic-bezier(.2,.8,.3,1) both}
@keyframes fadeUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}

.loading-screen{display:grid;place-items:center;min-height:60vh;color:var(--muted);gap:16px;text-align:center}
.spinner{width:52px;height:52px;border:4px solid var(--accent-soft);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* BUTTONS */
.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 18px;border-radius:13px;font-weight:700;font-size:13.2px;transition:.15s;white-space:nowrap}
.btn.sm{padding:7px 12px;font-size:12px;border-radius:10px}
.btn.lg{padding:14px 24px;font-size:14.5px;border-radius:15px}
.btn.block{width:100%}
.btn:active{transform:translateY(3px)!important}
.btn-primary{background:linear-gradient(180deg,#c084fc,#8b5cf6 48%,#7c3aed);color:#fff;box-shadow:0 6px 0 #6d28d9,0 12px 22px -8px rgba(124,58,237,.65)}
.btn-primary:hover{filter:brightness(1.07);transform:translateY(-2px)}
.btn-blue{background:linear-gradient(180deg,#7cb3ff,#3b82f6 48%,#2563eb);color:#fff;box-shadow:0 6px 0 #1d4ed8}
.btn-dark{background:linear-gradient(180deg,#3a465c,#1e293b 48%,#0f172a);color:#fff;box-shadow:0 6px 0 #0b1120}
.btn-amber{background:linear-gradient(180deg,#ffd166,#f59e0b 48%,#d97706);color:#3b2200;box-shadow:0 6px 0 #b45309}
.btn-danger{background:linear-gradient(180deg,#ff8f8f,#ef4444 48%,#dc2626);color:#fff;box-shadow:0 6px 0 #b91c1c}
.btn-ghost{background:#fff;color:var(--text);border:1px solid var(--line);box-shadow:0 3px 0 #dbe2ec}
.btn-ghost:hover{transform:translateY(-2px)}

.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:18px;position:relative;transition:.25s}
.card.hoverable:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.card-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.card-head h3{font-size:14.5px;font-weight:800}
.card-head .right{margin-left:auto;display:flex;gap:8px;align-items:center}
.grid{display:grid;gap:16px}
.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:14px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;
  box-shadow:var(--shadow);position:relative;overflow:hidden;transition:.25s}
.kpi:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg)}
.kpi::before{content:'';position:absolute;inset:0 0 auto 0;height:3px;background:var(--c,var(--accent))}
.kpi .k-top{display:flex;align-items:center;gap:9px;margin-bottom:10px}
.kpi .k-ico{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-size:15px;
  background:var(--cs,var(--accent-soft));color:var(--c,var(--accent-2))}
.kpi .k-lbl{font-size:11.4px;color:var(--muted);font-weight:700;letter-spacing:.2px;text-transform:uppercase}
.kpi .k-val{font-size:24px;font-weight:800;letter-spacing:-.8px}
.kpi .k-sub{font-size:11.4px;color:var(--muted);margin-top:6px}
.section-title{display:flex;align-items:center;gap:10px;margin:26px 0 14px}
.section-title h2{font-size:16px;font-weight:800}
.section-title .line{flex:1;height:1px;background:linear-gradient(90deg,var(--line),transparent)}

.table-wrap{overflow:auto;border-radius:12px;border:1px solid var(--line);background:#fff}
table{width:100%;border-collapse:collapse;font-size:13px;min-width:640px}
thead th{background:var(--surface-2);text-align:left;padding:11px 14px;font-size:10.8px;letter-spacing:.9px;
  text-transform:uppercase;color:var(--muted);font-weight:800;border-bottom:1px solid var(--line);white-space:nowrap;position:sticky;top:0;z-index:2}
tbody td{padding:11px 14px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
tbody tr:hover{background:#faf5ff}
.t-right{text-align:right}.t-center{text-align:center}

.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;font-size:11px;font-weight:800}
.pill.green{background:#ede9fe;color:#6d28d9}
.pill.red{background:#fee2e2;color:#b91c1c}
.pill.amber{background:#fef3c7;color:#b45309}
.pill.blue{background:#dbeafe;color:#1d4ed8}
.pill.grey{background:#eef2f7;color:#475569}
.pill.purple{background:#f3e8ff;color:#6d28d9}

.field{display:flex;flex-direction:column;gap:6px;margin-bottom:13px}
.field label{font-size:11.4px;font-weight:800;color:#475569;letter-spacing:.3px;text-transform:uppercase}
.inp{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:13.4px;transition:.2s}
.inp:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(139,92,246,.15)}
select.inp{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;padding-right:34px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.form-grid .full{grid-column:1/-1}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{padding:7px 14px;border-radius:20px;background:#fff;border:1px solid var(--line);font-size:12.3px;font-weight:700;color:#475569;box-shadow:0 2px 0 #dbe2ec;transition:.15s}
.chip:hover{transform:translateY(-2px);color:var(--accent)}
.chip.active{background:linear-gradient(180deg,#c084fc,#7c3aed);color:#fff;border-color:transparent;box-shadow:0 4px 0 #6d28d9}

/* POS */
.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:16px;align-items:start}
.pos-left{display:flex;flex-direction:column;gap:14px;min-width:0}
.pos-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pos-search{flex:1;min-width:220px;display:flex;align-items:center;gap:10px;background:#fff;border:2px solid var(--line);
  border-radius:14px;padding:11px 15px;box-shadow:0 3px 0 #dbe2ec;transition:.2s}
.pos-search:focus-within{border-color:var(--accent);box-shadow:0 3px 0 #c4b5fd,0 0 0 4px rgba(139,92,246,.14)}
.pos-search input{border:none;flex:1;font-size:14px;font-weight:600;background:none}
.pos-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:12px;
  max-height:calc(100vh - 300px);overflow-y:auto;padding:4px 4px 10px}
.prod-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:11px;cursor:pointer;
  transition:.18s;box-shadow:0 3px 0 #e3e8ef;position:relative;overflow:hidden}
.prod-card:hover{transform:translateY(-4px);border-color:#c4b5fd;box-shadow:0 6px 0 #ddd6fe}
.prod-card:active{transform:translateY(1px)}
.prod-thumb{height:76px;border-radius:11px;background:linear-gradient(145deg,#f1f5fb,#e6edf7);display:grid;
  place-items:center;font-size:34px;margin-bottom:9px;position:relative;overflow:hidden}
.prod-thumb img{width:100%;height:100%;object-fit:cover}
.prod-name{font-size:12.4px;font-weight:800;line-height:1.3;margin-bottom:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:32px}
.prod-meta{display:flex;align-items:center;justify-content:space-between;gap:6px}
.prod-price{font-size:13.6px;font-weight:800;color:#6d28d9}
.prod-stock{font-size:10.4px;font-weight:800;color:#94a3b8}
.prod-card .qbadge{position:absolute;top:8px;right:8px;background:linear-gradient(180deg,#c084fc,#7c3aed);color:#fff;
  font-size:10.5px;font-weight:900;padding:2px 7px;border-radius:20px}
.prod-card.custom-prod{background:linear-gradient(135deg,#fef3c7,#fff);border-color:#fde68a}
.oos{opacity:.45;filter:grayscale(.7);pointer-events:none}

.cart-panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;position:sticky;top:86px;max-height:calc(100vh - 108px);overflow:hidden}
.cart-head{padding:15px 17px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px}
.cart-head h3{font-size:14.5px;font-weight:800}
.cart-items{flex:1;overflow-y:auto;padding:10px}
.cart-row{display:grid;grid-template-columns:46px 1fr auto;gap:10px;align-items:center;padding:9px;border-radius:12px;transition:.18s}
.cart-row:hover{background:#faf5ff}
.cart-thumb{width:46px;height:46px;border-radius:11px;background:#eef3fa;display:grid;place-items:center;font-size:22px;overflow:hidden}
.cart-thumb img{width:100%;height:100%;object-fit:cover}
.cart-name{font-size:12.6px;font-weight:800;line-height:1.25}
.cart-sub{font-size:11px;color:var(--muted);margin-top:2px}
.qty-ctl{display:flex;align-items:center;gap:4px;background:var(--surface-2);border-radius:9px;padding:3px;border:1px solid var(--line)}
.qty-ctl button{width:24px;height:24px;border-radius:7px;font-weight:900;font-size:14px;background:#fff;box-shadow:0 2px 0 #dbe2ec;display:grid;place-items:center}
.qty-ctl button:active{transform:translateY(2px);box-shadow:none}
.qty-ctl input{width:38px;text-align:center;border:none;background:none;font-weight:800;font-size:12.5px}
.cart-empty{text-align:center;padding:44px 20px;color:#9aa8bb}
.cart-empty div:first-child{font-size:46px;margin-bottom:8px;opacity:.5}
.cart-foot{border-top:1px solid var(--line);padding:14px 17px;background:var(--surface-2)}
.tot-row{display:flex;justify-content:space-between;font-size:12.8px;padding:4px 0;color:#475569}
.tot-row.grand{font-size:18px;font-weight:900;color:var(--text);padding-top:10px;margin-top:6px;border-top:2px dashed #cbd5e1}
.tot-row.grand span:last-child{color:#6d28d9}
.tot-row.scrap{color:#dc2626;font-weight:800}
.scrap-box{background:#fff5f5;border:1px solid #fecaca;border-radius:12px;padding:11px;margin-bottom:10px}
.scrap-box .scrap-head{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:#b91c1c;margin-bottom:8px}
.scrap-item{display:flex;gap:6px;align-items:center;padding:6px 8px;background:#fff;border:1px solid #fecaca;border-radius:9px;margin-bottom:5px;font-size:11.5px}
.scrap-item b{flex:1}

/* MODAL */
.modal-back{position:fixed;inset:0;background:rgba(30,16,53,.55);backdrop-filter:blur(6px);z-index:200;
  display:grid;place-items:center;padding:18px;animation:fadeIn .22s both}
.modal{background:#fff;border-radius:20px;width:100%;max-width:640px;max-height:90vh;overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 40px 80px -20px rgba(80,55,150,.5);animation:modalIn .32s cubic-bezier(.2,1.1,.35,1) both}
@keyframes modalIn{from{opacity:0;transform:translateY(26px) scale(.94)}to{opacity:1;transform:none}}
.modal.wide{max-width:900px}.modal.slim{max-width:440px}
.modal-head{padding:17px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px}
.modal-head h3{font-size:16px;font-weight:800}
.modal-head .close{margin-left:auto;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2);font-size:16px;transition:.2s}
.modal-head .close:hover{background:#fee2e2;transform:rotate(90deg)}
.modal-body{padding:20px;overflow-y:auto}
.modal-foot{padding:14px 20px;border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end;background:var(--surface-2);flex-wrap:wrap}

.toast-root{position:fixed;top:16px;right:16px;z-index:400;display:flex;flex-direction:column;gap:10px;pointer-events:none}
.toast{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-left:4px solid var(--accent);
  border-radius:13px;padding:12px 16px;min-width:270px;max-width:360px;box-shadow:0 18px 40px -14px rgba(80,55,150,.45);
  animation:toastIn .38s cubic-bezier(.2,1.2,.4,1) both;pointer-events:auto;font-size:13px;font-weight:600}
@keyframes toastIn{from{opacity:0;transform:translateX(60px) scale(.9)}to{opacity:1;transform:none}}
.toast.out{animation:toastOut .3s both}
@keyframes toastOut{to{opacity:0;transform:translateX(60px) scale(.9)}}
.toast.error{border-left-color:var(--danger)}.toast.warn{border-left-color:var(--amber)}.toast.info{border-left-color:var(--blue)}

.empty{text-align:center;padding:54px 20px;color:#9aa8bb}
.empty .e-ico{font-size:54px;opacity:.4;margin-bottom:10px}
.empty h3{font-size:15px;color:#64748b;margin-bottom:4px;font-weight:800}
.insight{display:flex;gap:11px;padding:12px 14px;border-radius:13px;background:linear-gradient(135deg,#faf5ff,#fff);
  border:1px solid #ddd6fe;font-size:12.7px;font-weight:600;color:#4c1d95;align-items:flex-start}
.insight.warn{background:linear-gradient(135deg,#fffbeb,#fff);border-color:#fde68a;color:#78350f}
.insight.danger{background:linear-gradient(135deg,#fef2f2,#fff);border-color:#fecaca;color:#7f1d1d}
.insight.info{background:linear-gradient(135deg,#eff6ff,#fff);border-color:#bfdbfe;color:#1e3a8a}
.progress{height:9px;background:#ede9fe;border-radius:20px;overflow:hidden}
.progress>i{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,#c084fc,#7c3aed);transition:width .9s}
.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:3px;gap:2px}
.seg button{padding:7px 14px;border-radius:9px;font-size:12.3px;font-weight:800;color:var(--muted);transition:.2s}
.seg button.active{background:#fff;color:var(--accent-2);box-shadow:0 2px 8px -3px rgba(80,55,150,.3)}
.barcode-box{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center}
.barcode-box svg{width:100%;height:52px}

.mobile-nav{display:none;position:fixed;bottom:0;left:0;right:0;z-index:70;background:rgba(255,255,255,.95);
  backdrop-filter:blur(14px);border-top:1px solid var(--line);padding:7px 6px calc(9px + var(--safe-bottom));
  justify-content:space-around}
.mobile-nav button{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:9.6px;font-weight:800;
  color:#94a3b8;padding:5px 12px;border-radius:11px;transition:.2s}
.mobile-nav button i{font-style:normal;font-size:18px}
.mobile-nav button.active{color:var(--accent-2);background:var(--accent-soft)}

/* PATTERN LOCK */
#lockOverlay{position:fixed;inset:0;z-index:9999;background:rgba(30,16,53,.92);backdrop-filter:blur(16px);
  display:none;place-items:center;color:#fff}
#lockOverlay.show{display:grid}
.lock-card{text-align:center;padding:30px;max-width:420px}
.lock-logo{width:70px;height:70px;margin:0 auto 16px;border-radius:20px;
  background:linear-gradient(180deg,#c084fc,#7c3aed);display:grid;place-items:center;font-size:32px;overflow:hidden}
.lock-logo img{width:100%;height:100%;object-fit:cover}
.lock-card h2{font-size:21px;font-weight:800;margin-bottom:6px}
.lock-card p{font-size:13px;color:#c4b5fd;margin-bottom:22px}
.pattern-wrap{display:grid;place-items:center;padding:16px}
.pattern-svg{width:280px;height:280px;touch-action:none;user-select:none}
.pattern-line{stroke:#8b5cf6;stroke-width:8;stroke-linecap:round}
.pattern-dot{fill:#2a1755;stroke:#4c1d95;stroke-width:3;transition:.2s}
.pattern-dot.on{fill:#8b5cf6;stroke:#a78bfa;r:11}
.pattern-dot.err{fill:#ef4444;stroke:#f87171}
@keyframes shake{0%,100%{transform:translateX(0)}20%,60%{transform:translateX(-9px)}40%,80%{transform:translateX(9px)}}
.lock-card.shake{animation:shake .5s}
.lock-hint{margin-top:18px;font-size:12px;color:#a78bfa}
.lock-msg{margin-top:14px;font-size:13.5px;font-weight:800;color:#f87171;min-height:20px}
.countdown{position:fixed;top:18px;right:18px;background:rgba(30,16,53,.85);color:#fff;padding:9px 14px;
  border-radius:12px;font-size:12.5px;font-weight:700;z-index:9998;display:none}
.countdown.show{display:flex;align-items:center;gap:8px}

/* =============== RECEIPT — DARKER / BOLDER =============== */
.receipt-preview{background:#f7f9fc;border-radius:12px;padding:22px;display:grid;place-items:center;border:1px solid var(--line)}
#print-area{display:none}
@media print{
  html,body{background:#fff!important;margin:0;padding:0}
  #app,.toast-root,.modal-back,.mobile-nav,#lockOverlay,.countdown,.mic-orb,.voice-panel,.voice-toast,.auth-overlay{display:none!important}
  #print-area{display:block!important}
}
.receipt{
  font-family:'Courier New','Consolas',monospace;
  color:#000!important;
  font-weight:700;
  font-size:12px;
  line-height:1.5;
  -webkit-print-color-adjust:exact;
  print-color-adjust:exact;
  padding:3mm 2mm;
  background:#fff;
  text-shadow:0 0 0.4px #000; /* trick to make thermal prints darker */
  filter:contrast(1.3) brightness(0.92);
}
.receipt *{font-weight:700 !important}
.receipt .r-center{text-align:center}
.receipt .r-logo-img{display:block;margin:2mm auto 3mm;object-fit:contain;
  filter:contrast(1.25) brightness(0.95)}
.receipt .r-logo{font-size:26px;font-weight:900}
.receipt .r-shop{font-size:17px;font-weight:900;margin-top:2px;letter-spacing:.4px}
.receipt .r-small{font-size:11px;font-weight:700}
.receipt hr{border:none;border-top:1.5px dashed #000;margin:6px 0}
.receipt table{width:100%;border-collapse:collapse;font-size:11.5px;min-width:0}
.receipt th{text-align:left;border-bottom:1.5px solid #000;padding:3px 0;font-size:10.5px;text-transform:uppercase;
  background:none;color:#000;position:static;font-weight:900}
.receipt td{padding:3px 0;border:none;vertical-align:top;font-weight:700}
.receipt .r-right{text-align:right}
.receipt .r-total{font-size:16px;font-weight:900;letter-spacing:.5px}
.receipt .r-qr{display:grid;place-items:center;margin:6px 0}
.receipt .r-qr svg{width:28mm;height:28mm}
.receipt .r-thanks{text-align:center;font-weight:900;font-size:13px;margin-top:8px;letter-spacing:.5px}
.receipt .r-scrap{color:#000;font-weight:900}
.receipt .r-custom{color:#000;font-style:italic;font-weight:900}
.receipt .r-cashier{background:#000;color:#fff;padding:1px 6px;border-radius:3px;font-weight:900;font-size:10px}

/* VOICE UI */
.mic-orb{position:fixed;bottom:calc(26px + var(--safe-bottom));right:26px;z-index:95;width:68px;height:68px;border-radius:50%;
  background:linear-gradient(180deg,#c084fc,#8b5cf6 48%,#ec4899);color:#fff;font-size:26px;display:grid;place-items:center;
  box-shadow:0 8px 0 #6d28d9,0 18px 36px -8px rgba(124,58,237,.7);transition:.14s}
.mic-orb:hover{transform:translateY(-3px)}
.mic-orb:active{transform:translateY(4px)}
.mic-orb.listening{animation:voicePulse 1.4s infinite;background:linear-gradient(180deg,#f472b6,#ec4899 48%,#db2777);box-shadow:0 8px 0 #be185d}
.mic-orb.off{background:linear-gradient(180deg,#94a3b8,#64748b);box-shadow:0 8px 0 #334155;opacity:.75}
@keyframes voicePulse{0%{box-shadow:0 8px 0 #be185d,0 0 0 0 rgba(236,72,153,.7)}70%{box-shadow:0 8px 0 #be185d,0 0 0 22px rgba(236,72,153,0)}100%{box-shadow:0 8px 0 #be185d,0 0 0 0 rgba(236,72,153,0)}}
.mic-orb .wave{display:none;gap:3px;align-items:center;height:22px}
.mic-orb .wave span{width:3px;height:8px;background:#fff;border-radius:2px;animation:waveUp .85s infinite ease-in-out}
.mic-orb .wave span:nth-child(2){animation-delay:.1s}.mic-orb .wave span:nth-child(3){animation-delay:.2s}
.mic-orb .wave span:nth-child(4){animation-delay:.3s}.mic-orb .wave span:nth-child(5){animation-delay:.4s}
@keyframes waveUp{0%,100%{height:6px}50%{height:20px}}
.mic-orb.listening .wave{display:flex}.mic-orb.listening .icon{display:none}
.voice-toast{position:fixed;bottom:112px;right:26px;z-index:96;max-width:340px;padding:13px 18px;border-radius:14px;
  background:linear-gradient(135deg,#2a1755,#1e1035);color:#fff;font-size:13px;font-weight:600;line-height:1.5;
  box-shadow:0 20px 40px -12px rgba(0,0,0,.55);border-left:3px solid #a855f7;animation:vtIn .32s cubic-bezier(.2,1.2,.4,1) both}
.voice-toast strong{color:#f0abfc}
@keyframes vtIn{from{opacity:0;transform:translateY(20px) scale(.9)}to{opacity:1;transform:none}}
.voice-panel{position:fixed;bottom:112px;right:26px;z-index:97;width:390px;max-height:62vh;background:#fff;border-radius:20px;overflow:hidden;
  box-shadow:0 30px 70px -20px rgba(80,55,150,.55);display:none;flex-direction:column}
.voice-panel.show{display:flex;animation:vpIn .34s cubic-bezier(.2,1.1,.35,1) both}
@keyframes vpIn{from{opacity:0;transform:translateY(28px) scale(.94)}to{opacity:1;transform:none}}
.voice-panel-head{padding:14px 17px;display:flex;align-items:center;gap:10px;background:linear-gradient(135deg,#7c3aed,#ec4899);color:#fff}
.voice-panel-head h3{font-size:14px;font-weight:800}
.voice-panel-head .status{margin-left:auto;font-size:11px;font-weight:800;background:rgba(255,255,255,.24);padding:4px 10px;border-radius:20px}
.voice-panel-head .status.live{background:rgba(255,255,255,.32)}
.voice-panel-head .status.live::before{content:'● '}
.voice-panel-head .voice-toggle,.voice-panel-head .close{width:28px;height:28px;border-radius:9px;background:rgba(255,255,255,.2);color:#fff;font-size:14px;display:grid;place-items:center;transition:.2s}
.voice-panel-head .voice-toggle:hover,.voice-panel-head .close:hover{background:rgba(255,255,255,.35)}
.voice-panel-head .voice-toggle.off{background:rgba(0,0,0,.25)}
.voice-panel-body{flex:1;overflow-y:auto;padding:14px 16px;background:linear-gradient(180deg,#faf5ff,#fff);display:flex;flex-direction:column;gap:9px}
.voice-line{padding:9px 12px;border-radius:11px;font-size:12.5px;line-height:1.55}
.voice-line.user{background:#ede9fe;color:#4c1d95;font-weight:800}
.voice-line.bot{background:#f1f5f9;color:#334155}
.voice-line.ok{background:#dcfce7;color:#15803d;font-weight:700}
.voice-line.err{background:#fee2e2;color:#b91c1c}
.voice-line.info{background:#dbeafe;color:#1e40af}
.voice-line code{background:rgba(0,0,0,.08);padding:1px 6px;border-radius:5px;font-size:11px}
.voice-hints{padding:11px 13px;border-top:1px solid #ede9fe;background:#faf5ff;font-size:11px;display:flex;flex-wrap:wrap;gap:6px}
.voice-hints .vh{background:#fff;padding:5px 10px;border-radius:20px;color:#6d28d9;font-weight:800;cursor:pointer;border:1px solid #ddd6fe;transition:.18s}
.voice-hints .vh:hover{background:#7c3aed;color:#fff}

/* RESPONSIVE */
@media(max-width:1180px){.pos-layout{grid-template-columns:1fr}.cart-panel{position:static;max-height:none}}
@media(max-width:1024px){
  .sidebar{transform:translateX(-100%)}.sidebar.open{transform:none;box-shadow:30px 0 70px -30px rgba(0,0,0,.6)}
  .main{margin-left:0}.hamburger{display:grid}.search-global{width:190px}}
@media(max-width:760px){
  .view-root{padding:16px 14px calc(96px + var(--safe-bottom))}
  .topbar{padding:11px 14px}.search-global{display:none}
  .page-title h1{font-size:16px}.page-title p{display:none}.mobile-nav{display:flex}
  .form-grid{grid-template-columns:1fr}.pos-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));max-height:none}
  .kpi .k-val{font-size:20px}.pattern-svg{width:240px;height:240px}
  .modal-foot{flex-direction:column-reverse}.modal-foot .btn{width:100%}
  .voice-panel{width:calc(100vw - 32px);right:16px;bottom:100px;max-height:70vh}
  .mic-orb{bottom:calc(88px + var(--safe-bottom));right:16px;width:60px;height:60px;font-size:22px}
  .voice-toast{bottom:100px;right:16px;left:16px;max-width:none}
  .welcome-card h2{font-size:32px}.welcome-card p{font-size:18px}.welcome-logo{width:96px;height:96px;font-size:52px}}