:root{font-family:"Segoe UI","Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;color:#172b28;background:#f4f7f6;font-size:14px;--ink:#172b28;--muted:#5e706d;--line:#e2ebe7;--green:#137357;--dark:#12352d;--white:#fff;--pale:#e7f4ee;--shadow:0 1px 2px #0d3c2410}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-width:300px}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #36a47e;outline-offset:2px}
a{color:var(--green);text-decoration:none}
h1,h2,h3,p{margin:0}
.icon{width:18px;height:18px;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;fill:none;flex:none;vertical-align:middle}
.loading{display:grid;place-items:center;min-height:100vh;color:var(--muted)}
.shell{--sidebar:218px;min-height:100vh;padding-left:var(--sidebar)}
.sidebar{width:var(--sidebar);height:100dvh;position:fixed;inset:0 auto 0 0;background:#15342e;color:#eaf6ef;display:flex;flex-direction:column;overflow:auto;z-index:5}
.brand,.login-brand{display:flex;align-items:center;gap:11px;font-size:20px;font-weight:700;line-height:1.18;color:inherit}
.brand{padding:25px 20px 20px}
.brand small,.login-brand small{display:block;font-size:10px;font-weight:500;margin-top:5px;color:#a9c2b8}
.brandmark{display:grid;place-items:center;width:38px;height:38px;flex:none;background:#b9efb6;color:#164133;border-radius:8px}
.brandmark .icon{width:23px;height:23px}
.space-tag{margin:1px 14px 23px;padding:9px 11px;background:#ffffff0c;border:1px solid #ffffff13;color:#d8e8df;border-radius:6px;font-size:12px}
.space-tag i{display:inline-block;width:7px;height:7px;margin:0 8px 1px 0;border-radius:50%;background:#8ee18c}
.sidebar nav{padding:0 12px 12px}
.nav-label{font-size:11px;color:#a3bdb3;margin:0 0 8px 10px;font-weight:600}
.nav-label.secondary{margin-top:19px}
.nav-link{width:100%;color:#d3e3dc;border:0;border-radius:6px;background:none;display:flex;align-items:center;gap:11px;text-align:left;padding:0 11px;height:42px;margin-bottom:3px;white-space:nowrap;font-size:13px}
.nav-link .icon{width:17px;height:17px;color:#a9c4b9}
.nav-link:hover{background:#ffffff0d}
.nav-link.active{background:#2e5548;color:#ecffeb;font-weight:700}
.nav-link.active .icon{color:#b9efb6}
.nav-link b{margin-left:auto;color:#bbf0b9;background:#18382e;border-radius:4px;padding:2px 7px;font-size:11px}
.side-footer{margin:auto 15px 0;display:flex;justify-content:space-between;align-items:center;padding:13px 6px 16px;border-top:1px solid #ffffff19;color:#a6bfb4;font-size:11px}
.side-footer b{font-weight:600;color:#d0e1d9}
.workspace{min-width:0}
.topbar{height:65px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:white;border-bottom:1px solid var(--line);padding:0 28px}
.crumb,.top-tools{display:flex;align-items:center;gap:14px;min-width:0}
.crumb{gap:8px;color:var(--muted);font-size:13px;white-space:nowrap}
.crumb b{color:var(--ink);font-weight:650}
.crumb .icon{width:14px;height:14px;color:#80918c}
.crumb [data-action="menu"]{display:none}
.search-trigger{height:35px;border:1px solid var(--line);background:#f7f9f8;color:#566b64;border-radius:6px;display:flex;align-items:center;gap:8px;padding:0 9px;width:261px;text-align:left;font-size:12px}
.search-trigger>span{flex:1}
kbd{font:11px "Segoe UI",sans-serif;color:#637671;background:#fff;border:1px solid #dfe8e4;border-radius:4px;padding:2px 4px;white-space:nowrap}
.icon-btn{width:33px;height:33px;flex:none;border:1px solid transparent;display:inline-grid;place-items:center;border-radius:6px;background:transparent;color:#587068;padding:0}
.icon-btn:hover{background:#edf5f1;border-color:#e4eee9;color:#146c51}
.bell{position:relative}
.bell i{position:absolute;top:5px;right:6px;width:7px;height:7px;background:#e5a342;border:1px solid white;border-radius:50%}
.profile{display:flex;align-items:center;text-align:left;gap:8px;border:0;border-left:1px solid var(--line);padding:0 0 0 14px;background:none;color:var(--ink)}
.profile b,.profile small{display:block;white-space:nowrap}
.profile b{font-size:12px;margin-bottom:2px}
.profile small{font-size:10px;color:var(--muted)}
.profile>.icon{width:13px;height:13px;color:#6f827b}
.avatar{width:32px;height:32px;flex:none;display:inline-grid;place-items:center;border-radius:50%;color:#226143;background:#deeee3;font-size:12px;font-weight:700}
.main{max-width:1590px;margin:0 auto;padding:25px 28px 30px}
.page-head,.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.page-head{margin-bottom:20px}
.page-head h1{font-size:29px;line-height:1.27;font-weight:750}
.page-head p,.panel-head p{margin-top:6px;color:var(--muted);font-size:12px}
.page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:6px;min-height:35px;padding:6px 11px;background:#fff;color:#28463c;border:1px solid #dce7e1;border-radius:6px;font-size:12px;font-weight:650;white-space:nowrap}
.btn .icon{width:15px;height:15px}
.btn:hover{background:#eff7f3;border-color:#c3ded0}
.btn.primary{background:#157557;border-color:#157557;color:white}
.btn.primary:hover{background:#0f6147}
.btn.plain{background:transparent;border-color:transparent;color:#17654e}
.btn.plain:hover{background:#e9f5ee}
.btn.danger{background:#fff6f5;color:#a43932;border-color:#f0d1ce}
.btn.danger:hover{background:#ffeceb}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:16px}
.metric{background:white;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:13px 14px 11px;text-align:left;color:var(--ink);min-width:0}
.metric:hover{border-color:#a8d2bf}
.metric-top,.metric-foot{display:flex;justify-content:space-between;align-items:center;gap:6px}
.metric-top{color:#405d52;font-size:12px;font-weight:650}
.metric-icon,.queue-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:6px;flex:none}
.green{color:#176247;background:#e7f5ec}.blue{color:#2e5784;background:#eaf1fa}.amber{color:#845312;background:#fff2d9}.violet{color:#5c4889;background:#f1edfa}.gray{color:#586962;background:#edf1ef}.red{color:#a13936;background:#fceceb}
.metric strong{display:block;font-size:29px;line-height:1.12;font-weight:750;margin:4px 0 8px;font-variant-numeric:tabular-nums}
.metric-foot{color:var(--muted);font-size:11px}
.metric-foot .icon{width:14px;height:14px;color:#548571}
.dashboard-split{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:15px;margin-bottom:15px}
.panel{min-width:0;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);overflow:hidden}
.panel-head{padding:15px 16px 12px}
.panel-head h2{font-size:16px;font-weight:740}
.segments{display:flex;align-items:center;gap:2px;border:1px solid #e4ece8;background:#f2f6f4;border-radius:6px;padding:2px;flex:none}
.segments .btn{background:transparent;min-height:24px;border:1px solid transparent;padding:2px 8px;font-weight:500}
.segments .btn.selected{background:white;border-color:#e1eae5;color:#17664d;box-shadow:var(--shadow)}
.legend{display:flex;gap:14px;color:var(--muted);font-size:11px;padding:0 16px 3px}
.legend i{display:inline-block;width:8px;height:8px;border-radius:2px;background:#b7ddd0;margin:0 5px 0 0}
.legend span:nth-child(2) i{background:#29856a}
.plot{width:100%;height:clamp(139px,18vw,248px);display:block}
.plot line{stroke:#e7f0ec;stroke-dasharray:4 3}
.plot text{fill:#61736c;font-size:11px}
.input-bar{fill:#b7ddd0}.pass-bar{fill:#29856a}
.plot g:hover rect,.plot g:focus rect{stroke:#12352d;stroke-width:1}
.chart-foot,.queue-footer{border-top:1px solid var(--line);display:flex;gap:12px;align-items:center;padding:10px 16px;color:#657971;font-size:11px;min-height:42px}
.chart-foot{justify-content:space-between;margin-top:auto;flex-wrap:wrap}
.chart-foot b{color:#1c4234;margin-left:3px;font-size:13px}
.chart-panel,.queue-panel{display:flex;flex-direction:column}
.queue-panel .queue{flex:1}
.queue-footer{margin-top:auto}
.queue-footer .icon{width:15px;height:15px}
.queue-footer .btn{margin-left:auto}
.queue{padding:0 14px 6px}
.queue-item{padding:9px 2px;display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:0;color:var(--ink);min-height:53px}
.queue-item+.queue-item{border-top:1px solid var(--line)}
.queue-item:hover{background:#f8fbf9}
.queue-item>.icon{width:13px;height:13px;color:#7b9189}
.queue-icon{width:29px;height:29px}
.queue-icon .icon{width:16px;height:16px}
.queue-body{display:block;min-width:0;flex:1}
.queue-body strong,.queue-body small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.queue-body strong{font-size:12px}
.queue-body small{font-size:10px;color:var(--muted);margin-top:4px}
.badge{display:inline-flex;align-items:center;gap:4px;border-radius:4px;padding:3px 6px;font-size:11px;line-height:1.2;white-space:nowrap;font-weight:600}
.badge i{width:5px;height:5px;background:currentColor;border-radius:50%}
.table-scroll{overflow:auto;width:100%}
table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap;font-size:12px}
thead{background:#f5f8f6;color:#4f625c}
th,td{padding:9px 15px}
th{font-weight:650}
td{border-bottom:1px solid #edf1ef;max-width:360px;overflow:hidden;text-overflow:ellipsis}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fafcfb}
.record-link{font:inherit;font-weight:650;text-align:left;color:#245f4b;background:none;border:0;padding:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.record-link:hover{text-decoration:underline}
.subcode{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.inline-avatar{display:inline-flex;align-items:center;gap:6px}
.inline-avatar .avatar{width:23px;height:23px;font-size:10px}
.phase-track{display:inline-flex;align-items:center;gap:2px;margin-right:7px}
.phase-track i{width:7px;height:5px;border-radius:1px;background:#e1ebe6}
.phase-track .filled{background:#439979}
.empty{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;color:#667c73;min-height:132px;padding:24px;flex:1;text-align:center}
.empty .icon{width:25px;height:25px;color:#739587}
.empty strong{font-size:12px;font-weight:550}
.tabs{display:flex;gap:16px;padding:0 15px;min-height:49px;align-items:stretch;overflow:auto;border-bottom:1px solid var(--line)}
.tabs .btn{background:transparent;border:0;border-radius:0;border-bottom:2px solid transparent;padding:8px 5px}
.tabs .btn.active{color:#12694e;border-bottom-color:#1b8a65}
.tabs .btn:hover{background:#f4f9f6}
.list-tools{padding:13px 15px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.list-search{display:flex;gap:6px;align-items:center;background:#fff;border:1px solid #dce7e1;border-radius:6px;padding:0 9px;color:#607770}
.list-search input{outline:none!important;border:none;background:none;min-width:0;flex:1;padding:8px 0;color:var(--ink);width:180px}
.list-search:focus-within{border-color:#60ac8e}
.list-tools select{max-width:180px;min-height:34px;color:#3b584d;border:1px solid #dce7e1;border-radius:6px;padding:4px 7px;background:#fff;font-size:12px}
.code{font-family:"Cascadia Mono",Consolas,monospace;color:#415e54}
.action-col{width:68px}
.list-footer{border-top:1px solid var(--line);padding:10px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px}
.report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:15px}
.distribution{padding:0 15px 8px;margin:0;list-style:none}
.distribution li{padding:8px 0;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.muted{color:var(--muted)}
button[hidden],div[hidden]{display:none!important}
dialog{width:min(690px,calc(100% - 28px));max-height:min(86dvh,820px);padding:0;border:1px solid #d5e4dc;border-radius:8px;color:var(--ink);background:#fff;box-shadow:0 22px 55px #062a2240}
dialog[open]{display:flex;flex-direction:column}
dialog::backdrop{background:#142e2a6b}
.dialog-head,.dialog-foot{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 17px;border-bottom:1px solid var(--line)}
.dialog-head h2{font-size:19px;line-height:1.25;overflow-wrap:anywhere}
.dialog-head small{font-size:11px;color:var(--muted);display:block;margin-bottom:5px}
.dialog-body{overflow:auto;padding:16px 17px}
.dialog-foot{justify-content:flex-end;border-top:1px solid var(--line);border-bottom:0;flex-wrap:wrap}
.detail-fields{display:grid;grid-template-columns:1fr 1fr;gap:13px 16px;margin:0}
.detail-fields dt{font-size:11px;color:var(--muted);margin-bottom:4px}
.detail-fields dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.detail-section{padding-top:13px;border-top:1px solid var(--line);margin-top:15px}
.detail-section h3{font-size:13px;font-weight:700;margin-bottom:7px}
.related-head{display:flex;align-items:center;justify-content:space-between;gap:7px}
.related-head h3{margin:0}
.related>div,.attachment{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:7px 0}
.related>div+div,.attachment+.attachment{border-top:1px solid var(--line)}
.related small,.attachment small,.quantity-summary small{color:var(--muted);font-size:11px}
.attachment>div{flex:1;min-width:0;overflow-wrap:anywhere}
.attachment small{display:block;margin-top:3px}
.quantity-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.quantity-summary div{padding:5px 0}
.quantity-summary strong{display:block;font-size:18px}
.history{padding-left:21px}
.history li{padding:4px;font-size:12px}
.history time,.history p{color:var(--muted);margin-left:5px}
.editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.editor.single{display:block}
.editor label,.login-panel label{display:block;font-size:12px;font-weight:650}
.editor label:not(.check-field) input:not([type=checkbox]),.editor select,.editor textarea,.login-panel input{display:block;width:100%;min-height:37px;margin-top:5px;border:1px solid #dce7e1;background:#fff;border-radius:6px;color:var(--ink);padding:7px 9px}
.editor textarea{resize:vertical}
.editor fieldset{margin:0;border:1px solid var(--line);border-radius:6px;min-width:0}
.editor legend{font-size:12px;font-weight:650;padding:0 4px}
.editor .checks{display:grid;grid-template-columns:1fr 1fr;gap:5px 7px;max-height:158px;overflow:auto}
.editor .checks label,.editor label.check-field{display:flex;align-items:center;gap:4px}
.editor.single label+label{margin-top:12px}
input[type=checkbox]{accent-color:#177657;width:15px;height:15px}
.span-two,.form-error{grid-column:1/-1}
.required{color:#a64238}
.form-divider{padding-top:10px;border-top:1px solid var(--line);font-weight:700}
.editor .upload-zone{padding:10px;background:#f6faf8;border:1px dashed #adcabb;border-radius:6px;color:#265e4b}
.upload-zone .icon{margin-right:7px}
.upload-zone small{color:var(--muted)}
.form-error{background:#fff1f0;color:#a3312d;padding:8px;border-radius:5px;font-size:12px}
.preview{width:100%;height:59dvh;border:1px solid var(--line);border-radius:5px}
.secret{background:#eef6f2;padding:3px 6px;border-radius:4px;user-select:all}
.global-search input{width:100%}
.search-hint{margin:12px 0;font-size:12px}
.account-detail{display:flex;gap:10px;align-items:center}
.account-detail p{font-size:12px;color:var(--muted);margin-top:4px}
#toast{position:fixed;right:20px;bottom:18px;z-index:10;background:#1c4f3e;border:1px solid #255846;color:white;max-width:min(420px,calc(100% - 40px));padding:10px 13px;border-radius:7px;box-shadow:0 9px 20px #122d2733}
#toast.error{background:#8a312f;border-color:#8a312f}
.login-wrap{min-height:100dvh;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:24px;background:#ecf4f0}
.login-brand{margin-bottom:20px}
.login-brand small{color:#5c746a}
.login-panel{background:white;border:1px solid #dbe8e1;border-radius:8px;padding:24px;width:min(100%,386px);box-shadow:var(--shadow)}
.login-panel h1{font-size:23px}
.login-panel p{color:var(--muted);margin:6px 0 18px;font-size:12px}
.login-panel form{display:grid;gap:13px}
.login-panel .btn.primary{justify-content:space-between}
.login-help,.login-wrap footer{display:block;color:var(--muted);font-size:11px;margin-top:15px}
@media(max-width:1100px){
  .shell{--sidebar:187px}
  .brand{padding-left:14px}
  .main,.topbar{padding-left:19px;padding-right:19px}
  .dashboard-split{grid-template-columns:minmax(0,1.5fr) minmax(250px,1fr)}
  th,td{padding-left:10px;padding-right:10px}
}
@media(max-width:850px){
  .shell{--sidebar:209px;padding-left:0}
  .sidebar{transform:translateX(-100%);transition:transform .16s ease}
  .nav-open .sidebar{transform:translateX(0);box-shadow:0 0 24px #102d2766}
  .nav-open .workspace{padding-left:var(--sidebar)}
  .crumb [data-action="menu"]{display:inline-grid;margin-left:-5px}
  .crumb [data-action="menu"] .icon{width:20px;height:20px}
}
@media(max-width:640px){
  .main,.topbar{padding-left:12px;padding-right:12px}
  .main{padding-top:17px}
  .topbar{height:54px}
  .top-tools{gap:4px}
  .crumb{gap:4px}
  .crumb>span,.crumb>.icon,.profile>span:not(.avatar),.profile>.icon{display:none}
  .profile{padding-left:4px}
  .search-trigger{display:grid;place-items:center;width:33px;padding:0}
  .search-trigger span,.search-trigger kbd{display:none}
  .metrics,.report-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .dashboard-split{grid-template-columns:1fr;gap:10px}
  .plot{height:auto;min-height:130px}
  .metric{padding:9px}
  .metric strong{font-size:24px}
  .metric-icon{width:28px;height:28px}
  .page-head{align-items:flex-start;flex-wrap:wrap;margin-bottom:13px}
  .page-head h1{font-size:24px}
  .page-actions{justify-content:flex-start}
  .nav-open .workspace{padding-left:0}
  .nav-open .crumb [data-action="menu"]{position:fixed;left:218px;z-index:6;background:white;box-shadow:var(--shadow)}
  .chart-foot{gap:6px;padding:8px}
}
@media(max-width:390px){
  .editor{grid-template-columns:minmax(0,1fr)}
  .queue-item>.icon{display:none}
  .metric-foot{align-items:flex-start}
  .metric-foot .icon{display:none}
  .report-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}}
