@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

:root {
	--bg: #0d1117;
	--panel: #161b22;
	--panel-2: #010409;
	--text: #e6edf3;
	--muted: #848d97;
	--primary: #2f81f7;
	--primary-600: #1f6feb;
	--green: #2ea043;
	--red: #f85149;
	--yellow: #d29922;
	--border: #30363d;
	--shadow: rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
	margin: 0;
	font-family: "Rubik", sans-serif;
	background: radial-gradient(1200px 800px at 10% -10%, #0c1727 0%, #09131f 35%, var(--bg) 70%) fixed;
	color: var(--text);
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--panel-2);
    border-top: 1px solid var(--border);
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.nav-btn.active {
    color: var(--primary);
}

.app-main {
	display: grid;
	grid-template-columns: 1fr;
	min-height: calc(100vh - 60px); /* Account for bottom nav */
	padding-bottom: 0; /* Remove bottom padding since sidebar is now at bottom */
}

.content {
	padding: 16px;
	overflow: auto;
	min-height: calc(100vh - 60px - 60px); /* Account for bottom nav and potential sidebar */
}

/* Ensure content is properly visible when sidebar is open */
.sidebar.open ~ .content {
	min-height: calc(100vh - 60px - 60%); /* Adjust height when sidebar is open */
}

.app-main {
	display: grid;
	grid-template-columns: 300px 1fr;
	/* height: calc(100vh - 100px); */
}

.sidebar {
	border-right: 1px solid var(--border);
	background: var(--panel);
	overflow: auto;
	border-radius: 22px;
	margin: 21px;
	transition: transform .2s ease;
	z-index: 10;
	width: max-content;
	/* margin-right: 141px; */
}

.sidebar-header {
	display: flex;
	border-radius: 20px;
	justify-content: space-between;
	align-items: center;
	padding: 12px;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	background: inherit;
	z-index: 5;
}

.branch-tree { list-style: none; margin: 0; padding: 16px; }

.branch-item { padding-left: 12px; margin: 4px 0; }

.branch-row {
	display: grid;
	font-family: 'Rubik';
	grid-template-columns: 18px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	position: relative;
}

.branch-row:hover { background: var(--panel-2); }
.branch-row.menu-open { z-index: 3000; }

.branch-name {
	justify-self: start;
	max-width: 100%;
	padding: 4px;
	border-radius: 4px;
	background: transparent;
	border: none;
	color: var(--text);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	pointer-events: none;
}

/* Trashed branch display */
.branch-name.trashed {
	background: rgba(248, 81, 73, 0.12);
	border-color: rgba(248, 81, 73, 0.35);
	color: #ffb4ae;
	text-decoration: line-through;
	font-weight: 600;
}

.branch-actions { position: relative; z-index: 1000; }
/* Enhanced three dots menu button */
.kebab-btn,
.task-kebab-btn {
	appearance: none;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--muted);
	border-radius: 10px;
	padding: 8px 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
}

.kebab-btn:hover,
.task-kebab-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--text);
	transform: scale(1.05);
}

.kebab-btn:active,
.task-kebab-btn:active {
	transform: scale(0.95);
}

/* Three dots icon */
.kebab-btn::before,
.task-kebab-btn::before {
	content: '⋯';
	font-size: 18px;
	font-weight: bold;
	line-height: 1;
}

/* Enhanced dropdown menu styling */
.menu { 
	position: absolute; 
	right: 0; 
	top: 30px; 
	background: var(--panel); 
	border: 1px solid var(--border); 
	border-radius: 12px; 
	min-width: 160px; 
	box-shadow: 0 10px 30px var(--shadow); 
	display: none; 
	z-index: 9999;
	overflow: hidden;
}

.menu.open { 
	display: block; 
}

/* Task menu styling */
.task-menu {
	position: absolute;
	right: 0;
	top: 100%;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 12px;
	min-width: 160px;
	box-shadow: 0 10px 30px var(--shadow);
	display: none;
	z-index: 10001;
	overflow: hidden;
	margin-top: 5px;
}

