/* 多平台自动回复管理系统 - 管理界面样式 */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  
  --sidebar-width: 280px;
  --header-height: 60px;
}

/* 全局样式 */
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

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

.sidebar-brand {
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-brand:hover {
  color: white;
  text-decoration: none;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-item {
  margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 0;
}

.sidebar-nav .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.sidebar-nav .nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  border-right: 3px solid #fff;
}

.sidebar-nav .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 主内容区 */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

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

/* 顶部导航 */
.top-navbar {
  background: white;
  height: var(--header-height);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  justify-content: space-between;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--dark-color);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
  background-color: var(--light-color);
}

.user-dropdown .dropdown-toggle {
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* 页面内容 */
.page-content {
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0;
}

.page-subtitle {
  color: var(--secondary-color);
  margin-top: 0.25rem;
}

/* 状态卡片 */
.stats-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stats-value {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stats-label {
  color: var(--secondary-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-icon {
  font-size: 2.5rem;
  opacity: 0.8;
}

/* 表格样式 */
.table-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.table-card .card-header {
  background: var(--light-color);
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
}

.table-card .table {
  margin-bottom: 0;
}

.table-card .table th {
  border-top: none;
  background: var(--light-color);
  font-weight: 600;
  color: var(--dark-color);
}

/* 按钮样式 */
.btn-group-sm > .btn, .btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
}

/* 状态徽章 */
.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-online {
  background-color: rgba(25, 135, 84, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(25, 135, 84, 0.2);
}

.status-offline {
  background-color: rgba(108, 117, 125, 0.1);
  color: var(--secondary-color);
  border: 1px solid rgba(108, 117, 125, 0.2);
}

.status-error {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* 在线状态指示器 */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* 平台图标 */
.platform-icon {
  width: 24px;
  height: 24px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .page-content {
    padding: 1rem;
  }
  
  .stats-card {
    margin-bottom: 1rem;
  }
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 工具提示 */
.tooltip {
  font-size: 0.875rem;
}

/* 模态框样式 */
.modal-content {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  background: var(--light-color);
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  background: var(--light-color);
}

/* 表单样式 */
.form-floating > label {
  color: var(--secondary-color);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1050;
  min-width: 300px;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 图标样式优化 - 确保图标正常显示 */
.fas, .far, .fab, .fa, .fal, .fad, .fat, .fass {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 按钮图标样式 */
.btn .fas, .btn .far, .btn .fab, .btn .fa, .btn .fal, .btn .fad, .btn .fat, .btn .fass {
  margin-right: 0.375rem;
  font-size: 0.875em;
  vertical-align: middle;
}

/* 小按钮图标样式 */
.btn-sm .fas, .btn-sm .far, .btn-sm .fab, .btn-sm .fa, .btn-sm .fal, .btn-sm .fad, .btn-sm .fat, .btn-sm .fass {
  font-size: 0.75em;
  margin-right: 0.25rem;
}

/* 表格操作按钮图标 */
.table .btn-group .btn .fas, .table .btn-group .btn .far, .table .btn-group .btn .fab, .table .btn-group .btn .fa {
  margin-right: 0;
  font-size: 0.8em;
}

/* 导航图标样式 */
.sidebar .nav-link .fas, .sidebar .nav-link .far, .sidebar .nav-link .fab, .sidebar .nav-link .fa {
  width: 20px;
  text-align: center;
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* 卡片标题图标 */
.card-header .fas, .card-header .far, .card-header .fab, .card-header .fa {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* 确保图标字体正确加载 */
i[class*="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands", "FontAwesome" !important;
}

/* 根据图标类型设置正确的字体权重 */
.fas, .fa-solid {
  font-weight: 900 !important;
}

.far, .fa-regular {
  font-weight: 400 !important;
}

.fab, .fa-brands {
  font-weight: 400 !important;
  font-family: "Font Awesome 6 Brands" !important;
}
