
:root {
	--bg: #f6f7fb;
	--panel: #ffffff;
	--text: #0f172a;
	--muted: #64748b;
	--line: #e5e7eb;
	--shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	--radius: 16px;
	--sidebar: #fbfbfd;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
	color: var(--text);
	background: var(--bg);
}

.hidden {
	display: none;
}

.app {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 260px 1fr;
}

.sidebar {
	background: var(--sidebar);
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	padding: 18px 14px;
}

.sidebar__top {
	padding: 6px 6px 12px;
}

.brand {
	text-decoration: none;
	color: var(--text);
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	letter-spacing: -0.02em;
	font-size: 30px;
}

.brand__icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: #fff;
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
}

.brand__icon svg {
	width: 18px;
	height: 18px;
	fill: #0f172a;
}

.nav {
	margin-top: 8px;
	display: grid;
	gap: 8px;
	padding: 4px 6px;
}

.nav__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--text);
	text-decoration: none;
	background: rgba(15, 23, 42, 0.04);
}

.nav__icon {
	width: 30px;
	height: 30px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
}

.nav__icon svg {
	width: 16px;
	height: 16px;
	fill: #0f172a;
}

.nav__item:hover {
	background: rgba(15, 23, 42, 0.07);
}


.sidebar__bottom {
	margin-top: auto;
	padding: 10px 6px 0;
}

.sidebar__credit {
	font-size: 12px;
	color: var(--muted);
	padding: 10px 12px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	text-align: center;
}

.main {
	padding: 22px 26px 40px;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 4px 20px;
}

.topbar.hidden {
	display: none;
}

.topbar h1 {
	margin: 0;
	font-size: 26px;
	letter-spacing: -0.02em;
}

.page {
	margin-bottom: 40px;
}

.page__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 4px 16px;
}

.page__header h2 {
	margin: 0;
	font-size: 18px;
	color: #0b1736;
}

.back {
	display: inline-block;
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
	margin-bottom: 18px;
}

.back:hover {
	text-decoration: underline;
}

.class-title {
	margin: 0 0 10px;
	font-size: 54px;
	letter-spacing: -0.03em;
}

.class-summary {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 22px;
	box-shadow: var(--shadow);
	margin: 18px 0 26px;
}

.summary-title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 14px;
}

.summary-bar {
	width: 100%;
	height: 18px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
}

.summary-fill {
	height: 100%;
	width: 0%;
	background: #2563eb;
	transition: width 0.2s ease;
}

.grades {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 18px 18px 22px;
	box-shadow: var(--shadow);
}

.grades h3 {
	margin: 0 0 16px;
	font-size: 24px;
}

.grades-table {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
}

.grades-head {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 80px;
	gap: 16px;
	padding: 14px 18px;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b7280;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
}

.grades-input,
.grades-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 80px;
	gap: 16px;
	align-items: center;
	padding: 16px 18px;
}

.grades-input {
	background: #f8fafc;
	border-bottom: 1px solid #e5e7eb;
}

.grades-input input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid #d1d5db;
	font-size: 15px;
}

.grades-input button {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 10px;
	background: #d1fadf;
	color: #16a34a;
	font-size: 22px;
	font-weight: 700;
	cursor: pointer;
}

.grades-list {
	background: #fff;
}

.grades-row {
	border-top: 1px solid #eef2f7;
	font-size: 15px;
	color: #334155;
}

.grades-row button {
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid #fecaca;
	background: #fff;
	color: #dc2626;
	font-weight: 600;
	cursor: pointer;
}

.grades-row button:hover {
	background: #fee2e2;
}

.kanban {
	display: grid;
	grid-template-columns: repeat(3, minmax(240px, 1fr));
	gap: 18px;
}

.kanban__header {
	align-items: center;
}

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

.kanban__new input {
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	background: #fff;
	min-width: 180px;
}

.kanban__new button {
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #1d4ed8;
	background: #2563eb;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.kanban__column {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px;
	min-height: 180px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.kanban__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #64748b;
	margin-bottom: 12px;
}

.kanban__remove {
	width: 26px;
	height: 26px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #64748b;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.kanban__remove:hover {
	color: #dc2626;
	border-color: #fecaca;
}

.kanban__card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	font-weight: 600;
	color: #0f172a;
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
	margin-bottom: 10px;
	cursor: grab;
}

.kanban__card-meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.kanban__due-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #64748b;
	font-size: 12px;
	padding: 0 10px;
	line-height: 1;
	height: 28px;
	font-family: inherit;
	cursor: pointer;
}

.kanban__due-toggle.no-date {
	min-width: 40px;
	padding: 0;
	gap: 0;
}

.kanban__due-toggle.has-date {
	min-width: 84px;
	padding: 0 12px;
}

.kanban__due-toggle:hover {
	border-color: #cbd5f5;
	color: #1d4ed8;
}

.kanban__due-toggle.due-soon {
	color: #f59e0b;
	border-color: rgba(245, 158, 11, 0.5);
}

.kanban__due-toggle.due-urgent {
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.5);
}

.kanban__due-icon {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	display: block;
}

.kanban__due-text {
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1;
	text-align: center;
}

.kanban__card-remove {
	width: 24px;
	height: 24px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	color: #64748b;
	font-size: 14px;
	line-height: 22px;
	cursor: pointer;
}

.kanban__card-remove:hover {
	color: #dc2626;
	border-color: #fecaca;
}

.kanban__card.is-dragging {
	opacity: 0.5;
	cursor: grabbing;
}

.due-popover {
	position: absolute;
	background: #fff;
	border: 1px solid #e2e8f0;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
	border-radius: 12px;
	padding: 14px;
	min-width: 240px;
	z-index: 50;
	display: none;
}

