:root {
	--bg-top: #eef4ff;
	--bg-bottom: #f8fafc;
	--surface: #ffffff;
	--surface-muted: #f6f9ff;
	--text-main: #142033;
	--text-muted: #5f6b7a;
	--line: #d6dfec;
	--accent: #1f6feb;
	--accent-hover: #1859ba;
	--danger: #c2410c;
	--danger-hover: #9a3412;
	--radius-lg: 18px;
	--radius-md: 12px;
	--radius-sm: 8px;
	--shadow-soft: 0 10px 28px rgba(26, 59, 112, 0.1);
	--shadow-card: 0 6px 16px rgba(20, 32, 51, 0.06);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	min-height: 100vh;
	font-family: "IBM Plex Sans", "Source Sans 3", "Trebuchet MS", sans-serif;
	color: var(--text-main);
	background:
		radial-gradient(circle at 10% 10%, #dcecff 0, rgba(220, 236, 255, 0) 45%),
		linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
	line-height: 1.45;
}

.page-shell {
	width: min(980px, 92vw);
	margin: 42px auto;
	display: grid;
	gap: 22px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	padding: 26px;
}

h1,
h2 {
	margin: 0 0 16px;
	letter-spacing: 0.2px;
}

h1 {
	font-size: clamp(1.4rem, 2.4vw, 2rem);
}

h2 {
	font-size: clamp(1.15rem, 1.8vw, 1.4rem);
	color: #1f2e45;
}

.task-form {
	display: grid;
	gap: 14px;
}

.field-group {
	display: grid;
	gap: 7px;
}

label {
	font-weight: 600;
	color: #213149;
}

input[type="text"] {
	width: 100%;
	border: 1px solid #c8d4e6;
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
	padding: 11px 12px;
	font-size: 0.98rem;
	color: var(--text-main);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input[type="text"]:focus {
	outline: none;
	border-color: var(--accent);
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.16);
}

button[type="submit"] {
	justify-self: start;
	border: 0;
	border-radius: var(--radius-sm);
	padding: 11px 18px;
	font-weight: 700;
	letter-spacing: 0.2px;
	cursor: pointer;
	color: #ffffff;
	background: linear-gradient(180deg, #2a7af0 0%, var(--accent) 100%);
	box-shadow: var(--shadow-soft);
	transition: transform 0.15s ease, filter 0.15s ease;
}

button[type="submit"]:hover {
	transform: translateY(-1px);
	filter: brightness(0.97);
}

button[type="submit"]:active {
	transform: translateY(0);
}

.empty-state {
	margin: 0;
	color: var(--text-muted);
	background: #f9fbff;
	border: 1px dashed #cad8ed;
	border-radius: var(--radius-md);
	padding: 14px;
}

.task-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.task-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	background: #fbfdff;
	border: 1px solid #d9e4f4;
	border-radius: var(--radius-md);
	padding: 14px;
}

.task-content strong {
	display: block;
	font-size: 1.02rem;
	margin-bottom: 4px;
}

.task-content p {
	margin: 0 0 6px;
	color: #22324b;
}

.task-content small {
	color: var(--text-muted);
	font-size: 0.82rem;
}

.task-actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.edit-link {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	color: #1e4ea8;
	font-weight: 700;
	font-size: 0.92rem;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(31, 111, 235, 0.26);
	background: #eff6ff;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.edit-link:hover {
	color: #ffffff;
	background: var(--accent-hover);
}

.delete-link {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	color: var(--danger);
	font-weight: 700;
	font-size: 0.92rem;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(194, 65, 12, 0.22);
	background: #fff7ed;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.delete-link:hover {
	color: #ffffff;
	background: var(--danger-hover);
}

@media (max-width: 640px) {
	.page-shell {
		width: min(100%, 94vw);
		margin: 24px auto;
		gap: 14px;
	}

	.card {
		padding: 18px;
		border-radius: 14px;
	}

	.task-item {
		flex-direction: column;
		align-items: stretch;
	}

	.task-actions {
		justify-content: center;
	}

	.delete-link {
		justify-content: center;
	}

	.edit-link {
		justify-content: center;
	}
}
