:root {
	--bg: #edf0f5;
	--panel: #fff;
	--panel-2: #f6f7f8;
	--zebra: #f9fafb;
	--hover: #f1f4fb;
	--border: #e2e8f0;
	--border-strong: #d8d8d8;
	--zinc-border: #e4e4e7;
	--text: #3d4340;
	--heading: #3d4340;
	--muted: #6b7280;
	--subtle: #999;
	--link: #3a76c4;
	--pill: #3e4450;
	--primary: #6772e5;
	--primary-dark: #5460d4;
	--brand-50: #eef0fd;
	--gradient: linear-gradient(90deg, #4553ff, #7f7fd5);
	--btn-text: #2c3e50;
	--focus: #c3c8f6;
	--danger: #d0453f;
	--danger-50: #fbeceb;
	--cat-tilstede: #c9cbdb;
	--cat-syg: #f2b632;
	--cat-frihed: #4fa36b;
	--cat-ulovlig: #d0453f;
	--topbar-h: 48px;
	--nav-h: 40px;
	--radius: 4px;
	--radius-btn: 6px;
	--shadow: 0 1px 1px rgb(0 0 0 / .06);
	--shadow-xs: 0 1px 2px rgb(0 0 0 / .05);
	--shadow-lg: 0 10px 30px rgb(30 40 60 / .2);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	line-height: 1.45;
	color: var(--text);
	background: var(--bg);
}

h1, h2, h3 { color: var(--heading); margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
a { color: var(--link); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.muted { color: var(--muted); }
.small { font-size: 11px; }
.nowrap { white-space: nowrap; }
.capitalize::first-letter, .weekday::first-letter { text-transform: uppercase; }

/* Heroicons (outline) from the sprite in fragments/layout.html */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
	flex: none;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.icon.solid { fill: currentColor; stroke: none; }

/* Top bar */

.topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	height: var(--topbar-h);
	display: flex;
	align-items: center;
	gap: 12px;
	padding-right: 12px;
	background: #fff;
	border-bottom: 1px solid #eee;
}

.logo { flex: none; display: flex; align-items: center; justify-content: center; width: var(--topbar-h); height: var(--topbar-h); background: var(--gradient); }
.logo-d { width: 30px; height: 30px; fill: #fff; }
.product { font-size: 14px; font-weight: 700; color: var(--heading); }
.topnav { display: flex; align-self: stretch; margin-left: 12px; }
.topnav-item { display: flex; align-items: center; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--heading); }
.topnav-item:hover { background: var(--panel-2); }
.topnav-item.active { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }

.profile { position: relative; margin-left: auto; }
.notifications-menu { position: relative; margin-left: auto; }
.notifications-menu + .profile { margin-left: 0; }
.bell { position: relative; width: 32px; height: 32px; border-radius: 50%; list-style: none; cursor: pointer; }
.bell::-webkit-details-marker { display: none; }
.bell .icon { width: 16px; height: 16px; }
.icon-btn.bell { border-radius: 50%; }
.notifications-menu[open] .bell { background: var(--brand-50); color: var(--primary-dark); }
.bell .badge {
	position: absolute;
	top: -4px;
	right: -6px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 8px;
	background: var(--danger);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}
.profile summary { list-style: none; cursor: pointer; }
.profile summary::-webkit-details-marker { display: none; }
.me-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--gradient);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}
.profile[open] .me-avatar, .me-avatar:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.profile .popover { right: 0; top: 40px; width: 260px; }
.menu-head { padding: 8px 10px; }
.profile form { margin: 0; }

.popover {
	position: absolute;
	z-index: 40;
	min-width: 200px;
	padding: 4px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}
.menu-item {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: 32px;
	padding: 6px 8px;
	border: 0;
	border-radius: var(--radius);
	background: none;
	color: var(--text);
	font-size: 12.5px;
	text-align: left;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--panel-2); outline: 0; }
.menu-item .icon { width: 16px; height: 16px; color: var(--muted); }
.menu-item.danger .icon { color: currentColor; }
.menu-sep { height: 1px; margin: 4px 0; background: var(--border); }

/* The bell's notifications, top right */

