/* ===== 变量定义 ===== */
:root {
  --primary: #8B4513;
  --primary-light: #A0522D;
  --secondary: #D4A574;
  --accent: #E85D04;
  --bg-dark: #1A1A2E;
  --bg-light: #F5F0EB;
  --text-dark: #2D2D2D;
  --text-light: #F5F5F5;
  --success: #52B788;
  --error: #E63946;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.25);
  --transition: all 0.3s ease;
}

/* ===== 重置样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Noto Serif SC', serif;
}

/* ===== 登录页面 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #16213E 50%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 50px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-hover);
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-logo .logo-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
}

.login-logo .logo-icon svg {
  width: 48px;
  height: 48px;
  fill: white;
}

.login-logo h1 {
  font-size: 2.5rem;
  color: var(--primary);
  letter-spacing: 8px;
  margin-bottom: 8px;
}

.login-logo p {
  color: #888;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.1);
}

.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 2px solid #E8E8E8;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: #D32F3F;
}

.login-error {
  background: rgba(230, 57, 70, 0.1);
  color: var(--error);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* ===== 主布局 ===== */
.main-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边导航 ===== */
.sidebar {
  width: 200px;
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 0 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo .logo-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.sidebar-logo h1 {
  font-size: 1.1rem;
  color: white;
  letter-spacing: 3px;
}

.sidebar-nav {
  padding: 16px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  gap: 10px;
  font-size: 0.85rem;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active {
  background: rgba(139, 69, 19, 0.3);
  color: var(--secondary);
  border-left: 3px solid var(--accent);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-section {
  padding: 14px 16px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-role {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
  width: 100%;
  padding: 12px;
  background: rgba(230, 57, 70, 0.2);
  border: none;
  border-radius: 8px;
  color: var(--error);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  font-family: inherit;
}

.btn-logout:hover {
  background: var(--error);
  color: white;
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  margin-left: 200px;
  padding: 24px;
  min-height: 100vh;
}

/* ===== 页面标题 ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-user-info .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-dark);
  border-radius: 12px;
}

.header-user-info .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.header-user-info .user-details {
  display: flex;
  flex-direction: column;
}

.header-user-info .user-name {
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
}

.header-user-info .user-role {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

.header-user-info .btn-logout {
  padding: 8px 16px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.header-user-info .btn-logout:hover {
  background: #c53030;
}

/* ===== 用户菜单 ===== */
.user-menu-container {
  position: relative;
}

.user-menu-trigger {
  cursor: pointer;
}

.user-avatar-menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.user-avatar-menu:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.user-avatar-menu svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-menu-container:hover .user-menu,
.user-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: var(--text-dark);
}

.menu-item:hover {
  background: rgba(139, 69, 19, 0.08);
}

.menu-item svg {
  width: 18px;
  height: 18px;
  fill: var(--text-dark);
  flex-shrink: 0;
}

.menu-item-logout {
  color: var(--error);
}

.menu-item-logout svg {
  fill: var(--error);
}

.menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 8px 0;
}

/* 背景切换选项 */
.bg-options {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.bg-option {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bg-option:hover {
  transform: scale(1.1);
}

.bg-option.active {
  border-color: var(--primary);
}

/* 侧边栏背景选项 */
.bg-option[data-bg="dark"] {
  background: #1a1a2e;
}

.bg-option[data-bg="blue"] {
  background: linear-gradient(135deg, #1e3a5f, #2d5a87);
}

.bg-option[data-bg="green"] {
  background: linear-gradient(135deg, #1e5f3a, #2d875a);
}

.bg-option[data-bg="purple"] {
  background: linear-gradient(135deg, #4a1e5f, #6a2d87);
}

/* 页面背景选项 */
.bg-option[data-bg="light"] {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.bg-option[data-bg="gray"] {
  background: #e2e8f0;
}

.bg-option[data-bg="cream"] {
  background: #fef3c7;
}

/* 自定义颜色选择器 */
.bg-option-custom {
  background: transparent !important;
  border: 2px dashed #ccc !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-option-custom svg {
  width: 12px;
  height: 12px;
  fill: #666;
}

.color-picker {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  cursor: pointer;
}

.page-title {
  font-size: 2rem;
  color: var(--text-dark);
}

.page-title span {
  color: var(--primary);
}

.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  background: var(--primary);
  color: white;
}

.btn-action svg {
  width: 20px;
  height: 20px;
}

.btn-action-primary {
  background: var(--primary);
  color: white;
}

.btn-action-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-action-secondary {
  background: white;
  color: var(--text-dark);
  border: 2px solid #E8E8E8;
}

.btn-action-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== 上传区域 ===== */
.upload-zone {
  background: white;
  border: 3px dashed #E8E8E8;
  border-radius: 16px;
  padding: 50px 30px;
  text-align: center;
  transition: var(--transition);
  margin-bottom: 30px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(139, 69, 19, 0.05);
}

.upload-zone-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: rgba(139, 69, 19, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--primary);
}

.upload-zone h3 {
  color: var(--text-dark);
  margin-bottom: 8px;
}

.upload-zone p {
  color: #888;
  font-size: 0.9rem;
}

.upload-zone input[type="file"] {
  display: none;
}

/* 细长条上传区域 */
.upload-zone-slim {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  margin-bottom: 24px;
  background: white;
  border: 2px dashed #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-zone-slim:hover,
.upload-zone-slim.dragover {
  border-color: var(--primary);
  background: rgba(139, 69, 19, 0.05);
}

.upload-zone-slim .upload-zone-icon {
  width: 28px;
  height: 28px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone-slim .upload-zone-icon svg {
  width: 22px;
  height: 22px;
}

.upload-zone-slim span {
  color: #666;
  font-size: 0.9rem;
}

/* ===== 视频网格 ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.video-play-btn svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
}

.video-thumbnail:hover .video-play-btn {
  background: rgba(139, 69, 19, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.btn-delete-video {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(230, 57, 70, 0.9);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-delete-video svg {
  width: 18px;
  height: 18px;
}

.video-card:hover .btn-delete-video {
  opacity: 1;
}

.btn-edit-video-card {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(139, 69, 19, 0.9);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.btn-edit-video-card svg {
  width: 18px;
  height: 18px;
}

.video-card:hover .btn-edit-video-card {
  opacity: 1;
}

.btn-download-video {
  position: absolute;
  top: 10px;
  left: 50px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(52, 152, 219, 0.9);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.btn-download-video svg {
  width: 18px;
  height: 18px;
}

.video-card:hover .btn-download-video {
  opacity: 1;
}

.btn-delete-video {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(230, 57, 70, 0.9);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.btn-edit-card-video {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(52, 152, 219, 0.9);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.btn-edit-card-video svg {
  width: 18px;
  height: 18px;
}

.video-card:hover .btn-edit-card-video {
  opacity: 1;
}

.video-info {
  padding: 16px;
}

.video-name {
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-desc {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-time {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 6px;
}

/* ===== 图片网格 ===== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.image-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.image-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.image-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.image-card-info {
  padding: 16px;
}

.image-card-name {
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-card-desc {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.image-card-time {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 6px;
}

.image-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.image-card:hover .image-card-overlay {
  opacity: 1;
}

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

.empty-state-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  background: #F0F0F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg {
  width: 60px;
  height: 60px;
  fill: #CCC;
}

.empty-state h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-close svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* ===== 确认弹窗 ===== */
.confirm-modal {
  background: white;
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.confirm-modal h3 {
  margin-bottom: 12px;
  color: var(--text-dark);
}

.confirm-modal p {
  color: #666;
  margin-bottom: 24px;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
}

.confirm-modal-actions button {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  background: var(--primary);
  color: white;
}

.confirm-modal-actions button:last-child {
  background: #F0F0F0;
  color: var(--text-dark);
}

/* ===== 用户管理 ===== */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-title {
  font-size: 2rem;
  color: var(--text-dark);
}

.user-table {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.user-table table {
  width: 100%;
  border-collapse: collapse;
}

.user-table th,
.user-table td {
  padding: 18px 24px;
  text-align: left;
}

.user-table th {
  background: var(--bg-dark);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.user-table tr:not(:last-child) td {
  border-bottom: 1px solid #F0F0F0;
}

.user-table tr:hover td {
  background: rgba(139, 69, 19, 0.03);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-admin {
  background: rgba(139, 69, 19, 0.1);
  color: var(--primary);
}

.badge-leader {
  background: rgba(232, 93, 4, 0.1);
  color: var(--accent);
}

.badge-member {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.badge-user {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

.btn-sm {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  background: var(--primary);
  color: white;
}

.btn-sm:hover {
  background: var(--primary-light);
}

/* ===== 添加用户表单 ===== */
.add-user-form {
  background: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.add-user-form h3 {
  margin-bottom: 24px;
  color: var(--text-dark);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

/* ===== 数据管理 ===== */
.data-management {
  background: white;
  border-radius: 16px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: var(--shadow);
}

.data-management h3 {
  margin-bottom: 20px;
  color: var(--text-dark);
}

.data-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 28px;
  height: 28px;
}

.stat-icon-scenes {
  background: rgba(139, 69, 19, 0.1);
}

.stat-icon-scenes svg {
  fill: var(--primary);
}

.stat-icon-characters {
  background: rgba(232, 93, 4, 0.1);
}

.stat-icon-characters svg {
  fill: var(--accent);
}

.stat-icon-props {
  background: rgba(82, 183, 136, 0.1);
}

.stat-icon-props svg {
  fill: var(--success);
}

.stat-icon-users {
  background: rgba(100, 100, 230, 0.1);
}

.stat-icon-users svg {
  fill: #6464E6;
}

.stat-info h4 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  font-family: 'Noto Sans SC', sans-serif;
}

.stat-info p {
  color: #888;
  font-size: 0.9rem;
}

/* ===== 移动端响应式 ===== */
.quick-entry-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-dark);
    color: white;
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .login-card {
    margin: 20px;
    padding: 30px 24px;
  }

  .login-logo h1 {
    font-size: 2rem;
  }
}

/* ===== 工具类 ===== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}
