/* =====================================================
   TASK LIST
===================================================== */

#taskListView .task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

/* MONTH */

#taskListView .task-month-input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

/* MOBILE */

#taskListView .task-header {
  display: none;
}

#taskListView .task-item {
  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 16px;

  border-radius: 12px;

  background: #fff;

  border: 1px solid #f0f0f0;

  box-shadow:
    0 2px 8px rgba(0,0,0,0.05);
}

#taskListView .task-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#taskListView .task-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 3px;
}

#taskListView .task-status {
  font-weight: 700;
  font-size: 13px;
}

/* STATUS */

#taskListView .stat-new {
  color: #757575;
}

#taskListView .stat-process {
  color: #1976d2;
}

#taskListView .stat-wait {
  color: #f57c00;
}

#taskListView .stat-done {
  color: #2e7d32;
}

#taskListView .stat-late {
  color: #d32f2f;
}

#taskListView .stat-cancel {
  color: #9e9e9e;
}

/* DESKTOP */

@media (min-width: 1024px) {

  .task-grid-layout {
    display: grid;

    grid-template-columns:
      2fr
      1.2fr
      1fr
      1fr
      1fr;

    gap: 15px;

    align-items: center;
  }

  #taskListView .task-header {

    display: grid;

    padding: 12px 20px;

    background: #f8f9fa;

    border-radius: 8px;

    font-weight: 700;

    font-size: 13px;

    color: #666;

    margin-bottom: 8px;
  }

  #taskListView .task-item {

    display: grid;

    padding: 14px 20px;

    border-radius: 8px;

    margin-bottom: 5px;

    border: 1px solid transparent;

    border-bottom: 1px solid #f0f0f0;

    box-shadow: none;

    transition: background 0.2s;
  }

  #taskListView .task-item:hover {

    background: #f1f8ff;

    border-color: #d1e9ff;

    cursor: pointer;
  }

  #taskListView .task-row {
    display: contents;
  }

  #taskListView .task-label {
    display: none;
  }

  #taskListView .task-status {
    text-align: right;
  }
}


/* CELL */

#taskListView .task-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#taskListView .task-card-value {
  word-break: break-word;
}

/* DESKTOP */

@media (min-width: 1024px) {

  #taskListView .task-cell {
    gap: 0;
  }

  #taskListView .task-status {
    text-align: right;
  }
}


/* DÙNG CHO FORM */
/* =====================================================
   TASK FORM SEARCH
===================================================== */

.task-multi-select {
  position: relative;
  width: 100%;
}

/* =====================================================
   DROPDOWN
===================================================== */

.task-search-dropdown {
  position: absolute;

  top: calc(100% + 4px);
  left: 0;
  right: 0;

  background: #fff;
  border: 1px solid #dcdfe4;
  border-radius: 12px;

  box-shadow:
    0 4px 12px rgba(0,0,0,0.08);

  max-height: 260px;
  overflow-y: auto;

  z-index: 9999;
}

/* ẨN */
.task-search-dropdown.d-none {
  display: none !important;
}

/* =====================================================
   SEARCH ITEM
===================================================== */

.task-search-dropdown .search-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid #f1f3f5;
}

.task-search-dropdown .search-item:last-child {
  border-bottom: none;
}

.task-search-dropdown .search-item:hover {
  background: #f5f7fa;
}

/* =====================================================
   TAGS
===================================================== */

.task-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 10px;
}

.task-selected-tags:empty {
  display: none;
}

.task-selected-tags .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: #eef3ff;
  color: #1d4ed8;

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 500;
}

.task-selected-tags .remove-btn {
  cursor: pointer;
  font-weight: bold;
  opacity: 0.7;
}

.task-selected-tags .remove-btn:hover {
  opacity: 1;
}

.task-search-field {
  position: relative;
}

.task-target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.task-target-grid .d-none {
  display: none !important;
}


.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: #eef3ff;
  color: #1d4ed8;

  padding: 6px 10px;
  border-radius: 999px;
}

.task-remove-btn {
  cursor: pointer;
  font-weight: bold;
}

