* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #1f2329;
  font-size: 14px;
}

/* 登录页 */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1b1924, #2d2438);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: #fff; border-radius: 16px; padding: 30px 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.login-card h2 { margin: 0 0 6px; font-size: 20px; color: #1f2329; }
.login-card p { margin: 0 0 18px; color: #646a73; font-size: 13px; }

/* 主布局 */
.admin-shell { max-width: 1320px; margin: 0 auto; padding: 18px 20px 40px; }
.admin-header {
  background: linear-gradient(135deg, #1f1c2b, #382b1e);
  color: #f6ead4;
  border-radius: 16px;
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.admin-header h1 { margin: 0; font-size: 20px; color: #eccd8f; }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* 标签页 */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-btn {
  padding: 9px 16px; border-radius: 10px; border: 1px solid #dcdfe6;
  background: #fff; color: #4e5969; font-weight: 600; cursor: pointer;
}
.tab-btn.active { background: #262133; color: #eccd8f; border-color: #262133; }
.panel { display: none; }
.panel.active { display: block; }

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: #fff; border-radius: 12px; padding: 16px;
  border: 1px solid #ebeef5; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.stat-label { color: #646a73; font-size: 12.5px; }
.stat-value { font-size: 26px; font-weight: 800; color: #1f2329; margin-top: 6px; }

/* 卡片与表格 */
.card {
  background: #fff; border-radius: 14px; padding: 18px;
  border: 1px solid #ebeef5; box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  margin-bottom: 16px;
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.input, .select, .textarea {
  padding: 8px 12px; border: 1px solid #dcdfe6; border-radius: 8px;
  font-size: 13.5px; outline: none; background: #fff;
}
.input:focus, .select:focus, .textarea:focus { border-color: #9a6e2f; }
.btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid #dcdfe6;
  background: #fff; color: #1f2329; cursor: pointer; font-weight: 600; font-size: 13px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.btn-primary { background: #262133; color: #eccd8f; border-color: #262133; }
.btn-gold { background: #b5853b; color: #fff; border-color: #b5853b; }
.btn-danger { background: #fff1f0; color: #cf1322; border-color: #ffa39e; }
.btn-sm { padding: 4px 9px; font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid #f0f2f5; text-align: left; }
th { background: #fafafa; color: #646a73; font-weight: 600; white-space: nowrap; }
.badge { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-green { background: #e8f8f0; color: #1f8a52; }
.badge-gold { background: #fdf5e6; color: #a67123; }
.badge-gray { background: #f2f3f5; color: #646a73; }
.badge-red { background: #fff1f0; color: #cf1322; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; color: #4e5969; font-weight: 600; }

.toast {
  position: fixed; top: 20px; right: 20px;
  background: #262133; color: #eccd8f; padding: 10px 18px;
  border-radius: 10px; z-index: 999; display: none; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { display: block; }
