* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font: 14px/1.5 "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; background: #f3f5f7; }
button, input, select, textarea { font: inherit; }
a { color: #1a9b4a; text-decoration: none; }
button { cursor: pointer; }

.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; background: #eef2f5; }
.login-box { width: 420px; max-width: calc(100% - 32px); background: #fff; border: 1px solid #e5e8eb; border-radius: 4px; padding: 28px 32px 32px; }
.login-box h1 { margin: 0 0 22px; text-align: center; font-size: 22px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; color: #666; }
.field input, .field select, .field textarea { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d9dfe5; border-radius: 2px; }
.field textarea { height: 120px; padding: 8px 10px; }
.btn { height: 34px; padding: 0 14px; border: 1px solid #d0d5db; background: #fff; border-radius: 2px; }
.btn.primary { background: #1a9b4a; border-color: #1a9b4a; color: #fff; }
.btn.danger { background: #e85d4c; border-color: #e85d4c; color: #fff; }
.btn.block { width: 100%; height: 44px; font-size: 16px; }
.hint { margin-top: 12px; color: #888; font-size: 12px; }
.err { color: #d93025; min-height: 20px; margin: 0 0 8px; }

.layout { display: flex; min-height: 100%; }
.side { width: 210px; background: #2f3b49; color: #c5ced6; flex-shrink: 0; }
.logo { height: 54px; line-height: 54px; text-align: center; background: #26313c; }
.logo a { color: #fff; font-size: 16px; font-weight: 600; }
.menu a { display: block; color: inherit; padding: 11px 18px; }
.menu .head { display: flex; justify-content: space-between; }
.menu li { list-style: none; }
.menu ul { margin: 0; padding: 0; }
.menu .sub a { padding-left: 42px; font-size: 13px; }
.menu .on, .menu a:hover { background: #24303b; color: #fff; }
.menu .sub .on { color: #7dcea0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 48px; background: #364656; color: #fff; display: flex; align-items: center; justify-content: flex-end; padding: 0 16px; gap: 16px; }
.top a, .top button { color: #fff; background: none; border: 0; }
.nav-btn { display: none; margin-right: auto; }
.body { padding: 16px; }
.card { background: #fff; border: 1px solid #e6eaee; padding: 16px; margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat b { display: block; font-size: 22px; margin-top: 6px; }
.title { margin: 0 0 12px; font-size: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { height: 32px; border: 1px solid #d9dfe5; padding: 0 8px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border: 1px solid #e6eaee; padding: 8px; text-align: left; white-space: nowrap; }
th { background: #f7f9fb; font-weight: 600; }
.table-wrap { overflow: auto; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 640px; max-width: 100%; max-height: 86vh; overflow: auto; background: #fff; padding: 16px 18px 18px; }
.dialog h3 { margin: 0 0 12px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 8px 14px; border-radius: 2px; z-index: 20; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tabs button.on { background: #1a9b4a; color: #fff; border-color: #1a9b4a; }
.secret { word-break: break-all; white-space: normal; font-family: Consolas, monospace; }

@media (max-width: 800px) {
  .nav-btn { display: inline-block; }
  .side { position: fixed; z-index: 5; top: 0; bottom: 0; left: 0; transform: translateX(-100%); }
  .side.open { transform: none; }
  .cards { grid-template-columns: 1fr; }
}
