*{box-sizing:border-box}
:root{--brand:#4f7cff;--brand2:#7a5cff;--text:#1e2433;--muted:#6f7891;--line:#eceff7;--danger:#f04438;--ok:#12b76a}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:#f5f7fc;color:var(--text);-webkit-font-smoothing:antialiased}
button,input,select{font-family:inherit}
a{color:inherit;text-decoration:none}
[hidden]{display:none!important}
.muted{color:var(--muted);font-size:13px}

/* 登录 */
.login-wrap{min-height:100vh;display:grid;place-items:center;position:relative;overflow:hidden;background:#eef2fb}
.login-bg{position:absolute;inset:0}
.login-bg i{position:absolute;border-radius:50%;filter:blur(90px);opacity:.6}
.login-bg i:nth-child(1){width:520px;height:520px;background:#a9c1ff;top:-160px;left:-120px}
.login-bg i:nth-child(2){width:480px;height:480px;background:#d2c2ff;bottom:-180px;right:-120px}
.login-bg i:nth-child(3){width:360px;height:360px;background:#b9e8ff;top:35%;left:52%}
.login-card{position:relative;background:#fff;border-radius:22px;padding:34px 34px 24px;width:min(400px,92vw);box-shadow:0 24px 70px rgba(20,26,40,.15)}
.login-logo{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;font-size:30px;color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand2));margin:0 auto 14px;box-shadow:0 12px 26px rgba(79,124,255,.35)}
.login-card h1{font-size:19px;text-align:center;margin:0 0 6px}
.login-card p{text-align:center;margin:0 0 20px}
.login-card label{display:block;font-size:12.5px;color:#606a82;margin-bottom:13px}
.login-card input,.cap-row input{width:100%;margin-top:6px;padding:11px 13px;border:1px solid var(--line);border-radius:11px;font-size:13.5px;outline:0;background:#fbfcff;color:var(--text)}
.login-card input:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(79,124,255,.1);background:#fff}
.cap-row{display:flex;gap:10px;margin-bottom:16px}
.cap-row input{margin-top:0;flex:1}
.cap-row img{width:120px;height:42px;border-radius:9px;border:1px solid var(--line);cursor:pointer;object-fit:cover}
.login-foot{text-align:center;font-size:12px;color:#9aa3b5;margin-top:14px}
.login-foot a:hover{color:var(--brand)}

/* 布局 */
.layout{display:flex;min-height:100vh}
.side{width:224px;flex:0 0 224px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:18px 14px;position:sticky;top:0;height:100vh}
.side-brand{display:flex;align-items:center;gap:10px;padding:6px 8px 22px;font-size:15px}
.side-brand .lg{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;font-size:18px}
.menu{display:flex;flex-direction:column;gap:3px}
.menu a{display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:10px;font-size:13.5px;color:#4a5470;cursor:pointer}
.menu a:hover{background:#f4f6fc}
.menu a.active{background:linear-gradient(135deg,rgba(79,124,255,.12),rgba(122,92,255,.1));color:var(--brand);font-weight:600}
.menu a span{width:18px;text-align:center}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;font-size:12.5px;color:#8b93a7;padding:0 8px}
.side-foot button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px;cursor:pointer;color:#4a5470;font-size:12.5px}
.side-foot button:hover{border-color:#ffd0cb;color:var(--danger)}

.content{flex:1;min-width:0;padding:20px 26px 40px}
.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.top h2{margin:0;font-size:19px}
.pill{background:#fff;border:1px solid var(--line);border-radius:99px;padding:6px 14px;font-size:12.5px;color:#4a5470}
.page{display:none;animation:fade .2s ease}
.page.active{display:block}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-bottom:16px}
.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px;box-shadow:0 8px 24px rgba(31,41,55,.03)}
.stat .t{font-size:12.5px;color:var(--muted);margin-bottom:8px}
.stat .v{font-size:23px;font-weight:700;letter-spacing:.3px}
.stat .s{font-size:11.5px;color:#9aa3b5;margin-top:6px}

.panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px 22px;margin-bottom:16px;box-shadow:0 8px 24px rgba(31,41,55,.03)}
.panel h3{margin:0 0 16px;font-size:14.5px}
.panel-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.panel-head input{padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:13px;outline:0;width:220px}
.panel-head input:focus{border-color:var(--brand)}
.spacer{flex:1}

.chart{display:flex;align-items:flex-end;gap:14px;height:160px;padding-top:10px}
.chart .col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:6px}
.chart .bar{width:100%;max-width:46px;border-radius:8px 8px 4px 4px;background:linear-gradient(180deg,var(--brand),var(--brand2));min-height:4px;transition:height .5s}
.chart .lab{font-size:11px;color:#9aa3b5}
.chart .val{font-size:11.5px;color:var(--brand);font-weight:600}

.tbl{width:100%;border-collapse:collapse;font-size:13px}
.tbl th{text-align:left;font-weight:600;color:#7b8499;font-size:12.5px;padding:11px 12px;background:#fafbfe;border-bottom:1px solid var(--line)}
.tbl td{padding:11px 12px;border-bottom:1px solid #f3f5fa;vertical-align:middle}
.tbl tr:hover td{background:#f9fbff}
.tbl .act{display:flex;gap:6px;justify-content:flex-end}
.tag{display:inline-block;font-size:11.5px;padding:2px 9px;border-radius:99px;background:#eef2ff;color:var(--brand)}
.tag.off{background:#fff0ef;color:var(--danger)}
.tag.g{background:#e9f9f1;color:var(--ok)}

.btn{border:0;border-radius:10px;padding:0 16px;height:36px;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:.18s}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;box-shadow:0 8px 18px rgba(79,124,255,.25)}
.btn.primary:hover{transform:translateY(-1px)}
.btn.ghost{background:#f4f6fc;color:#4a5470}
.btn.ghost:hover{background:#eaeefe}
.btn.sm{height:30px;padding:0 12px;font-size:12.5px;border-radius:8px}
.btn.danger{background:#fff0ef;color:var(--danger)}
.btn.block{width:100%;height:44px}
.btn:disabled{opacity:.6;cursor:not-allowed}

.pager{display:flex;gap:8px;justify-content:flex-end;align-items:center;margin-top:14px;font-size:12.5px;color:var(--muted)}
.pager button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:5px 11px;cursor:pointer;font-size:12.5px}
.pager button:disabled{opacity:.45;cursor:not-allowed}

.kv{list-style:none;padding:0;margin:0;font-size:13px}
.kv li{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px dashed #eef1f8;color:var(--muted)}
.kv li:last-child{border:0}
.kv li b{color:var(--text);font-weight:600}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid label{font-size:12.5px;color:#606a82}
.form-grid input,.form-grid select{width:100%;margin-top:6px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:13.5px;outline:0;background:#fbfcff;color:var(--text)}
.form-grid input:focus,.form-grid select:focus{border-color:var(--brand);box-shadow:0 0 0 4px rgba(79,124,255,.1)}
.form-grid .full{grid-column:1/-1}
.form-grid .switch{display:flex;align-items:center;gap:9px}
.form-grid .switch input{width:16px;height:16px;margin:0;accent-color:var(--brand)}

.toast-wrap{position:fixed;top:18px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:90}
.toast{background:#1f2937;color:#fff;font-size:13px;padding:10px 18px;border-radius:10px;box-shadow:0 10px 26px rgba(0,0,0,.2)}
.toast.err{background:#c4321f}
.toast.ok{background:#0f9d58}

@media (max-width:900px){
  .side{position:fixed;left:0;top:0;bottom:0;z-index:40;transform:translateX(-100%);transition:.25s}
  .content{padding:14px}
  .form-grid{grid-template-columns:1fr}
  .tbl{font-size:12px}
}
