/* 响应式布局优化 - 现代化间距和对齐 */

/* 大屏幕优化 (1400px+) */
@media (min-width: 1400px) {
  .dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
  }
  
  .dashboard-main {
    gap: 40px;
  }
  
  .core-cards-section .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* 中大屏幕 (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
  .dashboard-container {
    padding: 24px 20px;
  }
  
  .dashboard-main {
    gap: 32px;
  }
}

/* 中等屏幕 (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
  .dashboard-container {
    padding: 20px 16px;
  }
  
  .dashboard-header {
    margin-bottom: 24px;
    padding: 16px 0;
    
    h1 {
      font-size: 28px;
      letter-spacing: -0.6px;
    }
  }
  
  .dashboard-nav {
    margin-bottom: 20px;
    
    .nav-btn {
      padding: 14px 20px;
      font-size: 15px;
    }
  }
  
  .view-toggle {
    margin-bottom: 12px;
    
    .toggle-btn {
      padding: 10px 16px;
      font-size: 13px;
    }
  }
  
  .dashboard-main {
    gap: 28px;
  }
}

/* 小屏幕 (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
  .dashboard-container {
    padding: 16px 12px;
  }
  
  .dashboard-header {
    margin-bottom: 20px;
    padding: 12px 0;
    
    h1 {
      font-size: 24px;
      letter-spacing: -0.4px;
    }
    
    .subtitle {
      font-size: 14px;
    }
  }
  
  .dashboard-nav {
    margin-bottom: 16px;
    padding: 4px;
    
    .nav-btn {
      padding: 12px 16px;
      font-size: 14px;
      letter-spacing: 0.2px;
    }
  }
  
  .view-toggle {
    margin-bottom: 12px;
    gap: 6px;
    
    .toggle-btn {
      padding: 8px 12px;
      font-size: 12px;
      border-radius: 8px;
    }
  }
  
  .dashboard-main {
    gap: 24px;
    padding: 0 2px;
  }
  
  .list-section {
    .list-header {
      padding: 12px 16px;
      font-size: 12px;
      grid-template-columns: 100px 1fr 1fr 100px 140px 100px 120px;
    }
    
    .list-body .list-row {
      padding: 12px 16px;
      grid-template-columns: 100px 1fr 1fr 100px 140px 100px 120px;
      
      .col {
        font-size: 13px;
      }
      
      .actions-col {
        gap: 8px;
        
        .btn-link {
          padding: 6px 10px;
          font-size: 12px;
        }
      }
    }
  }
  
  .core-card {
    padding: 20px;
    border-radius: 12px;
    
    .card-header {
      margin-bottom: 16px;
      
      .card-title {
        font-size: 16px;
      }
      
      .card-badge {
        padding: 4px 8px;
        font-size: 11px;
      }
    }
    
    .card-content {
      gap: 12px;
      
      .project-name {
        font-size: 14px;
      }
      
      .deadline, .countdown {
        font-size: 12px;
      }
    }
  }
}

/* 超小屏幕 (480px及以下) */
@media (max-width: 480px) {
  .dashboard-container {
    padding: 12px 8px;
  }
  
  .dashboard-header {
    margin-bottom: 16px;
    padding: 8px 0;
    
    h1 {
      font-size: 20px;
      letter-spacing: -0.3px;
    }
    
    .subtitle {
      font-size: 13px;
    }
  }
  
  .dashboard-nav {
    margin-bottom: 12px;
    padding: 3px;
    
    .nav-btn {
      padding: 10px 12px;
      font-size: 13px;
    }
  }
  
  .view-toggle {
    margin-bottom: 8px;
    gap: 4px;
    
    .toggle-btn {
      padding: 6px 10px;
      font-size: 11px;
      border-radius: 6px;
    }
  }
  
  .dashboard-main {
    gap: 20px;
    padding: 0 1px;
  }
  
  .core-card {
    padding: 16px;
    border-radius: 10px;
    
    .card-header {
      margin-bottom: 12px;
      
      .card-title {
        font-size: 15px;
      }
      
      .card-badge {
        padding: 3px 6px;
        font-size: 10px;
      }
    }
    
    .card-content {
      gap: 10px;
      
      .project-name {
        font-size: 13px;
      }
      
      .deadline, .countdown {
        font-size: 11px;
      }
    }
  }
  
  .list-section {
    border-radius: 12px;
    
    .list-header {
      padding: 10px 12px;
      font-size: 11px;
      grid-template-columns: 80px 1fr 80px 100px 80px;
      
      // 隐藏部分列以适应小屏幕
      .col:nth-child(3),
      .col:nth-child(6) {
        display: none;
      }
    }
    
    .list-body .list-row {
      padding: 10px 12px;
      grid-template-columns: 80px 1fr 80px 100px 80px;
      
      .col {
        font-size: 12px;
        
        &:nth-child(3),
        &:nth-child(6) {
          display: none;
        }
      }
      
      .actions-col {
        gap: 6px;
        
        .btn-link {
          padding: 4px 8px;
          font-size: 11px;
        }
      }
    }
  }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .dashboard-header {
    margin-bottom: 12px;
    padding: 8px 0;
    
    h1 {
      font-size: 18px;
    }
  }
  
  .dashboard-nav {
    margin-bottom: 8px;
    
    .nav-btn {
      padding: 8px 16px;
      font-size: 12px;
    }
  }
  
  .dashboard-main {
    gap: 16px;
  }
  
  .core-card {
    padding: 12px;
  }
}