﻿.bi {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	line-height: 1;
}

.todo-page {
	display: grid;
	grid-template-columns: 260px 1fr 340px;
	height: calc(100vh - 64px);
	background-color: var(--ek-item-bg);
}

.todo-detail.hidden {
	display: none;
}

.todo-sidebar {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 12px;
	box-sizing: border-box;
	background-color: var(--ek-red-ghost);
}

.todo-sidebar-header {
	margin-bottom: 12px !important;
}

	.todo-sidebar-header h3 {
		margin: 0;
		font-size: 18px;
		font-weight: 600;
	}

.todo-page.two-column {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 16px;
}

.todo-main {
	min-width: 0;
}

.sidebar-divider {
	height: 1px;
	margin: 12px 0;
	background: rgba(0, 0, 0, 0.1);
}

.sidebar-actions {
	display: flex;
	align-items: center;
	gap: 6px; 
}

.todo-group {
	margin: 0;
	padding: 0;
}

.todo-group-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 6px;
	line-height: 1.2;
	min-height: 28px;
	margin: 0;
	cursor: pointer;
}

.sidebar-item {
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 6px;
	line-height: 1.2;
	min-height: 28px;
	margin: 0;
	cursor: pointer;
}

	.sidebar-item:hover {
		background-color: transparent;
		color: var(--ek-red);
		cursor: pointer;
	}

	.sidebar-item.active {
		font-weight: 600;
	}

.todo-group-title {
	font-family: inherit;
	font-size: 1.1rem;
	font-weight: 600;
	color: #555;
	padding: 4px 6px;
	margin: 0;
	margin-bottom: 10px;
}

	.todo-group-title:hover {
		color: var(--ek-red);
		cursor: pointer;
	}

.sidebar-input {
	width: 100%;
	padding: 6px 8px;
	margin: 4px 0;
	font-size: 13px;
	border-radius: 6px;
	border: 1px solid #ccc;
}

.link-btn {
	background: none;
	border: none;
	padding: 6px;
	font-size: 13px;
	color: #444;
	text-align: left;
	cursor: pointer;
}

	.link-btn:hover {
		text-decoration: underline;
	}

.todo-sidebar-footer {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.icon-btn {
	background: none;
	border: none;
	font-size: 0.9rem;
	color: #999;
	cursor: pointer;
	opacity: 0;
}

.todo-group-title:hover .icon-btn,
.sidebar-item:hover .icon-btn {
	opacity: 1;
}

.icon-btn:hover {
	color: #d32f2f;
	transform: scale(1.1);
}

.list-favorite-icon {
	color: #f5c518;
	font-size: 0.9rem;
}

.todo-sidebar {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 12px;
	box-sizing: border-box;
	background-color: var(--ek-red-ghost);
}
/* ⭐ scroll */
.todo-sidebar-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding-right: 4px;
}

	.todo-sidebar-scroll::-webkit-scrollbar {
		width: 6px;
	}

	.todo-sidebar-scroll::-webkit-scrollbar-thumb {
		background: rgba(0, 0, 0, 0.25);
		border-radius: 4px;
	}

	.todo-sidebar-scroll::-webkit-scrollbar-track {
		background: transparent;
	}
/* =========================
   Main / Task List
========================= */
.todo-main {
	background: #ffffff;
	padding: 24px;
	overflow-y: auto;
}

.todo-task-list {
	height: 100%;
	padding: 20px;
	box-sizing: border-box;
}