.task-menu.open {
	display: block;
	animation: menuSlideIn 0.15s ease-out;
}

@keyframes menuSlideIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* General menu item styling */
.menu-item,
.task-menu-item { 
	display: flex; 
	align-items: center; 
	gap: 10px; 
	width: 100%; 
	padding: 12px 16px; 
	background: transparent; 
	border: 0; 
	color: var(--text); 
	cursor: pointer; 
	font-size: 0.9rem;
	transition: all 0.2s ease;
	text-align: left;
}

.menu-item:hover,
.task-menu-item:hover { 
	background: rgba(255,255,255,0.08);
	color: #fff;
}

.menu-item.danger,
.task-menu-item.danger { 
	color: #ff6b6b;
}

.menu-item.danger:hover,
.task-menu-item.danger:hover { 
	background: rgba(255, 107, 107, 0.1);
	color: #ff8a8a;
}

/* Menu item icons */
.task-menu-item svg {
	width: 16px;
	height: 16px;
	opacity: 0.8;
}

.task-menu-item:hover svg {
	opacity: 1;
}

.branch-children { list-style: none; margin: 2px 0 0 16px; padding: 0; transition: all 0.3s ease; }

.content {padding: 16px 16px 16px 102px;overflow: auto;}

.view { display: none; }
.view.active { display: block; }

.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.breadcrumbs { font-size: 14px; color: var(--muted); }

.card { border: 1px solid var(--border); background: linear-gradient(180deg, #0e1520 0%, #0b1220 100%); border-radius: 14px; padding: 12px; margin-bottom: 12px; box-shadow: 0 10px 30px var(--shadow); }

.form .form-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; margin-bottom: 10px; align-items: center; }
.form input, .form select, .form textarea { width: 100%; padding: 10px 12px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; }
.form-actions { display: flex; justify-content: flex-end; }

/* Custom Date Picker Styles */
.date-picker-container {
	position: relative;
	width: 100%;
	height: 42px;
}

.date-picker-container input[type="hidden"] {
	display: none;
}

.date-picker-display {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	background: var(--panel-2);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

.date-picker-display:hover {
	border-color: var(--primary);
	background: rgba(47, 129, 247, 0.05);
}

.date-picker-display:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.2);
	outline: none;
}

.calendar-icon {
	font-size: 16px;
	filter: grayscale(0) brightness(1.2);
	opacity: 0.8;
}

.date-text {
	flex: 1;
	font-size: 14px;
	color: var(--text);
}

.date-text.empty {
	color: var(--muted);
	font-style: italic;
}

.date-arrow {
	font-size: 12px;
	color: var(--muted);
	transition: transform 0.2s ease;
}

.date-picker-display.open .date-arrow {
	transform: rotate(180deg);
}

/* Custom Date Picker Modal */
.date-picker-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 15000;
	backdrop-filter: blur(4px);
	/* Additional centering fallbacks */
	place-items: center;
}

/* Ensure date picker modal appears above edit modal when both are open */
#datePickerModal {
	z-index: 20000;
}

.date-picker-modal.open {
	display: flex;
	/* Ensure flexbox centering works */
	justify-content: center;
	align-items: center;
}

.date-picker-content {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	min-width: 320px;
	max-width: 400px;
	animation: datePickerSlideIn 0.2s ease-out;
	/* Additional centering for content */
	margin: auto;
}

@keyframes datePickerSlideIn {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(-20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.date-picker-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.date-nav-btn {
	background: var(--panel-2);
	border: 1px solid var(--border);
	color: var(--text);
	width: 36px;
	height: 36px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	transition: all 0.2s ease;
}

.date-nav-btn:hover {
	background: var(--primary);
	border-color: var(--primary);
	color: white;
}

#currentMonthYear {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text);
}

.date-picker-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 12px;
}

.weekday {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	padding: 8px 4px;
}

