html,body,#root{height:100%;margin:0}*{box-sizing:border-box}:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}:root{--header-height:64px;--sidebar-width:260px;--right-width:300px;--bg:#f6f8fa;--muted:#6b7280;--accent:#2563eb}html,body,#root{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial;background:var(--bg);color:#111827}.app-header{position:fixed;top:0;left:0;right:0;height:var(--header-height);display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:#0f172a;color:#fff;z-index:40;box-shadow:0 2px 6px #02061726}.app-header .brand{font-weight:600;font-size:15px;letter-spacing:.2px;white-space:nowrap;margin-right:14px}.app-root{width:100%;height:100%;display:flex;flex-direction:column}.app-body{display:flex;flex-direction:row;align-items:stretch;padding:calc(var(--header-height) + 16px) 16px 24px 16px;min-height:calc(100vh - var(--header-height));box-sizing:border-box;gap:0;width:100vw;flex:1 1 auto;flex-wrap:nowrap}.app-body.expand-middle .right-panel{display:none}.sidebar{flex:0 0 var(--sidebar-width)}.right-panel{flex:0 0 var(--right-width)}.drag-split,.drag-split-right{width:10px;cursor:col-resize;position:relative;flex:0 0 10px}.drag-split:after,.drag-split-right:after{content:"";position:absolute;top:0;bottom:0;left:4px;width:2px;background:#00000014;border-radius:1px;transition:background .15s}.drag-split:hover:after,.drag-split-right:hover:after{background:#00000059}.toolbar{display:flex;gap:4px;align-items:center;flex-wrap:wrap;flex:1 1 auto;min-width:0}.toolbar-group{display:flex;gap:6px;align-items:center}.toolbar-group+.toolbar-group{padding-left:10px;margin-left:6px;border-left:1px solid rgba(255,255,255,.18)}.toolbar-spacer{flex:1 1 0;min-width:8px}.tool-btn-icon{padding:5px 9px;font-size:14px;line-height:1}.segmented{display:inline-flex;border:1px solid rgba(255,255,255,.28);border-radius:7px;overflow:hidden}.segmented button{background:transparent;color:#e5e7eb;border:none;padding:5px 14px;font-size:12px;cursor:pointer}.segmented button+button{border-left:1px solid rgba(255,255,255,.28)}.segmented button.active{background:var(--accent);color:#fff}.segmented button:not(.active):hover{background:#ffffff1a}.status-pill{background:#ffffff24;color:#fff;padding:2px 6px;border-radius:12px;font-size:10px;line-height:1}.uid-badge{background:#ffffff1f;padding:4px 10px;border-radius:20px;font-size:11px;display:flex;gap:6px;align-items:center;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-btn{display:inline-flex;gap:8px;align-items:center;padding:6px 11px;border-radius:6px;background:#fff;color:#111;border:1px solid #e5e7eb;cursor:pointer;font-size:12px;white-space:nowrap}.tool-btn svg{opacity:.95;fill:currentColor}.tool-btn:hover{background:#f3f4f6}.tool-btn:disabled{opacity:.4;cursor:default;pointer-events:none}.tool-btn.btn-file{position:relative;overflow:hidden}.tool-btn input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}.tool-btn-primary{background:#2563eb;color:#fff;border-color:#1d4ed8}.tool-btn-primary:hover{background:#1d4ed8}.tool-btn-danger{background:#fff;color:#b91c1c;border-color:#fca5a5}.tool-btn-danger:hover{background:#fef2f2}.menu-item{display:block;width:100%;text-align:left;padding:7px 10px;border:0;border-radius:5px;background:transparent;color:#111;cursor:pointer;font-size:12px;white-space:nowrap}.menu-item:hover{background:#f3f4f6}.menu-item:disabled{opacity:.4;cursor:default}.menu-item-danger{color:#b91c1c}.menu-item-danger:hover{background:#fef2f2}.project-name-badge{color:#ffffffbf;font-size:12px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 4px}.sidebar{background:#fff;border-radius:8px;padding:12px;box-shadow:0 1px 3px #0f172a0f;height:calc(100vh - var(--header-height) - 32px);overflow:auto}.main-area{background:#fff;border-radius:8px;padding:0;display:flex;align-items:flex-start;justify-content:flex-start;box-shadow:0 1px 3px #0f172a0f;min-height:calc(100vh - var(--header-height) - 32px);flex:1 1 0;min-width:0;position:relative;overflow:auto;width:auto!important;outline:1px dashed #d00}.right-panel{background:#fff;border-radius:8px;padding:12px;box-shadow:0 1px 3px #0f172a0f;height:calc(100vh - var(--header-height) - 32px);overflow:auto;transition:width .2s ease}.catalog-panel h2{margin:0 0 8px;font-size:14px}.catalog-panel ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.catalog-panel li{display:flex;gap:8px;align-items:center;padding:8px;border-radius:6px;cursor:pointer;border:1px solid transparent}.catalog-panel li:hover{background:#f3f4f6}.catalog-panel img{max-width:36px;max-height:36px;width:auto;height:auto;object-fit:contain}.selected-info{margin-top:12px;font-size:13px;color:var(--muted)}.pdf-viewer{width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:12px}.pdf-scroll-wrapper{flex:1 1 auto;width:100%;height:100%;overflow:auto}.pdf-viewer input[type=file]{display:inline-block;margin-bottom:8px}.pdf-viewer canvas{display:block;max-width:none}.bom-panel h2{margin:0 0 8px}.bom-panel table{width:100%;border-collapse:collapse;font-size:13px}.bom-panel th,.bom-panel td{text-align:left;padding:6px 8px;border-bottom:1px solid #eef2f7}.bom-panel tfoot td{border-top:2px solid #e6eef8}.modal-overlay{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:100}.modal{width:min(980px,92vw);background:#fff;border-radius:10px;box-shadow:0 10px 30px #00000040;display:flex;flex-direction:column;max-height:88vh}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e5e7eb}.modal-body{padding:12px 16px;overflow:auto}.modal-footer{padding:12px 16px;border-top:1px solid #e5e7eb;display:flex;gap:8px;justify-content:flex-end}.close-btn{background:transparent;border:none;font-size:18px;cursor:pointer}.modal-body.catalog-editor-body{overflow:auto;display:flex;flex-direction:column;flex:1;gap:12px}.merge-modal{display:flex;flex-direction:column;gap:16px}.merge-dropzone{border:2px dashed #cbd5f5;border-radius:10px;padding:24px;text-align:center;background:#f8fafc;transition:border-color .2s ease,background .2s ease}.merge-dropzone.dragging{border-color:#2563eb;background:#eff6ff}.merge-dropzone .dropzone-inner{display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;font-size:14px;color:#1f2937}.merge-dropzone .hint{font-size:12px;color:#6b7280}.merge-list{display:flex;flex-direction:column;gap:8px;max-height:300px;overflow:auto;padding-right:4px}.merge-list .empty-state{text-align:center;padding:24px 12px;border:1px dashed #dbeafe;border-radius:8px;color:#6b7280;background:#f8fafc}.merge-item{display:flex;gap:12px;justify-content:space-between;align-items:center;border:1px solid #e5e7eb;border-radius:8px;padding:10px 12px;background:#fff}.merge-item.has-error{border-color:#fca5a5;background:#fef2f2}.merge-item-info{flex:1;min-width:0}.merge-item-title{font-weight:500;font-size:14px;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.merge-item-meta{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:#6b7280}.merge-item-actions{display:flex;gap:6px}.merge-item-actions .tool-btn{padding:6px 10px;min-width:0}.merge-footer-left{display:flex;flex-direction:column;gap:4px;min-width:0}.merge-summary{font-size:13px;color:#1f2937}.merge-error{font-size:12px;color:#b91c1c}.merge-footer-actions{display:flex;gap:8px;align-items:center}.tool-btn.disabled{pointer-events:none;opacity:.5}.catalog-editor-grid{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0}.catalog-list{background:#f9fafb;border:1px solid #e5e7eb;border-radius:8px;overflow:auto;min-height:0}.list-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid #e5e7eb}.catalog-list-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column}.catalog-row{display:flex;gap:12px;align-items:center;padding:8px 12px;border-bottom:1px solid #e5e7eb;background:#fff}.catalog-row.is-editing{background:#eef2f7;border-bottom:none}.thumb{max-width:32px;max-height:32px;width:auto;height:auto;object-fit:contain;border-radius:4px;background:#fff;border:1px solid #e5e7eb;flex-shrink:0}.catalog-row .info{flex:1}.catalog-row .name{font-weight:500}.catalog-row .meta{color:#6b7280;font-size:12px}.catalog-row .row-actions{display:flex;gap:8px}.catalog-inline-form{border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;background:#fff;padding:0}.catalog-form{padding:12px;display:grid;gap:10px;align-content:start;min-height:0}.catalog-form h3{margin:0 0 4px}.catalog-form label{display:grid;gap:6px;font-size:13px}.catalog-form input,.catalog-form select{padding:8px 10px;border-radius:6px;border:1px solid #e5e7eb}.catalog-form .file-row{display:flex;align-items:center;gap:10px}.catalog-empty{padding:12px;text-align:center;color:#6b7280;font-size:13px;background:#fff}.sidebar ul{margin-top:8px}@media (max-width:1000px){.app-body{grid-template-columns:1fr;padding:calc(var(--header-height) + 12px) 12px 12px 12px}.sidebar,.right-panel{height:auto}}.pdf-fullscreen-overlay{position:fixed;inset:0;background:#0f172a;z-index:120;display:flex;flex-direction:column}.pdf-fullscreen-overlay .pdf-viewer{flex:1;width:100%;padding:16px}.pdf-fullscreen-toolbar{position:fixed;top:8px;right:12px;z-index:130;display:flex;gap:8px}
