*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}:root{--blue-600:oklch(.456 .228 263.8);--blue-700:oklch(.398 .195 263.8);--slate-900:oklch(.25 .035 259);--slate-600:oklch(.48 .035 259);--slate-300:oklch(.86 .02 259);--surface-app:#f5f7fa;--surface-panel:#fff;--surface-subtle:#f8fafc;--text-primary:var(--slate-900);--text-secondary:var(--slate-600);--border-default:var(--slate-300);--action-primary:var(--blue-600);--action-hover:var(--blue-700);--brand:#1d4ed8;--brand-hover:#1e40af;--text:#172033;--muted:#64748b;--border:#e2e8f0;--success:#15803d;--warning:#b45309;--danger:#b91c1c;--info:#0369a1;font-family:Noto Sans SC,PingFang SC,Microsoft YaHei,Noto Sans,system-ui,sans-serif;color:var(--text);background:var(--surface-app);font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html,body,#root{margin:0;min-width:0;min-height:100%}body{min-height:100dvh;font-size:14px;line-height:1.55;overflow-x:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}button,a,input,select,textarea{outline:0}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role=button]:focus-visible{outline:2px solid var(--brand);outline-offset:2px}::-moz-selection{background:#dbeafe;color:#172033}::selection{background:#dbeafe;color:#172033}*{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}*::-webkit-scrollbar{width:7px;height:7px}*::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}h1,h2,h3,p{margin:0}h1{font-size:24px;line-height:32px;letter-spacing:-.02em}h2{font-size:18px;line-height:26px}h3{font-size:15px;line-height:22px}svg{flex-shrink:0;stroke-width:1.8}.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}.numeric{font-variant-numeric:tabular-nums;white-space:nowrap}.align-right{text-align:right}.btn{border:1px solid var(--border);background:var(--surface-panel);color:var(--text);border-radius:6px;min-height:38px;padding:8px 14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:550;font-size:13px;white-space:nowrap;transition:background-color .16s ease-out,border-color .16s ease-out,color .16s ease-out,transform .12s ease-out}.btn:hover:not(:disabled){background:var(--surface-subtle);border-color:#cbd5e1}.btn:active:not(:disabled){transform:translateY(1px)}.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn-primary:hover:not(:disabled){background:var(--brand-hover);border-color:var(--brand-hover)}.btn-secondary{background:#fff}.btn-ghost{border-color:transparent;background:transparent;color:#475569}.btn-ghost:hover:not(:disabled){background:#f1f5f9;border-color:transparent;color:var(--text)}.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger:hover:not(:disabled){background:#991b1b;border-color:#991b1b}.btn-sm{min-height:32px;padding:5px 9px;font-size:12px}.btn-lg{min-height:42px;padding:10px 18px}.icon-btn{width:36px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#475569;display:inline-flex;align-items:center;justify-content:center;transition:background-color .16s ease-out,color .16s ease-out}.icon-btn:hover:not(:disabled){background:#f1f5f9;color:var(--text)}.text-button{padding:0;border:0;background:transparent;color:var(--brand);font-size:12px}.text-button:hover{text-decoration:underline;text-underline-offset:3px}.back-link{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:var(--muted);padding:0;margin-bottom:18px}.back-link:hover{color:var(--brand)}.field{display:flex;flex-direction:column;gap:7px;min-width:0;margin-bottom:16px}.field-label{font-size:13px;color:#334155;font-weight:550}.field-hint{color:var(--muted);font-size:12px;line-height:18px}.field-error{color:var(--danger);font-size:12px;display:flex;align-items:flex-start;gap:5px;line-height:18px}.input{width:100%;min-width:0;min-height:38px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:var(--text);padding:8px 10px;transition:border-color .15s ease-out,box-shadow .15s ease-out}.input::-moz-placeholder{color:#64748b;opacity:1}.input::placeholder{color:#64748b;opacity:1}.input:hover{border-color:#94a3b8}.input:focus{border-color:var(--brand);box-shadow:0 0 0 3px #1d4ed814}.textarea{resize:vertical;min-height:76px;line-height:1.6}.select{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;padding-right:8px}.form-grid{display:grid;gap:0 14px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.badge{display:inline-flex;align-items:center;min-height:23px;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600;white-space:nowrap;background:#f1f5f9;color:#475569}.badge-blue{background:#eff6ff;color:#1e40af}.badge-green{background:#f0fdf4;color:#15803d}.badge-amber{background:#fffbeb;color:#92400e}.badge-red{background:#fef2f2;color:#b91c1c}.dialog-overlay{position:fixed;inset:0;z-index:60;background:#0f172a66;animation:overlay-in .16s ease-out}.dialog-content{position:fixed;z-index:61;top:50%;left:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 32px));max-height:88dvh;overflow:auto;padding:24px;border-radius:12px;background:#fff;box-shadow:0 18px 50px #0f172a26}.dialog-wide{width:min(1120px,calc(100vw - 32px))}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px}.dialog-heading h2{font-size:19px}.dialog-heading p{color:var(--muted);margin-top:6px;font-size:13px;max-width:65ch}.dialog-heading .icon-btn{margin:-6px -6px 0 0}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:24px}.drawer-content{position:fixed;z-index:61;right:0;top:0;height:100dvh;width:min(620px,100vw);overflow-y:auto;background:#fff;padding:26px 28px;box-shadow:-18px 0 50px #0f172a1f}.drawer-form section{padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid var(--border)}.drawer-form section h3{margin-bottom:18px;display:flex;gap:7px;align-items:center}.dropdown-content{z-index:70;min-width:190px;padding:6px;background:#fff;border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 28px #0f172a1a}.dropdown-content [role=menuitem]{display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:5px;font-size:13px;cursor:pointer;outline:0}.dropdown-content [role=menuitem]:hover,.dropdown-content [role=menuitem]:focus{background:#f1f5f9}.dropdown-content [role=separator]{height:1px;background:var(--border);margin:5px}.dropdown-content .danger-item{color:var(--danger)}@keyframes overlay-in{0%{opacity:0}to{opacity:1}}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.upload-drop{width:100%;min-height:126px;border:1px dashed #94a3b8;border-radius:8px;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#475569;padding:18px}.upload-drop:hover{border-color:var(--brand);background:#eff6ff;color:var(--brand)}.upload-drop span{color:var(--muted);font-size:12px;text-align:center}.upload-preview{display:flex;align-items:center;gap:18px;background:#f8fafc;padding:12px;border-radius:8px}.upload-preview img{width:86px;height:86px;-o-object-fit:contain;object-fit:contain;background:#fff;border:1px solid var(--border)}.upload-preview>div{display:flex;gap:6px;flex-wrap:wrap}.empty-state{padding:44px 20px;display:flex;flex-direction:column;align-items:center;text-align:center;color:var(--muted)}.empty-state h3{color:var(--text);margin:12px 0 5px}.empty-state p{max-width:46ch;margin-bottom:18px}.notice{display:flex;gap:12px;padding:14px 16px;border-radius:8px;margin-bottom:20px}.notice-error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.form-note{display:flex;align-items:flex-start;gap:9px;padding:12px;background:#eff6ff;color:#1e40af;border-radius:6px;font-size:12px;line-height:19px;margin-top:18px}.form-note.warning{background:#fffbeb;color:#92400e}.inline-empty{display:flex;align-items:center;gap:12px;padding:18px;color:var(--muted);background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.section-divider{height:1px;background:var(--border);margin:22px 0}.app-shell{min-height:100dvh;display:grid;grid-template-columns:216px minmax(0,1fr)}.app-sidebar{position:sticky;top:0;height:100dvh;z-index:30;background:#fff;border-right:1px solid var(--border);display:flex;flex-direction:column;transition:width .18s ease-out}.brand{height:60px;display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid var(--border);overflow:hidden}.brand-mark{width:34px;height:34px;flex-shrink:0;display:grid;place-items:center;background:var(--brand);color:#fff;border-radius:8px}.brand>div{display:flex;flex-direction:column;white-space:nowrap}.brand strong{font-size:15px;letter-spacing:.02em}.brand small{font-size:10px;color:var(--muted);letter-spacing:.06em}.sidebar-new{padding:18px 12px 12px}.sidebar-new .btn{width:100%}.main-nav{display:flex;flex-direction:column;gap:4px;padding:6px 12px}.main-nav button,.sidebar-bottom button{min-height:42px;border:0;border-radius:6px;background:transparent;color:#475569;display:flex;align-items:center;gap:12px;padding:10px 12px;text-align:left;white-space:nowrap}.main-nav button:hover,.sidebar-bottom button:hover{background:#f1f5f9;color:var(--text)}.main-nav button.active{background:#eff6ff;color:var(--brand);font-weight:600}.sidebar-bottom{margin-top:auto;padding:12px;border-top:1px solid var(--border);display:grid;gap:4px}.collapse-button{color:var(--muted)!important;font-size:12px}.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr)}.sidebar-collapsed .brand{padding:0 15px}.sidebar-collapsed .brand>div,.sidebar-collapsed .sidebar-new span,.sidebar-collapsed .main-nav span,.sidebar-collapsed .sidebar-bottom span{display:none}.sidebar-collapsed .sidebar-new{padding:18px 10px 12px}.sidebar-collapsed .sidebar-new .btn{padding:8px}.sidebar-collapsed .main-nav{padding:6px 10px}.sidebar-collapsed .main-nav button,.sidebar-collapsed .sidebar-bottom button{justify-content:center;padding:10px}.app-main{min-width:0}.app-topbar{height:60px;position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#fffffff2;border-bottom:1px solid var(--border)}.topbar-left,.topbar-actions,.breadcrumb{display:flex;align-items:center}.topbar-left,.topbar-actions{gap:10px}.breadcrumb{gap:8px;font-size:12px;color:var(--muted)}.breadcrumb strong{color:var(--text);font-weight:550}.local-storage-badge{display:inline-flex;align-items:center;gap:5px;color:#475569;background:#f1f5f9;padding:4px 8px;border-radius:5px;font-size:11px}.local-storage-badge.error{background:#fef2f2;color:var(--danger)}.dashboard-brand{display:flex;align-items:center;min-height:32px;margin:0}.dashboard-brand img{display:block;width:106px;height:32px;-o-object-fit:contain;object-fit:contain;-o-object-position:left center;object-position:left center}.mobile-menu,.mobile-nav-close{display:none}.app-content{min-width:0}.page{max-width:1440px;margin:0 auto;padding:28px 30px 40px}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:26px}.page-heading p{margin-top:5px;color:var(--muted)}.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:16px}.section-heading p{margin-top:4px;color:var(--muted);font-size:12px}.continue-panel{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:18px 20px;background:#fff;border:1px solid #bfdbfe;border-radius:10px}.continue-icon{width:46px;height:54px;display:grid;place-items:center;background:#eff6ff;color:var(--brand);border-radius:6px}.continue-copy{min-width:0}.continue-label{display:block;color:var(--muted);font-size:11px;margin-bottom:2px}.continue-copy button{border:0;padding:0;background:transparent;color:var(--text);font-weight:650;font-size:16px}.continue-copy button:hover{color:var(--brand)}.continue-copy p{color:var(--muted);font-size:12px;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.continue-time{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px}.quick-section{margin-top:30px}.document-type-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.document-type-card{position:relative;min-width:0;min-height:205px;padding:16px;border:1px solid var(--border);border-radius:10px;background:#fff;text-align:left;display:flex;flex-direction:column;transition:border-color .16s ease-out,transform .16s ease-out}.document-type-card:hover{border-color:#93c5fd;transform:translateY(-2px)}.document-type-card>svg{position:absolute;right:13px;top:18px;color:#94a3b8}.type-miniature{width:48px;height:62px;padding:8px 7px;background:#f8fafc;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:4px;margin-bottom:14px;box-shadow:3px 4px #f1f5f9}.type-miniature span{font-size:9px;font-weight:750;color:var(--brand)}.type-miniature i{height:2px;background:#cbd5e1;display:block}.type-miniature i:nth-of-type(2){width:75%}.document-type-card strong{display:block;font-size:15px}.document-type-card>div>span{color:var(--muted);font-size:10px}.document-type-card p{color:var(--muted);font-size:12px;margin-top:9px;line-height:18px}.recent-section{margin-top:30px}.table-toolbar.compact{margin-bottom:12px}.table-toolbar.compact .search-box{max-width:420px}.local-note{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;margin-top:20px}.search-box{position:relative;flex:1;min-width:220px}.search-box>svg{position:absolute;top:50%;left:11px;transform:translateY(-50%);color:var(--muted);pointer-events:none}.search-box .input{padding-left:34px}.filter-bar{display:flex;align-items:center;gap:10px;padding:14px;background:#fff;border:1px solid var(--border);border-radius:10px 10px 0 0}.filter-bar>.select{width:auto;min-width:130px}.filter-count{color:var(--muted);white-space:nowrap;font-size:12px;padding:0 8px}.list-summary{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;padding:12px 2px}.data-table-wrap{overflow-x:auto;background:#fff;border:1px solid var(--border);border-radius:10px}.filter-bar+.data-table-wrap,.filter-bar+.list-summary+.data-table-wrap{border-radius:0 0 10px 10px}.data-table{width:100%;border-collapse:collapse;font-size:13px}.data-table th{position:relative;text-align:left;font-size:11px;font-weight:600;color:#475569;background:#f8fafc;padding:11px 14px;border-bottom:1px solid var(--border);white-space:nowrap}.data-table td{padding:13px 14px;border-bottom:1px solid #edf2f7;vertical-align:middle}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fafcfe}.data-table td>strong{display:block;font-weight:600}.data-table td>small,.data-table td>div>small{display:block;color:var(--muted);font-size:11px;margin-top:3px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-primary-link{border:0;background:transparent;color:var(--brand);padding:0;font-weight:650;font-variant-numeric:tabular-nums}.table-primary-link:hover{text-decoration:underline;text-underline-offset:3px}.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:2px;white-space:nowrap}.description-cell{max-width:270px;color:var(--muted);font-size:12px}.product-cell{display:flex;align-items:center;gap:10px;min-width:220px}.product-cell img,.product-placeholder{width:40px;height:40px;flex-shrink:0;-o-object-fit:cover;object-fit:cover;border-radius:6px;border:1px solid var(--border)}.product-placeholder{display:grid;place-items:center;color:#64748b;background:#f8fafc}.product-cell strong{max-width:290px;display:block;font-size:13px}.mobile-document-list,.mobile-product-list{display:none}.save-inline{margin-right:auto;color:var(--muted);font-size:12px}.help-steps{list-style:none;padding:0;margin:0 0 20px;display:grid;gap:18px}.help-steps li{display:flex;gap:12px}.help-steps li>span{width:26px;height:26px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:#eff6ff;color:var(--brand);font-weight:650}.help-steps p{color:var(--muted);margin-top:3px;font-size:13px}.new-document-page{max-width:1180px}.stepper{list-style:none;padding:0;margin:0 0 22px;display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--border);border-radius:8px;background:#fff;overflow:hidden}.stepper li{position:relative}.stepper li:not(:last-child):after{content:"";position:absolute;right:0;top:14px;bottom:14px;width:1px;background:var(--border)}.stepper button{width:100%;min-height:54px;border:0;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:9px}.stepper button>span{width:23px;height:23px;border:1px solid #cbd5e1;border-radius:50%;display:grid;place-items:center;font-size:11px}.stepper .active button{color:var(--brand);background:#f8fbff;font-weight:600}.stepper .active button>span{background:var(--brand);border-color:var(--brand);color:#fff}.stepper .done button{color:#15803d}.stepper .done button>span{border-color:#86efac;background:#f0fdf4}.wizard-panel{background:#fff;border:1px solid var(--border);border-radius:10px;padding:26px}.wizard-title{margin-bottom:24px}.wizard-title p{color:var(--muted);margin-top:5px}.template-choice-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.template-choice{position:relative;padding:16px;min-width:0;border:1px solid var(--border);border-radius:8px;background:#fff;text-align:left;transition:border-color .16s ease-out,background-color .16s ease-out}.template-choice:hover{border-color:#93c5fd}.template-choice.selected{border-color:var(--brand);background:#f8fbff;box-shadow:0 0 0 1px var(--brand)}.template-paper{width:100%;aspect-ratio:1.35;background:#f8fafc;border:1px solid #e2e8f0;padding:13px;display:flex;flex-direction:column;gap:7px;margin-bottom:14px}.template-paper span{color:var(--brand);font-size:11px;font-weight:700}.template-paper b{font-size:9px;line-height:1.3}.template-paper i{height:3px;background:#cbd5e1;margin-top:2px}.template-paper i:last-child{width:60%}.template-choice strong{font-size:14px}.template-choice p{color:var(--muted);font-size:12px;line-height:18px;margin-top:5px}.choice-check{position:absolute;right:12px;top:12px;color:var(--brand);fill:#fff}.company-selection{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#f8fafc;border:1px solid var(--border);border-radius:8px;margin-bottom:22px}.company-selection>svg:first-child{color:var(--brand)}.company-selection>div{flex:1}.company-selection span{display:block;color:var(--muted);font-size:11px}.company-selection strong{display:block;margin-top:2px}.company-selection p{color:var(--muted);font-size:12px}.company-selection>svg:last-child{color:var(--success)}.wizard-two-columns{display:grid;grid-template-columns:.85fr 1.15fr;gap:24px}.subsection-heading{display:flex;align-items:center;gap:8px;margin-bottom:12px}.subsection-heading>span{margin-left:auto;color:var(--muted);font-size:12px}.record-choice-list{display:grid;gap:8px;margin-top:10px;max-height:340px;overflow-y:auto;padding:1px}.record-choice{min-height:62px;display:flex;align-items:center;gap:12px;text-align:left;padding:11px 12px;border:1px solid var(--border);border-radius:7px;background:#fff}.record-choice:hover{border-color:#93c5fd}.record-choice.selected{border-color:var(--brand);background:#f8fbff}.record-choice>div{flex:1;min-width:0}.record-choice strong,.record-choice span{display:block}.record-choice strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-choice span{color:var(--muted);font-size:11px;margin-top:3px}.record-choice>svg{color:var(--brand)}.checkbox-visual{width:18px;height:18px;flex-shrink:0;display:grid!important;place-items:center;border:1px solid #cbd5e1;border-radius:4px;color:#fff!important;background:#fff;margin:0!important}.record-choice.selected .checkbox-visual{background:var(--brand);border-color:var(--brand)}.initial-form{max-width:780px}.theme-choice-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.theme-choice{position:relative;border:1px solid var(--border);background:#fff;border-radius:7px;padding:9px;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:11px}.theme-choice.selected{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand)}.theme-choice>svg{position:absolute;top:5px;right:5px;color:var(--brand)}.theme-paper{width:54px;height:65px;border:1px solid #e2e8f0;padding:8px;display:flex;flex-direction:column;gap:5px}.theme-paper b{height:5px;background:var(--theme-color)}.theme-paper i{height:8px;background:var(--theme-pale);border-bottom:1px solid var(--theme-color)}.creation-summary{display:flex;gap:10px;background:#f8fafc;color:var(--muted);padding:13px;border-radius:7px;font-size:12px}.creation-summary svg{color:var(--brand)}.wizard-actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px}.wizard-actions>span{color:var(--muted);font-size:12px}.paper-pages{display:flex;flex-direction:column;align-items:center;gap:24px;padding:26px 20px 40px}.paper-transform{position:relative;flex-shrink:0}.a4-paper{position:absolute;left:0;top:0;width:794px;height:1123px;transform-origin:top left;background:#fff;color:#172033;padding:46px 48px 40px;box-shadow:0 3px 16px #0f172a1f;border:1px solid #e2e8f0;font-family:Noto Sans,Noto Sans SC,PingFang SC,sans-serif;font-size:10px;line-height:1.5;overflow:hidden}.a4-paper [role=button]{cursor:pointer}.a4-paper [role=button]:hover{outline:1px dashed #60a5fa;outline-offset:3px}.paper-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;border-bottom:2px solid var(--doc-color);padding-bottom:18px}.paper-company{display:flex;gap:12px;width:61%}.paper-company h2{font-size:15px;line-height:20px;margin-bottom:5px}.paper-company p{color:#64748b;font-size:8px;white-space:pre-line;max-width:390px}.paper-logo{width:96px;height:34px;flex-shrink:0;-o-object-fit:contain;object-fit:contain;-o-object-position:left center;object-position:left center}.paper-logo-placeholder{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;background:var(--doc-color);color:#fff;font-size:15px;font-weight:700}.paper-header h1{max-width:38%;text-align:right;color:var(--doc-color);font-size:22px;line-height:28px;letter-spacing:.015em}.paper-meta{display:flex;gap:38px;padding:18px 0}.paper-meta>div{min-width:120px}.paper-meta span,.paper-customer>span{display:block;color:var(--doc-color);font-size:8px;font-weight:700;letter-spacing:.06em;margin-bottom:4px}.paper-meta strong{font-size:11px}.paper-customer{background:var(--doc-pale);padding:14px 16px;margin-bottom:18px;border-radius:3px}.paper-customer strong{display:block;font-size:12px}.paper-customer p{color:#64748b;font-size:8px}.paper-items table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:8px}.paper-items th{background:var(--doc-pale);color:var(--doc-color);padding:9px 6px;border:1px solid #cbd5e1;text-align:left;font-size:7px;line-height:1.35}.paper-items td{padding:10px 6px;border:1px solid #e2e8f0;vertical-align:top;word-break:break-word}.paper-items th:first-child,.paper-items td:first-child{width:6%;text-align:center}.paper-items th:nth-child(2){width:39%}.paper-items td strong{display:block;font-size:8px}.paper-items td small{display:block;color:#64748b;font-size:7px;margin-top:3px}.paper-product-cell{display:flex;gap:6px;align-items:flex-start}.paper-product-cell>img{width:32px;height:32px;-o-object-fit:cover;object-fit:cover;flex-shrink:0}.paper-product-cell>div{flex:1;min-width:0}.paper-empty-row{height:70px;text-align:center!important;color:#94a3b8}.paper-tail{margin-top:0}.paper-total{width:275px;margin-left:auto;display:flex;align-items:center;justify-content:space-between;padding:13px 12px;border-bottom:1.5px solid var(--doc-color);color:var(--doc-color)}.paper-total span{font-size:9px;font-weight:700}.paper-total strong{font-size:15px;font-variant-numeric:tabular-nums}.paper-terms{display:grid;gap:12px;margin-top:19px}.paper-terms h3{color:var(--doc-color);font-size:8px;letter-spacing:.04em;margin-bottom:3px}.paper-terms p{color:#475569;font-size:8px;white-space:pre-line}.paper-signature{min-height:72px;margin-top:22px;display:flex;justify-content:flex-end;align-items:flex-end}.paper-signature>div{width:190px;display:grid;gap:22px}.paper-signature span{color:var(--doc-color);font-size:8px;font-weight:700}.paper-signature i{display:block;border-bottom:1px solid #64748b}.paper-signature img{width:82px;height:82px;-o-object-fit:contain;object-fit:contain;margin-left:24px}.paper-page-number{position:absolute;bottom:20px;left:48px;right:48px;text-align:center;color:#64748b;font-size:8px}.full-preview-stage{max-height:65dvh;overflow:auto;background:#f1f5f9}.type-switch-summary{display:flex;gap:10px;padding:14px;background:#f0fdf4;color:#166534;border-radius:7px}.editor-shell{height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:#f1f5f9}.editor-toolbar{height:60px;flex-shrink:0;display:flex;align-items:center;gap:14px;padding:0 16px;background:#fff;border-bottom:1px solid var(--border);z-index:25}.editor-toolbar-left,.editor-toolbar-actions,.editor-toolbar-center{display:flex;align-items:center;gap:8px}.editor-toolbar-left{min-width:230px}.editor-doc-title{display:flex;flex-direction:column}.editor-doc-title>strong{font-size:14px;font-variant-numeric:tabular-nums}.save-state{display:inline-flex;align-items:center;gap:3px;color:var(--muted);font-size:10px}.save-state.saved{color:var(--success)}.save-state.error{color:var(--danger)}.editor-toolbar-center{margin-left:auto}.editor-toolbar-center .select{width:128px;min-height:34px;padding:5px 8px;font-size:12px}.editor-toolbar-center .select+.select{width:105px}.editor-toolbar-actions{margin-left:auto}.editor-storage-error{flex-shrink:0;display:flex;justify-content:center;align-items:center;gap:12px;padding:7px 16px;background:#fef2f2;color:var(--danger);font-size:12px}.editor-body{flex:1;min-height:0;display:grid;grid-template-columns:176px 420px minmax(0,1fr)}.editor-steps{background:#fff;border-right:1px solid var(--border);padding:14px 10px;display:flex;flex-direction:column;gap:5px;overflow-y:auto}.editor-steps button{position:relative;min-height:44px;display:flex;align-items:center;gap:10px;padding:10px;border:0;border-radius:6px;background:transparent;color:#475569;text-align:left;font-size:12px}.editor-steps button:hover{background:#f1f5f9}.editor-steps button.active{color:var(--brand);background:#eff6ff;font-weight:600}.editor-steps button>span{flex:1}.editor-steps button>b{width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#fffbeb;color:#92400e;font-size:10px}.section-complete{color:#86a2c5}.editor-steps button.active .section-complete{color:var(--brand)}.editor-form-panel{min-width:0;background:#fff;border-right:1px solid var(--border);overflow-y:auto;padding:18px 20px 40px}.document-type-control{padding-bottom:16px;margin-bottom:20px;border-bottom:1px solid var(--border)}.document-type-control .field{margin-bottom:5px}.editor-section-heading{margin-bottom:22px}.editor-section-heading p{color:var(--muted);font-size:12px;margin-top:4px;line-height:18px}.editor-section .subsection-heading h3{font-size:14px}.editor-theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.editor-theme-grid button{position:relative;display:grid;grid-template-columns:16px 20px 1fr;align-items:center;gap:5px;min-height:38px;padding:7px;border:1px solid var(--border);background:#fff;border-radius:6px;text-align:left}.editor-theme-grid button.selected{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand)}.editor-theme-grid button>span{width:14px;height:22px}.editor-theme-grid button>em{width:18px;height:22px}.editor-theme-grid button>strong{font-size:11px;font-weight:500}.editor-theme-grid button>svg{position:absolute;right:3px;top:3px;color:var(--brand)}.toggle-list{border-top:1px solid var(--border);margin-bottom:22px}.toggle-row{position:relative;display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--border);cursor:pointer}.toggle-row>span{flex:1}.toggle-row strong,.toggle-row small{display:block}.toggle-row strong{font-size:13px}.toggle-row small{color:var(--muted);font-size:11px;margin-top:3px;line-height:17px}.toggle-row input{position:absolute;opacity:0;right:0}.toggle-row>i{width:36px;height:20px;flex-shrink:0;border-radius:999px;background:#cbd5e1;padding:2px;transition:background-color .16s ease-out}.toggle-row>i:after{content:"";display:block;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0f172a33;transition:transform .16s ease-out}.toggle-row input:checked+i{background:var(--brand)}.toggle-row input:checked+i:after{transform:translate(16px)}.toggle-row input:focus-visible+i{outline:2px solid var(--brand);outline-offset:2px}.preview-panel{min-width:0;min-height:0;display:flex;flex-direction:column;background:#edf1f5}.preview-stage{flex:1;min-height:0;overflow:auto}.preview-controls{min-height:48px;flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:5px;background:#fff;border-top:1px solid var(--border);padding:5px 10px}.preview-controls>span{min-width:44px;text-align:center;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.editor-mobile-tabs{display:none}.editor-missing{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--muted)}.editor-missing h1{color:var(--text)}.add-product-row{display:grid;grid-template-columns:1fr auto;gap:8px}.temporary-product{margin:-4px 0 14px}.item-editor-list{display:grid;gap:12px}.item-editor{border:1px solid var(--border);border-radius:8px;padding:12px;background:#fff}.item-editor-heading{display:flex;align-items:flex-start;gap:8px;margin-bottom:12px}.item-editor-heading>span{color:#94a3b8;font-size:11px;padding-top:10px;font-variant-numeric:tabular-nums}.item-editor-heading>div:nth-child(2){flex:1;min-width:0}.item-editor-heading .input{min-height:34px;padding:5px 7px;font-size:12px;font-weight:550}.item-editor-heading small{display:block;color:var(--muted);font-size:10px;margin:3px 0 0 7px}.item-actions{display:flex}.item-actions .icon-btn{width:28px;height:32px}.item-editor .field-label{font-size:11px}.item-editor .input{font-size:12px;padding:7px}.item-editor .form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 8px}.item-amount{display:flex;justify-content:space-between;border-top:1px solid var(--border);padding-top:9px;color:var(--muted);font-size:12px}.item-amount strong{color:var(--text);font-variant-numeric:tabular-nums}.editor-total{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding:16px;background:#f8fafc;border-radius:8px}.editor-total>span{font-weight:600}.editor-total small{display:block;color:var(--muted);font-weight:400;font-size:11px;margin-top:2px}.editor-total strong{color:var(--brand);font-size:18px;font-variant-numeric:tabular-nums}.page-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.import-toolbar{display:flex;align-items:center;gap:14px;margin-bottom:16px}.import-toolbar>span{color:var(--muted);font-size:12px;line-height:18px}.file-drop-zone{width:100%;min-height:176px;border:1px dashed #94a3b8;border-radius:9px;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#475569;padding:24px}.file-drop-zone:hover:not(:disabled){border-color:var(--brand);background:#eff6ff;color:var(--brand)}.file-drop-zone>span{color:var(--muted);font-size:12px}.import-file-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.import-file-heading>div,.import-file-heading>div>span{display:flex;align-items:center;gap:10px;min-width:0}.import-file-heading>div>span{align-items:flex-start;flex-direction:column;gap:2px}.import-file-heading strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.import-file-heading small{color:var(--muted);font-size:11px}.import-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.import-stat-grid>div{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#f8fafc;border:1px solid var(--border);border-radius:7px}.import-stat-grid span{color:var(--muted);font-size:12px}.import-stat-grid strong{font-size:20px;font-variant-numeric:tabular-nums}.import-stat-grid .has-error{background:#fef2f2;color:var(--danger);border-color:#fecaca}.duplicate-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0;margin:0 0 16px;border:0}.duplicate-options legend{grid-column:1 / -1;margin-bottom:8px;font-size:12px;font-weight:600}.duplicate-options label{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid var(--border);border-radius:7px;cursor:pointer}.duplicate-options label.selected{border-color:var(--brand);background:#f8fbff}.duplicate-options input{margin-top:4px;accent-color:var(--brand)}.duplicate-options strong,.duplicate-options small{display:block}.duplicate-options strong{font-size:13px}.duplicate-options small{color:var(--muted);font-size:11px;margin-top:3px}.import-preview-table-wrap{max-height:330px;overflow:auto;border:1px solid var(--border);border-radius:8px}.import-preview-table{min-width:720px}.import-preview-table thead{position:sticky;top:0;z-index:1}.import-row-error,.import-row-ok{display:inline-flex;align-items:flex-start;gap:5px;font-size:11px}.import-row-error{color:var(--danger)}.import-row-ok{color:var(--success)}.import-row-error svg,.import-row-ok svg{margin-top:2px}.template-local-note{display:flex;align-items:flex-start;gap:11px;padding:14px 16px;margin-bottom:20px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:8px;color:#1e40af}.template-local-note p{font-size:12px;margin-top:3px;line-height:19px}.template-import-error{align-items:center}.template-import-error>div{flex:1}.template-import-error p{margin-top:3px;font-size:12px}.template-library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.template-library-card{min-width:0;display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:10px;overflow:hidden}.template-card-preview{position:relative;width:100%;min-height:228px;padding:20px;border:0;border-bottom:1px solid var(--border);background:#f1f5f9;display:grid;place-items:center}.template-card-preview:hover{background:#eaf0f6}.template-preview-paper{width:142px;aspect-ratio:210 / 297;padding:12px;background:#fff;box-shadow:0 4px 12px #0f172a1a;color:var(--template-color)}.template-preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding-bottom:7px;border-bottom:2px solid var(--template-color)}.template-preview-header span{width:24px;height:18px;background:var(--template-color)}.template-preview-header strong{max-width:65px;text-align:right;font-size:6px;line-height:8px}.template-preview-parties{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:9px 0}.template-preview-parties i{height:18px;background:var(--template-pale)}.template-preview-table{display:grid;gap:3px}.template-preview-table b{height:10px;background:var(--template-pale);border:1px solid var(--template-color)}.template-preview-table span{height:9px;border:1px solid #e2e8f0}.template-preview-total{display:flex;align-items:center;justify-content:flex-end;gap:5px;padding:7px 0;border-bottom:1px solid var(--template-color)}.template-preview-total i{width:20px;height:3px;background:#cbd5e1}.template-preview-total strong{width:28px;height:5px;background:var(--template-color)}.template-preview-terms{display:grid;gap:4px;margin-top:9px}.template-preview-terms i{height:2px;background:#cbd5e1}.template-preview-terms i:last-child{width:70%}.template-current-badge{position:absolute;top:12px;right:12px;display:inline-flex;align-items:center;gap:3px;padding:3px 7px;border-radius:999px;background:#fff;color:var(--success);font-size:10px;box-shadow:0 1px 4px #0f172a14}.template-card-body{flex:1;padding:16px 16px 12px}.template-card-title{display:flex;align-items:flex-start;gap:8px}.template-card-title>div{flex:1;min-width:0}.template-card-title span{color:var(--muted);font-size:10px}.template-card-title h2{margin-top:3px;font-size:16px;line-height:23px}.template-card-title .btn{margin:-5px -7px 0 0}.template-card-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:12px}.template-terms-preview{min-height:38px;margin-top:12px;color:var(--muted);font-size:11px;line-height:18px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.template-display-rules{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:12px;color:#475569;font-size:10px}.template-display-rules span:before{content:"·";margin-right:4px;color:#94a3b8}.template-card-actions{display:grid;grid-template-columns:1fr 1.25fr;gap:8px;padding:12px 16px 16px}.drawer-content.drawer-wide{width:min(1280px,100vw);padding:22px 26px 24px;display:flex;flex-direction:column;overflow:hidden}.drawer-wide>.dialog-heading{flex-shrink:0;margin-bottom:14px}.template-editor-mobile-tabs{display:none}.template-editor-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(380px,440px) minmax(0,1fr);gap:20px}.template-editor-form{min-height:0;overflow-y:auto;padding:2px 8px 0 2px}.template-editor-form .dialog-actions{position:sticky;bottom:0;z-index:2;margin:0;padding:12px 0 2px;background:#fff;border-top:1px solid var(--border)}.template-live-preview{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid #d8e0e9;border-radius:9px;background:#edf1f5}.template-preview-heading{min-height:56px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;background:#fff;border-bottom:1px solid var(--border)}.template-preview-heading>div{display:flex;align-items:center;gap:9px}.template-preview-heading>div>svg{color:var(--brand)}.template-preview-heading span{display:flex;flex-direction:column}.template-preview-heading strong{font-size:13px}.template-preview-heading small{color:var(--muted);font-size:10px;margin-top:1px}.template-preview-stage{flex:1;min-height:0;overflow:auto}.template-preview-stage .paper-pages{padding:18px 12px 28px}.template-preview-controls{min-height:46px;flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:4px;padding:5px 8px;background:#fff;border-top:1px solid var(--border)}.template-preview-controls>span{min-width:42px;text-align:center;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}.import-package-file{display:flex;align-items:center;gap:11px;padding:13px;background:#f8fafc;border-radius:7px}.import-package-file strong,.import-package-file span{display:block}.import-package-file span{color:var(--muted);font-size:11px;margin-top:2px}.template-import-list{margin-top:16px;border:1px solid var(--border);border-radius:7px;overflow:hidden}.template-import-list>div{display:grid;grid-template-columns:78px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;border-bottom:1px solid var(--border)}.template-import-list>div:last-child{border-bottom:0}.template-import-list span{color:var(--muted);font-size:12px}.template-import-list strong{font-size:12px}@media(max-width:1360px){.editor-body{grid-template-columns:64px 400px minmax(0,1fr)}.editor-steps{padding:14px 8px}.editor-steps button{justify-content:center;padding:10px}.editor-steps button>span{display:none}.editor-steps button>b{position:absolute;right:2px;top:2px;width:15px;height:15px;font-size:9px}.editor-steps .section-complete{position:absolute;right:3px;top:3px;width:11px}.toolbar-secondary{padding-left:9px;padding-right:9px}.document-type-grid,.template-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:1120px){.editor-toolbar-center{display:none}.editor-body{grid-template-columns:58px 370px minmax(0,1fr)}.editor-form-panel{padding-left:16px;padding-right:16px}.toolbar-secondary{font-size:0;gap:0}.toolbar-secondary svg{width:17px;height:17px}.filter-bar{flex-wrap:wrap}.filter-bar .search-box{flex-basis:100%}.data-table th,.data-table td{padding-left:10px;padding-right:10px}.document-table .row-actions .btn:not(:last-child){font-size:0;gap:0}.template-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:900px){.app-shell,.sidebar-collapsed{grid-template-columns:64px minmax(0,1fr)}.app-sidebar .brand{padding:0 15px}.app-sidebar .brand>div,.app-sidebar .sidebar-new span,.app-sidebar .main-nav span,.app-sidebar .sidebar-bottom span{display:none}.app-sidebar .sidebar-new{padding:18px 10px 12px}.app-sidebar .main-nav{padding:6px 10px}.app-sidebar .main-nav button,.app-sidebar .sidebar-bottom button{justify-content:center;padding:10px}.collapse-button{display:none!important}.page{padding:24px 20px 34px}.continue-time{display:none}.wizard-two-columns{grid-template-columns:1fr}.theme-choice-grid{grid-template-columns:repeat(3,1fr)}.template-editor-mobile-tabs{flex-shrink:0;height:44px;display:grid;grid-template-columns:1fr 1fr;margin-bottom:12px;border:1px solid var(--border);border-radius:7px;overflow:hidden}.template-editor-mobile-tabs button{border:0;background:#fff;color:var(--muted)}.template-editor-mobile-tabs button.active{background:#eff6ff;color:var(--brand);font-weight:600}.template-editor-layout{display:block;overflow:hidden}.template-editor-form,.template-live-preview{height:100%}.template-editor-form{padding-right:2px}.template-editor-layout.mobile-preview .template-editor-form,.template-editor-layout.mobile-edit .template-live-preview{display:none}}@media(max-width:767px){body{font-size:14px}h1{font-size:21px;line-height:29px}.app-shell,.sidebar-collapsed{display:block}.app-sidebar{position:fixed;left:0;top:0;width:242px;transform:translate(-100%);transition:transform .18s ease-out;box-shadow:12px 0 36px #0f172a24}.app-sidebar.mobile-open{transform:translate(0)}.app-sidebar .brand{padding:0 14px}.app-sidebar .brand>div,.app-sidebar .sidebar-new span,.app-sidebar .main-nav span,.app-sidebar .sidebar-bottom span{display:flex}.app-sidebar .brand>div{display:flex}.app-sidebar .sidebar-new{padding:18px 12px 12px}.app-sidebar .sidebar-new .btn{padding:8px 14px}.app-sidebar .main-nav{padding:6px 12px}.app-sidebar .main-nav button,.app-sidebar .sidebar-bottom button{justify-content:flex-start;padding:10px 12px;min-height:44px}.mobile-nav-backdrop{position:fixed;inset:0;z-index:29;border:0;background:#0f172a66}.mobile-nav-close{display:inline-flex;margin-left:auto}.mobile-menu{display:inline-flex}.app-topbar{padding:0 12px}.breadcrumb>span,.breadcrumb>svg{display:none}.local-storage-badge{font-size:0;padding:6px}.local-storage-badge svg{width:16px;height:16px}.topbar-actions{gap:5px}.page{padding:20px 14px 32px}.page-heading{align-items:center;gap:12px;margin-bottom:20px}.page-heading p{font-size:12px;max-width:32ch}.page-heading .btn{min-height:44px;padding:9px 12px}.products-page .page-heading,.templates-page .page-heading{align-items:flex-start;flex-direction:column}.page-heading-actions{width:100%;justify-content:flex-start}.page-heading-actions .btn{flex:1;min-width:112px}.template-library-grid{grid-template-columns:1fr}.import-toolbar{align-items:flex-start;flex-direction:column}.duplicate-options{grid-template-columns:1fr}.import-stat-grid>div{align-items:flex-start;flex-direction:column;gap:4px;padding:10px}.import-file-heading{align-items:flex-start}.import-file-heading>div{min-width:0}.import-file-heading>div>span{min-width:0}.template-import-list>div{grid-template-columns:66px minmax(0,1fr)}.template-import-list .badge{grid-column:2;justify-self:start}.dashboard-heading{align-items:flex-start;flex-direction:column}.dashboard-heading .btn{width:100%}.continue-panel{grid-template-columns:auto minmax(0,1fr);padding:14px;gap:12px}.continue-panel>.btn{grid-column:1 / -1;width:100%;min-height:44px}.continue-icon{width:38px;height:48px}.continue-copy button{font-size:14px}.document-type-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.document-type-card{min-height:190px;padding:13px}.document-type-card:last-child{grid-column:1 / -1;min-height:160px}.section-heading{align-items:flex-start}.filter-bar{padding:10px;gap:8px}.filter-bar .search-box{min-width:100%}.filter-bar>.select{flex:1;min-width:120px}.list-summary span:last-child{display:none}.documents-page .data-table-wrap,.products-page .data-table-wrap,.customers-page .data-table-wrap{display:none}.mobile-document-list,.mobile-product-list{display:grid;gap:10px}.mobile-document-card{background:#fff;border:1px solid var(--border);border-radius:9px;padding:14px}.mobile-document-card>p{color:var(--muted);font-size:12px;margin:8px 0}.mobile-doc-top,.mobile-doc-meta{display:flex;justify-content:space-between;align-items:center;gap:10px}.mobile-doc-top>button{border:0;padding:0;background:transparent;color:var(--brand);font-weight:650}.mobile-doc-meta{margin:12px 0;font-size:12px}.mobile-doc-meta strong{font-variant-numeric:tabular-nums}.mobile-doc-meta span{color:var(--muted);text-align:right}.mobile-document-card .row-actions{border-top:1px solid var(--border);padding-top:8px;justify-content:flex-start}.mobile-document-card .row-actions .btn{min-height:44px}.local-note{align-items:flex-start}.input{min-height:44px;font-size:16px}.btn{min-height:44px}.btn-sm{min-height:40px}.icon-btn{width:44px;height:44px}.dialog-content{width:calc(100vw - 20px);padding:20px;max-height:90dvh}.drawer-content{width:100vw;padding:20px 16px}.drawer-content.drawer-wide{padding:18px 12px 14px}.template-preview-heading{padding-left:10px;padding-right:10px}.template-preview-heading .badge{font-size:10px}.template-preview-stage .paper-pages{padding-left:8px;padding-right:8px}.form-grid.two,.form-grid.three{grid-template-columns:1fr}.wizard-panel{padding:18px 14px}.stepper button{min-height:58px;font-size:11px;gap:5px;padding:6px}.stepper button>span{flex-shrink:0}.template-choice-grid{grid-template-columns:1fr}.template-choice{display:grid;grid-template-columns:100px 1fr;gap:14px;align-items:center}.template-paper{margin:0}.wizard-two-columns{gap:22px}.record-choice{min-height:68px}.theme-choice-grid{grid-template-columns:repeat(3,1fr)}.wizard-actions{gap:8px}.wizard-actions>span{display:none}.wizard-actions .btn:last-child{margin-left:auto}.paper-pages{padding:16px 8px 28px;gap:16px}.full-preview-stage .paper-pages{padding-left:0;padding-right:0}.paper-transform{max-width:none}.editor-toolbar{padding:0 8px;gap:4px}.editor-toolbar-left{min-width:0}.editor-doc-title>strong{max-width:140px;overflow:hidden;text-overflow:ellipsis}.editor-toolbar-actions{margin-left:auto}.editor-toolbar-actions .toolbar-secondary{display:none}.editor-toolbar-actions .btn-primary{position:fixed;z-index:40;left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));width:calc(100vw - 24px);min-height:48px;box-shadow:0 5px 18px #1e40af33}.editor-mobile-tabs{flex-shrink:0;height:44px;display:grid;grid-template-columns:1fr 1fr;background:#fff;border-bottom:1px solid var(--border)}.editor-mobile-tabs button{border:0;background:transparent;color:var(--muted);position:relative}.editor-mobile-tabs button.active{color:var(--brand);font-weight:600}.editor-mobile-tabs button.active:after{content:"";position:absolute;bottom:0;left:30%;right:30%;height:2px;background:var(--brand)}.editor-body{flex:1;min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:52px minmax(0,1fr)}.editor-steps{flex-direction:row;padding:4px 6px;border-right:0;border-bottom:1px solid var(--border);overflow-x:auto;overflow-y:hidden}.editor-steps button{min-width:50px;min-height:44px}.editor-steps .section-complete{display:none}.editor-form-panel{border-right:0;padding:16px 14px 86px}.editor-body.mobile-preview .editor-steps,.editor-body.mobile-preview .editor-form-panel{display:none}.editor-body.mobile-preview .preview-panel{grid-row:1 / -1}.editor-body.mobile-edit .preview-panel{display:none}.preview-controls{margin-bottom:66px;min-height:52px;flex-wrap:wrap}.item-editor .form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.item-editor-heading{flex-wrap:wrap}.item-editor-heading>div:nth-child(2){min-width:65%}.item-actions{width:100%;justify-content:flex-end}.item-actions .icon-btn{width:40px;height:40px}.editor-total{margin-bottom:10px}.editor-total strong{font-size:15px;text-align:right}.editor-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-storage-error{padding:8px 12px 74px;text-align:center;flex-direction:column}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.special-paper{font-size:9px;line-height:1.42}.special-paper .paper-header{padding-bottom:13px}.special-paper .paper-header h1{font-size:19px;line-height:24px}.special-meta{padding-top:10px;padding-bottom:10px;gap:24px}.special-preparation-banner{margin:0 -48px 12px;padding:6px 48px;background:var(--doc-pale);color:var(--doc-color);font-size:8px;font-weight:700;letter-spacing:.035em;text-align:center}.special-section{margin-bottom:11px}.special-block-title{margin-bottom:6px;color:var(--doc-color);font-size:9px;font-weight:750;letter-spacing:.04em}.special-party-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.special-party{min-width:0;min-height:70px;padding:7px 8px;background:var(--doc-pale);border:1px solid #e2e8f0}.special-party>span{display:block;margin-bottom:3px;color:var(--doc-color);font-size:7px;font-weight:750;letter-spacing:.035em}.special-party>strong{display:block;font-size:9px;line-height:13px}.special-party>p{margin-top:2px;color:#475569;font-size:7.5px;line-height:11px;white-space:pre-wrap}.special-party>small{display:block;margin-top:2px;color:#64748b;font-size:7px}.isf-party-grid{margin-top:7px}.isf-party-grid .special-party{min-height:60px;padding-top:5px;padding-bottom:5px}.special-value-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #dbe3ec;border-left:1px solid #dbe3ec}.special-value{min-width:0;min-height:37px;padding:5px 7px;border-right:1px solid #dbe3ec;border-bottom:1px solid #dbe3ec}.special-value>span{display:block;color:#64748b;font-size:6.5px;font-weight:700;letter-spacing:.025em}.special-value>strong{display:block;margin-top:2px;font-size:8px;font-weight:650;line-height:11px;overflow-wrap:anywhere;white-space:pre-wrap}.special-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:7.5px}.special-table th{padding:6px 5px;background:var(--doc-pale);border:1px solid #cbd5e1;color:var(--doc-color);font-size:6.5px;text-align:left;letter-spacing:.025em}.special-table td{height:32px;padding:5px;border:1px solid #dbe3ec;vertical-align:top;overflow-wrap:anywhere}.special-table th:nth-child(1),.special-table td:nth-child(1){width:6%}.special-table th:nth-child(2),.special-table td:nth-child(2){width:36%}.special-table th:nth-child(3),.special-table td:nth-child(3){width:14%}.special-table th:nth-child(4),.special-table td:nth-child(4){width:13%}.special-table th:nth-child(5),.special-table td:nth-child(5){width:13%}.special-table th:nth-child(6),.special-table td:nth-child(6){width:18%}.special-table td>strong{display:block;font-size:8px}.special-table td>small{display:block;margin-top:2px;color:#64748b;font-size:6.5px}.special-empty{height:36px!important;text-align:center;vertical-align:middle!important;color:#94a3b8}.container-table th:nth-child(1),.container-table td:nth-child(1){width:22%}.container-table th:nth-child(2),.container-table td:nth-child(2){width:18%}.container-table th:nth-child(3),.container-table td:nth-child(3){width:10%}.container-table th:nth-child(4),.container-table td:nth-child(4){width:20%}.container-table th:nth-child(5),.container-table td:nth-child(5){width:15%}.container-table th:nth-child(6),.container-table td:nth-child(6){width:15%}.special-tail{position:relative}.special-instruction{margin:0;color:#475569;font-size:8px;line-height:12px;white-space:pre-wrap}.special-tail .special-party{margin-top:7px}.special-stamp{position:absolute;right:4px;bottom:0;width:70px;height:70px;-o-object-fit:contain;object-fit:contain}.vgm-paper-list{display:grid;gap:8px}.vgm-paper-row{border:1px solid #cbd5e1}.vgm-paper-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 9px;background:var(--doc-pale)}.vgm-paper-heading>strong{color:var(--doc-color);font-size:10px}.vgm-paper-heading>span{color:#475569;font-size:8px}.vgm-paper-calculation{display:grid;grid-template-columns:80px 1fr auto;align-items:center;gap:10px;padding:8px 9px}.vgm-paper-calculation>span{font-size:8px;font-weight:750}.vgm-paper-calculation>p{color:#64748b;font-size:7.5px}.vgm-paper-calculation>strong{color:var(--doc-color);font-size:14px;white-space:nowrap}.vgm-authorization{display:grid;grid-template-columns:1.2fr 1fr;gap:30px;margin-top:12px}.vgm-authorization>div{min-height:58px}.vgm-authorization span{display:block;color:#64748b;font-size:7px;font-weight:700}.vgm-authorization strong{display:block;margin-top:8px;font-size:10px}.vgm-authorization small{display:block;margin-top:2px;color:#64748b;font-size:8px}.vgm-authorization i{display:block;margin-top:15px;border-bottom:1px solid #64748b}.container-editor-list{display:grid;gap:12px;margin-top:14px}.container-editor{padding:14px;border:1px solid var(--border);border-radius:8px;background:#fff}.party-subheading{margin:16px 0 10px;font-size:13px}.party-fields{display:grid;gap:12px}.isf-party-block{padding-top:2px;border-top:1px solid var(--border)}.vgm-method-block{display:grid;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}.vgm-calculated{display:flex;align-items:center;gap:9px;padding:12px 14px;background:var(--brand-light);color:var(--brand);border-radius:7px}.vgm-calculated>span{font-size:10px;font-weight:700;letter-spacing:.035em}.vgm-calculated>strong{margin-left:auto;font-size:17px;font-variant-numeric:tabular-nums}@media(max-width:760px){.special-preparation-banner{margin-left:-48px;margin-right:-48px}.vgm-calculated{align-items:flex-start;flex-wrap:wrap}.vgm-calculated>strong{width:100%;margin-left:27px}}
