/* =====================================================
   DU AN FORM - COMPACT FIELDS
===================================================== */

.du-an-compact-grid {
  display: grid;

  /*
   * Mỗi field tối thiểu khoảng 180px.
   * Còn chỗ thì tự tăng số cột.
   * Thiếu chỗ thì tự xuống dòng.
   */
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(180px, 1fr)
    );

  gap: 12px;

  margin-top: 12px;
}


/* =====================================================
   DU AN - LARGE FIELDS
===================================================== */

.du-an-member-field {
  margin-top: 16px;
}


/* =====================================================
   SELECTED MEMBERS
===================================================== */

.du-an-member-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  align-items: center;

  gap: 6px;

  margin-top: 8px;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

  .du-an-compact-grid {
    grid-template-columns:
      repeat(
        auto-fit,
        minmax(145px, 1fr)
      );

    gap: 8px 10px;
  }

}






/* ==========================================================================
   CSS ĐỘC LẬP CHO MODULE DỰ ÁN (COMPACT 1080PX VIEW)
   ========================================================================== */

/* 1. KHUNG CHỨA TOÀN TRANG (SỬ DỤNG THANH CUỘN CHÍNH NGUYÊN BẢN) */
.da-page-wrapper {
  width: 100% !important;
  height: auto !important;
  min-height: auto !important;
  box-sizing: border-box !important;
  
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  
  padding: 12px 12px 24px 12px !important;
  
  overflow: visible !important;
  background: transparent !important;
}

/* 2. CHUẨN ĐỘ RỘNG 1080PX CĂN GIỮA */
.da-page-container {
  width: 100% !important;
  max-width: 1080px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* 3. HEADER DỰ ÁN */
.da-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.da-header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.da-detail-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

/* 4. LƯỚI 2x2 CÂN ĐỐI NÉN PADDING & GAP */
.da-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 640px) {
  .da-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 5. KHUÔN THẺ THÔNG TIN DỰ ÁN */
.da-info-card {
  background: #fff;
  padding: 12px 14px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
}

.da-card-title {
  margin-top: 0;
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1.5px solid #eff6ff;
  padding-bottom: 4px;
}

.da-block-full {
  width: 100%;
}

/* 6. BẢNG DỮ LIỆU NÉN DÒNG */
.da-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.da-detail-table td {
  padding: 3px 0;
  vertical-align: middle;
  font-size: 13px;
}

.da-lbl-title {
  color: #64748b;
  width: 42%;
}

.da-val-highlight { font-weight: 600; color: #1e293b; }
.da-val-bold { font-weight: 600; color: #0f172a; }
.da-val-right { text-align: right; }

.da-row-divider {
  border-top: 1px dashed #e2e8f0;
}

.da-text-danger { color: #dc2626; font-weight: 700; }
.da-text-success { color: #16a34a; font-weight: 700; }
.da-text-primary { color: #2563eb; font-weight: 700; }

/* 7. XỬ LÝ NÉN GIÃN DÒNG CARD NHÂN SỰ (KHỚP MẬT ĐỘ VỚI TABLE) */
.da-personnel-block {
  display: flex;
  flex-direction: column;
  gap: 2px; /* Giảm gap giữa các dòng từ 6px -> 2px */
  font-size: 13px;
  line-height: 1.35; /* Nén chiều cao dòng cho khớp với table td */
}

.da-personnel-inline-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0; /* Đổi padding thành 3px 0 giống hệt td trong bảng */
  border-bottom: 1px dashed #f1f5f9;
}

.da-personnel-flow-item {
  display: block;
  color: #1e293b;
  word-break: break-word;
  padding: 3px 0; /* Đồng bộ padding cho dòng Người tham gia */
}

.da-personnel-label {
  color: #64748b;
  font-weight: 500;
  margin-right: 4px;
}

.da-personnel-value {
  font-weight: 500;
  color: #0f172a;
}

.da-personnel-value.primary {
  font-weight: 600;
  color: #1e293b;
}

.da-personnel-value.muted {
  font-weight: 600;
  color: #475569;
}

/* 8. KHU VỰC GHI CHÚ */
.da-note-text {
  white-space: pre-line;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}