/**
 * Team-Dashboard /team/ – Werkstatt-Termine und Probefahrten aller Filialen.
 * Dunkler Kopf (Gäde-Schwarz), ruhige Arbeitsfläche, Farbe nur als Information:
 * Orange = Werkstatt, Petrol = Probefahrt, Schraffur = geblockte Zeit.
 */

:root {
	--ink: #121212;
	--ink-2: #262626;
	--ink-line: #3d3d3d;
	--on-ink: #f5f5f5;
	--on-ink-muted: #a0a0a0;
	--paper: #f7f7f5;
	--card: #fff;
	--fog: #ececea;
	--line: #e0e0dc;
	--text: #121212;
	--muted: #595959;
	--faint: #858580;
	--wt: #f05a22;
	--wt-tint: #fdece7;
	--wt-ink: #a63a10;
	--pf: #1e6e86;
	--pf-tint: #e2eff3;
	--pf-ink: #134b5c;
	--bt: #6a4fa3;
	--bt-tint: #efe9f8;
	--bt-ink: #4b3680;
	--danger: #b3261e;
	--ok: #2e7d4f;
	--hatch: #d4d4cf;
	--now: #f05a22;
	--focus: 0 0 0 3px rgb(240 90 34 / 45%);
	--font-display: "Clash Display", "Satoshi", system-ui, sans-serif;
	--font-body: "Satoshi", system-ui, sans-serif;
	--hour: 64px;
	--axis: 56px;
	--radius: 6px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {

	:root:not([data-theme="light"]) {
		--paper: #161616;
		--card: #1f1f1f;
		--fog: #262626;
		--line: #333;
		--text: #f2f2f0;
		--muted: #b0b0aa;
		--faint: #8a8a85;
		--wt-tint: #3a1a0e;
		--wt-ink: #ff9a70;
		--pf-tint: #0f2a33;
		--pf-ink: #8ccfe3;
		--bt-tint: #241a38;
		--bt-ink: #c4b2f0;
		--hatch: #3a3a3a;
		--danger: #ff8a80;
		--ok: #7fcf9d;
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--paper: #161616;
	--card: #1f1f1f;
	--fog: #262626;
	--line: #333;
	--text: #f2f2f0;
	--muted: #b0b0aa;
	--faint: #8a8a85;
	--wt-tint: #3a1a0e;
	--wt-ink: #ff9a70;
	--pf-tint: #0f2a33;
	--pf-ink: #8ccfe3;
	--bt-tint: #241a38;
	--bt-ink: #c4b2f0;
	--hatch: #3a3a3a;
	--danger: #ff8a80;
	--ok: #7fcf9d;
	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.45;
	font-feature-settings: "tnum" 0;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: none;
	box-shadow: var(--focus);
	border-radius: 4px;
}

[hidden] {
	display: none !important;
}

.t-num,
.t-time {
	font-variant-numeric: tabular-nums;
}

.t-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Logo ---------- */

.t-logo {
	display: inline-flex;
	color: #fff;
}

.t-logo svg {
	height: 26px;
	width: auto;
	display: block;
}

/* ---------- Buttons und Felder ---------- */

.t-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--text);
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.t-btn:hover {
	border-color: var(--faint);
}

.t-btn--primary {
	background: var(--wt);
	border-color: var(--wt);
	/* Schwarz auf Orange (5,5:1) wie auf der Website – Weiß erreicht nur 3,4:1. */
	color: #121212;
}

.t-btn--primary:hover {
	background: #f36a36;
	border-color: #f36a36;
}

.t-btn--ghost {
	background: transparent;
	border-color: transparent;
}

.t-btn--ghost:hover {
	background: var(--fog);
	border-color: transparent;
}

.t-btn--danger {
	background: var(--danger);
	border-color: var(--danger);
	color: #fff;
}

.t-btn--danger:hover {
	filter: brightness(0.92);
}

.t-btn--block {
	width: 100%;
}

.t-btn--small {
	min-height: 32px;
	padding: 4px 10px;
	font-size: 14px;
}

.t-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.t-btn svg {
	width: 18px;
	height: 18px;
	flex: none;
}

.t-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--wt-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.t-field {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* lange Auswahllisten (Rad, Mietobjekt) dürfen nicht verbreitern */
	gap: 6px;
	min-width: 0;
}

.t-field > span,
.t-legend {
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
}

.t-field input,
.t-field select,
.t-field textarea,
.t-input {
	width: 100%;
	min-height: 44px;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
}

.t-field textarea {
	min-height: 84px;
	resize: vertical;
}

.t-field input:focus,
.t-field select:focus,
.t-field textarea:focus,
.t-input:focus {
	outline: none;
	border-color: var(--wt);
	box-shadow: var(--focus);
}

.t-field--error input,
.t-field--error select,
.t-field--error textarea {
	border-color: var(--danger);
}

.t-error {
	color: var(--danger);
	font-size: 14px;
	font-weight: 600;
}

.t-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	min-height: 32px;
}