.date-picker-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 20px;
}

.date-cell {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
	color: var(--text);
	position: relative;
}

.date-cell:hover {
	background: rgba(47, 129, 247, 0.1);
	color: var(--primary);
}

.date-cell.other-month {
	color: var(--muted);
	opacity: 0.4;
}

.date-cell.today {
	background: rgba(47, 129, 247, 0.15);
	color: var(--primary);
	font-weight: 600;
}

.date-cell.selected {
	background: var(--primary);
	color: white;
	font-weight: 600;
}

.date-cell.selected:hover {
	background: var(--primary-600);
}

.date-picker-footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.date-picker-btn {
	padding: 10px 20px;
	border-radius: 10px;
	border: 1px solid var(--border);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
	flex: 1;
}

.date-picker-btn.primary {
	background: var(--primary);
	border-color: var(--primary);
	color: white;
}

.date-picker-btn.primary:hover {
	background: var(--primary-600);
	border-color: var(--primary-600);
}

.date-picker-btn.secondary {
	background: var(--panel-2);
	border-color: var(--border);
	color: var(--text);
}

.date-picker-btn.secondary:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: var(--muted);
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
	.date-picker-content {
		min-width: auto;
		width: calc(100% - 40px);
	}
	
	.date-cell {
		font-size: 16px;
	}
	
	.weekday {
		font-size: 14px;
	}

	/* Mobile-specific menu adjustments */
	.task-menu {
		right: -10px;
		min-width: 120px;
		max-width: calc(100vw - 20px);
		font-size: 14px;
	}
}

.btn {appearance: none;background: var(--panel-2);font-family: 'Rubik';color: var(--text);border: 1px solid var(--border);padding: 8px 10px;border-radius: 10px;cursor: pointer;transition: transform .12s ease, box-shadow .12s ease;}
.btn:hover { transform: translateY(-1px); }
.btn.small { padding: 6px 8px; font-size: 12px; }
.btn.primary { background: var(--primary); border-color: var(--primary-600); }
.btn.danger { background: transparent; border-color: var(--red); color: #ffd4d4; }
.btn.ghost { background: transparent; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }

.checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 10px;
	transition: all 0.2s ease;
	user-select: none;
	position: relative;
}

.checkbox:hover {
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	transform: translateY(-1px);
}

.checkbox:active {
	transform: translateY(0);
}

.checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid var(--border);
	border-radius: 4px;
	background: var(--panel-2);
	cursor: pointer;
	position: relative;
	transition: all 0.2s ease;
	margin: 0;
}

.checkbox input[type="checkbox"]:hover {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.15);
}

.checkbox input[type="checkbox"]:checked {
	background: var(--primary);
	border-color: var(--primary);
}

.checkbox input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 6px;
	height: 10px;
	border: solid #0b1220;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.checkbox input[type="checkbox"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.25);
}

.checkbox .checkbox-text {
	font-weight: 500;
	letter-spacing: 0.2px;
}

.checkbox:has(input[type="checkbox"]:checked) .checkbox-text {
	color: var(--primary);
}

/* Focus state for accessibility */
.checkbox:has(input[type="checkbox"]:focus-visible) {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
	border-radius: 8px;
}

.hint { color: var(--muted); margin: 8px 0 12px; }

.task-list {list-style: none;justify-content: center;margin: 0;padding: 0;display: ruby;gap: 8px;}

