/* Filter chip with share button styling */
.filter-chip {
	position: relative;
}

.filter-chip-content {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.filter-chip-dot {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid rgba(0,0,0,0.15);
	flex-shrink: 0;
}

.filter-chip-label {
	flex: 1;
}

.filters-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 8px;
}

.filters-header h3 {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0;
}

.filters-header .filters-hint {
	font-size: 0.75rem;
	color: var(--text-secondary);
}

.filter-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.filter-chip-share {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.05);
	font-size: 0.75rem;
	opacity: 0.6;
	transition: all 0.2s ease;
	margin-left: 4px;
	cursor: pointer;
	pointer-events: auto;
}

.filters {
	border-bottom: 1px solid var(--border-primary);
	padding-bottom: 12px;
	margin-bottom: 12px;
}

.filter-chip-hide {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	font-size: 0.95rem;
	color: var(--text-primary);
	opacity: 0.8;
	transition: all 0.2s ease;
	cursor: pointer;
	margin-left: 2px;
	pointer-events: auto;
	line-height: 1;
}

.filter-chip-hide:hover {
	opacity: 1;
	background: var(--bg-tertiary);
	transform: scale(1.05);
}

.filter-chip-share:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.1);
	transform: scale(1.1);
}

.filter-chip:hover .filter-chip-share {
	opacity: 0.8;
}

.filter-chip-warning {
	display: inline-flex;
	align-items: center;
	font-size: 0.9rem;
	margin-left: 4px;
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

@media (prefers-color-scheme: dark) {
	.filter-chip-share {
		background: rgba(255, 255, 255, 0.1);
	}

	.filter-chip-share:hover {
		background: rgba(255, 255, 255, 0.2);
	}

	.filter-chip-hide {
		background: rgba(255, 255, 255, 0.12);
		border-color: rgba(255, 255, 255, 0.25);
	}

	.filter-chip-hide:hover {
		background: rgba(255, 255, 255, 0.25);
	}
}

.sort-controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sort-controls label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
}

.sort-controls select, .filters button {
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid var(--border-primary);
	background: var(--bg-secondary);
	color: var(--text-secondary);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
	margin: 2px;
}

.filters button:hover {
	background: var(--gray-100);
	color: var(--text-primary);
}

.filters button.active {
	background: var(--blue-50);
	color: var(--blue-600);
	border-color: var(--blue-100);
	font-weight: 600;
}

.filters button.excluded {
	background: var(--red-500);
	color: white;
	border-color: var(--red-500);
	font-weight: 600;
	opacity: 0.8;
}

.filters button.excluded:hover {
	opacity: 1;
}

.io-controls {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.io-controls button {
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	font-weight: 500;
}

.io-controls button:hover {
	background: var(--gray-200);
	color: var(--text-primary);
	box-shadow: none;
}

.danger-btn {
	background: var(--bg-tertiary) !important;
	color: var(--red-500) !important;
	font-weight: 600 !important;
}

.danger-btn:hover {
	background: var(--red-500) !important;
	color: white !important;
}

.manual-json {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}

.manual-json textarea {
	border: 1px solid var(--border-primary);
	border-radius: 8px;
	min-height: 120px;
	padding: 12px;
	font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 0.85rem;
	background: var(--bg-primary);
	color: var(--text-primary);
}

.manual-json .manual-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.manual-json button {
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	font-weight: 500;
}

.manual-json button:hover {
	background: var(--gray-200);
	color: var(--text-primary);
	box-shadow: none;
}

.empty-state {
	padding: 24px;
	border-radius: 12px;
	border: 2px dashed var(--border-primary);
	text-align: center;
	font-size: 0.9rem;
	color: var(--text-tertiary);
	margin-top: 8px;
}

.repeat-checkboxes {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	padding: 8px 0;
}

.repeat-checkboxes label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
}

.repeat-checkboxes input[type="checkbox"] {
	cursor: pointer;
	width: 16px;
	height: 16px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-primary: #111827;
		--bg-secondary: #1F2937;
		--bg-tertiary: #374151;
		--bg-inset: #111827;

		--text-primary: var(--gray-100);
		--text-secondary: var(--gray-400);
		--text-tertiary: var(--gray-500);
		--text-placeholder: var(--gray-500);

		--border-primary: #374151;
		--border-secondary: #4B5563;
		--border-focus-ring: rgba(96, 165, 250, 0.3);

		color-scheme: dark;
	}
	
	.filters button.active {
		background: rgba(59, 130, 246, 0.15);
		color: var(--blue-100);
		border-color: rgba(59, 130, 246, 0.3);
	}
	
	.filters button.excluded {
		background: var(--red-500);
		opacity: 0.8;
	}
	
	.filters button.excluded:hover {
		opacity: 1;
	}
	
	.button-ghost:hover {
		background: var(--gray-600);
		color: var(--text-primary);
	}
	
	.task-card.overdue {
		border-left-color: var(--red-500);
	}
}

/* Streak Badge */
.streak-badge {
	display: inline-block;
	background: linear-gradient(135deg, #FFD700, #FFA500);
	color: #333;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	margin-left: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Statistics Bar */
.statistics-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	padding: 4px 10px;
	background: var(--bg-secondary);
	border-radius: 4px;
	border: 1px solid var(--border-primary);
	margin: 2px 0 4px 0;
	box-shadow: var(--shadow-sm);
}

.stats-group {
	display: flex;
	gap: 16px;
	align-items: center;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.stat-label {
	font-size: 0.875rem;
	color: var(--text-secondary);
	font-weight: 500;
}

.stat-value {
	font-size: 1rem;
	color: var(--text-primary);
	font-weight: 700;
}

.stat-value.good {
	color: #10B981;
}

.stat-value.warning {
	color: #F59E0B;
}

.stat-value.bad {
	color: var(--red-500);
}

.stat-badge {
	font-size: 0.875rem;
	padding: 2px 8px;
	border-radius: 10px;
	font-weight: 600;
	margin-left: 8px;
}

.stat-badge.good {
	background: #10B981;
	color: white;
}

.stat-badge.bad {
	background: var(--red-500);
	color: white;
}