.t-check input {
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--wt);
	flex: none;
}

/* Wortreihe mit Punkt: Filialen, Kalender, Ansichten */
.t-words {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 18px;
	margin: 0;
	padding: 0;
	border: 0;
}

.t-word {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	opacity: 0.55;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s;
}

.t-word::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentcolor;
	transform: scale(0);
	transition: transform 0.18s;
}

.t-word:hover {
	opacity: 0.85;
}

.t-word[aria-pressed="true"],
.t-word[aria-checked="true"] {
	opacity: 1;
}

.t-word[aria-pressed="true"]::before,
.t-word[aria-checked="true"]::before {
	transform: scale(1);
}

.t-word--wt::before {
	background: var(--wt);
}

.t-word--pf::before {
	background: var(--pf);
}

.t-word--bt::before {
	background: var(--bt);
}

.t-word--wt,
.t-word--pf,
.t-word--bt {
	opacity: 0.6;
}

.t-word--wt::before,
.t-word--pf::before,
.t-word--bt::before {
	transform: scale(1);
	opacity: 0.35;
}

.t-word--wt[aria-pressed="true"]::before,
.t-word--pf[aria-pressed="true"]::before,
.t-word--bt[aria-pressed="true"]::before,
.t-word--wt[aria-checked="true"]::before,
.t-word--pf[aria-checked="true"]::before,
.t-word--bt[aria-checked="true"]::before {
	opacity: 1;
}

/* ---------- Anmeldung ---------- */

.t-login-body {
	min-height: 100vh;
	background: var(--ink);
	color: var(--on-ink);
	display: grid;
	place-items: center;
	padding: 32px 16px;
}

.t-login {
	width: min(420px, 100%);
}

.t-login__brand {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 48px;
}

.t-login__kicker {
	color: var(--on-ink-muted);
	font-weight: 600;
}

.t-login__title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(48px, 12vw, 72px);
	line-height: 0.95;
	letter-spacing: -0.01em;
	margin: 0 0 12px;
}

.t-login__lead {
	color: var(--on-ink-muted);
	margin: 0 0 32px;
	max-width: 32ch;
}

.t-login__form {
	display: grid;
	gap: 18px;
}

.t-login .t-field > span {
	color: var(--on-ink-muted);
}

.t-login .t-field input {
	background: var(--ink-2);
	border-color: var(--ink-line);
	color: var(--on-ink);
}

/* Passwortfeld mit Auge (assets/js/passwort-auge.js) */
.t-pass {
	position: relative;
	display: block;
}

.t-field .t-pass input {
	padding-right: 48px;
}

.t-pass__auge {
	position: absolute;
	top: 50%;
	right: 4px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	transform: translateY(-50%);
}

.t-login .t-pass__auge {
	color: var(--on-ink-muted);
}

.t-pass__auge:hover,
.t-pass__auge[aria-pressed="true"] {
	color: var(--wt);
}

