:root {
	--color-primary: #1261a6;
	--color-primary-dark: #0b477c;
	--color-primary-light: #e8f2fb;
	--color-background: #f4f7fb;
	--color-surface: #ffffff;
	--color-text: #172033;
	--color-text-muted: #64748b;
	--color-border: #d8e1ec;
	--color-danger: #c0362c;
	--color-danger-light: #fff0ef;
	--color-success: #16794b;
	--color-success-light: #eaf8f1;
	--shadow-card: 0 10px 30px rgba(22, 50, 79, 0.09);
	--radius: 14px;
	--radius-small: 9px;
	--page-width: 760px;
}

* {
	box-sizing: border-box;
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	min-height: 100vh;
	margin: 0;
	color: var(--color-text);
	background: var(--color-background);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.5;
}

button,
input {
	font: inherit;
}

a {
	color: var(--color-primary);
}

.app-header {
	position: sticky;
	top: 0;
	z-index: 10;
	color: #fff;
	background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
	box-shadow: 0 4px 16px rgba(11, 71, 124, 0.2);
}

.app-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: min(100% - 32px, var(--page-width));
	min-height: 64px;
	margin: 0 auto;
}

.app-header__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
}

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

.app-header__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 12px;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: var(--radius-small);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 650;
}

.app-header__link:hover {
	background: rgba(255, 255, 255, 0.12);
}

.page {
	width: min(100% - 32px, var(--page-width));
	margin: 0 auto;
	padding: 28px 0 48px;
}

.page-heading {
	margin: 0 0 22px;
}

.page-heading h1 {
	margin: 0;
	font-size: clamp(1.5rem, 5vw, 2rem);
	line-height: 1.2;
}

.page-heading p {
	margin: 7px 0 0;
	color: var(--color-text-muted);
}

.card {
	margin-bottom: 20px;
	padding: clamp(18px, 4vw, 28px);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

.card__header {
	margin-bottom: 20px;
}

.card__title {
	margin: 0;
	font-size: 1.15rem;
}

.card__description {
	margin: 5px 0 0;
	color: var(--color-text-muted);
	font-size: 0.94rem;
}

.form-group {
	margin-bottom: 18px;
}

.form-group:last-child {
	margin-bottom: 0;
}

.form-label {
	display: block;
	margin-bottom: 7px;
	font-weight: 650;
}

.form-control {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 13px;
	color: var(--color-text);
	-webkit-text-fill-color: var(--color-text);
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-small);
	outline: none;
	opacity: 1;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
	color: #94a3b8;
}

.form-control:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 4px rgba(18, 97, 166, 0.14);
}

.form-control--small {
	min-height: 30px;
	padding: 5px 9px;
	font-size: 0.78rem;
	border-radius: 9px;
}

.competence-list {
	display: grid;
	gap: 14px;
	margin-bottom: 18px;
}

