  :root {
	--blue: #07558a;
	--blue-dark: #073f67;
	--blue-ink: #062f4f;
	--slate: #4e5960;
	--green: #6c9d58;
	--cyan: #4c96ad;
	--orange: #ee6e3b;
	--paper: #ffffff;
	--canvas: #f3f6f8;
	--line: #dbe3e8;
	--muted: #5f6f78;
	--shadow: 0 18px 45px rgba(5, 47, 78, 0.12);
  }

  * {
	box-sizing: border-box;
  }

  html {
	scroll-behavior: smooth;
  }

  body {
	margin: 0;
	color: var(--blue-ink);
	background: var(--canvas);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
  }

  a {
	color: inherit;
  }

  .site-header {
	min-height: 8rem;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 2rem;
	padding: 0 4.5vw;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
  }

  .brand {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 1.1rem;
	text-decoration: none;
  }

  .brand-mark {
	width: 6.3rem;
	align-self: stretch;
	display: grid;
	place-items: center;
	color: white;
	background: var(--blue);
	font-size: 2.2rem;
	font-weight: 400;
	letter-spacing: -0.08em;
  }

  .brand-mark span {
	display: block;
	border: 2px solid rgba(255, 255, 255, 0.45);
	padding: 0.15rem 0.35rem 0.12rem 0.25rem;
	line-height: 1;
  }

  .brand-copy {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
	text-transform: uppercase;
  }

  .brand-copy strong {
	max-width: 18rem;
	font-size: 1.05rem;
	letter-spacing: 0.045em;
  }

  .brand-copy small {
	margin-top: 0.45rem;
	color: var(--muted);
	font-size: 0.78rem;
	letter-spacing: 0.14em;
  }

  .header-right {
	display: flex;
	align-items: center;
	gap: clamp(1.1rem, 2.5vw, 2.6rem);
  }

  .disciplines {
	display: flex;
	align-items: center;
	gap: clamp(0.8rem, 2vw, 1.75rem);
  }

  .discipline {
	display: grid;
	grid-template-columns: 1.9rem auto;
	align-items: center;
	gap: 0.55rem;
	color: #1f2d35;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
  }

  .discipline::before {
	content: "";
	width: 1.9rem;
	height: 1.9rem;
	background: var(--discipline-color);
  }

  .school-link {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--blue);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
  }

  .school-link svg {
	width: 1rem;
	height: 1rem;
	transition: transform 180ms ease;
  }

  .school-link:hover svg,
  .school-link:focus-visible svg {
	transform: translate(2px, -2px);
  }

  .intro {
	position: relative;
	min-height: 12.5rem;
	overflow: hidden;
	padding: 2.5rem max(4.5vw, calc((100vw - 78rem) / 2));
	color: white;
	background:
	  linear-gradient(90deg, rgba(7, 85, 138, 0.96), rgba(7, 63, 103, 0.96)),
	  repeating-linear-gradient(90deg, transparent 0 90px, rgba(255,255,255,.12) 90px 91px);
  }

  .intro::after {
	content: "";
	position: absolute;
	inset: 0 0 0 auto;
	width: 32%;
	background: linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.07) 46% 47%, transparent 47% 57%, rgba(255,255,255,.07) 57% 58%, transparent 58%);
	pointer-events: none;
  }

  .eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 0.45rem;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
  }

  .eyebrow::before {
	content: "";
	width: 2rem;
	height: 0.18rem;
	background: var(--orange);
  }

  h1 {
	margin: 0;
	font-size: clamp(2.35rem, 5vw, 4.7rem);
	line-height: 0.98;
	letter-spacing: -0.045em;
  }

  .intro-meta {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 1rem;
	color: rgba(255,255,255,.86);
	font-size: 0.9rem;
  }

  .intro-meta strong {
	display: grid;
	width: 1.75rem;
	height: 1.75rem;
	place-items: center;
	background: var(--orange);
	color: white;
	font-size: 0.78rem;
  }

  main {
	width: min(78rem, calc(100% - 9vw));
	margin: -2.6rem auto 0;
	position: relative;
	z-index: 1;
  }

  .tool-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
  }

  .tool-card {
	--card-accent: var(--blue);
	position: relative;
	min-height: 18rem;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 1.55rem;
	background: var(--paper);
	border-top: 0.45rem solid var(--card-accent);
	box-shadow: var(--shadow);
	text-decoration: none;
	transform: translateY(0);
	transition: transform 180ms ease, box-shadow 180ms ease;
	animation: card-in 500ms ease both;
  }

  .tool-card:nth-child(2) { animation-delay: 60ms; }
  .tool-card:nth-child(3) { animation-delay: 120ms; }
  .tool-card:nth-child(4) { animation-delay: 180ms; }

  .tool-card::after {
	content: "";
	position: absolute;
	right: -3.3rem;
	bottom: -3.3rem;
	width: 7.5rem;
	height: 7.5rem;
	border: 1.4rem solid color-mix(in srgb, var(--card-accent) 12%, transparent);
	border-radius: 50%;
	pointer-events: none;
  }

  .tool-card:hover,
  .tool-card:focus-visible {
	transform: translateY(-0.35rem);
	box-shadow: 0 24px 54px rgba(5, 47, 78, 0.18);
  }

  .tool-card:focus-visible,
  .school-link:focus-visible {
	outline: 3px solid var(--orange);
	outline-offset: 4px;
  }

  .card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
  }

  .card-number {
	color: var(--card-accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
  }

  .card-icon {
	width: 2.8rem;
	height: 2.8rem;
	display: grid;
	place-items: center;
	color: var(--card-accent);
	background: color-mix(in srgb, var(--card-accent) 10%, white);
  }

  .card-icon svg {
	width: 1.45rem;
	height: 1.45rem;
	stroke: currentColor;
	stroke-width: 1.8;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
  }

  .tool-card h2 {
	margin: 2.1rem 0 0.45rem;
	max-width: 13ch;
	font-size: clamp(1.35rem, 2vw, 1.65rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
  }

  .tool-card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.94rem;
	line-height: 1.5;
  }

  .card-action {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	margin-top: auto;
	padding-top: 1.75rem;
	color: var(--card-accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
  }

  .card-action::after {
	content: "↗";
	font-size: 1.05rem;
	transition: transform 180ms ease;
  }

  .tool-card:hover .card-action::after,
  .tool-card:focus-visible .card-action::after {
	transform: translate(3px, -3px);
  }

  .footer {
	width: min(78rem, calc(100% - 9vw));
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 2.25rem auto 0;
	padding: 1.35rem 0 2.5rem;
	color: var(--muted);
	border-top: 1px solid var(--line);
	font-size: 0.82rem;
  }

  .footer strong {
	color: var(--blue-ink);
  }

  @keyframes card-in {
	from { opacity: 0; transform: translateY(0.75rem); }
	to { opacity: 1; transform: translateY(0); }
  }

  @media (max-width: 68rem) {
	.disciplines {
	  display: none;
	}

	.tool-grid {
	  grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tool-card {
	  min-height: 15rem;
	}
  }

  @media (max-width: 42rem) {
	.site-header {
	  min-height: 6.4rem;
	  padding-right: 1rem;
	  padding-left: 1rem;
	  gap: 1rem;
	}

	.brand {
	  gap: 0.8rem;
	}

	.brand-mark {
	  width: 4.6rem;
	  font-size: 1.7rem;
	}

	.brand-copy strong {
	  max-width: 13rem;
	  font-size: 0.8rem;
	}

	.brand-copy small {
	  font-size: 0.65rem;
	}

	.school-link span {
	  position: absolute;
	  width: 1px;
	  height: 1px;
	  overflow: hidden;
	  clip-path: inset(50%);
	}

	.school-link svg {
	  width: 1.35rem;
	  height: 1.35rem;
	}

	.intro {
	  min-height: 11rem;
	  padding: 2.1rem 1.25rem 3.75rem;
	}

	main,
	.footer {
	  width: calc(100% - 2rem);
	}

	main {
	  margin-top: -2rem;
	}

	.tool-grid {
	  grid-template-columns: 1fr;
	}

	.tool-card {
	  min-height: 13.5rem;
	}

	.tool-card h2 {
	  margin-top: 1.35rem;
	}

	.footer {
	  flex-direction: column;
	}
  }

  @media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
	  animation-duration: 0.01ms !important;
	  animation-iteration-count: 1 !important;
	  transition-duration: 0.01ms !important;
	}
  }

  /* Raumplanung: ruhige Farbakzente und begrenzte Inhaltsbreite */
  :root {
	--navy: #00457b;
	--navy-strong: #00345d;
	--ink: #495156;
	--muted: #687277;
	--line: #dbe3e9;
	--soft: #f3f6f8;
	--panel: #ffffff;
	--blue: #00457b;
	--blue2: #eaf2f6;
	--teal: #618c56;
	--teal2: #edf5f1;
	--berry: #4892aa;
	--berry-soft: #eaf5f8;
	--amber: #9a681d;
	--amber2: #fff7e7;
	--red: #495156;
	--red2: #eef1f2;
	--shadow: 0 18px 45px rgba(0, 69, 123, 0.10);
  }

  body {
	background:
	  radial-gradient(circle at 8% 18%, rgba(97, 140, 86, 0.08), transparent 28rem),
	  radial-gradient(circle at 92% 30%, rgba(72, 146, 170, 0.10), transparent 30rem),
	  var(--soft);
	color: var(--ink);
  }

  .site-header {
	position: relative;
	width: min(92rem, calc(100% - 3rem));
	min-height: 6.4rem;
	margin: 1rem auto 0;
	padding: 0.85rem 1.5rem;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(219, 227, 233, 0.95);
	border-radius: 24px;
	box-shadow: var(--shadow);
  }

  .site-header::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 6px;
	background: linear-gradient(90deg, #495156 0 20%, #00457b 20% 50%, #618c56 50% 75%, #4892aa 75% 100%);
  }

  .site-header .brand-mark img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
  }

  .site-header .header-school-logo {
	flex: 0 0 auto;
	min-width: 0;
  }

  .site-header .header-school-logo .brand-mark {
	width: 12.25rem;
	height: 4.2rem;
	padding: 0;
	border-radius: 0;
	background: transparent;
  }

  .app-header-status {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.7rem;
	min-width: 0;
	margin-left: auto;
  }

  .header-current {
	display: flex;
	min-width: 10rem;
	flex-direction: column;
	padding: 0.25rem 1.25rem;
	border-left: 1px solid var(--line);
  }

  .header-current span {
	color: var(--muted);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
  }

  .header-current strong {
	margin-top: 0.15rem;
	color: var(--navy);
	font-size: 1.12rem;
	line-height: 1.2;
  }

  .app-header-status .user-chip {
	color: #496d40;
	background: var(--teal2);
	border: 1px solid #c8ded5;
  }

  .app {
	width: min(92rem, calc(100% - 3rem));
	min-height: calc(100vh - 9.5rem);
	margin: 0.75rem auto 3rem;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(219, 227, 233, 0.95);
	border-radius: 24px;
	box-shadow: var(--shadow);
  }

  .app .main {
	width: 100%;
	margin: 0;
	position: relative;
	z-index: 1;
  }

  .content {
	width: 100%;
	max-width: 76.25rem;
	padding: clamp(0.75rem, 1.5vw, 1.2rem);
	margin-inline: auto;
  }

  .sidebar {
	background:
	  linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
	  var(--navy);
  }

  .login .brand,
  .sidebar .brand {
	gap: 12px;
	text-transform: none;
  }

  .login .brand-mark,
  .sidebar .brand-mark {
	width: 42px;
	height: 42px;
	align-self: auto;
	border-radius: 13px;
	font-size: inherit;
  }

  .nav button {
	position: relative;
	border-left: 4px solid transparent;
	transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
  }

  .nav button:hover {
	transform: translateX(2px);
  }

  .nav button.active {
	border-left-color: #618c56;
	background: linear-gradient(90deg, rgba(97, 140, 86, 0.24), rgba(72, 146, 170, 0.10));
  }

  .page-head h2 {
	color: var(--navy);
	font-size: clamp(1.35rem, 2vw, 1.7rem);
	line-height: 1;
  }

  .page-head h2::after {
	content: "";
	display: block;
	width: 2.75rem;
	height: 3px;
	margin-top: 0.28rem;
	border-radius: 99px;
	background: linear-gradient(90deg, #00457b, #618c56, #4892aa);
  }

  .toolbar,
  .import-box,
  .list,
  .schedule-wrap {
	box-shadow: 0 12px 34px rgba(11, 47, 83, 0.07);
  }

  .toolbar {
	position: relative;
	overflow: hidden;
	padding: 7px 10px;
	gap: 8px;
	margin-bottom: 8px;
	border-top: 4px solid #4892aa;
  }

  .page-head {
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
  }

  .page-head .segmented.plan-tabs {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	max-width: 56rem;
	padding: 3px;
  }

  .page-head .segmented.plan-tabs button {
	padding: 7px 10px;
  }

  .toolbar label {
	margin-bottom: 3px;
	font-size: 0.78rem;
  }

  .toolbar select,
  .toolbar .btn {
	min-height: 38px;
	padding: 7px 11px;
  }

  .toolbar .field {
	min-width: 180px;
  }

  .toolbar .week-title {
	min-width: 190px;
  }

  .toolbar.annual-mode > :not(.field) {
	display: none !important;
  }

  .annual-plan {
	padding: 0.9rem;
	border: 1px solid var(--line);
	border-top: 4px solid #618c56;
	border-radius: 14px;
	background: #fff;
  }

  .annual-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.7rem;
  }

  .annual-head h3,
  .annual-head p {
	margin: 0;
  }

  .annual-head h3 {
	font-size: 1.15rem;
	line-height: 1.2;
  }

  .annual-head p,
  .annual-kicker {
	color: var(--muted);
	font-size: 0.76rem;
  }

  .annual-kicker {
	display: block;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
  }

  .annual-head-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(6.6rem, auto));
	gap: 0.4rem;
	justify-self: end;
  }

  .annual-head-metrics > div {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 0.4rem;
	min-width: 0;
	padding: 0.3rem 0.4rem;
	border: 1px solid #dbe6e2;
	border-radius: 8px;
	background: #f5f9f6;
  }

  .annual-head-metrics strong {
	color: #00457b;
	font-size: 1.2rem;
	line-height: 1;
  }

  .annual-head-metrics span,
  .annual-head-metrics small {
	display: block;
	line-height: 1.1;
  }

  .annual-head-metrics span {
	font-size: 0.64rem;
	font-weight: 800;
  }

  .annual-head-metrics small {
	margin-top: 0.1rem;
	color: var(--muted);
	font-size: 0.56rem;
	font-weight: 500;
  }

  .annual-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.55rem;
	margin-bottom: 0.55rem;
  }

  .annual-metrics > div {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 0.55rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid #dbe6e2;
	border-radius: 10px;
	background: #f5f9f6;
  }

  .annual-metrics strong {
	grid-row: 1 / 3;
	color: #00457b;
	font-size: 1.45rem;
	line-height: 1;
  }

  .annual-metrics span {
	font-size: 0.73rem;
	font-weight: 800;
	line-height: 1.15;
  }

  .annual-metrics small {
	color: var(--muted);
	font-size: 0.67rem;
	line-height: 1.15;
  }

  .annual-note {
	margin: 0 0 0.55rem;
	color: var(--muted);
	font-size: 0.7rem;
	line-height: 1.3;
  }

  .annual-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
	gap: 0.65rem;
  }

  .annual-table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 0.68rem;
	line-height: 1.05;
  }

  .annual-table th,
  .annual-table td {
	padding: 0.23rem 0.2rem;
	border: 1px solid #dbe3e8;
	text-align: center;
	vertical-align: middle;
  }

  .annual-table thead th {
	color: #fff;
	background: #00457b;
	font-weight: 800;
  }

  .annual-table thead th:first-child,
  .annual-table tbody th {
	width: 22%;
  }

  .annual-table tbody th {
	color: #00457b;
	background: #f5f7f8;
	text-align: left;
  }

  .annual-table tbody th strong,
  .annual-table tbody th span,
  .annual-day strong,
  .annual-day span {
	display: block;
  }

  .annual-table tbody th span,
  .annual-day span {
	margin-top: 0.1rem;
	color: #5f6f78;
	font-size: 0.56rem;
	font-weight: 500;
	white-space: nowrap;
  }

  .annual-day strong,
  .annual-total strong {
	color: #00457b;
	font-size: 0.82rem;
  }

  .annual-day.level-1 { background: #f3f8fa; }
  .annual-day.level-2 { background: #e7f2f5; }
  .annual-day.level-3 { background: #d8ebf1; }
  .annual-day.level-4 { background: #c8e0e8; }
  .annual-day.level-5 { background: #b6d4de; }
  .annual-day.empty { color: #a5afb5; background: #fbfcfc; }
  .annual-total { background: #edf5eb; }

  .annual-form {
	display: none;
	margin-top: 0.75rem;
	border: 1px solid #aebbc2;
	color: #1c2f3a;
	font-size: 0.8667rem;
	line-height: 1.2;
  }

  .annual-form-summary {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
	border-bottom: 1px solid #aebbc2;
  }

  .annual-form-summary > div {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 6.2rem;
	padding: 0.55rem 0.65rem;
  }

  .annual-form-summary > div + div {
	border-left: 1px solid #aebbc2;
  }

  .annual-write-field strong,
  .annual-write-field span {
	display: block;
  }

  .annual-write-field strong {
	color: #00457b;
  }

  .annual-write-field span {
	color: var(--muted);
	font-size: 0.7667rem;
  }

  .annual-write-field i,
  .annual-duty-row i {
	display: block;
	height: 1.8rem;
	margin-top: auto;
	border-bottom: 1px solid #87969e;
  }

  .annual-hours-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	position: relative;
	padding: 0 !important;
	border: 1px solid #aebbc2;
  }

  .annual-hours-form::before,
  .annual-hours-form::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 2;
	width: 1px;
	background: #87969e;
	pointer-events: none;
  }

  .annual-hours-form::before {
	left: calc(100% / 3);
  }

  .annual-hours-form::after {
	left: calc(200% / 3);
  }

  .annual-form-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 3.5rem 2rem;
	align-items: end;
	min-height: 3.15rem;
	padding: 0.35rem 0.5rem;
	border-bottom: 1px solid #cbd4d8;
  }

  .annual-form-row:nth-child(n + 4) {
	border-bottom: 0;
  }

  .annual-form-row i {
	display: block;
	height: 1.1rem;
	margin: 0 0.25rem;
	border-bottom: 1px solid #87969e;
  }

  .annual-form-row b {
	text-align: right;
  }

  .annual-form-row > span {
	font-weight: 700;
  }

  .annual-form-row small {
	display: block;
	color: var(--muted);
	font-size: 0.7667rem;
	font-style: italic;
  }

  .annual-form-row.tall {
	min-height: 3.15rem;
  }

  .annual-form-row.total {
	background: #edf5eb;
	color: #365b2d;
	font-weight: 800;
  }

  .annual-sign-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 0 !important;
  }

  .annual-duty-row {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 5.2rem;
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid #cbd4d8;
	background: #f5f7f8;
  }

  .annual-duty-row:first-child {
	border-right: 1px solid #cbd4d8;
  }

  .annual-teacher-approval {
	display: grid;
	grid-template-columns: 0.72fr 1.28fr;
	align-items: end;
	gap: 0.75rem;
	min-height: 4.5rem;
	padding: 0.5rem 0.65rem;
	border-right: 1px solid #cbd4d8;
  }

  .annual-school-approval {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	align-items: end;
	gap: 0.75rem;
	min-height: 4.5rem;
	padding: 0.5rem 0.65rem;
  }

  .annual-place-row {
	align-self: end;
  }

  .annual-place-row i,
  .annual-overtime i {
	display: inline-block;
	width: 5rem;
	border-bottom: 1px solid #87969e;
  }

  .annual-signature {
	align-self: end;
	text-align: center;
  }

  .annual-signature i {
	display: block;
	height: 1.3rem;
	border-bottom: 1px solid #46545b;
  }

  .annual-signature span {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.7467rem;
  }

  .annual-overtime {
	display: flex;
	align-items: flex-start;
	gap: 0.35rem;
	padding: 0;
  }

  .annual-overtime-line2 {
	display: block;
	margin-top: 4mm;
  }

  .annual-school-signature {
	align-self: end;
	padding: 0;
  }

  .annual-checkbox {
	flex: 0 0 auto;
	width: 0.9rem;
	height: 0.9rem;
	border: 1px solid #46545b;
  }

  .annual-loading,
  .annual-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	min-height: 12rem;
	padding: 2rem;
	color: var(--muted);
	text-align: center;
  }

  .toolbar .legend {
	gap: 10px;
	font-size: 0.76rem;
  }

  .card {
	position: relative;
	overflow: hidden;
	border-top: 5px solid #4892aa;
	box-shadow: 0 12px 30px rgba(11, 47, 83, 0.07);
	transition: transform 160ms ease, box-shadow 160ms ease;
  }

  .cards .card:nth-child(3n + 1) { border-top-color: var(--teal); }
  .cards .card:nth-child(3n + 2) { border-top-color: #4892aa; }
  .cards .card:nth-child(3n) { border-top-color: #00457b; }

  .card:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 38px rgba(11, 47, 83, 0.11);
  }

  .btn-primary {
	background: var(--teal);
	box-shadow: 0 8px 20px rgba(79, 125, 112, 0.24);
  }

  .btn-primary:hover {
	background: #4f7846;
  }

  .btn-dark {
	background: var(--navy);
  }

  .btn-ghost:hover {
	border-color: #b7cbd5;
	background: var(--blue2);
  }

  .segmented button.active {
	color: var(--navy);
	box-shadow: 0 3px 10px rgba(11, 47, 83, 0.11);
  }

  .favorite-button[aria-pressed="true"],
  .badge.admin {
	color: #00457b;
	border-color: #bfd8e2;
	background: var(--berry-soft);
  }

  .badge.principal {
	color: #496d40;
	border-color: #c9dcc4;
	background: #edf5eb;
  }

  .badge.room {
	color: #00457b;
	background: var(--blue2);
  }

  .badge.cart {
	color: #496d40;
	background: var(--teal2);
  }

  .schedule > .day-head {
	background: #f8fbfc;
	border-top: 4px solid #4892aa;
  }

  .schedule {
	grid-template-rows: 42px repeat(10, 40px);
	line-height: 1.12;
  }

  .schedule.weekend-visible {
	grid-template-columns: 64px repeat(7, minmax(120px, 1fr));
	min-width: 1000px;
  }

  .day-head {
	padding: 4px 8px;
	line-height: 1.08;
  }

  .booking {
	margin: 2px 4px;
	padding: 3px 7px;
	border-radius: 8px;
	font-size: 0.72rem;
	line-height: 1.13;
  }

  .booking span {
	margin-top: 1px;
  }

  .period {
	line-height: 1;
  }

  .status-text {
	font-size: 0.64rem;
  }

  .schedule > .day-head:nth-child(3),
  .schedule > .day-head:nth-child(6) { border-top-color: var(--teal); }

  .schedule > .day-head:nth-child(4) { border-top-color: #00457b; }

  .schedule > .day-head.today {
	background: var(--blue2);
  }

  .booking {
	border-left-color: #4892aa;
	background: var(--blue2);
  }

  .booking.untis {
	border-left-color: var(--teal);
	background: var(--teal2);
  }

  /* Parallele Unterrichtseinträge einer Klasse werden innerhalb desselben
     Stundenfelds nebeneinander dargestellt. Die Trennlinie verläuft vertikal. */
  .booking-split-group {
	--split-count: 2;
	z-index: 3;
	display: grid;
	grid-template-columns: repeat(var(--split-count), minmax(0, 1fr));
	min-width: 0;
	min-height: 0;
	margin: 2px 4px;
	overflow: hidden;
	border: 1px solid #bdd4de;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(16, 34, 53, 0.08);
  }

  .booking.booking-split-part {
	width: 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 3px 5px;
	border-radius: 0;
	border-left-width: 3px;
	box-shadow: none;
	font-size: 0.68rem;
  }

  .booking.booking-split-part + .booking.booking-split-part {
	border-top: 0;
	border-right: 0;
	border-bottom: 0;
	border-left: 2px solid #fff;
	box-shadow: -3px 0 0 #618c56;
  }

  .booking-split-part strong,
  .booking-split-part span {
	text-overflow: ellipsis;
  }

  .booking-split-group[style*="--split-count: 3"] .booking-split-part,
  .booking-split-group[style*="--split-count: 4"] .booking-split-part {
	padding-inline: 3px;
	font-size: 0.62rem;
  }

  .modal {
	backdrop-filter: blur(4px);
  }

  .dialog {
	border-top: 6px solid #4892aa;
  }

  @media (max-width: 900px) {
	.site-header {
	  width: calc(100% - 1.5rem);
	  min-height: 0;
	  margin-top: 0.75rem;
	  padding: 0.8rem 1rem;
	  flex-wrap: wrap;
	  gap: 0.75rem;
	  border-radius: 20px;
	}

	.site-header .header-school-logo .brand-mark {
	  width: 10.75rem;
	  height: 3.7rem;
	  flex: 0 0 10.75rem;
	  align-self: auto;
	}

	.site-header .brand {
	  width: 100%;
	  padding-bottom: 0.75rem;
	  border-bottom: 1px solid var(--line);
	}

	.site-header .brand-copy small {
	  display: none;
	}

	.app-header-status {
	  flex: 1 1 100%;
	  justify-content: flex-start;
	  flex-wrap: wrap;
	  margin-left: 0;
	}

	.header-current {
	  min-width: 0;
	  flex: 1 1 auto;
	  padding: 0 0.75rem;
	}

	.app {
	  width: calc(100% - 1.5rem);
	  min-height: calc(100vh - 10rem);
	  margin: 0.75rem auto 1.5rem;
	  border-radius: 20px;
	}

	.app-header-status .btn {
	  min-height: 40px;
	  padding: 8px 10px;
	  font-size: 0.8rem;
	}

	.page-head .plan-tabs {
	  grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.page-head .plan-tabs button {
	  min-width: 0;
	  padding: 9px 4px;
	  font-size: 0.7rem;
	  line-height: 1.15;
	  overflow-wrap: anywhere;
	}
  }

  @media (max-width: 520px) {
	.app-header-status {
	  display: grid;
	  grid-template-columns: 44px minmax(0, 1fr) auto;
	  gap: 0.6rem;
	  width: 100%;
	}

	.app-header-status #menuBtn {
	  grid-column: 1;
	  grid-row: 1;
	}

	.app-header-status .header-current {
	  grid-column: 2 / -1;
	  grid-row: 1;
	}

	.app-header-status #passwordBtn {
	  grid-column: 1 / 3;
	  grid-row: 2;
	}

	.app-header-status #logoutBtn {
	  grid-column: 3;
	  grid-row: 2;
	}
  }

  /* KPO-Hilfefinder: gemeinsames Erscheinungsbild */
  .site-header,
  .app,
  .login {
	width: min(90rem, calc(100% - 3rem));
  }

  .site-header {
	min-height: 6.15rem;
	gap: 1.15rem;
	padding: 0.82rem 1.25rem;
	border-radius: 22px;
  }

  .site-header::before,
  .app::before,
  .login::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	z-index: 8;
	height: 5px;
	background: linear-gradient(90deg, #495156 0 20%, #00457b 20% 50%, #618c56 50% 75%, #4892aa 75% 100%);
	pointer-events: none;
  }

  .site-header .header-school-logo .brand-mark {
	width: 11.3rem;
	height: 3.9rem;
  }

  .school-disciplines {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.6rem, 1.2vw, 1rem);
	min-width: 0;
	margin-left: auto;
  }

  .site-header.is-authenticated .school-disciplines {
	display: none;
  }

  .site-header.is-authenticated .app-header-status {
	margin-left: auto;
  }

  .school-discipline {
	position: relative;
	display: block;
	max-width: 8.8rem;
	padding-left: 1.45rem;
	color: #495156;
	font-size: 0.61rem;
	font-weight: 800;
	letter-spacing: 0.045em;
	line-height: 1.22;
	text-transform: uppercase;
  }

  .school-discipline::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1rem;
	height: 1rem;
	background: #495156;
	transform: translateY(-50%);
  }

  .school-discipline--green::before { background: #618c56; }
  .school-discipline--cyan::before { background: #4892aa; }

  .header-right {
	flex: 0 0 auto;
	gap: 0.75rem;
  }

  .school-link {
	padding-left: 1rem;
	border-left: 1px solid var(--line);
  }

  .app-header-status {
	flex: 0 0 auto;
	margin-left: 0;
  }

  .header-current {
	min-width: 8.2rem;
	padding: 0.2rem 0.8rem;
  }

  .header-current strong {
	font-size: 1rem;
  }

  .app-header-status .btn {
	min-height: 39px;
	padding: 8px 11px;
	font-size: 0.78rem;
  }

  .app {
	position: relative;
	grid-template-columns: 14.5rem minmax(0, 1fr);
	min-height: calc(100vh - 9rem);
	margin-top: 0.75rem;
	border-radius: 22px;
	background: #fff;
  }

  .app::after {
	content: "";
	position: absolute;
	inset: 5px 0 0 auto;
	z-index: 0;
	width: 5px;
	background: linear-gradient(180deg, #00457b, #4892aa);
	pointer-events: none;
  }

  .sidebar {
	padding-top: 1.65rem;
	background:
	  radial-gradient(circle at 10% 8%, rgba(72, 146, 170, 0.28), transparent 13rem),
	  linear-gradient(180deg, #00457b, #003b69 74%, #00345d);
  }

  .app .main {
	background:
	  radial-gradient(circle at 97% 3%, rgba(72, 146, 170, 0.08), transparent 18rem),
	  linear-gradient(180deg, #ffffff, #f8fafb);
  }

  .content {
	max-width: none;
	padding: 0.78rem 1rem 1rem;
  }

  .page-head h2::after {
	width: 2.4rem;
	background: #618c56;
  }

  .toolbar,
  .import-box,
  .list,
  .schedule-wrap,
  .card {
	border-color: #dbe3e9;
	border-radius: 15px;
  }

  .toolbar {
	border-top-color: #4892aa;
	background: rgba(255, 255, 255, 0.96);
  }

  .schedule {
	grid-template-columns: 64px repeat(5, minmax(150px, 1fr));
	min-width: 880px;
  }

  .login {
	position: relative;
	min-height: min(39rem, calc(100vh - 8.9rem));
	grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.62fr);
	margin: 0.75rem auto 2rem;
	overflow: hidden;
	border: 1px solid rgba(219, 227, 233, 0.95);
	border-radius: 22px;
	box-shadow: var(--shadow);
  }

  .login-card {
	padding: clamp(2.25rem, 5vw, 4.5rem);
  }

  .sso-login {
	margin-bottom: 1.15rem;
  }

  .sso-login .btn-primary {
	background: linear-gradient(135deg, #00457b, #17678f);
	box-shadow: 0 8px 20px rgba(0, 69, 123, 0.2);
  }

  .sso-status {
	margin-top: 0.65rem;
	padding: 0.65rem 0.75rem;
	border-radius: 9px;
	color: #365b2d;
	background: #edf5eb;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.3;
  }

  .sso-status.error {
	color: #7d341f;
	background: #fff1eb;
  }

  .login-divider {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-top: 1rem;
	color: var(--muted);
	font-size: 0.76rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
  }

  .login-divider::before,
  .login-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
  }

  .login h1 {
	color: #00457b;
	font-size: clamp(2rem, 4vw, 3.25rem);
  }

  .login-art {
	background:
	  radial-gradient(circle at 75% 22%, rgba(97, 140, 86, 0.95) 0 9%, transparent 9.3%),
	  linear-gradient(145deg, #00457b, #00345d 63%, #4892aa);
  }

  @media (max-width: 1120px) {
	.school-disciplines { display: none; }
	.site-header .header-right,
	.site-header .app-header-status { margin-left: auto; }
  }

  @media (max-width: 900px) {
	.site-header,
	.app,
	.login {
	  width: calc(100% - 1.5rem);
	}

	.site-header {
	  min-height: 0;
	  padding: 0.8rem 1rem;
	  border-radius: 20px;
	}

	.app {
	  grid-template-columns: 1fr;
	  border-radius: 20px;
	}

	.login {
	  grid-template-columns: 1fr;
	  min-height: 0;
	  border-radius: 20px;
	}

	.login-card {
	  min-height: calc(100vh - 10rem);
	}

	.school-link {
	  padding-left: 0;
	  border-left: 0;
	}
  }

  @media (max-width: 520px) {
	.site-header .header-school-logo .brand-mark {
	  width: 9.75rem;
	  height: 3.35rem;
	}

	.content {
	  padding: 0.7rem;
	}
  }

  /* Ganztägige Termine im Tageskopf */
  .schedule {
	grid-template-rows: 90px repeat(10, 35px);
  }

  .day-head {
	overflow: hidden;
  }

  .day-events {
	display: grid;
	gap: 2px;
	margin-top: 3px;
  }

  .day-event,
  .day-events-more {
	width: 100%;
	min-width: 0;
	min-height: 15px;
	overflow: hidden;
	padding: 1px 4px;
	border: 0;
	border-radius: 4px;
	color: #00457b;
	background: #eaf5f8;
	font-size: 0.61rem;
	font-weight: 750;
	line-height: 1.25;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
  }

  .day-event.private {
	color: #495156;
	background: #eef1f2;
  }

  .day-event.principal {
	color: #365b2d;
	background: #edf5eb;
  }

  .day-event b {
	font-variant-numeric: tabular-nums;
	font-weight: 850;
  }

  .day-event[role="button"]:hover,
  .day-event[role="button"]:focus-visible,
  .day-events-more:hover,
  .day-events-more:focus-visible {
	background: #d8ebf1;
  }

  .day-events-more {
	color: #496d40;
	background: #edf5f1;
	cursor: pointer;
  }

  /* Persönliche Termine als klassische Monatsansicht */
  .month-calendar-card {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 69, 123, 0.07);
  }

  .month-calendar-toolbar {
	display: grid;
	grid-template-columns: auto minmax(13rem, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(100deg, #f7fafb, #fff 58%);
  }

  .month-nav {
	display: flex;
	align-items: center;
	gap: 0.4rem;
  }

  .month-calendar-heading {
	min-width: 0;
	text-align: center;
  }

  .month-calendar-heading h3 {
	margin: 0;
	color: #00457b;
	font-size: 1.16rem;
	line-height: 1.15;
  }

  .month-calendar-heading span {
	display: block;
	margin-top: 0.15rem;
	color: var(--muted);
	font-size: 0.76rem;
	font-weight: 700;
  }

  .month-calendar-legend {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.8rem;
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 700;
  }

  .month-calendar-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.8rem;
  }

  .month-calendar-legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
  }

  .calendar-visibility {
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 999px;
	background: #495156;
  }

  .calendar-visibility.public {
	background: #4892aa;
  }

  .calendar-visibility.principal {
	background: #618c56;
  }

  .month-calendar-scroll {
	overflow-x: auto;
	overscroll-behavior-inline: contain;
  }

  .month-calendar-scroll:focus-visible {
	outline: 3px solid rgba(72, 146, 170, 0.32);
	outline-offset: -3px;
  }

  .month-calendar-body {
	min-width: 49rem;
  }

  .month-calendar-body.weekdays-only {
	min-width: 35rem;
  }

  .month-weekdays,
  .month-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .month-calendar-body.weekdays-only .month-weekdays,
  .month-calendar-body.weekdays-only .month-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .month-weekdays {
	border-bottom: 1px solid var(--line);
	background: #f3f6f8;
  }

  .month-weekdays span {
	padding: 0.48rem 0.4rem;
	border-right: 1px solid var(--line);
	color: #495156;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	text-align: center;
	text-transform: uppercase;
  }

  .month-weekdays span:last-child {
	border-right: 0;
  }

  .month-day {
	min-width: 0;
	min-height: 7.25rem;
	padding: 0.38rem;
	border-right: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	background: #fff;
  }

  .month-day:nth-child(7n) {
	border-right: 0;
  }

  .month-day.outside {
	background: #f7f9fa;
  }

  .month-day.weekend:not(.today) {
	background-color: #fbfcfc;
  }

  .month-day.outside.weekend {
	background: #f4f6f7;
  }

  .month-day.today {
	background: linear-gradient(145deg, #edf7fa, #fff 65%);
	box-shadow: inset 0 0 0 2px #4892aa;
  }

  .month-day-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.3rem;
	margin-bottom: 0.28rem;
  }

  .month-day-number,
  .month-day-add {
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	color: #00457b;
	background: transparent;
	font-weight: 800;
  }

  .month-day-number {
	width: 1.65rem;
	height: 1.65rem;
	font-size: 0.78rem;
  }

  .month-day-add {
	width: 1.55rem;
	height: 1.55rem;
	color: #618c56;
	font-size: 0.9rem;
	opacity: 0;
	transition: opacity 0.15s, background 0.15s;
  }

  .month-day:hover .month-day-add,
  .month-day:focus-within .month-day-add {
	opacity: 1;
  }

  .month-day-number:hover,
  .month-day-add:hover {
	background: #eaf5f8;
  }

  .month-day.today .month-day-number {
	color: #fff;
	background: #00457b;
  }

  .month-day.outside .month-day-number {
	color: #93a0a7;
  }

  .month-event-list {
	display: grid;
	gap: 0.22rem;
  }

  .month-event,
  .month-events-more {
	width: 100%;
	min-width: 0;
	height: 1.45rem;
	display: flex;
	align-items: center;
	gap: 0.28rem;
	overflow: hidden;
	padding: 0.15rem 0.35rem;
	border: 0;
	border-left: 3px solid #4892aa;
	border-radius: 5px;
	color: #063d62;
	background: #eaf5f8;
	font-size: 0.67rem;
	font-weight: 750;
	line-height: 1;
	text-align: left;
  }

  .month-event span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
  }

  .month-event b {
	flex: 0 0 auto;
	font-size: 0.61rem;
	font-variant-numeric: tabular-nums;
	font-weight: 900;
  }

  .month-event.private {
	border-left-color: #495156;
	color: #394247;
	background: #eef1f2;
  }

  .month-event.principal {
	border-left-color: #618c56;
	color: #365b2d;
	background: #edf5eb;
  }

  .month-event[data-event-type="birthday"] {
	border-left-color: #618c56;
	background: #edf5eb;
  }

  .month-event[data-event-type="exam"] {
	border-left-color: #00457b;
  }

  .month-event[data-event-type="trip"] {
	border-left-color: #618c56;
  }

  .month-event:hover,
  .month-event:focus-visible,
  .month-events-more:hover,
  .month-events-more:focus-visible {
	filter: brightness(0.96);
  }

  .month-events-more {
	justify-content: center;
	border-left-color: transparent;
	color: #496d40;
	background: transparent;
	font-weight: 800;
	text-align: center;
  }

  .month-calendar-loading {
	grid-column: 1 / -1;
	min-height: 20rem;
	display: grid;
	place-items: center;
	color: var(--muted);
	font-weight: 700;
  }

  .month-calendar-loading.error {
	color: #9f2d24;
  }

  .event-import-box {
	margin-top: 1rem;
  }

  .event-all-day {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid #cbd9df;
	border-radius: 10px;
	background: #f7fafb;
  }

  .event-all-day label {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
	color: #00457b;
	font-weight: 800;
  }

  .event-all-day input {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: #618c56;
  }

  .event-all-day span {
	color: var(--muted);
	font-size: 0.78rem;
	text-align: right;
  }

  /* Raumstammdaten vor dem Untis-Stundenplanimport abgleichen */
  .reconcile-box {
	margin-top: 1rem;
	padding: 1rem;
	border: 1px solid var(--line);
	border-top: 4px solid #4892aa;
	border-radius: 14px;
	background: #f8fafb;
  }

  .reconcile-box .card-top {
	align-items: center;
  }

  .reconcile-box h3,
  .import-step-title {
	margin: 0;
  }

  .reconcile-box .card-top p {
	max-width: 52rem;
	margin: 0.2rem 0 0;
	color: var(--muted);
  }

  .reconcile-box > .notice {
	margin-top: 0.8rem;
  }

  .import-step-title {
	margin-top: 1.2rem;
	font-size: 1rem;
	color: #00457b;
  }

  .compact-list {
	max-height: 23rem;
	overflow: auto;
	margin-top: 0.75rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
  }

  .compact-list .reconcile-row {
	grid-template-columns: minmax(8rem, 0.75fr) minmax(10rem, 0.85fr) minmax(15rem, 1.4fr);
	gap: 0.75rem;
	padding: 0.65rem 0.8rem;
  }

  .reconcile-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	color: #00457b;
	background: #eaf5f8;
	font-size: 0.72rem;
	font-weight: 800;
  }

  .reconcile-badge.success {
	color: #496d40;
	background: #edf5eb;
  }

  .reconcile-badge.muted {
	color: #495156;
	background: #eef1f2;
  }

  .reconcile-warning {
	display: block;
	margin-top: 0.3rem;
	color: #7a5313;
	font-size: 0.72rem;
	line-height: 1.25;
  }

  .event-import-form {
	display: grid;
	grid-template-columns: minmax(15rem, 1fr) minmax(13rem, 0.7fr) auto;
	align-items: end;
	gap: 0.75rem;
	margin-top: 1rem;
  }

  .event-import-form .field {
	margin: 0;
  }

  .event-day-list {
	display: grid;
	gap: 0.6rem;
  }

  .event-day-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--line);
	border-left: 4px solid #4892aa;
	border-radius: 10px;
	background: #fff;
  }

  .event-day-item.private {
	border-left-color: #495156;
  }

  .event-day-item.principal {
	border-left-color: #618c56;
	background: #f7fbf6;
  }

  /* Admin-Auswertung nach Abteilung */
  .department-metrics {
	grid-template-columns: minmax(15rem, 1.45fr) repeat(3, minmax(0, 1fr));
	margin-bottom: 1rem;
  }

  .department-analysis-card {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(11, 47, 83, 0.07);
  }

  .teacher-analysis-card {
	margin-top: 1rem;
  }

  .department-analysis-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.15rem;
	border-bottom: 1px solid var(--line);
	background: linear-gradient(100deg, #f7fafb, #fff 58%);
  }

  .department-analysis-head h3,
  .department-analysis-head p {
	margin: 0;
  }

  .department-analysis-head p,
  .department-analysis-head > span {
	color: var(--muted);
	font-size: 0.78rem;
  }

  .department-analysis-head p {
	margin-top: 0.2rem;
	font-weight: 700;
  }

  .department-analysis-head > span {
	max-width: 27rem;
	line-height: 1.4;
	text-align: right;
  }

  .department-stats-list {
	display: grid;
  }

  .analysis-values {
	display: grid;
	grid-template-columns: repeat(2, minmax(5.5rem, auto));
	align-items: center;
	gap: 0.75rem;
	min-width: 12rem;
	text-align: right;
  }

  .analysis-values > span {
	display: block;
	margin: 0;
  }

  .analysis-values strong,
  .analysis-values small {
	display: block;
	font-variant-numeric: tabular-nums;
  }

  .analysis-values small {
	margin-top: 0.1rem;
	color: var(--muted);
	font-size: 0.7rem;
	font-weight: 600;
  }

  .metric .analysis-values {
	text-align: left;
  }

  .metric .analysis-values strong {
	font-size: 1.45rem;
  }

  .department-stat-row {
	display: block;
	padding: 0;
	border-bottom: 1px solid #e7edf1;
  }

  .department-stat-row:last-child {
	border-bottom: 0;
  }

  .department-stat-title span,
  .department-stat-value span {
	display: block;
	margin-top: 0.1rem;
	color: var(--muted);
	font-size: 0.75rem;
  }

  .department-stat-value {
	min-width: 8.5rem;
	color: #00457b;
	text-align: right;
  }

  .department-stat-value strong {
	font-size: 1.2rem;
	font-variant-numeric: tabular-nums;
  }

  .department-stat-bar {
	grid-column: 1 / -1;
	height: 0.42rem;
	overflow: hidden;
	border-radius: 999px;
	background: #edf1f3;
  }

  .department-stat-bar i {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #00457b, #4892aa 64%, #618c56);
  }

  .department-stat-toggle {
	display: grid;
	grid-template-columns: minmax(12rem, 1fr) auto auto;
	align-items: center;
	gap: 0.6rem 1rem;
	width: 100%;
	padding: 0.9rem 1.15rem;
	border: 0;
	color: inherit;
	background: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 160ms ease;
  }

  .department-stat-toggle:hover,
  .department-stat-toggle:focus-visible,
  .department-stat-toggle[aria-expanded="true"] {
	background: #f7fafb;
  }

  .department-stat-toggle:focus-visible {
	position: relative;
	z-index: 1;
	outline: 3px solid rgba(72, 146, 170, 0.3);
	outline-offset: -3px;
  }

  .department-stat-expand {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.45rem;
	min-width: 9.5rem;
	color: #00457b;
	font-size: 0.75rem;
	font-weight: 800;
	white-space: nowrap;
  }

  .department-stat-expand b {
	display: inline-grid;
	width: 1.6rem;
	height: 1.6rem;
	place-items: center;
	border-radius: 50%;
	background: #eaf5f8;
	font-size: 1rem;
	line-height: 1;
	transition: transform 160ms ease;
  }

  .department-stat-toggle[aria-expanded="true"] .department-stat-expand b {
	transform: rotate(180deg);
  }

  .department-stat-toggle .department-stat-bar {
	grid-column: 1 / -1;
  }

  .department-class-list {
	display: grid;
	border-top: 1px solid #dce7eb;
	background: linear-gradient(90deg, #f7fafb, #fbfdfd);
  }

  .department-class-list[hidden] {
	display: none;
  }

  .department-class-row {
	display: grid;
	grid-template-columns: minmax(10rem, 1fr) auto;
	gap: 0.45rem 1rem;
	padding: 0.72rem 1.15rem 0.72rem 2rem;
	border-bottom: 1px solid #e4ecef;
  }

  .department-class-row:last-child {
	border-bottom: 0;
  }

  .department-class-title span,
  .department-class-value span {
	display: block;
	margin-top: 0.08rem;
	color: var(--muted);
	font-size: 0.72rem;
  }

  .department-class-value {
	min-width: 8.5rem;
	color: #00457b;
	text-align: right;
  }

  .department-class-value strong {
	font-size: 1.02rem;
	font-variant-numeric: tabular-nums;
  }

  .department-class-bar {
	grid-column: 1 / -1;
	height: 0.3rem;
	overflow: hidden;
	border-radius: 999px;
	background: #e5ecef;
  }

  .department-class-bar i {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #4892aa, #618c56);
  }

  .teacher-stats-list {
	display: grid;
  }

  .teacher-stat-row {
	display: grid;
	grid-template-columns: minmax(12rem, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 0.78rem 1.15rem;
	border-bottom: 1px solid #e7edf1;
  }

  .teacher-stat-row:last-child {
	border-bottom: 0;
  }

  .teacher-stat-title strong,
  .teacher-stat-title span {
	display: block;
  }

  .teacher-stat-title span {
	margin-top: 0.08rem;
	color: var(--muted);
	font-size: 0.72rem;
  }

  .event-day-item small {
	display: block;
	margin-top: 0.15rem;
	color: var(--muted);
  }

  .event-day-actions {
	display: flex;
	flex: 0 0 auto;
	gap: 0.45rem;
  }

  @media (max-width: 760px) {
	.department-metrics {
	  grid-template-columns: 1fr;
	}

	.department-analysis-head,
	.department-stat-row {
	  grid-template-columns: 1fr;
	}

	.department-analysis-head {
	  flex-direction: column;
	}

	.department-analysis-head > span,
	.department-stat-value,
	.analysis-values {
	  text-align: left;
	}

	.analysis-values {
	  min-width: 0;
	}

	.department-stat-toggle {
	  grid-template-columns: minmax(0, 1fr) auto;
	}

	.department-stat-expand,
	.department-stat-toggle .department-stat-bar {
	  grid-column: 1 / -1;
	  justify-content: flex-start;
	}

	.department-class-row {
	  grid-template-columns: minmax(0, 1fr) auto;
	  padding-left: 1.15rem;
	}

	.teacher-stat-row {
	  grid-template-columns: 1fr;
	}

	.event-all-day,
	.event-day-item {
	  align-items: stretch;
	  flex-direction: column;
	}

	.event-all-day span {
	  text-align: left;
	}

	.event-day-actions .btn {
	  flex: 1;
	}

	.month-calendar-toolbar {
	  grid-template-columns: 1fr;
	  gap: 0.65rem;
	}

	.month-nav,
	.month-calendar-actions,
	.month-calendar-legend {
	  justify-content: center;
	}

	.month-calendar-actions {
	  flex-wrap: wrap;
	}

	.month-nav .btn:not(.btn-icon) {
	  flex: 1;
	}

	.month-day-add {
	  opacity: 1;
	}

	.event-import-form {
	  grid-template-columns: 1fr;
	}

	.page-head .segmented.plan-tabs,
	.annual-metrics,
	.annual-columns {
	  grid-template-columns: 1fr;
	}

	.annual-head {
	  align-items: stretch;
	  grid-template-columns: 1fr;
	}

	.annual-head-metrics {
	  grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.annual-form-summary,
	.annual-hours-form,
	.annual-sign-form {
	  grid-template-columns: 1fr;
	}

	.annual-hours-form::before,
	.annual-hours-form::after {
	  display: none;
	}

	.annual-form-summary > div + div {
	  border-top: 1px solid #aebbc2;
	  border-left: 0;
	}

	.annual-form-row,
	.annual-form-row:nth-child(n + 4) {
	  border-right: 0;
	  border-left: 0;
	  border-bottom: 1px solid #cbd4d8;
	}

	.annual-form-row:last-child {
	  border-bottom: 0;
	}

	.annual-duty-row:first-child,
	.annual-teacher-approval {
	  border-right: 0;
	}

	.annual-duty-row,
	.annual-teacher-approval {
	  border-bottom: 1px solid #cbd4d8;
	}

	.annual-school-approval {
	  grid-template-columns: 1fr;
	}

	.reconcile-box .card-top {
	  align-items: stretch;
	}

	.compact-list .reconcile-row {
	  grid-template-columns: 1fr;
	}
  }

  @page {
	size: A4 landscape;
	margin: 15mm 15mm 5mm;
  }

  @media print {
	body.annual-print {
	  color: #102a3d;
	  background: #fff;
	  font-family: Arial, Helvetica, sans-serif;
	  -webkit-print-color-adjust: exact;
	  print-color-adjust: exact;
	}

	body.annual-print .site-header,
	body.annual-print .sidebar,
	body.annual-print .menu-backdrop,
	body.annual-print #page-timetables > :not(#annualTeacherPlan),
	body.annual-print .annual-no-print,
	body.annual-print .annual-metrics,
	body.annual-print .annual-note,
	body.annual-print .toast-stack {
	  display: none !important;
	}

	body.annual-print #appView,
	body.annual-print .main,
	body.annual-print .content,
	body.annual-print #page-timetables,
	body.annual-print #annualTeacherPlan {
	  display: block !important;
	  width: 100% !important;
	  min-height: 0 !important;
	  margin: 0 !important;
	  padding: 0 !important;
	  overflow: visible !important;
	  border: 0 !important;
	  border-radius: 0 !important;
	  box-shadow: none !important;
	  background: #fff !important;
	}

	body.annual-print #annualTeacherPlan {
	  break-inside: avoid-page;
	  page-break-inside: avoid;
	}

	body.annual-print #appView::before,
	body.annual-print #appView::after {
	  display: none !important;
	}

	body.annual-print .annual-head {
	  grid-template-columns: minmax(42mm, 1fr) auto;
	  gap: 2mm;
	  margin-bottom: 1.2mm;
	}

	body.annual-print .annual-head h3 {
	  font-size: 12pt;
	}

	body.annual-print .annual-head p,
	body.annual-print .annual-kicker {
	  font-size: 7pt;
	}

	body.annual-print .annual-head-metrics {
	  grid-template-columns: repeat(3, 29mm);
	  gap: 1mm;
	  justify-self: end;
	}

	body.annual-print .annual-head-metrics > div {
	  gap: 1mm;
	  padding: 0.8mm 1mm;
	  border-radius: 1mm;
	}

	body.annual-print .annual-head-metrics strong {
	  font-size: 10pt;
	}

	body.annual-print .annual-head-metrics span {
	  font-size: 5.4pt;
	}

	body.annual-print .annual-head-metrics small {
	  font-size: 4.6pt;
	}

	body.annual-print .annual-metrics {
	  grid-template-columns: repeat(4, minmax(0, 1fr));
	  gap: 2mm;
	  margin-bottom: 1.8mm;
	}

	body.annual-print .annual-metrics > div {
	  padding: 1.5mm 2mm;
	  border-radius: 2mm;
	}

	body.annual-print .annual-metrics strong {
	  font-size: 14pt;
	}

	body.annual-print .annual-metrics span {
	  font-size: 6.5pt;
	}

	body.annual-print .annual-metrics small,
	body.annual-print .annual-note {
	  font-size: 5.8pt;
	}

	body.annual-print .annual-note {
	  margin: 0 0 1.8mm;
	}

	body.annual-print .annual-columns {
	  grid-template-columns: repeat(2, minmax(0, 1fr));
	  gap: 2.5mm;
	}

	body.annual-print .annual-table {
	  break-inside: avoid;
	  font-size: 5.4pt;
	}

	body.annual-print .annual-table th,
	body.annual-print .annual-table td {
	  height: 3.1mm;
	  padding: 0.2mm 0.45mm;
	}

	body.annual-print .annual-table tbody th span,
	body.annual-print .annual-day span {
	  font-size: 4.15pt;
	}

	body.annual-print .annual-day strong,
	body.annual-print .annual-total strong {
	  font-size: 6.2pt;
	}

	body.annual-print .annual-plan.annual-dense .annual-head {
	  margin-bottom: 0.8mm;
	}

	body.annual-print .annual-plan.annual-dense .annual-table {
	  font-size: 5pt;
	}

	body.annual-print .annual-plan.annual-dense .annual-table th,
	body.annual-print .annual-plan.annual-dense .annual-table td {
	  height: 2.8mm;
	  padding: 0.1mm 0.35mm;
	}

	body.annual-print .annual-plan.annual-dense .annual-table tbody th span,
	body.annual-print .annual-plan.annual-dense .annual-day span {
	  font-size: 3.8pt;
	}

	body.annual-print .annual-plan.annual-dense .annual-day strong,
	body.annual-print .annual-plan.annual-dense .annual-total strong {
	  font-size: 5.7pt;
	}

	body.annual-print .annual-plan.annual-dense .annual-form {
	  margin-top: 0.8mm;
	}

	body.annual-print .annual-form {
	  display: block;
	  margin-top: 1.2mm;
	  font-size: 7.2pt;
	  line-height: 1.08;
	  break-inside: avoid;
	}

	body.annual-print .annual-form-summary {
	  grid-template-columns: 42% 58%;
	}

	body.annual-print .annual-form-summary > div {
	  min-height: 16mm;
	  padding: 0.9mm 1.3mm;
	}

	body.annual-print .annual-write-field span,
	body.annual-print .annual-signature span,
	body.annual-print .annual-form-row small {
	  font-size: 6.3pt;
	}

	body.annual-print .annual-write-field i,
	body.annual-print .annual-duty-row i {
	  height: 5.5mm;
	  margin-top: auto;
	}

	body.annual-print .annual-hours-form {
	  grid-template-columns: repeat(3, minmax(0, 1fr));
	  border-width: 0.25mm;
	}

	body.annual-print .annual-hours-form::before,
	body.annual-print .annual-hours-form::after {
	  display: block;
	  width: 0.25mm;
	}

	body.annual-print .annual-form-row {
	  grid-template-columns: minmax(0, 1fr) 11mm 5.5mm;
	  min-height: 8.2mm;
	  padding: 0.65mm 1mm;
	}

	body.annual-print .annual-form-row.tall {
	  min-height: 8.2mm;
	}

	body.annual-print .annual-form-row i {
	  height: 2.6mm;
	  margin: 0 0.55mm;
	}

	body.annual-print .annual-sign-form {
	  grid-template-columns: repeat(2, minmax(0, 1fr));
	  grid-template-rows: 16mm 15mm;
	  gap: 0;
	}

	body.annual-print .annual-duty-row {
	  min-height: 16mm;
	  padding: 0.9mm 1.3mm;
	}

	body.annual-print .annual-teacher-approval,
	body.annual-print .annual-school-approval {
	  min-height: 15mm;
	  padding: 0.9mm 1.3mm;
	  gap: 2mm;
	}

	body.annual-print .annual-teacher-approval {
	  grid-template-columns: 0.7fr 1.3fr;
	}

	body.annual-print .annual-school-approval {
	  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	}

	body.annual-print .annual-overtime {
	  padding: 0;
	}

	body.annual-print .annual-school-signature {
	  padding: 0;
	}

	body.annual-print .annual-signature i {
	  height: 3.5mm;
	}

	body.annual-print .annual-checkbox {
	  width: 3.5mm;
	  height: 3.5mm;
	}
  }

  /* Version 20: compact management views. Keep these rules page-scoped so
     timetable cells, dialogs and the original analysis layout are unaffected. */
  :is(#page-mine, #page-myclasses, #page-myrooms, #page-rooms, #page-users, #page-audit) .page-head h2 {
    font-size: 1.5rem;
    margin-bottom: 0;
  }
  :is(#page-mine, #page-myclasses, #page-myrooms, #page-rooms, #page-users, #page-audit) .page-head p {
    font-size: .8rem;
    margin-top: 3px;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .cards {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr));
    gap: 8px;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card {
    padding: 9px 10px;
    border-radius: 8px;
    border-top-width: 2px;
    box-shadow: none;
    min-width: 0;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card:hover {
    transform: none;
    box-shadow: 0 2px 8px #1022350d;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card-top {
    gap: 7px;
    margin-bottom: 0;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card-top > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card h3 {
    font-size: .88rem;
    line-height: 1.3;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card p {
    margin-top: 3px;
    font-size: .74rem;
    line-height: 1.35;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .card-actions {
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    flex-wrap: wrap;
  }
  :is(#page-myclasses, #page-myrooms, #page-rooms, #page-users) .badge {
    font-size: .65rem;
    padding: 2px 6px;
    line-height: 1.4;
    flex-shrink: 0;
  }
  :is(#page-mine, #page-myclasses, #page-myrooms, #page-rooms, #page-users, #page-audit) .btn {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: .76rem;
  }
  :is(#page-myclasses, #page-myrooms) .favorite-button {
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 0;
    font-size: 1rem;
  }
  :is(#myBookings, #auditList) {
    border-radius: 8px;
    box-shadow: none;
  }
  #myBookings .list-row {
    grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .9fr) minmax(0, 1.4fr) auto;
    gap: 7px 12px;
    padding: 7px 10px;
    font-size: .8rem;
  }
  :is(#myBookings, #auditList) .list-row > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  :is(#myBookings, #auditList) .list-row span {
    font-size: .73rem;
    line-height: 1.35;
  }
  #myBookings .list-actions { gap: 5px; }
  #resourceCards .resource-details { margin-top: 5px; }
  #resourceCards .resource-details span { display: block; font-size: .7rem; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
  #auditList .list-row {
    grid-template-columns: minmax(175px, 1fr) minmax(125px, .7fr) minmax(0, 2.4fr);
    gap: 7px 12px;
    padding: 7px 10px;
    font-size: .76rem;
    line-height: 1.35;
  }
  #auditList .list-row > div:last-child:empty { display: none; }
  #page-users .compact-admin-tools {
    margin-bottom: 8px;
    padding: 0;
    border-radius: 8px;
    box-shadow: none;
  }
  #page-users .compact-admin-tools > summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 10px;
    padding: 8px 10px;
    font-size: .82rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }
  #page-users .compact-admin-tools > summary::-webkit-details-marker { display: none; }
  #page-users .compact-admin-tools > summary::before { content: "▸"; }
  #page-users .compact-admin-tools[open] > summary::before { content: "▾"; }
  #page-users .compact-admin-tools > summary > span {
    margin-left: auto;
    font-size: .72rem;
    font-weight: 400;
    color: var(--muted);
  }
  #page-users .compact-admin-content { padding: 10px; border-top: 1px solid var(--line); }
  #page-users .compact-admin-content > .card-top { margin-bottom: 10px; gap: 10px; }
  #page-users .compact-admin-content h3 { font-size: .9rem; margin: 0; }
  #page-users .compact-admin-content p { font-size: .76rem; margin: 3px 0 0; }
  #page-users .event-import-form { gap: 8px; margin-top: 9px; }
  #page-users .event-import-form .input { padding: 6px 8px; min-height: 34px; font-size: .8rem; }

  /* Restore and isolate the established admin analysis: two adjacent hour
     values, department bars and expandable class rows, never compact cards. */
  #page-analysis .department-metrics {
    display: grid;
    grid-template-columns: minmax(15rem, 1.45fr) repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  #page-analysis .department-analysis-card { min-width: 0; }
  #page-analysis .analysis-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(5.5rem, auto));
    gap: .75rem;
    min-width: 12rem;
    align-items: center;
    text-align: right;
  }
  #page-analysis .analysis-values > span { display: block; margin: 0; min-width: 0; }
  #page-analysis .analysis-values strong,
  #page-analysis .analysis-values small { display: block; font-variant-numeric: tabular-nums; }
  #page-analysis .analysis-values strong { font-size: 1.15rem; line-height: 1.3; }
  #page-analysis .analysis-values small { font-size: .7rem; color: var(--muted); }
  #page-analysis .metric .analysis-values { text-align: left; }
  #page-analysis .metric .analysis-values strong { font-size: 1.45rem; }
  #page-analysis .department-stat-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    align-items: center;
    gap: .6rem 1rem;
  }
  #page-analysis .department-stat-title,
  #page-analysis .department-class-title,
  #page-analysis .teacher-stat-title { min-width: 0; overflow-wrap: anywhere; }
  #page-analysis .department-stat-title > strong,
  #page-analysis .department-stat-title > span { display: block; }
  #page-analysis .department-stat-bar,
  #page-analysis .department-class-bar { grid-column: 1 / -1; }
  #page-analysis .department-class-list:not([hidden]) { display: grid; }
  #page-analysis .department-class-row,
  #page-analysis .teacher-stat-row { grid-template-columns: minmax(0, 1fr) auto; }

  @media (max-width: 820px) {
    #myBookings .list-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
    #myBookings .list-row > div:first-child { grid-column: 1; grid-row: 1; }
    #myBookings .list-row > div:nth-child(2) { grid-column: 1; grid-row: 2; }
    #myBookings .list-row > div:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
    #myBookings .list-row > .list-actions { grid-column: 2; grid-row: 1 / 3; flex-direction: column; }
    #auditList .list-row { grid-template-columns: minmax(0, 1fr) minmax(80px, auto); }
    #auditList .list-row > div:nth-child(2) { grid-column: 2; grid-row: 1; }
    #auditList .list-row > div:nth-child(3) { grid-column: 1 / -1; }
  }
  @media (max-width: 760px) {
    #page-analysis .department-metrics { grid-template-columns: 1fr; }
    #page-analysis .department-stat-toggle { grid-template-columns: minmax(0, 1fr); }
    #page-analysis .analysis-values { min-width: 0; text-align: left; }
    #page-analysis .department-class-row,
    #page-analysis .teacher-stat-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
    #page-users .compact-admin-content > .card-top { flex-wrap: wrap; }
  }
