/**
 * 合同管理页面样式
 * [2026-02-05] 新增
 * 回滚方式：删除此文件
 */

.contracts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  &__statsGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;

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

  &__statCard {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  &__statLabel {
    font-size: 0.875rem;
    color: var(--text-secondary, #6c757d);
  }

  &__statValue {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #212529);
  }

  &__filters {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  &__filterRow {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
  }

  &__filterItem {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;

    label {
      font-size: 0.75rem;
      color: var(--text-secondary, #6c757d);
    }

    select,
    input {
      padding: 0.5rem 0.75rem;
      border: 1px solid var(--border-color, #dee2e6);
      border-radius: 4px;
      font-size: 0.875rem;
      min-width: 150px;

      &:focus {
        outline: none;
        border-color: var(--primary-color, #0d6efd);
      }
    }
  }

  &__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  &__table {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    overflow: hidden;
  }

  &__tableHeader {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 0.8fr 0.8fr 1fr 0.8fr 1fr 0.8fr;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #f8f9fa);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary, #6c757d);
    border-bottom: 1px solid var(--border-color, #dee2e6);
  }

  &__tableRow {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 0.8fr 0.8fr 1fr 0.8fr 1fr 0.8fr;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    transition: background 0.2s;

    &:hover {
      background: var(--bg-hover, #f8f9fa);
    }

    &:last-child {
      border-bottom: none;
    }
  }

  &__tableCell {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__tableSubtext {
    font-size: 0.75rem;
    color: var(--text-secondary, #6c757d);
  }

  &__loading,
  &__empty {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary, #6c757d);
  }

  &__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
  }

  &__pageInfo {
    font-size: 0.875rem;
    color: var(--text-secondary, #6c757d);
  }

  // 状态颜色
  &__statusGreen {
    color: #16a34a !important;
  }

  &__statusYellow {
    color: #ca8a04 !important;
  }

  &__statusRed {
    color: #dc2626 !important;
  }

  &__statusGray {
    color: #4b5563 !important;
  }

  // 进度条样式
  &__progressContainer {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  &__progressLabel {
    font-size: 0.875rem;
    color: var(--text-primary, #212529);
    font-weight: 500;
  }

  &__progressBar {
    height: 12px;
    background: var(--border-color, #dee2e6);
    border-radius: 6px;
    overflow: hidden;
  }

  &__progressFill {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
    border-radius: 6px;
    transition: width 0.3s ease;
  }

  &__progressText {
    font-size: 0.875rem;
    color: var(--text-secondary, #6c757d);
    text-align: right;
  }
}
