*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei,Segoe UI,Roboto,sans-serif;font-size:16px;color:#1f2328;background:#f5f6f8}@media (min-width: 1900px){body{font-size:17px}}@media (min-width: 2400px){body{font-size:18px}}button{font:inherit;padding:5px 12px;border:1px solid #c8ccd1;background:#fff;border-radius:4px;cursor:pointer}button:hover:not(:disabled){background:#eef0f3}button:disabled{opacity:.5;cursor:not-allowed}button.active,button.primary-btn{background:#2563eb;color:#fff;border-color:#2563eb}button.primary-btn:hover:not(:disabled){background:#1d4ed8;border-color:#1d4ed8}input,select,textarea{font:inherit;padding:4px 8px;border:1px solid #c8ccd1;border-radius:4px;background:#fff}input:focus,select:focus,textarea:focus{outline:none;border-color:#2563eb}label{display:inline-flex;flex-direction:column;gap:2px;font-size:12px;color:#555;margin-right:8px;margin-bottom:6px}label.block-label{display:flex;width:100%}label.block-label textarea{width:100%}.boot{padding:24px;color:#666}.err{color:#b91c1c;font-size:12px;margin:4px 0;white-space:pre-wrap}.ok{color:#15803d;font-size:12px;margin:4px 0}.muted{color:#6b7280;font-size:12px}.login-wrap{display:flex;align-items:center;justify-content:center;height:100vh}.login-card{background:#fff;border:1px solid #d0d7de;padding:20px 24px;border-radius:4px;width:300px;display:flex;flex-direction:column;gap:8px}.login-card h2{margin:0 0 8px;font-size:16px}.login-card label,.login-card input{width:100%}.login-card button{margin-top:8px;background:#2563eb;color:#fff;border-color:#2563eb}.app{display:flex;flex-direction:column;height:100vh}.topbar{display:flex;align-items:center;justify-content:space-between;background:#1f2937;color:#f3f4f6;padding:6px 12px;border-bottom:1px solid #111827}.brand{font-weight:600}.top-right{display:flex;align-items:center;gap:10px}.top-right .muted{color:#cbd5e1}.top-right button{background:#374151;color:#f3f4f6;border-color:#4b5563}.top-right button:hover:not(:disabled){background:#4b5563}.top-right button.active{background:#f59e0b;color:#1f2937;border-color:#f59e0b}.body{display:flex;flex:1;min-height:0}.sidenav{width:140px;background:#fff;border-right:1px solid #e5e7eb;display:flex;flex-direction:column;padding:6px;gap:2px}.nav-item{text-align:left;border:none;background:transparent;padding:6px 8px;border-radius:3px}.nav-item:hover{background:#f3f4f6}.nav-item.active{background:#e5edff;color:#1d4ed8}.main{flex:1;overflow:auto;padding:18px 28px;max-width:1920px;width:100%;margin:0 auto}@media (min-width: 2400px){.main{max-width:2200px;padding:22px 36px}}.main h3{margin:0 0 12px;font-size:16px}.main h4{margin:14px 0 8px;font-size:14px;color:#374151}.main h5{margin:12px 0 6px;font-size:13px;color:#374151}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.section-head h4{margin:0 0 8px}.toolbar{display:flex;align-items:flex-end;gap:8px;margin-bottom:8px;flex-wrap:wrap}.toolbar.inline{margin-bottom:0}.grid{width:100%;border-collapse:collapse;background:#fff}.grid th,.grid td{border-bottom:1px solid #eef0f3;padding:8px 12px;text-align:left;vertical-align:top}.grid th{background:#f9fafb;font-weight:600;color:#374151;position:sticky;top:0}.grid td.r,.grid th.r{text-align:right;font-variant-numeric:tabular-nums}.grid tr.mismatch{background:#fef2f2}.grid tr.opportunity-hit{background:#ecfdf5}.grid.compact th,.grid.compact td{padding:5px 8px;font-size:13px}.grid th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.grid th.sortable:hover{background:#eef0f3}.table-scroll{max-height:460px;overflow:auto;border:1px solid #e5e7eb;border-radius:3px}.table-scroll .grid th{background:#f9fafb}.row-actions{display:inline-flex;gap:4px;flex-wrap:nowrap}button.btn-compact{padding:2px 8px;font-size:12px;line-height:1.4;border-radius:3px}.sort-arrow{display:inline-block;width:12px;margin-left:2px;text-align:center;font-size:10px;color:#6b7280}.kpi-row{display:flex;gap:8px;flex-wrap:wrap}.kpi{flex:1 1 140px;background:#fff;border:1px solid #e5e7eb;padding:8px 10px;border-radius:3px}.kpi-label{color:#6b7280;font-size:12px}.kpi-value{font-size:20px;font-variant-numeric:tabular-nums;margin-top:2px}.bars{display:flex;flex-direction:column;gap:4px;background:#fff;padding:8px;border:1px solid #e5e7eb}.bar-row{display:grid;grid-template-columns:140px 1fr 120px;align-items:center;gap:8px}.bar-label{font-size:12px}.bar-track{background:#f3f4f6;height:14px;border-radius:2px;overflow:hidden}.bar-fill{background:#2563eb;height:100%}.bar-val{text-align:right;font-variant-numeric:tabular-nums;font-size:12px}.curve{background:#fff;border:1px solid #e5e7eb;padding:10px 12px;color:#2563eb}.curve-head{display:flex;align-items:center;justify-content:space-between;color:#374151;font-variant-numeric:tabular-nums;margin-bottom:6px}.curve-canvas{position:relative}.curve svg{display:block;width:100%;height:220px;cursor:crosshair}.curve-gridline{stroke:#e5e7eb;stroke-width:1;stroke-dasharray:2 3}.curve-hover-line{stroke:#64748b;stroke-width:1;stroke-dasharray:3 3}.curve-hover-dot{fill:#fff;stroke:currentColor;stroke-width:2}.curve-tooltip{position:absolute;transform:translate(-50%,-110%);min-width:150px;padding:7px 8px;border:1px solid #d1d5db;background:#fffffff5;color:#111827;box-shadow:0 6px 16px #0f172a24;font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums;pointer-events:none;z-index:2}.curve-stats{display:flex;justify-content:space-between;gap:12px;margin-top:6px;font-size:12px;color:#6b7280;font-variant-numeric:tabular-nums}.curve-stat{color:#6b7280}.entry-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px}.entry-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px;border-bottom:1px solid #e5e7eb;padding-bottom:6px}.entry-tab{padding:4px 12px;border:1px solid #c8ccd1;background:#fff;border-radius:3px;font-size:13px;cursor:pointer}.entry-tab:hover{background:#eef0f3}.entry-tab.active{background:#2563eb;color:#fff;border-color:#2563eb}.entry-panel{width:100%}.entry-split{display:grid;grid-template-columns:minmax(320px,420px) minmax(420px,1fr);gap:16px;align-items:start}.entry-split>.form-block{margin:0}@media (max-width: 1100px){.entry-split{grid-template-columns:1fr}}.form-block{background:#fff;border:1px solid #e5e7eb;padding:12px 14px;border-radius:4px;margin-bottom:12px}.form-block h4{margin:0 0 8px}.form-block form{display:flex;flex-direction:column;gap:4px}.form-block label,.form-block input,.form-block select,.form-block textarea{width:100%}.form-block .toolbar label,.form-block .toolbar input,.form-block .toolbar select,.form-block .toolbar button{width:auto}.form-block .toolbar select{min-width:110px}.form-block .toolbar label{display:inline-flex;align-items:center;gap:4px}.form-block button{align-self:flex-start;margin-top:4px}.form-block.danger{border-color:#fca5a5;background:#fff7f7}.list-block{min-width:0}.list-block .toolbar.inline{display:flex;align-items:flex-end;gap:6px;flex-wrap:wrap}.list-block .toolbar.inline label{width:auto;min-width:200px}.helper{margin:0 0 4px;line-height:1.5}.danger-btn{background:#b91c1c;color:#fff;border-color:#b91c1c}.danger-btn:hover:not(:disabled){background:#991b1b}.check{flex-direction:row;align-items:center;gap:6px;margin:6px 0}.check.inline{margin:0;font-size:13px;color:inherit}.csv-input{width:100%;min-height:180px;font-family:SFMono-Regular,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:1.5;resize:vertical}.import-preview{margin-top:10px;display:flex;flex-direction:column;gap:8px}.import-stats{display:flex;gap:18px;flex-wrap:wrap;font-size:13px;color:#374151}.import-stats strong{font-variant-numeric:tabular-nums}.error-head{margin:8px 0 4px;color:#b91c1c}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a73;display:flex;align-items:center;justify-content:center;z-index:100;padding:16px}.modal-card{background:#fff;border-radius:6px;width:min(640px,100%);max-height:calc(100vh - 60px);overflow:auto;box-shadow:0 14px 40px #0f172a40}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e5e7eb}.modal-head h4{margin:0}.modal-close{background:transparent;border:none;font-size:22px;line-height:1;padding:0 6px;color:#6b7280;cursor:pointer}.modal-close:hover{color:#1f2937;background:transparent}.modal-form{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;padding:14px 16px 18px}.modal-form label{width:100%;margin:0}.modal-form input,.modal-form select{width:100%}.modal-form .modal-full{grid-column:1 / -1}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.pnl-pos{color:#16a34a}.pnl-neg{color:#dc2626}.kpi-value.pnl-pos{color:#16a34a}.kpi-value.pnl-neg{color:#dc2626}.theme-dark{background:#0f172a;color:#e5e7eb}.theme-dark .topbar{background:#020617;border-bottom-color:#000}.theme-dark .sidenav{background:#1e293b;border-right-color:#334155}.theme-dark .nav-item:hover{background:#334155}.theme-dark .nav-item.active{background:#1d4ed8;color:#fff}.theme-dark .main,.theme-dark .main h3,.theme-dark .main h4{color:#e5e7eb}.theme-dark .muted{color:#94a3b8}.theme-dark .kpi{background:#1e293b;border-color:#334155}.theme-dark .kpi-label{color:#94a3b8}.theme-dark .grid{background:#1e293b}.theme-dark .grid th{background:#0f172a;color:#cbd5e1}.theme-dark .grid th,.theme-dark .grid td{border-bottom-color:#334155}.theme-dark .grid tr.mismatch{background:#3f1d1d}.theme-dark .grid tr.opportunity-hit{background:#14532d}.theme-dark .grid th.sortable:hover{background:#1e3a8a}.theme-dark .sort-arrow{color:#cbd5e1}.theme-dark .bars{background:#1e293b;border-color:#334155}.theme-dark .bar-track{background:#0f172a}.theme-dark .bar-fill{background:#3b82f6}.theme-dark .curve{background:#1e293b;border-color:#334155;color:#60a5fa}.theme-dark .curve-head{color:#cbd5e1}.theme-dark .curve-tooltip{background:#0f172af5;color:#e5e7eb;border-color:#475569}.theme-dark .form-block{background:#1e293b;border-color:#334155}.theme-dark .form-block.danger{background:#3f1d1d;border-color:#b91c1c}.theme-dark input,.theme-dark select{background:#0f172a;color:#e5e7eb;border-color:#334155}.theme-dark button{background:#1e293b;color:#e5e7eb;border-color:#334155}.theme-dark button:hover:not(:disabled){background:#334155}.theme-dark button.active{background:#2563eb;color:#fff;border-color:#2563eb}.theme-dark .pnl-pos{color:#4ade80}.theme-dark .pnl-neg{color:#f87171}.theme-dark .entry-tabs{border-bottom-color:#334155}.theme-dark .entry-tab{background:#1e293b;color:#e5e7eb;border-color:#334155}.theme-dark .entry-tab:hover{background:#334155}.theme-dark .entry-tab.active{background:#2563eb;color:#fff;border-color:#2563eb}.theme-dark .curve-gridline{stroke:#334155}.theme-dark .curve-stats,.theme-dark .curve-stat{color:#94a3b8}.theme-dark .table-scroll{border-color:#334155}.theme-dark textarea{background:#0f172a;color:#e5e7eb;border-color:#334155}.theme-dark .modal-backdrop{background:#000000a6}.theme-dark .modal-card{background:#1e293b;color:#e5e7eb;box-shadow:0 14px 40px #0000008c}.theme-dark .modal-head{border-bottom-color:#334155}.theme-dark .modal-close{color:#cbd5e1}.theme-dark .modal-close:hover{color:#f8fafc}.theme-dark .import-stats{color:#e5e7eb}.theme-dark .error-head{color:#f87171}.theme-dark button.primary-btn{background:#2563eb;color:#fff;border-color:#2563eb}.theme-dark button.primary-btn:hover:not(:disabled){background:#1d4ed8;border-color:#1d4ed8}.login-wrap.theme-dark{background:#0f172a}.login-wrap.theme-dark .login-card{background:#1e293b;border-color:#334155;color:#e5e7eb}.login-wrap.theme-dark .login-card h2{color:#e5e7eb}.login-wrap.theme-dark .login-card label{color:#94a3b8}.login-wrap.theme-dark .login-card input{background:#0f172a;color:#e5e7eb;border-color:#334155}.login-wrap.theme-dark .login-card input:focus{border-color:#2563eb}.login-wrap.theme-dark .login-card button{background:#2563eb;color:#fff;border-color:#2563eb}.login-wrap.theme-dark .login-card button:hover:not(:disabled){background:#1d4ed8}.boot.theme-dark{background:#0f172a;color:#94a3b8;min-height:100vh}.badge{display:inline-block;padding:1px 8px;border-radius:999px;background:#e5e7eb;color:#1f2937;font-size:12px}.badge-good{background:#dcfce7;color:#166534}.badge-info{background:#dbeafe;color:#1e3a8a}.badge-warn{background:#fef3c7;color:#92400e}.badge-bad{background:#fee2e2;color:#991b1b}.row-actions{display:flex;gap:4px}.row-actions button{padding:2px 8px;font-size:12px}.danger-btn{color:#b91c1c;border-color:#fecaca}.danger-btn:hover:not(:disabled){background:#fee2e2}.report-box{margin-top:8px;border:1px solid #d0d7de;border-radius:4px;background:#fff;padding:8px}.report-pre{white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;max-height:480px;overflow:auto;background:#f8fafc;padding:10px;border-radius:4px;border:1px solid #e5e7eb}.theme-dark .report-box{background:#1e293b;border-color:#334155}.theme-dark .report-pre{background:#0f172a;border-color:#334155;color:#e5e7eb}.theme-dark .badge{background:#334155;color:#e5e7eb}.theme-dark .badge-good{background:#14532d;color:#bbf7d0}.theme-dark .badge-info{background:#1e3a8a;color:#dbeafe}.theme-dark .badge-warn{background:#78350f;color:#fde68a}.theme-dark .badge-bad{background:#7f1d1d;color:#fecaca}.grow{flex:1}
