:root{--primary:#2563eb;--primary-hover:#1d4ed8;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--bg:#f1f5f9;--card:#fff;--error:#dc2626;--success:#16a34a;--radius:10px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text)}*{box-sizing:border-box}body{margin:0;background:#e2e8f0}.app-shell{max-width:480px;min-height:100vh;margin:0 auto;background:var(--bg);box-shadow:0 0 24px rgba(15,23,42,.08)}.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:linear-gradient(135deg,#dbeafe,#f1f5f9 50%,#e0e7ff)}.auth-card{width:100%;max-width:460px;background:var(--card);border-radius:16px;padding:32px;box-shadow:0 10px 40px rgba(15,23,42,.08)}.auth-brand{display:flex;align-items:center;gap:10px;font-weight:600;margin-bottom:24px}.auth-logo{width:36px;height:36px;border-radius:10px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:700}.auth-card h1{font-size:24px;margin:0 0 6px}.auth-subtitle{margin:0 0 24px}.auth-footer,.auth-subtitle{color:var(--muted);font-size:14px}.auth-footer{text-align:center;margin:20px 0 0}form{display:flex;flex-direction:column;gap:16px}form .alert{margin-bottom:0}.field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500;min-width:0}.field input,.field select,.field textarea{width:100%;padding:11px 14px;border:1px solid var(--border);border-radius:var(--radius);font:inherit;font-size:15px;font-weight:400;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s}.field textarea{resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.15)}.field.has-error input{border-color:var(--error)}.field input[readonly]{background:var(--bg);color:var(--muted)}.field-error,.required{color:var(--error)}.field-error{font-size:12px;font-weight:400}.grid-2{display:grid;grid-template-columns:1fr 1fr;grid-gap:16px;gap:16px}@media (max-width:480px){.grid-2{grid-template-columns:1fr}.auth-card{padding:24px 20px}}.password-wrap{position:relative}.password-wrap input{padding-right:60px}.toggle-pw{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:none;background:none;color:var(--primary);cursor:pointer;font-size:13px;padding:4px 8px}.form-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:-6px}.checkbox{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--muted)}.checkbox input{margin-top:2px}.checkbox.has-error{color:var(--error)}.link{color:var(--primary);text-decoration:none;font-size:14px}.link:hover{text-decoration:underline}.btn{display:flex;align-items:center;justify-content:center;width:100%;padding:12px 16px;border-radius:var(--radius);font-size:15px;font-weight:600;cursor:pointer;text-decoration:none;border:1px solid transparent;transition:background .15s,border-color .15s}.btn:disabled{opacity:.7;cursor:not-allowed}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--primary-hover)}.btn-outline{background:#fff;color:var(--primary);border-color:var(--primary)}.btn-outline:hover{background:#eff6ff}.btn-sm{width:auto;padding:8px 14px;font-size:14px}.alert{padding:10px 14px;border-radius:var(--radius);font-size:14px;margin-bottom:16px}.alert-error{background:#fef2f2;color:var(--error);border:1px solid #fecaca}.alert-success{background:#f0fdf4;color:var(--success);border:1px solid #bbf7d0}.alert-info{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.45)}.modal{width:100%;max-width:440px;max-height:calc(100vh - 32px);overflow-y:auto;padding:20px 16px;background:var(--card);border-radius:16px;box-shadow:0 10px 40px rgba(15,23,42,.2)}.modal form{display:flex;flex-direction:column;gap:14px}.modal h2{margin:0;font-size:18px}.modal .alert{margin-bottom:0}.modal-hint{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.modal-actions{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px}.modal-links{display:flex;justify-content:space-between}.modal-body,.modal-body form{display:flex;flex-direction:column;gap:14px}.modal-body .auth-footer{margin:0}.link-button-inline{border:none;background:none;padding:0;font-family:inherit;cursor:pointer}.reset-form{display:flex;flex-direction:column;gap:14px}.home-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fff;border-bottom:1px solid var(--border)}.home-main{padding:20px 16px}.home-brand{margin-bottom:0}.home-header-left{display:flex;align-items:center;gap:10px;min-width:0}.home-user{display:flex;flex-direction:column;gap:2px;min-width:0}.home-user strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar{flex-shrink:0;display:grid;place-items:center;width:40px;height:40px;overflow:hidden;border-radius:50%;background:#dbeafe;color:var(--primary);font-size:15px;font-weight:700}.avatar img{width:100%;height:100%;object-fit:cover}.avatar svg{width:22px;height:22px}.home-user small{color:var(--muted);font-size:13px}.created-at{font-size:12px}.link-button{border:none;background:none;padding:4px;color:var(--primary);font:inherit;font-size:13px;text-decoration:none;cursor:pointer}.link-button:disabled{opacity:.45;cursor:not-allowed}.field input:disabled{background:#f1f5f9;color:var(--muted);cursor:not-allowed}.scan-page{max-width:480px;display:flex;flex-direction:column;gap:16px}.scan-page h1{margin:0}.search-bar{flex-direction:row;gap:8px}.search-bar .field{flex:1 1}.tabs{display:flex;border-bottom:1px solid var(--border)}.tab{flex:1 1;padding:10px 4px;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;background:none;font:inherit;font-size:14px;font-weight:500;color:var(--muted);cursor:pointer}.tab.active{color:var(--primary);border-bottom-color:var(--primary);font-weight:600}.list-loading{text-align:center}.list-head{justify-content:space-between;gap:12px}.list-head,.switch{display:flex;align-items:center}.switch{gap:8px;font-size:13px;color:var(--muted);cursor:pointer}.switch input{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:36px;height:20px;margin:0;flex-shrink:0;border-radius:999px;background:var(--border);cursor:pointer;transition:background .15s}.switch input:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}.switch input:checked{background:var(--primary)}.switch input:checked:after{transform:translateX(16px)}.invoice{display:flex;flex-direction:column;gap:10px}.invoice-hint{margin:0;font-size:13px;color:var(--muted)}.invoice-items{list-style:none;margin:0;padding:0;background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.invoice-item+.invoice-item{border-top:1px solid var(--border)}.item-line{display:flex;justify-content:space-between;gap:12px}.item-sub{color:var(--muted);font-size:13px}.item-list{list-style:none;margin:0;padding:0}.invoice-filter{background:#fff;border:1px solid var(--border);border-radius:var(--radius)}.invoice-filter form{padding:0 16px 16px}.filter-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:12px 16px;border:none;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}.filter-title{display:flex;flex-direction:column;gap:2px;min-width:0}.filter-title small{color:var(--muted);font-size:13px}.select{position:relative}.select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:11px 14px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;font:inherit;font-size:15px;font-weight:400;color:var(--text);text-align:left;cursor:pointer}.select-trigger[aria-expanded=true]{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.15)}.select-caret{color:var(--muted);font-size:12px}.select-menu{position:absolute;z-index:10;top:calc(100% + 4px);left:0;right:0;padding:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 8px 24px rgba(15,23,42,.12)}.select-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;font-weight:400;cursor:pointer}.select-option:hover{background:#f1f5f9}.field .select-option input{width:auto;padding:0}.invoice-summary{display:flex;flex-direction:column;gap:4px;padding:12px 14px}.status-badge{flex-shrink:0;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:600}.status-draft{background:#f1f5f9;color:var(--muted)}.status-unpaid{background:#fef3c7;color:#b45309}.status-active{background:#dcfce7;color:#15803d}.status-inactive{background:#fee2e2;color:#b91c1c}.voucher-desc{overflow-wrap:anywhere}.voucher-body{display:flex;gap:12px;align-items:flex-start}.voucher-info{display:flex;flex-direction:column;gap:4px;flex:1 1;min-width:0}.voucher-thumb{display:grid;place-items:center;flex-shrink:0;width:64px;height:64px;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:#eff6ff;color:var(--primary)}.voucher-thumb img{width:100%;height:100%;object-fit:cover}.voucher-thumb svg{width:28px;height:28px}.voucher-value{color:var(--primary);font-size:14px}.voucher-period{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--muted)}.voucher-period b{color:var(--text);font-weight:600}.days-left{font-weight:600}.voucher-shop{display:flex;flex-direction:column;gap:2px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}.voucher-shop b{color:var(--text);font-weight:600}.voucher-shop .shop-link{color:var(--primary);font-weight:600;text-decoration:none}.voucher-shop .shop-link:hover{text-decoration:underline}.voucher-shop .shop-phone{color:var(--primary);text-decoration:none}.voucher-shop .shop-phone:hover{text-decoration:underline}.shop-paused{color:#b91c1c}.copy-btn{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:24px;height:24px;padding:3px;margin-left:4px;border:none;border-radius:6px;background:none;color:var(--muted);cursor:pointer}.copy-btn:hover{background:#eff6ff;color:var(--primary)}.copy-btn.copied{color:#16a34a}.copy-btn svg{width:16px;height:16px}.shop-header{display:flex;align-items:center;gap:10px;min-width:0}.shop-header .voucher-shop{flex:1 1;min-width:0}.shop-image{flex:none;width:48px;height:48px;object-fit:cover;border-radius:50%;border:1px solid var(--border);background:#eff6ff}.days-left-ok{color:#16a34a}.days-left-warn{color:#ea580c}.days-left-urgent{color:#dc2626}.empty-state{padding:24px;text-align:center;color:var(--muted);font-size:14px;background:#fff;border:1px dashed var(--border);border-radius:var(--radius)}.confirm-close-hint{margin-top:12px;text-align:center}.has-bottom-nav{padding-bottom:calc(80px + env(safe-area-inset-bottom))}.bottom-nav{position:fixed;z-index:30;bottom:0;left:50%;transform:translateX(-50%);display:grid;grid-auto-columns:1fr;grid-auto-flow:column;width:100%;max-width:480px;padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--border)}.bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 4px;color:var(--muted);font-size:12px;text-decoration:none}.bottom-nav a.active{color:var(--primary);font-weight:600}.bottom-nav svg{width:24px;height:24px}.support-menu{position:fixed;z-index:40;right:max(16px,calc(50% - 240px + 16px));bottom:calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:10px}.app-shell:has(.bottom-nav) .support-menu{bottom:calc(76px + env(safe-area-inset-bottom))}.support-actions{display:flex;flex-direction:column;gap:10px}.support-action,.support-toggle{display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:none;border-radius:50%;color:#fff;cursor:pointer;text-decoration:none;box-shadow:0 4px 14px rgba(15,23,42,.25)}.support-toggle{width:52px;height:52px;background:var(--primary)}.support-toggle:hover{background:var(--primary-hover)}.support-action svg,.support-toggle svg{width:26px;height:26px}.support-zalo{background:#0068ff;font-size:13px;font-weight:700}.support-call{background:var(--success)}.product-search{flex-direction:row;gap:8px}.product-search input{flex:1 1;min-width:0;padding:9px 14px;border:1px solid var(--border);border-radius:var(--radius);font:inherit;font-size:15px;background:#fff;outline:none}.product-search input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.15)}.product-grid{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px}.product-grid li{display:flex;min-width:0}.product-card{overflow:hidden;background:#fff;border:1px solid var(--border);border-radius:var(--radius)}.product-card,.product-card-main{display:flex;flex-direction:column;flex:1 1;min-width:0;color:inherit;text-decoration:none}.product-shop-line{display:block;margin:-6px 10px 10px}.product-shop-link,.product-shop-phone{color:var(--primary);text-decoration:none}.product-shop-link:hover,.product-shop-phone:hover{text-decoration:underline}.product-image{display:grid;place-items:center;aspect-ratio:1;background:#eff6ff;color:var(--primary)}.product-image img{width:100%;height:100%;object-fit:cover}.product-image svg{width:40px;height:40px}.product-info{display:flex;flex-direction:column;gap:4px;padding:8px 10px 10px;min-width:0}.product-desc,.product-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.product-name{font-size:14px;font-weight:600}.product-price{color:var(--primary);font-size:15px}.voucher-banner-list{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:4px}.voucher-banner-list li{flex:0 0 auto;scroll-snap-align:start}.voucher-banner-item{display:flex;flex-direction:column;align-items:center;gap:6px;width:96px;padding:8px;color:inherit;text-decoration:none;background:#fff;border:1px solid var(--border);border-radius:var(--radius)}.voucher-banner-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px;font-weight:600;text-align:center;overflow-wrap:anywhere}.claimed-voucher{padding:12px}.claimed-voucher,.product-detail{border:1px solid var(--border);border-radius:var(--radius)}.product-detail{overflow:hidden;background:#fff}.product-detail-info{display:flex;flex-direction:column;gap:8px;padding:14px}.product-detail-info h1{font-size:20px;overflow-wrap:anywhere}.product-detail-info .product-price{font-size:20px}.order-buttons{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px}.product-detail-desc{margin:0;font-size:14px;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}.order-customer,.order-product{display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}.order-customer{padding-bottom:10px;border-bottom:1px solid var(--border)}.order-product{display:flex;flex-direction:column;gap:2px;overflow-wrap:anywhere}.quantity{display:flex;width:150px}.quantity button{width:42px;flex-shrink:0;border:1px solid var(--border);background:#fff;color:var(--text);font-size:18px;cursor:pointer}.quantity button:first-child{border-radius:var(--radius) 0 0 var(--radius)}.quantity button:last-child{border-radius:0 var(--radius) var(--radius) 0}.quantity button:disabled{color:var(--muted);cursor:not-allowed}.field .quantity input{border-radius:0;border-left:none;border-right:none;text-align:center;padding:9px 4px}.order-total{font-weight:700}.order-total span:last-child{color:var(--primary)}.order-lines{display:flex;flex-direction:column;gap:6px;font-size:14px}.order-lines .order-total{padding-top:6px;border-top:1px solid var(--border)}.product-shop{overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.order-quoting{opacity:.6}.order-cart{gap:10px}.order-cart,.order-cart-line{display:flex;flex-direction:column}.order-cart-line{gap:6px}.order-cart-line+.order-cart-line{padding-top:10px;border-top:1px solid var(--border)}.order-cart-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.voucher-footer{align-items:center}.amount-stepper{width:100%}.field .amount-stepper input{flex:1 1;min-width:0}.picker-modal{gap:12px}.picker-list,.picker-modal{display:flex;flex-direction:column}.picker-list{gap:10px;min-height:120px;max-height:55vh;overflow-y:auto}.product-pick{position:relative;padding:0;font:inherit;text-align:left;cursor:pointer}.product-pick.checked{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary)}.pick-mark{position:absolute;z-index:1;top:6px;right:6px;display:grid;place-items:center;width:24px;height:24px;border:2px solid #fff;border-radius:50%;background:rgba(15,23,42,.35);color:#fff;font-size:14px;font-weight:700}.product-pick.checked .pick-mark{background:var(--primary)}.order-discount span:last-child{color:var(--success)}.order-head,.order-row{cursor:pointer}.order-head{display:flex;align-items:center;gap:10px;width:100%;padding:0;border:none;background:none;color:inherit;font:inherit;text-align:left}.order-head .order-amount{margin-left:auto;color:var(--primary)}.order-head:after{content:"▾";color:var(--muted);transition:transform .15s}.order-row.open .order-head:after{transform:rotate(180deg)}.order-detail{display:flex;flex-direction:column;gap:6px;margin-top:6px;padding-top:8px;border-top:1px dashed var(--border)}