/* 只做可读性，不做视觉设计（按需求：忽略 UI 设计，只保证功能可用） */
*{box-sizing:border-box}
body{margin:0;font:14px/1.5 -apple-system,"Segoe UI","Microsoft YaHei",sans-serif;color:#1b1f24;background:#fafbfc}
h1,h2,h3,h4{margin:0 0 8px}
h1{font-size:20px}h2{font-size:16px}h3{font-size:15px}h4{font-size:14px}
.muted{color:#6b7280}
.hidden{display:none!important}
button{font:inherit;padding:5px 10px;border:1px solid #cfd4da;background:#fff;border-radius:4px;cursor:pointer}
button:hover{background:#f2f4f6}
button.primary{background:#2f6bff;border-color:#2f6bff;color:#fff}
button.primary:hover{background:#255ae0}
button.danger{color:#c0272d;border-color:#e7b7b9}
button.link{border:0;background:none;color:#2f6bff;padding:0 4px}
input,select,textarea{font:inherit;padding:4px 6px;border:1px solid #cfd4da;border-radius:4px;background:#fff}
input[type=number]{width:90px}
textarea{width:100%}
label{display:inline-flex;gap:4px;align-items:center}

.gate{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#f0f2f5}
.gate-box{background:#fff;padding:24px;border-radius:8px;min-width:300px;border:1px solid #e3e6ea}
.gate-box input{width:100%;margin-bottom:8px}
.gate-box button{width:100%}

.topbar{display:flex;gap:12px;align-items:center;padding:10px 16px;background:#fff;border-bottom:1px solid #e3e6ea}
.topbar strong{font-size:15px}
.tabs{display:flex;flex-wrap:wrap;gap:4px;padding:8px 16px;background:#fff;border-bottom:1px solid #e3e6ea}
.tabs button{border-color:transparent;background:none}
.tabs button.active{background:#eef2ff;border-color:#c7d5ff;color:#1d4ed8;font-weight:600}

main{padding:16px;max-width:1200px}
section{margin-bottom:24px}
.card{background:#fff;border:1px solid #e3e6ea;border-radius:6px;padding:12px;margin-bottom:12px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.kv{border:1px solid #e3e6ea;border-radius:6px;padding:8px 10px;background:#fff}
.kv .k{font-size:12px;color:#6b7280}
.kv .v{font-size:18px;font-weight:600}

table{border-collapse:collapse;width:100%;background:#fff;font-size:13px}
th,td{border:1px solid #e3e6ea;padding:5px 8px;text-align:left;vertical-align:top}
th{background:#f6f7f9;font-weight:600;white-space:nowrap}
td.num,th.num{text-align:right}
tr.clickable{cursor:pointer}
tr.clickable:hover{background:#f6f8ff}
.tag{display:inline-block;padding:0 6px;border-radius:3px;font-size:12px;border:1px solid #d6dae0;background:#f6f7f9}
.tag.red{background:#fdecec;border-color:#f2c2c4;color:#b3282d}
.tag.amber{background:#fff5e5;border-color:#f3d8a8;color:#8a5a00}
.tag.blue{background:#eef2ff;border-color:#c7d5ff;color:#1d4ed8}
.tag.green{background:#eaf7ee;border-color:#bfe3cb;color:#1f6b3a}

.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:8px}
.rows-table input,.rows-table select{width:100%}
.rows-table td{padding:3px}
.msg{padding:6px 10px;border-radius:4px;margin:8px 0;font-size:13px}
.msg.err{background:#fdecec;border:1px solid #f2c2c4;color:#a3242a}
.msg.ok{background:#eaf7ee;border:1px solid #bfe3cb;color:#1f6b3a}
.subtabs{display:flex;gap:4px;margin-bottom:10px;flex-wrap:wrap}
.subtabs button.active{background:#eef2ff;border-color:#c7d5ff;color:#1d4ed8;font-weight:600}
details{margin:6px 0}
summary{cursor:pointer;color:#2f6bff}

#toast{position:fixed;top:12px;right:12px;z-index:50;max-width:400px}
#toast .msg{box-shadow:0 2px 10px rgba(0,0,0,.12);margin:0 0 6px}
