/* index.css - 员工业绩公示页面样式 */

/* 标签页美化 */
.tab-nav {
    background: white;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.tab-btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: rgba(0, 123, 255, 0.05);
    color: var(--primary-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

/* 内容区域美化 */
.tab-content {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* 移动端适配 */
@media (max-width: 768px) {
    .tab-nav {
        margin: 10px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .tab-content {
        margin: 10px;
        padding: 15px;
    }
}

/* 月份选择器样式 */
.month-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: center;
}

.month-selector {
    margin-right: 15px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.performance-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 15px;
}

/* 业绩奖卡按钮 */
.reward-card-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.reward-card-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

/* 业绩列表 */
#performance-list {
    display: grid;
    gap: 15px;
    justify-items: center;
}

/* 员工卡片样式 */
.employee-card {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.employee-card .medal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    opacity: 0.7;
}

.employee-card.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), transparent);
    border-left-color: var(--gold-color);
}

.employee-card.gold .medal::after {
    content: '🥇';
}

.employee-card.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), transparent);
    border-left-color: var(--silver-color);
}

.employee-card.silver .medal::after {
    content: '🥈';
}

.employee-card.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), transparent);
    border-left-color: var(--bronze-color);
}

.employee-card.bronze .medal::after {
    content: '🥉';
}

.employee-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.employee-info h2 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.employee-details {
    color: #666;
}

.employee-details p {
    margin: 5px 0;
    font-size: 1.1rem;
}

/* 进度条样式优化 */
.progress-bar {
    height: 24px;
    border-radius: 12px;
    background: #f0f0f0;
    margin: 15px 0 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    position: relative;
    overflow: hidden;
    min-width: 30px; /* 确保即使进度很小也有最小宽度 */
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
    z-index: 2;
    width: 100%;
    text-align: center;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%
    );
    background-size: 20px 20px;
    animation: progressAnimation 1s linear infinite;
}

@keyframes progressAnimation {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* 周期统计项样式 */
.period-stats {
    gap: 12px;
    margin-top: 15px;
}

.period-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.period-stat {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

/* 完成周奖励的 period-stat 显示为绿色 */
.period-stat.achieved {
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    color: #2e7d32;
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}


/* 特殊奖励项目美化 */
.period-stat.weekly-reward,
.period-stat.target-reward,
.period-stat.top-seller-reward {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #81c784;
    position: relative;
    overflow: hidden;
}

.period-stat.weekly-reward::before,
.period-stat.target-reward::before,
.period-stat.top-seller-reward::before {
    content: '🏆';
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 16px;
    opacity: 0.5;
}

/* 统计项内部样式增强 */
.period-stat .stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.period-stat .stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

/* 有奖励时的文字颜色 */
.period-stat.has-reward .stat-value {
    color: #2e7d32;
}

/* 考勤数据样式 */
.attendance-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attendance-summary:hover {
    background: #f0f8ff;
}

.attendance-summary .stat-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.attendance-summary .label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.attendance-summary .value {
    color: #2196F3;
    font-size: 1.2em;
    font-weight: bold;
}



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

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

.attendance-details th,
.attendance-details td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.attendance-details th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.attendance-details tr:hover {
    background: #f8f9fa;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .performance-container {
        padding: 10px;
    }

    .month-info h2 {
        font-size: 1.5rem;
    }

    .employee-card {
        padding: 15px;
    }

    .employee-info h2 {
        font-size: 1.2rem;
    }

    .employee-details p {
        font-size: 1rem;
    }
    
    .attendance-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .performance-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 隐藏表格视图 */
    #performance-table {
        display: none;
    }

    /* 优化卡片容器布局 */
    #performance-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    /* 确保卡片只显示一次 - 仅针对业绩排名页面 */
    #performance .employee-card {
        width: 100%;
        max-width: 500px;
        margin-bottom: 10px;
    }

    /* 隐藏重复的卡片 - 仅针对业绩排名页面 */
    #performance .employee-card + .employee-card {
        display: none;
    }

    /* 优化详情容器布局 */
    .employee-details-container {
        width: 100%;
        max-width: 500px;
        margin: 0 auto 15px;
    }
}

@media (min-width: 769px) {
    /* 桌面端正常显示 */
    #performance-list {
        display: grid;
        gap: 15px;
        justify-items: center;
    }
}

