:root{font-family:"Segoe UI","Malgun Gothic",sans-serif;color:#1a2d43;background:#f4f7fb;font-size:13px}
*{box-sizing:border-box}body{margin:0;min-width:360px}button,input,select{font:inherit}button{cursor:pointer}
button:disabled{cursor:default;opacity:.5}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid #1370c6;outline-offset:2px}
.app-header{height:53px;padding:0 12px;display:flex;align-items:center;gap:14px;background:#f7faff}.company-logo{width:152px;height:41px;object-fit:cover;object-position:center;flex:0 0 auto}.company-name{font-size:12px;font-weight:700;color:#234868;white-space:nowrap}
.brand{font-size:21px;font-weight:700;letter-spacing:.01em;color:#153f5f;white-space:nowrap}.brand span{color:#1a6eb2}
.tagline{margin-left:auto;color:#3c4c60;white-space:nowrap}.cloud-tag{color:#59738f;border:1px solid #d0dce9;border-radius:12px;padding:3px 8px;font-size:11px}
.toolbar{height:43px;padding:0 11px;display:flex;align-items:center;gap:7px;background:#f7faff;border-bottom:1px solid #dde5ef;overflow-x:auto;white-space:nowrap}
.toolbar-spacer{flex:1}.control,.toolbar select,.toolbar a.control{min-height:29px;padding:5px 10px;background:#fff;color:#24384e;border:1px solid #d7e0eb;border-radius:5px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
.control:hover,.toolbar a.control:hover{background:#edf5ff;border-color:#9ebbd7}.control.primary{color:#07528f;border-color:#a9c4dd;background:#edf6ff}.control.active{color:#07528f;background:#e8f3ff;border-color:#86b5df}
.toolbar select{width:210px;flex:0 0 210px;text-align:left}.toolbar .toolbar-title{color:#54718e;max-width:230px;overflow:hidden;text-overflow:ellipsis}
#login{display:grid;gap:15px;width:min(390px,calc(100% - 32px));margin:12vh auto;padding:30px;background:#fff;border:1px solid #d9e3ed;border-radius:11px;box-shadow:0 15px 45px #203f6114}
#login h2{margin:0;color:#153f5f;font-size:21px}#login p{margin:0;color:#667c91;line-height:1.6}#login button{height:38px}#loginError{color:#b33535;min-height:18px}#main{display:none}
.approval{padding:9px 12px;background:#eaf4ff;border-bottom:1px solid #a7c8e5;gap:10px;align-items:center;flex-wrap:wrap}
.workbench{height:calc(100dvh - 129px);min-height:500px;display:grid;grid-template-columns:205px 215px minmax(300px,1fr) 310px;gap:7px;padding:6px 9px}
.panel{min-width:0;background:#fff;border:1px solid #dce5ef;border-radius:5px}.left-panel,.right-panel{padding:7px;display:flex;flex-direction:column;gap:7px;overflow:auto}
.panel-title{font-size:12px;font-weight:700;color:#27425e;margin:0 0 4px;padding:3px 2px}.section-title{font-size:12px;color:#273c52;margin:4px 0 0}
.field{height:29px;padding:5px 8px;background:#fff;color:#24384e;border:1px solid #d4deea;border-radius:4px;min-width:0}.field::placeholder{color:#8da0b2}.wide,.search{width:100%}
.muted{color:#6b7e91;font-size:11px;line-height:1.45}.small-help{white-space:normal;margin-top:auto;padding:8px 2px 1px;color:#536b80;font-size:11px;line-height:1.55}
.channel-list{flex:1;min-height:190px;overflow:auto;border:1px solid #dbe4ee;border-radius:4px;background:#fff}.channel-head{display:flex;justify-content:space-between;padding:5px 7px;border-bottom:1px solid #dbe4ee;color:#4d647b;font-size:11px}
.channel-row{display:flex;align-items:center;gap:6px;padding:6px 7px;border-bottom:1px solid #eef2f6;cursor:pointer}.channel-row:hover{background:#eff6fd}.channel-row input{margin:0;accent-color:#176bb9}.channel-row .channel-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-row small{color:#71869a}
.empty-mini{padding:17px 9px;color:#8394a6;text-align:center;font-size:12px}
.workspace-panel{padding:9px;display:flex;flex-direction:column;gap:7px;min-width:0;overflow:hidden}.workspace-head{display:flex;align-items:baseline;justify-content:space-between;gap:5px}.workspace-head h2{font-size:15px;color:#153f5f;margin:2px 0 6px}.workspace-panel>label{font-size:11px;color:#58738c}.workspace-panel select{width:100%}.workspace-list{flex:1;min-height:0;overflow-y:auto;border:1px solid #dce5ef;border-radius:4px}.workspace-item{padding:7px;border-bottom:1px solid #e8eef5;display:grid;grid-template-columns:26px minmax(0,1fr) 28px;gap:3px;align-items:start}.workspace-item.active{background:#eaf4ff}.workspace-item button{background:none;border:0;color:#28639b;padding:2px}.workspace-item .workspace-open{text-align:left;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-meta{grid-column:2/4;font-size:10px;color:#718599}.workspace-item .favorite.is-favorite{color:#b17c12}.workspace-item .workspace-delete{color:#8d6570}.workspace-pages{display:flex;align-items:center;gap:5px;justify-content:space-between}.workspace-pages .muted{font-size:10px;text-align:center}.workspace-pages button{padding:3px 6px;font-size:11px}
.center-panel{display:flex;flex-direction:column;overflow:hidden}.project-bar{height:44px;min-height:44px;padding:5px 7px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #dce5ef;background:#fff}.project-title{min-width:140px;width:min(46%,360px);border:1px solid transparent;border-radius:4px;background:transparent;color:#183e62;font-size:17px;font-weight:700;padding:4px 6px}.project-title:focus,.project-title:hover:not(:disabled){border-color:#aac9e4;background:#f6fbff}.project-title:disabled{opacity:1;color:#8091a3}.project-spacer{flex:1}.share-row{display:flex;align-items:center;gap:4px;white-space:nowrap;color:#365a76}.share-row input{accent-color:#176bb9}.project-bar .control{min-height:27px}.tab-strip{height:36px;min-height:36px;display:flex;align-items:end;gap:4px;padding:4px 6px 0;background:#f7faff;border-bottom:1px solid #dce5ef;overflow-x:auto}
#tabs{display:flex;align-items:end;gap:2px;min-width:0}.tab{height:31px;max-width:220px;padding:5px 12px;background:#edf2f7;border:1px solid #dbe3eb;border-bottom:0;border-radius:5px 5px 0 0;color:#41576e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tab.active{background:#fff;color:#175b9a;border-color:#c6d9eb;font-weight:600}.tab-add{height:27px;min-width:28px;margin-bottom:3px;padding:0 7px}
.tab-actions{margin-left:auto;display:flex;gap:4px;padding-bottom:3px}.tab-actions .control{min-height:27px;padding:4px 8px}
.plot-shell{position:relative;flex:1;min-height:300px;background:#fff}#plot{position:absolute;inset:0;width:100%;height:100%}.empty-state{position:absolute;inset:15% 8%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;background:#fff;color:#607890;z-index:2;pointer-events:none}.empty-state strong{font-size:16px;color:#274a6b}.empty-state .glyph{font-size:39px;color:#99b8d4}
.center-hint{min-height:25px;border-top:1px solid #e2e9f0;padding:5px 9px;color:#6c8195;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.right-panel{gap:6px}.right-panel .control{width:100%}.range-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}.range-row .field{width:100%}.right-divider{height:1px;background:#e3eaf1;margin:4px 0}
.cursor-row{display:flex;align-items:center;gap:8px;padding:2px 1px}.cursor-row input{accent-color:#176bb9}
.curve-table{flex:1;min-height:110px;overflow:auto;border:1px solid #dbe4ee;border-radius:4px}.curve-table table{width:100%;border-collapse:collapse;font-size:11px}.curve-table th,.curve-table td{padding:5px 4px;text-align:left;border-bottom:1px solid #e7edf3}.curve-table th{position:sticky;top:0;background:#f6f9fc;color:#55708a;font-weight:600}.curve-table td button{padding:1px 5px;background:#fff;border:1px solid #d8e2ed;border-radius:3px;color:#56718b}.color-swatch{width:15px;height:3px;display:inline-block;vertical-align:middle}
.statusbar{height:33px;display:flex;align-items:center;gap:9px;padding:0 10px;color:#526d87;border-top:1px solid #dce5ef;background:#f7faff}.statusline{height:3px;width:36%;background:#176bb9;border-radius:3px}#status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.statusbar .spacer{flex:1}
dialog{width:min(940px,calc(100% - 28px));max-height:min(78vh,760px);padding:0;border:1px solid #cad8e6;border-radius:8px;box-shadow:0 20px 60px #20364b45;color:#1a2d43;background:#fff}dialog::backdrop{background:#1a2e4380}
.dialog-head{display:flex;align-items:start;gap:10px;padding:17px 18px 11px;border-bottom:1px solid #e2e9f0}.dialog-head h2{font-size:19px;color:#153f5f;margin:0}.dialog-head p{margin:5px 0 0;color:#708396;font-size:12px}.dialog-head .spacer{flex:1}
.recent-head,.dataset{display:grid;grid-template-columns:72px minmax(170px,1fr) 165px 95px 58px;gap:0;align-items:center}.recent-head{font-size:11px;font-weight:600;color:#56718a;background:#f5f8fb;border-bottom:1px solid #dbe4ee}.recent-head span,.dataset>span{padding:8px;border-right:1px solid #e4ebf2}
#recent{max-height:48vh;overflow:auto}.dataset{border-bottom:1px solid #e4ebf2}.dataset:hover{background:#f5faff}.dataset button{margin:4px;padding:4px 6px;border:1px solid #d7e1eb;background:#fff;color:#31516e;border-radius:4px}.dataset button:hover{background:#eaf4ff}.dataset .open-dataset{text-align:left;color:#1763a4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dataset .favorite.is-favorite{color:#a6740a;background:#fff8e9}
.dialog-foot{display:flex;align-items:center;gap:8px;padding:10px 14px;border-top:1px solid #e2e9f0}.dialog-foot .spacer{flex:1}#pagination{display:flex;gap:4px}#pagination button{padding:4px 9px}
.small-dialog{width:min(420px,calc(100% - 28px))}.dialog-body{display:grid;gap:7px;padding:17px 18px}.dialog-body label{font-weight:600;color:#35536e}.dialog-body .field{width:100%}
@media(max-width:1200px){.workbench{grid-template-columns:190px 190px minmax(300px,1fr) 250px}.project-bar #saveState{display:none}}
@media(max-width:980px){.workbench{height:auto;min-height:calc(100dvh - 129px);grid-template-columns:190px 190px minmax(300px,1fr)}.right-panel{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.right-panel .curve-table{grid-column:1/-1}.right-panel .right-divider{display:none}.center-panel{min-height:560px}}
@media(max-width:700px){.brand{font-size:16px}.company-logo{width:100px}.company-name{display:none}.cloud-tag{display:none}.workbench{display:flex;flex-direction:column}.workspace-panel{min-height:245px;max-height:340px}.left-panel{min-height:190px}.channel-list{max-height:145px}.center-panel{min-height:450px}.right-panel{display:flex}.project-title{font-size:14px;width:44%}}
