:root{
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --card-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  --card-hover-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
  --text-dark: #2d3748;
  --text-muted: #718096;
  --border-color: #e2e8f0;
}

/* 现代化渐变背景 */
.body-bg{
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 主容器 - 白色卡片风格 */
.modern-container{
  width: min(1200px, 100%);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  padding: 32px;
  animation: fadeInUp 0.6s ease;
}

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

/* 标题区域 */
.header-title{
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 2rem;
}

/* 卡片样式 - 清爽白色带渐变边框 */
.modern-card{
  background: #ffffff;
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modern-card::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-card:hover::before{
  opacity: 1;
}

.modern-card:hover{
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-4px);
}

.modern-card .card-body{
  padding: 24px;
}

.modern-card .card-title{
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.modern-card .card-title i{
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 表单控件 */
.form-label{
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

input.form-control{
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

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

/* 按钮样式 */
.btn-primary{
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-outline-secondary{
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover{
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
}

/* 徽章样式 */
.badge-cleanup{
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

/* 表格样式 */
.table{
  margin-bottom: 0;
}

.table thead th{
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  color: var(--text-dark);
  font-weight: 700;
  border: none;
  padding: 14px 12px;
  font-size: 0.9rem;
}

.table tbody td{
  padding: 14px 12px;
  vertical-align: middle;
  border-color: var(--border-color);
  color: var(--text-dark);
}

.table tbody tr{
  transition: background-color 0.2s ease;
}

.table tbody tr:hover{
  background-color: #f7fafc;
}

.btn-sm{
  border-radius: 8px;
  font-weight: 600;
  padding: 6px 14px;
  transition: all 0.2s ease;
}

.btn-info{
  background: var(--success-gradient);
  border: none;
  color: white;
}

.btn-info:hover{
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

/* 输入组样式 */
.input-group-text{
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-dark);
}

/* 移动端优化 */
@media (max-width: 768px){
  .modern-container{
    padding: 16px;
    border-radius: 16px;
  }
  
  .header-title{
    font-size: 1.4rem;
    margin-bottom: 24px;
  }
  
  /* 增加卡片间距 */
  .row.g-3{
    row-gap: 24px !important;
  }
  
  .modern-card .card-body{
    padding: 16px;
  }
  
  .modern-card .card-title{
    font-size: 1rem;
  }
  
  /* 历史记录标题和搜索区域 */
  .history-header{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px;
  }
  
  .input-group{
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: nowrap;
  }
  
  .input-group-text{
    font-size: 0.85rem;
    padding: 8px 10px;
    white-space: nowrap;
  }
  
  /* 表格优化 - 隐藏部分列并调整宽度 */
  .table{
    font-size: 0.8rem;
  }
  
  .table thead th{
    padding: 8px 6px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .table tbody td{
    padding: 8px 6px;
    font-size: 0.8rem;
  }
  
  /* 隐藏创建时间列，只保留最后修改 */
  .table th:nth-child(3),
  .table td:nth-child(3){
    display: none;
  }
  
  /* 调整员工名字和员工号列宽 */
  .table th:nth-child(1),
  .table td:nth-child(1){
    min-width: 60px;
    max-width: 80px;
  }
  
  .table th:nth-child(2),
  .table td:nth-child(2){
    min-width: 50px;
    max-width: 70px;
  }
  
  /* 最后修改时间列 */
  .table th:nth-child(4),
  .table td:nth-child(4){
    font-size: 0.7rem;
    min-width: 80px;
  }
  
  /* 物品总数列 */
  .table th:nth-child(5),
  .table td:nth-child(5){
    min-width: 45px;
    text-align: center;
  }
  
  /* 操作按钮列 */
  .table th:nth-child(6),
  .table td:nth-child(6){
    min-width: 60px;
  }
  
  .btn-sm{
    font-size: 0.75rem;
    padding: 5px 10px;
    white-space: nowrap;
  }
  
  input.form-control{
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  
  .btn-primary{
    padding: 12px 18px;
    font-size: 0.95rem;
  }
  
  .form-label{
    font-size: 0.85rem;
    margin-bottom: 6px;
  }
}

/* 超小屏幕优化 */
@media (max-width: 576px){
  .body-bg{
    padding: 10px;
  }
  
  .modern-container{
    padding: 14px;
  }
  
  .header-title{
    font-size: 1.3rem;
    margin-bottom: 20px;
  }
  
  /* 进一步增加卡片间距 */
  .row.g-3{
    row-gap: 28px !important;
  }
  
  .table-responsive{
    border-radius: 8px;
    margin: 0 -16px;
    padding: 0 16px;
  }
  
  /* 进一步缩小表格字体 */
  .table{
    font-size: 0.75rem;
  }
  
  .table thead th{
    padding: 6px 4px;
    font-size: 0.7rem;
  }
  
  .table tbody td{
    padding: 6px 4px;
    font-size: 0.75rem;
  }
  
  .btn-sm{
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}

/* 确保表格最后一列（操作列）在移动端不会太挤 */
.table td:last-child, .table th:last-child {
    white-space: nowrap;
    min-width: 130px;
    text-align: right;
}

/* 优化移动端表格滚动体验 */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
