:root{--bg: #0f172a;--bg-card: #1e293b;--bg-input: #334155;--text: #f1f5f9;--text-muted: #94a3b8;--primary: #38bdf8;--primary-hover: #7dd3fc;--danger: #f87171;--danger-hover: #fca5a5;--radius: 8px;--shadow: 0 4px 6px -1px rgb(0 0 0 / .3);--font: "DM Sans", system-ui, sans-serif}*,*:before,*:after{box-sizing:border-box}html{font-size:16px;scroll-behavior:smooth}body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.5;min-height:100vh}#root{min-height:100vh}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}.layout{display:grid;grid-template-columns:240px 1fr;grid-template-rows:auto 1fr;grid-template-areas:"header header" "sidebar main";min-height:100vh}.header{grid-area:header;display:flex;align-items:center;gap:1rem;padding:.75rem 1.5rem;background:var(--bg-card);border-bottom:1px solid var(--bg-input)}.menu-toggle{display:none;flex-direction:column;gap:4px;padding:8px;background:none;border:none;color:var(--text);cursor:pointer}.menu-toggle span{width:20px;height:2px;background:var(--text)}.brand{font-weight:700;font-size:1.25rem;color:var(--text);text-decoration:none}.brand:hover{text-decoration:none;color:var(--primary)}.brand-sub{font-weight:400;color:var(--text-muted);font-size:.95rem}.header-actions{margin-left:auto;display:flex;align-items:center;gap:1rem}.user-name{font-size:.9rem;color:var(--text-muted);max-width:180px;overflow:hidden;text-overflow:ellipsis}.sidebar{grid-area:sidebar;background:var(--bg-card);border-right:1px solid var(--bg-input);padding:1rem 0}.nav{display:flex;flex-direction:column}.nav-link{padding:.6rem 1.5rem;color:var(--text-muted);text-decoration:none;transition:background .15s,color .15s}.nav-link:hover{background:var(--bg-input);color:var(--text);text-decoration:none}.nav-link.active{background:var(--bg-input);color:var(--primary);font-weight:500}.nav-group{display:flex;flex-direction:column}.nav-group-header{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.6rem 1.5rem;background:none;border:none;color:var(--text-muted);font-size:inherit;font-family:inherit;cursor:pointer;text-align:left;transition:background .15s,color .15s}.nav-group-header:hover{background:var(--bg-input);color:var(--text)}.nav-group-label{font-weight:500}.nav-group-chevron{font-size:.7rem;opacity:.8}.nav-group-items{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s ease-out;overflow:hidden}.nav-group-items-open{grid-template-rows:1fr}.nav-group-items-inner{min-height:0;display:flex;flex-direction:column}.nav-link-sub{padding-left:2.25rem;font-size:.9rem}.main{grid-area:main;padding:1.5rem;overflow:auto}@media (max-width: 768px){.layout{grid-template-columns:1fr;grid-template-areas:"header" "main"}.sidebar{position:fixed;top:0;left:0;height:100vh;z-index:100;transform:translate(-100%);transition:transform .2s}.sidebar-open{transform:translate(0)}.menu-toggle{display:flex}}.page{max-width:1200px;margin:0 auto}.page-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.page-header h1{margin:0;font-size:1.5rem}.page h1{margin:0 0 .5rem;font-size:1.5rem}.lead{margin:0 0 1.5rem;color:var(--text-muted)}.lead strong{color:var(--text)}.btn{display:inline-flex;align-items:center;justify-content:center;padding:.5rem 1rem;font:inherit;font-size:.9rem;border-radius:var(--radius);border:none;cursor:pointer;transition:background .15s,color .15s}.btn:disabled{opacity:.6;cursor:not-allowed}.btn-primary{background:var(--primary);color:var(--bg)}.btn-primary:hover:not(:disabled){background:var(--primary-hover);color:var(--bg)}.btn-ghost{background:transparent;color:var(--text-muted)}.btn-ghost:hover:not(:disabled){background:var(--bg-input);color:var(--text)}.btn-ghost.danger:hover:not(:disabled){color:var(--danger)}.btn-sm{padding:.35rem .75rem;font-size:.85rem}.btn-block{width:100%}.input{width:100%;max-width:100%;padding:.5rem .75rem;font:inherit;font-size:.95rem;background:var(--bg-input);border:1px solid transparent;border-radius:var(--radius);color:var(--text)}.input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 2px #38bdf840}.input::placeholder{color:var(--text-muted)}.form-group{margin-bottom:1rem}.form-group label{display:block;margin-bottom:.35rem;font-size:.9rem;color:var(--text-muted)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.packaging-items-group .packaging-items-list{display:flex;flex-direction:column;gap:.5rem}.packaging-item-row{display:flex;align-items:center;gap:.5rem}.packaging-item-row .input{margin:0}.packaging-item-row select{flex:1;min-width:0}.packaging-qty-input{width:4.5rem;flex-shrink:0;text-align:center}.packaging-remove-btn{flex-shrink:0;min-width:2rem;padding:.35rem .5rem;font-size:1.25rem;line-height:1}.packaging-cost-tooltip-trigger{position:relative;cursor:help;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.packaging-cost-tooltip{position:absolute;left:0;top:100%;margin-top:.35rem;padding:.75rem 1rem;min-width:280px;max-width:360px;background:var(--bg-elevated, #1e293b);border:1px solid var(--border, #334155);border-radius:var(--radius);box-shadow:0 4px 12px #0000004d;font-size:.85rem;color:var(--text);z-index:100;pointer-events:none}.packaging-cost-tooltip-title{display:block;font-weight:600;margin-bottom:.5rem;color:var(--text)}.packaging-cost-tooltip-list{margin:0 0 .5rem;padding-left:1.25rem;list-style:disc}.packaging-cost-tooltip-list li{margin-bottom:.25rem}.packaging-cost-tooltip-total{display:block;font-weight:600;padding-top:.35rem;border-top:1px solid var(--border, #334155)}.form-group.cost-preview .cost-value{font-size:1.25rem;font-weight:600;color:var(--primary);margin:.25rem 0 0}.checkbox-group{display:flex;flex-direction:column;gap:.5rem;max-height:200px;overflow-y:auto}.checkbox-group label{margin:0;cursor:pointer;font-size:.9rem;color:var(--text)}.toolbar{margin-bottom:1rem}.toolbar .input{max-width:320px}.table-wrap{overflow-x:auto;border-radius:var(--radius);border:1px solid var(--bg-input)}.table{width:100%;border-collapse:collapse;font-size:.9rem}.table th,.table td{padding:.75rem 1rem;text-align:left;border-bottom:1px solid var(--bg-input)}.table th{font-weight:600;color:var(--text-muted);background:var(--bg-card)}.table tbody tr:hover{background:var(--bg-card)}.table code{font-size:.8rem;background:var(--bg-input);padding:.2rem .4rem;border-radius:4px}.muted{color:var(--text-muted);font-size:.85rem}.pagination{display:flex;align-items:center;gap:1rem;margin-top:1rem}.card{background:var(--bg-card);border-radius:var(--radius);border:1px solid var(--bg-input);box-shadow:var(--shadow)}.card-body{padding:1.25rem}.card h3{margin:0 0 .5rem;font-size:1.1rem}.card p{margin:0;color:var(--text-muted);font-size:.95rem}.grid-2{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1.5rem}.login-card{width:100%;max-width:400px;background:var(--bg-card);border-radius:var(--radius);border:1px solid var(--bg-input);padding:2rem;box-shadow:var(--shadow)}.login-header{margin-bottom:1.5rem;text-align:center}.login-header h1{margin:0 0 .5rem;font-size:1.5rem}.login-header p{margin:0;color:var(--text-muted);font-size:.9rem}.login-form label{display:block;margin-bottom:.35rem;font-size:.9rem;color:var(--text-muted)}.login-form input{margin-bottom:1rem}.login-form .btn{margin-top:.5rem}.alert{padding:.75rem 1rem;border-radius:var(--radius);margin-bottom:1rem}.alert-error{background:#f8717126;border:1px solid var(--danger);color:var(--danger)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:50;padding:1rem}.modal{background:var(--bg-card);border-radius:var(--radius);border:1px solid var(--bg-input);padding:1.5rem;max-width:480px;width:100%;max-height:90vh;overflow-y:auto}.modal.modal-lg{max-width:720px}.modal.modal-wide{max-width:640px}.form-section-title{font-size:.95rem;font-weight:600;color:var(--text-muted);margin:1rem 0 .5rem;padding-bottom:.25rem}.form-section-title:first-of-type{margin-top:.5rem}.client-combobox-wrap .client-combobox{position:relative}.client-combobox-list-wrap{position:absolute;left:0;right:0;top:100%;margin-top:2px;background:var(--bg-card);border:1px solid var(--bg-input);border-radius:var(--radius);box-shadow:0 4px 12px #00000026;max-height:220px;overflow-y:auto;z-index:50}.client-combobox-list{margin:0;padding:.25rem 0;list-style:none}.client-combobox-option{padding:.5rem .75rem;cursor:pointer;font-size:.9rem}.client-combobox-option:hover{background:var(--bg-input)}.client-combobox-option.muted{color:var(--text-muted);cursor:default;padding:.5rem .75rem}.product-combobox-cell{position:relative;min-width:200px}.product-combobox{position:relative}.product-combobox-list-wrap{position:absolute;left:0;right:0;top:100%;margin-top:2px;background:var(--bg-card);border:1px solid var(--bg-input);border-radius:var(--radius);box-shadow:0 4px 12px #00000026;max-height:200px;overflow-y:auto;z-index:1000}.modal .table-wrap,.modal .table-wrap .table{overflow:visible}.modal .table-wrap tbody tr{position:relative}.product-combobox-list{margin:0;padding:.25rem 0;list-style:none}.product-combobox-option{padding:.4rem .75rem;cursor:pointer;font-size:.9rem}.product-combobox-option:hover{background:var(--bg-input)}.product-combobox-option.muted{color:var(--text-muted);cursor:default;padding:.4rem .75rem}.product-combobox-option-price{color:var(--text-muted);font-size:.85em}.modal h2{margin:0 0 1rem;font-size:1.25rem}.modal-actions{display:flex;justify-content:flex-end;gap:.75rem;margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--bg-input)}.flex-between{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.5rem}.part-row{padding:1rem;margin-bottom:1rem;background:var(--bg);border-radius:var(--radius);border:1px solid var(--bg-input)}.part-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.quote-totals{margin-top:1rem;padding:1rem;background:var(--bg);border-radius:var(--radius);border:1px solid var(--bg-input)}.quote-totals h3{margin:0 0 .75rem;font-size:1rem}.quote-totals .table td{border-bottom:none}.quote-totals .total-row td{border-top:1px solid var(--bg-input);padding-top:.5rem;font-size:1.1rem}.page-loading,.forbidden{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:1rem;color:var(--text-muted)}.spinner{width:32px;height:32px;border:3px solid var(--bg-input);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.forbidden h1{margin:0;color:var(--text);font-size:1.25rem}
