:root{--bg: #f7f8fa;--surface: #ffffff;--surface-alt: #f1f4f8;--border: #d7dce3;--border-strong: #b5bdc9;--text: #1a1a1a;--text-muted: #667085;--primary: #182550;--primary-hover: #243670;--danger: #c23030;font-family:system-ui,-apple-system,Segoe UI,sans-serif;line-height:1.5;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0;min-height:100vh}.app-layout{display:flex;min-height:100vh}.sidebar{flex:0 0 220px;background:#f1f4f8;border-right:1px solid var(--border);padding:1.5rem .75rem;display:flex;flex-direction:column}.sidebar-user{display:flex;align-items:center;gap:.6rem;padding:.5rem .6rem;margin-bottom:1.5rem;min-width:0}.sidebar-user-avatar{flex:0 0 auto;width:2rem;height:2rem;border-radius:999px;background:var(--primary);color:#fff;font-size:.7rem;font-weight:700;letter-spacing:.02em;display:flex;align-items:center;justify-content:center}.sidebar-user-info{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;line-height:1.2}.sidebar-user-name{font-weight:600;font-size:.9rem;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-user-email{font-size:.75rem;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-user-logout{flex:0 0 auto;background:transparent;border:none;color:var(--text-muted);cursor:pointer;padding:.25rem;border-radius:4px;display:flex;align-items:center;justify-content:center}.sidebar-user-logout:hover{background:#fff;color:var(--text)}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1.5rem;background:var(--bg)}.login-card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:2rem;max-width:380px;width:100%;display:flex;flex-direction:column;gap:.75rem;text-align:center;box-shadow:0 1px 3px #0000000a}.login-title{margin:0;color:var(--primary);font-size:1.4rem}.login-subtitle{margin:0;color:var(--text-muted);font-size:.95rem}.google-signin-btn{margin-top:.5rem;align-self:center;display:inline-flex;align-items:center;gap:.75rem;padding:.4rem 1rem .4rem .4rem;background:var(--primary);color:#fff;border-radius:4px;text-decoration:none;font-weight:500;font-size:.95rem;line-height:1}.google-signin-btn:hover{background:var(--primary-hover)}.google-signin-btn .google-g-badge{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:#fff;border-radius:2px;flex:0 0 auto}.google-signin-btn .google-g-logo{width:18px;height:18px;display:block}.auth-bootstrap{min-height:100vh;display:flex;align-items:center;justify-content:center;color:var(--text-muted)}.sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.15rem}.sidebar-link{display:block;padding:.5rem .75rem;color:var(--text);text-decoration:none;border-radius:4px;font-size:.95rem}.sidebar-link:hover{background:#fff}.sidebar-link.active{background:var(--primary);color:#fff}.app-main{flex:1;display:flex;flex-direction:column;min-width:0}.app-header{padding:.85rem 1.5rem;border-bottom:1px solid var(--border);background:#fff;display:flex;align-items:center;gap:.75rem}.app-content{flex:1;padding:1.5rem;max-width:1200px;width:100%;margin:0 auto}.page{display:flex;flex-direction:column;gap:1rem}.page-header h1{margin:0;font-size:1.4rem;color:var(--text)}.search-bar input{width:100%;max-width:520px;padding:.5rem .75rem;border:1px solid var(--border);border-radius:4px;font-size:.95rem;font-family:inherit;background:var(--surface)}.search-bar input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #1f74d626}.record-list{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--border);border-radius:6px}.record-row{display:flex;align-items:center;gap:1.5rem;padding:.7rem 1rem;border-bottom:1px solid var(--surface-alt)}.record-row:last-child{border-bottom:none}.record-number-cell{display:flex;align-items:center;gap:.4rem}.record-number{color:var(--primary);font-weight:600}.record-badge{background:var(--surface-alt);color:var(--text-muted);padding:.1rem .5rem;border-radius:999px;font-size:.75rem;font-weight:600}.record-badge-draft{background:#f4ead0;color:#8a6d10}.record-row.clickable{cursor:pointer}.record-row.clickable:hover{background:var(--surface-alt)}.record-primary{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-secondary{flex:1;color:var(--text-muted);font-size:.9rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-amount{font-variant-numeric:tabular-nums;font-weight:500;min-width:5.5rem;text-align:right}.quote-row .record-primary,.customer-row .record-primary,.customer-row .record-secondary{flex:0 1 auto}.quote-row .record-amount{text-align:left;min-width:0}.record-empty{padding:2.5rem 1rem;text-align:center;color:var(--text-muted)}.muted{color:var(--text-muted);font-style:italic}.editor-section{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:1.25rem;margin-bottom:1.25rem}.quote-header{display:flex;flex-direction:row;gap:2rem;flex-wrap:wrap;align-items:flex-start}.quote-header-col{display:flex;flex-direction:column;gap:.85rem;flex:0 1 auto;min-width:340px}.quote-header .customer-cell{max-width:420px;display:flex;flex-direction:column;gap:.35rem}.meta-row{display:flex;gap:.85rem;flex-wrap:wrap}.meta-cell{display:flex;flex-direction:column;gap:.25rem}.meta-cell>span{color:var(--text-muted);font-size:.88rem}.meta-cell input{padding:.4rem .6rem;border:1px solid var(--border);border-radius:4px;font-size:.95rem;font-family:inherit;color:var(--text);background:var(--surface);width:100%}.meta-cell input.read-only{background:var(--surface-alt);color:var(--text-muted);cursor:not-allowed}.meta-cell .input-with-prefix{display:flex;align-items:stretch;border:1px solid var(--border);border-radius:4px;background:var(--surface);width:100%;overflow:hidden}.meta-cell .input-with-prefix.read-only{background:var(--surface-alt)}.meta-cell .input-prefix{display:flex;align-items:center;padding:0 0 0 .6rem;color:var(--text-muted);font-size:.95rem;font-family:inherit;-webkit-user-select:none;user-select:none}.meta-cell .input-with-prefix input{border:none;border-radius:0;padding:.4rem .6rem .4rem .2rem;background:transparent;width:100%;font-size:.95rem;font-family:inherit;color:var(--text);outline:none}.meta-cell .input-with-prefix.read-only input{color:var(--text-muted);cursor:not-allowed}.meta-cell.w-narrow{width:110px;flex:0 0 auto}.meta-cell.w-date{width:170px;flex:0 0 auto}.meta-cell.w-medium{width:240px;flex:0 0 auto}.meta-cell.w-grow{flex:1 1 200px;min-width:180px;max-width:280px}.bill-ship{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.bill-ship-block{display:flex;flex-direction:column;gap:.6rem}.bill-ship-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.bill-ship-header h3{margin:0;font-size:.95rem;color:var(--text)}.toggle{display:inline-flex;align-items:center;gap:.4rem;font-size:.85rem;color:var(--text-muted);cursor:pointer}.address-preview{background:var(--surface-alt);border-radius:4px;padding:.7rem .85rem;min-height:5.5rem;color:var(--text);font-size:.95rem}.address-preview .address-name{font-weight:600;margin-bottom:.25rem}.address-preview .placeholder{color:var(--text-muted);font-style:italic}.address-form{display:flex;flex-direction:column;gap:.55rem}.address-form label{display:flex;flex-direction:column;gap:.2rem;font-size:.82rem}.address-form label>span{color:var(--text-muted)}.address-form input{padding:.4rem .55rem;border:1px solid var(--border);border-radius:4px;font-size:.9rem;font-family:inherit;color:var(--text);background:var(--surface)}.address-form input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #1f74d626}.line-items-head h3{margin:0 0 .75rem;font-size:1rem;color:var(--text)}.line-items-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.92rem}.line-items-table th,.line-items-table td{padding:.35rem .4rem;text-align:left;vertical-align:middle;border-bottom:1px solid var(--surface-alt)}.line-items-table th{color:var(--text-muted);font-weight:600;font-size:.78rem;letter-spacing:.04em;text-transform:uppercase;background:var(--surface-alt);border-bottom:1px solid var(--border)}.line-items-table .col-num{width:2rem;text-align:center;color:var(--text-muted)}.line-items-table .col-sku{width:10rem}.line-items-table .col-product{width:12rem}.line-items-table .col-qty{width:5rem}.line-items-table .col-rate{width:6.5rem}.line-items-table .col-amount{width:7rem;text-align:right;color:var(--text)}.line-items-table .col-actions{width:2rem}.line-items-table input,.line-items-table textarea{width:100%;padding:.35rem .45rem;border:1px solid transparent;border-radius:3px;background:transparent;font-size:.92rem;font-family:inherit;line-height:1.4;color:var(--text);resize:vertical}.line-items-table .col-desc textarea{resize:none}.line-items-table input:hover,.line-items-table textarea:hover{border-color:var(--border)}.line-items-table input:focus,.line-items-table textarea:focus{outline:none;border-color:var(--primary);background:var(--surface);box-shadow:0 0 0 2px #1f74d61f}.line-items-table .col-qty input,.line-items-table .col-rate input{text-align:left}.row-remove{width:1.75rem;height:1.75rem;padding:0;border:1px solid transparent;border-radius:3px;background:transparent;color:var(--text-muted);font-size:1.1rem;cursor:pointer}.row-remove:hover{border-color:var(--border);color:var(--danger)}.line-items-actions{display:flex;gap:.5rem;margin-top:.75rem}.sku-search{position:relative}.sku-suggestions{position:absolute;top:calc(100% + 2px);left:0;z-index:30;list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--border-strong);border-radius:4px;box-shadow:0 10px 28px #0f172a1f;min-width:320px;max-width:460px;max-height:320px;overflow-y:auto}.sku-option{padding:.5rem .7rem;cursor:pointer;border-bottom:1px solid var(--surface-alt)}.sku-option:last-child{border-bottom:none}.sku-option:hover{background:var(--surface-alt)}.sku-option-line1{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;font-size:.92rem}.sku-option-line1 strong{color:var(--text);font-weight:600}.sku-option-line1>span:last-child{color:var(--text-muted);font-variant-numeric:tabular-nums}.sku-option-line2{color:var(--text-muted);font-size:.82rem;margin-top:.15rem}.sku-status{padding:.6rem .75rem;color:var(--text-muted);font-size:.88rem;text-align:center}.sku-status.sku-error{color:var(--danger);text-align:left}.totals-section{display:flex;justify-content:flex-end}.totals{width:26rem;max-width:100%;display:flex;flex-direction:column;gap:.4rem}.totals-row{display:grid;grid-template-columns:1fr auto 7rem;gap:.75rem;align-items:center;font-size:.95rem;color:var(--text)}.totals-row>span:first-child{color:var(--text-muted)}.totals-row>:last-child{text-align:right;font-variant-numeric:tabular-nums}.totals-row.discount-row{padding:.25rem 0}.discount-input{display:flex;align-items:stretch;gap:.35rem}.discount-input input{width:5.5rem;padding:.3rem .5rem;border:1px solid var(--border);border-radius:3px;font-size:.9rem;text-align:left;font-family:inherit;color:var(--text)}.segmented{display:inline-flex;border:1px solid var(--border);border-radius:3px;overflow:hidden}.segmented button{padding:0 .55rem;border:none;background:var(--surface);color:var(--text-muted);cursor:pointer;font-size:.9rem;min-width:1.75rem}.segmented button:hover{background:var(--surface-alt)}.segmented button.active{background:var(--primary);color:#fff}.discount-amount{color:var(--text)}.totals-row.total-row{border-top:1px solid var(--border);padding-top:.55rem;font-weight:700;font-size:1.05rem}.totals-row.total-row>span:first-child{color:var(--text)}.save-section{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;background:transparent;border:none;padding:0}.save-buttons{display:flex;gap:.5rem}.banner{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.75rem 1rem;border-radius:6px;margin-bottom:1rem}.banner-success{background:#e7f6ed;border:1px solid #bcdfca;color:#1d6b3a}.banner-actions{display:flex;gap:.5rem;flex-shrink:0}.stack{display:flex;flex-direction:column;gap:1.25rem}.field{display:flex;flex-direction:column;gap:.35rem}.field-label{font-size:.85rem;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}.card{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:1rem 1.25rem}.card h3{margin:0 0 .75rem;color:var(--text)}.card dl{display:grid;grid-template-columns:max-content 1fr;gap:.35rem 1rem;margin:0}.card dt{color:var(--text-muted);font-size:.85rem}.card dd{margin:0}.btn-primary,.btn-secondary,.btn-destructive{padding:.5rem 1rem;border-radius:4px;font-size:.95rem;font-weight:500;cursor:pointer;border:1px solid transparent;text-decoration:none;display:inline-flex;align-items:center;gap:.35rem}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--primary-hover)}.btn-primary:disabled{background:var(--border-strong);cursor:not-allowed}.btn-secondary{background:var(--surface);color:var(--text);border-color:var(--border)}.btn-secondary:hover:not(:disabled){background:var(--surface-alt)}.btn-destructive{background:var(--danger);color:#fff}.btn-destructive:hover:not(:disabled){background:#a12020}.btn-destructive:disabled{background:var(--border-strong);cursor:not-allowed}.btn-sm{padding:.25rem .65rem;font-size:.85rem}.picker{position:relative;display:flex;flex-direction:column}.picker-row{display:flex;gap:.5rem;align-items:stretch}.picker-trigger{flex:1;display:flex;justify-content:space-between;align-items:center;padding:.4rem .6rem;background:var(--surface);border:1px solid var(--border);border-radius:4px;cursor:pointer;text-align:left;font-size:.95rem;color:var(--text)}.picker-trigger:hover{border-color:var(--border-strong)}.picker-trigger-empty{color:var(--primary)}.caret{color:var(--text-muted);margin-left:.5rem}.picker-edit{padding:0 .8rem;background:var(--surface);border:1px solid var(--border);border-radius:4px;font-size:.85rem;cursor:pointer;color:var(--text-muted)}.picker-edit:hover{background:var(--surface-alt);color:var(--text)}.picker-panel{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:10;background:var(--surface);border:1px solid var(--border-strong);border-radius:4px;box-shadow:0 8px 24px #0f172a14;max-height:320px;display:flex;flex-direction:column;overflow:hidden}.picker-search{border:none;border-bottom:1px solid var(--border);padding:.55rem .75rem;font-size:.95rem;outline:none}.picker-options{list-style:none;margin:0;padding:0;overflow-y:auto}.picker-option{padding:.5rem .75rem;cursor:pointer;border-bottom:1px solid var(--surface-alt)}.picker-option:hover{background:var(--surface-alt)}.picker-option[aria-selected=true]{background:#e8f1fb}.picker-option-primary{font-weight:500}.picker-option-secondary{font-size:.8rem;color:var(--text-muted);margin-top:.15rem}.picker-add-new{color:var(--primary);font-weight:500}.picker-add-form form{display:flex;flex-direction:column;gap:.5rem}.picker-add-form input{padding:.4rem .55rem;border:1px solid var(--border);border-radius:3px;font-size:.95rem}.picker-add-actions{display:flex;gap:.4rem}.picker-empty{padding:.75rem;color:var(--text-muted);text-align:center;font-size:.9rem}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;z-index:50;padding:1rem}.modal{background:var(--surface);border-radius:8px;width:100%;max-width:560px;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 20px 60px #0f172a40}.modal.modal-sm{max-width:440px}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.25rem;border-bottom:1px solid var(--border)}.modal-header h2{margin:0;font-size:1.15rem}.modal-close{background:none;border:none;font-size:1.5rem;line-height:1;cursor:pointer;color:var(--text-muted);padding:0 .25rem}.modal-close:hover{color:var(--text)}.modal-body{padding:1.25rem;overflow-y:auto;display:flex;flex-direction:column;gap:.85rem}.modal-body label{display:flex;flex-direction:column;gap:.25rem;font-size:.88rem}.modal-body label>span{color:var(--text-muted)}.modal-body input,.modal-body textarea{padding:.5rem .65rem;border:1px solid var(--border);border-radius:4px;font-size:.95rem;font-family:inherit;color:var(--text);background:var(--surface)}.modal-body input:focus,.modal-body textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #1f74d626}.form-row.two-col{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.form-hint{color:var(--text-muted);font-size:.85rem;margin:0}.form-error{color:var(--danger);font-size:.9rem;margin:0}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem;padding:.85rem 1.25rem;border-top:1px solid var(--border);flex-wrap:wrap}.dots-menu{position:relative;flex-shrink:0}.dots-btn{width:1.9rem;height:1.9rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;font-size:1.2rem;line-height:1;color:var(--text-muted);cursor:pointer}.dots-btn:hover{border-color:var(--border);background:var(--surface-alt);color:var(--text)}.dots-popover{position:absolute;top:calc(100% + 4px);right:0;z-index:20;list-style:none;margin:0;padding:.3rem 0;background:var(--surface);border:1px solid var(--border-strong);border-radius:4px;box-shadow:0 10px 28px #0f172a1f;min-width:11rem}.dots-option{padding:.5rem .85rem;font-size:.9rem;cursor:pointer;white-space:nowrap}.dots-option:hover{background:var(--surface-alt)}.dots-option.destructive{color:var(--danger)}.dots-option.destructive:hover{background:#fbe9e9}.dots-option.disabled{color:var(--text-muted);cursor:not-allowed}.dots-option.disabled:hover{background:transparent}.address-group{border:1px solid var(--border);border-radius:4px;padding:.6rem .8rem .85rem;margin:0;display:flex;flex-direction:column;gap:.6rem}.address-group legend{padding:0 .35rem;color:var(--text-muted);font-size:.85rem;font-weight:600}