.due-popover.is-open {
	display: block;
}

.due-popover__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.due-popover__month {
	font-size: 14px;
	font-weight: 700;
}

.due-popover__nav {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #fff;
	cursor: pointer;
}

.due-popover__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	font-size: 11px;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 6px;
}

.due-popover__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.due-popover__cell {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	min-height: 30px;
	font-size: 12px;
	background: #f8fafc;
	color: #0f172a;
	display: flex;
	align-items: center;
	justify-content: center;
}

.due-popover__cell--muted {
	color: #94a3b8;
	background: #f1f5f9;
}

.due-popover__cell--today {
	border-color: #2563eb;
	background: #eef2ff;
}

.due-popover__cell--selected {
	outline: 2px solid #2563eb;
	background: #e0e7ff;
}

.due-popover__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 10px;
}

.due-popover__btn {
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #fff;
	font-size: 12px;
	cursor: pointer;
}

.kanban__cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kanban__add {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-top: auto;
}

.kanban__add input {
	flex: 1;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid #d1d5db;
	background: #fff;
}

.kanban__add button {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: 0;
	background: #d1fadf;
	color: #16a34a;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
}

.calendar {
	display: grid;
	grid-template-columns: 1fr 240px;
	gap: 18px;
}

.calendar__header {
	align-items: center;
}

.calendar__controls {
	display: flex;
	gap: 8px;
	align-items: center;
}

.calendar__controls button {
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	background: #fff;
	font-weight: 600;
	cursor: pointer;
}

.calendar__left,
.calendar__right {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	padding: 16px;
}

.calendar__month {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 12px;
}

.calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
	font-size: 12px;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 8px;
}

.calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
}

.calendar__cell {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	min-height: 60px;
	padding: 6px;
	font-size: 14px;
	color: #0f172a;
	background: #f8fafc;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.calendar__date {
	font-weight: 600;
}

.calendar__dots {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.calendar__dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: #22c55e;
}

.calendar__dot--urgent {
	background: #ef4444;
}

.calendar__dot--soon {
	background: #f59e0b;
}

.calendar__dot--ok {
	background: #22c55e;
}

.calendar__cell--muted {
	color: #94a3b8;
	background: #f1f5f9;
}

.calendar__cell--today {
	border-color: #2563eb;
	background: #eef2ff;
}

.calendar__cell--selected {
	outline: 2px solid #2563eb;
	background: #e0e7ff;
}

.calendar__day {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 12px;
}

.calendar__tasks {
	border-top: 1px solid #e2e8f0;
	padding-top: 12px;
	font-size: 14px;
	color: #334155;
}

.calendar__tasks-title {
	font-weight: 700;
	margin-bottom: 8px;
}

.calendar__tasks-list {
	margin: 0;
	padding-left: 18px;
	display: grid;
	gap: 6px;
}


.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(240px, 1fr));
	gap: 26px;
	align-items: stretch;
}

.class-card {
	border-radius: 18px;
	background: #fff;
	padding: 14px;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.class-card:not(.class-card--add) {
	cursor: pointer;
}

.class-card__inner {
	border-radius: 14px;
	height: 240px;
	display: grid;
	place-items: center;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	position: relative;
}

.delete-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	background: #fff;
	color: #111;
	border-radius: 8px;
	padding: 6px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.delete-btn svg {
	width: 20px;
    height: 20px;
	pointer-events: none;
}

.delete-btn:hover {
	border-color: rgba(220, 38, 38, 0.6);
	color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18), 0 0 18px rgba(220, 38, 38, 0.35);
}

.gauge {
	display: grid;
	place-items: center;
	gap: 10px;
}

.gauge__svg {
	width: 140px;
	height: 70px;
}

.gauge__track {
	fill: none;
	stroke: rgba(0, 0, 0, 0.15);
	stroke-width: 10;
}

.gauge__progress {
	fill: none;
	stroke: #2563eb;
	stroke-width: 10;
	stroke-linecap: butt;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	transition: stroke 0.2s ease, stroke-dashoffset 0.2s ease;
}

.gauge__value {
	margin-top: -18px;
	font-weight: 800;
	font-size: 28px;
}

.class-card__name {
	margin-top: 6px;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.class-card--add {
	background: #fff;
}

.class-card--add .class-card__inner {
	background: #f3f4f6;
	border: 1px solid rgba(0, 0, 0, 0.08);
	gap: 18px;
	align-content: center;
}

.add-input {
	width: 70%;
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background: #fff;
	text-align: center;
	font-weight: 600;
}

.add-btn {
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: transparent;
	color: rgba(15, 23, 42, 0.35);
	font-weight: 800;
	font-size: 20px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.add-btn:hover {
	background: #fff;
	border-color: rgba(0, 0, 0, 0.15);
	color: #111;
}

.add-input:disabled,
.add-btn:disabled {
	cursor: not-allowed;
}

@media (max-width: 980px) {
	.app {
		grid-template-columns: 220px 1fr;
	}

	.card-grid {
		grid-template-columns: repeat(2, minmax(220px, 1fr));
	}
}

@media (max-width: 720px) {
	.app {
		grid-template-columns: 1fr;
	}

	.sidebar {
		position: sticky;
		top: 0;
		z-index: 3;
		flex-direction: row;
		align-items: center;
		gap: 10px;
	}

	.sidebar__bottom {
		display: none;
	}

	.nav {
		margin-top: 0;
		grid-auto-flow: column;
		justify-content: end;
		width: 100%;
	}

	.main {
		padding: 18px 16px 34px;
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

}