@media (max-width: 480px) {
    .period-stats {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .attendance-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .attendance-summary .stat-item:nth-child(3),
    .attendance-summary .stat-item:nth-child(4) {
        grid-column: span 1;
    }

    .performance-summary {
        grid-template-columns: 1fr;
    }
}

/* employee-performance-details 美化 */
.employee-performance-details {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease;
    overflow: hidden;
}

.employee-performance-details h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* performance-summary 每行三个信息 */
.performance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
    justify-items: center;
}

.performance-summary .stat-item {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), transparent);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--gold-color);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.performance-summary .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), transparent);
}

.performance-summary .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.performance-summary .value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.05);
}

/* 添加微光动画效果 */
.performance-summary .stat-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 215, 0, 0),
        rgba(255, 215, 0, 0.1),
        rgba(255, 215, 0, 0)
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { 
        transform: translate(-100%, -100%) rotate(45deg);
    }
    50% {
        transform: translate(0%, 0%) rotate(45deg);
    }
    100% { 
        transform: translate(100%, 100%) rotate(45deg);
    }
}

/* 确保daily-records显示宽度与employee-card一致 */
#daily-records-1, 
#daily-records-2,
#daily-records-3,
#daily-records-4 {
    width: 100%;
    max-width: 500px;
    margin: 15px auto;
    background: white;
    border-radius: 8px;
    padding: 0px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 美化表格样式 */
#daily-records-1 table, 
#daily-records-2 table,
#daily-records-3 table,
#daily-records-4 table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#daily-records-1 th, 
#daily-records-2 th,
#daily-records-3 th,
#daily-records-4 th {
    background: linear-gradient(to bottom, #f8f9fa, #f1f3f5);
    padding: 10px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid #eee;
}

#daily-records-1 td, 
#daily-records-2 td,
#daily-records-3 td,
#daily-records-4 td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

#daily-records-1 tr:hover, 
#daily-records-2 tr:hover,
#daily-records-3 tr:hover,
#daily-records-4 tr:hover {
    background-color: rgba(0, 123, 255, 0.03);
}

/* 周期奖励行美化 */
.period-reward-row {
    background-color: rgba(76, 175, 80, 0.08);
    font-weight: 500;
}

