:root{--page:#f1f5f9;--surface:#fff;--surface-alt:#f8fafc;--border:#e2e8f0;--border-firm:#cbd5e1;--ink:#0f172a;--ink-soft:#475569;--ink-muted:#64748b;--rail:#1e293b;--rail-deep:#0f172a;--rail-ink:#cbd5e1;--blue:#2563eb;--green:#16a34a;--amber:#f59e0b;--purple:#7c3aed;--teal:#0d9488;--red:#dc2626;--blue-soft:#eff6ff;--green-soft:#f0fdf4;--amber-soft:#fffbeb;--red-soft:#fef2f2;--radius:10px;--radius-sm:6px;--shadow:0 1px 2px #0f172a0f, 0 1px 3px #0f172a14;--shadow-lift:0 4px 12px #0f172a1a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;font-family:Segoe UI,system-ui,-apple-system,sans-serif;line-height:1.5}*{box-sizing:border-box}body{background:var(--page);min-height:100vh;color:var(--ink);margin:0;font-size:14px}h1,h2,h3{color:var(--ink)}h2{margin:0 0 .25rem;font-size:1.15rem}h3{margin:1.75rem 0 .5rem;font-size:1rem}.visually-hidden{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.shell{grid-template:"nav header""nav main"1fr/232px 1fr;min-height:100vh;display:grid}.shell__header{background:var(--surface);border-bottom:1px solid var(--border);grid-area:header;justify-content:space-between;align-items:center;gap:1rem;height:68px;padding:0 1.5rem;display:flex}.shell__header strong{letter-spacing:-.01em;font-size:1.05rem;display:block}.shell__location{color:var(--ink-muted);margin-left:0;font-size:.78rem;display:block}.shell__user{color:var(--ink-soft);align-items:center;gap:.75rem;font-size:.85rem;display:flex}.shell__user span:before{content:"👤";margin-right:.4rem}.shell__user button{border:1px solid var(--border-firm);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink-soft);cursor:pointer;padding:.4rem .85rem;font-size:.82rem}.shell__user button:hover{background:var(--red-soft);border-color:var(--red);color:var(--red)}.shell__nav{background:var(--rail);border-bottom:none;flex-direction:column;grid-area:nav;gap:.15rem;padding:1rem .65rem;display:flex}.shell__nav:before{content:"MOIZ MOBILE";color:#fff;letter-spacing:.08em;border-bottom:1px solid #ffffff1f;margin-bottom:.85rem;padding:.75rem .6rem 1.25rem;font-size:.95rem;font-weight:700;display:block}.shell__nav a{border-radius:var(--radius-sm);color:var(--rail-ink);border-bottom:none;align-items:center;gap:.7rem;padding:.6rem .75rem;font-size:.88rem;text-decoration:none;transition:background .12s,color .12s;display:flex}.shell__nav a:hover{color:#fff;background:#ffffff12}.shell__nav a.active{background:var(--blue);color:#fff;border-bottom:none;font-weight:600}.shell__nav a:before{text-align:center;width:1.25rem;font-size:1rem}.shell__nav a[href=\/dashboard]:before{content:"🏠"}.shell__nav a[href=\/pos]:before{content:"🛒"}.shell__nav a[href=\/products]:before{content:"📦"}.shell__nav a[href=\/categories]:before{content:"🗂️"}.shell__nav a[href=\/brands]:before{content:"🏷️"}.shell__nav a[href=\/customers]:before{content:"👥"}.shell__nav a[href=\/purchases]:before{content:"🚚"}.shell__nav a[href=\/suppliers]:before{content:"🏭"}.shell__nav a[href=\/expenses]:before{content:"🧾"}.shell__nav a[href=\/reports]:before{content:"📊"}.shell__nav a[href=\/admin]:before{content:"⚙️"}.shell__main{grid-area:main;max-width:1500px;padding:1.5rem}.login-form{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);max-width:23rem;box-shadow:var(--shadow-lift);flex-direction:column;gap:.35rem;margin:5rem auto;padding:2rem;display:flex}.login-form h1{color:var(--blue);text-align:center;margin:0;font-size:1.2rem}.login-form__subtitle{color:var(--ink-muted);text-align:center;margin:.15rem 0 1rem;font-size:.82rem}.login-form label{color:var(--ink-soft);margin-top:.75rem;font-size:.82rem}.login-form input{padding:.6rem .7rem;font-size:.95rem}.login-form button{background:var(--blue);color:#fff;border-radius:var(--radius-sm);cursor:pointer;border:none;margin-top:1.5rem;padding:.7rem;font-size:.95rem;font-weight:600}.login-form button:hover:not(:disabled){background:#1d4ed8}.login-form button:disabled{opacity:.65;cursor:not-allowed}.login-form__error{background:var(--red-soft);border-left:3px solid var(--red);border-radius:var(--radius-sm);margin:.75rem 0 0;padding:.6rem .75rem}.field{flex-direction:column;margin-top:.75rem;display:flex}.field label,.login-form label,.filters label,.inline-form label{color:var(--ink-soft);margin-bottom:.2rem;font-size:.8rem;font-weight:600}input,select,textarea{color:var(--ink);background:var(--surface);border:1px solid var(--border-firm);border-radius:var(--radius-sm);padding:.5rem .6rem;font-family:inherit;font-size:.9rem}input:focus,select:focus,textarea:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px #2563eb26}input:disabled,select:disabled{background:var(--surface-alt);color:var(--ink-muted);cursor:not-allowed}.field__hint{color:var(--ink-muted);margin-top:.2rem;font-size:.75rem;font-weight:400}.field-error{color:var(--red);margin-top:.2rem;font-size:.78rem}.form-error{background:var(--red-soft);border-left:3px solid var(--red);border-radius:var(--radius-sm);color:#991b1b;margin:.75rem 0;padding:.6rem .8rem}.form-success{background:var(--green-soft);border-left:3px solid var(--green);border-radius:var(--radius-sm);color:#166534;margin:.75rem 0;padding:.6rem .8rem}.form-actions{gap:.6rem;margin-top:1.5rem;display:flex}button{border-radius:var(--radius-sm);border:1px solid var(--border-firm);background:var(--surface);color:var(--ink);cursor:pointer;padding:.5rem 1rem;font-family:inherit;font-size:.85rem;transition:background .12s,border-color .12s}button:hover:not(:disabled){background:var(--surface-alt)}button:disabled{opacity:.55;cursor:not-allowed}.form-actions button[type=submit],.form-actions button:first-child{background:var(--green);border-color:var(--green);color:#fff;font-weight:600}.form-actions button[type=submit]:hover:not(:disabled),.form-actions button:first-child:hover:not(:disabled){background:#15803d}.form-actions button[type=button]:last-child:not(:only-child){background:var(--red);border-color:var(--red);color:#fff;font-weight:600}.form-actions button[type=button]:last-child:not(:only-child):hover:not(:disabled){background:#b91c1c}.product-form,.purchase-form,.expense-form,.return-form{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);max-width:34rem;box-shadow:var(--shadow);flex-direction:column;padding:0 1.25rem 1.25rem;display:flex}.product-form h2,.purchase-form h2,.expense-form h2,.return-form h2{border-radius:var(--radius) var(--radius) 0 0;color:#fff;margin:0 -1.25rem .5rem;padding:.75rem 1.25rem;font-size:.95rem}.product-form h2{background:var(--teal)}.purchase-form h2{background:var(--blue)}.expense-form h2{background:var(--purple)}.return-form h2{background:var(--amber)}.purchase-form{max-width:30rem}.expense-form{max-width:26rem}.return-form{max-width:44rem}.purchase-form__total{background:var(--surface-alt);border-radius:var(--radius-sm);margin-top:1rem;padding:.6rem .8rem;font-size:1.05rem;font-weight:700}.purchase-form__notice,.return-form__notice{background:var(--amber-soft);border-left:3px solid var(--amber);border-radius:var(--radius-sm);margin-top:.85rem;padding:.8rem;font-size:.85rem}.purchase-form__notice p,.return-form__notice p{margin-top:0}.page-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.25rem;display:flex}.page-header button{background:var(--green);border-color:var(--green);color:#fff;font-weight:600}.page-header button:hover:not(:disabled){background:#15803d}.filters,.inline-form{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);flex-wrap:wrap;align-items:flex-end;gap:1rem;margin:1rem 0;padding:.9rem 1rem;display:flex}.filters .field,.inline-form .field{margin-top:0}.filters input,.filters select{min-width:13rem}.inline-form button{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}.inline-form button:hover:not(:disabled){background:#1d4ed8}.checkbox{color:var(--ink-soft);align-items:center;gap:.4rem;padding-bottom:.5rem;font-size:.85rem;display:flex}.checkbox input{width:auto}.link-button{color:var(--blue);cursor:pointer;background:0 0;border:none;margin-bottom:.85rem;padding:0;font-size:.85rem}.link-button:hover{background:0 0;text-decoration:underline}.empty-state{background:var(--surface);border:1px dashed var(--border-firm);border-radius:var(--radius);color:var(--ink-muted);text-align:center;padding:1.5rem}.report-total{background:var(--blue-soft);border-left:3px solid var(--blue);border-radius:var(--radius-sm);padding:.8rem 1rem;font-size:1rem}.data-table,.pos__cart,.ledger__table,.audit__table,.backup-panel__table,.return-form__lines{border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:100%;box-shadow:var(--shadow);margin-top:.75rem;overflow:hidden}.data-table thead th,.pos__cart thead th,.ledger__table thead th,.audit__table thead th,.backup-panel__table thead th,.return-form__lines thead th{background:var(--rail);color:#fff;letter-spacing:.02em;text-transform:uppercase;text-align:left;border:none;padding:.65rem .7rem;font-size:.78rem;font-weight:600}.data-table td,.pos__cart td,.ledger__table td,.audit__table td,.backup-panel__table td,.return-form__lines td{border-bottom:1px solid var(--border);padding:.55rem .7rem;font-size:.87rem}.data-table tbody tr:nth-child(2n),.ledger__table tbody tr:nth-child(2n),.audit__table tbody tr:nth-child(2n),.backup-panel__table tbody tr:nth-child(2n){background:var(--surface-alt)}.data-table tbody tr:hover,.pos__cart tbody tr:hover,.ledger__table tbody tr:hover{background:var(--blue-soft)}.data-table tbody tr:last-child td,.ledger__table tbody tr:last-child td,.audit__table tbody tr:last-child td{border-bottom:none}.numeric,.data-table td.numeric,.data-table th.numeric{text-align:right;font-variant-numeric:tabular-nums}.owing{color:var(--red);font-weight:700}.data-table td button{margin-right:.3rem;padding:.3rem .65rem;font-size:.78rem}.data-table td button:first-of-type{background:var(--blue);border-color:var(--blue);color:#fff}.data-table td button:first-of-type:hover:not(:disabled){background:#1d4ed8}.data-table td button:last-of-type:not(:only-of-type){background:var(--red);border-color:var(--red);color:#fff}.data-table td button:last-of-type:not(:only-of-type):hover:not(:disabled){background:#b91c1c}.badge{letter-spacing:.01em;border-radius:999px;padding:.12rem .5rem;font-size:.7rem;font-weight:700;display:inline-block}.badge--low{background:var(--amber-soft);color:#92400e;border:1px solid #fcd34d}.badge--out{background:var(--red-soft);color:#991b1b;border:1px solid #fca5a5}.dashboard__header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;display:flex}.dashboard__periods{border:1px solid var(--border-firm);border-radius:var(--radius-sm);gap:0;display:flex;overflow:hidden}.dashboard__periods button{border:none;border-right:1px solid var(--border-firm);background:var(--surface);color:var(--ink-soft);border-radius:0;padding:.45rem 1rem}.dashboard__periods button:last-child{border-right:none}.dashboard__periods button.is-active{background:var(--blue);color:#fff;font-weight:600}.dashboard__kpis{grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:.85rem;margin:1.25rem 0 2rem;display:grid}.kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:row;align-items:center;gap:.8rem;padding:.9rem 1rem;display:flex}.kpi:before{border-radius:var(--radius-sm);flex:none;place-items:center;width:2.6rem;height:2.6rem;font-size:1.15rem;display:grid}.kpi__label{color:var(--ink-muted);text-transform:uppercase;letter-spacing:.03em;font-size:.75rem}.kpi__value{font-variant-numeric:tabular-nums;font-size:1.15rem;font-weight:700}.dashboard__kpis .kpi:first-child:before{content:"💰";background:var(--blue-soft)}.dashboard__kpis .kpi:nth-child(2):before{content:"🚚";background:var(--amber-soft)}.dashboard__kpis .kpi:nth-child(3):before{content:"📈";background:#ccfbf1}.dashboard__kpis .kpi:nth-child(4):before{content:"🧾";background:#f3e8ff}.dashboard__kpis .kpi:nth-child(5):before{content:"🏆";background:var(--green-soft)}.dashboard__kpis .kpi:nth-child(6):before{content:"💵";background:var(--green-soft)}.dashboard__kpis .kpi:nth-child(7):before{content:"📝";background:var(--amber-soft)}.dashboard__kpis .kpi:nth-child(8):before{content:"📥";background:var(--blue-soft)}.dashboard__kpis .kpi:nth-child(9):before{content:"📤";background:var(--red-soft)}.dashboard__kpis .kpi:nth-child(10):before{content:"📦";background:#e0e7ff}.kpi--good .kpi__value{color:var(--green)}.kpi--bad .kpi__value{color:var(--red)}.dashboard__low-stock{background:var(--amber-soft);border:1px solid #fcd34d;border-left:4px solid var(--amber);border-radius:var(--radius);padding:1rem 1.25rem}.dashboard__low-stock h3{color:#92400e;margin:0 0 .4rem}.dashboard__low-stock h3:before{content:"⚠️ "}.dashboard__low-stock ul{margin:0;padding-left:1.2rem}.dashboard__low-stock li{font-size:.87rem}.dashboard__low-stock strong{color:var(--red)}.pos__lookup{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);align-items:center;gap:.5rem;margin:1rem 0;padding:.9rem 1rem;display:flex}.pos__lookup label{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.pos__lookup input{flex:1;padding:.65rem .75rem;font-size:1rem}.pos__lookup button{background:var(--blue);border-color:var(--blue);color:#fff;padding:.65rem 1.4rem;font-weight:600}.pos__lookup button:hover:not(:disabled){background:#1d4ed8}.pos__empty{background:var(--surface);border:1px dashed var(--border-firm);border-radius:var(--radius);color:var(--ink-muted);text-align:center;padding:2rem}.pos__cart input{width:6rem;padding:.3rem .4rem;font-size:.85rem}.pos__cart td button{background:var(--red);border-color:var(--red);color:#fff;padding:.2rem .55rem;font-weight:700;line-height:1}.pos__totals{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);flex-wrap:wrap;align-items:flex-start;gap:1.25rem;margin-top:1rem;padding:1rem;display:flex}.pos__summary{background:var(--surface-alt);border-radius:var(--radius-sm);grid-template-columns:auto auto;gap:.3rem 1.75rem;min-width:17rem;margin-left:auto;padding:.9rem 1rem;display:grid}.pos__summary dt{color:var(--ink-soft);font-size:.85rem}.pos__summary dd{text-align:right;font-variant-numeric:tabular-nums;margin:0;font-size:.9rem}.pos__summary dt:nth-last-of-type(-n+2),.pos__summary dd:nth-last-of-type(-n+2){font-size:1rem;font-weight:700}.pos__customer{background:var(--blue-soft);border-radius:var(--radius-sm);margin-top:.85rem;padding:.5rem .8rem;font-weight:600;display:inline-block}.pos__receipt{background:var(--green-soft);border-left:4px solid var(--green);border-radius:var(--radius-sm);color:#166534;padding:.75rem 1rem;font-weight:500}.pos .form-actions button{padding:.7rem 2rem;font-size:.95rem}.ledger__header{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);justify-content:space-between;align-items:flex-start;gap:1rem;padding:1rem 1.25rem;display:flex}.ledger__header h2{margin-bottom:.15rem}.ledger__mobile{color:var(--ink-muted);margin:0;font-size:.85rem}.ledger__header button{background:var(--green);border-color:var(--green);color:#fff;padding:.55rem 1.1rem;font-weight:600}.ledger__header button:hover:not(:disabled){background:#15803d}.ledger__summary{grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:.85rem;margin:1rem 0 1.5rem;display:grid}.ledger__summary dt{color:var(--ink-muted);text-transform:uppercase;letter-spacing:.03em;font-size:.72rem}.ledger__summary dd{font-variant-numeric:tabular-nums;margin:.15rem 0 0;font-size:1.2rem;font-weight:700}.ledger__summary dt{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius) var(--radius) 0 0;border-bottom:none;padding:.75rem 1rem 0}.ledger__summary dd{background:var(--surface);border:1px solid var(--border);border-radius:0 0 var(--radius) var(--radius);box-shadow:var(--shadow);border-top:none;padding:0 1rem .85rem}.ledger__owing{color:var(--red)}.ledger__empty{color:var(--ink-muted);font-style:italic}.ledger__table td:last-child{font-weight:700}.return-form__lines input{width:5rem;padding:.3rem}.return-form__lines td:nth-child(2),.return-form__lines td:nth-child(3){text-align:right}.return-form__summary{background:var(--surface-alt);border-radius:var(--radius-sm);grid-template-columns:auto auto;justify-content:start;gap:.3rem 1.5rem;margin:1rem 0;padding:.9rem 1rem;display:grid}.return-form__summary dt{color:var(--ink-soft)}.return-form__summary dd{font-variant-numeric:tabular-nums;margin:0;font-weight:700}.modal{z-index:50;background:#0f172a80;place-items:center;display:grid;position:fixed;inset:0}.modal__panel{background:var(--surface);border-radius:var(--radius);min-width:21rem;max-width:26rem;padding:1.5rem;box-shadow:0 20px 40px #0f172a40}.modal__panel h3{margin:0 0 .25rem;font-size:1.05rem}.modal__hint{color:var(--ink-muted);margin:0 0 .5rem;font-size:.85rem}.share-buttons{flex-wrap:wrap;align-items:center;gap:.6rem;margin:1rem 0;display:flex}.share-buttons button:first-child:before{content:"⬇ "}.share-buttons button:last-of-type{color:#fff;background:#25d366;border-color:#25d366;font-weight:600}.share-buttons button:last-of-type:before{content:"💬 "}.share-buttons button:last-of-type:disabled{background:var(--surface-alt);color:var(--ink-muted);border-color:var(--border-firm)}.share-buttons__hint{color:var(--ink-muted);font-size:.78rem}.admin-section{margin-bottom:2.5rem}.admin-note{color:var(--ink-muted);max-width:42rem;font-size:.85rem}.backup-panel__header,.audit__header{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:1rem;display:flex}.backup-panel__header button{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}.backup-panel__note{color:var(--ink-muted);max-width:42rem;font-size:.85rem}.backup-panel__empty{color:var(--ink-muted);font-style:italic}.backup-panel__warning{background:var(--red-soft);border-left:4px solid var(--red);border-radius:var(--radius-sm);color:#991b1b;padding:.85rem}.backup-panel__table td button{background:var(--amber);border-color:var(--amber);color:#fff;padding:.3rem .75rem;font-size:.78rem;font-weight:600}.audit__empty{color:var(--ink-muted);font-style:italic}.audit__table td:nth-child(5),.audit__table td:nth-child(6){font-variant-numeric:tabular-nums}.pick-list{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);margin:0 0 1.5rem;padding:0;list-style:none;overflow:hidden}.pick-list li{border-bottom:1px solid var(--border)}.pick-list li:last-child{border-bottom:none}.pick-list button{text-align:left;background:0 0;border:none;border-radius:0;justify-content:space-between;align-items:center;width:100%;padding:.7rem .9rem;font-size:.9rem;display:flex}.pick-list button:hover{background:var(--blue-soft)}.pick-list__meta{color:var(--ink-muted);font-size:.78rem}.error-boundary{background:var(--surface);border:1px solid #fca5a5;border-top:4px solid var(--red);border-radius:var(--radius);max-width:34rem;box-shadow:var(--shadow-lift);margin:3rem auto;padding:1.75rem}.error-boundary h2{color:var(--red);margin-top:0}.error-boundary button{background:var(--blue);border-color:var(--blue);color:#fff;margin:.5rem 0 1rem}.error-boundary details{color:var(--ink-muted);font-size:.82rem}.error-boundary pre{white-space:pre-wrap;word-break:break-word;background:var(--surface-alt);border-radius:var(--radius-sm);padding:.6rem}@media (width<=1100px){.shell{grid-template-columns:68px 1fr}.shell__nav:before{content:"M";text-align:center;padding:.6rem 0 1rem;font-size:1.3rem}.shell__nav a{justify-content:center;gap:0;padding:.7rem 0;font-size:0}.shell__nav a:before{font-size:1.2rem}.dashboard__kpis{grid-template-columns:repeat(auto-fill,minmax(11rem,1fr))}}@media (width<=780px){.shell{grid-template-columns:1fr;grid-template-areas:"header""nav""main"}.shell__nav{flex-flow:wrap;padding:.5rem}.shell__nav:before{display:none}.shell__nav a{gap:.4rem;padding:.5rem .7rem;font-size:.8rem}.shell__header{flex-direction:column;align-items:flex-start;gap:.5rem;height:auto;padding:.85rem 1rem}.shell__main{padding:1rem}.pos__totals{flex-direction:column}.pos__summary{width:100%;margin-left:0}.ledger__summary{grid-template-columns:1fr}.data-table,.pos__cart,.ledger__table,.audit__table,.backup-panel__table{display:block;overflow-x:auto}}.pos__sale-type{border:1px solid var(--line);border-left:4px solid var(--blue);background:var(--surface);border-radius:10px;flex-wrap:wrap;align-items:center;gap:16px;margin:0 0 12px;padding:10px 14px;display:flex}.pos__sale-type legend{letter-spacing:.04em;text-transform:uppercase;color:var(--muted);padding:0 6px;font-size:12px;font-weight:600}.pos__sale-type .radio{cursor:pointer;align-items:center;gap:6px;font-weight:600;display:inline-flex}.pos__sale-type .field__hint{margin-left:auto}.link-button{color:var(--blue);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-weight:600;text-decoration:underline}.link-button:hover{color:var(--blue-strong,var(--blue))}.data-table tfoot th,.data-table tfoot td{border-top:2px solid var(--line);font-weight:700}
