*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{margin:0;background:#f3f5f8;color:#182230;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,"Microsoft YaHei",sans-serif;line-height:1.55}
a{color:inherit}
.admin-shell{min-height:100vh;display:flex}
.sidebar{position:fixed;z-index:40;left:0;top:0;bottom:0;width:248px;background:#121a26;color:#cbd5e1;display:flex;flex-direction:column;box-shadow:8px 0 24px rgba(15,23,42,.08)}
.brand{height:78px;display:flex;align-items:center;gap:12px;padding:0 20px;border-bottom:1px solid rgba(255,255,255,.07)}
.brand-mark{width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:#fff;color:#121a26;display:grid;place-items:center;font-weight:800;font-size:13px}
.brand strong{display:block;font-size:13px;letter-spacing:.08em;color:#fff;white-space:nowrap}
.brand small{display:block;margin-top:4px;color:#8290a4;font-size:11px;letter-spacing:.04em}
.side-nav{padding:18px 12px;display:flex;flex-direction:column;gap:8px}
.nav-item{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 15px;border-radius:10px;color:#aeb9c8;text-decoration:none;font-size:14px;line-height:1.2;white-space:nowrap;transition:background .15s,color .15s}
.nav-item:hover{background:#1c2736;color:#fff}.nav-item.active{background:#2a3545;color:#fff}
.nav-icon{width:22px;flex:0 0 22px;text-align:center;font-size:17px;color:#93a4ba}.nav-item.active .nav-icon{color:#fff}
.nav-label{display:block;letter-spacing:.03em}
.sidebar-bottom{margin-top:auto;padding:14px 12px;border-top:1px solid rgba(255,255,255,.07)}
.server-state{display:flex;align-items:center;gap:9px;padding:10px 14px;color:#8fa0b5;font-size:12px}.server-state i{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.12)}
.main-shell{width:calc(100% - 248px);margin-left:248px;min-height:100vh}.topbar{height:68px;background:#fff;border-bottom:1px solid #e7ebf0;display:flex;align-items:center;padding:0 28px;gap:18px;position:sticky;top:0;z-index:20}
.crumb{display:flex;align-items:center;gap:10px;font-size:14px;min-width:0}.crumb span{color:#8b97a8;font-size:12px;letter-spacing:.07em}.crumb b{color:#c1c8d1;font-weight:400}.crumb strong{color:#1d2939;white-space:nowrap}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:14px;font-size:13px}.top-actions a{color:#526173;text-decoration:none;white-space:nowrap}.admin-user{padding:7px 11px;background:#f2f4f7;border-radius:8px;color:#526173;white-space:nowrap}
/* 关键：移动端菜单按钮必须覆盖全局 button 样式，避免变成整条黑色横条 */
.menu-btn{display:none!important;width:42px!important;height:42px!important;min-height:42px!important;flex:0 0 42px!important;padding:0!important;border:1px solid #e0e5eb!important;border-radius:10px!important;background:#fff!important;color:#263345!important;box-shadow:0 2px 8px rgba(15,23,42,.06);font-size:22px!important;line-height:1!important;cursor:pointer}
.page{padding:28px;max-width:1500px;margin:0 auto}.footer{padding:18px 28px 28px;color:#94a0af;font-size:12px}
.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-bottom:22px}.page-title h1{margin:0;font-size:25px;line-height:1.25;letter-spacing:.02em}.page-title p{margin:7px 0 0;color:#7b8797;font-size:13px;line-height:1.7}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.stat{padding:20px;background:#fff;border:1px solid #e4e9ef;border-radius:12px;box-shadow:0 3px 12px rgba(15,23,42,.03)}.stat small{color:#7d8999;font-size:13px}.stat strong{display:block;font-size:30px;line-height:1.15;margin-top:8px}.stat .stat-sub{display:block;margin-top:8px;color:#a0aab7;font-size:12px}
.card{background:#fff;border:1px solid #e4e9ef;border-radius:12px;padding:22px;margin-bottom:18px;box-shadow:0 3px 12px rgba(15,23,42,.03)}.card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.card h2{font-size:17px;margin:0;line-height:1.35}.card-head p{margin:5px 0 0;color:#8995a5;font-size:12px;line-height:1.7}
.formgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.formgrid .wide{grid-column:1/-1}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d6dce5;border-radius:8px;background:#fff;color:#182230;font:inherit;outline:none;line-height:1.45}input:focus,select:focus,textarea:focus{border-color:#8492a6;box-shadow:0 0 0 3px rgba(84,101,122,.1)}textarea{min-height:90px;resize:vertical}
button,.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:9px 14px;border:0;border-radius:8px;background:#1b2430;color:#fff;cursor:pointer;text-decoration:none;font:inherit;font-size:13px;line-height:1.3;white-space:nowrap}button:hover,.btn:hover{opacity:.9}.btn.gray{background:#697586}.btn.red{background:#b42318}.btn.green{background:#067647}.btn.light{background:#eef1f5;color:#344054}.btn.blue{background:#344054}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.table-wrap{overflow:auto;border:1px solid #edf0f4;border-radius:9px}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:12px 11px;border-bottom:1px solid #edf0f4;white-space:nowrap;font-size:13px;line-height:1.45}th{font-size:12px;color:#778396;background:#fafbfc}tr:last-child td{border-bottom:0}
.muted,.note{color:#7f8b9c;font-size:12px}.alert{padding:12px 14px;border-radius:9px;margin-bottom:14px;font-size:13px;line-height:1.7}.success{background:#ecfdf3;color:#067647}.error{background:#fef3f2;color:#b42318}.badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;background:#edf0f4;color:#596579}.badge.ok{background:#dcfae6;color:#067647}.badge.off{background:#fee4e2;color:#b42318}.badge.warn{background:#fff1cc;color:#9a6700}
.login{max-width:430px;margin:10vh auto}.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
/* 强制把快捷入口的标题、说明拆成独立两行，避免中文粘连 */
.quick{display:block;padding:17px;border:1px solid #e4e9ef;border-radius:10px;text-decoration:none;color:#263345;background:#fff;min-height:104px}.quick-title{display:block!important;font-size:14px;font-weight:700;line-height:1.5;letter-spacing:.03em}.quick-desc{display:block!important;margin-top:9px;color:#8a95a4;font-size:12px;line-height:1.7;word-break:break-word}
.empty{padding:30px;text-align:center;color:#8995a5}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.toolbar .search{display:flex;gap:8px;min-width:280px}.toolbar .search input{min-width:240px}.checkline{display:flex;align-items:center;gap:7px;color:#586579;font-size:13px}.checkline input{width:auto}.modal-note{font-size:12px;color:#7f8b9c}.pagination{display:flex;gap:7px;align-items:center;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 10px;border:1px solid #e0e5eb;border-radius:8px;text-decoration:none;font-size:12px;background:#fff;color:#526173}.pagination .current{background:#1b2430;color:#fff;border-color:#1b2430}.filter-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.filter-row select{width:auto;min-width:120px}.code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.03em}
@media(max-width:1100px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-grid{grid-template-columns:repeat(2,1fr)}.page{padding:20px}.topbar{padding:0 20px}}
@media(max-width:900px){
  .sidebar{transform:translateX(-110%)!important;transition:transform .2s ease;box-shadow:12px 0 28px rgba(15,23,42,.2)}
  body.sidebar-open .sidebar{transform:translateX(0)!important}
  body.sidebar-open:after{content:"";position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:25}
  .main-shell{width:100%;margin-left:0}.menu-btn{display:inline-flex!important}.topbar{height:62px;padding:0 15px}.admin-user{display:none}.top-actions{gap:8px}.page{padding:16px}.crumb{min-width:0}.crumb span{display:none}.sidebar-bottom{padding-bottom:18px}
}
@media(max-width:680px){html{font-size:16px}.grid,.quick-grid,.formgrid{grid-template-columns:1fr}.page-title{align-items:flex-start;flex-direction:column}.page-title h1{font-size:22px}.card{padding:16px}.toolbar .search{width:100%;min-width:0}.toolbar .search input{min-width:0;flex:1}.top-actions a{display:none}.footer{padding:14px 16px 22px}.stat strong{font-size:27px}.quick{min-height:0;padding:16px}.quick-title{font-size:15px}.quick-desc{font-size:13px;margin-top:8px}.table-wrap{margin-left:-2px;margin-right:-2px}.formgrid .wide{grid-column:auto}}