/* Enhanced task item styling for better visual hierarchy */
.task-item {
	display: flex;
	margin: 11px;
	flex-direction: column;
	max-width: 100%;
	/* justify-self: center; */
	/* gap: 8px; */
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: 16px;
	background: linear-gradient(135deg, #0e1520 0%, #0b1220 100%);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}

/* Task header with checkbox, title, and actions on same line */
.task-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

/* Elevate task item when its menu is open */
.task-item.menu-open {
	z-index: 10002;
}

.task-item:hover {
	border-color: rgba(47, 129, 247, 0.3);
}

/* Enhanced task main content area */
.task-main {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

/* Improved task title styling */
.task-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text);
	line-height: 1.4;
	word-wrap: break-word;
	align-self: center;   /* Ensures title is vertically centered */
	margin-left: -4px;    /* Brings title closer to checkbox */
	flex: 1;              /* Allow title to take available space */
	min-width: 0;        /* Allow text truncation */
}

/* Enhanced task metadata styling */
.task-due-date,
.task-branch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 8px;
	margin-bottom: 1px;
	transition: all 0.2s ease;
	align-self: flex-start;
	flex-wrap: wrap;
	word-break: break-all;
}

.task-due-date {
	background: linear-gradient(135deg, rgba(47, 129, 247, 0.1) 0%, rgba(47, 129, 247, 0.05) 100%);
	border: 1px solid rgba(47, 129, 247, 0.2);
	color: #87ceeb;
}

.task-due-date::before {
	content: '📅';
	font-size: 0.9rem;
}

.task-branch {
	background: linear-gradient(135deg, rgba(46, 160, 67, 0.1) 0%, rgba(46, 160, 67, 0.05) 100%);
	border: 1px solid rgba(46, 160, 67, 0.2);
	color: #86efac;
}

.task-branch::before {
	content: '🌿';
	font-size: 0.9rem;
}

/* Make course codes (letters+numbers) bold in task branches */
.task-branch {
	position: relative;
}

.task-branch::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Target text patterns that look like course codes (letters followed by numbers) */
.task-branch:not(:has(*)) {
	font-weight: 500;
}

.task-branch:not(:has(*)) {
	font-weight: 500;
}

/* Drag and drop styles */
.dragging {
    opacity: 0.5;
}

.branch-item.drag-over > .branch-row {
    background-color: rgba(47, 129, 247, 0.2);
}

/* Alternative approach using JavaScript-generated spans - this CSS will style them */
.task-branch .course-code {
	font-weight: 700 !important;
	color: #a3f5ff !important;
	text-shadow: 0 0 2px rgba(163, 245, 255, 0.3);
}

.task-meta { color: var(--muted); font-size: 12px; }



/* Enhanced task notes styling */
.task-notes {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 0.9rem;
	color: var(--muted);
	line-height: 1.5;
	margin-bottom: 8px;
	transition: all 0.2s ease;
	max-width: fit-content;
	word-wrap: break-word;
}

.task-notes:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.12);
}

/* Enhanced priority styling */
.priority {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 20px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.2s ease;
	align-self: flex-start;
}

.priority.high {
	background: linear-gradient(135deg, rgba(248, 81, 73, 0.15) 0%, rgba(248, 81, 73, 0.08) 100%);
	border: 1px solid rgba(248, 81, 73, 0.3);
	color: #fca5a5;
}

.priority.high::before {
	content: '🔴';
	font-size: 0.9rem;
}

.priority.medium {
	background: linear-gradient(135deg, rgba(210, 153, 34, 0.15) 0%, rgba(210, 153, 34, 0.08) 100%);
	border: 1px solid rgba(210, 153, 34, 0.3);
	color: #fcd34d;
}

.priority.medium::before {
	content: '🟡';
	font-size: 0.9rem;
}

.priority.low {
	background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(107, 114, 128, 0.08) 100%);
	border: 1px solid rgba(107, 114, 128, 0.3);
	color: #d1d5db;
}

