.designer-calendar-container {
  .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    
    .header-left {
      h4 {
        font-size: 16px;
        font-weight: 600;
        color: #1a1a1a;
        margin: 0 0 4px 0;
      }
      
      p {
        font-size: 13px;
        color: #666;
        margin: 0;
      }
    }
    
    .header-actions {
      display: flex;
      gap: 12px;
      
      .btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s ease;
        
        &.btn-secondary {
          background: #f8fafc;
          color: #475569;
          border: 1px solid #e2e8f0;
          
          &:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
          }
        }
      }
    }
  }
}

.calendar-filters {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
  
  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    
    .filter-label {
      font-size: 13px;
      font-weight: 500;
      color: #374151;
    }
    
    .filter-select {
      padding: 8px 12px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 14px;
      background: #ffffff;
      min-width: 200px;
      transition: all 0.2s ease;
      
      &::placeholder {
        color: #9ca3af;
      }
      
      &:focus {
        outline: none;
        border-color: #4f46e5;
        box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
      }
    }
    
    .checkbox-label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: 14px;
      color: #374151;
      margin-top: 20px;
      
      input[type="checkbox"] {
        display: none;
      }
      
      .checkmark {
        width: 18px;
        height: 18px;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        position: relative;
        transition: all 0.2s ease;
        
        &::after {
          content: '';
          position: absolute;
          left: 5px;
          top: 2px;
          width: 4px;
          height: 8px;
          border: solid white;
          border-width: 0 2px 2px 0;
          transform: rotate(45deg);
          opacity: 0;
          transition: opacity 0.2s ease;
        }
      }
      
      input:checked + .checkmark {
        background: #4f46e5;
        border-color: #4f46e5;
        
        &::after {
          opacity: 1;
        }
      }
    }
  }
}

// 日历视图样式
.calendar-view {
  .calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    
    .nav-btn {
      width: 36px;
      height: 36px;
      border: 1px solid #e2e8f0;
      background: white;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease;
      
      &:hover {
        border-color: #4f46e5;
        color: #4f46e5;
      }
    }
    
    .current-period {
      font-size: 18px;
      font-weight: 600;
      color: #1e293b;
      margin: 0;
      min-width: 200px;
      text-align: center;
    }
  }
  
  .calendar-grid {
    --date-col-width: 120px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    background: white;
    box-sizing: border-box;
    * { box-sizing: border-box; }
    
    .calendar-header-row {
      display: flex;
      background: #f8fafc;
      border-bottom: 1px solid #e2e8f0;
      
      .designer-column {
        flex: 0 0 200px;
        min-width: 200px;
        padding: 12px 16px;
        font-weight: 600;
        color: #374151;
        border-right: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
      }
      
      .date-column {
        flex: 0 0 var(--date-col-width);
        min-width: var(--date-col-width);
        padding: 12px 8px;
        text-align: center;
        border-right: 1px solid #e2e8f0;
        
        &:last-child {
          border-right: none;
        }
        
        .date-label {
          font-size: 14px;
          font-weight: 600;
          color: #1e293b;
          margin-bottom: 2px;
        }
        
        .weekday-label {
          font-size: 12px;
          color: #64748b;
        }
      }
    }
    
    .calendar-row {
      display: flex;
      border-bottom: 1px solid #e2e8f0;
      
      &:last-child {
        border-bottom: none;
      }
      
      .designer-cell {
        flex: 0 0 200px;
        min-width: 200px;
        padding: 16px;
        border-right: 1px solid #e2e8f0;
        
        .designer-info {
          display: flex;
          align-items: center;
          gap: 12px;
          
          .designer-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            overflow: hidden;
            flex-shrink: 0;
            
            img {
              width: 100%;
              height: 100%;
              object-fit: cover;
            }
          }
          
          .designer-details {
            flex: 1;
            
            .designer-name {
              font-size: 14px;
              font-weight: 600;
              color: #1e293b;
              margin-bottom: 4px;
            }
            
            .designer-group {
              font-size: 12px;
              color: #64748b;
              margin-bottom: 6px;
            }
            
            .designer-stats {
              display: flex;
              flex-direction: column;
              gap: 2px;
              
              .stat-item {
                font-size: 11px;
                color: #64748b;
                
                &.critical {
                  color: #dc2626;
                  font-weight: 500;
                }
                
                &.warning {
                  color: #d97706;
                  font-weight: 500;
                }
              }
            }
          }
        }
      }
      
      .date-cell {
        flex: 0 0 var(--date-col-width);
        min-width: var(--date-col-width);
        padding: 12px 8px;
        border-right: 1px solid #e2e8f0;
        
        &:last-child {
          border-right: none;
        }
        
        .date-content {
          height: 40px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 4px;
          position: relative;
          
          &.available-day {
            background: #f0fdf4;
            border: 1px dashed #bbf7d0;
          }
          
          /* 新增：按日可用性颜色编码 */
          &.availability-free {
            background: #f0fdf4;
            border: 1px dashed #bbf7d0;
          }
          
          &.availability-partial {
            background: #fff7ed;
            border: 1px dashed #fed7aa;
          }
          
          &.availability-booked {
            background: #fef2f2;
            border: 1px solid #fecaca;
          }
          
          &.has-events {
            background: #eff6ff;
            border: 1px solid #dbeafe;
          }
          
          &.review-day {
            background: #fef3c7;
            border: 1px solid #fcd34d;
          }
          
          &.project-day {
            background: #e0e7ff;
            border: 1px solid #c7d2fe;
          }
          
          &.vacation-day {
            background: #f3f4f6;
            border: 1px solid #d1d5db;
          }
          
          &.today {
            box-shadow: 0 0 0 2px #4f46e5;
          }
          
          .event-indicators {
            display: flex;
            gap: 4px;
            flex-wrap: wrap;
            
            .event-indicator {
              width: 20px;
              height: 20px;
              border-radius: 4px;
              display: flex;
              align-items: center;
              justify-content: center;
              font-size: 10px;
              font-weight: 600;
              color: white;
              
              &.event-project {
                background: #4f46e5;
              }
              
              &.event-review {
                background: #f59e0b;
              }
              
              &.event-vacation {
                background: #6b7280;
              }
            }
          }
          
          .empty-indicator {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #e5e7eb;
          }
          .events-popover {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(8px);
            min-width: 180px;
            background: #1f2937;
            color: #f9fafb;
            padding: 8px 10px;
            border-radius: 6px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
            opacity: 0;
            pointer-events: none;
            z-index: 20;
            transition: opacity 0.2s ease, transform 0.2s ease;
            
            .popover-item {
              display: flex;
              flex-direction: column;
              gap: 4px;
              padding: 6px 0;
              border-bottom: 1px solid rgba(255, 255, 255, 0.1);
              
              &:last-child {
                border-bottom: none;
              }
              
              .popover-title {
                font-size: 12px;
                font-weight: 600;
              }
              
              .popover-meta {
                font-size: 11px;
                color: #d1d5db;
              }
            }
          }
          
          &:hover {
            box-shadow: 0 0 0 2px #4f46e5;
            
            .events-popover {
              opacity: 1;
              transform: translateX(-50%) translateY(12px);
              pointer-events: auto;
            }
          }
        }
      }
    }
  }
}

