* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f0f2f5;
  color: #333;
}

.admin-container {
  display: flex;
  min-height: 100vh;
}

/* ========== 侧边栏 - 暖橙色渐变主题 ========== */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #E85A2B 0%, #C44D22 100%);
  color: #fff;
  padding: 24px 0;
  flex-shrink: 0;
  box-shadow: 4px 0 20px rgba(255, 107, 53, 0.15);
}

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

.sidebar .logo h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar .logo h1::before {
  content: '🏠';
  font-size: 24px;
}

.sidebar .menu ul {
  list-style: none;
}

.sidebar .menu li {
  margin-bottom: 4px;
}

.sidebar .menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-radius: 0;
  transition: all 0.2s;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.sidebar .menu a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.sidebar .menu a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-left-color: #FFAA80;
  font-weight: 600;
}

/* ========== 头部 ========== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header {
  background-color: #fff;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-bottom: 1px solid #f0f0f0;
}

.header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1F2937;
}

.user-info {
  color: #666;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info::before {
  content: '👤';
}

/* ========== 内容区域 ========== */
.content {
  padding: 28px 32px;
}

/* ========== 统计卡片网格 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
  border: 1px solid #f0f0f0;
}

.stat-card:hover {
  box-shadow: 0 8px 24px rgba(255,107,53,0.12);
  transform: translateY(-2px);
  border-color: #FF6B35;
}

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

.stat-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.stat-icon.green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.stat-icon.orange { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.stat-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.stat-icon.red { background: linear-gradient(135deg, #fee2e2, #fecaca); }

.stat-content .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.2;
}

.stat-content .stat-label {
  font-size: 13px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* ========== 通用卡片 ========== */
.section, .card {
  background-color: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}

.section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #FF6B35, #FFAA80);
  border-radius: 2px;
}

/* ========== 页面头部 ========== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: white;
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}

.page-header-left h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  color: #1F2937;
}

.page-header-left p {
  margin: 0;
  color: #9CA3AF;
  font-size: 14px;
}

.page-header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  width: 240px;
  transition: all 0.2s;
  background: #f9fafb;
}

.search-box input:focus {
  outline: none;
  border-color: #FF6B35;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-box select,
.filter-select {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-box select:focus,
.filter-select:focus {
  outline: none;
  border-color: #FF6B35;
}

/* ========== 数据表格 ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.data-table th {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:hover {
  background-color: #f8fafc;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ========== 按钮样式 - 暖橙色渐变主题 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #FF6B35, #D9521E);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #E85A2B, #C44D22);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #667EEA, #764BA2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5A6FD6, #6A4191);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-outline {
  background: #fff;
  color: #FF6B35;
  border: 1px solid #FF6B35;
}

.btn-outline:hover {
  background: #FFF5F0;
  border-color: #E85A2B;
}

.btn-progress {
  background: linear-gradient(135deg, #667EEA, #764BA2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-progress:hover {
  background: linear-gradient(135deg, #5A6FD6, #6A3F96);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}

/* ========== 状态标签 ========== */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-tag.active {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.status-tag.inactive, .status-tag.disabled {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

.status-tag.warning, .status-tag.pending {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.status-tag.processing {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
}

.status-tag.completed {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.status-tag.cancelled {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
}

/* ========== 表单容器 ========== */
.form-container {
  background-color: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  max-width: 600px;
}

.form-container h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s;
  background: #f9fafb;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #FF6B35;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
}

/* ========== 详情容器 ========== */
.detail-container {
  background-color: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  max-width: 700px;
}

.detail-container h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-row {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .label {
  width: 120px;
  font-weight: 600;
  color: #6B7280;
  flex-shrink: 0;
}

.detail-row .value {
  flex: 1;
  color: #1F2937;
}

.detail-actions {
  display: flex;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #f3f4f6;
}

.detail-actions form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.detail-actions select {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: #f9fafb;
}

/* ========== 设置表单 ========== */
.settings-form {
  background: #fff;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  margin-bottom: 24px;
}

.settings-form h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}

.settings-form .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid #f3f4f6;
}

.settings-form .form-row:last-child {
  border-bottom: none;
}

.settings-form .form-row label:first-child {
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

.settings-form .form-row p {
  margin: 0;
  font-size: 13px;
  color: #9CA3AF;
}

.settings-form .form-row input[type="text"],
.settings-form .form-row input[type="number"],
.settings-form .form-row select {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  width: 200px;
  background: #f9fafb;
}

.settings-form .form-row input:focus,
.settings-form .form-row select:focus {
  outline: none;
  border-color: #FF6B35;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.settings-form .input-group {
  display: flex;
  align-items: center;
  width: 200px;
}

.settings-form .input-group input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px 0 0 10px;
  font-size: 14px;
  border-right: none;
  background: #f9fafb;
}

.settings-form .input-group .input-prefix,
.settings-form .input-group .input-suffix {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  background-color: #f3f4f6;
  color: #6B7280;
}

.settings-form .input-group .input-prefix {
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.settings-form .input-group .input-suffix {
  border-radius: 0 10px 10px 0;
  border-left: none;
}

.settings-form .submit-btn {
  margin-top: 24px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #FF6B35, #D9521E);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  transition: all 0.25s;
}

.settings-form .submit-btn:hover {
  background: linear-gradient(135deg, #E85A2B, #C44D22);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* ========== 开关样式 ========== */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 28px;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, #FF6B35, #D9521E);
}

.switch input:focus + .slider {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.switch input:checked + .slider:before {
  transform: translateX(24px);
}

/* ========== 图片上传区域样式 ========== */
.upload-area {
  border: 2px dashed #e5e7eb;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.upload-area:hover {
  border-color: #FF6B35;
  background: #FFF5F0;
}

.upload-area.dragover {
  border-color: #FF6B35;
  background: #FFE8DE;
}

.upload-placeholder {
  color: #6B7280;
}

.upload-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.upload-placeholder p {
  margin: 8px 0;
  font-size: 14px;
}

.upload-tip {
  color: #9CA3AF !important;
  font-size: 12px !important;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.remove-image {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  transition: all 0.2s;
}

.remove-image:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  transform: scale(1.1);
}

/* ========== 描述编辑器样式 ========== */
.description-editor {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.editor-toolbar {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.editor-toolbar button {
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.editor-toolbar button:hover {
  background: linear-gradient(135deg, #FF6B35, #D9521E);
  color: white;
  border-color: #FF6B35;
}

.toolbar-separator {
  color: #d1d5db;
  padding: 0 8px;
  font-size: 14px;
}

.description-textarea {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: none;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  background: #fff;
}

.description-textarea:focus {
  outline: none;
}

.description-preview {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.preview-label {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-content {
  background-color: #fff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  line-height: 1.8;
  min-height: 80px;
}

.preview-content strong {
  font-weight: bold;
}

.preview-content em {
  font-style: italic;
}

.preview-content u {
  text-decoration: underline;
}

/* ========== 其他实用工具 ========== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #9CA3AF; }
.text-primary { color: #FF6B35; }
.text-success { color: #10B981; }
.text-danger { color: #EF4444; }
.text-warning { color: #F59E0B; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }