/* Login page styles */
.login-container { max-width: 420px; margin: 100px auto; padding: 32px; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.login-title { font-size: 22px; margin-bottom: 20px; text-align: center; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label { display: block; margin-bottom: 6px; color: #334155; }
.login-form input { width: 100%; height: 38px; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 6px; }
.login-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 8px; }
.login-actions .btn { width: 100%; }

/* Quill Editor Styles */
.ql-editor {
  min-height: 300px;
  font-size: 15px;
  line-height: 1.8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  padding: 20px;
  background: #fff;
}

.ql-toolbar {
  border: 1px solid #e1e5e9;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #f8f9fa;
  padding: 12px;
}

.ql-container {
  border: 1px solid #e1e5e9;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.ql-editor h1, .ql-editor h2, .ql-editor h3, .ql-editor h4, .ql-editor h5, .ql-editor h6 {
  margin: 24px 0 12px 0;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
}

.ql-editor h1 { font-size: 32px; }
.ql-editor h2 { font-size: 28px; }
.ql-editor h3 { font-size: 24px; }
.ql-editor h4 { font-size: 20px; }
.ql-editor h5 { font-size: 18px; }
.ql-editor h6 { font-size: 16px; }

.ql-editor p {
  margin: 12px 0;
  text-align: justify;
}

.ql-editor ul, .ql-editor ol {
  margin: 12px 0;
  padding-left: 24px;
}

.ql-editor li {
  margin: 6px 0;
}

.ql-editor blockquote {
  border-left: 4px solid #3498db;
  margin: 16px 0;
  padding: 12px 16px;
  background: #f8f9fa;
  font-style: italic;
  color: #555;
}

.ql-editor code {
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  color: #e74c3c;
}

.ql-editor pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}

.ql-editor pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* 图片样式增强 */
.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 16px auto;
  display: block;
}

.ql-editor img:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

/* 图片容器和标题样式 */
.ql-editor .image-container {
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
}

.ql-editor .image-container img {
  margin: 0 auto 8px auto;
}

.ql-editor .image-caption {
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-top: 8px;
  padding: 0 10px;
  line-height: 1.4;
  text-align: center;
}

.ql-editor .image-caption:empty {
  display: none;
}

/* 图片容器对齐样式 */
.ql-editor .image-container.align-left {
  float: left;
  margin: 10px 20px 10px 0;
  text-align: left;
}

.ql-editor .image-container.align-right {
  float: right;
  margin: 10px 0 10px 20px;
  text-align: right;
}

.ql-editor .image-container.align-center {
  display: block;
  margin: 20px auto;
  float: none;
  text-align: center;
}

/* 图片对齐样式 */
.ql-editor img.align-left {
  float: left;
  margin: 10px 20px 10px 0;
}

.ql-editor img.align-right {
  float: right;
  margin: 10px 0 10px 20px;
}

.ql-editor img.align-center {
  display: block;
  margin: 16px auto;
  float: none;
}

/* 视频样式增强 */
.ql-editor video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  margin: 16px auto;
  display: block;
}

/* 链接样式 */
.ql-editor a {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.ql-editor a:hover {
  color: #2980b9;
  border-bottom-color: #2980b9;
}

/* 表格样式 */
.ql-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ql-editor table td, .ql-editor table th {
  border: 1px solid #e1e5e9;
  padding: 12px;
  text-align: left;
}

.ql-editor table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.ql-editor table tr:nth-child(even) {
  background: #f8f9fa;
}

/* 工具栏按钮样式优化 */
.ql-toolbar .ql-formats {
  margin-right: 15px;
}

.ql-toolbar button {
  border-radius: 4px;
  margin: 0 2px;
  transition: all 0.2s ease;
}

.ql-toolbar button:hover {
  background: #e9ecef;
}

.ql-toolbar button.ql-active {
  background: #3498db;
  color: white;
}

/* 下拉菜单样式 */
.ql-toolbar .ql-picker {
  border-radius: 4px;
}

.ql-toolbar .ql-picker-options {
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid #e1e5e9;
}

/* 编辑器焦点状态 */
.ql-container.ql-snow {
  border-color: #e1e5e9;
}

.ql-editor.ql-blank::before {
  color: #adb5bd;
  font-style: italic;
}

/* 选中文本样式 */
.ql-editor ::selection {
  background: #3498db;
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ql-editor {
    padding: 15px;
    font-size: 14px;
  }
  
  .ql-toolbar {
    padding: 8px;
  }
  
  .ql-toolbar .ql-formats {
    margin-right: 8px;
  }
}

/* Region Selector Styles */
.region-selector {
  display: flex;
  gap: 10px;
}

.region-selector select {
  flex: 1;
  height: 38px;
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
  color: #374151;
}

.region-selector select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.region-selector select:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* 行政区域管理样式 */
.level-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.level-badge.level-1 {
  background-color: #007bff;
}

.level-badge.level-2 {
  background-color: #28a745;
}

.district-row {
  background-color: #f8f9fa;
  font-weight: 500;
}

.street-row {
  background-color: #ffffff;
}

.street-row td:nth-child(2) {
  color: #666;
  font-size: 14px;
}

/* 表格操作按钮样式优化 */
.actions .btn {
  margin-right: 5px;
  margin-bottom: 2px;
}

.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.ql-editor blockquote {
  border-left: 4px solid #e5e7eb;
  margin: 16px 0;
  padding: 8px 16px;
  background: #f9fafb;
  font-style: italic;
}

.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 8px 0;
}

/* Modal improvements for news editor */
#newsModal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#newsModal .modal-header {
  flex-shrink: 0;
}

#newsModal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 36px;
}

#newsModal form {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#newsModal .form-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

#newsModal .form-actions {
  flex-shrink: 0;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#newsModal .form-row {
  margin-bottom: 20px;
}

#newsModal .form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

#coverImagePreview {
  border: 2px dashed #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: border-color 0.3s;
}

#coverImagePreview:hover {
  border-color: #3b82f6;
}

/* Quill Editor Video Button - 移除自定义图标，使用默认图标 */
.ql-toolbar .ql-video {
  width: 28px;
  height: 24px;
}

/* House Modal improvements for scrolling */
#houseModal .modal-content {
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0; /* allow children flex items to size properly */
}

#houseModal .modal-header {
  flex-shrink: 0;
}

#houseModal .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important; /* critical for enabling child overflow in flex layout */
  overflow: hidden !important; /* prevent double scroll, let .form-content scroll */
  padding: 20px 36px !important;
  max-height: none !important;
}

#houseModal form {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

#houseModal .form-content {
  flex: 1 1 auto !important;
  min-height: 0 !important; /* allow flex child to shrink and enable overflow */
  overflow-y: auto !important;
  padding-right: 10px !important;
  max-height: calc(70vh - 200px) !important; /* explicit height limit to trigger scroll */
}

#houseModal .form-actions {
  flex-shrink: 0;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#houseModal .form-row {
  margin-bottom: 20px;
}

#houseModal .form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

/* Video container in editor */
.ql-editor .video-container {
  margin: 20px 0;
  text-align: center;
}

.ql-editor .video-container video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ql-editor .video-container p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
  font-style: italic;
}

/* Loading state for uploads */
.upload-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 6px;
  color: #0ea5e9;
  font-size: 14px;
}

.upload-loading::before {
  content: "⏳";
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* 万利好房后台管理系统样式文件 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8fafc;
  color: #1a202c;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 顶部导航栏 */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
}