.priority.low::before {
	content: '🔵';
	font-size: 0.9rem;
}
.priority.low { background: rgba(46,160,67,0.12); color: #aff4c6; border-color: rgba(46,160,67,0.35); }
.priority.medium { background: rgba(210,153,34,0.12); color: #ffe09a; border-color: rgba(210,153,34,0.35); }
.priority.high { background: rgba(248,81,73,0.12); color: #ffb4ae; border-color: rgba(248,81,73,0.35); }

.task-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	position: relative;
	z-index: 10000;
}

.done .task-title { text-decoration: line-through; color: var(--muted); }

.app-footer { padding: 10px 16px; border-top: 1px solid var(--border); color: var(--muted); background: #0c131e; }

/* Collapse chevron */
.chevron { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; margin-left: 6px; }
.chevron.open { transform: rotate(45deg); }

/* Responsive */
@media (max-width: 1100px) {
	.app-main { grid-template-columns: 260px 1fr; }
}

@media (max-width: 900px) {
		.sidebar {

	margin: 0px;

		}
		.task-list {list-style: none;justify-content: center;margin: 0;padding: 0;display: grid;gap: 8px;}

	/* Show sidebar toggle on phones/tablets */
	#sidebarToggle { display: inline-flex; }
	.app-main { grid-template-columns: 1fr; }
	.sidebar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 60px; /* Position above the bottom nav */
	height: 60%;
	background: var(--panel);
	border-top: 1px solid var(--border);
	border-radius: 36px 36px 0 0;
	box-shadow: 0 -10px 30px var(--shadow);
	transform: translateY(100%);
	transition: transform 0.3s ease;
	z-index: 999;
	overflow: hidden;
}

.sidebar.open {
	transform: translateY(0);
}

.sidebar-header {
	padding: 16px;
	border-bottom: 1px solid var(--border);
	background: var(--panel-2);
}

.sidebar-header h2 {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
}

.branch-tree {
	padding: 8px 8px 80px 8px; /* Extra padding at bottom for scroll */
	height: calc(100% - 60px);
	overflow-y: auto;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
	.sidebar {
		height: 70%;
		width: 100%;
	}
}
	.content { padding: 12px 12px 80px; }
	.form .form-row { grid-template-columns: 1fr; }
	
	/* Mobile task item layout adjustments */
	.task-item {
		display: flex;
		flex-direction: column;
		/* gap: 12px; */
		padding: 16px;
	}

	.task-main {
		display: flex;
		flex-direction: column;
		gap: 1px;
	}

	.task-title {
		font-size: 1.4rem;
		margin-bottom: 6px;
	}

	.task-due-date,
	.task-branch {
		font-size: 0.8rem;
		padding: 6px 10px;
		margin-bottom: 6px;
		align-self: flex-start;
	}

	.task-notes {
		padding: 8px 10px;
		font-size: 0.85rem;
		margin-bottom: 8px;
	}

	.task-main .priority {
		margin-top: 4px;
		font-size: 0.75rem;
		padding: 5px 10px;
		align-self: flex-start;
	}

	.task-actions {
		align-self: center;
		margin-top: 0;
		position: relative;
	}

/* Quick Task Modal */
#quickTaskModal .form-row {
	display: grid;
	grid-template-columns: 100px 1fr;
	align-items: center;
	margin-bottom: 15px;
}

#quickTaskModal .form-actions {
	justify-content: flex-end;
}

#quickTaskModal.open {
    display: flex;
    justify-content: center;
    align-items: center;
}

#backBtn {
    font-size: 24px; /* Adjust size as needed */
    padding: 10px; /* Ensure consistent padding */
}

