.quotation-approval-container {
  padding: 24px;
  background-color: #F9FAFB;
  min-height: 100vh;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  
  .header-content {
    h2 {
      margin: 0 0 8px 0;
      font-size: 28px;
      font-weight: 600;
      color: #111827;
    }
    
    .header-description {
      margin: 0;
      color: #6B7280;
      font-size: 16px;
    }
  }
  
  .header-actions {
    display: flex;
    gap: 12px;
  }
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  
  .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    &.pending {
      background-color: #FEF3C7;
      color: #D97706;
    }
    
    &.approved {
      background-color: #D1FAE5;
      color: #059669;
    }
    
    &.rejected {
      background-color: #FEE2E2;
      color: #DC2626;
    }
    
    &.revision {
      background-color: #E0E7FF;
      color: #5B21B6;
    }
  }
  
  .stat-content {
    .stat-value {
      font-size: 32px;
      font-weight: 700;
      color: #111827;
      line-height: 1;
      margin-bottom: 4px;
    }
    
    .stat-label {
      font-size: 14px;
      color: #6B7280;
      font-weight: 500;
    }
  }
}

.filter-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-row {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
  
  .filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
  }
  
  .filter-select,
  .filter-input {
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    
    &:focus {
      outline: none;
      border-color: #3B82F6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
  }
  
  .date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    
    .date-separator {
      color: #6B7280;
      font-size: 14px;
    }
  }
}

.filter-actions {
  display: flex;
  gap: 12px;
}

.approval-list {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.list-header {
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
  
  h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
  }
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
  
  .empty-icon {
    margin-bottom: 16px;
    opacity: 0.5;
  }
  
  p {
    margin: 8px 0;
    color: #6B7280;
    
    &.empty-hint {
      font-size: 14px;
    }
  }
}

.approval-table {
  .table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1.5fr 1fr 1fr;
    gap: 16px;
    padding: 16px 24px;
    background-color: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
  }
  
  .table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr 1.5fr 1fr 1fr;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #F3F4F6;
    align-items: center;
    
    &:hover {
      background-color: #F9FAFB;
    }
  }
  
  .table-cell {
    font-size: 14px;
  }
}

.project-info {
  .project-name {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
  }
  
  .project-id {
    font-size: 12px;
    color: #6B7280;
  }
}

.customer-info {
  .customer-name {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
  }
  
  .submitted-by {
    font-size: 12px;
    color: #6B7280;
  }
}

.amount {
  font-weight: 600;
  color: #059669;
  font-size: 16px;
}

.date {
  color: #6B7280;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  
  &.status-pending {
    background-color: #FEF3C7;
    color: #D97706;
  }
  
  &.status-approved {
    background-color: #D1FAE5;
    color: #059669;
  }
  
  &.status-rejected {
    background-color: #FEE2E2;
    color: #DC2626;
  }
  
  &.status-revision {
    background-color: #E0E7FF;
    color: #5B21B6;
  }
}

// 模态框样式
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-height: 90vh;
  overflow-y: auto;
  
  &.approval-modal {
    width: 90%;
    max-width: 800px;
  }
  
  &.stats-modal {
    width: 90%;
    max-width: 600px;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #E5E7EB;
  
  h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
  }
  
  .modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: #6B7280;
    
    &:hover {
      background-color: #F3F4F6;
      color: #374151;
    }
  }
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid #E5E7EB;
}

.approval-details {
  .detail-section {
    margin-bottom: 32px;
    
    &:last-child {
      margin-bottom: 0;
    }
    
    h5 {
      margin: 0 0 16px 0;
      font-size: 16px;
      font-weight: 600;
      color: #111827;
    }
  }
  
  .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
  }
  
  .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    
    label {
      font-size: 12px;
      font-weight: 500;
      color: #6B7280;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    
    span {
      font-size: 14px;
      color: #111827;
      
      &.amount-highlight {
        font-weight: 600;
        color: #059669;
        font-size: 18px;
      }
    }
  }
  
  .script-info {
    padding: 12px 16px;
    background-color: #F3F4F6;
    border-radius: 8px;
    
    .script-id {
      font-size: 14px;
      color: #6B7280;
      font-family: monospace;
    }
  }
  
  .comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    
    &:focus {
      outline: none;
      border-color: #3B82F6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
  }
}

.stats-content {
  .stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
    
    .summary-item {
      text-align: center;
      padding: 20px;
      background-color: #F9FAFB;
      border-radius: 8px;
      
      label {
        display: block;
        font-size: 14px;
        color: #6B7280;
        margin-bottom: 8px;
      }
      
      .summary-value {
        font-size: 24px;
        font-weight: 700;
        color: #111827;
      }
    }
  }
  
  .script-stats {
    h5 {
      margin: 0 0 16px 0;
      font-size: 16px;
      font-weight: 600;
      color: #111827;
    }
  }
  
  .stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .stat-item {
    .stat-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
      
      .script-title {
        font-weight: 500;
        color: #111827;
      }
      
      .usage-count {
        font-size: 14px;
        color: #6B7280;
      }
    }
    
    .stat-bar {
      height: 8px;
      background-color: #E5E7EB;
      border-radius: 4px;
      overflow: hidden;
      
      .bar-fill {
        height: 100%;
        background-color: #3B82F6;
        transition: width 0.3s ease;
      }
    }
  }
}

// 按钮样式
.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  
  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  &.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
}

.btn-primary {
  background-color: #3B82F6;
  color: white;
  
  &:hover:not(:disabled) {
    background-color: #2563EB;
  }
}

.btn-secondary {
  background-color: #F3F4F6;
  color: #374151;
  
  &:hover:not(:disabled) {
    background-color: #E5E7EB;
  }
}

.back-to-dashboard {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  &:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  }
  
  svg {
    transition: transform 0.3s ease;
  }
  
  &:hover svg {
    transform: translateX(-3px);
  }
}

.btn-success {
  background-color: #059669;
  color: white;
  
  &:hover:not(:disabled) {
    background-color: #047857;
  }
}

.btn-warning {
  background-color: #D97706;
  color: white;
  
  &:hover:not(:disabled) {
    background-color: #B45309;
  }
}

.btn-danger {
  background-color: #DC2626;
  color: white;
  
  &:hover:not(:disabled) {
    background-color: #B91C1C;
  }
}