/* =====================================================
   FILTER ICON BUTTON
===================================================== */
.filter-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.filter-btn:active {
  background: rgba(25,118,210,.12);
}

/* Icon phễu */
.filter-btn::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 11px;
  width: 14px;
  height: 14px;
  border: 2px solid #1976d2;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Có filter đang bật */
.filter-btn.active {
  background: #e3f2fd;
}
.filter-btn.active::before {
  border-color: #0d47a1;
}

/* =====================================================
   FILTER OVERLAY
===================================================== */
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 12px;
}

/* Hộp filter nhỏ gọn */
.filter-box {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
  font-size: 13px;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* =====================================================
   ACTIVE FILTER CHIPS
===================================================== */
.filter-active-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-chip {
  background: #eef4ff;
  color: #0d47a1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-chip span {
  cursor: pointer;
  font-weight: bold;
}

/* =====================================================
   FILTER BUILDER FORM
===================================================== */
.filter-box label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  display: block;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.filter-row input,
.filter-row select {
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Nút thêm điều kiện */
.filter-builder button {
  margin-top: 4px;
  font-size: 13px;
  padding: 6px 10px;
}

/* =====================================================
   ACTION BUTTONS
===================================================== */
.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.filter-actions button {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}


/* CHIP HIỂN THỊ FILTER ĐANG ÁP DỤNG */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef3ff;
  color: #1a237e;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin: 0 6px 6px 0;
}

.filter-chip-x {
  cursor: pointer;
  font-weight: bold;
}


.filter-row input::placeholder {
  color: #999;
  font-size: 12px;
}

.filter-value-1,
.filter-value-2 {
  display: flex;
  align-items: center;
}

/* Header có 2 bên trái – phải */
.view-header-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Nhóm back + title */
.view-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nút filter sát mép phải */
.view-header-between .filter-btn {
  flex-shrink: 0;
}


