/* Operational Toolbar (Streamlined & Clean) */
.toolbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  margin-right: 2px;
}

/* Mode Switcher (Tuần / Ngày) */
.view-mode-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-mode {
  border: none;
  background: #f8fafc;
  padding: 0 10px;
  height: 28px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--border);
  transition: background 0.1s, color 0.1s;
}

.btn-mode:last-child {
  border-right: none;
}

.btn-mode:hover {
  background: #e2e8f0;
}

.btn-mode.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Compact Date Navigation Group */
.date-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-icon-nav {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Page Size Selector on Toolbar */
.page-size-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 4px 0 8px;
  height: 28px;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.page-size-group:hover,
.page-size-group:focus-within {
  border-color: var(--accent);
  background: #fff;
}

.page-size-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  user-select: none;
}

.select-page-size {
  height: 24px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 2px;
  outline: none;
}

.select-page-size:focus {
  outline: none;
}

/* Trigger button for opening Right-Side Filter Drawer */
.btn-filter-trigger {
  height: 28px;
  padding: 0 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  color: #334155;
  transition: all 0.15s ease;
}

.btn-filter-trigger:hover {
  background: #f1f5f9;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-filter-trigger.has-filter {
  background: var(--primary-light);
  border-color: #93c5fd;
  color: var(--primary);
}

.filter-badge {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.filter-badge[hidden] {
  display: none;
}

/* Responsive on mobile */
@media (max-width: 768px) {
  .toolbar {
    padding: 6px 10px;
    gap: 8px;
  }

  .page-size-label {
    display: none;
  }

  .btn-filter-text {
    display: none; /* Only show icon + badge on small phones to save space */
  }

  .btn-filter-trigger {
    padding: 0 8px;
  }
}
