/* 全站统一样式：简洁、响应式，无需任何外部依赖 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* 顶部导航 */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.navbar .brand { font-size: 18px; font-weight: 700; color: var(--text); }
.navbar .brand a { color: inherit; text-decoration: none; }
.navbar .nav-right { display: flex; align-items: center; gap: 16px; }
.navbar .user-info { color: var(--text-muted); font-size: 14px; }
.badge-role {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* 页面标题区 */
.page-header { padding: 28px 0 18px; }
.page-header h1 { font-size: 24px; font-weight: 700; }
.page-header .subtitle { color: var(--text-muted); margin-top: 4px; }
.major-banner {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  box-shadow: var(--shadow);
}
.major-banner .label { opacity: 0.85; font-size: 14px; }
.major-banner .value { font-weight: 700; }

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card .thumb {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 40px;
}
.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card .body h3 { font-size: 17px; }
.card .desc { color: var(--text-muted); font-size: 14px; flex: 1; }
.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.card .footer { padding: 0 16px 16px; }

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.stat-card .label { color: var(--text-muted); font-size: 14px; }
.stat-card .value { font-size: 32px; font-weight: 700; margin-top: 6px; color: var(--primary); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }

/* 表单 */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.form-group .hint { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  transition: border 0.15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* 表格 */
.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--bg); color: var(--text-muted); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.tag-success { background: var(--success-light); color: #15803d; }
.tag-muted { background: #f1f5f9; color: var(--text-muted); }

/* 进度条 */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.progress-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 20px; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty .icon { font-size: 48px; margin-bottom: 10px; }

/* 登录页 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  width: 100%;
  max-width: 380px;
}
.auth-card h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }
.auth-card .demo { margin-top: 18px; padding: 12px; background: var(--bg); border-radius: 8px; font-size: 13px; color: var(--text-muted); }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* 视频播放器 */
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.player-wrap video { width: 100%; display: block; max-height: 70vh; background: #000; }
.player-status { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }

/* 弹窗（修改密码 / 重置密码等通用） */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.modal-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}
.modal-head {
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.modal-body { padding: 20px; }
.modal-body .modal-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.modal-body .form-group:last-child { margin-bottom: 0; }
.modal-foot {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* 响应式 */
@media (max-width: 640px) {
  .navbar .user-info { display: none; }
  .page-header h1 { font-size: 20px; }
  .card-grid { grid-template-columns: 1fr; }
  th, td { padding: 10px 12px; font-size: 13px; }
}
