:root {
	--bg: #0b1020;
	--bg-alt: #121933;
	--surface: rgba(255, 255, 255, 0.08);
	--surface-strong: rgba(255, 255, 255, 0.12);
	--border: rgba(255, 255, 255, 0.12);
	--text: #e8ecf8;
	--muted: #9ea8c7;
	--heading: #ffffff;
	--accent: #7c9cff;
	--accent-strong: #5c7cff;
	--success: #29c27f;
	--danger: #ff5d73;
	--warning: #ffb84d;
	--high: #ff6b6b;
	--medium: #ffb84d;
	--low: #56a5ff;
	--shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
	--radius-lg: 24px;
	--radius-md: 16px;
	--radius-sm: 12px;
}

body.light {
	--bg: #f3f6fc;
	--bg-alt: #e7edf8;
	--surface: rgba(255, 255, 255, 0.85);
	--surface-strong: #ffffff;
	--border: rgba(24, 35, 69, 0.1);
	--text: #1e2746;
	--muted: #66708f;
	--heading: #0f172a;
	--accent: #4f6df5;
	--accent-strong: #284bd9;
	--success: #16a34a;
	--danger: #dc2626;
	--warning: #d97706;
	--high: #dc2626;
	--medium: #d97706;
	--low: #2563eb;
	--shadow: 0 20px 50px rgba(31, 41, 55, 0.12);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: Arial, sans-serif;
	background:
		radial-gradient(circle at top left, rgba(124, 156, 255, 0.18), transparent 28%),
		radial-gradient(circle at bottom right, rgba(41, 194, 127, 0.12), transparent 22%),
		linear-gradient(180deg, var(--bg), var(--bg-alt));
	color: var(--text);
	min-height: 100vh;
}

button,
input,
select,
textarea {
	font: inherit;
}

.app-shell {
	max-width: 1500px;
	margin: 0 auto;
	padding: 32px 24px 48px;
}

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin-bottom: 24px;
}

.eyebrow {
	margin: 0 0 6px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
}

h1 {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3.4rem);
	color: var(--heading);
}

h2,
h3 {
	margin: 0;
	color: var(--heading);
}

.topbar-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

.primary-btn,
.secondary-btn,
.icon-btn {
	border: 1px solid var(--border);
	border-radius: 14px;
	cursor: pointer;
	transition: 0.2s ease;
}

.primary-btn {
	background: linear-gradient(135deg, var(--accent), var(--accent-strong));
	color: white;
	padding: 13px 18px;
	font-weight: 700;
	box-shadow: var(--shadow);
}

.primary-btn:hover {
	transform: translateY(-2px);
}

.secondary-btn,
.icon-btn {
	background: var(--surface);
	color: var(--text);
	backdrop-filter: blur(14px);
}

.secondary-btn {
	padding: 13px 18px;
}

.icon-btn {
	width: 46px;
	height: 46px;
	font-size: 18px;
}

.control-panel,
.stat-card,
.column,
.modal-card,
.task-card {
	background: var(--surface);
	border: 1px solid var(--border);
	backdrop-filter: blur(18px);
	box-shadow: var(--shadow);
}

.control-panel {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 18px;
	border-radius: var(--radius-lg);
	margin-bottom: 24px;
}

.search-wrap {
	flex: 1;
}

.search-wrap input,
.filters select,
label input,
label select,
label textarea {
	width: 100%;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.04);
	color: var(--text);
	border-radius: 14px;
	padding: 14px 16px;
	outline: none;
}

.search-wrap input::placeholder,
label textarea::placeholder,
label input::placeholder {
	color: var(--muted);
}

.filters {
	display: flex;
	gap: 12px;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin-bottom: 24px;
}

.stat-card {
	padding: 20px;
	border-radius: var(--radius-lg);
}

.stat-card span {
	display: block;
	color: var(--muted);
	margin-bottom: 10px;
	font-size: 14px;
}

.stat-card strong {
	font-size: 2rem;
	color: var(--heading);
}

.board {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	align-items: start;
}

.column {
	border-radius: var(--radius-lg);
	padding: 16px;
	min-height: 520px;
}

.column.drag-over {
	outline: 2px dashed var(--accent);
	transform: scale(1.01);
}

.column-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.task-count {
	min-width: 34px;
	height: 34px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: rgba(124, 156, 255, 0.18);
	color: var(--heading);
	font-weight: 700;
}

.task-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 120px;
}

.task-card {
	border-radius: var(--radius-md);
	padding: 16px;
	cursor: grab;
	transition: 0.2s ease;
}

.task-card:hover {
	transform: translateY(-4px);
}

.task-card.dragging {
	opacity: 0.5;
	transform: rotate(1deg);
}

.task-top {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.priority-pill {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 999px;
	color: white;
	font-size: 12px;
	font-weight: 700;
	text-transform: capitalize;
}

.priority-high {
	background: var(--high);
}

.priority-medium {
	background: var(--medium);
}

.priority-low {
	background: var(--low);
}

.card-menu {
	display: flex;
	gap: 8px;
}

.card-menu button {
	border: none;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	font-size: 14px;
}

.card-menu button:hover {
	color: var(--heading);
}

.task-card h3 {
	margin-bottom: 10px;
	font-size: 1.05rem;
}

.task-card p {
	margin: 0 0 14px;
	color: var(--muted);
	line-height: 1.5;
}

.meta {
	display: grid;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
}

.meta strong {
	color: var(--text);
}

.overdue {
	color: var(--danger);
	font-weight: 700;
}

.empty-state {
	padding: 18px;
	border: 1px dashed var(--border);
	border-radius: var(--radius-md);
	color: var(--muted);
	text-align: center;
}

.modal {
	position: fixed;
	inset: 0;
	background: rgba(5, 10, 20, 0.7);
	display: grid;
	place-items: center;
	padding: 20px;
	z-index: 1000;
}

.hidden {
	display: none;
}

.modal-card {
	width: min(680px, 100%);
	border-radius: 28px;
	padding: 24px;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
}

#taskForm {
	display: grid;
	gap: 16px;
}

label {
	display: grid;
	gap: 8px;
	color: var(--heading);
	font-weight: 600;
}

label textarea {
	resize: vertical;
	min-height: 120px;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 8px;
}

@media (max-width: 1200px) {
	.board {
		grid-template-columns: repeat(2, 1fr);
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 760px) {
	.topbar,
	.control-panel,
	.form-grid {
		grid-template-columns: 1fr;
		display: grid;
	}

	.board,
	.stats-grid {
		grid-template-columns: 1fr;
	}

	.filters {
		flex-direction: column;
	}

	.topbar-actions {
		justify-content: flex-start;
	}

	.app-shell {
		padding: 22px 16px 34px;
	}
}

.filters select,
label select,
.filters select option,
label select option {
background-color: #000;
color: #fff;
}

.view-more-btn {
    width: 100%;
    border: 1px dashed var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    margin-top: 4px;
}

.view-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.view-all-card {
    width: min(600px, 92vw);
    height: min(600px, 82vh);
    display: flex;
    flex-direction: column;
}

.view-all-list {
    display: grid;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
}