.t-pass__auge:focus-visible {
	outline: none;
	box-shadow: var(--focus);
}

.t-login__error {
	border-left: 3px solid var(--wt);
	padding: 8px 0 8px 14px;
	margin: 0 0 24px;
	color: #fff;
}

.t-login__setup {
	display: grid;
	gap: 14px;
	margin: 0 0 32px;
	padding: 18px 20px;
	border: 1px solid var(--ink-line);
	border-left: 3px solid var(--wt);
	border-radius: var(--radius);
	background: var(--ink-2);
}

.t-login__setup p {
	margin: 0;
	color: var(--on-ink-muted);
}

.t-login__setup strong {
	color: var(--on-ink);
}

.t-login__note {
	border-left: 3px solid var(--wt);
	padding: 8px 0 8px 14px;
	margin: 0 0 24px;
	color: var(--on-ink);
}

.t-login__hint {
	color: var(--on-ink-muted);
	font-size: 14px;
	margin-top: 28px;
}

/* ---------- App-Rahmen ---------- */

.t-app {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.t-loading {
	padding: 48px 24px;
	color: var(--muted);
}

.t-loading-line {
	position: absolute;
	top: 12px;
	left: 50%;
	z-index: 15;
	transform: translateX(-50%);
	margin: 0;
	padding: 8px 16px;
	border-radius: var(--radius);
	background: var(--ink);
	color: var(--on-ink);
	font-size: 14px;
	font-weight: 600;
}

.t-top {
	background: var(--ink);
	color: var(--on-ink);
	padding: 14px 24px 0;
	position: sticky;
	top: 0;
	z-index: 30;
}

.t-top__row {
	display: flex;
	align-items: center;
	gap: 16px 28px;
	flex-wrap: wrap;
}

.t-top__row + .t-top__row {
	margin-top: 10px;
}

.t-top__brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: inherit;
	text-decoration: none;
	margin-right: auto;
}

.t-top__title {
	font-weight: 600;
	color: var(--on-ink-muted);
}

.t-top .t-words {
	color: var(--on-ink);
}

.t-top .t-btn--ghost {
	color: var(--on-ink);
}

.t-top .t-btn--ghost:hover {
	background: var(--ink-2);
}

.t-top__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.t-badge-count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: var(--wt);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.t-date-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
	padding: 18px 0 16px;
}

.t-date {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(30px, 4.4vw, 52px);
	line-height: 1;
	letter-spacing: -0.01em;
	margin: 0;
	min-width: 0;
}

.t-date small {
	display: block;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 500;
	color: var(--on-ink-muted);
	letter-spacing: 0;
	margin-top: 8px;
}

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

.t-nav .t-btn {
	background: transparent;
	border-color: var(--ink-line);
	color: var(--on-ink);
}

.t-nav .t-btn:hover {
	border-color: var(--on-ink-muted);
}

.t-nav .t-btn--primary {
	background: var(--wt);
	border-color: var(--wt);
}

.t-nav__sep {
	width: 1px;
	height: 28px;
	background: var(--ink-line);
	margin: 0 8px;
}

.t-views .t-word {
	min-height: 40px;
}

/* Filterleiste */
.t-filters {
	display: flex;
	align-items: center;
	gap: 10px 22px;
	flex-wrap: wrap;
	padding: 10px 24px;
	background: var(--card);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: var(--top-h, 0);
	z-index: 20;
}

.t-filters .t-input {
	min-height: 38px;
	width: auto;
	max-width: 100%;
	padding: 6px 10px;
}

.t-filters__search {
	min-width: 200px;
	flex: 1 1 200px;
	max-width: 320px;
}

.t-filters__stand {
	margin-left: auto;
	color: var(--faint);
	font-size: 13px;
}

.t-main {
	flex: 1;
	min-width: 0;
	position: relative;
}

/* ---------- Kalenderraster (Woche, Tag) ---------- */