// 列表视图样式
.list-view {
  .empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
    
    .empty-icon {
      margin-bottom: 16px;
      
      svg {
        color: #d1d5db;
      }
    }
    
    p {
      margin: 0 0 8px 0;
      font-size: 14px;
      
      &.empty-hint {
        font-size: 13px;
        color: #9ca3af;
      }
    }
  }
  
  .designer-list {
    display: grid;
    gap: 20px;
    
    .designer-card {
      background: white;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      overflow: hidden;
      transition: all 0.2s ease;
      
      &:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      }
      
      .card-header {
        padding: 20px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        justify-content: space-between;
        align-items: center;
        
        .designer-info {
          display: flex;
          align-items: center;
          gap: 16px;
          
          .designer-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            overflow: hidden;
            
            img {
              width: 100%;
              height: 100%;
              object-fit: cover;
            }
          }
          
          .designer-details {
            .designer-name {
              font-size: 16px;
              font-weight: 600;
              color: #1e293b;
              margin-bottom: 6px;
            }
            
            .designer-meta {
              display: flex;
              align-items: center;
              gap: 8px;
              margin-bottom: 8px;
              
              .designer-group {
                font-size: 12px;
                color: #64748b;
                background: #f1f5f9;
                padding: 2px 6px;
                border-radius: 4px;
              }
              
              .leader-badge {
                font-size: 12px;
                color: #dc2626;
                background: #fef2f2;
                padding: 2px 6px;
                border-radius: 4px;
                border: 1px solid #fecaca;
              }
              
              .status-indicator {
                width: 8px;
                height: 8px;
                border-radius: 50%;
                
                &.available {
                  background: #10b981;
                }
                
                &.busy {
                  background: #f59e0b;
                }
                
                &.overloaded {
                  background: #8b5cf6;
                }
                
                &.stagnant {
                  background: #ef4444;
                }
              }
              
              .status-text {
                font-size: 12px;
                color: #64748b;
              }
            }
          }
        }
        
        .designer-actions {
          display: flex;
          gap: 8px;
          
          .action-btn {
            width: 32px;
            height: 32px;
            border: 1px solid #e2e8f0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            transition: all 0.2s ease;
            
            &:hover {
              border-color: #4f46e5;
              color: #4f46e5;
            }
          }
        }
      }
      
      .card-content {
        padding: 20px;
        display: grid;
        gap: 20px;
        
        .workload-section,
        .schedule-section,
        .availability-section {
          h5 {
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            margin: 0 0 12px 0;
          }
        }
        
        .workload-stats {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
          gap: 16px;
          
          .stat-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
            
            .stat-label {
              font-size: 12px;
              color: #64748b;
            }
            
            .stat-value {
              font-size: 16px;
              font-weight: 600;
              color: #1e293b;
              
              &.critical {
                color: #dc2626;
              }
              
              &.warning {
                color: #d97706;
              }
            }
          }
        }
        
        .no-events {
          font-size: 13px;
          color: #9ca3af;
          font-style: italic;
          margin: 0;
        }
        
        .event-list {
          display: flex;
          flex-direction: column;
          gap: 8px;
          
          .event-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 12px;
            background: #f8fafc;
            border-radius: 6px;
            
            .event-date {
              font-size: 12px;
              color: #64748b;
              font-weight: 500;
              min-width: 40px;
            }
            
            .event-content {
              flex: 1;
              
              .event-title {
                font-size: 13px;
                color: #1e293b;
                margin-bottom: 2px;
              }
              
              .event-type {
                font-size: 11px;
                padding: 2px 6px;
                border-radius: 4px;
                
                &.event-project {
                  background: #e0e7ff;
                  color: #4338ca;
                }
                
                &.event-review {
                  background: #fef3c7;
                  color: #92400e;
                }
                
                &.event-vacation {
                  background: #f3f4f6;
                  color: #6b7280;
                }
              }
            }
          }
          
          .more-events {
            font-size: 12px;
            color: #64748b;
            text-align: center;
            padding: 4px;
          }
        }
        
        .availability-info {
          display: flex;
          gap: 24px;
          
          .availability-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
            
            .availability-label {
              font-size: 12px;
              color: #64748b;
            }
            
            .availability-value {
              font-size: 14px;
              font-weight: 600;
              
              &.high-recommend {
                color: #059669;
              }
              
              &.recommend {
                color: #0369a1;
              }
              
              &.caution {
                color: #d97706;
              }
              
              &.not-recommend {
                color: #dc2626;
              }
            }
          }
        }
      }
    }
  }
}

