/* 亮色主题样式 - 参考简道云设计风格 */
:root {
  --light-primary: #1677ff;
  --light-secondary: #6c757d;
  --light-success: #52c41a;
  --light-info: #17a2b8;
  --light-warning: #faad14;
  --light-danger: #ff4d4f;
  --light-dark: #343a40;
  --light-light: #f8f9fa;
  --light-bg: #f5f7fa;
  --light-card-bg: #ffffff;
  --light-text: #333333;
  --light-text-secondary: #666666;
  --light-border: #e1e4e8;
  --light-accent: #1890ff;
  --light-glass: rgba(255, 255, 255, 0.8);
  --light-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --light-hover-bg: #f0f7ff;
  --light-panel-bg: #ffffff;
}

/* 全局样式 */
body {
  background-color: var(--light-bg) !important;
  color: var(--light-text) !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 导航栏样式 */
.navbar {
  background: linear-gradient(135deg, #ffffff, #fafafa) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-radius: 0 0 8px 8px;
}

.navbar-brand {
  font-weight: 600;
  color: var(--light-primary) !important;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  text-decoration: none;
}
.navbar-brand:hover {
  color: var(--light-accent) !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--light-text) !important;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.navbar-nav .nav-link:hover {
  color: var(--light-primary) !important;
  background-color: var(--light-hover-bg);
  transform: translateY(-1px);
}

/* 侧边栏样式 - 已迁移到 sidebar.css，保留兼容性样式 */
/* 注意：新的侧边栏使用飞书设计系统规范 */
.sidebar {
  /* 让新的 CSS 变量生效，不使用 !important */
  background-color: var(--sidebar-bg, #f5f5f5);
  border-right: 1px solid var(--sidebar-border, #dee0e3);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 兼容旧版导航链接样式 */
.nav-link {
  color: var(--sidebar-text, #1f2329);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--sidebar-item-hover-bg, #e8e9eb);
  color: var(--sidebar-text, #1f2329);
}

.nav-link.active {
  color: var(--sidebar-text-active, #3370ff);
  background-color: var(--sidebar-item-active-bg, #e6f0ff);
}

/* 列表组样式 - 已迁移到 sidebar.css */
/* 新的导航使用 .nav-item__link 类 */
.list-group-item {
  background-color: transparent;
  border: none;
  border-radius: 0.375rem;
  margin: 0.25rem 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
}

.list-group-item:hover,
.list-group-item.active {
  transform: translateX(5px);
}

/* 图标样式 */
.bi {
  color: var(--light-primary);
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* 卡片边框样式 */
.border-start-primary {
  border-left: 0.25rem solid var(--light-primary) !important;
}

.border-start-success {
  border-left: 0.25rem solid var(--light-success) !important;
}

.border-start-info {
  border-left: 0.25rem solid var(--light-info) !important;
}

.border-start-warning {
  border-left: 0.25rem solid var(--light-warning) !important;
}

.shadow {
  box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.1) !important;
}

.h-100 {
  height: 100% !important;
}

.text-gray-800 {
  color: #5a5c69 !important;
}

.text-gray-300 {
  color: #dddfeb !important;
}

.text-gray-400 {
  color: #d1d3e2 !important;
}

.text-gray-500 {
  color: #757575 !important;
}

.text-gray-600 {
  color: #858796 !important;
}

.text-gray-700 {
  color: #5a5c69 !important;
}

.text-gray-800 {
  color: #5a5c69 !important;
}

.text-gray-900 {
  color: #3a3b45 !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.font-weight-bold {
  font-weight: 700 !important;
}

.no-gutters {
  margin-right: 0;
  margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

.dropdown.no-arrow .dropdown-toggle::after {
  display: none;
}

/* 列表组悬停效果 */
.list-group-item-action {
  transition: all 0.2s ease-in-out;
}

.list-group-item-action:hover {
  background-color: var(--light-hover-bg) !important;
  transform: translateX(5px);
}

/* 主内容区域 */
.main-content {
  background: linear-gradient(160deg, var(--light-bg), #f0f2f5);
  min-height: 100vh;
}

.container-fluid {
  padding: 2rem;
}

/* 卡片样式 */
.card {
  background: var(--light-card-bg) !important;
  border: 1px solid var(--light-border) !important;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: var(--light-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
  background: linear-gradient(to right, #fafafa, #f5f5f5) !important;
  border-bottom: 1px solid var(--light-border) !important;
  font-weight: 600;
  border-radius: 11px 11px 0 0 !important;
  padding: 1rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* 表格样式 */
.table {
  color: var(--light-text);
  background: var(--light-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table th {
  background-color: #f8f9fa !important;
  border-color: var(--light-border) !important;
  color: var(--light-text) !important;
  font-weight: 600;
  padding: 12px 15px;
}

.table td {
  border-color: var(--light-border) !important;
  transition: background-color 0.3s;
  padding: 12px 15px;
}

.table-hover tbody tr:hover {
  background-color: var(--light-hover-bg) !important;
}

/* 按钮样式 */
.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--light-primary), #4096ff);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4096ff, #69b1ff);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(22, 119, 255, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, var(--light-success), #73d13d);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #73d13d, #95de64);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(82, 196, 26, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, var(--light-info), #36b3c5);
  border: none;
}

.btn-info:hover {
  background: linear-gradient(135deg, #36b3c5, #54c6d0);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(23, 162, 184, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, var(--light-warning), #fcb322);
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #fcb322, #ffd666);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(250, 173, 20, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--light-danger), #ff7875);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ff7875, #ffa39e);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 77, 79, 0.3);
}

/* 次要按钮 - 修复对比度问题 */
.btn-secondary {
  background-color: #ffffff !important;
  border: 1px solid #d9d9d9 !important;
  color: #1f2329 !important;
}

.btn-secondary:hover {
  border-color: #1677ff !important;
  color: #1677ff !important;
  background-color: #f0f7ff !important;
}

/* 轮廓按钮 - 修复对比度问题 */
.btn-outline-secondary {
  background-color: transparent !important;
  border: 1px solid #595959 !important;
  color: #595959 !important;
}

.btn-outline-secondary:hover {
  background-color: #595959 !important;
  border-color: #595959 !important;
  color: #ffffff !important;
}

/* 表单控件样式 */
.form-control {
  background-color: #ffffff !important;
  border: 1px solid var(--light-border) !important;
  color: var(--light-text) !important;
  border-radius: 6px;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  background-color: #ffffff !important;
  border-color: var(--light-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(22, 119, 255, 0.25) !important;
  color: var(--light-text);
  outline: 0;
}

.form-select {
  background-color: #ffffff !important;
  border: 1px solid var(--light-border) !important;
  color: var(--light-text) !important;
  border-radius: 6px;
  padding: 0.75rem;
}

.form-select:focus {
  background-color: #ffffff !important;
  border-color: var(--light-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(22, 119, 255, 0.25) !important;
  outline: 0;
}

/* 标签徽章样式 - 优化版 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
  font-weight: 500;
  line-height: 1.5;
  min-height: 28px;
  min-width: 90px;  /* 统一最小宽度 */
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
}

/* 徽章内的图标样式 */
.badge i {
  font-size: 12px;
  margin-right: 4px;
}

/* 成功徽章 - 浅绿底深绿字 */
.badge.bg-success {
  background-color: #f6ffed !important;
  color: #389e0d !important;
  border-color: #b7eb8f;
}

.badge.bg-success i {
  color: #52c41a;
}

/* 深色徽章 - 用于编号等 */
.badge.bg-dark {
  background-color: #f5f5f5 !important;
  color: #595959 !important;
  border-color: #d9d9d9;
}

/* 主要徽章 - 蓝色 */
.badge.bg-primary {
  background-color: #e6f7ff !important;
  color: #096dd9 !important;
  border-color: #91d5ff;
}

/* 警告徽章 - 黄色 */
.badge.bg-warning {
  background-color: #fffbe6 !important;
  color: #d48806 !important;
  border-color: #ffe58f;
}

/* 危险徽章 - 红色 */
.badge.bg-danger {
  background-color: #fff2f0 !important;
  color: #cf1322 !important;
  border-color: #ffccc7;
}

/* 信息徽章 - 青色 */
.badge.bg-info {
  background-color: #e6fffb !important;
  color: #08979c !important;
  border-color: #87e8de;
}

/* 次要徽章 - 灰色 */
.badge.bg-secondary {
  background-color: #f5f5f5 !important;
  color: #8c8c8c !important;
  border-color: #d9d9d9;
}

/* 浅色徽章 */
.badge.bg-light {
  background-color: #fafafa !important;
  color: #595959 !important;
  border-color: #e8e8e8;
}

.status-not-started {
  background: linear-gradient(135deg, var(--light-warning), #fcb322) !important;
  color: white;
  box-shadow: 0 2px 5px rgba(250, 173, 20, 0.3);
}

.status-in-progress {
  background: linear-gradient(135deg, var(--light-primary), #4096ff) !important;
  color: white;
  box-shadow: 0 2px 5px rgba(22, 119, 255, 0.3);
}

.status-completed {
  background: linear-gradient(135deg, var(--light-success), #73d13d) !important;
  color: white;
  box-shadow: 0 2px 5px rgba(82, 196, 26, 0.3);
}

/* 进度条样式 */
.progress {
  background: #e6e6e6 !important;
  border-radius: 10px;
  height: 12px;
  overflow: visible;
}

.progress-bar {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--light-primary), #4096ff) !important;
  box-shadow: 0 2px 10px rgba(22, 119, 255, 0.3);
}

/* 警告提示框 */
.alert {
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--light-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-primary {
  background: linear-gradient(135deg, #e6f4ff, #d1e7ff) !important;
  color: var(--light-primary);
  border-left: 4px solid var(--light-primary);
}

.alert-success {
  background: linear-gradient(135deg, #f6ffed, #d9f7be) !important;
  color: var(--light-success);
  border-left: 4px solid var(--light-success);
}

.alert-warning {
  background: linear-gradient(135deg, #fffbe6, #fff1b8) !important;
  color: var(--light-warning);
  border-left: 4px solid var(--light-warning);
}

.alert-danger {
  background: linear-gradient(135deg, #fff2f0, #ffccc7) !important;
  color: var(--light-danger);
  border-left: 4px solid var(--light-danger);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--light-primary);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-element {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--light-border);
    border-radius: 0;
    padding-top: 0;
  }
  
  .main-content {
    margin-left: 0;
    padding-top: 100px; /* 确保移动端有足够的顶部空间 */
  }
  
  .container-fluid {
    padding: 1rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
}

/* 针对中等屏幕的额外样式 */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    padding-top: 75px; /* 中等屏幕的适中填充 */
  }
}

/* 针对大屏幕的样式 */
@media (min-width: 1200px) {
  .main-content {
    padding-top: 80px; /* 大屏幕保持较大填充 */
  }
}

/* 特殊效果类 */
.light-pulse {
  animation: lightPulse 2s infinite;
}

@keyframes lightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(22, 119, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 119, 255, 0);
  }
}

/* 简道云风格的卡片网格布局 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.grid-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid var(--light-border);
}

.grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--light-primary);
}

.grid-card h5 {
  color: var(--light-text);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.grid-card p {
  color: var(--light-text-secondary);
  font-size: 0.9rem;
}

/* 数据统计卡片 */
.stat-card {
  background: linear-gradient(135deg, #ffffff, #fafafa);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--light-border);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--light-primary);
  margin: 0.5rem 0;
}

.stat-title {
  color: var(--light-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-trend {
  font-size: 0.85rem;
  font-weight: 500;
}

.trend-up {
  color: var(--light-success);
}

.trend-down {
  color: var(--light-danger);
}

/* 表单增强样式 */
.form-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--light-border);
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-primary);
  display: inline-block;
}

/* 按钮组样式 */
.btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* 搜索框样式 */
.search-input {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--light-border);
  background: white;
}

.search-input:focus {
  border-color: var(--light-primary);
  box-shadow: 0 0 0 0.2rem rgba(22, 119, 255, 0.25);
}

/* 面包屑导航 */
.breadcrumb {
  background-color: white !important;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--light-border);
}