.t-grid-wrap {
	overflow: auto;
	max-height: calc(100dvh - var(--sticky-head, 0px));
	padding: 0 24px 24px;
	overscroll-behavior: contain;
}

.t-grid {
	display: grid;
	grid-template-columns: var(--axis) repeat(var(--cols), minmax(var(--col-min, 140px), 1fr));
	min-width: calc(var(--axis) + var(--cols) * var(--col-min, 140px));
}

.t-grid__head {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--paper);
	padding: 14px 8px 10px;
	border-bottom: 1px solid var(--line);
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.t-grid__head--axis {
	padding: 0;
}

.t-grid__head button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: baseline;
	gap: 8px;
	text-align: left;
}

.t-grid__day {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 22px;
	line-height: 1;
}

.t-grid__wd {
	color: var(--muted);
	font-weight: 600;
}

.t-grid__head.is-today .t-grid__day,
.t-grid__head.is-today .t-grid__wd {
	color: var(--wt-ink);
}

.t-grid__load {
	width: 100%;
	font-size: 12px;
	color: var(--faint);
	display: flex;
	gap: 10px;
}

.t-grid__load .is-full {
	color: var(--danger);
	font-weight: 700;
}

/* Feiertag: online nicht buchbar, das Team darf eintragen */
.t-grid__feiertag {
	width: 100%;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
}

.t-axis {
	position: relative;
	border-right: 1px solid var(--line);
}

.t-axis span {
	position: absolute;
	right: 8px;
	transform: translateY(-50%);
}

.t-axis span:first-child {
	transform: translateY(2px);
	font-size: 12px;
	color: var(--faint);
	font-variant-numeric: tabular-nums;
}

.t-col {
	position: relative;
	border-right: 1px solid var(--line);
	background-image: linear-gradient(var(--line) 1px, transparent 1px);
	background-size: 100% var(--hour);
	cursor: copy;
}

.t-col.is-today {
	background-color: color-mix(in srgb, var(--wt) 4%, transparent);
}

.t-col__open {
	position: absolute;
	left: 0;
	right: 0;
	background: var(--card);
	pointer-events: none;
}


.t-col__lines {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(var(--line) 1px, transparent 1px);
	background-size: 100% var(--hour);
	pointer-events: none;
}

.t-now {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--now);
	z-index: 4;
	pointer-events: none;
}

.t-now::before {
	content: "";
	position: absolute;
	left: -5px;
	top: -4px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--now);
}

.t-block {
	position: absolute;
	left: 0;
	right: 0;
	z-index: 2;
	background: repeating-linear-gradient(135deg, transparent 0 7px, var(--hatch) 7px 8px);
	border-top: 1px solid var(--hatch);
	border-bottom: 1px solid var(--hatch);
	padding: 4px 8px;
	font-size: 12px;
	color: var(--muted);
	overflow: hidden;
	cursor: pointer;
}

.t-block strong {
	background: var(--paper);
	padding: 0 4px;
	font-weight: 600;
}

.t-ev {
	position: absolute;
	z-index: 3;
	display: block;
	width: auto;
	padding: 5px 8px 5px 10px;
	border: 0;
	border-left: 3px solid var(--wt);
	border-radius: 0 var(--radius) var(--radius) 0;
	background: var(--wt-tint);
	color: var(--text);
	text-align: left;
	font-size: 13px;
	line-height: 1.3;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow 0.15s, transform 0.15s;
}

.t-ev:hover {
	box-shadow: 0 2px 10px rgb(0 0 0 / 12%);
	z-index: 5;
}

.t-ev--pf {
	border-left-color: var(--pf);
	background: var(--pf-tint);
}

.t-ev--bt {
	border-left-color: var(--bt);
	background: var(--bt-tint);
}