.task-header-title {
	display: flex;
	align-items: center;
	gap: 6px;
}
/* Header */
.task-header h3 {
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 600;
}
/* Add task */
.task-add input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #ddd;
	font-size: 14px;
}
/* Task items */
.task-items {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.task-row {
	display: flex;
	gap: 10px;
	padding: 10px;
	border-radius: 8px;
	cursor: pointer;
	align-items: center;
}

	.task-row:hover {
		background: var(--ek-table-hover-bg);
	}

	.task-row.active {
		background: var(--ek-table-hover-bg);
	}

.checkbox-wrapper {
	cursor: pointer;
	display: flex;
	align-items: center;
}

	.checkbox-wrapper i {
		font-size: 1.1rem;
		color: #666;
	}

		.checkbox-wrapper i.bi-check-square-fill {
			color: var(--ek-red);
		}
/* Task content */
.task-content {
	flex: 1;
}

.task-title {
	font-size: 14px;
}

	.task-title.done {
		text-decoration: line-through;
		opacity: 0.5;
	}

.task-meta {
	font-size: 12px;
	color: #777;
	display: flex;
	gap: 8px;
}
/* Priority */
.priority.low {
	color: #4caf50;
}

.priority.medium {
	color: #ff9800;
}

.priority.high {
	color: #f44336;
}
/* Picker */
.repeat-picker,
.priority-picker {
	margin-top: 6px;
	border: 1px solid var(--ek-border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 6px;
	box-shadow: var(--ek-shadow-sm);
	background-color: white;
}

.repeat-option,
.priority-option {
	padding: 8px 12px;
	font-size: 13px;
	cursor: pointer;
}

	.repeat-option:hover,
	.priority-option:hover {
		background: var(--ek-surface-alt);
		font-weight: 600;
	}

	.repeat-option.selected,
	.priority-option.selected {
		outline: 2px solid var(--primary);
	}
/* Empty */
.task-empty {
	margin-top: 40px;
	text-align: center;
	color: #888;
}
.task-row .delete-btn,
.task-row .favorite-btn {
	opacity: 1;
}

.favorite-btn,
.delete-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-left: 6px;
	cursor: pointer;
}
	.favorite-btn i {
		font-size: 1.1rem;
		color: #bbb;
	}
		.favorite-btn i.bi-star-fill {
			color: #f5c518;
		}
	.favorite-btn:hover i {
		color: #f5c518;
		transform: scale(1.1);
	}
	.delete-btn:hover i {
		color: #d32f2f;
		transform: scale(1.1);
	}

.due-date-picker {
	margin-top: 6px;
	padding: 8px;
	background: white;
	border-radius: 8px;
	box-shadow: var(--ek-shadow-sm);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

	.due-date-picker input[type="date"] {
		border: 1px solid var(--ek-border);
		border-radius: 6px;
		padding: 6px 8px;
		font-size: 13px;
	}

.category-picker {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 6px 24px rgba(0,0,0,0.08);
	padding: 12px;
	width: 260px;
	margin-bottom: 6px;
}

.category-picker-list {
	max-height: 160px; 
	overflow-y: auto; 

	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-right: 6px;
}

.category-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 8px;
	border-radius: 6px;
}

	.category-option:hover {
		background: #f5f6f8;
	}

.category-name {
	font-size: 14px;
	cursor: pointer;
}

.category-delete {
	opacity: 0;
	cursor: pointer;
}

.category-option:hover .category-delete {
	opacity: 1;
}

.category-add-input,
.category-edit-input {
	width: 100%;
	padding: 8px 10px;
	margin-top: 8px;
	border-radius: 8px;
	border: 1px solid #ddd;
	font-size: 14px;
}

	.category-add-input:focus,
	.category-edit-input:focus {
		outline: none;
		border-color: var(--ek-red-ghost);
	}
/* =========================
   Detail Panel
========================= */

.todo-detail {
	background: var(--ek-red-ghost);
	padding: 20px;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.detail-header {
	display: flex;
	align-items: center;
	gap: 8px;
}

.detail-title {
	flex: 1;
	font-size: 1.1rem;
	border: none;
	background: transparent;
	font-weight: 600;
}

.detail-section.steps {
	max-height: 240px;
	background-color: white;
	border-radius: 10px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding-right: 4px;
	margin-top: 16px;
}

	.detail-section.steps::-webkit-scrollbar {
		width: 6px;
	}

	.detail-section.steps::-webkit-scrollbar-thumb {
		background: rgba(0,0,0,0.2);
		border-radius: 4px;
	}

.steps-input {
	margin-top: 10px;
	margin-bottom: 10px;
}

.step-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px;
}


.meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px;
	background: #fff;
	border-radius: 6px;
	margin-bottom: 6px;
	font-size: 13px;
	color: #444;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

	.meta-row:hover {
		background: var(--ek-surface-alt);
	}

.detail-footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	color: #888;
	padding-top: 8px;
}

.add-step-input {
	border: none;
	border-radius: 6px;
	background: transparent;
	padding: 6px 8px;
	font-size: 13px;
	color: #666;
	cursor: pointer;
	width: 100%;
}

	.add-step-input::placeholder {
		color: #aaa;
		border: none;
	}

	.add-step-input:hover {
		outline: none;
		width: 100%;
		background: white;
		border-radius: 6px;
	}
