* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #2f3542;
}
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.card {
  background: #fff; border-radius: 10px; padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 20px;
}
h1 { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 18px; margin-bottom: 12px; }
input, select, button {
  font-size: 14px; padding: 10px 12px; border-radius: 6px;
  border: 1px solid #dcdfe6; outline: none;
}
input, select { width: 100%; margin-bottom: 12px; }
button {
  background: #409eff; color: #fff; border: none; cursor: pointer;
  transition: .2s;
}
button:hover { background: #337ecc; }
button.danger { background: #f56c6c; }
button.danger:hover { background: #c45656; }
button.ghost { background: #fff; color: #409eff; border: 1px solid #409eff; }
button.ghost:hover { background: #ecf5ff; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row > button { flex: 0 0 auto; width: auto; }
.topbar {
  background: #fff; padding: 14px 20px; display: flex;
  justify-content: space-between; align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 20px;
  flex-wrap: wrap; gap: 10px;
}
.topbar .brand { font-weight: 600; font-size: 16px; }
.topbar .user { color: #606266; font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* ===== 表格自适应 ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ebeef5; white-space: nowrap; }
th { color: #909399; font-weight: 500; font-size: 13px; background: #fafafa; }
td.wrap { white-space: normal; word-break: break-all; max-width: 220px; }

/* 操作列固定在右侧 */
th.col-action, td.col-action {
  position: sticky; right: 0; background: #fff;
  box-shadow: -4px 0 6px -4px rgba(0,0,0,.1);
  z-index: 1;
}
th.col-action { background: #fafafa; z-index: 2; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag.admin { background: #fef0f0; color: #f56c6c; }
.tag.user { background: #ecf5ff; color: #409eff; }
.msg { font-size: 13px; margin-top: 8px; }
.msg.error { color: #f56c6c; }
.msg.ok { color: #67c23a; }
.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 360px; }

/* ===== 响应式：小屏适配 ===== */
@media (max-width: 768px) {
  .container { padding: 12px; }
  .card { padding: 16px; }
  .topbar { padding: 12px; }
  .row { flex-wrap: wrap; }
  .row > button { width: 100%; }
  h1 { font-size: 18px; }
  h2 { font-size: 16px; }
}