:root{--bg: #f1f5f9;--surface: #ffffff;--ink: #0f172a;--muted: #64748b;--line: #e2e8f0;--accent: #0d9488;--accent-dark: #0f766e;--accent-light: #ccfbf1;--accent-2: #3b82f6;--danger: #ef4444;--warning: #f59e0b;--success: #10b981;--rail: #ffffff;--shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, .04);--shadow: 0 1px 3px 0 rgba(15, 23, 42, .08), 0 1px 2px -1px rgba(15, 23, 42, .08);--shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, .08), 0 4px 6px -4px rgba(15, 23, 42, .08);--radius: 10px;--radius-sm: 6px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{border:0;cursor:pointer}.app{min-height:100vh}.topbar{height:68px;display:flex;align-items:center;gap:24px;padding:0 24px;background:var(--surface);border-bottom:1px solid var(--line);box-shadow:var(--shadow-sm);position:relative;z-index:20}.brand{min-width:220px;display:flex;align-items:center;gap:12px}.mark{font-weight:800;font-size:22px;letter-spacing:-.02em;color:var(--ink)}.brand strong{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent);padding:4px 8px;background:var(--accent-light);border-radius:999px}.chat{margin-left:auto;height:44px;min-width:160px;color:var(--accent);background:#fff;border-bottom:3px solid #f2f2f2;font-weight:700}.top-actions{display:flex;align-items:center;gap:14px;margin-left:auto}.top-actions>svg{color:var(--muted);cursor:pointer;transition:color .15s}.top-actions>svg:hover{color:var(--ink)}.dropdown-menu{position:relative}.dropdown-panel{position:absolute;top:calc(100% + 6px);right:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--shadow-lg);z-index:100;min-width:220px;padding:6px}.dropdown-item{display:block;width:100%;text-align:left;padding:10px 14px;border:none;background:none;border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--ink);font-weight:500;transition:background .15s}.dropdown-item:hover{background:var(--bg)}.user-menu{display:flex;align-items:center;gap:10px;margin-left:8px;padding-left:14px;border-left:1px solid var(--line)}.user-info{display:flex;flex-direction:column;gap:2px;line-height:1.2}.user-info span{font-size:13px;font-weight:600;color:var(--ink)}.user-info small{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:700}.logout-btn{padding:6px 12px;font-size:12px;font-weight:600;background:transparent;color:var(--danger);border:1px solid #fecaca;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s}.logout-btn:hover{background:#fee2e2}.new-order,.advanced{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:#fff;font-weight:600;font-size:13px;padding:0 14px;height:38px;border-radius:var(--radius-sm);box-shadow:var(--shadow);transition:background .15s}.new-order:hover{background:var(--accent-dark)}.advanced{background:var(--surface);color:var(--ink);border:1px solid var(--line);max-width:96px;text-align:left;line-height:1.05}.advanced:hover{background:var(--bg)}.global-search{height:40px;width:300px;display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:var(--radius-sm);padding:0 12px;background:var(--bg)}.global-search input{border:0;outline:0;flex:1;background:transparent;font-size:13px}.global-search .search-btn{background:transparent;border:0;padding:0;cursor:pointer;color:var(--muted);display:flex;align-items:center;justify-content:center}.mobile-search-toggle,.mobile-menu-btn,.mobile-search-bar,.mobile-menu,.new-order-icon{display:none}.mobile-search-bar{align-items:center;gap:10px;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--line)}.mobile-search-bar input{flex:1;height:44px;border:1px solid var(--line);border-radius:var(--radius-sm);padding:0 14px;font-size:15px;outline:none}.mobile-search-bar input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #0d94881a}.mobile-search-bar .search-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:#fff;border-radius:var(--radius-sm);border:0;cursor:pointer}.mobile-menu{position:absolute;top:68px;right:12px;width:min(280px,calc(100vw - 24px));background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-lg);z-index:100;padding:8px}.mobile-menu-user{display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid var(--line);margin-bottom:6px}.mobile-menu-item{display:flex;align-items:center;width:100%;padding:12px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--ink);font-size:14px;font-weight:500;text-align:left;cursor:pointer;transition:background .15s}.mobile-menu-item:hover{background:var(--bg)}.mobile-menu-item.logout{color:var(--danger)}.mobile-menu-item.store-select-wrap{flex-direction:column;align-items:flex-start;gap:8px}.mobile-menu-item.store-select-wrap label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.mobile-menu-item .store-selector{width:100%}.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--accent-light);color:var(--accent-dark);font-weight:700;font-size:14px}.alert{height:30px;display:grid;place-items:center;background:var(--danger);color:#fff;font-weight:700;font-size:13px}.workspace{display:flex;min-height:calc(100vh - 68px)}.icon-rail{width:88px;flex:0 0 88px;display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 0;background:var(--rail);border-right:1px solid var(--line)}.icon-rail button{width:64px;min-height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--muted);background:transparent;border-radius:var(--radius-sm);border:1px solid transparent;transition:all .15s}.icon-rail button span{font-size:10px;font-weight:600;letter-spacing:.02em}.icon-rail button:hover{color:var(--ink);background:var(--bg)}.icon-rail button.active{color:var(--accent);background:var(--accent-light);border-color:var(--accent)}.rail-section{display:flex;flex-direction:column;align-items:center;width:100%;gap:6px}.rail-divider{width:48px;height:1px;background:var(--line);margin:12px 0}.pos-layout{display:grid;grid-template-columns:minmax(680px,1fr) 460px;width:100%;min-width:0}.catalog{min-width:0;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column}.search-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:16px 24px 12px}.search-row input,.customer-select select,.customer-select button,.custom-grid input,.custom-grid select,.panel input,.panel select{height:40px;border:1px solid #cbd5e1;border-radius:var(--radius-sm);padding:0 12px;color:#334155;background:#fff;font-size:13px;outline:none;transition:border-color .15s,box-shadow .15s}.search-row input:focus,.panel input:focus,.panel select:focus,.custom-grid input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #0d94881a}.tabs,.client-tabs{display:flex;align-items:center;gap:8px;padding:12px 24px 0;border-bottom:1px solid var(--line)}.tabs button,.client-tabs button{height:40px;padding:0 16px;background:transparent;color:#64748b;font-weight:600;font-size:13px;border-bottom:2px solid transparent;border-radius:var(--radius-sm) var(--radius-sm) 0 0}.tabs button.active,.client-tabs button.active{color:var(--accent);background:var(--accent-light);border-bottom-color:var(--accent)}.product-scroll{flex:1;overflow:auto;padding:20px 24px 40px}.product-group h2,.custom-items h2{margin:24px 0 14px;font-size:14px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}.tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:16px}.product-tile{min-height:136px;text-align:center;background:#f8fafc;border:1px solid var(--line);border-radius:var(--radius);cursor:pointer;transition:transform .1s,box-shadow .15s,border-color .15s;position:relative;overflow:hidden}.product-tile:hover{border-color:var(--accent);box-shadow:var(--shadow-lg);transform:translateY(-2px)}.product-icon{height:52px;display:grid;place-items:center;font-size:28px;padding:6px 4px 2px}.product-icon-img{max-width:44px;max-height:44px;width:auto;height:auto;object-fit:contain}.product-tile.mint{background:#dcfce7}.product-tile.cyan{background:#cffafe}.product-tile.rose{background:#ffe4e6}.product-tile.green{background:#d1fae5}.product-tile.purple{background:#ede9fe}.product-tile.slate{background:#f1f5f9}.product-tile.sage{background:#ecfdf5}.qty-strip{height:26px;display:grid;grid-template-columns:1fr 26px;align-items:center;background:#fffc;font-size:13px;font-weight:700}.qty-strip button{height:26px;background:transparent;font-size:18px;font-weight:700;color:#475569}.product-tile strong{display:block;margin-top:4px;font-size:14px;color:var(--ink)}.product-tile p{margin:3px 6px 0;min-height:32px;font-size:12px;line-height:1.25;color:var(--muted)}.custom-items{margin-top:32px;border-top:1px solid var(--line);padding-top:16px}.custom-grid{display:grid;grid-template-columns:2fr 1fr 1fr .6fr .7fr .7fr 34px;gap:14px;align-items:end}.custom-grid label{display:grid;gap:6px;font-weight:600;font-size:12px;color:#475569;text-transform:uppercase;letter-spacing:.03em}.split{display:grid;grid-template-columns:1fr 1fr;gap:12px}.split.tiny input{width:58px}.checkbox-line{display:flex;align-items:center;gap:8px;font-weight:500;font-size:13px}.round-plus{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#fff;background:var(--accent-2)}.cart-panel{background:var(--surface);min-width:0;display:flex;flex-direction:column;border-left:1px solid var(--line)}.customer-select{display:grid;grid-template-columns:1fr 120px;min-height:64px;background:#fff;border-bottom:1px solid var(--line)}.customer-select{position:relative}.customer-select>input{flex:1}.customer-select select{height:64px;border-radius:0;border-left:0;border-top:0;border-bottom:0}.search-dropdown{position:absolute;top:100%;left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);box-shadow:var(--shadow-lg);z-index:50;max-height:300px;overflow:auto;margin-top:4px}.search-dropdown-empty{padding:14px;color:var(--muted);font-size:13px;display:flex;align-items:center;justify-content:space-between;gap:10px}.search-dropdown-item{padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;display:flex;justify-content:space-between;align-items:center;transition:background .15s}.search-dropdown-item:hover{background:var(--bg)}.search-dropdown-item span:last-child{color:var(--muted);font-size:13px}.search-dropdown-footer{padding:12px;border-top:1px solid var(--line);text-align:center}.btn-primary-sm,.btn-secondary-sm{padding:6px 12px;border-radius:var(--radius-sm);font-size:12px;font-weight:600;cursor:pointer;transition:all .15s}.btn-primary-sm{background:var(--accent);color:#fff;border:none}.btn-primary-sm:hover{background:var(--accent-dark)}.btn-secondary-sm{background:transparent;color:var(--ink);border:1px solid #cbd5e1}.btn-secondary-sm:hover{background:var(--bg)}.customer-select button{height:64px;border:0;border-radius:0;background:var(--accent);color:#fff;font-weight:700;font-size:13px}.customer-select button:hover{background:var(--accent-dark)}.empty-cart{flex:1;padding:48px 32px;font-size:16px;line-height:1.5;color:var(--muted);text-align:center}.empty-cart h2{color:var(--ink);margin-bottom:12px}.cart-header{display:grid;grid-template-columns:1fr 34px 34px 34px;align-items:center;gap:8px;padding:16px;background:#fff;border-bottom:1px solid var(--line)}.cart-header h2{margin:0;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cart-header span{display:block;margin-top:4px;color:var(--muted);font-size:12px}.price-row{display:grid;grid-template-columns:1fr auto auto auto;gap:14px;align-items:center;padding:14px 16px;background:var(--bg);font-size:16px;border-bottom:1px solid var(--line)}.price-row span{display:inline-flex;align-items:center;gap:6px;font-size:14px}.price-row input{width:40px;height:32px;text-align:center}.cart-items{flex:1;overflow:auto;background:#fff}.cart-item{display:grid;grid-template-columns:1fr 32px 48px 32px 72px 84px;gap:8px;align-items:center;padding:12px 10px;border-bottom:1px solid #f1f5f9}.cart-item:focus-within,.cart-item:hover{background:#f8fafc}.cart-item span{display:block;color:var(--muted);margin-top:4px;font-size:11px}.cart-item button{width:26px;height:26px;border-radius:50%;color:#fff;background:var(--accent);font-weight:700;display:grid;place-items:center}.cart-item button:first-of-type{background:var(--danger)}.cart-item input,.totals input{height:32px;width:100%;border:1px solid #e2e8f0;border-radius:var(--radius-sm);text-align:center;background:#f8fafc}.cart-panel textarea{width:calc(100% - 32px);height:80px;margin:16px;border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px;resize:none}.totals{display:grid;gap:8px;padding:0 16px 12px;background:#fff}.totals label{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:14px}.totals input{width:48px;margin-right:6px}.delivery-row{position:sticky;bottom:0;display:grid;grid-template-columns:1fr 1fr 64px;align-items:center;height:64px;background:#fff;border-top:1px solid var(--line)}.delivery-row button{height:64px;background:#f8fafc;font-weight:700}.delivery-row strong{font-size:22px;text-align:center;color:var(--ink)}.delivery-row .go{color:#fff;background:var(--accent)}.delivery-row .go:hover{background:var(--accent-dark)}.admin-view{display:flex;width:100%;min-width:0;background:var(--bg)}.side-menu{width:180px;padding:18px 12px;display:flex;flex-direction:column;gap:4px;background:var(--surface);border-right:1px solid var(--line);flex-shrink:0}.side-menu>div:first-child{font-weight:700;font-size:11px;margin-bottom:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.side-menu button{height:34px;text-align:left;color:#475569;background:transparent;font-weight:600;font-size:12px;display:flex;align-items:center;padding:0 10px;border-radius:var(--radius-sm);border:none;cursor:pointer;transition:all .15s}.side-menu button.active{color:var(--accent);background:var(--accent-light)}.side-menu button:hover{background:var(--bg)}.admin-content{flex:1;min-width:0;padding:28px 32px 60px;overflow:auto}.orders-tabs{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap}.orders-tabs button{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:var(--radius-sm);border:1px solid var(--line);background:var(--surface);color:#475569;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}.orders-tabs button:hover{background:var(--bg)}.orders-tabs button.active{color:var(--accent);background:var(--accent-light);border-color:var(--accent)}.orders-tabs .tab-count{margin-left:8px;font-size:12px;font-weight:700;color:#64748b;background:#f1f5f9;padding:2px 6px;border-radius:10px}.orders-tabs button.active .tab-count{color:var(--accent);background:#fff}.orders-tabs button.btn-export{margin-left:auto;background:var(--accent);color:#fff;border-color:var(--accent)}.orders-tabs button.btn-export:hover{background:var(--accent-dark);border-color:var(--accent-dark)}.admin-content h1{margin:0 0 16px;font-size:22px;font-weight:700}.admin-content h1 span{color:var(--muted);font-size:16px;font-weight:500}.status-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:24px}.status-card{min-height:96px;display:flex;align-items:center;gap:16px;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm);transition:box-shadow .15s}.status-card:hover{box-shadow:var(--shadow)}.status-card>div{display:flex;flex-direction:column;gap:4px}.status-card svg{width:40px;height:40px;color:var(--accent);padding:8px;background:var(--accent-light);border-radius:var(--radius-sm);flex-shrink:0}.status-card strong{color:var(--ink);font-size:26px;font-weight:700}.status-card span{color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.status-card.warn svg{color:var(--danger);background:#fee2e2}.status-card-body{display:flex;flex-direction:column;gap:4px}.status-sub{font-size:16px;color:var(--muted);font-weight:600;margin-left:4px}.status-card.accent-near svg{color:#0d9488;background:#ccfbf1}.status-card.accent-future svg{color:#3b82f6;background:#dbeafe}.status-card.accent-overdue svg{color:#ef4444;background:#fee2e2}.status-card.accent-total svg{color:#0f172a;background:#e2e8f0}.delivery-stats{background:#fffbeb;border:1px solid #fde68a;border-radius:var(--radius);padding:16px}.recent-order{padding:18px 16px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-sm);margin-bottom:10px;color:#475569;font-size:13px}.recent-order b{color:var(--accent)}.table-tools,.panel-title{display:flex;align-items:center;gap:14px;padding:16px;background:var(--surface);border:1px solid var(--line);border-bottom:0;border-radius:var(--radius) var(--radius) 0 0}.table-tools button,.panel-title button,.orders-table button,.modal-actions button{height:36px;display:inline-flex;align-items:center;gap:6px;padding:0 14px;border:1px solid #cbd5e1;border-radius:var(--radius-sm);background:#fff;color:var(--ink);font-weight:600;font-size:13px;transition:all .15s}.table-tools button:hover,.panel-title button:hover,.orders-table button:hover{background:var(--bg);border-color:#94a3b8}.table-tools input{width:260px;height:38px;border:1px solid var(--line);border-radius:var(--radius-sm);padding:0 12px;font-size:13px}.table-tools span{margin-left:auto;color:var(--muted);font-size:13px}.orders-table,.clients-table,.service-table{width:100%;border-collapse:separate;border-spacing:0;background:var(--surface);border:1px solid var(--line);border-radius:0 0 var(--radius) var(--radius);overflow:visible}.orders-table tbody tr:last-child td:first-child,.clients-table tbody tr:last-child td:first-child,.service-table tbody tr:last-child td:first-child{border-bottom-left-radius:var(--radius)}.orders-table tbody tr:last-child td:last-child,.clients-table tbody tr:last-child td:last-child,.service-table tbody tr:last-child td:last-child{border-bottom-right-radius:var(--radius)}th{text-align:left;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:12px;border-bottom:1px solid var(--line);background:#f8fafc;color:#475569}td{vertical-align:top;padding:12px;border-bottom:1px solid #f1f5f9;font-size:13px;line-height:1.4;color:#334155}tbody tr:hover{background:#f8fafc}tbody tr:nth-child(odd){background:#fafafa}tbody tr:nth-child(odd):hover{background:#f1f5f9}.row-overdue{background:#fff1f2!important}.row-overdue:hover{background:#ffe4e6!important}.orders-table-enhanced td{padding:14px 12px}.sortable-header{cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.sortable-header:hover{background:#eef2f7}.sortable-label{margin-right:6px;vertical-align:middle}.sortable-header svg{vertical-align:middle;color:#64748b}.order-id-link{color:var(--accent-2);font-weight:700}.customer-cell{display:flex;flex-direction:column;gap:2px;max-width:220px}.customer-name{color:var(--accent-2);font-weight:600}.customer-phone{color:#64748b;font-size:12px}.customer-address{color:#64748b;font-size:11px;line-height:1.35;margin-top:2px}.order-items-cell{min-width:220px;max-width:320px}.order-items-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:3px}.order-items-list li{font-size:12px;line-height:1.55;color:#334155}.order-items-list .item-qty{color:#64748b;font-weight:600;white-space:nowrap}.order-items-summary{margin-top:6px;font-size:12px;color:#475569}.order-items-summary b{color:#0f172a}.delivery-cell{font-size:13px;color:#334155;white-space:nowrap}.delivery-cell.overdue{color:#ef4444;font-weight:600}.delivery-cell.near{color:#0d9488;font-weight:600}.delivery-cell.future{color:#3b82f6}.status-select{padding:5px 8px;border-radius:6px;border:none;font-size:12px;cursor:pointer;font-weight:600}.total-cell{display:flex;flex-direction:column;gap:4px;align-items:flex-start}.total-cell strong{font-size:14px;color:#0f172a}.payment-badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;text-transform:uppercase}.payment-badge.paid{background:#dcfce7;color:#166534}.payment-badge.unpaid{background:#fee2e2;color:#991b1b}.order-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.order-actions .btn-cleaned,.order-actions .btn-delivered,.order-actions .btn-paid{padding:6px 12px;border:1px solid;border-radius:6px;font-size:11px;font-weight:700;cursor:pointer}.order-actions .btn-cleaned{background:#cffafe;color:#155e75;border-color:#a5f3fc}.order-actions .btn-cleaned:hover:not(:disabled){background:#a5f3fc}.order-actions .btn-delivered{background:#dcfce7;color:#166534;border-color:#86efac}.order-actions .btn-delivered:hover:not(:disabled){background:#86efac}.order-actions .btn-paid{background:#fef3c7;color:#92400e;border-color:#fde68a}.order-actions .btn-paid:hover:not(:disabled){background:#fde68a}.order-actions .btn-cleaned:disabled,.order-actions .btn-delivered:disabled,.order-actions .btn-paid:disabled{opacity:.5;cursor:not-allowed}.order-actions .btn-actions{padding:6px 10px;background:#f1f5f9;color:#334155;border:1px solid #cbd5e1;border-radius:6px;font-size:11px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:4px}.order-actions .btn-icon{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;padding:0;background:#fff;border:1px solid #cbd5e1;border-radius:6px;color:#475569;cursor:pointer}.order-actions .btn-icon:hover{background:#f1f5f9}.order-actions .btn-icon.whatsapp{color:#22c55e}.action-dropdown{position:relative}.action-dropdown .action-menu{display:none;position:absolute;top:100%;right:0;margin-top:4px;min-width:170px;background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 10px 25px #0000001f;z-index:50;overflow:hidden}.action-dropdown:hover .action-menu,.action-dropdown:focus-within .action-menu{display:flex;flex-direction:column}.action-menu button{width:100%;justify-content:flex-start;padding:8px 12px;background:#fff;border:none;border-bottom:1px solid #f1f5f9;border-radius:0;font-size:12px;color:#334155;cursor:pointer}.action-menu button:hover{background:#f8fafc}.action-menu button.danger{color:#ef4444}.detail-panel-backdrop{position:fixed;inset:0;background:#0f172a73;z-index:200;display:flex;justify-content:flex-end}.detail-panel{width:100%;max-width:520px;height:100vh;background:#fff;box-shadow:-10px 0 40px #00000026;display:flex;flex-direction:column;animation:slideInRight .25s ease}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}.detail-panel-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#ccfbf1;border-bottom:1px solid #99f6e4}.detail-panel-header h2{margin:0;font-size:18px;font-weight:700;color:#0f172a}.detail-panel-actions{display:flex;align-items:center;gap:8px}.detail-panel-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:none;border-radius:6px;cursor:pointer;font-size:13px;font-weight:600}.detail-panel-actions .btn-edit{padding:6px 12px;background:#fff;color:#0d9488;border:1px solid #99f6e4}.detail-panel-actions .btn-close{width:32px;height:32px;background:#fff;color:#64748b}.detail-panel-body{flex:1;overflow-y:auto;padding:20px}.detail-customer{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:16px;margin-bottom:16px}.detail-customer h3{margin:0 0 8px;font-size:16px;font-weight:700;color:var(--accent-2)}.detail-customer-meta{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#475569;margin-bottom:12px}.detail-customer-meta span{display:inline-flex;align-items:center;gap:6px}.detail-wallet-row{display:flex;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px dashed #cbd5e1;font-size:13px;color:#475569}.detail-wallet-row b{display:block;font-size:15px;color:#0f172a;margin-top:2px}.detail-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}.detail-meta-grid>div{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px 12px}.detail-meta-grid label{display:block;font-size:11px;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px;font-weight:700}.detail-meta-grid span{font-size:13px;color:#334155;font-weight:600}.detail-status-pill,.detail-payment-pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700}.detail-payment-pill.paid{background:#dcfce7;color:#166534}.detail-payment-pill.unpaid{background:#fee2e2;color:#991b1b}.detail-section-title{font-size:13px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin:0 0 12px;padding-bottom:8px;border-bottom:1px dashed #cbd5e1}.detail-items{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.detail-item{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #f1f5f9}.detail-item-icon{width:48px;height:48px;flex-shrink:0;display:grid;place-items:center;background:#fef9c3;border-radius:8px;font-size:22px}.detail-item-icon img{width:36px;height:36px;object-fit:contain}.detail-item-info{flex:1;min-width:0}.detail-item-info strong{display:block;font-size:14px;color:#0f172a;margin-bottom:2px}.detail-item-info span{font-size:12px;color:#64748b}.detail-item-total{font-size:14px;font-weight:700;color:#0f172a;white-space:nowrap}.detail-totals{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:14px 16px;margin-bottom:20px}.detail-totals>div{display:flex;justify-content:space-between;font-size:13px;color:#475569;padding:4px 0}.detail-totals .grand-total{border-top:1px solid #cbd5e1;margin-top:6px;padding-top:8px;font-size:15px;font-weight:700;color:#0f172a}.detail-action-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.detail-action-bar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px 6px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;color:#475569;font-size:11px;font-weight:700;cursor:pointer;transition:all .15s}.detail-action-bar button:hover{background:#f8fafc;border-color:#cbd5e1}.detail-action-bar button svg{color:#0d9488}@media(max-width:640px){.detail-panel{max-width:100%}.detail-action-bar{grid-template-columns:repeat(3,1fr)}}a{color:var(--accent-2);font-weight:600;text-decoration:none}a:hover{text-decoration:underline}.muted{color:#94a3b8}em{display:inline-block;margin-top:4px;padding:3px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-style:normal;font-weight:600;font-size:11px}.cleaned{background:#cffafe!important}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm);overflow:hidden}.panel-title h1{margin:0 auto 0 0;font-size:16px;font-weight:700}.clients-table td,.clients-table th{font-size:13px}.service-table tbody tr{background:#f0fdf4}.service-table tbody tr.row-store-override{background:#fff7ed}.scope-badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600;text-transform:uppercase}.scope-badge.master{background:#dbeafe;color:#1e40af}.scope-badge.store{background:#ffedd5;color:#9a3412}.service-table input[type=text],.service-table input:not([type]){height:30px}.service-table input{max-width:140px}.save{float:right;margin:16px;height:38px;padding:0 18px;border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-weight:700;border:none}.save:hover{background:var(--accent-dark)}.printer-grid{display:grid;grid-template-columns:repeat(2,minmax(230px,1fr)) 1.3fr;gap:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.printer-card{min-height:200px;display:grid;place-items:center;gap:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:24px}.printer-card strong{font-size:16px;color:var(--ink)}.toggle{width:48px;height:26px;border-radius:999px;background:#cbd5e1;position:relative;cursor:pointer;transition:background .15s}.toggle:after{content:"";position:absolute;width:20px;height:20px;top:3px;left:3px;border-radius:50%;background:#fff;box-shadow:var(--shadow);transition:left .15s}.toggle.on{background:var(--accent-2)}.toggle.on:after{left:25px}.print-help{grid-row:span 3;padding:32px;color:#64748b;font-size:14px;line-height:1.6}.receipt-preview{display:grid;grid-template-columns:minmax(360px,1fr) 290px;gap:22px;margin-top:22px}.receipt-preview section,.receipt-preview aside{padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}.receipt-preview section{display:grid;gap:10px}.receipt-preview section h2{margin:0 0 8px;font-size:16px}.receipt-preview aside{text-align:center;font-size:12px}.receipt-preview table{width:100%;margin:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.modal-backdrop{position:fixed;inset:0;display:grid;place-items:center;background:#0f172a8c;z-index:50;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.customer-modal,.payment-modal,.modal{width:min(1160px,calc(100vw - 70px));max-height:calc(100vh - 70px);overflow:auto;background:var(--surface);box-shadow:0 25px 50px -12px #0f172a40;border-radius:var(--radius)}.modal{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 32px)}.payment-modal{width:460px;background:var(--surface)}.modal-title{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:var(--surface);border-bottom:1px solid var(--line)}.modal-title h1{margin:0;font-size:16px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.modal-title button{font-size:28px;background:transparent;color:var(--muted);line-height:1}.modal-title button:hover{color:var(--ink)}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 40px;padding:28px 32px}.form-grid label,.payment-modal label{display:flex;flex-direction:column;gap:6px;color:#475569;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.03em}.form-grid input,.form-grid select,.payment-modal input,.payment-modal select{height:42px;border:1px solid #cbd5e1;border-radius:var(--radius-sm);padding:0 12px;background:#fff;font-size:14px}.modal-actions{display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;background:var(--surface);border-top:1px solid var(--line)}.modal-actions button{height:40px;padding:0 20px;border-radius:var(--radius-sm);font-weight:600;font-size:13px}.modal-actions button:last-child{color:#fff;background:var(--accent);border-color:var(--accent)}.modal-actions button:last-child:hover{background:var(--accent-dark)}.payment-modal label,.payment-modal p{margin:16px 28px}.payment-modal p{display:flex;justify-content:space-between;font-size:16px;color:#475569}.payment-modal .grand{font-size:20px;font-weight:700;color:var(--ink);border-top:1px solid var(--line);padding-top:16px}.pay-lines{display:grid;grid-template-columns:1fr 1.2fr .8fr;gap:0;margin:20px 28px}.pay-lines input,.pay-lines select{border-radius:0;border:1px solid #cbd5e1;height:42px}.red{color:var(--danger)}.status-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:600;text-transform:capitalize;line-height:1}.status-badge:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.status-badge.active,.status-badge.approved{background:#dcfce7;color:#15803d}.status-badge.pending{background:#fef9c3;color:#a16207}.status-badge.inactive,.status-badge.rejected,.status-badge.cancelled{background:#fee2e2;color:#b91c1c}.status-badge.processing,.status-badge.received{background:#dbeafe;color:#1d4ed8}.icon-picker-overlay{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:1000;padding:24px}.icon-picker-modal{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-lg);width:100%;max-width:720px;max-height:80vh;display:flex;flex-direction:column;overflow:hidden}.icon-picker-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--line)}.icon-picker-header h3{margin:0;font-size:16px;font-weight:600}.icon-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:12px;padding:20px;overflow-y:auto}.icon-picker-item{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;border:1px solid #e2e8f0;border-radius:var(--radius-sm);background:#fff;cursor:pointer;transition:all .15s}.icon-picker-item:hover{border-color:var(--accent);box-shadow:var(--shadow)}.icon-picker-item.selected{border-color:var(--accent);background:var(--accent-light)}.icon-picker-item img{width:40px;height:40px;object-fit:contain}.icon-picker-item small{font-size:10px;color:#64748b;text-align:center;word-break:break-word;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.icon-picker-none{width:40px;height:40px;display:grid;place-items:center;font-size:11px;color:#64748b;background:#f1f5f9;border-radius:6px}.tenant-form-card{background:var(--surface);border:1px solid #e2e8f0;border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:24px;margin-bottom:24px}.tenant-form-card h3{margin:0 0 20px;font-size:16px;font-weight:600;color:var(--ink)}.tenant-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;margin-bottom:24px}.tenant-form-grid label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:500;color:#334155}.form-grid label.span-2,.tenant-form-grid label.span-2,.tenant-form-grid .span-2{grid-column:span 2}.tenant-form-grid input,.tenant-form-grid select{height:42px;padding:0 14px;border:1px solid #cbd5e1;border-radius:var(--radius-sm);font-size:14px;background:#fff;transition:border-color .15s,box-shadow .15s}.tenant-form-grid input:focus,.tenant-form-grid select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px #0d94881f}.tenant-form-grid input:disabled{background:#f1f5f9;color:#64748b;cursor:not-allowed}.tenant-form-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding-top:20px}.logo-upload-row{display:flex;flex-direction:column;gap:12px}.logo-upload-label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:500;color:#334155}.logo-upload-label input[type=file]{height:auto;padding:10px 14px;font-size:14px;cursor:pointer}.logo-upload-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.logo-preview{width:70px;height:55px;object-fit:contain;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;padding:4px}.logo-status{font-size:13px;font-weight:500}.logo-status.success{color:var(--success)}.logo-status.error{color:var(--danger)}.logo-status.info{color:var(--accent)}.btn-secondary-sm{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid #cbd5e1;border-radius:var(--radius-sm);background:#fff;color:#334155;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s}.btn-secondary-sm:hover{background:#f1f5f9;border-color:#94a3b8}.table-logo-thumb{width:48px;height:40px;object-fit:contain;border-radius:4px;background:#f8fafc;border:1px solid #e2e8f0;padding:2px;border-top:1px solid #e2e8f0}.btn-primary,.btn-secondary{height:40px;padding:0 20px;border-radius:var(--radius-sm);font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:8px;cursor:pointer;transition:all .15s}.btn-primary{background:var(--accent);color:#fff;border:1px solid var(--accent)}.btn-primary:hover{background:var(--accent-dark);border-color:var(--accent-dark)}.btn-secondary{background:#fff;color:#475569;border:1px solid #cbd5e1}.btn-secondary:hover{background:#f8fafc;border-color:#94a3b8}.icon-btn{width:32px;height:32px;border-radius:var(--radius-sm);border:1px solid #e2e8f0;background:#fff;color:#64748b;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s}.icon-btn:hover{background:#f8fafc;border-color:#94a3b8;color:var(--accent)}.icon-btn.danger:hover{color:var(--danger);border-color:#fecaca;background:#fef2f2}.tenant-table-wrap{background:var(--surface);border:1px solid #e2e8f0;border-radius:var(--radius);overflow:hidden}.tenant-table{margin:0;border:none}.tenant-table th,.tenant-table td{padding:14px 16px}.tenant-table th{background:#f8fafc;font-weight:600;color:#475569;text-transform:uppercase;font-size:11px;letter-spacing:.4px}.tenant-table td{vertical-align:middle}.tenant-table td.strong{font-weight:600;color:var(--ink)}.tenant-table td code{font-size:12px;background:#f1f5f9;padding:3px 8px;border-radius:4px;color:#475569}.tenant-table td.actions{display:flex;gap:8px}.empty-state{padding:48px 24px;text-align:center;color:#64748b;background:#f8fafc;border-radius:var(--radius);border:1px dashed #cbd5e1}@media(max-width:1100px){.pos-layout{grid-template-columns:1fr}.cart-panel{min-height:520px}.topbar{gap:12px;padding:0 16px}.brand{min-width:auto;flex:1}.brand strong{display:none}.top-actions{gap:10px;margin-left:0}.new-order{padding:0 12px;height:36px;font-size:12px}.global-search{display:none}.advanced,.top-actions>.store-selector,.user-menu.desktop-only{display:none}.mobile-search-toggle,.mobile-menu-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:var(--radius-sm);background:var(--bg);border:1px solid var(--line);color:var(--muted);cursor:pointer}.mobile-search-toggle[aria-expanded=true],.mobile-menu-btn[aria-expanded=true]{background:var(--accent-light);color:var(--accent);border-color:var(--accent)}}@media(max-width:760px){.topbar{height:auto;flex-wrap:nowrap;padding:10px 12px;gap:10px}.brand{min-width:auto}.brand .mark{font-size:20px}.top-actions{gap:8px}.top-actions>.calendar-icon{display:none}.new-order{padding:0;width:40px;height:40px;justify-content:center}.new-order-text{display:none}.new-order-icon{display:flex}.mobile-search-bar{display:flex;position:sticky;top:0;z-index:25}.mobile-menu{display:block;top:56px}.icon-rail{justify-content:flex-start}.icon-rail button{flex:0 0 auto;min-width:64px;min-height:52px;padding:4px 8px;gap:4px}.icon-rail button span{display:block;font-size:9px;font-weight:600;white-space:nowrap}.icon-rail button svg{width:20px;height:20px}.alert{height:auto;min-height:34px;padding:5px 10px;text-align:center;line-height:1.1}.chat{margin-left:0}.workspace{flex-direction:column}.icon-rail{width:100%;flex:0 0 auto;flex-direction:row;overflow-x:auto;padding:8px;gap:4px}.icon-rail button{width:auto;min-width:64px;min-height:56px}.rail-section{flex-direction:row;width:auto}.rail-divider{width:1px;height:40px;margin:0 8px}.search-row,.form-grid,.receipt-preview,.printer-grid,.custom-grid,.status-cards{grid-template-columns:1fr}.pos-layout{display:flex;flex-direction:column}.product-scroll{height:auto;max-height:none}.tile-grid{grid-template-columns:repeat(2,minmax(130px,1fr));gap:16px}.tabs,.client-tabs{gap:4px;overflow-x:auto;padding-right:16px}.tabs button,.client-tabs button{flex:0 0 auto;padding:0 12px}.cart-panel{width:100%}.customer-select{grid-template-columns:minmax(0,1fr) 84px}.customer-select button{font-size:12px;font-weight:700}.customer-select select{min-width:0}.cart-item{grid-template-columns:1fr 30px 54px 30px}.cart-item input:nth-of-type(2),.cart-item b{grid-column:span 2}.delivery-row{position:static;grid-template-columns:1fr 1fr 58px}.round-plus{justify-self:start}.side-menu{width:100%;flex-direction:row;flex-wrap:wrap;padding:12px;gap:6px}.side-menu button{flex:1 1 auto;min-width:100px}.admin-view{flex-direction:column}.admin-content,.tenant-form-card{padding:16px}.tenant-form-grid{grid-template-columns:1fr}.form-grid label.span-2,.tenant-form-grid label.span-2,.tenant-form-grid .span-2{grid-column:span 1}.tenant-form-actions{flex-direction:column-reverse;align-items:stretch}.tenant-form-actions .btn-primary,.tenant-form-actions .btn-secondary{justify-content:center}.tenant-table{min-width:720px}.tenant-table-wrap{overflow-x:auto}.orders-tabs{gap:6px}.orders-tabs button{padding:6px 10px;font-size:12px;gap:6px}.orders-tabs .tab-count{margin-left:4px;font-size:11px}.orders-tabs button.btn-export{margin-left:0;width:100%;justify-content:center;margin-top:4px}.admin-content h1{font-size:18px}.status-card{padding:14px;min-height:80px}.status-card .value{font-size:26px}.orders-table-enhanced{font-size:12px}.orders-table-enhanced th,.orders-table-enhanced td{padding:10px 8px}.customer-select button{font-size:12px}}.login-view{display:flex;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(135deg,#0f172a,#1e293b)}.login-card{background:var(--surface);padding:44px 36px;border-radius:var(--radius);box-shadow:var(--shadow-lg);width:100%;max-width:380px;text-align:center}.login-card .mark{font-size:28px;margin-bottom:8px}.login-card h2{margin:0 0 4px;font-size:22px;font-weight:700}.login-card p{margin:0 0 24px;color:var(--muted);font-size:14px}.login-card form{display:flex;flex-direction:column;gap:16px;text-align:left}.login-card label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.03em}.login-card input{padding:12px 14px;border:1px solid #cbd5e1;border-radius:var(--radius-sm);font-size:14px;transition:border-color .15s,box-shadow .15s}.login-card input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #0d94881f;outline:none}.login-card button[type=submit]{padding:12px;background:var(--accent);color:#fff;border:none;border-radius:var(--radius-sm);font-size:14px;font-weight:700;cursor:pointer;margin-top:4px;transition:background .15s}.login-card button[type=submit]:hover{background:var(--accent-dark)}.login-card button[type=submit]:disabled{opacity:.6;cursor:not-allowed}.login-error{color:var(--danger);font-size:13px;text-align:center}.login-card small{color:var(--muted);font-size:12px}