.competence-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: 12px;
	padding: 12px;
	background: #fff;
	border: 1px solid #d9e5ef;
	border-radius: 14px;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.competence-fields {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.competence-label {
	margin-bottom: 0;
	color: var(--color-text);
	font-size: 0.84rem;
	font-weight: 700;
}

.competence-label--description {
	margin-top: 2px;
	color: #8fa0b3;
	font-size: 0.68rem;
	font-weight: 650;
	letter-spacing: 0.02em;
}

.competence-description-input {
	color: #526171;
	background: #f9fbfd;
	border-color: #e1e9f1;
}

.competence-description-input::placeholder {
	color: #c2ceda;
	-webkit-text-fill-color: #c2ceda;
	opacity: 1;
}

.competence-row .remove-competence {
	align-self: end;
	min-height: 32px;
	padding: 6px 10px;
	border-radius: 10px;
	font-size: 0.78rem;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 17px;
	color: #fff;
	background: var(--color-primary);
	border: 1px solid var(--color-primary);
	border-radius: var(--radius-small);
	cursor: pointer;
	text-decoration: none;
	font-weight: 700;
	line-height: 1.2;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
	background: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
}

.button:active {
	transform: translateY(1px);
}

.button:focus-visible,
.app-header__link:focus-visible {
	outline: 3px solid rgba(18, 97, 166, 0.25);
	outline-offset: 3px;
}

.button--secondary {
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
	border-color: #b9d5ee;
}

.button--secondary:hover {
	color: #fff;
}

.button--danger {
	min-height: 44px;
	color: var(--color-danger);
	background: var(--color-danger-light);
	border-color: #f0c5c2;
	font-size: 0.9rem;
}

.button--danger:hover {
	color: #fff;
	background: var(--color-danger);
	border-color: var(--color-danger);
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 24px;
}

.form-actions .button {
	min-width: 160px;
}

.alert {
	padding: 16px 18px;
	border: 1px solid;
	border-radius: var(--radius-small);
}

.alert--success {
	color: var(--color-success);
	background: var(--color-success-light);
	border-color: #a8dfc3;
}

.alert--error {
	color: var(--color-danger);
	background: var(--color-danger-light);
	border-color: #f0c5c2;
}

.alert p:first-child {
	margin-top: 0;
}

.alert p:last-child,
.alert ul:last-child {
	margin-bottom: 0;
}

@media (max-width: 520px) {
	.app-header__inner,
	.page {
		width: min(100% - 24px, var(--page-width));
	}

	.app-header__inner {
		min-height: 58px;
	}

	.app-header__link--refresh {
		display: none;
	}

	.page {
		padding-top: 20px;
	}

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

	.competence-row {
		grid-template-columns: 1fr;
		padding: 12px;
	}

	.button--danger {
		justify-self: end;
		min-height: 40px;
	}

	.form-actions,
	.form-actions .button,
	.button--mobile-full {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

/* Dashboard */
.index-page {
	padding: 24px;
	background:
		radial-gradient(circle at top left, rgba(18, 97, 166, 0.1), transparent 32rem),
		var(--color-background);
}

.index-page.popup-open {
	overflow: hidden;
}

.dashboard-header {
	width: min(100%, 1180px);
	margin: 0 auto 24px;
	padding: clamp(18px, 4vw, 30px);
	color: var(--color-text);
	background: var(--color-surface);
	border: 1px solid rgba(18, 97, 166, 0.14);
	border-radius: 20px;
	box-shadow: var(--shadow-card);
}

.dashboard-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: -30px -30px 24px;
	padding: 24px 30px;
	color: #fff;
	background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
	border-radius: 20px 20px 0 0;
}

.dashboard-header__eyebrow {
	display: block;
	margin-bottom: 3px;
	color: #cfe6f8;
	font-size: 0.78rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.dashboard-header__title {
	margin: 0;
	font-size: clamp(1.4rem, 4vw, 2rem);
	line-height: 1.15;
}

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

.dashboard-profile-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-profile-link:hover {
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
	transform: translateY(-1px);
}

.dashboard-profile-link span {
	display: block;
	width: 21px;
	height: 21px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.dashboard-header__tools {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.dashboard-header__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 5px 9px;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: var(--radius-small);
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 700;
}

.dashboard-header__link:hover {
	background: rgba(255, 255, 255, 0.12);
}

.dashboard-header__link--logout {
	color: #ffe2df;
}

.dashboard-subject {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.dashboard-subject label {
	color: #d8eafb;
	font-size: 0.72rem;
	font-weight: 650;
}

.dashboard-subject select {
	width: 150px;
	min-height: 32px;
	padding: 4px 26px 4px 8px;
	color: var(--color-text);
	background: #fff;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 7px;
	font-size: 0.78rem;
}

.dashboard-toolbar {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}

.dashboard-toolbar > .dashboard-icon-button {
	justify-self: center;
	width: 48px;
	min-width: 48px;
	padding: 0;
}

.dashboard-icon-button span {
	display: block;
	width: 24px;
	height: 24px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

.dashboard-icon-button--settings span {
	background-image: url("images/icon-settings.png");
}

.dashboard-icon-button--user span {
	background-image: url("images/icon-user.png");
}

.dashboard-toolbar > a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
	border: 1px solid #bfd8ed;
	border-radius: 11px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	font-weight: 720;
	list-style: none;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dashboard-toolbar > a:hover {
	color: #fff;
	background: var(--color-primary);
	border-color: var(--color-primary);
}

.index-page [data-role="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	margin: 3px;
	padding: 7px 11px;
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
	border: 1px solid #bfd8ed;
	border-radius: 8px;
	text-decoration: none;
	font-size: 0.84rem;
	font-weight: 700;
	line-height: 1.2;
}

.index-page [data-role="button"]:hover {
	color: #fff;
	background: var(--color-primary);
	border-color: var(--color-primary);
}

.index-page .dashboard-button--pale-green {
	color: #263523;
	background: #b6cba0;
	border-color: #9eb889;
}

.index-page .dashboard-button--pale-green:hover {
	color: #263523;
	background: #a8c191;
	border-color: #89a873;
}

.index-page .dashboard-button--pale-orange {
	color: #5b3917;
	background: #f6d5a8;
	border-color: #e5bb82;
	box-shadow: 0 8px 18px rgba(175, 105, 28, 0.08);
}

.index-page .dashboard-button--pale-orange:hover,
.index-page .dashboard-button--pale-orange:focus {
	color: #4a2f14;
	background: #efc589;
	border-color: #d7a667;
	box-shadow: 0 10px 22px rgba(175, 105, 28, 0.14);
}

.index-page table#tabindex tbody td:first-child [data-role="button"],
.index-page table#tabindex .dashboard-button--pale-orange {
	width: 52px;
	min-width: 52px;
	max-width: 52px;
	min-height: 29px;
	padding: 5px 8px;
	font-size: 0.63rem;
	border-radius: 7px;
	line-height: 1.05;
	white-space: normal;
}

.index-page .dashboard-button--pale-blue {
	color: #16456d;
	background: #d8ebfb;
	border-color: #afd2ef;
	box-shadow: 0 8px 18px rgba(18, 97, 166, 0.08);
}

.index-page .dashboard-button--pale-blue:hover,
.index-page .dashboard-button--pale-blue:focus {
	color: #123a5c;
	background: #c5e0f7;
	border-color: #8fbfe6;
	box-shadow: 0 10px 22px rgba(18, 97, 166, 0.14);
}

.index-page .dashboard-button--qcm {
	color: #1d5d4a;
	background: rgba(225, 238, 232, 0.88);
	border-color: rgba(29, 93, 74, 0.22);
	box-shadow: 0 10px 22px rgba(29, 93, 74, 0.08);
}

.index-page .dashboard-button--qcm:hover {
	color: #1d5d4a;
	background: #edf5f1;
	border-color: rgba(29, 93, 74, 0.35);
	box-shadow: 0 14px 28px rgba(29, 93, 74, 0.12);
}

.index-page .dashboard-icon-button:hover {
	background: #fff;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(18, 97, 166, 0.12);
}

.index-page [data-icon="delete"] {
	color: var(--color-danger);
	background: var(--color-danger-light);
	border-color: #f0c5c2;
}

.index-page [data-icon="delete"]:hover {
	color: #fff;
	background: var(--color-danger);
	border-color: var(--color-danger);
}

.index-page [data-role="popup"] {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 1001;
	display: none;
	width: min(calc(100% - 32px), 680px);
	max-height: min(82vh, 760px);
	margin: 0;
	padding: 28px 22px 22px;
	overflow: auto;
	color: var(--color-text);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(15, 35, 55, 0.3);
	text-align: left;
	transform: translate(-50%, -50%);
}

.index-page [data-role="popup"].is-open {
	display: block;
}

.index-page [data-role="popup"] > p {
	margin: 0;
}

.index-page [data-role="popup"] [data-role="button"] {
	display: flex;
	width: 100%;
	margin: 7px 0;
}

.index-page [data-role="popup"].report-popup {
	width: min(calc(100% - 28px), 640px);
	padding: 30px 24px 24px;
	background: linear-gradient(145deg, #fffdf4 0%, #f4f9fd 100%);
	border-color: rgba(18, 97, 166, 0.18);
}

.report-popup__header {
	padding: 0 42px 16px 0;
}

.report-popup__eyebrow {
	margin: 0 0 4px;
	color: #7a650f;
	font-size: 0.72rem;
	font-weight: 850;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.report-popup__header h2 {
	margin: 0;
	color: var(--color-primary-dark);
	font-size: 1.45rem;
}

.report-popup__header > p:last-child {
	margin: 7px 0 0;
	color: var(--color-muted);
}

.report-popup__section {
	padding-top: 16px;
	border-top: 1px solid rgba(18, 97, 166, 0.13);
}

.report-popup__section + .report-popup__section {
	margin-top: 18px;
}

.report-popup__section > h3 {
	margin: 0 0 10px;
	color: #4a3a12;
	font-size: 0.9rem;
}

.report-popup__class-buttons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 8px;
}

.report-class-button,
.report-action {
	appearance: none;
	border-radius: 10px;
	cursor: pointer;
	font: inherit;
	transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.report-class-button {
	min-height: 40px;
	padding: 8px 11px;
	color: var(--color-primary-dark);
	background: #eef6fc;
	border: 1px solid #bfd8ed;
	font-size: 0.84rem;
	font-weight: 750;
}

.report-class-button:hover,
.report-class-button:focus-visible {
	color: #fff;
	background: var(--color-primary);
	border-color: var(--color-primary);
	box-shadow: 0 8px 18px rgba(18, 97, 166, 0.16);
	transform: translateY(-1px);
}

.report-popup__classes {
	width: 100%;
}

.report-popup .report-popup__class.native-collapsible {
	margin-bottom: 8px;
	border-color: #c9ddeb;
}

.report-popup .report-popup__class > .collapsible-heading {
	color: var(--color-primary-dark);
	background: #eef6fc;
	font-size: 0.92rem;
}

.report-popup .report-popup__class.is-open > .collapsible-heading {
	background: #dcecf8;
}

.report-popup .native-collapsible > .report-popup__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	padding: 10px;
	background: #fff;
}

.report-action {
	display: grid;
	align-content: center;
	gap: 3px;
	min-height: 70px;
	padding: 10px 8px;
	text-align: left;
}

.report-action strong {
	font-size: 0.82rem;
	line-height: 1.15;
}

.report-action small {
	font-size: 0.68rem;
	line-height: 1.2;
	opacity: 0.78;
}

.report-action--weekly {
	color: #16456d;
	background: #e5f2fc;
	border: 1px solid #afd2ef;
}

.report-action--cos {
	color: #1d5d4a;
	background: #e4f1ea;
	border: 1px solid #acd0c1;
}

.report-action--summary {
	color: #624a08;
	background: #fff3c4;
	border: 1px solid #e9ce69;
}

.report-action:hover,
.report-action:focus-visible {
	border-color: currentColor;
	box-shadow: 0 9px 20px rgba(31, 62, 88, 0.13);
	transform: translateY(-1px);
}

@media (max-width: 600px) {
	.index-page [data-role="popup"].report-popup {
		padding: 28px 16px 18px;
	}

	.report-popup .native-collapsible > .report-popup__actions {
		grid-template-columns: 1fr;
	}

	.report-action {
		min-height: 54px;
	}
}

.index-page [data-role="popup"].creation-evaluation-popup,
.index-page [data-role="popup"].clone-evaluation-popup {
	width: min(calc(100% - 28px), 500px);
	background: #f3f7ef;
	border-color: #9eb889;
	box-shadow: 0 24px 80px rgba(67, 88, 59, 0.28);
}

.creation-evaluation-popup h2,
.clone-evaluation-popup h2 {
	margin: 0 38px 6px 0;
	color: #526b49;
}

.creation-evaluation-popup > p,
.clone-evaluation-popup form > p {
	color: #687363;
}

.creation-evaluation-popup [data-role="button"] {
	color: #263523;
	background: #fff;
	border-color: #b6cba0;
}

.creation-evaluation-popup [data-role="button"]:hover {
	color: #263523;
	background: #b6cba0;
	border-color: #89a873;
}

.creation-evaluation-popup .clone-evaluation-open {
	margin-top: 14px;
	background: #b6cba0;
	border-color: #9eb889;
}

.clone-evaluation-popup form {
	margin: 0;
}

.clone-evaluation-popup label {
	display: block;
	margin: 16px 0 6px;
	color: #263523;
	font-weight: 750;
}

.clone-evaluation-popup input[type="number"] {
	display: block;
	width: 100%;
	min-height: 46px;
	padding: 9px 11px;
	color: #263523;
	background: #fff;
	border: 1px solid #b6cba0;
	border-radius: 9px;
	outline: none;
}

.clone-evaluation-popup input[type="number"]:focus {
	border-color: #526b49;
	box-shadow: 0 0 0 4px rgba(82, 107, 73, 0.14);
}

.clone-evaluation-status {
	min-height: 22px;
	margin: 10px 0 0 !important;
	font-size: 0.86rem;
	font-weight: 650;
}

.clone-evaluation-status.is-loading {
	color: #526b49;
}

.clone-evaluation-status.is-success {
	color: var(--color-success);
}

.clone-evaluation-status.is-error {
	color: var(--color-danger);
}

.clone-evaluation-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}

.clone-evaluation-actions button {
	min-height: 42px;
	padding: 8px 13px;
	border: 1px solid #9eb889;
	border-radius: 9px;
	font: inherit;
	font-weight: 750;
	cursor: pointer;
}

.clone-evaluation-actions button[type="submit"] {
	color: #263523;
	background: #b6cba0;
}

.clone-evaluation-actions .button-secondary {
	color: #526b49;
	background: #fff;
}

.clone-evaluation-actions button:disabled {
	cursor: wait;
	opacity: 0.7;
}

.index-page [data-role="popup"].qcm-creation-popup {
	width: min(calc(100% - 28px), 560px);
	color: #2e271f;
	background: rgba(255, 251, 245, 0.94);
	border-color: rgba(125, 104, 78, 0.18);
	box-shadow: 0 18px 50px rgba(72, 49, 19, 0.1);
	backdrop-filter: blur(12px);
}

.qcm-creation-popup .popup-close:hover {
	color: #1d5d4a;
	background: #e1eee8;
}

.qcm-creation-popup h2 {
	color: #2e271f;
}

.qcm-creation-popup .native-collapsible {
	border-color: rgba(125, 104, 78, 0.18);
}

.qcm-creation-popup .collapsible-heading {
	color: #1d5d4a;
	background: rgba(225, 238, 232, 0.88);
}

.qcm-creation-popup [data-role="button"] {
	color: #1d5d4a;
	background: rgba(225, 238, 232, 0.88);
	border-color: rgba(29, 93, 74, 0.22);
	box-shadow: 0 10px 22px rgba(29, 93, 74, 0.08);
}

.qcm-creation-popup [data-role="button"]:hover {
	color: #1d5d4a;
	background: #edf5f1;
	border-color: rgba(29, 93, 74, 0.35);
	box-shadow: 0 14px 28px rgba(29, 93, 74, 0.12);
}

.qcm-create-class-form {
	margin: 0;
}

.qcm-create-class-form button[data-role="button"] {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border-style: solid;
	border-width: 1px;
	border-radius: var(--radius-small);
	cursor: pointer;
	font-weight: 700;
}

.qcm-popup-group {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid rgba(125, 104, 78, 0.18);
}

.qcm-popup-group--primary {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.qcm-popup-group--primary [data-role="button"] {
	color: #1d5d4a;
	background: rgba(225, 238, 232, 0.88);
	border-color: rgba(29, 93, 74, 0.22);
}

.qcm-popup-group--primary [data-role="button"]:hover {
	color: #1d5d4a;
	background: #edf5f1;
	border-color: rgba(29, 93, 74, 0.35);
}

.qcm-popup-group__title {
	margin: 0 0 8px !important;
	color: #6d6357;
	font-size: 0.86rem;
	font-weight: 750;
}

.popup-close {
	position: absolute;
	top: 8px;
	right: 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: var(--color-text-muted);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.7rem;
	line-height: 1;
}

.popup-close:hover {
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
}

.popup-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	background: rgba(14, 30, 47, 0.55);
	backdrop-filter: blur(3px);
}

.popup-backdrop.is-open {
	display: block;
}

.correction-download-button {
	white-space: nowrap;
	font-size: 0.78rem !important;
}

.index-page [data-role="popup"].correction-download-popup {
	width: min(calc(100% - 28px), 620px);
	max-width: 620px;
	max-height: 90vh;
	overflow-y: auto;
}

.correction-download-popup h2 {
	margin: 0 38px 5px 0;
	color: var(--color-primary-dark);
	font-size: 1.35rem;
}

.correction-download-popup__intro {
	margin: 0 0 18px !important;
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

.correction-download-group {
	min-width: 0;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.correction-download-group legend {
	margin-bottom: 8px;
	color: var(--color-text);
	font-size: 0.88rem;
	font-weight: 700;
}

.correction-download-choices,
.correction-download-formats {
	display: grid;
	gap: 8px;
}

.correction-download-choices {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.correction-download-formats {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.correction-download-choices label,
.correction-download-formats label {
	display: block;
	margin: 0;
	cursor: pointer;
}

.correction-download-choices input,
.correction-download-formats input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.correction-download-choices span,
.correction-download-formats span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 45px;
	padding: 9px 12px;
	color: var(--color-text);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 10px;
	text-align: center;
	transition: 0.18s ease;
}

.correction-download-formats span {
	flex-direction: column;
	gap: 2px;
	min-height: 66px;
}

.correction-download-formats small {
	color: var(--color-text-muted);
	font-size: 0.7rem;
}

.correction-download-choices input:checked + span,
.correction-download-formats input:checked + span {
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
	border-color: var(--color-primary);
	box-shadow: 0 0 0 2px rgba(18, 97, 166, 0.1);
}

.correction-download-choices input:focus-visible + span,
.correction-download-formats input:focus-visible + span {
	outline: 3px solid rgba(18, 97, 166, 0.2);
	outline-offset: 2px;
}

.correction-download-actions {
	display: flex;
	justify-content: flex-end;
	gap: 9px;
	margin-top: 22px;
}

.correction-download-actions button {
	min-height: 42px;
	padding: 9px 16px;
	color: #fff;
	background: var(--color-primary);
	border: 1px solid var(--color-primary);
	border-radius: 10px;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}

.correction-download-actions .button-secondary {
	color: var(--color-text);
	background: var(--color-surface);
	border-color: var(--color-border);
}

.index-page [data-role="collapsibleset"] {
	width: 100% !important;
	margin: 12px 0 !important;
}

.native-collapsible {
	margin-bottom: 9px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 10px;
}

.native-collapsible > .collapsible-heading {
	position: relative;
	margin: 0;
	padding: 12px 40px 12px 14px;
	color: var(--color-primary-dark);
	background: var(--color-primary-light);
	cursor: pointer;
	font-size: 1rem;
}

.native-collapsible > .collapsible-heading::after {
	position: absolute;
	top: 50%;
	right: 15px;
	content: "+";
	font-size: 1.25rem;
	transform: translateY(-50%);
}

.native-collapsible.is-open > .collapsible-heading::after {
	content: "−";
}

.native-collapsible:not(.is-open) > :not(.collapsible-heading) {
	display: none;
}

.native-collapsible > :not(.collapsible-heading) {
	margin: 0;
	padding: 12px 14px;
}

.native-collapsible ul {
	list-style: none;
}

.index-page .dashboard-button--qcm,
.index-page .dashboard-button--qcm:visited {
	color: #1d5d4a !important;
	background: rgba(225, 238, 232, 0.88) !important;
	border-color: rgba(29, 93, 74, 0.22) !important;
	box-shadow: 0 10px 22px rgba(29, 93, 74, 0.08) !important;
}

.index-page .dashboard-button--qcm:hover,
.index-page .dashboard-button--qcm:focus {
	color: #1d5d4a !important;
	background: #edf5f1 !important;
	border-color: rgba(29, 93, 74, 0.35) !important;
	box-shadow: 0 14px 28px rgba(29, 93, 74, 0.12) !important;
}

.index-page [data-role="popup"].qcm-creation-popup {
	color: #2e271f !important;
	background: rgba(255, 251, 245, 0.94) !important;
	border-color: rgba(125, 104, 78, 0.18) !important;
	box-shadow: 0 18px 50px rgba(72, 49, 19, 0.1) !important;
}

.index-page [data-role="popup"].qcm-creation-popup .native-collapsible {
	background: #ffffff !important;
	border-color: rgba(125, 104, 78, 0.18) !important;
}

.index-page [data-role="popup"].qcm-creation-popup .native-collapsible > .collapsible-heading,
.index-page [data-role="popup"].qcm-creation-popup [data-role="collapsible"] > h2 {
	color: #1d5d4a !important;
	background: rgba(225, 238, 232, 0.88) !important;
	border-color: rgba(29, 93, 74, 0.22) !important;
}

.index-page [data-role="popup"].qcm-creation-popup a[data-role="button"],
.index-page [data-role="popup"].qcm-creation-popup .ui-btn {
	color: #1d5d4a !important;
	background: rgba(225, 238, 232, 0.88) !important;
	border-color: rgba(29, 93, 74, 0.22) !important;
	box-shadow: 0 10px 22px rgba(29, 93, 74, 0.08) !important;
	text-shadow: none !important;
}

.index-page [data-role="popup"].qcm-creation-popup a[data-role="button"]:hover,
.index-page [data-role="popup"].qcm-creation-popup a[data-role="button"]:focus,
.index-page [data-role="popup"].qcm-creation-popup .ui-btn:hover,
.index-page [data-role="popup"].qcm-creation-popup .ui-btn:focus {
	color: #1d5d4a !important;
	background: #edf5f1 !important;
	border-color: rgba(29, 93, 74, 0.35) !important;
	box-shadow: 0 14px 28px rgba(29, 93, 74, 0.12) !important;
}

.index-page > .ui-body {
	width: min(100%, 1180px);
	margin: 0 auto 24px;
	padding: clamp(18px, 4vw, 28px);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

.index-page table {
	width: 100%;
	border-collapse: collapse;
	color: var(--color-text);
	background: var(--color-surface);
	font-size: 0.9rem;
}

.index-page > table {
	display: block;
	width: min(100%, 1180px) !important;
	margin: 0 auto 24px;
	overflow-x: auto;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

.index-page table th,
.index-page table td {
	padding: 11px 10px;
	border-bottom: 1px solid var(--color-border);
	text-align: left;
	vertical-align: middle;
}

.index-page table thead th {
	color: #fff;
	background: var(--color-primary-dark);
	font-size: 0.8rem;
	letter-spacing: 0.02em;
}

.index-page table#tabindex thead th {
	text-align: center;
}

.index-page table#tabindex .dashboard-table-date {
	width: 118px;
	min-width: 118px;
	white-space: nowrap;
}

.dashboard-table-date__value {
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1.15;
}

.dashboard-table-date__type {
	margin-top: 3px;
	color: #64748b;
	font-size: 0.68rem;
	font-weight: 750;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.dashboard-class-chip {
	display: inline-block;
	margin: 2px 6px 2px 0;
	padding: 2px 0;
	color: #123a5c;
	background: transparent;
	border: 0;
	border-radius: 0;
	font-size: 0.94rem;
	font-weight: 800;
	line-height: 1.15;
	white-space: nowrap;
}

.index-page table tbody tr:nth-child(even) {
	background: #f8fbfe;
}

.index-page table tbody tr:hover {
	background: var(--color-primary-light);
}

.index-page > center:last-of-type {
	width: min(100%, 1180px);
	margin: 20px auto;
}

.index-page > center:last-of-type a {
	display: inline-flex;
	padding: 10px 16px;
	background: var(--color-primary-light);
	border-radius: var(--radius-small);
	text-decoration: none;
	font-weight: 700;
}

.dashboard-header > center,
.dashboard-header > p {
	margin: 0;
}

@media (max-width: 720px) {
	.index-page {
		padding: 12px;
	}

	.dashboard-header {
		padding: 18px;
		border-radius: 15px;
	}

	.dashboard-header__top {
		align-items: flex-start;
		margin: -18px -18px 18px;
		padding: 18px;
		border-radius: 15px 15px 0 0;
	}

	.dashboard-header__link {
		min-height: 30px;
		padding: 4px 8px;
		font-size: 0.72rem;
	}

	.dashboard-subject {
		gap: 5px;
	}

	.dashboard-toolbar {
		display: flex !important;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 8px;
		width: 100%;
		margin: 0 -2px;
		padding: 2px 2px 10px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.dashboard-toolbar .ui-controlgroup-controls {
		display: flex !important;
		flex-wrap: nowrap;
		gap: 8px;
		min-width: max-content;
	}

	.dashboard-toolbar > a,
	.dashboard-toolbar a[data-role="button"],
	.dashboard-toolbar .ui-btn {
		flex: 0 0 auto;
		width: auto !important;
		min-width: max-content;
		max-width: none;
		min-height: 40px;
		margin: 0;
		padding: 8px 12px;
		white-space: nowrap;
	}

	.index-page table th,
	.index-page table td {
		min-width: 105px;
		padding: 9px 8px;
	}

	.correction-download-formats {
		grid-template-columns: 1fr;
	}

	.correction-download-formats span {
		min-height: 50px;
	}

	.correction-download-actions {
		flex-direction: column-reverse;
	}

	.correction-download-actions button {
		width: 100%;
	}
}

@media (max-width: 430px) {
	.dashboard-header__top {
		align-items: flex-start;
	}

	.dashboard-header__tools {
		align-items: flex-end;
		flex-direction: column;
	}

	.dashboard-subject select {
		width: 125px;
	}

	.dashboard-toolbar {
		grid-template-columns: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
