*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #f0f2f8;--surface: #ffffff;--surface2: #f5f7fc;--border: #e2e7f0;--text: #1a2035;--text-muted: #6b7a99;--sidebar-bg: #141824;--sidebar-surface: #1e2535;--sidebar-border: #2a3347;--sidebar-text: #c8d0e0;--sidebar-text-muted: #6b7a99;--sidebar-active-bg: rgba(59,130,246,.15);--sidebar-active-text: #60a5fa;--accent: #3b82f6;--accent-dim: #2563eb;--green: #16a34a;--amber: #d97706;--red: #dc2626;--green-bg: #dcfce7;--amber-bg: #fef3c7;--red-bg: #fee2e2}html,body,#root{height:100%}body{font-family:Inter,system-ui,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}.splash{display:flex;align-items:center;justify-content:center;height:100vh;color:var(--text-muted);font-size:13px}.app-shell{display:flex;height:100vh;overflow:hidden}.sidebar{width:224px;background:var(--sidebar-bg);border-right:1px solid var(--sidebar-border);display:flex;flex-direction:column;flex-shrink:0}.sidebar-brand{padding:22px 20px 18px;border-bottom:1px solid var(--sidebar-border)}.sidebar-brand h1{font-size:19px;font-weight:700;letter-spacing:.02em;color:#fff}.sidebar-brand p{font-size:11px;color:var(--sidebar-text-muted);margin-top:2px}.sidebar-nav{flex:1;padding:10px 0}.nav-item{display:flex;align-items:center;gap:10px;padding:10px 18px;color:var(--sidebar-text);text-decoration:none;font-size:13px;font-weight:500;cursor:pointer;border:none;background:none;width:100%;text-align:left;transition:color .15s,background .15s;border-radius:0}.nav-item:hover{color:#fff;background:var(--sidebar-surface)}.nav-item.active{color:var(--sidebar-active-text);background:var(--sidebar-active-bg)}.nav-item svg{width:15px;height:15px;flex-shrink:0}.locked-nav-item{opacity:.45;cursor:pointer;border:none;width:100%;text-align:left;font-size:inherit;font-family:inherit;background:none}.locked-nav-item:hover{opacity:.75;background:var(--sidebar-surface);color:#fff}.sidebar-footer{padding:16px 20px;border-top:1px solid var(--sidebar-border)}.logout-btn{font-size:12px;color:var(--sidebar-text-muted);background:none;border:none;cursor:pointer;padding:0}.logout-btn:hover{color:var(--red)}.main-content{flex:1;overflow-y:auto;padding:28px 32px}.mode-toggle{display:flex;align-items:center;gap:2px;background:#ffffff0f;border:1px solid var(--sidebar-border);border-radius:8px;padding:3px}.mode-btn{padding:6px 14px;border-radius:6px;border:none;font-size:12px;font-weight:500;cursor:pointer;background:none;color:var(--sidebar-text-muted);transition:all .2s;flex:1;text-align:center}.mode-btn.active{background:var(--sidebar-active-bg);color:var(--sidebar-active-text);box-shadow:0 1px 3px #0003}.mode-btn.active.ai-active{background:#8b5cf640;color:#c4b5fd}.ai-mode-shell .main-content{background:#f5f3ff}.ai-mode-shell .card,.ai-mode-shell .order-card,.ai-mode-shell .dispatch-bar{border-color:#ddd6fe}.ai-mode-shell .page-title{background:linear-gradient(90deg,#7c3aed,#3b82f6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.ai-mode-shell .sidebar{border-right-color:#4c1d95;box-shadow:2px 0 20px #8b5cf626}.ai-mode-pill{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.08em;color:#7c3aed;background:#ede9fe;border:1px solid #ddd6fe;border-radius:20px;padding:3px 10px;margin-left:10px;vertical-align:middle}.ai-mode-pill:before{content:"✦";font-size:9px}.monu-insight{background:linear-gradient(135deg,#eff6ff,#f0fdf4);border:1px solid #bfdbfe;border-radius:10px;padding:14px 18px;margin-bottom:20px;display:flex;gap:12px;align-items:flex-start}.monu-insight-label{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--accent);margin-bottom:4px}.monu-insight-text{font-size:13px;color:var(--text);line-height:1.6}.page-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.page-title{font-size:20px;font-weight:600;color:var(--text)}.page-subtitle{font-size:13px;color:var(--text-muted);margin-top:2px}.card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;margin-bottom:16px;box-shadow:0 1px 3px #0000000a}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;padding:10px 14px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);border-bottom:1px solid var(--border);background:var(--surface2)}td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:top}tr:last-child td{border-bottom:none}tr:hover td{background:var(--surface2)}.badge{display:inline-flex;align-items:center;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:600;letter-spacing:.04em}.badge-green{background:var(--green-bg);color:var(--green)}.badge-amber{background:var(--amber-bg);color:var(--amber)}.badge-red{background:var(--red-bg);color:var(--red)}.badge-blue{background:#dbeafe;color:var(--accent)}.badge-grey{background:var(--surface2);color:var(--text-muted);border:1px solid var(--border)}.stock-bar-wrap{display:flex;align-items:center;gap:10px}.stock-bar-track{flex:1;height:6px;background:var(--surface2);border-radius:99px;overflow:hidden;border:1px solid var(--border)}.stock-bar-fill{height:100%;border-radius:99px;transition:width .3s ease}.stock-bar-fill.green{background:var(--green)}.stock-bar-fill.amber{background:var(--amber)}.stock-bar-fill.red{background:var(--red)}.stock-qty{font-size:12px;color:var(--text-muted);min-width:50px;text-align:right;font-variant-numeric:tabular-nums}.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border-radius:7px;font-size:13px;font-weight:500;cursor:pointer;border:none;transition:opacity .15s,background .15s;font-family:inherit}.btn:disabled{opacity:.4;cursor:not-allowed}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover:not(:disabled){background:var(--accent-dim)}.btn-danger{background:var(--red-bg);color:var(--red);border:1px solid rgba(220,38,38,.25)}.btn-danger:hover:not(:disabled){background:#fca5a5}.btn-ghost{background:var(--surface);color:var(--text-muted);border:1px solid var(--border)}.btn-ghost:hover:not(:disabled){color:var(--text);background:var(--surface2)}input[type=checkbox]{width:15px;height:15px;accent-color:var(--accent);cursor:pointer}.empty{padding:48px 0;text-align:center;color:var(--text-muted);font-size:13px}.banner{padding:12px 16px;border-radius:8px;font-size:13px;margin-bottom:16px}.banner-error{background:var(--red-bg);color:var(--red);border:1px solid rgba(220,38,38,.25)}.banner-success{background:var(--green-bg);color:var(--green);border:1px solid rgba(22,163,74,.25)}.alerts-banner{padding:10px 32px;display:flex;align-items:center;gap:12px;font-size:13px;border-bottom:1px solid var(--border)}.alerts-banner.red{background:#fff1f2;border-bottom-color:#fca5a5}.alerts-banner.amber{background:#fffbeb;border-bottom-color:#fcd34d}.stock-cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin-top:16px}.stock-card{background:var(--card-bg);border:1.5px solid var(--border);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:4px;transition:box-shadow .2s}.stock-card:hover{box-shadow:0 4px 16px #00000014}.stock-card-red{border-color:#fca5a5}.stock-card-amber{border-color:#fcd34d}.stock-card-green{border-color:var(--border)}@keyframes pulse-red{0%,to{box-shadow:0 0 #ef44444d}50%{box-shadow:0 0 0 6px #ef444400}}.stock-card-pulse{animation:pulse-red 2s ease-in-out infinite}.stock-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.stock-card-sku{font-size:10px;font-weight:600;letter-spacing:.06em;color:var(--text-muted);text-transform:uppercase}.stock-card-name{font-size:15px;font-weight:700;color:var(--text);line-height:1.2}.stock-card-pack{font-size:11px;color:var(--text-muted);margin-bottom:8px}.stock-card-qty{font-size:32px;font-weight:800;color:var(--text);line-height:1;font-variant-numeric:tabular-nums}.stock-card-unit{font-size:11px;color:var(--text-muted);margin-bottom:12px}.stock-bar-vertical-wrap{display:flex;justify-content:center;margin:8px 0}.stock-bar-vertical-track{position:relative;width:28px;height:80px;background:var(--border);border-radius:6px;overflow:visible}.stock-bar-vertical-fill{position:absolute;bottom:0;left:0;width:100%;border-radius:6px;transition:height .6s ease}.stock-bar-vertical-fill.red{background:#ef4444}.stock-bar-vertical-fill.amber{background:#f59e0b}.stock-bar-vertical-fill.green{background:#22c55e}.stock-bar-reorder-line{position:absolute;left:-6px;right:-6px;height:2px;background:#94a3b8;border-radius:1px}.stock-bar-reorder-line:before{content:"";position:absolute;left:-2px;top:-3px;width:8px;height:8px;background:#94a3b8;border-radius:50%}.stock-card-footer{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.stock-card-value{font-size:13px;font-weight:700;color:var(--text)}.stock-card-reorder{font-size:10px;color:var(--text-muted)}.stock-card-alert{margin-top:8px;font-size:11px;font-weight:600;color:#ef4444;background:#fff1f2;border-radius:6px;padding:4px 8px;text-align:center}.stock-card-alert.amber{color:#b45309;background:#fffbeb}.reorder-alert-banner{background:#fff1f2;border:1px solid #fca5a5;border-radius:8px;padding:10px 16px;font-size:13px;color:#b91c1c;margin-bottom:12px}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg)}.login-box{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:36px 40px;width:360px;box-shadow:0 4px 24px #00000012}.login-box h1{font-size:22px;font-weight:700;margin-bottom:4px;color:var(--text)}.login-box p{font-size:13px;color:var(--text-muted);margin-bottom:28px}.field{margin-bottom:16px}.field label{display:block;font-size:12px;font-weight:500;color:var(--text-muted);margin-bottom:6px}.field input{width:100%;padding:10px 12px;background:var(--surface2);border:1px solid var(--border);border-radius:7px;color:var(--text);font-size:13px;font-family:inherit}.field input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #3b82f61a}.login-btn{width:100%;padding:11px;background:var(--accent);color:#fff;border:none;border-radius:7px;font-size:14px;font-weight:600;cursor:pointer;margin-top:8px;font-family:inherit}.login-btn:hover{background:var(--accent-dim)}.login-btn:disabled{opacity:.5;cursor:not-allowed}.order-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;margin-bottom:10px;overflow:hidden;box-shadow:0 1px 3px #0000000a;transition:border-color .15s}.order-card.selected{border-color:var(--accent);box-shadow:0 0 0 3px #3b82f61a}.order-card-header{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);cursor:pointer}.order-card-header:hover{background:var(--surface2)}.order-meta{flex:1}.order-ref{font-size:13px;font-weight:600;color:var(--text)}.order-cust{font-size:12px;color:var(--text-muted);margin-top:1px}.order-lines-inner{padding:12px 16px;background:var(--surface2);display:flex;flex-direction:column;gap:6px}.order-line-row{display:flex;justify-content:space-between;font-size:12px;color:var(--text-muted)}.order-line-row span:first-child{color:var(--text)}.dispatch-bar{display:flex;align-items:center;gap:12px;margin-bottom:20px;padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 1px 3px #0000000a}.dispatch-bar span{flex:1;font-size:13px;color:var(--text-muted)}.brief-content{white-space:pre-wrap;font-family:Inter,monospace;font-size:13px;line-height:1.7;color:var(--text)}.dispatch-detail-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 3px #0000000a;cursor:pointer;transition:border-color .15s}.dispatch-detail-card:hover{border-color:var(--accent)}.loading{color:var(--text-muted);font-size:13px;padding:24px 0}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000004d;display:flex;align-items:center;justify-content:center;z-index:100;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.modal{background:var(--surface);border:1px solid var(--border);border-radius:12px;width:620px;max-width:95vw;max-height:80vh;overflow-y:auto;box-shadow:0 20px 60px #00000026}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--border)}.modal-body{padding:24px}.modal-close{background:none;border:none;cursor:pointer;color:var(--text-muted);font-size:20px;line-height:1}.modal-close:hover{color:var(--text)}