/* 总计行美化 */
.total-row {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* 确保employee-details-container宽度与employee-card一致 */
.employee-details-container {
    width: 100%;
    max-width: 500px;
    margin: 15px auto;
    background: white;
    border-radius: 8px;
    padding: 0px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 考勤列表居中显示 */
#attendance-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    gap: 15px;
}

.attendance-container .employee-card {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.attendance-container .employee-info {
    margin-bottom: 15px;
}

.attendance-container .employee-info h2 {
    color: #333;
    font-size: 1.2rem;
    margin: 0;
}

.attendance-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attendance-summary:hover {
    background: #f8f9fa;
}

.attendance-summary .stat-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.attendance-summary .label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.attendance-summary .value {
    color: #2196F3;
    font-size: 1.2em;
    font-weight: bold;
}

.text-red {
    color: #f44336 !important;
}

.text-yellow {
    color: #ffc107 !important;
}

.text-blue {
    color: #2196F3 !important;
}

.text-green {
    color: #4CAF50 !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .attendance-container {
        padding: 10px;
    }

    .attendance-container .employee-card {
        margin-bottom: 10px;
    }

    .attendance-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .attendance-summary .stat-item {
        padding: 8px;
    }

    .attendance-summary .label {
        font-size: 0.85em;
    }

    .attendance-summary .value {
        font-size: 1.1em;
    }

    .attendance-details table {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .attendance-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .attendance-summary .stat-item:nth-child(3),
    .attendance-summary .stat-item:nth-child(4) {
        grid-column: span 1;
    }
}

/* 奖励详情页面样式 */
.rewards-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.rewards-content {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.rewards-settings h3,
.monthly-performance h3 {
  color: #333;
  font-size: 1.5em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

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

.rewards-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.rewards-section:hover {
  transform: translateY(-5px);
}

.rewards-section h4 {
  color: #2c3e50;
  font-size: 1.2em;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

.reward-label {
  color: #666;
  font-size: 0.9em;
}

.reward-value {
  color: #e74c3c;
  font-weight: bold;
}

.monthly-performance {
  background: #fff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
}

.monthly-performance h3 {
  color: #2c3e50;
  font-size: 1.6em;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
  text-align: center;
  position: relative;
}

.monthly-performance h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(to right, #4a90e2, #357abd);
}

.performance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 10px;
}

.performance-stat-item {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.performance-stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.performance-stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #4a90e2, #357abd);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.performance-stat-item:hover::before {
  opacity: 1;
}

.stat-name {
  color: #4a5568;
  font-size: 1em;
  font-weight: 500;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.stat-value {
  color: #2c3e50;
  font-size: 1.4em;
  font-weight: bold;
  background: linear-gradient(45deg, #4a90e2, #357abd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 动画效果定义 */
@keyframes shimmer {
  0% { 
    transform: translate(-100%, -100%) rotate(45deg);
  }
  50% {
    transform: translate(0%, 0%) rotate(45deg);
  }
  100% { 
    transform: translate(100%, 100%) rotate(45deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.2);
  }
  50% {
    box-shadow: 0 8px 40px rgba(74, 144, 226, 0.4);
  }
  100% {
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.2);
  }
}

/* 公司总业绩样式优化 */
.total-company-sales {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #4a90e2, #357abd) !important;
  color: white;
  padding: 25px !important;
  margin-top: 25px;
  box-shadow: 0 8px 30px rgba(74, 144, 226, 0.2) !important;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  border: none !important;
  transform: none !important;
  animation: pulse 2s infinite;
}

.total-company-sales::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite ease-in-out;
  pointer-events: none;
}

.total-company-sales::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(45deg);
  animation: shimmer 3s infinite ease-in-out 1.5s;
  pointer-events: none;
}

.total-company-sales .stat-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2em;
  font-weight: 500;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.total-company-sales .stat-value {
  color: white;
  font-size: 2em;
  font-weight: bold;
  background: none;
  -webkit-text-fill-color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

/* 移动端适配优化 */
@media (max-width: 768px) {
  .monthly-performance {
    padding: 20px;
    margin-top: 20px;
  }

  .monthly-performance h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
  }

  .performance-stats {
    gap: 15px;
    padding: 5px;
  }

  .performance-stat-item {
    padding: 15px;
  }

  .stat-name {
    font-size: 0.95em;
  }

  .stat-value {
    font-size: 1.3em;
  }

  .total-company-sales {
    padding: 20px !important;
    margin-top: 20px;
  }

  .total-company-sales .stat-name {
    font-size: 1.1em;
  }

  .total-company-sales .stat-value {
    font-size: 1.8em;
  }
}

/* 奖励设置美化 */
.rewards-settings h3 {
  color: #2c3e50;
  font-size: 1.6em;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
  text-align: center;
  position: relative;
}

.rewards-settings h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(to right, #4a90e2, #357abd);
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.rewards-section {
  background: #fff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.rewards-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, #4a90e2, #357abd);
  border-radius: 15px 15px 0 0;
}

.rewards-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.rewards-section h4 {
  color: #2c3e50;
  font-size: 1.3em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  text-align: center;
  font-weight: 600;
}

.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: linear-gradient(to right, #f8f9fa, #f3f4f6);
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.reward-item:hover {
  background: linear-gradient(to right, #f3f4f6, #ebedf0);
  transform: translateX(5px);
}

.reward-label {
  color: #4a5568;
  font-size: 0.95em;
  font-weight: 500;
}

.reward-value {
  color: #e74c3c;
  font-weight: 600;
  font-size: 1.1em;
  padding: 4px 12px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 20px;
}

/* 为不同类型的奖励设置不同的颜色 */
.rewards-section.daily-rewards::before {
  background: linear-gradient(to right, #4caf50, #43a047);
}

.rewards-section.weekly-rewards::before {
  background: linear-gradient(to right, #2196f3, #1976d2);
}

.rewards-section.monthly-rewards::before {
  background: linear-gradient(to right, #9c27b0, #7b1fa2);
}

.rewards-section.top-seller-rewards::before {
  background: linear-gradient(to right, #f44336, #d32f2f);
}

/* 为不同类型的奖励设置不同的值颜色 */
.daily-rewards .reward-value {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

.weekly-rewards .reward-value {
  color: #2196f3;
  background: rgba(33, 150, 243, 0.1);
}

.monthly-rewards .reward-value {
  color: #9c27b0;
  background: rgba(156, 39, 176, 0.1);
}

.top-seller-rewards .reward-value {
  color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

/* 移动端适配优化 */
@media (max-width: 768px) {
  .rewards-settings h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  .rewards-grid {
    gap: 20px;
  }

  .rewards-section {
    padding: 20px;
  }

  .rewards-section h4 {
    font-size: 1.2em;
    margin-bottom: 15px;
  }

  .reward-item {
    padding: 10px 12px;
  }

  .reward-label {
    font-size: 0.9em;
  }

  .reward-value {
    font-size: 1em;
    padding: 3px 10px;
  }
}

.account-name {
    color: #999;
    font-size: 0.8em;
    margin-left: 5px;
    font-weight: normal;
}

/* 业绩列表详情样式 */
.performance-details-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.performance-details-header {
  text-align: center;
  margin-bottom: 20px;
}

.performance-details-header h2 {
  color: #e74c3c;
  font-size: 1.8em;
  font-weight: bold;
  margin: 0;
}

.performance-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.performance-details-table th {
  background-color: #f5f5f5;
  padding: 12px 15px;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.performance-details-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.performance-details-table tr:hover {
  background-color: #f9f9f9;
}

.current-week {
  position: relative;
  color: #0080ff;
  font-weight: bold;
}

.current-week::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0080ff;
}

.gold-employee {
  background-color: rgba(255, 215, 0, 0.1);
}

.silver-employee {
  background-color: rgba(192, 192, 192, 0.1);
}

.bronze-employee {
  background-color: rgba(205, 127, 50, 0.1);
}

.employee-name {
  font-weight: bold;
  text-align: left;
}

.employee-account {
  color: #666;
  text-align: left;
  font-size: 0.9em;
}

.week-performance {
  color: #0080ff;
  font-weight: bold;
}

.current-week-cell {
  background-color: rgba(0, 128, 255, 0.08);
  cursor: pointer;
  position: relative;
  border-left: 2px solid #0080ff;
  transition: all 0.3s ease;
}

.current-week-cell:hover {
  background-color: rgba(0, 128, 255, 0.12);
}

.current-week-cell .day-details {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-align: left;
  min-width: 150px;
  max-width: 200px;
}

.current-week-cell:hover .day-details {
  display: block;
}

.day-record {
  padding: 4px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.day-record:last-child {
  border-bottom: none;
}

.day-record:hover {
  background-color: #f5f5f5;
}

.total-performance {
  font-weight: bold;
  color: #ff5500;
}

.target-performance {
  color: #666;
  text-align: center;
  padding: 8px 4px;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.target-completed {
  color: #2e7d32;
  font-weight: bold;
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 3px solid #4caf50;
}

.target-completed::before {
  content: "✓";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  color: #4caf50;
  font-weight: bold;
  font-size: 0.9em;
}

.target-percentage {
  font-size: 0.85em;
  margin-top: 5px;
  display: block;
  position: relative;
  padding-top: 3px;
}

.target-percentage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #f0f0f0;
  border-radius: 2px;
}

.target-percentage::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  border-radius: 2px;
  background-color: #ff5722;
  width: var(--percent, 0%);
  transition: width 1s ease;
}

.target-completed .target-percentage {
  color: #2e7d32;
}

.target-completed .target-percentage::after {
  background-color: #4caf50;
  animation: targetPulse 2s infinite;
}

/* 目标达成高亮动画 */
@keyframes targetPulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* 近达成但未达成的目标样式 (90%以上) */
.target-near-completed {
  color: #ff6d00;
  background-color: rgba(255, 153, 0, 0.1);
  border-left: 3px solid #ff9800;
}

.target-near-completed .target-percentage {
  color: #ff6d00;
}

.target-near-completed .target-percentage::after {
  background-color: #ff9800;
}

/* 日期详情弹窗 */
.day-details-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.day-details-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 101;
  min-width: 300px;
  max-width: 80%;
}

.day-details-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.day-details-popup h3 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  color: #333;
}

.day-details-popup table {
  width: 100%;
  border-collapse: collapse;
}

.day-details-popup th,
.day-details-popup td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

.day-details-popup th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.day-top-performer {
  background-color: rgba(255, 215, 0, 0.1);
}

/* 移动端业绩列表详情优化 */
@media (max-width: 768px) {
  /* 容器基础样式优化 */
  .performance-details-container {
    padding: 10px;
  }
  
  .performance-details-header h2 {
    font-size: 1.4em;
  }
  
  /* 表格容器添加横向滚动支持 */
  #performance-details-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* 为iOS提供平滑滚动 */
    margin-bottom: 20px;
    /* 显示滚动提示 */
    background-image: linear-gradient(to right, #f1f1f1 0%, rgba(255, 255, 255, 0) 20%),
                      linear-gradient(to left, #f1f1f1 0%, rgba(255, 255, 255, 0) 20%);
    background-position: 0 0, 100% 0;
    background-repeat: no-repeat;
    background-size: 15px 100%;
  }

  /* 表格样式优化 */
  .performance-details-table {
    width: 100%;
    min-width: 650px; /* 确保表格内容不会被压缩得太小 */
    font-size: 0.8em;
  }
  
  .performance-details-table th,
  .performance-details-table td {
    padding: 8px 4px;
    line-height: 1.3;
  }
  
  /* 员工名称和账号列宽度适应 */
  .performance-details-table th:first-child,
  .performance-details-table td:first-child {
    min-width: 70px;
    max-width: 100px;
  }
  
  .performance-details-table th:nth-child(2),
  .performance-details-table td:nth-child(2) {
    min-width: 70px;
    max-width: 90px;
  }
  
  /* 数据列宽度固定 */
  .performance-details-table th:nth-child(n+3),
  .performance-details-table td:nth-child(n+3) {
    min-width: 60px;
    width: 60px;
  }
  
  /* 文本溢出处理 */
  .employee-name,
  .employee-account {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
  }
  
  /* 日期详情弹窗优化 */
  .day-details-popup {
    width: 90%;
    max-width: 350px;
    padding: 15px;
  }
  
  .day-details-popup h3 {
    font-size: 1.1em;
  }
  
  .day-details-popup table {
    font-size: 0.9em;
  }
  
  .day-details-popup th,
  .day-details-popup td {
    padding: 6px 8px;
  }
}

/* 小屏手机额外优化 */
@media (max-width: 480px) {
  .performance-details-header h2 {
    font-size: 1.2em;
  }
  
  .performance-details-table {
    min-width: 600px;
    font-size: 0.75em;
  }
  
  .day-details-popup {
    max-width: 300px;
    padding: 12px;
  }
  
  /* 为小屏幕手机提供更明显的滚动提示 */
  #performance-details-table-container::after {
    content: '← 左右滑动查看更多 →';
    display: block;
    text-align: center;
    color: #999;
    padding: 8px;
    font-size: 0.8em;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-top: 10px;
  }
}

/* 目标完成率样式 */
.target-percentage {
  font-size: 0.8em;
  color: #999;
  margin-top: 3px;
  display: block;
}

.target-completed .target-percentage {
  color: #4caf50;
}

/* 所有周的单元格样式 */
.week-detail-cell {
  background-color: rgba(0, 128, 255, 0.02);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.week-detail-cell:hover {
  background-color: rgba(0, 128, 255, 0.08);
}

.week-detail-cell .day-details {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-align: left;
  min-width: 150px;
  max-width: 200px;
}

.week-detail-cell:hover .day-details {
  display: block;
}

/* 美化当前周样式 */
.current-week-cell {
  background-color: rgba(0, 128, 255, 0.08);
  cursor: pointer;
  position: relative;
  border-left: 2px solid #0080ff;
  transition: all 0.3s ease;
}

.current-week-cell:hover {
  background-color: rgba(0, 128, 255, 0.12);
}

/* 优化周业绩单元格布局 */
.week-performance {
  position: relative;
}

.week-total {
  font-weight: bold;
  color: #0080ff;
}

/* 调整日期详情样式 */
.day-details {
  min-width: 120px;
  max-height: none; /* 移除最大高度限制 */
  overflow-y: visible; /* 改为可见溢出，不使用滚动条 */
  border-radius: 6px;
  border: 1px solid #eaeaea;
}

/* 移除滚动条样式 */
/* 
.day-details::-webkit-scrollbar {
  width: 4px;
}

.day-details::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.day-details::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.day-details::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}
*/ 