/* 全局样式 v0.2.5 */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #2c3e50;
  font-size: 14px;
  line-height: 1.6;
}

/* 顶部 */
header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
header h1 {
  font-size: 17px;
  font-weight: 600;
}
header nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
header nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s;
}
header nav a:hover { background: rgba(255,255,255,0.1); color: white; }
header nav a.active { background: rgba(255,255,255,0.2); color: white; }

header .actions { display: flex; gap: 8px; align-items: center; }
header button.logout {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
header button.logout:hover { background: rgba(255,255,255,0.25); }

.container {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 16px;
}

/* 卡片 */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 15px;
  color: #1e3c72;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 按钮 */
.btn {
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: #2a5298; color: white; }
.btn-primary:hover { background: #1e3c72; }
.btn-success { background: #1a7e3e; color: white; }
.btn-success:hover { background: #156631; }
.btn-danger { background: #b32424; color: white; }
.btn-danger:hover { background: #911818; }
.btn-warning { background: #a06a00; color: white; }
.btn-warning:hover { background: #7e5400; }
.btn-secondary { background: #e8eaed; color: #333; }
.btn-secondary:hover { background: #d0d4da; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { background: #ccc !important; cursor: not-allowed; }

/* 表单 */
input[type="text"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d5dae0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: border 0.15s;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus,
textarea:focus, select:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 2px rgba(42,82,152,0.1);
}
textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}
label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: #f8f9fb;
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  border-bottom: 1px solid #eef0f3;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
  vertical-align: middle;
}
tbody tr:hover { background: #f8f9fb; }
td input[type="text"], td input[type="number"] {
  padding: 5px 8px;
  font-size: 13px;
}

/* 提示 */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 6px;
  background: #1a7e3e;
  color: white;
  font-size: 13px;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideDown 0.2s;
}
.toast.error { background: #b32424; }
.toast.warning { background: #a06a00; }
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 帮助文字 */
.help {
  color: #888;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}
.help code {
  background: #eef0f3;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  color: #c7254e;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

/* 行内动作按钮组 */
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: #eef0f3;
  color: #555;
}
.tag-primary { background: #e3edff; color: #2a5298; }
.tag-success { background: #d4f4dd; color: #1a7e3e; }
.tag-danger { background: #fadcdc; color: #b32424; }