.brand-text {
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.navbar-actions {
  display: flex;
  align-items: center;
}

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

.user-avatar {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: auto;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  object-fit: contain;
}

.user-name {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.logout-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

/* 主体布局 */
.main-layout {
  display: flex;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* 侧边栏 */
.sidebar {
  width: 260px;
  background: white;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  position: fixed;
  left: 0;
  top: 64px;
  bottom: 0;
  z-index: 100;
}

/* 容器布局 */
.container {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  background: #f8fafc;
  min-height: calc(100vh - 64px);
}

/* 头部样式 */
.header {
  background: white;
  color: #1a202c;
  padding: 24px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a202c;
}

.header p {
  color: #64748b;
  font-size: 14px;
}

/* 侧边栏导航 */
.sidebar-nav {
  padding: 24px 0;
}

.nav-section {
  margin-bottom: 32px;
}

.nav-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding: 0 24px;
}

.nav-list {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  margin: 2px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.nav-item:hover {
  background: #f1f5f9;
  color: #334155;
}

.nav-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.nav-icon {
  margin-right: 12px;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-text {
  flex: 1;
}

/* 内容区域 */
.content-area {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  background: #f8fafc;
  min-height: calc(100vh - 64px);
  overflow-y: auto;
}

.content-section {
  display: none;
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

/* 页面头部 */
.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 16px;
  color: #64748b;
  margin: 0;
}

/* 统计概览 */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.primary::before {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.success::before {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.stat-card.info::before {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.stat-card.warning::before {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.stat-card.appointment::before {
  background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
}

.stat-card.pending::before {
  background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
}

.stat-card.confirmed::before {
  background: linear-gradient(135deg, #68d391 0%, #48bb78 100%);
}

.stat-card.completed::before {
  background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
  font-size: 32px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.stat-trend.positive {
  background: #f0fff4;
  color: #38a169;
}

.stat-trend.negative {
  background: #fed7d7;
  color: #e53e3e;
}

.stat-unit {
  color: #a0aec0;
  font-size: 12px;
  font-weight: 500;
}

/* Dashboard Summary */
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.summary-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  display: flex;
  gap: 16px;
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.summary-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  border-radius: 12px;
  flex-shrink: 0;
}

.summary-content {
  flex: 1;
}

.summary-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 12px;
}

.summary-content p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.summary-content p:last-child {
  margin-bottom: 0;
}

.summary-content strong {
  color: #1a202c;
  font-weight: 600;
}

.status-normal {
  color: #38a169;
  font-weight: 600;
}

/* Dashboard Charts */
.dashboard-charts {
  margin-top: 32px;
}

.chart-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.chart-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a202c;
  margin: 0;
}

.chart-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chart-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-select:hover {
  border-color: #9ca3af;
}

.chart-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.refresh-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.refresh-btn:active {
  transform: translateY(0);
}

.chart-content {
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

#trendChart {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 仪表板小部件 */
.dashboard-widgets {
    margin-top: 32px;
}

.widget-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.widget {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.widget-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.time-filter {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: #64748b;
    cursor: pointer;
}

.chart-widget {
    min-height: 300px;
}

.chart-placeholder {
    padding: 60px 24px;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    margin: 24px;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.chart-mock {
    font-size: 16px;
    font-weight: 500;
}

.activity-widget {
    max-height: 400px;
}

.activity-list {
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: #f8fafc;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #1a202c;
    margin-bottom: 4px;
    font-weight: 500;
}

.activity-time {
    font-size: 12px;
    color: #64748b;
}

/* 页面操作区域 */
.page-actions {
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 筛选器容器 */
.filters-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  margin-top: 20px;
}

/* 分页容器 */
.pagination-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

th, td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:hover {
  background: #f8f9fa;
}

/* 按钮样式 */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  margin: 2px;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-warning {
  background: #ffc107;
  color: #212529;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* 搜索和筛选 */
.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: end;
}

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

/* 分页样式 */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.pagination-info select {
  width: auto;
  min-width: 80px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination button,
.page-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover,
.page-btn:hover {
  background: #f8f9fa;
  border-color: #667eea;
  transform: translateY(-1px);
}

.pagination button.active,
.page-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.pagination button:disabled,
.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pagination-ellipsis {
  margin: 0 5px;
  color: #999;
  font-size: 14px;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination-nav button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.pagination-nav button:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: translateY(-1px);
}

.pagination-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pagination-nav button:disabled:hover {
  background: white;
  color: #666;
  border-color: #ddd;
}

/* 状态标签 */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  display: inline-block;
  min-width: 60px;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

/* 预约状态标签 */
.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-confirmed {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-completed {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* 预约管理表格样式 */
.house-info {
  min-width: 200px;
}

.house-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 4px;
}

.house-price {
  color: #e53e3e;
  font-weight: 500;
  margin-bottom: 2px;
}

.house-location {
  color: #718096;
  font-size: 12px;
}

.user-info {
  min-width: 120px;
}

.user-name {
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 2px;
}

.user-id {
  color: #718096;
  font-size: 12px;
}

.remark {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 模态框样式 */
/* 模态框基础样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.modal-overlay .modal {
  background: white;
  padding: 0;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 0;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { 
    transform: translateY(-20px) scale(0.95); 
    opacity: 0; 
  }
  to { 
    transform: translateY(0) scale(1); 
    opacity: 1; 
  }
}

/* 模态框头部 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px 24px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.025em;
  position: relative;
  z-index: 1;
}

/* 关闭按钮 */
.close-btn,
.modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  cursor: pointer;
  color: white;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
}

.close-btn:hover,
.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 模态框主体 */
.modal-body {
  padding: 36px;
  max-height: calc(90vh - 160px);
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

/* 模态框底部 */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 28px 36px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e5e7eb;
  position: relative;
}

.modal-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

/* 表单组样式优化 */
.form-group {
  margin-bottom: 24px;
}

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

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

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.form-group input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* 模态框内表单样式 */
.modal-body .form-group {
  margin-bottom: 28px;
  position: relative;
}

.modal-body .form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: #1f2937;
  font-size: 15px;
  letter-spacing: 0.025em;
  position: relative;
}

.modal-body .form-group label::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 2px;
  opacity: 0.8;
}

.modal-body .form-group input,
.modal-body .form-group select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  box-sizing: border-box;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus {
  outline: none;
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.modal-body .form-group input::placeholder {
  color: #9ca3af;
  font-style: normal;
  font-weight: 400;
}

/* 复选框样式 */
.modal-body .form-group input[type="checkbox"] {
  width: auto;
  margin-right: 12px;
  transform: scale(1.3);
  accent-color: #6366f1;
  cursor: pointer;
}

.modal-body .form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.modal-body .form-group label:has(input[type="checkbox"]):hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-body .form-group label:has(input[type="checkbox"]):before {
  display: none;
}

/* 按钮样式优化 */
.modal-footer .btn,
.modal-actions .btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  min-width: 100px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.025em;
}

.modal-footer .btn-primary,
.modal-actions .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-footer .btn-primary::before,
.modal-actions .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.modal-footer .btn-primary:hover,
.modal-actions .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}

.modal-footer .btn-primary:hover::before,
.modal-actions .btn-primary:hover::before {
  left: 100%;
}

.modal-footer .btn-secondary,
.modal-actions .btn-secondary {
  background: white;
  color: #6b7280;
  border: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-footer .btn-secondary:hover,
.modal-actions .btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  color: #374151;
}

/* 模态框动作按钮样式 */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 28px 36px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e5e7eb;
  position: relative;
}

.modal-actions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .widget-row {
        grid-template-columns: 1fr;
    }
    
    .stats-overview {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 16px;
  }
  
  .modal-overlay .modal,
  .modal-content {
    max-width: 100%;
    border-radius: 12px;
  }
  
  .modal-header {
    padding: 20px 24px 16px;
  }
  
  .modal-header h2,
  .modal-header h3 {
    font-size: 18px;
  }
  
  .modal-body {
    padding: 24px;
  }
  
  #houseModal .modal-body {
    padding: 20px 24px !important;
    overflow: hidden !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  
  #houseModal .form-content {
    max-height: calc(60vh - 150px) !important;
    overflow-y: auto !important;
  }
  
  .modal-footer,
  .modal-actions {
    padding: 20px 24px;
    flex-direction: column;
  }
  
  .modal-footer .btn,
  .modal-actions .btn {
    width: 100%;
    order: 2;
  }
  
  .modal-footer .btn-primary,
  .modal-actions .btn-primary {
    order: 1;
  }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0;
    }
    
    .main-layout {
        position: relative;
    }
    
    .top-navbar {
        padding: 0 16px;
    }
    
    .brand-text {
        font-size: 18px;
    }
    
    .user-name {
        display: none;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .widget-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    #houseModal .modal-content {
        padding: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    #houseModal .modal-body {
        padding: 16px !important;
        overflow: hidden !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
    
    #houseModal .form-content {
        max-height: calc(65vh - 120px) !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {
    .top-navbar {
        padding: 0 12px;
    }
    
    .brand-logo {
        width: 28px;
        height: 28px;
    }
    
    .brand-text {
        font-size: 16px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .page-header {
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .dashboard-widgets {
        margin-top: 24px;
    }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.empty-state img {
  width: 120px;
  height: 120px;
  opacity: 0.5;
  margin-bottom: 20px;
}

.empty-state h3 {
  margin-bottom: 10px;
  color: #666;
}

.empty-state p {
  margin-bottom: 20px;
}

/* 成功/错误提示 */
.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert-info {
  background: #cce7ff;
  border-color: #b3d9ff;
  color: #004085;
}

/* 工具提示 */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* 进度条 */
.progress {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 8px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 12px;
  margin: 2px;
  color: #495057;
}

.tag-primary {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.tag-success {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.tag-warning {
  background: #ffc107;
  border-color: #ffc107;
  color: #212529;
}

.tag-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* 导入模态框样式 */
#importModal .modal-content {
  max-width: 600px;
}

.excel-format-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 16px;
  margin-top: 8px;
}

.excel-format-info p {
  margin-bottom: 12px;
  font-weight: 500;
  color: #495057;
}

.excel-format-info ul {
  margin: 0;
  padding-left: 20px;
}

.excel-format-info li {
  margin-bottom: 4px;
  color: #6c757d;
  font-size: 14px;
}

#excelFile {
  width: 100%;
  padding: 8px 12px;
  border: 2px dashed #dee2e6;
  border-radius: 6px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

#excelFile:hover {
  border-color: #007bff;
  background: #e3f2fd;
}

.form-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6c757d;
}

/* 小区管理样式 */
.community-info {
  display: flex;
  flex-direction: column;
}

.community-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 2px;
}

.address-info {
  display: flex;
  flex-direction: column;
}

.address {
  color: #4a5568;
  font-size: 14px;
}

.table-image {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.current-image {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  margin-top: 8px;
}

/* 媒体管理样式 */
.media-grid-container {
  padding: 20px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.media-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  position: relative;
}

.media-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 4px;
  backdrop-filter: blur(4px);
}

.media-select {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #667eea;
}

.media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.media-preview {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #f7fafc;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.media-preview:hover img,
.media-preview:hover video {
  transform: scale(1.05);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-preview:hover .video-overlay {
  opacity: 1;
}

.play-icon {
  color: white;
  font-size: 48px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

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

/* 户型图样式 */
.floorplan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-preview:hover .floorplan-overlay {
  opacity: 1;
}

.floorplan-icon {
  color: white;
  font-size: 48px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.floorplan-info {
  margin: 8px 0;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.floorplan-info .layout {
  font-weight: 500;
  color: #2d3748;
}

.floorplan-info .area {
  color: #e53e3e;
  font-weight: 600;
}

.media-info {
  padding: 16px;
}

.media-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.media-type {
  background: #e2e8f0;
  color: #4a5568;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.media-size {
  color: #718096;
  font-size: 12px;
}

.media-community {
  color: #4a5568;
  font-size: 13px;
  margin-bottom: 4px;
}

.media-time {
  color: #a0aec0;
  font-size: 12px;
}

.media-actions {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
}

.media-actions .btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
}

/* 视频预览模态框 */
.video-preview {
  max-width: 800px;
  width: 90vw;
}

.video-preview .modal-body {
  padding: 0;
}

.video-preview video {
  border-radius: 0 0 8px 8px;
}

/* 文件信息样式 */
.file-info {
  margin-top: 8px;
  font-size: 12px;
  color: #718096;
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
  
  .media-preview {
    height: 160px;
  }
  
  .video-preview {
    width: 95vw;
  }
}

@media (max-width: 480px) {
  .media-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .media-preview {
    height: 200px;
  }
}

/* 批量上传文件预览样式 */
#batch-file-preview {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  background: #f9fafb;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  flex: 1;
  font-size: 14px;
  color: #374151;
  margin-right: 12px;
  word-break: break-all;
}

.file-type {
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 12px;
  font-size: 12px;
  margin-right: 8px;
}

.file-size {
  font-size: 12px;
  color: #6b7280;
  min-width: 60px;
  text-align: right;
}

/* 小区分组媒体管理样式 */
.community-selector-container {
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.community-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.community-selector label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0;
}

.community-selector select {
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  font-size: 14px;
}

.media-management-container {
  padding: 20px;
}

.community-section {
  background: white;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.community-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.community-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.community-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-sections {
  padding: 20px;
}

.category-section {
  margin-bottom: 32px;
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.category-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.category-icon.exterior { background: #e6fffa; color: #00b894; }
.category-icon.video { background: #fef5e7; color: #f39c12; }
.category-icon.landscape { background: #f0fff4; color: #00b894; }
.category-icon.facilities { background: #e8f4fd; color: #3498db; }
.category-icon.showroom { background: #fdf2f8; color: #e91e63; }
.category-icon.floorplan { background: #f3e8ff; color: #9c88ff; }

.category-count {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
}

.community-name {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 0 20px 20px 20px;
}

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

.category-media-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  position: relative;
}

.category-media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-media-preview {
  position: relative;
  width: 100%;
  height: 100px;
  overflow: hidden;
  background: #f7fafc;
}

.category-media-preview img,
.category-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.category-media-info {
  padding: 12px;
}

.category-media-name {
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-media-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #718096;
}

.empty-category {
  text-align: center;
  padding: 40px 20px;
  color: #a0aec0;
  font-style: italic;
}

.empty-category-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.collection-view-toggle {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collection-view-toggle:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.collection-view-toggle.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .community-selector {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .community-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .community-stats {
    align-self: stretch;
    justify-content: space-between;
  }
  
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .category-media-preview {
    height: 80px;
  }
}