// 统计摘要样式
.calendar-summary {
  margin-top: 24px;
  
  .summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    
    .stat-card {
      background: white;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      padding: 20px;
      display: flex;
      align-items: center;
      gap: 16px;
      
      .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        
        &.available {
          background: #f0fdf4;
          color: #059669;
        }
        
        &.busy {
          background: #fef3c7;
          color: #d97706;
        }
        
        &.overloaded {
          background: #f3f4f6;
          color: #8b5cf6;
        }
        
        &.stagnant {
          background: #fef2f2;
          color: #dc2626;
        }
      }
      
      .stat-content {
        flex: 1;
        
        .stat-value {
          font-size: 24px;
          font-weight: 700;
          color: #1e293b;
          margin-bottom: 4px;
        }
        
        .stat-label {
          font-size: 13px;
          color: #64748b;
        }
      }
    }
  }
}

// 响应式设计
@media (max-width: 1024px) {
  .calendar-view {
    .calendar-grid {
      .designer-cell {
        width: 150px;
        
        .designer-info {
          flex-direction: column;
          align-items: flex-start;
          gap: 8px;
          
          .designer-avatar {
            width: 32px;
            height: 32px;
          }
        }
      }
      
      .date-column,
      .date-cell {
        min-width: 60px;
      }
    }
  }
}

@media (max-width: 768px) {
  .designer-calendar-container {
    .calendar-header {
      flex-direction: column;
      gap: 16px;
      align-items: stretch;
      
      .header-actions {
        justify-content: flex-end;
      }
    }
  }
  
  .calendar-filters {
    flex-direction: column;
    gap: 16px;
    
    .filter-group {
      .filter-select {
        min-width: 100%;
      }
    }
  }
  
  .calendar-view {
    .calendar-grid {
      overflow-x: auto;
      
      .calendar-header-row,
      .calendar-row {
        min-width: 800px;
      }
    }
  }
  
  .list-view {
    .designer-list {
      .designer-card {
        .card-header {
          flex-direction: column;
          gap: 16px;
          align-items: flex-start;
          
          .designer-actions {
            align-self: flex-end;
          }
        }
        
        .card-content {
          .workload-stats {
            grid-template-columns: repeat(2, 1fr);
          }
          
          .availability-info {
            flex-direction: column;
            gap: 12px;
          }
        }
      }
    }
  }
}