@keyframes taskCompleteSuccess {
	0% {
		transform: scale(1);
		opacity: 1;
		background: linear-gradient(135deg, #0e1520 0%, #0b1220 100%);
	}
	25% {
		transform: scale(0.97);
		background: linear-gradient(135deg, rgba(46, 160, 67, 0.1) 0%, rgba(46, 160, 67, 0.05) 100%);
		border-color: rgba(46, 160, 67, 0.5);
	}
	50% {
		transform: scale(0.95);
		box-shadow: 0 0 0 8px rgba(46, 160, 67, 0.15);
		background: linear-gradient(135deg, rgba(46, 160, 67, 0.2) 0%, rgba(46, 160, 67, 0.1) 100%);
	}
	75% {
		transform: scale(0.93);
		opacity: 0.8;
		box-shadow: 0 0 0 12px rgba(46, 160, 67, 0.1);
	}
	100% {
		transform: scale(0.9);
		opacity: 0;
		box-shadow: 0 0 0 16px rgba(46, 160, 67, 0.05);
	}
}

.task-item.complete-anim {
	animation: taskCompleteSuccess 0.6s ease-out forwards;
	pointer-events: none;
}

	/* Mobile task menu positioning adjustments */
	.task-menu {
		position: absolute;
		right: 0;
		left: auto;
		top: 100%;
		transform: none;
		min-width: 140px;
		max-width: calc(100vw - 40px);
		margin-top: 4px;
	}

	.kebab-btn,
	.task-kebab-btn {
		width: 32px;
		height: 32px;
		padding: 6px 8px;
		background: rgba(255, 255, 255, 0.05);
		border: 1px solid rgba(255, 255, 255, 0.1);
		border-radius: 8px;
		display: flex;
		align-items: center;
		justify-content: center;
	}


}

/* Circular task checkbox */
.task-check {
	appearance: none;
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border: 2px solid var(--border);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	position: relative;
	transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.task-check:hover {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(47,129,247,0.15);
}

.task-check:checked {
	background: var(--green);
	border-color: var(--green);
	box-shadow: 0 0 0 3px rgba(46,160,67,0.18);
}

.task-check:checked::after {
	content: '';
	position: absolute;
	left: 6px;
	top: 2px;
	width: 6px;
	height: 12px;
	border: solid #0b1220;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}



.branch-row.trash {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 10px;
	background: rgba(255,255,255,0.04);
}

.branch-row.trash .branch-name {
	max-width: 100%;
	text-align: left;
}

.branch-name.trashed {
	background: rgba(248, 81, 73, 0.18);
	border-color: rgba(248, 81, 73, 0.5);
	color: #ffe1de;
	text-decoration: line-through;
	font-weight: 700;
}

.branch-row.trash .branch-actions .btn.small {
	padding: 6px 10px;
	border-radius: 999px;
}

.branch-row.trash .branch-actions .btn.small.danger {
	border-color: rgba(248,81,73,0.6);
	color: #ffc9c5;
}

/* Global loading overlay */
.loading-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(3px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 2000;
}

.loading-overlay.show { display: flex; }

.loading-card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 18px 20px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
	display: grid;
	gap: 10px;
	align-items: center;
	justify-items: center;
	min-width: 260px;
}

.loading-text { color: var(--muted); font-size: 14px; }

.spinner {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	border: 3px solid rgba(255,255,255,0.12);
	border-top-color: var(--primary);
	animation: spin 0.85s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Premium overlay styles for non-premium users */
.premium-overlay {
    width: 70%;
    justify-self: center;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 2rem;
    color: #ffd700;
}

.logo h1 {
    color: #333;
    font-size: 1.4rem;
    margin: 0;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.premium-content {
    text-align: center;
}

.premium-features {
	font-family:"Rubik", sans-serif !important;
    background: #f8f9fa;
    padding: 0.5rem;
	direction: rtl;
    border-radius: 0.8rem;
    margin-bottom: 2rem;
}

.premium-features h2 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.premium-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.premium-features li {
    color: #555;
    margin: 0.8rem 0;
    font-size: 1rem;
}

.premium-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gold-button {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    color: #000000;
    align-self: anchor-center;
    font-weight: 600;
    font-family: "Rubik", sans-serif !important;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
    width: 250px;
    text-align: center;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(247, 151, 30, 0.3);
 }
 
 .gold-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 151, 30, 0.4);
 }
 
 .gold-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(247, 151, 30, 0.3);
 }
 
 @media (max-width: 1000px) {
    .gold-button {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        width: 220px;
    }
 }
 
 @media (max-width: 768px) {
	.logo h1{
		font-size: 1.3rem;
	}
    .premium-overlay {
		width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .gold-button {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        width: 200px;
    }
 }
