/* 全局样式 */
:root {
  --primary-color: #1890ff;
  --secondary-color: #52c41a;
  --danger-color: #f5222d;
  --warning-color: #faad14;
  --text-color: #333;
  --light-text-color: #666;
  --lighter-text-color: #999;
  --border-color: #ddd;
  --light-bg: #f5f5f5;
  --header-height: 60px;
  --sidebar-width: 220px;
  --pending-color: #faad14;
  --approved-color: #52c41a;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --magenta-color: #ff00ff;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f0f2f5;
}

/* 辅助类 */
.full-width {
  grid-column: 1 / -1;
}

/* 容器布局 */
.container {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  margin-top: var(--header-height);
}

.content {
  flex: 1;
  padding: 20px;
  margin-left: var(--sidebar-width);
  background-color: #fff;
  box-shadow: var(--shadow);
  border-radius: 4px;
  margin-top: 20px;
  margin-right: 20px;
  margin-bottom: 20px;
}

/* 头部样式 */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: white;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

.logo h1 {
  font-size: 20px;
  color: var(--primary-color);
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-name {
  font-weight: 500;
  margin-right: 10px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 10px 0;
  min-width: 120px;
  display: none;
}

.user-menu:hover .dropdown-menu {
  display: block;
}

.menu-item {
  display: block;
  padding: 8px 16px;
  color: var(--text-color);
  text-decoration: none;
}

.menu-item:hover {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

/* 侧边栏样式 */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background-color: white;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-menu ul {
  list-style: none;
  padding: 20px 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background-color: rgba(24, 144, 255, 0.1);
  color: var(--primary-color);
  border-right: 3px solid var(--primary-color);
}

.sidebar-menu .icon {
  margin-right: 10px;
  font-size: 18px;
}

.sidebar-menu .menu-indented .icon {
  margin-left: 20px;
}

/* 侧边栏底部logo样式 */
.sidebar-logo {
  margin-top: auto;
  padding: 5px 5px 0 5px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.sidebar-logo img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 页面头部样式 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
  font-size: 24px;
  color: var(--text-color);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 按钮样式 */
.btn, .btn-back, .btn-edit, .btn-status, .btn-view, .btn-save, .btn-cancel, .btn-login, .btn-danger, .btn-warning, .btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  border: none;
}

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

.btn-back {
  background-color: var(--light-bg);
  color: var(--text-color);
}

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

.btn-view {
  background-color: var(--light-bg);
  color: var(--primary-color);
}

.btn-status {
  background-color: var(--secondary-color);
  color: white;
}

.btn-save {
  background-color: var(--secondary-color);
  color: white;
}

.btn-cancel {
  background-color: var(--light-bg);
  color: var(--text-color);
}

.btn-login {
  background-color: var(--primary-color);
  color: white;
  width: 100%;
  padding: 10px;
}

.btn:hover, .btn-edit:hover, .btn-save:hover, .btn-login:hover, .btn-danger:hover, .btn-warning:hover, .btn-success:hover, .btn-status:hover {
  opacity: 0.9;
}

.btn-back:hover, .btn-view:hover, .btn-cancel:hover {
  background-color: #e8e8e8;
}

/* 添加按钮样式 */
.btn-warning {
  background-color: var(--magenta-color);
  color: white;
}

.btn-warning:hover {
  opacity: 0.9;
}

/* 添加红色按钮样式 */
.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

/* 添加成功按钮样式 */
.btn-success {
  background-color: var(--secondary-color);
  color: white;
}

/* 登录页面样式 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 添加背景图层 */
.login-page::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/bg.jpg') no-repeat center center;
  background-size: 90% auto;
  z-index: -2;
}

/* 添加模糊效果层 */
.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
}

/* 添加移动端适配 */
@media screen and (max-width: 768px) {
  .login-page::after {
    background-size: 90% calc(90vw * 9/16);
  }
}

.login-container {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

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

.login-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--light-text-color);
}