.t-ev__time {
	display: block;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.t-ev__name {
	display: block;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.t-ev__what {
	display: block;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.t-ev.is-cancelled {
	opacity: 0.6;
	background: transparent;
	border-left-style: dashed;
}

.t-ev.is-cancelled .t-ev__name {
	text-decoration: line-through;
}

.t-ev.is-past:not(.is-cancelled) {
	opacity: 0.72;
}

.t-ev.is-selected {
	box-shadow: 0 0 0 2px var(--text);
}

/* ---------- Liste ---------- */

.t-list {
	padding: 8px 24px 48px;
	max-width: 1180px;
}

.t-list__day {
	margin-top: 28px;
}

.t-list__date {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 24px;
	margin: 0 0 8px;
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.t-list__date small {
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 500;
	color: var(--faint);
}

.t-row {
	display: grid;
	grid-template-columns: 112px 110px minmax(160px, 1.2fr) minmax(160px, 1.5fr) minmax(120px, 0.8fr);
	gap: 4px 18px;
	align-items: baseline;
	width: 100%;
	padding: 12px 0 12px 14px;
	border: 0;
	border-top: 1px solid var(--line);
	border-left: 3px solid var(--wt);
	background: none;
	text-align: left;
	cursor: pointer;
}

.t-row--pf {
	border-left-color: var(--pf);
}

.t-row--bt {
	border-left-color: var(--bt);
}

.t-row:hover {
	background: var(--card);
}

.t-row__time {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.t-row__where {
	color: var(--muted);
}

.t-row__name {
	font-weight: 700;
}

/* Absprache im Team: Sprechblase mit Zahl der Nachrichten (team-chat.js) */
.t-chatmark {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-left: 6px;
	color: var(--text);
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	vertical-align: 1px;
}

.t-chatmark svg {
	width: 13px;
	height: 13px;
}

/* Nicht da (Urlaubskalender): unter dem Tag im Raster und in der Liste */
.t-grid__weg {
	width: 100%;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.t-list__weg {
	margin: -4px 0 10px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 600;
}

.t-row__what {
	color: var(--text);
}

.t-row__meta {
	color: var(--muted);
	font-size: 14px;
}

.t-row.is-cancelled {
	opacity: 0.6;
	border-left-style: dashed;
}

.t-row.is-cancelled .t-row__name {
	text-decoration: line-through;
}

.t-empty {
	padding: 56px 24px;
	max-width: 560px;
}

.t-empty h2 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 28px;
	margin: 0 0 8px;
}

.t-empty p {
	color: var(--muted);
	margin: 0 0 20px;
}

/* ---------- Detail (Seitenblatt) ---------- */

.t-sheet {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(460px, 100%);
	background: var(--card);
	border-left: 1px solid var(--line);
	box-shadow: -12px 0 40px rgb(0 0 0 / 10%);
	z-index: 50;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.22s ease;
}

.t-sheet.is-open {
	transform: none;
}

.t-sheet__head {
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--line);
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6px 12px;
	border-top: 4px solid var(--wt);
}

.t-sheet--pf .t-sheet__head {
	border-top-color: var(--pf);
}

.t-sheet--bt .t-sheet__head {
	border-top-color: var(--bt);
}

.t-sheet__kind {
	font-weight: 600;
	color: var(--wt-ink);
}

.t-sheet--pf .t-sheet__kind {
	color: var(--pf-ink);
}

.t-sheet--bt .t-sheet__kind {
	color: var(--bt-ink);
}

.t-sheet__title {
	grid-column: 1 / -1;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 28px;
	line-height: 1.1;
	margin: 0;
	overflow-wrap: anywhere;
}

.t-sheet__when {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.t-sheet__status {
	grid-column: 1 / -1;
	margin: 4px 0 0;
	color: var(--danger);
	font-weight: 600;
}

.t-sheet__body {
	flex: 1;
	overflow-y: auto;
	padding: 4px 24px 24px;
}

.t-sheet__foot {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding: 14px 24px;
	border-top: 1px solid var(--line);
}

.t-dl {
	display: grid;
	grid-template-columns: 128px 1fr;
	gap: 0;
	margin: 0;
}

.t-dl dt,
.t-dl dd {
	padding: 11px 0;
	border-bottom: 1px solid var(--line);
	margin: 0;
}

.t-dl dt {
	color: var(--muted);
	font-size: 14px;
	font-weight: 600;
}

.t-dl dd {
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.t-dl a {
	color: inherit;
	font-weight: 600;
}

.t-dl__hinweis {
	display: block;
	margin-top: 2px;
	color: var(--muted);
	font-size: 14px;
}

/* Nordsee Edition aus dem Konfigurator: kleines Bild, Name, Code, Links. */
.t-konfig {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	white-space: normal;
}

.t-konfig__bild {
	flex: none;
	width: 96px;
	height: auto;
	border-radius: 8px;
	background: var(--fog);
}

.t-konfig__text {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.t-konfig__code {
	color: var(--muted);
	font-size: 14px;
	letter-spacing: 0.04em;
}

.t-konfig__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 4px;
	font-size: 14px;
}

.t-profile {
	margin: 0;
	white-space: pre-line;
}

.t-raw {
	margin-top: 8px;
}

.t-raw summary {
	cursor: pointer;
	color: var(--muted);
	font-size: 14px;
}

.t-raw pre {
	font-size: 12px;
	white-space: pre-wrap;
	background: var(--fog);
	padding: 10px;
	border-radius: var(--radius);
	max-height: 240px;
	overflow: auto;
}

.t-section {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
}

.t-section h3 {
	margin: 0 0 12px;
	font-size: 16px;
}

.t-stack {
	display: grid;
	gap: 14px;
}

.t-row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

/* Freie Zeiten */
.t-times {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.t-time-btn {
	min-width: 68px;
	min-height: 40px;
	padding: 6px 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	cursor: pointer;
}

.t-time-btn:hover {
	border-color: var(--text);
}

.t-time-btn[aria-pressed="true"] {
	background: var(--text);
	border-color: var(--text);
	color: var(--card);
}

.t-hint {
	color: var(--muted);
	font-size: 14px;
	margin: 0;
}

.t-notice {
	padding: 10px 14px;
	border-left: 3px solid var(--ok);
	background: color-mix(in srgb, var(--ok) 8%, transparent);
	margin: 0 0 14px;
}

.t-notice--warn {
	border-left-color: var(--wt);
	background: color-mix(in srgb, var(--wt) 8%, transparent);
}

.t-notice--error {
	border-left-color: var(--danger);
	background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.t-notice ul {
	margin: 6px 0 0;
	padding-left: 18px;
}

/* ---------- Dialoge ---------- */

.t-dialog {
	width: min(640px, calc(100% - 24px));
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--card);
	color: var(--text);
	box-shadow: 0 24px 80px rgb(0 0 0 / 30%);
}

.t-dialog::backdrop {
	background: rgb(18 18 18 / 55%);
}

.t-dialog--wide {
	width: min(980px, calc(100% - 24px));
}

.t-dialog form,
.t-dialog__inner {
	display: flex;
	flex-direction: column;
	max-height: calc(100dvh - 32px);
}

.t-dialog__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 14px;
	border-bottom: 1px solid var(--line);
}

.t-dialog__title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 28px;
	line-height: 1.1;
	margin: 0;
}

.t-dialog__body {
	padding: 18px 24px 24px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

.t-dialog__foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	padding: 14px 24px;
	border-top: 1px solid var(--line);
	background: var(--card);
}

.t-close {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--fog);
	cursor: pointer;
	display: grid;
	place-items: center;
	flex: none;
}

.t-close svg {
	width: 18px;
	height: 18px;
}

.t-fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	min-width: 0;
}

.t-fieldset .t-words {
	color: var(--text);
}

.t-checks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 4px 18px;
}

/* Anfragen */
.t-requests {
	display: grid;
	gap: 0;
}

.t-request {
	padding: 16px 0;
	border-top: 1px solid var(--line);
	display: grid;
	gap: 6px;
}

.t-request__head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	align-items: baseline;
}

.t-request__title {
	font-weight: 700;
}

.t-request__meta {
	color: var(--muted);
	font-size: 14px;
}

.t-request__text {
	white-space: pre-line;
	margin: 0;
}

.t-request__actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}