.notifications-menu .popover { right: 0; top: 40px; width: 380px; max-width: calc(100vw - 16px); padding: 0; }
.notifications-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.notifications-head strong { font-size: 14px; color: var(--heading); }
.notifications-head form { margin: 0; }
.link-btn { padding: 0; border: 0; background: none; color: var(--primary); font-size: 12px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.notifications-empty { margin: 0; padding: 14px 12px; }
.notifications-empty p { margin: 0 0 4px; }
.notifications-empty a { color: var(--primary); }
.notification-items { max-height: min(480px, 70vh); margin: 0; padding: 4px; overflow-y: auto; list-style: none; }
.notification { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: var(--radius); }
.notification:hover { background: #f4f6f9; }
.notification.unread { background: var(--brand-50); }
.notification-body { flex: 1; min-width: 0; font-size: 12px; }
.notification-report { font-weight: 700; color: var(--heading); }
a.notification-report:hover, .notification-students a:hover { text-decoration: underline; }
.notification-summary { margin: 1px 0 2px; }
.notification-students { margin-bottom: 2px; }
.notification form { margin: 0; }
.notification-read { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.notification-read:hover { background: #fff; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* Dropdowns fade in and settle from just above; they close at once */

@keyframes dropdown-in {
	from { opacity: 0; transform: translateY(-6px) scale(.97); }
}
details[open] > .popover, details[open] > .do-filter-menu, .date-popover:not([hidden]) {
	transform-origin: top left;
	animation: dropdown-in .2s cubic-bezier(.16, 1, .3, 1);
}
.profile .popover, .notifications-menu .popover, .reports .popover, .report-menu .popover, .note-popover, .date-popover.align-right { transform-origin: top right; }
@media (prefers-reduced-motion: reduce) {
	details[open] > .popover, details[open] > .do-filter-menu, .date-popover:not([hidden]) { animation: none; }
}

/* Menu below the top bar */

.sidenav {
	position: fixed;
	top: var(--topbar-h);
	left: 0;
	right: 0;
	z-index: 20;
	height: var(--nav-h);
	padding: 0 16px;
	overflow-x: auto;
	background: #fff;
	border-bottom: 1px solid var(--border);
}
.sidenav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.sidenav li { display: flex; }
.nav-item { display: flex; align-items: center; gap: 10px; height: var(--nav-h); padding: 0 12px; font-size: 13px; color: var(--heading); white-space: nowrap; }
.nav-item .icon { width: 15px; height: 15px; color: #555564; }
.nav-item:hover { background: var(--panel-2); }
.nav-item.active { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.nav-item.active .icon { color: var(--primary); }

/* Page */

.page { max-width: 1296px; padding: calc(var(--topbar-h) + var(--nav-h) + 22px) 28px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 8px; min-height: 32px; margin-bottom: 14px; }
.page-head > :first-child { flex: 1; }
.page-head p { margin: 2px 0 0; }

/* The Fraværsoverblik: the saved reports in a column on the left, like the folders of a mail program */

.overview-page { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 24px; max-width: 1560px; }
.report-sidebar { position: sticky; top: calc(var(--topbar-h) + var(--nav-h) + 22px); display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - var(--topbar-h) - var(--nav-h) - 44px); overflow-y: auto; }
.report-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.report-search:focus-within { outline: 2px solid var(--focus); outline-offset: -1px; }
.report-search .icon { flex: none; width: 14px; height: 14px; color: var(--muted); }
.report-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 12px; }
.report-nav { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.report-nav-item { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.report-nav-item[hidden] { display: none; }
.report-nav-item:hover { border-color: #cbd2de; }
.report-nav-item.active { border-color: var(--primary); background: var(--primary); }
.report-link { display: flex; flex-direction: column; gap: 2px; padding: 9px 34px 9px 12px; }
.report-label { font-size: 12px; font-weight: 700; color: var(--heading); overflow-wrap: anywhere; }
.report-meta { font-size: 11px; color: var(--muted); }
.report-nav-item.active .report-label, .report-nav-item.active .report-meta, .report-nav-item.active .report-bell { color: #fff; }
.report-bell { position: absolute; top: 10px; right: 10px; width: 13px; height: 13px; color: var(--muted); pointer-events: none; }
.report-nav-empty { margin: 0; padding: 0 2px; }

.confirm-dialog { width: min(400px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: 8px; box-shadow: var(--shadow-lg); color: var(--text); }
.confirm-dialog::backdrop { background: rgb(20 24 40 / .35); }
.confirm-dialog h2 { margin: 0 0 8px; font-size: 16px; color: var(--heading); }
.confirm-dialog p { margin: 0 0 18px; font-size: 13px; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
/* The report itself is one white card: heading, filters, toolbar and table read as a unit */
.overview-main { min-width: 0; padding: 20px 24px 24px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 3px rgb(16 24 40 / .06); }
.overview-main .page-head { margin-bottom: 16px; }
.overview-main .page-head form { margin: 0; }
.overview-main .filters { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.overview-main .do-filter-button { border-color: #d4d4d8; box-shadow: none; }
.overview-main .date-trigger { box-shadow: none; }
.overview-main .overview-toolbar { margin-bottom: 12px; }
.overview-main .overview-table { border-width: 1px 0; }
.overview-main .panel.empty { margin: 0; padding: 40px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
@media (max-width: 860px) {
	.overview-page { grid-template-columns: minmax(0, 1fr); }
	.report-sidebar { position: static; max-height: none; }
}
@media (max-width: 600px) {
	.overview-main { padding: 16px; }
}

.reports, .report-menu { position: relative; align-self: flex-end; }
.reports summary, .report-menu summary { list-style: none; cursor: pointer; }
.reports summary::-webkit-details-marker, .report-menu summary::-webkit-details-marker { display: none; }
.reports[hidden] { display: none; }
.reports[open] summary { border-color: var(--primary-dark); background: var(--primary-dark); }
.report-menu[open] summary { background: var(--panel-2); }
.reports .popover, .report-menu .popover { right: 0; top: 38px; }
.reports .popover { width: 320px; }
.report-menu summary .icon { stroke-width: 2.5; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover, .menu-item.danger:focus-visible { background: var(--danger-50); }
.icon-btn.on { border-color: #d5d9f8; background: var(--brand-50); color: var(--primary); }
.icon-btn.on .icon { fill: currentColor; }
.report-save { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 8px 10px 6px; }
.report-save-row { display: flex; gap: 6px; }
.report-save-row .input { flex: 1; min-width: 0; }
.report-save p { margin: 0; }

.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.back .icon { width: 14px; height: 14px; }
.back:hover { text-decoration: underline; }

.section-title { margin: 22px 0 8px; font-size: 14px; }

.panel { margin: 0 0 14px; padding: 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.empty { padding: 30px; text-align: center; color: var(--muted); list-style: none; }
.empty p { margin: 6px 0; }
.empty .btn { margin: 6px 4px 0; }

.info-box { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border-left: 3px solid var(--primary); border-radius: var(--radius); background: var(--brand-50); color: var(--btn-text); }
.info-box .icon { width: 14px; height: 14px; margin-top: 1px; }
.info-box.warn { background: #fdf5e1; color: #6b5310; border-left-color: var(--cat-syg); }
.info-box.danger { background: var(--danger-50); color: var(--danger); border-left-color: var(--danger); }

/* Toasts rise in at the bottom and leave after toast-life */

.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); transform: translateX(-50%); pointer-events: none; }
.toast {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: min(320px, calc(100vw - 32px));
	max-width: 520px;
	padding: 10px 8px 10px 14px;
	border-radius: 6px;
	background: #18181b;
	box-shadow: 0 8px 24px rgb(0 0 0 / .18), 0 2px 6px rgb(0 0 0 / .12);
	color: #fff;
	font-size: 13px;
	pointer-events: auto;
	animation: toast-in .3s cubic-bezier(.16, 1, .3, 1), toast-life 5s linear;
}
.toast > .icon { color: #c7cbf7; }
.toast > span { flex: 1; }
.toast.success > .icon { color: #86d39f; }
.toast:hover, .toast:focus-within { animation-play-state: paused; }
.toast.leaving { animation: toast-out .2s ease-in forwards; pointer-events: none; }
.toast-close { flex: none; display: inline-flex; padding: 4px; border: 0; border-radius: var(--radius); background: transparent; color: #a1a1aa; cursor: pointer; }
.toast-close:hover { background: rgb(255 255 255 / .12); color: #fff; }
.toast-close:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.toast-close .icon { width: 12px; height: 12px; stroke-width: 2.4; }
@keyframes toast-in {
	from { opacity: 0; transform: translateY(12px) scale(.97); }
}
@keyframes toast-life {
	to { visibility: visible; }
}
@keyframes toast-out {
	to { opacity: 0; transform: translateY(12px) scale(.97); }
}
@media (prefers-reduced-motion: reduce) {
	@keyframes toast-in { from { opacity: 0; } }
	@keyframes toast-out { to { opacity: 0; } }
}

/* Buttons and inputs (Docendo "do-bttn") */

/* shadcn-style: outline by default, a solid primary and danger, 32px like the inputs and filters beside them */

.btn, .icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 32px;
	border: 1px solid var(--zinc-border);
	border-radius: var(--radius-btn);
	background: #fff;
	box-shadow: var(--shadow-xs);
	color: var(--btn-text);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, opacity .15s;
}
.btn { padding: 0 12px; }
.btn .icon, .icon-btn .icon { width: 16px; height: 16px; }
.btn:hover, .icon-btn:hover { background: var(--panel-2); }
.btn.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn.primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.btn.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.btn.danger:hover { border-color: #b23a35; background: #b23a35; }
.btn.pressed { border-color: #d5d9f8; background: var(--brand-50); color: var(--primary-dark); }
.btn:disabled, .btn:disabled:hover, .btn.disabled { cursor: not-allowed; opacity: .5; }
.btn.disabled { pointer-events: none; }
.btn.primary:disabled { background: var(--primary); }

.btn.sm, .mu-table .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.icon-btn { flex: none; width: 32px; padding: 0; }

.week-nav { display: flex; align-items: center; gap: 6px; }

.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .nav-item:focus-visible, .person:focus-visible, .choice:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

/* shadcn-style filter controls */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filters:has(.field) { align-items: flex-end; gap: 12px; }
.filters .field .select { min-width: 0; }
.search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 250px;
	height: 32px;
	padding: 0 10px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / .04);
	color: #71717a;
}
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search .icon { width: 14px; height: 14px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12.5px; color: #09090b; }
.search input::placeholder { color: #a1a1aa; }
.select {
	height: 32px;
	padding: 0 28px 0 10px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='8 9 12 5 16 9'/%3E%3Cpolyline points='8 15 12 19 16 15'/%3E%3C/svg%3E") no-repeat right 9px center;
	box-shadow: 0 1px 2px rgb(0 0 0 / .04);
	font-size: 12.5px;
	color: #09090b;
	appearance: none;
	cursor: pointer;
}
.select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }

/* Filters in the style of Docendo's do-filters: a dashed button with the choices as badges, and a menu of checkboxes */

.do-filter { position: relative; }
.do-filter-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 32px;
	padding: 0 10px;
	border: 1px dashed var(--zinc-border);
	border-radius: var(--radius-btn);
	background: #fff;
	box-shadow: var(--shadow-xs);
	color: var(--btn-text);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .025em;
	white-space: nowrap;
	transition: background-color .15s, border-color .15s;
}
.do-filter-button { list-style: none; cursor: pointer; user-select: none; }
.do-filter-button::-webkit-details-marker { display: none; }
.do-filter-button:hover, .do-filter[open] .do-filter-button, .do-filter-button[aria-expanded="true"] { background: var(--panel-2); }
.do-filter-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.do-filter-button .icon { width: 13px; height: 13px; }
.do-filter-divider { flex: none; align-self: center; width: 1px; height: 65%; background: var(--zinc-border); }
.do-filter-placeholder { color: #858585; font-weight: 400; font-style: italic; }
.do-badge { display: inline-block; max-width: 160px; overflow: hidden; padding: 2px 6px; border-radius: 4px; background: #f4f4f5; font-size: 11px; font-weight: 400; letter-spacing: 0; text-overflow: ellipsis; }
.do-filter-button .do-badge + .do-badge { margin-left: -4px; }
.do-filter-clear { display: inline-flex; margin: 0 -4px 0 -4px; padding: 3px; border: 0; border-radius: 4px; background: transparent; color: #6c7a87; cursor: pointer; }
.do-filter-clear:hover { background: var(--zinc-border); color: #18181b; }
.do-filter-clear .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.do-filter-menu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	left: 0;
	width: 280px;
	padding: 8px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 3px 8px rgb(0 0 0 / .24);
	font-size: 13px;
}
.do-filter-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--zinc-border); }
.do-filter-search { flex: 1; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid #acb6be; border-radius: var(--radius); font-size: 12.5px; }
.do-filter-search:focus { outline: 0; border-color: #468ad7; }
.do-filter-action { flex: none; height: 28px; margin-left: auto; padding: 0 10px; border: 1px dashed var(--zinc-border); border-radius: var(--radius-btn); background: transparent; color: #6c7a87; font-size: 12px; cursor: pointer; transition: background-color .15s, color .15s; }
.do-filter-action:hover { background: var(--panel-2); color: var(--heading); }
.do-filter:has(.do-option input:checked) .select-all, .do-filter:not(:has(.do-option input:checked)) .clear-all { display: none; }
.do-filter-options { max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.do-option { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.do-option[hidden] { display: none; }
.do-option:hover { background: #f5f6f7; }
.do-option .muted { margin-left: auto; font-size: 11px; }
.do-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.do-checkbox { position: relative; flex: none; width: 16px; height: 16px; border: 1px solid #ccc; border-radius: 4px; background: #fff; }
.do-option input:checked + .do-checkbox { border-color: var(--primary); background: var(--primary); }
.do-option input:checked + .do-checkbox::after { content: ""; position: absolute; top: 2px; left: 5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(40deg); }
.do-option input:focus-visible + .do-checkbox { outline: 2px solid var(--focus); outline-offset: 1px; }
.do-filter-menu.wide { width: 300px; }
.do-filter:not(:has(.do-minimum input:not(:placeholder-shown))) .clear-minimums { display: none; }
.do-minimum-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; }
.do-minimum-row:hover { background: #f5f6f7; }
.do-minimum { display: inline-flex; flex: none; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: 12px; }
.do-filter-note { margin: 6px 0 0; padding: 6px 8px 0; border-top: 1px solid var(--zinc-border); }
.do-minimum input { width: 58px; height: 26px; padding: 0 6px; border: 1px solid #acb6be; border-radius: var(--radius); font-size: 12.5px; text-align: right; }
.do-minimum input:focus { outline: 0; border-color: #468ad7; }
.do-filter-empty { display: none; margin: 0; padding: 7px 8px; color: var(--muted); font-style: italic; }
.do-filter-options:not(:has(.do-option:not([hidden]))) .do-filter-empty { display: block; }
.category-dot { flex: none; width: 9px; height: 9px; margin-right: -4px; border-radius: 50%; background: var(--cat-tilstede); }
.category-dot.sygdom { background: var(--cat-syg); }
.category-dot.ulovlig { background: var(--cat-ulovlig); }
.category-dot.ekstraordinaer_frihed { background: var(--cat-frihed); }
.category-dot.samlet { background: var(--heading); }

/* Date pickers (static/js/datepicker.js), in the style of Stripe's */

date-picker, date-range-picker { position: relative; display: inline-block; }
date-picker:not(:defined), date-range-picker:not(:defined) { display: inline-flex; gap: 6px; }
.date-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 32px;
	padding: 0 10px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / .04);
	font-size: 12.5px;
	color: #09090b;
	white-space: nowrap;
	cursor: pointer;
}
.date-trigger:hover { background: #fafafa; }
.date-trigger:focus-visible, .date-trigger[aria-expanded="true"] { outline: 2px solid var(--focus); outline-offset: 1px; }
.date-trigger:disabled { cursor: not-allowed; opacity: .55; }
.date-trigger .icon { width: 14px; height: 14px; color: #71717a; }
.date-trigger-value { font-weight: 400; letter-spacing: 0; color: #09090b; font-variant-numeric: tabular-nums; }
.date-placeholder { font-weight: 400; color: #a1a1aa; }

.date-popover {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	left: 0;
	display: flex;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 0 0 1px rgb(64 68 82 / .08), 0 4px 10px rgb(64 68 82 / .1), 0 15px 35px rgb(60 66 87 / .12);
	color: #09090b;
	font-size: 12.5px;
	font-weight: 400;
	letter-spacing: 0;
	white-space: normal;
}
.date-popover[hidden] { display: none; }
.date-popover.align-right { left: auto; right: 0; }
.date-main { display: flex; flex-direction: column; }

.date-presets { display: flex; flex-direction: column; gap: 1px; width: 148px; padding: 10px 8px; border-right: 1px solid var(--border); }
.date-preset { padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; white-space: nowrap; cursor: pointer; }
.date-preset:hover { background: var(--panel-2); }
.date-preset.active { background: var(--brand-50); color: var(--primary-dark); font-weight: 700; }
.date-preset:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.date-preset-divider { margin: 4px 2px; border: 0; border-top: 1px solid var(--border); }

.date-fields { display: flex; align-items: flex-end; gap: 8px; padding: 14px 16px 0; }
.date-fields .muted { line-height: 30px; }
.date-field { display: flex; flex: 1; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.date-field input {
	width: 100%;
	height: 30px;
	padding: 0 8px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	color: #09090b;
	font-size: 12.5px;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}
.date-field.picking input { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.date-field input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.date-field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }

.date-months { position: relative; padding: 12px 14px 10px; }
.date-grids { display: flex; gap: 24px; }
.date-nav-btn {
	position: absolute;
	top: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--zinc-border);
	border-radius: var(--radius-btn);
	background: #fff;
	box-shadow: var(--shadow-xs);
	color: #4b5563;
	cursor: pointer;
	transition: background-color .15s, color .15s, opacity .15s;
}
.date-nav-btn.prev { left: 12px; }
.date-nav-btn.next { right: 12px; }
.date-nav-btn:hover { background: var(--panel-2); color: var(--heading); }
.date-nav-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.date-nav-btn:disabled { background: #fff; opacity: .3; cursor: default; }
.date-nav-btn .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.date-month-title { height: 28px; margin-bottom: 4px; color: var(--heading); font-size: 13px; font-weight: 700; line-height: 28px; text-align: center; }
.date-month-title::first-letter { text-transform: uppercase; }
.date-grid { border-collapse: separate; border-spacing: 0; }
.date-grid th { width: 34px; height: 26px; padding: 0; color: var(--muted); font-size: 11px; font-weight: 400; text-align: center; }
.date-grid td { height: 34px; padding: 1px 0; background-clip: content-box; text-align: center; }
.date-grid td.in-range { background-color: var(--brand-50); }
.date-grid td.range-start { background-image: linear-gradient(90deg, transparent 50%, var(--brand-50) 50%); }
.date-grid td.range-end { background-image: linear-gradient(90deg, var(--brand-50) 50%, transparent 50%); }
.date-grid td.in-range:first-child, .date-grid td.range-end:first-child { border-radius: 6px 0 0 6px; }
.date-grid td.in-range:last-child, .date-grid td.range-start:last-child { border-radius: 0 6px 6px 0; }
.date-grid td.range-start:last-child, .date-grid td.range-end:first-child { background-image: none; }
.date-day {
	position: relative;
	display: block;
	width: 34px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}
.date-day:hover { background: #e9ecf2; }
.date-day:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.date-day.weekend { color: var(--muted); }
.date-day.today { color: var(--primary); font-weight: 700; }
.date-day.today::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.in-range .date-day { color: var(--primary-dark); }
.in-range .date-day:hover { background: #dfe2fb; }
.date-day.selected, .date-day.selected:hover { background: var(--primary); color: #fff; font-weight: 700; }
.date-day.selected:focus-visible { outline-color: var(--primary-dark); outline-offset: 1px; }
.date-day:disabled, .date-day:disabled:hover { background: transparent; color: #d4d4d8; cursor: default; }

.date-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
.date-summary { margin-right: auto; color: var(--muted); }
.date-link { height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-btn); background: none; color: var(--primary); font-weight: 600; cursor: pointer; transition: background-color .15s; }
.date-link:hover { background: var(--brand-50); }
.date-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.date-link:disabled { color: var(--subtle); background: none; cursor: default; }

@media (max-width: 640px) {
	.date-popover.range { flex-direction: column; }
	.date-presets { flex-direction: row; flex-wrap: wrap; width: auto; max-width: 300px; border-right: 0; border-bottom: 1px solid var(--border); }
	.date-preset-divider { flex-basis: 100%; }
}

/* Absence overview */

.overview-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.overview-table th.num, .overview-table td.num { width: 1%; text-align: right; }
.overview-table th.num { min-width: 96px; white-space: normal; }
.overview-table th .sort { display: inline-flex; align-items: flex-end; gap: 4px; color: inherit; }
.overview-table th .sort:hover { color: var(--heading); text-decoration: none; }
.overview-table th .sort.active { color: var(--heading); }
.sort-arrow { visibility: hidden; font-size: 9px; }
.sort:hover .sort-arrow, .sort.active .sort-arrow { visibility: visible; }
.sort.active .sort-arrow { color: var(--primary); }
.overview-table .person { gap: 10px; }
.overview-table td { padding-top: 5px; padding-bottom: 5px; }
/* Chips */

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	width: fit-content;
	padding: 2px 6px;
	border: 1px solid #ebedee;
	border-radius: var(--radius);
	background: #fff;
	color: #4b5563;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}
.chips .chip { padding: 4px 10px; font-size: 12px; }
.chips .chip:hover { border-color: var(--primary); }
.chip.active { background: var(--brand-50); border-color: #d6daf9; color: var(--primary-dark); }
.chip.warn, .chip.sygdom { background: #fdf5e1; border-color: #f5e2ae; color: #7a5b06; }
.chip.danger, .chip.ulovlig { background: var(--danger-50); border-color: #f2cfcd; color: var(--danger); }
.chip.ekstraordinaer_frihed { background: #e9f5ed; border-color: #cbe7d4; color: #2f7a48; }
.chip.ok { background: #e9f5ed; border-color: #cbe7d4; color: #2f7a48; }
.chip.advarsel { background: #fdf5e1; border-color: #f5e2ae; color: #7a5b06; }
.chip.underretning { background: var(--danger-50); border-color: #f2cfcd; color: var(--danger); font-weight: 700; }
.chip.mangler { color: var(--muted); }
.chip.egen { background: var(--brand-50); border-color: #d6daf9; color: var(--primary-dark); }

/* Stats */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	column-gap: 6px;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--muted);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}
.stat::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--cat-tilstede); }
.stat strong { grid-row: 2; grid-column: 1 / -1; padding-left: 15px; font-size: 20px; color: var(--heading); font-variant-numeric: tabular-nums; }
.stat.sygdom::before { background: var(--cat-syg); }
.stat.ulovlig::before { background: var(--cat-ulovlig); }
.stat.ekstraordinaer_frihed::before { background: var(--cat-frihed); }
.stat.advarsel::before { background: var(--cat-syg); }
.stat.underretning::before { background: var(--cat-ulovlig); }
.stat.total { grid-template-columns: 1fr; text-align: center; background: var(--brand-50); border-color: #d6daf9; }
.stat.total::before { display: none; }
.stat.total strong { padding-left: 0; color: var(--primary); }

/* Lists with a table-like header (Docendo "do-table") */

.list { background: #fff; border: 1px solid var(--border); }
.list-head { padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.people, .roster { list-style: none; margin: 0; padding: 0; }
.people > li:nth-child(even), .roster > li:nth-child(even) { background: var(--zebra); }

.person { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.person strong { font-weight: 400; color: var(--link); }
.person:hover strong { text-decoration: underline; }
.person-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who small { font-size: 11px; }

.student-cols { display: grid; grid-template-columns: minmax(200px, 1fr) 1fr; align-items: center; gap: 12px; }
.people .person { padding: 7px 10px; }
.people .person:hover { background: var(--hover); }
.people .person small { font-size: 12px; }

.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #e5e7eb; color: var(--muted); overflow: hidden; }
.avatar .icon { width: 15px; height: 15px; }
.avatar.large { width: 48px; height: 48px; }
.avatar.large .icon { width: 28px; height: 28px; }

.profile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.profile-head p { margin: 2px 0 0; }

/* Attendance registration */

.roster-list { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(140px, 220px); column-gap: 14px; }
.roster-list .roster, .roster-cols, .roster-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; row-gap: 8px; }
.roster-row { padding: 7px 10px; }
.roster .empty { grid-column: 1 / -1; }
.register { display: contents; }
.register .note {
	width: 100%;
	height: 28px;
	padding: 0 8px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	background: #fff;
	font-size: 12px;
}
.register .note::placeholder { color: #a1a1aa; }
.register .note:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--primary); }
.register .note:disabled { background: var(--panel-2); }

.choices { display: inline-flex; justify-self: start; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.choice {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border: 0;
	background: #fff;
	font-size: 12px;
	white-space: nowrap;
	cursor: pointer;
}
.choice + .choice { border-left: 1px solid var(--border); }
.choice::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--cat-tilstede); }
.choice.sygdom::before { background: var(--cat-syg); }
.choice.ulovlig::before { background: var(--cat-ulovlig); }
.choice.ekstraordinaer_frihed::before { background: var(--cat-frihed); }
.choice:hover:not(:disabled, :has(input:disabled)) { background: var(--panel-2); }
.choice:disabled, .choice:has(input:disabled) { cursor: not-allowed; opacity: .5; }
label.choice { position: relative; }
.choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.choice.selected, .choice:has(input:checked), .choice:has(input:checked):hover { background: var(--pill); color: #fff; }
.choice.sygdom.selected, .choice.sygdom:has(input:checked) { background: #8a6d00 !important; }
.choice.ulovlig.selected, .choice.ulovlig:has(input:checked) { background: #a92f2f !important; }
.choice.ekstraordinaer_frihed.selected, .choice.ekstraordinaer_frihed:has(input:checked) { background: #3f7a2c !important; }

/* Absence registration for a class and a day */

.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel-head h2 { font-size: 14px; }
.panel-head .actions { display: flex; gap: 8px; margin-left: auto; }
.panel-head > .btn:last-child { margin-left: auto; }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 700; color: var(--heading); }
.field .select { min-width: 190px; }
.date-nav { display: flex; align-items: center; gap: 6px; }
.today-btn { margin-left: 4px; }
.input {
	height: 32px;
	padding: 0 10px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / .04);
	font-size: 12.5px;
	color: #09090b;
}
.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
textarea.input { width: 100%; height: auto; padding: 6px 8px; resize: vertical; }
.lesson-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 160px;
	padding: 8px 10px;
	border: 1px solid var(--zinc-border);
	border-radius: 6px;
	background: #fff;
	color: var(--heading);
	user-select: none;
}
.pick:hover { border-color: #c7cbf4; background: var(--zebra); }
.pick:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pick.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.pick.selected:hover { background: var(--primary-dark); }
.pick-check {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	background: #fff;
}
.pick-check .icon { width: 10px; height: 10px; stroke-width: 3; color: #fff; opacity: 0; }
.pick.selected .pick-check { border-color: #fff; background: #fff; }
.pick.selected .pick-check .icon { color: var(--primary); opacity: 1; }
.pick-number { padding-right: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.pick strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pick-time { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pick.selected .pick-time { color: rgb(255 255 255 / .85); }
.pick-count { align-self: flex-start; margin-top: 5px; padding: 1px 5px; border-radius: 3px; background: var(--brand-50); color: var(--primary-dark); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pick.selected .pick-count { background: #fff; }
.pick-count.absent, .pick.selected .pick-count.absent { background: #fdf5e1; color: #7a5b06; }

.badge { padding: 2px 7px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--heading); font-size: 11px; font-weight: 700; }
.badge.warn { background: #fdf5e1; border-color: #f5e2ae; color: #7a5b06; }

.registration .mu-table { border-radius: var(--radius); }
.registration-table td { padding-top: 4px; padding-bottom: 4px; }
.registration-table .person { gap: 10px; }
.registration-table tr.closed .person strong { color: var(--muted); }
.registration-table .empty { padding: 24px; }
.registration-table .note-col { width: 1%; text-align: center; }
.closed-note { margin-left: 8px; }

.note-pop { position: relative; display: inline-block; }
.note-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: var(--radius);
	color: var(--muted);
	list-style: none;
	cursor: pointer;
}
.note-toggle::-webkit-details-marker { display: none; }
.note-toggle:hover, .note-pop[open] .note-toggle { background: var(--panel-2); color: var(--heading); }
.note-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.note-toggle .icon { width: 15px; height: 15px; }
.note-toggle.has-note { position: relative; color: var(--primary); }
.note-toggle.has-note::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1.5px #fff; }
.note-popover { top: calc(100% + 4px); right: 0; display: flex; flex-direction: column; gap: 6px; width: 260px; padding: 10px; text-align: left; }
/* Tables (Docendo "do-table") */

.mu-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); }
.mu-table th {
	padding: 9px 6px;
	border-bottom: 1px solid var(--border);
	color: var(--muted);
	font-size: 10px;
	font-weight: 700;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: .02em;
	white-space: nowrap;
	vertical-align: bottom;
}
.mu-table td { padding: 7px 6px; vertical-align: middle; border-right: 1px solid #f1f3f6; }
.mu-table th:first-child, .mu-table td:first-child { padding-left: 10px; }
.mu-table th:last-child, .mu-table td:last-child { padding-right: 10px; border-right: 0; }
.mu-table tbody tr:nth-child(even) td { background: var(--zebra); }
.mu-table a:hover { text-decoration: underline; }
.mu-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mu-table .actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.mu-table .actions-cell form { margin: 0; }
/* Noting */
.noting-bar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.noting-bar .info-box { flex: 1 1 320px; }
.noting-bar:not(:has(*)) { display: none; }
.not-noted { color: #7a5b06; font-weight: 700; }
.roster-row.is-ikke_noteret { background: #fffaf0; }
.stat.ikke_noteret::before { background: #e0b84a; }
.missing-noting { margin-bottom: 14px; }
.missing-noting ul { margin: 0; padding-left: 18px; }
.missing-noting li { margin: 2px 0; }

/* Login */

.login-page { display: grid; place-items: center; min-height: 100vh; }
.login-card {
	width: 320px;
	padding: 32px 40px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: var(--shadow);
	text-align: center;
}
.login-card .logo { margin: 0 auto; border-radius: 8px; }
.login-card h1 { margin: 14px 0 18px; }
.login-card .info-box { text-align: left; }
.login-card .btn { height: 36px; padding: 0 16px; }

@media (max-width: 900px) {
	.sidenav { padding: 0 6px; }
	.page { padding: calc(var(--topbar-h) + var(--nav-h) + 18px) 16px 40px; }
	.page-head { flex-wrap: wrap; }
	.roster-cols { display: none; }
	.roster-list { grid-template-columns: 1fr; }
	.choices { flex-wrap: wrap; }
	.search { width: 100%; }
	.topbar-search { display: none; }
	.mu-table { display: block; overflow-x: auto; }
}
