.filter-bar {
  display: flex;
  background-color: var(--filter-bg);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 20px;
}

.filter-chip {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  background: transparent;
}

.filter-chip.active {
  background-color: var(--accent-blue);
  color: #FFFFFF;
  font-weight: 600;
}

.habits-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.habit-item {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.habit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.habit-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.habit-item-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.habit-duration-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  background-color: var(--accent-blue-translucent);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.habit-card-menu-container {
  position: relative;
}

.btn-menu-toggle {
  background: transparent;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.btn-menu-toggle:active {
  background-color: rgba(0, 0, 0, 0.06);
}

.habit-context-menu {
  position: absolute;
  right: 0;
  top: 40px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  z-index: 100;
  min-width: 150px;
  box-shadow: var(--shadow-lg);
}

.btn-delete-habit {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--error-color);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  background: transparent;
  justify-content: flex-start;
}

.btn-delete-habit:active {
  background-color: rgba(255, 69, 58, 0.1);
}

.habit-progress-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.interactive-progress-row {
  cursor: pointer;
  padding: 8px 12px;
  margin: -8px -12px;
  border-radius: 14px;
}

.habit-progress-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.habit-progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.habit-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--filter-inactive);
  border-radius: 2px;
  overflow: hidden;
}

.habit-progress-fill {
  height: 100%;
  background: var(--accent-blue);
  width: 0%;
  transition: width 0.3s ease;
}

.habit-meta-plate {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  width: 100%;
}

.meta-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.meta-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-subtle);
}

.habit-photo-quest {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px;
  background-color: rgba(0, 0, 0, 0.02);
}

.photo-timeline-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}

.timeline-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.photo-timeline-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.photo-timeline-card {
  flex-shrink: 0;
  width: 80px;
  background-color: var(--bg-app);
  border-radius: 8px;
  padding: 4px;
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.photo-timeline-card img {
  width: 100%;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 4px;
}

.photo-timeline-card .week-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.timeline-empty-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 0;
}

.btn-add-progress-photo-dashed {
  border: 1.5px dashed var(--border-subtle);
  border-radius: 12px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  background: transparent;
}

.btn-add-progress-photo-dashed:active {
  border-color: var(--accent-blue);
  background-color: rgba(0, 0, 0, 0.03);
}