.t-request.is-done {
	opacity: 0.6;
}

/* Einstellungen */
.t-settings {
	padding: 8px 24px 64px;
	max-width: 1180px;
}

.t-settings__tabs {
	margin: 18px 0 8px;
	font-size: 18px;
}

.t-settings h2 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 30px;
	margin: 28px 0 6px;
}

.t-settings h3 {
	font-size: 18px;
	margin: 0 0 10px;
}

.t-settings > .t-hint {
	max-width: 70ch;
}

.t-panel {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 20px 22px;
	margin-top: 18px;
}

.t-panel__row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 22px;
	align-items: flex-end;
	margin-bottom: 14px;
}

.t-panel__row .t-field {
	width: auto;
	min-width: 140px;
}

.t-week {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.t-week th,
.t-week td {
	padding: 6px 8px 6px 0;
	text-align: left;
	border-top: 1px solid var(--line);
	vertical-align: middle;
}

.t-week thead th {
	border-top: 0;
	color: var(--muted);
	font-weight: 600;
}

.t-week input[type="time"],
.t-week input[type="number"] {
	min-height: 38px;
	padding: 4px 8px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--card);
	font-variant-numeric: tabular-nums;
}

.t-week input[type="number"] {
	width: 76px;
}

.t-week .t-dash {
	padding: 0 4px;
	color: var(--faint);
}

