:root{font-family:Segoe UI,system-ui,sans-serif;line-height:1.5;font-weight:400;color:#0f172a;background-color:#f8fafc}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:#f8fafc}a{color:inherit;text-decoration:none}.app{min-height:100vh}.page{padding:24px}.card{background:#fff;border-radius:12px;padding:24px;box-shadow:0 2px 12px #0f172a14}.layout{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.sidebar{background:#0f172a;color:#e2e8f0;padding:24px;display:flex;flex-direction:column;gap:16px}.sidebar h2{margin:0 0 12px;color:#f8fafc}.sidebar nav{display:flex;flex-direction:column;gap:10px}.sidebar a{padding:10px 12px;border-radius:10px;background:#ffffff14}.sidebar a.active{background:#38bdf8;color:#0f172a;font-weight:600}.sidebar .more-btn{padding:10px 12px;border-radius:10px;border:0;background:#ffffff14;color:#e2e8f0;font-size:16px;text-align:left;cursor:pointer}.sidebar .more-btn.open{background:#ffffff29}.sidebar .nav-more{display:flex;flex-direction:column;gap:8px;padding-left:10px}.staff-home{max-width:420px}.staff-home .notice{margin:12px 0}.staff-home .staff-main{display:block;width:100%;text-align:center;margin-top:12px;min-height:56px;font-size:20px;line-height:56px;padding:0 18px}.content{padding:24px 32px}.btn{background:#0ea5e9;color:#fff;border:none;padding:12px 18px;border-radius:10px;font-size:16px;cursor:pointer}.btn.secondary{background:#e2e8f0;color:#0f172a}.btn.danger{background:#ef4444}.btn.block{width:100%}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:14px;color:#475569}.field input,.field select,.field textarea{padding:10px 12px;border-radius:8px;border:1px solid #cbd5f5;font-size:16px}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:10px 8px;border-bottom:1px solid #e2e8f0;font-size:14px}.actions{display:flex;gap:10px;flex-wrap:wrap}.offline-banner{background:#fbbf24;color:#1e293b;text-align:center;padding:8px 12px;font-size:14px}.tag{padding:4px 10px;border-radius:999px;font-size:12px;background:#e2e8f0}.muted{color:#64748b}.btn.large{padding:16px 24px;font-size:20px;min-height:56px}.btn.success{background:#16a34a}a.btn{display:inline-flex;align-items:center;justify-content:center}.field.large input,.field.large select,.field.large textarea{padding:14px 16px;font-size:18px;min-height:52px}.order-entry{padding-bottom:120px}.order-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}.notice{background:#ecfeff;border:1px solid #67e8f9;color:#155e75;padding:12px 16px;border-radius:10px}.draft-list{display:flex;flex-wrap:wrap;gap:10px}.draft-chip{border:1px solid #cbd5e1;background:#f8fafc;border-radius:999px;padding:10px 16px;font-size:15px;cursor:pointer}.item-card{border:1px solid #e2e8f0;border-radius:12px;padding:16px;margin:12px 0}.item-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:12px}.stepper{display:grid;grid-template-columns:56px 1fr 56px;gap:8px}.stepper .btn{font-size:24px;padding:0;min-height:52px}.sticky-bar{position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;background:#fff;border-top:1px solid #e2e8f0;padding:16px;box-shadow:0 -8px 20px #0f172a14;border-radius:12px 12px 0 0}.total-line{font-size:22px;font-weight:700}.mobile-bar,.menu-close,.sidebar-backdrop{display:none}.sidebar-brand h2{margin:0 0 12px;color:#f8fafc}.phone-only{display:none}.desktop-only{display:table;width:100%}.record-list{display:flex;flex-direction:column;gap:12px}.record-card{border:1px solid #e2e8f0;border-radius:12px;padding:14px}.record-card strong{display:block;font-size:17px;margin-bottom:6px}.record-card p{margin:4px 0}.record-card .actions{margin-top:12px}.new-invoice-page{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:16px;align-items:start}.new-invoice-stock{min-width:0;padding:16px 12px}.new-invoice-stock h3{margin-top:0}.new-invoice-stock .table{min-width:0}.new-invoice-page .card{overflow:visible}.new-invoice-top{display:grid;grid-template-columns:3.5rem minmax(0,1fr);gap:8px;align-items:end}.new-invoice-top .compact-select-trigger{box-sizing:border-box;height:42px;min-height:42px}.store-field .compact-select-trigger{padding-left:4px;padding-right:2px;gap:2px}.store-field .compact-select-menu{left:0;right:auto;min-width:10rem;width:max-content}.new-invoice-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.new-invoice-item-fields .product-field{grid-column:1 / -1}.new-invoice-stock .table th,.new-invoice-stock .table td{padding:2px 4px;font-size:11px;line-height:1.15;word-break:break-word}.new-invoice-stock .table td:first-child,.new-invoice-stock .table th:first-child{font-size:11px;color:#475569}.compact-select{position:relative;z-index:1}.compact-select.open{z-index:40}.compact-select-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;padding:10px 12px;border-radius:8px;border:1px solid #cbd5f5;font-size:16px;line-height:1.25;background:#fff;color:#0f172a;cursor:pointer;min-height:42px}.compact-select-trigger span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-select-caret{flex:0 0 auto;color:#64748b;font-size:12px}.compact-select-menu{position:absolute;left:0;right:0;top:calc(100% + 2px);z-index:50;max-height:280px;overflow-y:auto;background:#fff;border:1px solid #cbd5f5;border-radius:8px;box-shadow:0 8px 20px #0f172a1f}.compact-select-menu button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #e2e8f0;border-radius:0;background:transparent;color:#0f172a;font-size:11px;line-height:1.05;padding:2px 8px;min-height:0;cursor:pointer}.compact-select-menu button:last-child{border-bottom:0}.compact-select-menu button:first-child{color:#64748b;border-bottom:1px solid #cbd5e1}.compact-select-menu button:hover,.compact-select-menu button.active{background:#e0f2fe}.new-invoice-stock .table th:last-child,.new-invoice-stock .table td:last-child{width:64px;white-space:nowrap;text-align:right}.dense-page{font-size:11px;line-height:1.15}.dense-page h2,.dense-page h3{font-size:13px;margin:0 0 6px}.dense-page p,.dense-page .muted,.dense-page .field label,.dense-page .table th,.dense-page .table td,.dense-page strong{font-size:11px;line-height:1.15}.dense-page input,.dense-page select,.dense-page textarea,.dense-page .btn,.dense-page .compact-select-trigger{font-size:11px;line-height:1.15;min-height:26px;padding:2px 6px}.dense-page .new-invoice-top .compact-select-trigger{height:26px;min-height:26px}.dense-page .compact-select-menu button,.dense-page .table .btn{font-size:11px}.dense-page .table th,.dense-page .table td{padding:2px 4px}.invoice-list-page .table th,.invoice-list-page .table td{padding:1px 4px;line-height:1.1}.invoice-list-page .table .btn{min-height:0;padding:0 5px;line-height:1.15;font-size:11px}.invoice-send{margin:8px 0 10px;padding:8px;border:1px solid #e2e8f0;border-radius:8px}.invoice-send-preview{display:block;max-width:280px;width:100%;margin:6px 0;border:1px solid #e2e8f0}.email-compose-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:16px;background:#0f172a73}.email-compose{width:min(420px,100%);background:#fff;border-radius:8px;padding:12px;box-shadow:0 10px 28px #0f172a33}.email-compose h3{margin:0 0 8px}.email-compose .field input,.email-compose .field textarea{width:100%;box-sizing:border-box}.email-compose textarea{width:100%;min-height:88px;resize:vertical}.invoice-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px;align-items:end}.products-page .table th,.products-page .table td{padding:2px 5px;font-size:11px;line-height:1.15;vertical-align:middle;white-space:nowrap}.products-page .table td:nth-child(2),.products-page .table th:nth-child(2){white-space:normal;word-break:break-word}.products-page .table th:nth-child(1),.products-page .table td:nth-child(1),.products-page .table th:nth-child(3),.products-page .table td:nth-child(3),.products-page .table th:nth-child(4),.products-page .table td:nth-child(4),.products-page .table th:nth-child(5),.products-page .table td:nth-child(5),.products-page .table th:nth-child(6),.products-page .table td:nth-child(6){width:1%}.products-page .table .actions{gap:4px;flex-wrap:nowrap}.products-page .table .btn{padding:1px 6px;font-size:11px;min-height:0;line-height:1.2;border-radius:4px}@media (max-width: 900px){.invoice-filters{grid-template-columns:1fr 1fr;gap:4px;margin-bottom:6px}}.card{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width: 900px){body.menu-open{overflow:hidden}.layout{grid-template-columns:1fr;min-height:100dvh}.mobile-bar{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:20;background:#0f172a;color:#f8fafc;padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top))}.menu-btn{border:0;background:#ffffff1f;color:#f8fafc;width:44px;height:44px;border-radius:10px;font-size:22px;cursor:pointer}.mobile-bar-title{font-weight:700;font-size:17px;flex:0 0 auto}.mobile-bar-store{flex:1;min-width:0}.mobile-bar-store select{width:100%;min-height:44px;border-radius:8px;border:1px solid #334155;background:#1e293b;color:#f8fafc;font-size:16px;padding:8px 10px}.sidebar-backdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:30;border:0;background:#0f172a80}.sidebar{position:fixed;top:0;left:0;bottom:0;width:min(320px,86vw);z-index:40;transform:translate(-105%);transition:transform .2s ease;overflow-y:auto;padding-top:calc(24px + env(safe-area-inset-top));padding-bottom:calc(24px + env(safe-area-inset-bottom))}.sidebar.open{transform:translate(0)}.menu-close{display:block;margin:0 0 12px;border:0;background:#ffffff1f;color:#f8fafc;border-radius:8px;padding:8px 12px;min-height:40px}.sidebar-store{display:none}.sidebar nav{width:100%}.sidebar a{min-height:44px;display:flex;align-items:center}.content{padding:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));font-size:11px;line-height:1.05}.content p,.page p{margin:0;line-height:1.05}.content h2,.content h3,.page h2{font-size:14px;margin:0 0 4px;line-height:1.1}.card{padding:6px 8px;border-radius:8px}.grid{gap:4px}.new-invoice-page{grid-template-columns:1fr;gap:4px}.new-invoice-top{grid-template-columns:3.25rem minmax(0,1fr);gap:4px}.new-invoice-top .compact-select-trigger{min-height:26px;height:26px;padding-top:2px;padding-bottom:2px}.new-invoice-stock .table th,.new-invoice-stock .table td,.new-invoice-stock .table td:first-child,.new-invoice-stock .table th:first-child{font-size:11px;line-height:1.1;padding:2px 3px}.compact-select-trigger{min-height:26px;padding:2px 6px;font-size:11px;border-radius:4px}.compact-select-menu button{min-height:0;padding:2px 6px;font-size:10px;line-height:1.1}.phone-only{display:block}.desktop-only{display:none!important}.muted,.field label{font-size:10px;line-height:1.1;margin:0}.field{gap:2px;margin:0 0 4px}.actions{gap:4px;margin:0}.phone-form,form.grid,form.grid.two,form.grid.three{gap:3px}.sort-row{display:grid;grid-template-columns:1fr auto;gap:4px;align-items:end}.sort-row label{grid-column:1 / -1}input,select,textarea,.phone-form input,.phone-form select,.phone-form button,.field input,.field select,.field textarea,.btn,.btn.large,.btn.secondary,a.btn{min-height:26px;padding:2px 6px;font-size:11px;border-radius:4px;line-height:1.1}.table{min-width:480px}.table th,.table td{padding:3px 4px;font-size:10px;line-height:1.1}.products-page .table th,.products-page .table td{padding:1px 3px;font-size:11px;line-height:1.1}.products-page .table .btn{padding:0 4px;font-size:11px;min-height:20px;line-height:1.1}.dense-page .table th,.dense-page .table td,.dense-page .muted,.dense-page .field label,.dense-page input,.dense-page select,.dense-page textarea,.dense-page .btn,.dense-page .compact-select-trigger,.dense-page .compact-select-menu button{font-size:11px}.page{padding:8px;font-size:11px;line-height:1.05}.login-page .card{width:100%}.record-list{gap:3px}.record-card{padding:4px 6px;border-radius:6px}.record-card strong{font-size:11px;margin:0;line-height:1.1}.record-card p{font-size:10px;margin:0;line-height:1.05}.record-card .actions{margin-top:3px;gap:4px}.item-card{padding:6px 8px;margin:4px 0;border-radius:6px}.item-footer{margin-top:4px;gap:6px}.stepper{grid-template-columns:32px 1fr 32px;gap:4px}.stepper .btn{font-size:16px;min-height:26px}.sticky-bar{padding:6px 8px;padding-bottom:calc(6px + env(safe-area-inset-bottom));gap:6px}.total-line{font-size:14px}.order-entry{padding-bottom:72px}.order-header{gap:6px}.notice{padding:6px 8px;font-size:11px}.draft-chip{padding:4px 8px;font-size:11px}.field.large input,.field.large select,.field.large textarea{min-height:26px;padding:2px 6px;font-size:11px}.offline-banner{padding:4px 8px;font-size:11px}.staff-home .staff-main{min-height:52px;font-size:18px;line-height:52px}.order-entry .field.large input,.order-entry .field.large select,.order-entry .field.large textarea{min-height:48px;padding:10px 12px;font-size:16px}.order-entry .stepper{grid-template-columns:48px 1fr 48px;gap:8px}.order-entry .stepper .btn{font-size:22px;min-height:48px}.order-entry .sticky-bar{padding:10px 12px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}.order-entry .total-line{font-size:18px}.order-entry .btn.large{min-height:48px;font-size:16px;padding:10px 16px}.order-entry h2{font-size:22px}.invoice-list-page .table .btn{padding:6px 8px;font-size:12px;min-height:36px}}
