@font-face{font-family:MiSans;src:url('../assets/fonts/MiSans-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:MiSans;src:url('../assets/fonts/MiSans-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:MiSans;src:url('../assets/fonts/MiSans-Semibold.woff2') format('woff2');font-weight:600;font-display:swap}

:root{
  --sidebar:17.5%;
  --context:30.98%;
  --topbar-height:clamp(70px,5.833vw,84px);
  --blue:#2f6fe4;
  --blue-strong:#0444ca;
  --blue-soft:rgba(220,232,255,.8);
  --sidebar-bg:rgba(227,242,255,.73);
  --text:#1f2937;
  --muted:#667085;
  --line:#e5e7eb;
  --line-strong:#d5d5d5;
  --red:#ff4d4f;
  --yellow:#f2d600;
  --orange:#faad14;
  --green:#52c41a;
  --surface:#fff;
}

*{box-sizing:border-box}
html,body{margin:0;min-width:1100px;min-height:100%;font-family:MiSans,"Microsoft YaHei",sans-serif;color:var(--text);background:#f5f7fa}
button,input,select,textarea{font:inherit}
button{color:inherit}
button,a{-webkit-tap-highlight-color:transparent}

.admin-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);width:100%;height:56.25vw;max-height:100vh;min-height:0;aspect-ratio:16/9;background:#fff;overflow:hidden}
.sidebar{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;background:var(--sidebar-bg);border-right:1px solid #bdbdbd;z-index:20}
.brand{width:calc(100% - 20px);height:64px;display:flex;align-items:center;text-decoration:none;color:#000;flex:0 0 auto}
.brand-mark{width:54px;height:48px;display:block}
.brand-mark i{display:none}
.brand strong{font-size:clamp(28px,2.5vw,36px);font-weight:600;line-height:1;letter-spacing:-1.6px;white-space:nowrap}

.side-nav{width:100%;padding-top:17px;display:grid;gap:10px}
.nav-item{width:calc(100% - 12px);height:80px;margin:0 6px;padding:0;border:0;border-radius:8px;background:transparent;display:grid;grid-template-columns:80px 1fr;align-items:center;text-align:left;cursor:pointer;transition:background-color .18s ease,color .18s ease,transform .14s ease}
.nav-item:hover{background:rgba(220,232,255,.48)}
.nav-item:active{transform:scale(.988)}
.nav-item.is-active{background:var(--blue-soft);color:var(--blue-strong)}
.nav-item>span:last-child{font-size:20px;font-weight:400;white-space:nowrap}
.nav-icon{width:30px;height:30px;justify-self:center;position:relative;display:block;color:#111}
.nav-item.is-active .nav-icon{color:#3476d3}
.icon-record{border:2px solid currentColor;border-radius:2px;width:24px;height:28px}
.icon-record:before{content:"";position:absolute;right:-2px;top:-2px;width:8px;height:8px;background:var(--sidebar-bg);border-left:2px solid currentColor;border-bottom:2px solid currentColor}
.icon-record:after{content:"";position:absolute;left:5px;right:5px;top:12px;height:2px;background:currentColor;box-shadow:0 6px 0 currentColor}
.nav-item.is-active .icon-record:before{background:#dfebff}
.icon-production:before,.icon-production:after{content:"";position:absolute;left:4px;right:4px;height:2px;background:currentColor}
.icon-production:before{top:8px;box-shadow:0 7px 0 currentColor,0 14px 0 currentColor}.icon-production:after{left:0;right:auto;top:7px;width:3px;height:3px;border-radius:50%;box-shadow:0 7px 0 currentColor,0 14px 0 currentColor}
.icon-ledger{width:28px;height:20px;border:2px solid currentColor;border-radius:3px}.icon-ledger:after{content:"";position:absolute;left:0;right:0;top:7px;border-top:2px solid currentColor}
.icon-phone{width:25px;height:25px;border:3px solid currentColor;border-top-color:transparent;border-right-color:transparent;border-radius:5px 5px 5px 15px;transform:rotate(-35deg)}
.icon-phone:before,.icon-phone:after{content:"";position:absolute;width:7px;height:4px;border:2px solid currentColor;border-radius:2px}.icon-phone:before{left:-4px;top:-2px}.icon-phone:after{right:-4px;bottom:-2px}
.icon-chart{display:flex;align-items:flex-end;justify-content:center;gap:3px;width:28px;height:28px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;padding:0 3px 3px}
.icon-chart i{width:4px;background:currentColor;border-radius:1px}.icon-chart i:nth-child(1){height:8px}.icon-chart i:nth-child(2){height:15px}.icon-chart i:nth-child(3){height:22px}
.collapse-button{margin-top:auto;width:100%;height:80px;border:0;border-top:1px solid #b6b6b6;background:rgba(255,255,255,.18);cursor:pointer;display:flex;align-items:center;justify-content:flex-end;padding-right:24px}
.collapse-button span{font-size:40px;font-weight:300;line-height:1;transition:transform .2s ease}

.workspace{min-width:0;height:100%;overflow:hidden}
.topbar{position:relative;z-index:15;height:var(--topbar-height);padding:clamp(7px,.694vw,10px) clamp(24px,2.222vw,32px);display:flex;align-items:center;justify-content:flex-end;background:linear-gradient(180deg,#e3ecff 0%,#fff 100%);border-bottom:1px solid #d7d7d7}
.topbar-actions{height:64px;display:flex;align-items:center;gap:40px}
.top-select{height:64px;padding:0 18px;border:1px solid #e6e6ec;border-radius:8px;background:rgba(255,255,255,.42);display:flex;align-items:center;gap:12px;cursor:pointer;box-shadow:0 1px 2px rgba(31,41,55,.02)}
.top-select:first-child{width:237px}.top-select.shift-select{width:279px}
.top-select b{font-size:20px;font-weight:400;white-space:nowrap}.top-select i{margin-left:auto;font-size:26px;font-style:normal;transform:translateY(-3px)}
.building-icon,.calendar-icon{width:25px;height:25px;position:relative;border:2px solid #151515;display:inline-block}
.building-icon:before{content:"";position:absolute;left:5px;top:-8px;width:10px;height:7px;border:2px solid #151515;background:#edf3ff}.building-icon:after{content:"";position:absolute;left:5px;top:5px;width:3px;height:3px;background:#151515;box-shadow:8px 0 #151515,0 7px #151515,8px 7px #151515}
.calendar-icon{border-radius:3px}.calendar-icon:before{content:"";position:absolute;left:-2px;right:-2px;top:5px;border-top:2px solid #151515}.calendar-icon:after{content:"";position:absolute;left:4px;top:-4px;width:3px;height:7px;border-left:2px solid #151515;border-right:2px solid #151515;padding-left:8px}
.avatar{width:38px;height:38px;border:0;border-radius:50%;background:#ddd;position:relative;cursor:pointer}
.avatar span:before{content:"";position:absolute;left:13px;top:7px;width:10px;height:10px;border:2px solid #111;border-radius:50%}.avatar span:after{content:"";position:absolute;left:9px;bottom:6px;width:18px;height:11px;border:2px solid #111;border-bottom:0;border-radius:12px 12px 0 0}

.page-stage{height:calc(100% - var(--topbar-height));min-height:0;overflow:hidden}
.page{display:grid;grid-template-columns:minmax(0,1fr) var(--context);height:100%;min-height:0;background:#fff}
.page[hidden]{display:none}
.page-main{min-width:0;padding:12px}
.record-main{display:flex;flex-direction:column;gap:12px}
.record-heading{height:clamp(96px,7.986vw,115px);display:flex;align-items:center;justify-content:space-between;padding:0 2px;border-bottom:1px solid #e2e2e2}
.record-heading h1,.generic-heading h1{margin:0;font-size:48px;line-height:64px;font-weight:400;letter-spacing:-1.6px;color:#000}
.record-heading p{font-size:20px;color:#111;margin:0 8px 0 0;white-space:nowrap}

.summary-strip{height:82px;border:1px solid #dde4ec;border-radius:8px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.04);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0 10px;overflow:hidden}
.summary-strip article{min-width:0;display:flex;align-items:center;justify-content:center;gap:16px;position:relative}
.summary-strip article+article:before{content:"";position:absolute;left:0;top:16px;bottom:16px;width:1px;background:#e5e7eb}
.summary-strip article div{display:grid;align-content:center}
.summary-strip small{font-size:13px;color:var(--muted);line-height:20px;white-space:nowrap}
.summary-strip strong{font-size:24px;color:var(--blue);font-weight:500;line-height:32px}
.summary-strip article:nth-child(2) strong{color:var(--text)}
.summary-strip article:nth-child(3) strong{color:var(--text)}
.summary-strip article:nth-child(4) strong{color:var(--text)}
.metric-icon{width:40px;height:40px;border-radius:50%;position:relative;flex:0 0 auto;background:#eef6ff;color:var(--blue)}
.metric-icon.book:before{content:"";position:absolute;left:12px;top:9px;width:15px;height:21px;border:2px solid currentColor;border-radius:2px}.metric-icon.book:after{content:"";position:absolute;left:15px;bottom:12px;width:10px;border-top:2px solid currentColor}
.metric-icon.clock{background:#fff7e6;color:var(--orange)}.metric-icon.clock:before{content:"";position:absolute;inset:10px;border:3px solid currentColor;border-radius:50%}.metric-icon.clock:after{content:"";position:absolute;left:19px;top:13px;width:6px;height:8px;border-left:2px solid currentColor;border-bottom:2px solid currentColor}
.metric-icon.warning{background:#fff1f0;color:var(--red)}.metric-icon.warning:before{content:"!";position:absolute;inset:8px 10px;border-radius:3px 3px 9px 9px;background:currentColor;color:#fff;text-align:center;line-height:25px;font-weight:600;clip-path:polygon(50% 0,100% 100%,0 100%)}
.metric-icon.normal{background:#fffbe6}.metric-icon.normal:after,.metric-icon.blue-dot:after,.metric-icon.green-dot:after{content:"";position:absolute;inset:9px;border-radius:50%;background:var(--yellow)}
.metric-icon.blue-dot{background:#eef6ff}.metric-icon.blue-dot:after{background:var(--blue)}.metric-icon.green-dot{background:#f0faea}.metric-icon.green-dot:after{background:var(--green)}

.record-filters,.section-toolbar{min-height:52px;display:flex;align-items:center;gap:10px}
.filter-chip,.outline-button,.primary-button{height:40px;padding:0 16px;border:1px solid #dde4ec;border-radius:8px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.04);display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:14px;white-space:nowrap;cursor:pointer;transition:border-color .16s,background .16s,color .16s,transform .12s}
.filter-chip:hover,.outline-button:hover{border-color:#aac6ff;background:#f8fbff}.filter-chip:active,.outline-button:active,.primary-button:active{transform:scale(.98)}
.filter-chip.is-active{border-color:#b7d2ff;background:#eef5ff;color:var(--blue)}
.filter-spacer{flex:1}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.dot.severe{background:var(--red)}.dot.general{background:var(--yellow)}
.mini-doc{width:15px;height:17px;border:2px solid var(--blue);border-radius:2px}.mini-check{width:18px;height:18px;border:2px solid var(--green);border-radius:50%;position:relative}.mini-check:after{content:"";position:absolute;left:4px;top:3px;width:7px;height:4px;border-left:2px solid var(--green);border-bottom:2px solid var(--green);transform:rotate(-45deg)}
.mini-calendar{width:16px;height:16px;border:2px solid var(--muted);border-radius:2px}.mini-filter{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:12px solid var(--muted)}

.record-table-wrap{border:1px solid var(--line-strong);border-radius:8px;background:#fff;overflow:auto;flex:1;min-height:0}
.record-table{width:100%;border-collapse:collapse;table-layout:fixed}
.record-table th{position:sticky;top:0;z-index:2;height:47px;padding:0 10px;font-size:clamp(14px,1.4vw,20px);font-weight:400;color:#000;text-align:center;border-bottom:1px solid var(--line-strong);white-space:nowrap;background:#fff}
.record-table td{height:64px;padding:0 10px;font-size:clamp(13px,1.35vw,19px);font-weight:400;text-align:center;border-bottom:1px solid #e3e3e3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.record-table tbody tr{cursor:pointer;transition:background .14s}.record-table tbody tr:hover{background:#f7faff}.record-table tbody tr.is-selected{background:#f3f7ff}.record-table tbody tr:last-child td{border-bottom:0}
.record-table th:nth-child(1){width:18%}.record-table th:nth-child(2){width:18%}.record-table th:nth-child(3){width:19%}.record-table th:nth-child(4){width:14%}.record-table th:nth-child(5){width:16%}.record-table th:nth-child(6){width:15%}
.severity{display:inline-flex;align-items:center;gap:8px}.severity:before{content:"";width:18px;height:18px;border-radius:50%;background:var(--yellow);flex:0 0 auto}.severity.severe:before{background:#ff6b6d}
.row-status{display:inline-flex;align-items:center;gap:7px}.row-status:before{content:"";width:18px;height:22px;border:2px solid var(--blue);border-radius:2px}.row-status.wait:before{width:18px;height:18px;border-radius:50%;border:0;background:var(--orange)}

.context-panel{border-left:1px solid var(--line-strong);background:#fff;min-width:0;padding:0 12px 14px;overflow:auto;max-height:100%}
.context-head{height:42px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.context-head h2{font-size:22px;font-weight:600;margin:0}.context-close{width:28px;height:28px;border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer}
.record-meta{padding-top:8px}.status-row{height:34px;display:flex;align-items:center;justify-content:space-between}.severity-label{display:flex;align-items:center;gap:8px;font-size:16px}.severity-label:before{content:"";width:10px;height:10px;border-radius:50%;background:var(--red)}.status-badge{padding:4px 8px;border:1px solid var(--red);border-radius:6px;color:var(--red);font-size:12px}
.record-title{margin:0;font-size:20px;line-height:30px}.device-code{font-size:14px;color:var(--muted);margin:0 0 8px}.info-lines{display:grid;gap:4px;padding-bottom:8px;border-bottom:1px solid var(--line)}.info-lines span{font-size:14px;line-height:22px;color:var(--muted)}
.latest{padding:7px 0;border-bottom:1px solid var(--line)}.latest h3,.timeline-block h3,.basic-card h3{font-size:15px;margin:0 0 6px}.latest p{font-size:14px;color:#4d596a;line-height:22px;margin:0}
.timeline-block{padding:8px 0}.timeline{list-style:none;margin:0;padding:0 0 0 14px}.timeline li{position:relative;padding:0 0 15px 29px;min-height:50px;border-left:1px solid #d8e0eb}.timeline li:last-child{border-left-color:transparent;padding-bottom:0}.timeline li:before{content:"";position:absolute;left:-10px;top:2px;width:20px;height:20px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 4px #eef4ff}.timeline li:first-child:before{background:var(--red);box-shadow:0 0 0 4px #fff0f0}.timeline li:last-child:before{background:var(--green);box-shadow:0 0 0 4px #effbe9}.timeline b{display:block;font-size:14px;line-height:20px}.timeline span{font-size:12px;color:var(--muted);line-height:18px}.timeline time{position:absolute;right:0;top:0;font-size:12px;color:#8a94a6}
.basic-card{border:1px solid #e5eaf0;border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.05);padding:12px;margin-top:8px}.basic-card dl{margin:0;display:grid;gap:8px}.basic-card dl div{display:grid;grid-template-columns:82px 1fr;font-size:13px}.basic-card dt{color:#8a94a6}.basic-card dd{margin:0;color:#4d596a}
.context-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}.context-actions button{height:48px;border-radius:8px;font-size:14px;cursor:pointer}.contact-button{background:#fff;border:1px solid var(--blue);color:var(--blue)}.accept-button{background:var(--green);border:1px solid var(--green);color:#fff}

.generic-main{display:flex;flex-direction:column;gap:12px}.generic-heading{min-height:112px;padding:16px 2px 12px;display:flex;align-items:flex-end;justify-content:space-between;border-bottom:1px solid #e2e2e2}.generic-heading p{margin:3px 0 0;color:var(--muted);font-size:14px}.primary-button{background:var(--blue);border-color:var(--blue);box-shadow:none;color:#fff}.compact-summary{height:82px}.section-toolbar{justify-content:space-between}.tabs{display:flex;gap:8px}.tabs button{height:38px;padding:0 15px;border:0;background:transparent;border-bottom:2px solid transparent;cursor:pointer;color:var(--muted)}.tabs button.is-active{color:var(--blue);border-bottom-color:var(--blue)}.toolbar-right{display:flex;align-items:center;gap:8px}.search-field{height:40px;width:260px;border:1px solid #dde4ec;border-radius:8px;display:flex;align-items:center;padding:0 12px;gap:8px}.search-field input{border:0;outline:0;width:100%;font-size:14px}.generic-table{min-height:460px}.generic-table .record-table th{font-size:15px}.generic-table .record-table td{font-size:14px;text-align:left}.generic-table .record-table th{text-align:left}.generic-table td strong{display:block}.generic-table td small{display:block;color:var(--muted);margin-top:3px}.generic-context{padding-top:0}.context-copy{padding:18px 4px}.eyebrow{font-size:12px;color:var(--blue);font-weight:600;letter-spacing:.1em}.context-copy h3{font-size:24px;line-height:1.35;margin:10px 0}.context-copy>p{font-size:14px;color:var(--muted);line-height:1.75}.context-copy dl{margin:22px 0;border-top:1px solid var(--line)}.context-copy dl div{height:50px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-size:14px}.context-copy dt{color:var(--muted)}.context-copy dd{margin:0;font-weight:500}.context-note{padding:14px;background:#f7faff;border-left:3px solid var(--blue);margin-top:20px}.context-note p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.report-table{min-height:240px}

.modal-layer{position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center}.modal-layer.is-open{display:flex}.modal-backdrop{position:absolute;inset:0;border:0;background:rgba(15,23,42,.35)}.modal{position:relative;width:560px;background:#fff;border-radius:10px;box-shadow:0 24px 64px rgba(15,23,42,.22);overflow:hidden}.modal header,.modal footer{height:66px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.modal footer{border-top:1px solid var(--line);border-bottom:0;justify-content:flex-end;gap:10px}.modal h2{font-size:20px}.modal header button{border:0;background:transparent;font-size:26px;cursor:pointer}.form-grid{padding:22px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid label{display:grid;gap:7px}.form-grid label.wide{grid-column:1/-1}.form-grid label span{font-size:13px;color:var(--muted)}.form-grid input,.form-grid select{height:42px;border:1px solid #d8dee8;border-radius:7px;padding:0 11px;outline:0}.form-grid input:focus,.form-grid select:focus{border-color:var(--blue)}
.toast{position:fixed;left:50%;bottom:28px;z-index:80;transform:translate(-50%,20px);padding:11px 18px;border-radius:7px;background:#1f2937;color:#fff;font-size:14px;opacity:0;pointer-events:none;transition:.2s}.toast.is-visible{opacity:1;transform:translate(-50%,0)}

.sidebar.is-collapsed{width:84px}.admin-shell:has(.sidebar.is-collapsed){grid-template-columns:84px minmax(0,1fr)}.sidebar.is-collapsed .brand strong,.sidebar.is-collapsed .nav-item>span:last-child{display:none}.sidebar.is-collapsed .brand{justify-content:center}.sidebar.is-collapsed .nav-item{grid-template-columns:1fr}.sidebar.is-collapsed .collapse-button span{transform:rotate(180deg)}
.page.context-closed{grid-template-columns:minmax(0,1fr)}.page.context-closed .context-panel{display:none}

@media(max-width:1220px){
  .topbar-actions{gap:16px}.top-select:first-child{width:222px}.top-select.shift-select{width:250px}.top-select b{font-size:17px}
  .record-heading h1,.generic-heading h1{font-size:42px}.record-heading p{font-size:16px}.record-filters{gap:6px}.filter-chip{padding:0 11px}.summary-strip article{gap:9px}.nav-item{grid-template-columns:68px 1fr}.nav-item>span:last-child{font-size:18px}
}

@media(max-width:760px){
  html,body{min-width:0;background:#fff}.admin-shell{display:block;width:100%;height:100vh;max-height:none;aspect-ratio:auto;overflow:auto}.sidebar{position:sticky;width:100%;height:72px;flex-direction:row;border-right:0;border-bottom:1px solid #bdbdbd}.brand{width:190px;margin-left:12px}.brand-mark{width:40px}.brand strong{font-size:25px}.side-nav{margin-left:auto;width:auto;padding:0 8px 0 0;display:flex;gap:2px}.nav-item{width:52px;height:52px;margin:0;grid-template-columns:1fr}.nav-item>span:last-child{display:none}.nav-icon{transform:scale(.8)}.collapse-button{display:none}.workspace{height:calc(100vh - 72px)}.topbar{height:66px;padding:8px 14px}.topbar-actions{height:50px;width:100%;gap:8px}.top-select{height:48px;padding:0 10px}.top-select:first-child{width:auto;flex:1}.top-select.shift-select{width:auto;flex:1}.top-select b{font-size:13px}.top-select span{display:none}.avatar{width:34px;height:34px}.page-stage{height:calc(100vh - 138px)}.page{grid-template-columns:1fr}.page-main{padding:10px}.context-panel{position:fixed;z-index:30;inset:138px 0 0 12%;max-height:none;box-shadow:-18px 0 50px rgba(15,23,42,.16)}.record-heading,.generic-heading{min-height:92px;height:auto;align-items:center}.record-heading h1,.generic-heading h1{font-size:34px;line-height:46px}.record-heading p{display:none}.summary-strip{overflow-x:auto;grid-template-columns:repeat(4,170px);justify-content:start}.record-filters{overflow-x:auto}.record-table-wrap{overflow-x:auto}.record-table{min-width:760px}.record-table th,.record-table td{font-size:13px}.generic-heading>div p{display:none}.generic-heading .primary-button{height:38px}.modal{width:calc(100% - 28px)}
}