.login-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.error-message {
  background-color: #fff2f0;
  border: 1px solid #ffccc7;
  color: var(--danger-color);
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* 仪表盘样式 */
.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
  height: 160px; /* 添加固定高度，确保所有卡片高度一致 */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card:hover {
  transform: translateY(-5px);
}

/* 彩色背景样式 */
.pending-card {
  background-color: #fff7e6; /* 浅橙色 */
  border-left: 4px solid var(--warning-color);
}

.approved-card {
  background-color: #f6ffed; /* 浅绿色 */
  border-left: 4px solid var(--secondary-color);
}

.total-card {
  background-color: #e6f7ff; /* 浅蓝色 */
  border-left: 4px solid var(--primary-color);
}

.appointment-card {
  background-color: #f9f0ff; /* 浅紫色 */
  border-left: 4px solid #722ed1; /* 紫色 */
}

.success-case-card {
  background-color: #fff0f6; /* 浅粉色 */
  border-left: 4px solid #eb2f96; /* 粉色 */
}

.favorite-card {
  background-color: #fffbe6; /* 浅黄色 */
  border-left: 4px solid #fadb14; /* 黄色 */
}

.stat-value {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 5px;
}

.pending-card .stat-value {
  color: var(--warning-color);
}

.approved-card .stat-value {
  color: var(--secondary-color);
}

.total-card .stat-value {
  color: var(--primary-color);
}

.appointment-card .stat-value {
  color: #722ed1; /* 紫色 */
}

.success-case-card .stat-value {
  color: #eb2f96; /* 粉色 */
}

.favorite-card .stat-value {
  color: #fadb14; /* 黄色 */
}

.stat-label {
  font-size: 16px;
  color: var(--light-text-color);
  margin-bottom: 15px;
}

.stat-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
}

.stat-link:hover {
  text-decoration: underline;
}

.quick-actions {
  margin-top: 30px;
}

.quick-actions h3 {
  margin-bottom: 15px;
  font-size: 18px;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.action-buttons .btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.action-buttons .btn:nth-child(1) {
  background-color: var(--warning-color);
  color: white;
}

.action-buttons .btn:nth-child(2) {
  background-color: var(--primary-color);
  color: white;
}

.action-buttons .btn:nth-child(3) {
  background-color: #722ed1; /* 紫色 */
  color: white;
}

.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 反馈列表样式 */
.filters {
  display: flex;
  gap: 15px;
}

.filters a {
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s;
}

.filters a.active {
  background-color: var(--primary-color);
  color: white;
}

.filters a:not(.active):hover {
  background-color: var(--light-bg);
}

.feedback-table-container {
  overflow-x: auto;
}

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

.feedback-table th, .feedback-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.feedback-table th {
  background-color: var(--light-bg);
  font-weight: 600;
}

.feedback-table tr:hover {
  background-color: rgba(24, 144, 255, 0.05);
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-badge.pending {
  background-color: rgba(250, 173, 20, 0.1);
  color: var(--pending-color);
}

.status-badge.approved {
  background-color: rgba(82, 196, 26, 0.1);
  color: var(--approved-color);
}

.actions {
  display: flex;
  gap: 8px;
}

.no-data {
  text-align: center;
  padding: 30px;
  color: var(--lighter-text-color);
}

/* 反馈详情样式 */
.feedback-detail {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
}

.detail-sections {
  padding: 20px;
}

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

.detail-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 14px;
  color: var(--light-text-color);
  margin-bottom: 5px;
  padding-left: 1em; /* 添加一个汉字的间距 */
}

.detail-value {
  font-size: 15px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.photo-item {
  border-radius: 4px;
  overflow: hidden;
}

.user-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s;
  cursor: pointer;
}

.user-photo:hover {
  transform: scale(1.05);
}

.no-photos {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--lighter-text-color);
  padding: 30px 0;
}

/* 编辑表单样式 */
.form-container {
  margin-top: 20px;
}

.form-section {
  margin-bottom: 30px;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--light-text-color);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* 错误页面样式 */
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f0f2f5;
}

.error-content {
  max-width: 500px;
  padding: 30px;
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.error-content h1 {
  font-size: 36px;
  color: var(--danger-color);
  margin-bottom: 20px;
}

.error-message {
  font-size: 18px;
  margin-bottom: 20px;
}

.error-details {
  text-align: left;
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
  overflow: auto;
}

.error-details pre {
  font-size: 14px;
  white-space: pre-wrap;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}