:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#17212b;background:#f4f7f8;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:0;background:#f4f7f8}button,input,select,textarea{font:inherit}
.hidden{display:none!important}.app{min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}
aside{position:fixed;inset:0 auto 0 0;width:224px;background:#102a35;color:#eef7f7;padding:24px 16px;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;padding:0 8px 26px}.brand img{width:42px;height:42px;background:#fff;border-radius:13px;padding:4px}
.brand div{display:grid}.brand strong{font-size:18px}.brand span{font-size:12px;color:#aac1c7;margin-top:3px;letter-spacing:.08em}
nav{display:grid;gap:6px}nav button{border:0;background:transparent;color:#b9cbd0;text-align:left;padding:11px 14px;border-radius:9px;cursor:pointer}
nav{overflow:auto;padding-right:2px}
nav button:hover,nav button.active{background:#1d4653;color:#fff}.aside-foot{margin-top:auto;padding:16px 10px 0;border-top:1px solid #294854;display:grid;gap:6px;font-size:13px}
.text-button{border:0;background:transparent;color:#8ec7c4;text-align:left;padding:0;cursor:pointer}
main{grid-column:2;padding:28px 32px 48px;max-width:1600px;width:100%}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
h1,h2,h3,p{margin-top:0}header h1{font-size:25px;margin-bottom:5px}header p{font-size:13px;color:#71808a;margin:0}
button{border:0;border-radius:8px;padding:9px 14px;cursor:pointer}.primary{background:#07857f;color:#fff}.primary:hover{background:#076f6a}
.secondary{background:#e7eef0;color:#2a3b44}.danger{background:#b63c3c;color:#fff}.icon-button{padding:2px 8px;font-size:24px;background:transparent;color:#61717a}
.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:16px}.toolbar .grow{flex:1}.toolbar input,.toolbar select{width:auto;min-width:160px}
input,select,textarea{width:100%;border:1px solid #d7e0e3;border-radius:8px;background:#fff;color:#17212b;padding:9px 11px;outline:none}
input:focus,select:focus,textarea:focus{border-color:#07857f;box-shadow:0 0 0 3px #07857f18}textarea{min-height:96px;resize:vertical}
label{display:grid;gap:6px;font-size:13px;color:#52636c}.cards{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:14px;margin-bottom:20px}
.card,.panel{background:#fff;border:1px solid #e1e8ea;border-radius:12px;box-shadow:0 2px 8px #16323f0a}
.card{padding:18px}.card span{display:block;color:#73828b;font-size:13px;margin-bottom:10px}.card strong{font-size:25px;font-weight:650}.panel{padding:19px;margin-bottom:18px}
.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.panel h2{font-size:16px;margin:0}.muted{color:#7a8991;font-size:12px}
.table-wrap{overflow:auto;border:1px solid #e1e8ea;border-radius:10px;background:#fff}table{width:100%;border-collapse:collapse;font-size:13px}
th,td{text-align:left;padding:12px 14px;border-bottom:1px solid #edf1f2;white-space:nowrap}th{background:#f7f9fa;color:#60717a;font-weight:600}
tbody tr:last-child td{border-bottom:0}tbody tr.clickable:hover{background:#f4fbfa;cursor:pointer}.badge{display:inline-block;padding:3px 8px;border-radius:999px;background:#e9eff1;color:#50636c;font-size:11px}
.badge.good{background:#e2f4ee;color:#087354}.badge.warn{background:#fff0d6;color:#96620d}.badge.bad{background:#fbe4e4;color:#a43232}
.pager{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:14px;font-size:13px;color:#667780}
.empty,.loading,.error-state{padding:54px;text-align:center;color:#71808a;background:#fff;border:1px solid #e1e8ea;border-radius:12px}
.error-state{color:#a13a3a}.notice{padding:10px 14px;border-radius:8px;background:#e4f4ef;color:#096c57;margin-bottom:16px;font-size:13px}
.notice.error{background:#fbe8e8;color:#a43838}.chart{height:210px;display:flex;align-items:flex-end;gap:12px;padding:20px 10px 0;border-bottom:1px solid #dbe4e6}
.bar-group{height:100%;flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px}.bar{width:min(44px,65%);min-height:3px;background:linear-gradient(#2a9e98,#08736e);border-radius:6px 6px 2px 2px}.bar-group span{font-size:11px;color:#71808a}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.detail-item{padding:12px;background:#f6f8f9;border-radius:8px}.detail-item span{display:block;font-size:11px;color:#7b8990;margin-bottom:6px}.detail-item strong{font-size:13px;word-break:break-word}
dialog{border:0;border-radius:14px;padding:0;box-shadow:0 28px 80px #0b1f2838;max-width:900px;width:min(900px,88vw)}dialog::backdrop{background:#102a3566}
.modal-shell{padding:0}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid #e5ebed}.modal-head h2{font-size:18px;margin:0}
#modal-body{padding:22px;max-height:75vh;overflow:auto}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid .full{grid-column:1/-1}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.confirm-shell{padding:24px}.confirm-shell h2{font-size:18px}.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 50% 20%,#e5f4f3,#f4f7f8 48%)}
.login-card{width:390px;background:#fff;border:1px solid #dde6e8;border-radius:16px;padding:30px;box-shadow:0 16px 50px #15323f18;display:grid;gap:16px}
.brand-large{padding:0}.login-card h1{font-size:23px;margin:8px 0 -8px}.login-card p{font-size:13px;color:#71808a}.form-error{min-height:18px;color:#aa3838;font-size:12px}
@media(max-width:1200px){.cards{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.detail-grid{grid-template-columns:repeat(2,1fr)}}
.check-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:10px}.check-grid input{width:auto}.wrap-cell{white-space:normal;line-height:1.6;display:block;min-width:320px}.audit-json{white-space:pre-wrap;word-break:break-word;background:#f6f8f9;padding:14px;border-radius:8px;font-size:12px}

button:disabled{opacity:.5;cursor:default}.test-presets{flex-wrap:wrap;gap:6px}.test-presets button{padding:6px 9px;font-size:12px}#test-result{margin-top:14px;line-height:1.7}
.technical{display:inline-block;margin:4px 0;font-size:11px;color:var(--muted,#6f7873);max-width:100%}
.technical summary{cursor:pointer}
.technical code{display:block;white-space:normal;overflow-wrap:anywhere;padding:4px;background:#f3f5f3;border-radius:4px}
#confirm-message{white-space:pre-wrap;line-height:1.7}
#confirm-reason{width:100%;margin-top:8px}
@media(max-width:800px){
 body{min-width:0}.app{display:block}aside{position:static;width:auto;padding:16px;gap:12px}
 .brand{padding-bottom:8px}nav{display:flex;flex-wrap:wrap;gap:4px;max-height:180px}
 nav button{padding:10px 12px;min-height:44px}.aside-foot{margin-top:0;padding-top:10px}
 main{padding:20px 14px;width:100%;min-width:0}header,.panel-head,.toolbar{flex-wrap:wrap;gap:10px}
 .toolbar input,.toolbar select{min-width:0;max-width:100%;width:100%}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .card{min-width:0;padding:14px}.card strong{font-size:21px;overflow-wrap:anywhere}.panel{padding:14px;min-width:0}
 .login-page{padding:18px;min-height:100dvh}.login-card{width:100%;max-width:420px;padding:24px}
 .modal,.dialog{max-width:calc(100vw - 24px)}.empty,.loading,.error-state{padding:30px 16px}
}

/* Keep one Admin surface: tables scroll inside their panels, navigation collapses on phones. */
main,.panel,.table-wrap,.form-grid>*{min-width:0;max-width:100%}.mobile-only{display:none}.actions,.toolbar{flex-wrap:wrap}.audit-json{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.login-card input{max-width:100%;min-width:0}#mfa-key{font-family:monospace;font-size:13px}#mfa-code{letter-spacing:.3em;font-variant-numeric:tabular-nums}#mfa-cancel{width:100%;margin-top:10px}
@media(max-width:800px){.mobile-only{display:block}.app:not(.nav-open) #nav,.app:not(.nav-open) .aside-foot{display:none}.brand{padding-bottom:0}.brand div{flex:1}.aside-foot button{min-height:44px}.actions button{min-height:44px}.table-wrap{max-width:100%}dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}header{align-items:flex-start}header h1{overflow-wrap:anywhere}}
@media(max-width:540px){.form-grid,.detail-grid{grid-template-columns:minmax(0,1fr)}.form-grid .full{grid-column:1}.login-card{padding:22px 18px}.cards{gap:10px}#modal-body{padding:16px}.confirm-shell{padding:18px}input,select,textarea{min-width:0;max-width:100%}}
