*{box-sizing:border-box}html,body{height:100%;margin:0;font-family:system-ui,Segoe UI,Roboto,sans-serif;color:#1c1c1c}button{cursor:pointer;border:1px solid #d0d0d0;background:#fff;padding:6px 10px;border-radius:8px}button.ghost{background:#f7f7f9}button.primary{background:#0a7cff;color:#fff;border-color:#0a7cff}button.tool-btn{min-width:64px}button.active{background:#0a7cff;color:#fff;border-color:#0a7cff}button:disabled{opacity:.45;cursor:not-allowed}input.input{border:1px solid #d0d0d0;padding:6px 8px;border-radius:8px;width:100%}.app-header{height:48px;display:flex;align-items:center;padding:0 16px;border-bottom:1px solid #eee;gap:12px}.logo{font-weight:700;letter-spacing:.5px}.toolbar{display:flex;align-items:center;gap:8px}.sep{width:1px;height:20px;background:#ddd;margin:0 6px}.app-body{display:grid;grid-template-columns:500px 1fr;height:calc(100vh - 92px)}.side{border-right:1px solid #eee;padding:12px;overflow:auto}.stage{position:relative;background:#fafafa}.panel-section{background:#fff;border:1px solid #eee;border-radius:12px;padding:12px;margin-bottom:12px}.panel-title{font-weight:600;margin-bottom:8px}.panel-title+.row button{width:120px;height:fit-content}.row{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:8px;margin-bottom:8px}.row.mini{grid-template-columns:64px 1fr}.row.gap{display:grid;grid-template-columns:1fr auto;gap:8px}.stack{display:grid;gap:8px}.sep-line{height:1px;background:#eee;margin:4px 0}.canvas-wrap{position:absolute;inset:0;overflow:hidden}#main-canvas{width:100%;height:100%;display:block;background:#fff;border-left:1px solid #eee}.info-box{background:#fcfcff;border:1px dashed #b8c6ff;padding:8px;border-radius:8px}.monospace{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}.bottom-bar{height:44px;border-top:1px solid #eee;display:flex;align-items:center;justify-content:space-between;padding:0 12px}.sheets-tabs{display:flex;gap:6px;align-items:center}.sheet-tab{padding:6px 12px;border:1px solid #d0d0d0;border-radius:10px;background:#fff}.sheet-tab.active{background:#0a7cff;color:#fff;border-color:#0a7cff}.pdf-slots{display:flex;align-items:center;gap:6px}.pdf-slots .slot{width:28px;height:28px;border-radius:8px;padding:0}.table-wrap{display:grid;gap:8px;margin-top:8px}table.mini{border-collapse:collapse;width:100%;font-size:12px}table.mini th,table.mini td{border:1px solid #eee;padding:4px 6px;text-align:left}.b-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.b-run{padding:6px 8px;font:12px/1.2 ui-sans-serif,system-ui}#panel-lists{visibility:hidden;display:grid;gap:8px}#panel-lists .list{border:1px solid #e6e6ea;border-radius:8px;padding:8px;background:#fafbfc}#e-table-section{margin-top:1rem}#e-table{width:100%;border-collapse:collapse;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}#e-table thead th{text-align:center;padding:4px 2px;font-weight:600;border-bottom:1px solid #e5e7eb;white-space:nowrap}#e-table tbody tr{border-bottom:1px solid #f3f4f6}#e-table tbody td:first-child{text-align:center;font-weight:500;padding:4px 2px}.e-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.e-btn{border:1px solid #d1d5db;border-radius:6px;background:#fff;font-size:11px;line-height:1;width:22px;height:22px;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.e-btn:hover{background:#f3f4f6}.e-btn:active{background:#e5e7eb}.e-value{font-size:12px;font-weight:500;min-width:1.5rem;text-align:center}#a-project-section{margin-bottom:1rem}#a-project-section h3{font-size:14px;font-weight:600;margin-bottom:6px;color:#111827}.a-inputs{display:flex;flex-direction:column;gap:6px}.a-inputs label{font-size:12px;color:#374151}.a-inputs input,.a-inputs select{width:100%;font-size:13px;padding:4px 6px;border:1px solid #d1d5db;border-radius:6px;background:#fff;transition:border-color .2s}.a-inputs input:focus,.a-inputs select:focus{outline:none;border-color:#2563eb}.a-row{display:flex;gap:8px}.a-row>div{flex:1;display:flex;flex-direction:column}.pdf-page{width:210mm;min-height:297mm;margin:8px auto;padding:10mm 12mm;box-sizing:border-box;background:#fff;color:#111827;font-family:Source sans pro,EB Garamond,Adobe Garamond Pro,Georgia,serif;font-size:11px;display:flex;flex-direction:column;box-shadow:0 0 4mm #0000001a}.pdf-header{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:2mm}.pdf-header-title{font-size:1.8rem;font-weight:700;line-height:1.1}.pdf-header-order{font-size:1.35rem;font-weight:600}.pdf-header-bar{border-top:1px solid #e5e7eb;margin:1.2mm 0 2mm}.pdf-logo-box{width:60mm;height:22mm;display:flex;align-items:center;justify-content:center;border:none}.pdf-logo-box img{max-width:100%;max-height:100%;object-fit:contain}.pdf-top-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6mm;margin-bottom:4mm}.pdf-top-item .lbl{font-weight:600;margin-right:2mm}.pdf-section-title{font-weight:600;font-family:Garamond,EB Garamond,Adobe Garamond Pro,Georgia,serif;margin:2mm 0 1mm}.pdf-table{width:100%;border-collapse:collapse;font-family:Garamond,EB Garamond,Adobe Garamond Pro,Georgia,serif}.pdf-table thead th{border-bottom:1px solid #9ca3af;padding:2px 3px;text-align:left;white-space:nowrap;font-weight:600}.pdf-table tbody td{padding:2px 3px;border-bottom:1px solid #e5e7eb}.pdf-main-table .col-pos{width:12mm;text-align:center;font-weight:600}.col-kusy-num,.col-ploch-num,.col-objem-num{text-align:right;font-variant-numeric:tabular-nums}.pdf-summary-section{margin-top:4mm}.pdf-footer{margin-top:auto;padding-top:3mm;border-top:1px solid #e5e7eb}.pdf-footer-grid{display:grid;grid-template-columns:1fr 1fr 1fr;border:1px solid #e5e7eb;border-left:none;border-right:none}.pdf-footer-cell{min-height:14mm;padding:3mm 2mm;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center}.pdf-footer-note{margin-top:2mm;font-size:10px;font-style:italic}@media print{.pdf-page{box-shadow:none;margin:0}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.side{padding:10px}.side .panel-section.compact{padding:10px;margin-bottom:10px}.side .panel-section.compact .stack{gap:6px}.side .panel-section.compact .row{margin-bottom:6px}.side .panel-section.compact input,.side .panel-section.compact select{font-size:12px}.panel-section.compact .input{padding:4px 6px}.panel-section.compact select.input{border:1px solid #d0d0d0;border-radius:8px;background:#fff;width:100%}.side .panel-section.compact button{padding:5px 8px;font-size:12px}.panel-section.compact .a-row{gap:6px}.row.compact{grid-template-columns:1fr}.pdf-row{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:6px;align-items:center}.pdf-row input[type=file]{width:100%;font-size:12px}.pdf-row #pdf-page{width:100%}.slider-row{display:grid;grid-template-columns:1fr;gap:6px;margin-bottom:6px}.slider-row input[type=range]{width:100%}.edge-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:6px}.edge-row button{width:100%}.edge-row button.ghost{opacity:.7}.edge-row .is-empty{border-style:dashed;background:#f2f2f4}.cal2-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.cal2-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.cal2-hint{font-size:11px;opacity:.75}.is-hidden{display:none!important}.panel-section.compact .b-grid{gap:4px}.b-wide{width:100%;margin-top:8px}#e-table-section.panel-section{margin-top:0}#e-table{font-size:12px}#e-table thead th{padding:4px 2px;font-size:11px}#e-table tbody td{padding:4px 2px}#pk-table{width:100%;border-collapse:separate;border-spacing:0;font:11px/1.3 system-ui,Segoe UI,Roboto,sans-serif}#pk-table thead{display:none}#pk-table tbody{display:block}#pk-table tbody tr{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-areas:"label label eps eps" "width length thk qty";gap:6px;padding:6px;border:1px solid #eee;border-radius:10px;margin-bottom:6px}#pk-table tbody tr td{padding:0;border:0;min-width:0}#pk-table tbody tr td:nth-child(1){grid-area:label;font-weight:600}#pk-table tbody tr td:nth-child(2){grid-area:eps}#pk-table tbody tr td:nth-child(3){grid-area:width}#pk-table tbody tr td:nth-child(4){grid-area:length}#pk-table tbody tr td:nth-child(5){grid-area:thk}#pk-table tbody tr td:nth-child(6){grid-area:qty}#pk-table .inp{width:100%;font-size:11px;padding:4px 6px;border:1px solid #d1d5db;border-radius:6px}@media(max-width:520px){#pk-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"label eps" "width length" "thk qty"}}.tbl,#rk-table{width:100%;border-collapse:collapse;font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.tbl th,.tbl td,#rk-table th,#rk-table td{padding:4px 6px;border-bottom:1px solid #eef1f4}.tbl td.num,#rk-table td.num{text-align:right}.tbl tbody tr:hover,#rk-table tbody tr:hover{background:#f3f6f9;cursor:pointer}.tbl tbody tr.sel,#rk-table tbody tr.sel{background:#e7f1ff}
