:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#0f172a;background:#f8fafc}*{box-sizing:border-box}body{margin:0;background:#f8fafc}a{text-decoration:none;color:inherit}.shell{display:grid;grid-template-columns:236px 1fr;min-height:100vh}.sidebar{background:#fff;border-right:1px solid #e2e8f0;padding:20px 14px}.brand{font-weight:800;color:#2563eb;font-size:19px;margin:4px 8px 24px}.nav a,.mobile-nav a{display:block;padding:10px 12px;margin:3px 0;border-radius:9px;color:#475569;font-size:14px}.nav a.active,.nav a:hover,.mobile-nav a.active,.mobile-nav a:hover{background:#eff6ff;color:#1d4ed8;font-weight:700}.mobile-nav{display:none}.main,.content,.split>*{min-width:0}.topbar{height:64px;background:#fff;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 28px}.search{min-width:0;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;padding:9px 12px;width:300px;color:#94a3b8}.content{padding:26px 28px;max-width:1500px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.title{font-size:24px;font-weight:800;margin:0}.muted{color:#64748b;font-size:13px}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:22px 0}.card,.panel{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:17px}.metric{font-size:28px;font-weight:800;margin-top:8px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;padding:9px 14px;font-weight:700;font-size:13px;cursor:pointer;background:#2563eb;color:#fff}.btn:disabled,.btn.loading{cursor:wait;opacity:.72}.btn.secondary{background:#fff;color:#334155;border:1px solid #cbd5e1}.btn.danger{background:#dc2626}.btn.small{padding:6px 10px;font-size:12px}.toolbar{display:flex;gap:9px;align-items:center}.table-wrap{overflow:auto;background:#fff;border:1px solid #e2e8f0;border-radius:12px;margin-top:17px}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:13px 14px;border-bottom:1px solid #eef2f7;white-space:nowrap}th{color:#64748b;background:#f8fafc;font-size:12px}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:12px;font-weight:700}.badge.warn{background:#fff7ed;color:#c2410c}.tag{display:inline-flex;padding:3px 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:11px;margin-right:3px}.form{max-width:880px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.field label{display:block;font-size:13px;font-weight:700;color:#334155;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit}.field textarea{min-height:88px;resize:vertical}.full{grid-column:1/-1}.notice{padding:11px 13px;border-radius:8px;background:#eff6ff;color:#1d4ed8;margin:14px 0;font-size:13px}.notice.error{background:#fef2f2;color:#b91c1c}.notice.success{background:#f0fdf4;color:#15803d}.tabs{display:flex;gap:8px;margin:18px 0;overflow-x:auto;padding-bottom:3px;-webkit-overflow-scrolling:touch}.tabs a{flex:0 0 auto;padding:8px 12px;border-radius:8px;font-size:13px;color:#64748b}.tabs a.active{background:#eff6ff;color:#1d4ed8;font-weight:700}.timeline{border-left:2px solid #dbeafe;margin:12px 0 0 9px;padding-left:18px}.timeline-item{padding:0 0 18px}.timeline-item:before{content:"";display:block;width:10px;height:10px;border-radius:50%;background:#2563eb;position:relative;left:-24px;top:12px}.split{display:grid;grid-template-columns:1.35fr .65fr;gap:16px}.panel li{overflow-wrap:anywhere}.login{min-height:100vh;display:grid;place-items:center;background:#eff6ff}.login-card{width:390px;background:#fff;border:1px solid #dbeafe;border-radius:16px;padding:28px;box-shadow:0 18px 45px rgba(30,64,175,.09)}.login-card h1{color:#2563eb;margin:0 0 4px}.login-card .field{margin-top:15px}.login-card .btn{width:100%;margin-top:18px}.empty{color:#94a3b8;font-size:13px;padding:12px 0}.menu-toggle{display:none}@media(max-width:900px){body{overflow-x:hidden}.shell{grid-template-columns:minmax(0,1fr)}.sidebar{display:none}.mobile-nav.open{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;background:#fff;border-bottom:1px solid #e2e8f0;padding:10px 15px}.mobile-nav a{min-height:42px;display:flex;align-items:center}.content{padding:18px 15px}.topbar{padding:0 15px}.topbar .toolbar .muted,.topbar .toolbar .btn:first-of-type{display:none}.search{width:180px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.grid2,.split{grid-template-columns:minmax(0,1fr)}.form,.panel.form{max-width:none}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.menu-toggle{display:inline-flex}.table-wrap{border-radius:8px}.login-card{width:calc(100vw - 30px)}.btn,.field input,.field select,.field textarea{min-height:42px}.toolbar{flex-wrap:wrap}.toolbar .btn,.toolbar form,.toolbar select,.toolbar input{max-width:100%}}@media(max-width:640px){.table-wrap{overflow:visible;border:0;background:transparent}.table-wrap table,.table-wrap thead,.table-wrap tbody,.table-wrap tr,.table-wrap td{display:block;width:100%}.table-wrap thead{display:none}.table-wrap tr{background:#fff;border:1px solid #e2e8f0;border-radius:10px;margin:0 0 12px;padding:10px}.table-wrap td{display:grid;grid-template-columns:minmax(96px,36%) minmax(0,1fr);gap:10px;border:0;padding:7px 4px;white-space:normal;overflow-wrap:anywhere}.table-wrap td:before{content:attr(data-label);color:#64748b;font-size:12px;font-weight:800}.table-wrap td.empty{display:block;padding:14px}.table-wrap td.empty:before{content:""}.table-wrap td .btn{width:100%;margin:3px 0}.num{text-align:left}.row{align-items:flex-start}.title{font-size:21px}.metric{font-size:30px}.card,.panel{padding:15px}.topbar{gap:8px}.search{display:none}}@media(max-width:520px){.cards{grid-template-columns:1fr}.row{flex-wrap:wrap}.row>.toolbar{width:100%;justify-content:flex-start}.mobile-nav.open{grid-template-columns:1fr}.btn{width:auto}.login-card{padding:22px}}
td input,td select{width:100%;padding:7px 9px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit;font-size:13px}.stock-warning{margin-top:6px;color:#b45309;font-size:12px}
.clickable-card{display:block}.clickable-card:hover{border-color:#bfdbfe;box-shadow:0 10px 28px rgba(37,99,235,.08)}.mobile-primary{display:none}.quote-actions{flex-wrap:wrap;justify-content:flex-end}.quote-actions form,.toolbar form{display:inline-flex;margin:0}.finance-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.quote-lines-wrap td{vertical-align:top;white-space:normal}.quote-lines-wrap .product-select{min-width:320px}.quote-lines-wrap .custom-name{margin-top:7px}.quote-summary{line-height:1.8}.empty-state{text-align:center;padding:32px;color:#475569}.empty-state h3{margin:0 0 6px;color:#0f172a}.preview-tools{max-width:900px;margin:0 auto 14px;justify-content:flex-end}.quote-document{max-width:900px;margin:auto}.quote-logo{display:inline-flex;background:#2563eb;color:#fff;border-radius:10px;padding:10px 14px;font-weight:800;margin-bottom:14px}.quote-logo.image-logo{background:transparent;color:inherit;border-radius:0;padding:0}.quote-logo.image-logo img{max-width:180px;max-height:76px;object-fit:contain;display:block}.totals{text-align:right;margin-top:16px}.totals p{margin:5px 0}.signature-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:34px;padding-top:24px}.checkline{display:flex!important;gap:8px;align-items:center;font-weight:500!important}.checkline input{width:auto}.quote-filter{margin-top:16px}.field input:disabled{background:#f1f5f9;color:#94a3b8}
@media(max-width:900px){.mobile-primary{display:inline-flex;width:100%;margin-top:10px}.finance-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-lines-wrap .product-select{min-width:240px}.preview-tools{justify-content:flex-start}.signature-grid{grid-template-columns:1fr}}
.field-error{color:#b91c1c;font-size:12px;margin-top:6px}.field-help{color:#64748b;font-size:12px;margin-top:6px}.quote-editor{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}.quote-editor>.panel{grid-column:1}.quote-editor>.sticky-summary{grid-column:2;grid-row:1 / span 4;position:sticky;top:82px;margin:0}.search-results{position:relative;z-index:3;background:#fff;border:1px solid #e2e8f0;border-radius:9px;margin-top:6px;overflow:hidden}.search-result{display:block;width:100%;border:0;background:#fff;text-align:left;padding:9px 11px;cursor:pointer}.search-result:hover{background:#eff6ff}.quote-lines-wrap .clone-line{margin-right:6px}.quote-document,.quote-document table{white-space:normal}.quote-document td,.quote-document th{white-space:normal}.quote-document{overflow-wrap:anywhere}
@media screen and (max-width:900px){.topbar{height:54px}.topbar .search{width:145px;padding:6px 9px;font-size:12px}.quote-editor{display:block}.quote-editor>.sticky-summary{position:sticky;bottom:0;top:auto;margin:12px 0;z-index:4}.quote-lines-wrap{overflow:visible}.quote-lines-wrap table,.quote-lines-wrap thead,.quote-lines-wrap tbody,.quote-lines-wrap tr,.quote-lines-wrap td{display:block;width:100%}.quote-lines-wrap thead{display:none}.quote-lines-wrap tr{border-bottom:1px solid #e2e8f0;padding:10px}.quote-lines-wrap td{border:0;padding:7px 0;white-space:normal}.quote-lines-wrap td:before{content:attr(data-label);display:block;font-size:12px;color:#64748b;font-weight:700;margin-bottom:4px}.quote-lines-wrap .product-select{min-width:0}.quote-document{padding:13px}.quote-document .row{display:block}.quote-document table,.quote-document thead,.quote-document tbody,.quote-document tr,.quote-document td,.quote-document th{display:block;width:100%}.quote-document thead{display:none}.quote-document tr{border-bottom:1px solid #e2e8f0}.quote-document td{border:0;padding:6px 0}.table-wrap table td{white-space:normal}.toolbar{flex-wrap:wrap}}
.tag-cloud{display:flex;flex-wrap:wrap;gap:8px}.product-builder{margin-top:10px}
.config-picker{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;margin-bottom:10px}.config-picker input,.config-picker select{width:100%;padding:9px;border:1px solid #cbd5e1;border-radius:8px}.config-pill{border:0;cursor:pointer}.line-actions{display:flex;gap:6px;justify-content:flex-end}.quote-summary-card{background:#fff;border:1px solid #bfdbfe;border-radius:16px;padding:18px;box-shadow:0 12px 30px rgba(37,99,235,.08);color:#0f172a}.quote-summary-card h3{margin:0 0 12px}.summary-line{display:flex;justify-content:space-between;gap:12px;padding:6px 0;color:#475569}.summary-line b{color:#0f172a}.summary-total{border-top:1px solid #dbeafe;margin-top:10px;padding-top:14px}.summary-total span{display:block;color:#1d4ed8;font-weight:800}.summary-total strong{display:block;font-size:28px;margin-top:4px;color:#1e3a8a}.summary-payment{margin-top:14px;background:#f8fafc;border-radius:12px;padding:12px}.summary-payment div{display:flex;justify-content:space-between;gap:10px;padding:4px 0}.summary-payment span{color:#64748b}.summary-payment b{color:#0f172a}
.num{text-align:right}.money-negative{color:#dc2626;font-weight:700}.quote-lines-wrap .qty{min-width:72px}.quote-lines-wrap .price{text-align:right;min-width:104px}.quote-lines-wrap .line-total{font-weight:800;white-space:nowrap}.quote-lines-wrap .line-actions{justify-content:flex-start;flex-wrap:nowrap}.relationship-table .line-actions{justify-content:flex-start;flex-wrap:nowrap}
.input-clear{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}.clear-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#64748b;font-size:20px;font-weight:800}
@media(max-width:900px){.config-picker{grid-template-columns:1fr}.line-actions{justify-content:flex-start}.quote-summary-card{position:sticky;bottom:0;z-index:5;border-radius:14px}.summary-total strong{font-size:24px}}
@page{size:A4;margin:6mm}.quote-section{break-inside:avoid;page-break-inside:avoid}.quote-document table{break-inside:auto}.quote-document tr{break-inside:avoid;page-break-inside:avoid}@media print{html,body{background:#fff!important}.sidebar,.topbar,.preview-tools,.nav,.toolbar:not(.signature-grid),.notice{display:none!important}.shell,.main,.content{display:block!important;margin:0!important;padding:0!important}.content>*:not(.quote-document):not(.delivery-document){display:none!important}.quote-document,.delivery-document{display:block!important;max-width:none!important;margin:0!important;border:0!important;box-shadow:none!important;padding:0!important}.quote-document{font-size:10.5px!important;line-height:1.22!important}.delivery-document{font-size:12px}.quote-document h1,.quote-document h2,.quote-document h3,.quote-document p{margin:2px 0!important}.quote-document .quote-logo{margin-bottom:6px!important}.quote-document .quote-logo.image-logo img{max-width:150px!important;max-height:54px!important}.quote-section{break-inside:auto!important;page-break-inside:auto!important;margin-bottom:4px!important}.quote-document table{display:table!important;width:100%!important}.quote-document thead{display:table-header-group!important}.quote-document tbody{display:table-row-group!important}.quote-document tr{display:table-row!important}.quote-document th,.quote-document td{display:table-cell!important;width:auto!important}.quote-document table,.delivery-document table{page-break-inside:auto}.quote-document th,.quote-document td{padding:4px 5px!important;line-height:1.2!important}.quote-document tr,.delivery-document tr{page-break-inside:avoid;break-inside:avoid;page-break-after:auto}.quote-document .totals{margin-top:6px!important}.quote-document .totals p{margin:2px 0!important}.quote-document .signature-grid{margin-top:10px!important;padding-top:8px!important;gap:16px!important}.delivery-document .signature-grid{margin-top:22px!important;padding-top:14px!important}.quote-document .quote-stamp{max-width:90px!important;max-height:90px!important;margin:-34px 0 0 auto!important}body.print-clean>*:not(.quote-document):not(.delivery-document){display:none!important}body.print-clean .quote-document,body.print-clean .delivery-document{display:block!important}}
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:20;align-items:center;justify-content:center;padding:20px}.modal-card{background:#fff;border-radius:14px;border:1px solid #e2e8f0;max-width:920px;width:min(920px,96vw);max-height:90vh;overflow:auto;padding:18px;box-shadow:0 24px 70px rgba(15,23,42,.22)}.attachment-preview{max-width:100%;height:auto;border-radius:10px}.attachment-frame{width:100%;height:72vh;border:1px solid #e2e8f0;border-radius:10px}
.link-button{border:0;background:none;color:#2563eb;font-weight:800;cursor:pointer;padding:0}.delivery-document{max-width:900px;margin:auto}.delivery-document h1,.delivery-document h2{margin:0 0 8px}.delivery-document table{margin-top:18px}.delivery-document td,.delivery-document th{white-space:normal}
.logo-preview{margin-top:8px}.logo-preview img{max-width:160px;max-height:72px;object-fit:contain;border:1px solid #e2e8f0;border-radius:8px;background:#fff;padding:6px}.logo-preview code{display:inline-block;margin-top:4px;color:#64748b;font-size:11px;white-space:normal;overflow-wrap:anywhere}.lang-switch{display:inline-flex;gap:6px;align-items:center;font-size:12px;color:#64748b}.lang-switch a{color:#64748b}.lang-switch a.active{color:#1d4ed8;font-weight:800}
.quote-stamp{display:block;max-width:120px;max-height:120px;object-fit:contain;margin:-48px 0 0 auto;opacity:.92;position:relative;z-index:1}.check-box{display:inline-block;width:28px;height:28px;border:2px solid #0f172a;border-radius:4px;background:#fff}
.bank-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.bank-card{display:flex;gap:10px;align-items:flex-start;border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:12px;cursor:pointer}.bank-card input{width:auto;margin-top:4px}.bank-card-body{display:grid;gap:3px;color:#334155}.bank-card-body b{color:#0f172a}.bank-card-body em{font-style:normal;color:#1d4ed8;font-weight:800;font-size:12px}.bank-card.selected{border-color:#2563eb;background:#eff6ff;box-shadow:0 8px 24px rgba(37,99,235,.08)}
@media print{.delivery-document{display:block!important;max-width:none!important;margin:0!important;border:0!important;box-shadow:none!important;padding:0!important}.preview-tools{display:none!important}body:has(.delivery-document){background:#fff!important}}

.system-clock{display:inline-flex;align-items:center;padding:5px 8px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;color:#334155;font-size:12px;font-variant-numeric:tabular-nums}.toast{position:fixed;right:22px;top:76px;z-index:80;max-width:min(420px,calc(100vw - 36px));padding:12px 14px;border-radius:10px;box-shadow:0 18px 45px rgba(15,23,42,.18);font-size:14px;font-weight:800;transform:translateY(-10px);opacity:0;transition:.22s ease}.toast.show{transform:translateY(0);opacity:1}.toast.success{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0}.toast.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.table-wrap th.num,.table-wrap td.num,.delivery-document th.num,.delivery-document td.num{text-align:right}.table-wrap th:last-child,.table-wrap td:last-child{text-align:center}.table-wrap td:last-child .toolbar,.table-wrap td:last-child .line-actions{min-width:max-content;justify-content:center}.table-wrap td:last-child{width:1%;white-space:nowrap}.table-wrap td,.table-wrap th{vertical-align:middle}.table-wrap td:not(:last-child){max-width:360px;overflow:hidden;text-overflow:ellipsis}.quote-lines-wrap table{table-layout:fixed}.quote-lines-wrap th,.quote-lines-wrap td{vertical-align:middle}.quote-lines-wrap .product-select{min-width:0}.quote-lines-wrap td:nth-child(3),.quote-lines-wrap th:nth-child(3){text-align:left}.quote-lines-wrap td:nth-child(4),.quote-lines-wrap th:nth-child(4),.quote-lines-wrap td:nth-child(5),.quote-lines-wrap th:nth-child(5){text-align:right}.quote-lines-wrap td:nth-child(6),.quote-lines-wrap th:nth-child(6){text-align:center}.quote-lines-wrap .line-actions .btn{padding:5px 8px}.relationship-table td:last-child{width:auto}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 18px;flex-wrap:wrap}.pager-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.pager-item,.pager-ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;font-size:13px;font-weight:800}.pager-item.active{background:#2563eb;border-color:#2563eb;color:#fff}.pager-item.disabled{background:#f1f5f9;color:#94a3b8;cursor:not-allowed}.pager-item:not(.disabled):hover{border-color:#93c5fd;color:#1d4ed8}
@media(max-width:900px){.system-clock{display:none}.toast{top:62px;right:12px}.quote-lines-wrap table{table-layout:auto}.table-wrap td:last-child{width:auto;white-space:normal}}

@media(min-width:901px){.sidebar{position:sticky;top:0;height:100vh;overflow:auto}.main{min-height:100vh}}
