/* ModuleNhanVien.css */

/* ================= MODULE LIST ================= */

.module-header {
  font-weight: 600;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

/* Grid d첫ng chung */
.module-grid {
  display: grid;
  gap: 12px;
  align-items: center;
}

/* Header row */
.module-header > div {
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

/* Item */
.module-item {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

/* Hover */
.module-item:hover {
  background: #f9fafb;
}

/* Load more */
.load-more {
  text-align: center;
  padding: 12px;
}

.load-more button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
}

/* Mobile */
@media (max-width: 768px) {
  .module-header {
    display: none;
  }

  .module-item {
    display: block;
  }

  .module-item div {
    font-size: 13px;
    margin-bottom: 4px;
  }
}


.module-header {
  position: sticky;
  top: 0;
  z-index: 2;
}



.search-dropdown {
  border: 1px solid #ddd;
  background: #fff;
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 10;
}

.dropdown-item {
  padding: 8px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f3f4f6;
}


/* DÙNG CHO THIẾT LẬP BL */

.row-error {
  background: #fff1f0;
}

.input-error {
  border: 1px solid red !important;
}

#rule-config-container .card {
    max-width: 650px;
    margin: auto;
}

/* Chia lưới cho header và các dòng dữ liệu */
#rule-config-container .rule-table-header, 
#rule-config-container .rule-row {
    display: grid;
    /* Cột: 1.Bậc | 2.KPI | 3.Thưởng | 4.Nút xóa */
    grid-template-columns: 80px 1fr 1fr 45px; 
    gap: 12px;
    align-items: center;
    padding: 10px;
}

#rule-config-container .rule-table-header {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e2e8f0;
}

#rule-config-container .rule-table-body {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

#rule-config-container .rule-row {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

#rule-config-container .rule-row:hover {
    background: #fdfdfd;
}

/* Input có đơn vị % nằm trong */
#rule-config-container .rule-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

#rule-config-container .rule-input {
    width: 100%;
    padding: 8px 28px 8px 12px !important;
    text-align: right;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
}

#rule-config-container .rule-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

#rule-config-container .unit {
    position: absolute;
    right: 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

#rule-config-container .btn-del {
    color: #ef4444;
    background: #fff5f5; /* Thêm nền nhẹ để dễ nhận diện */
    border: 1px solid #feb2b2;
    border-radius: 6px;
    
    /* Căn giữa icon bên trong nút */
    display: flex;
    align-items: center;
    justify-content: center;
    
    width: 32px;  /* Cố định kích thước để tạo hình vuông cân đối */
    height: 32px; 
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;
    
    /* Loại bỏ margin thừa nếu có */
    margin: 0 auto; 
    padding: 0;
}

#rule-config-container .btn-del:hover {
    opacity: 1;
    background: #e53e3e;
    color: white;
}

#rule-config-container .rule-level-label {
    font-weight: 700;
    color: #64748b;
}


.kpi-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}


/* ================= EMPLOYEE SUGGEST ================= 

.suggest-wrap {
  position: relative;
}

.suggest-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;

  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 12px;

  box-shadow:
    0 4px 12px rgba(0,0,0,.08);

  max-height: 260px;
  overflow-y: auto;

  z-index: 9999;

  display: none;
}

.suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover {
  background: #f8fafc;
}

.suggest-item small {
  display: block;
  margin-top: 2px;
  color: #64748b;
}

.suggest-empty {
  padding: 12px;
  color: #94a3b8;
  text-align: center;
}

*/