.t-staff {
	position: relative; /* hält die unsichtbare Spaltenbeschriftung (.t-sr) im eigenen Scrollbereich */
	width: 100%;
	border-collapse: collapse;
}

.t-staff th,
.t-staff td {
	padding: 10px 10px 10px 0;
	text-align: left;
	border-top: 1px solid var(--line);
	vertical-align: middle;
}

.t-staff thead th {
	border-top: 0;
	color: var(--muted);
	font-size: 14px;
}

.t-password {
	font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
	font-size: 20px;
	letter-spacing: 0.04em;
	padding: 12px 14px;
	background: var(--fog);
	border-radius: var(--radius);
	user-select: all;
}

/* Meldung unten */
.t-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 20px);
	opacity: 0;
	background: var(--ink);
	color: var(--on-ink);
	padding: 12px 18px;
	border-radius: var(--radius);
	z-index: 80;
	max-width: calc(100% - 32px);
	transition: opacity 0.2s, transform 0.2s;
	pointer-events: none;
}

.t-toast.is-shown {
	opacity: 1;
	transform: translate(-50%, 0);
}

.t-toast--error {
	background: var(--danger);
	color: #fff;
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 900px) {

	.t-top {
		padding: 12px 16px 0;
		position: static;
	}

	.t-filters {
		padding: 10px 16px;
		position: static;
	}

	.t-grid-wrap {
		padding: 0 16px 24px;
		max-height: 80dvh;
	}

	.t-list,
	.t-settings {
		padding-left: 16px;
		padding-right: 16px;
	}

	.t-row {
		grid-template-columns: auto 1fr;
		gap: 2px 12px;
		padding-right: 8px;
	}

	.t-row__name,
	.t-row__what,
	.t-row__meta {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {

	.t-top__title,
	.t-nav__sep,
	.t-btn__label {
		display: none;
	}

	.t-top .t-btn--ghost {
		padding: 8px 10px;
	}

	.t-top .t-words[aria-label="Filiale"] {
		order: 3;
		flex: 1 0 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 2px 16px;
		scrollbar-width: none;
	}

	.t-top__row:first-child {
		flex-wrap: wrap;
	}

	.t-list__date {
		flex-wrap: wrap;
		font-size: 22px;
	}

	.t-date-row {
		align-items: flex-start;
	}

	.t-row2 {
		grid-template-columns: 1fr;
	}

	.t-dl {
		grid-template-columns: 1fr;
	}

	.t-dl dt {
		border-bottom: 0;
		padding-bottom: 0;
	}

	.t-dl dd {
		padding-top: 2px;
	}

	.t-dialog {
		width: 100%;
		max-height: 100dvh;
		height: 100dvh;
		border-radius: 0;
	}

	.t-dialog form,
	.t-dialog__inner {
		max-height: 100dvh;
		height: 100%;
	}

	.t-dialog__body {
		flex: 1;
	}

	.t-filters__search {
		max-width: none;
	}

	.t-week {
		display: block;
		overflow-x: auto;
	}
}

/* Niedrige Fenster (Laptop 1366×650, Tablet quer 1024×768): Kopf und Filter kleben nicht mit – mit allen Knöpfen
   nähmen sie sonst über die Hälfte der Höhe ein und für Kalender und Liste bliebe kaum Platz. Wie bei schmalen
   Bildschirmen; die Rasterhöhe rechnet team-dashboard.js selbst nach (--top-h/--sticky-head = 0). */
@media (min-width: 901px) and (max-height: 780px) {

	#t-app > .t-top,
	#t-app > .t-filters {
		position: static;
	}
}

/* Touch (Handy, Tablet am Tresen): Tippziele mindestens 40 px hoch */
@media (pointer: coarse) {

	.t-btn--small,
	.t-top__brand,
	.t-grid__head button,
	.t-check {
		min-height: 40px;
	}

	.t-top__brand,
	.t-grid__head button,
	.t-word {
		min-width: 40px;
	}

	.t-check {
		align-items: center;
	}

	.t-link,
	.t-raw summary {
		padding-block: 10px;
	}

	.t-dl a,
	.t-request a[href^="tel:"],
	.t-request a[href^="mailto:"] {
		display: inline-block;
		padding-block: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

@media print {

	.t-top,
	.t-filters,
	.t-sheet,
	.t-toast {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 12px;
	}

	.t-row {
		break-inside: avoid;
	}

	.t-list {
		padding: 0;
	}
}

/* Filialen eines Zugangs (Mein Zugang, Teamzugänge) */
.t-places {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
	min-height: 44px;
}

.t-places .t-check {
	align-items: center;
}

/* Kästchen, nicht Eingabefeld (.t-field input) */
.t-places input {
	width: 20px;
	min-height: 0;
	height: 20px;
	margin: 0;
	padding: 0;
}

.t-staff .t-places {
	min-width: 220px;
}

/* Rolle: Auswahl so breit wie ihr Text – in der Tabellenzelle schrumpfte sie sonst auf ~30 px */
.t-staff select.t-input {
	width: auto;
}

/* Zurück-Knopf vor dem Logo: ein Schritt zurück bzw. zur Website */
.t-top .t-back {
	margin-left: -10px;
	color: var(--on-ink-muted);
}

.t-top .t-back:hover {
	color: var(--on-ink);
}

/* ---------- Teamzugänge: Benutzername ändern, Bereiche, News & Chat (User 16.11.2026) ---------- */

.t-linkbtn {
	margin-left: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.t-linkbtn:hover,
.t-linkbtn:focus-visible {
	color: var(--text);
}

.t-news-rechte {
	flex-direction: column;
	align-items: flex-start;
}

/* Hinweis beim Öffnen: News, die bestätigt werden müssen. */
.t-news-offen {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--line);
}

.t-news-offen li {
	border-bottom: 1px solid var(--line);
}

.t-news-offen a {
	display: block;
	padding: 12px 0;
	color: var(--text);
	font-weight: 600;
	text-decoration: none;
}

.t-news-offen a:hover {
	color: var(--wt-ink);
}
