*{margin:0;padding:0;box-sizing:border-box}body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;background:#fff;color:#111;font-size:14px;line-height:1.5}a{color:#111;text-decoration:none}.sidebar{width:240px;height:100vh;position:fixed;left:0;top:0;background:#fff;border-right:1px solid #d0d0d0;display:flex;flex-direction:column;z-index:100}.sidebar-logo{padding:20px;border-bottom:1px solid #d0d0d0;display:flex;align-items:center;gap:12px;min-height:72px}.sidebar-logo img{height:40px;width:40px;object-fit:contain}.sidebar-logo span{font-weight:700;font-size:15px;line-height:1.2}.sidebar nav{flex:1;overflow-y:auto;padding:8px 0}.sidebar nav a{display:flex;align-items:center;gap:10px;padding:10px 20px;color:#333;font-size:13px;border-left:3px solid transparent;transition:all .15s}.sidebar nav a:hover{background:#f0f0f0;color:#000}.sidebar nav a.active{background:#111;color:#fff;border-left-color:#111}.sidebar nav a.pos-link{margin:4px 8px;border-radius:4px;border-left:none;font-weight:700;text-align:center;justify-content:center;background:#111;color:#fff;padding:12px}.sidebar nav a.pos-link:hover{background:#333;color:#fff}.sidebar-bottom{padding:12px 8px;border-top:1px solid #d0d0d0}.logout-link{display:flex;align-items:center;gap:8px;padding:10px 12px;color:#888;font-size:13px;border-radius:4px}.logout-link:hover{background:#fdecea;color:#c0392b}.main{margin-left:240px;min-height:100vh}.header{padding:14px 24px;border-bottom:1px solid #d0d0d0;display:flex;justify-content:space-between;align-items:center;background:#fff;position:sticky;top:0;z-index:50}.header h1{font-size:20px;font-weight:700}.content{padding:24px}.table-wrap{border:1px solid #d0d0d0;border-radius:6px;overflow:hidden}.table-wrap-clean{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{padding:10px 14px;text-align:left;border-bottom:1px solid #e8e8e8}th{background:#f5f5f5;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.3px;color:#555}tr:last-child td{border-bottom:none}tr:hover td{background:#fafafa}table img{height:36px;width:36px;object-fit:contain;border-radius:4px}.form-group{margin-bottom:14px}.form-group label{display:block;font-size:12px;font-weight:600;margin-bottom:5px;color:#333;text-transform:uppercase;letter-spacing:.3px}.form-group input,.form-group select,.form-group textarea{width:100%;padding:8px 12px;border:1px solid #ccc;background:#fff;color:#111;border-radius:4px;font-size:14px;font-family:inherit}.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:none;border-color:#111;box-shadow:0 0 0 2px rgba(0,0,0,.06)}.form-row{display:grid;gap:14px}.form-row-2{grid-template-columns:1fr 1fr}.form-row-3{grid-template-columns:1fr 1fr 1fr}.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #111;background:#111;color:#fff;cursor:pointer;border-radius:4px;font-size:13px;font-weight:500;font-family:inherit;transition:all .15s;white-space:nowrap}.btn:hover{background:#333;border-color:#333}.btn-outline{background:#fff;color:#111}.btn-outline:hover{background:#f5f5f5}.btn-danger{border-color:#c0392b;color:#c0392b;background:#fff}.btn-danger:hover{background:#c0392b;color:#fff}.btn-sm{padding:5px 10px;font-size:12px}.btn-lg{padding:12px 24px;font-size:15px}.btn-block{display:flex;justify-content:center;width:100%}.grid{display:grid;gap:16px}.grid-2{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-4{grid-template-columns:repeat(4,1fr)}.card{border:1px solid #d0d0d0;border-radius:6px;background:#fff}.card-body{padding:20px}.card-header{padding:16px 20px;border-bottom:1px solid #e8e8e8;font-weight:700;font-size:15px;display:flex;justify-content:space-between;align-items:center}.stat{border:1px solid #d0d0d0;border-radius:6px;padding:20px}.stat-label{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#777;margin-bottom:8px}.stat-value{font-size:26px;font-weight:800}.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:1000;justify-content:center;align-items:flex-start;padding-top:60px;overflow-y:auto}.modal-overlay.show{display:flex}.modal{background:#fff;border-radius:8px;width:95%;max-width:520px;margin-bottom:40px;box-shadow:0 8px 30px rgba(0,0,0,.15)}.modal-head{padding:16px 20px;border-bottom:1px solid #e8e8e8;font-size:16px;font-weight:700;display:flex;justify-content:space-between;align-items:center}.modal-head button{background:none;border:none;font-size:20px;cursor:pointer;color:#666;padding:0 4px}.modal-body{padding:20px}.modal-foot{padding:12px 20px;border-top:1px solid #e8e8e8;display:flex;gap:8px;justify-content:flex-end}.alert{padding:12px 16px;border-radius:4px;margin-bottom:16px;font-size:13px}.alert-success{background:#e8f5e9;border:1px solid #a5d6a7;color:#1b5e20}.alert-error{background:#fdecea;border:1px solid #f5c6cb;color:#721c24}.pos-layout{display:flex;gap:16px;height:calc(100vh - 70px)}.pos-left{flex:1;display:flex;flex-direction:column;overflow:hidden}.pos-right{width:380px;display:flex;flex-direction:column;border:1px solid #d0d0d0;border-radius:6px;overflow:hidden}.pos-search{display:flex;gap:8px;margin-bottom:12px}.pos-search input{flex:1;padding:10px 14px;border:1px solid #ccc;border-radius:4px;font-size:15px}.pos-cats{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}.pos-cat-btn{padding:6px 14px;border:1px solid #ccc;background:#fff;border-radius:20px;cursor:pointer;font-size:12px;font-family:inherit;transition:all .15s}.pos-cat-btn:hover,.pos-cat-btn.active{background:#111;color:#fff;border-color:#111}.pos-grid{flex:1;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;align-content:start}.pos-prod{border:1px solid #e0e0e0;border-radius:6px;padding:10px;cursor:pointer;transition:all .15s;text-align:center}.pos-prod:hover{border-color:#111;box-shadow:0 2px 8px rgba(0,0,0,.08)}.pos-prod.oos{opacity:.4;pointer-events:none}.pos-prod img{height:50px;width:100%;object-fit:contain;margin-bottom:6px}.pos-prod .pname{font-size:12px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pos-prod .psku{font-size:10px;color:#888;margin-bottom:4px}.pos-prod .pprice{font-size:14px;font-weight:800}.pos-prod .pstock{font-size:10px;color:#888}.pos-prod .pstock.low{color:#c0392b;font-weight:600}.cart-head{padding:14px 16px;border-bottom:1px solid #e8e8e8;font-weight:700;font-size:15px;display:flex;justify-content:space-between}.cart-items{flex:1;overflow-y:auto;padding:8px}.cart-item{display:flex;align-items:center;gap:8px;padding:8px;border-bottom:1px solid #f0f0f0;font-size:13px}.cart-item-info{flex:1;min-width:0}.cart-item-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cart-item-price{color:#666;font-size:12px}.cart-qty{display:flex;align-items:center;gap:0;border:1px solid #ccc;border-radius:4px;overflow:hidden}.cart-qty button{width:28px;height:28px;border:none;background:#f5f5f5;cursor:pointer;font-size:14px;font-weight:700;color:#111}.cart-qty button:hover{background:#e0e0e0}.cart-qty span{width:32px;text-align:center;font-size:13px;font-weight:600}.cart-item-total{font-weight:700;min-width:55px;text-align:right}.cart-item-remove{background:none;border:none;cursor:pointer;color:#999;font-size:16px;padding:2px 4px}.cart-item-remove:hover{color:#c0392b}.cart-footer{border-top:1px solid #e8e8e8;padding:14px 16px}.cart-row{display:flex;justify-content:space-between;margin-bottom:6px;font-size:13px}.cart-row.total{font-size:18px;font-weight:800;border-top:1px solid #d0d0d0;padding-top:8px;margin-top:8px}.cart-pay{margin-top:12px}.pay-toggle{display:flex;gap:0;margin-bottom:12px;border:1px solid #ccc;border-radius:4px;overflow:hidden}.pay-toggle button{flex:1;padding:8px;border:none;background:#fff;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;transition:all .15s}.pay-toggle button.active{background:#111;color:#fff}.cart-field{margin-bottom:10px}.cart-field label{display:block;font-size:11px;font-weight:600;margin-bottom:4px;text-transform:uppercase;color:#555}.cart-field input,.cart-field select{width:100%;padding:8px 10px;border:1px solid #ccc;border-radius:4px;font-size:14px;font-family:inherit}.cart-field input:focus,.cart-field select:focus{outline:none;border-color:#111}.invoice-wrap{max-width:600px;margin:0 auto;border:1px solid #d0d0d0;border-radius:8px;padding:32px}.invoice-head{text-align:center;margin-bottom:24px}.invoice-head img{height:60px;margin-bottom:8px}.invoice-head h2{font-size:22px;margin-bottom:4px}.invoice-head p{color:#666;font-size:13px}.invoice-title{text-align:center;font-size:18px;font-weight:800;letter-spacing:2px;margin-bottom:16px;padding-bottom:12px;border-bottom:2px solid #111}.invoice-meta{display:flex;justify-content:space-between;margin-bottom:20px;font-size:13px}.invoice-table{width:100%;border-collapse:collapse;margin-bottom:16px}.invoice-table th,.invoice-table td{padding:8px 10px;border-bottom:1px solid #ddd;text-align:left}.invoice-table th{background:#f5f5f5;font-size:11px;text-transform:uppercase}.text-right{text-align:right}.invoice-totals{margin-left:auto;width:220px}.invoice-totals .cart-row{font-size:14px}.invoice-totals .cart-row.total{font-size:16px}.invoice-footer{text-align:center;margin-top:24px;padding-top:16px;border-top:1px solid #ddd;color:#666;font-size:13px}.empty-state{text-align:center;padding:40px 20px;color:#999}.empty-state p{font-size:15px;margin-bottom:12px}.badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600}.badge-green{background:#e8f5e9;color:#1b5e20}.badge-red{background:#fdecea;color:#721c24}.badge-blue{background:#e3f2fd;color:#0d47a1}.text-center{text-align:center}.mt-16{margin-top:16px}.mb-16{margin-bottom:16px}.flex-between{display:flex;justify-content:space-between;align-items:center}.img-preview{height:80px;width:80px;object-fit:contain;border:1px solid #ddd;border-radius:4px}.filter-bar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap;align-items:center}.filter-bar input,.filter-bar select{padding:8px 12px;border:1px solid #ccc;border-radius:4px;font-size:13px}.purch-row{display:grid;grid-template-columns:2fr 1fr 1fr 40px;gap:8px;margin-bottom:8px;align-items:end}.purch-row input,.purch-row select{padding:8px 10px;border:1px solid #ccc;border-radius:4px;font-size:13px;font-family:inherit}.purch-row input:focus,.purch-row select:focus{outline:none;border-color:#111}@media print{.sidebar,.header,.no-print{display:none!important}.main{margin-left:0!important}.content{padding:0!important}body{font-size:12px}.invoice-wrap{border:none;padding:0;max-width:100%}}