/* btn-group: restore right border-radius on last visible button when buttons are hidden via d-none */
.btn-group > .btn:not(.d-none):not(:has(~ .btn:not(.d-none))) {
    border-top-right-radius: var(--bs-btn-border-radius) !important;
    border-bottom-right-radius: var(--bs-btn-border-radius) !important;
}

.secondary-primary:hover {
	background-color: var(--bs-primary);
}

/* gleicher Hintergrund wie die dunklere Zeile einer .table-striped (siehe .table-dark in bootstrap.css) */
.bg-table-nodata {
	background-color: rgba(var(--bs-emphasis-color-rgb), 0.05);
}

[data-bs-theme="dark"] .bg-table-nodata {
	background-color: #2c3034;
}

.cursor-pointer {
	cursor: pointer;
}

.btn-check:checked + .btn-check-toggle-danger {
	background-color: var(--bs-danger);
	border-color: var(--bs-danger);
	color: #fff;
}

.btn-check:checked + .btn-check-toggle-warning {
	background-color: var(--bs-warning);
	border-color: var(--bs-warning);
	color: #000;
}

.div-lg-row {
	height: 58px;
	line-height: 35px;
}

.btn-lg-row {
	height: 58px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-timer {
	width: 80px;
	height: 80px;
	border-radius: 40px;
	font-size: 35px;
}

.btn-menu {
	min-width: 80px;
}

.form-floating>.form-select {
	line-height: 1.35;
}

.text-nowrap {
	white-space: nowrap;
}

.vh-75 {
	height: 75vh !important;
}

.vh-90 {
	height: 90vh !important;
}

.ql-toolbar.ql-snow {
	border: none;
	padding: 0 0 .25rem 0 !important;
}

.ql-editor {
	border: none;
	padding: 0;
	/* floating media ("image left, text right") stays inside the text box */
	display: flow-root;
}

.ql-container.ql-snow {
	border: none;
}

.rp-function-icon {
	display: inline-block;
	width: 48px;
	height: 48px;
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	background-color: #000000;
}

.input_background {
	background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .rp-function-icon {
	background-color: #ffffff;
}

/* ============================================================
   Layout-Redesign — Design Tokens
   ============================================================ */

:root {
	/* Menu section colors — fixed, mandator-independent */
	--menu-section-blue-bg: #e8f0fe;
	--menu-section-blue-icon: #1a73e8;
	--menu-section-green-bg: #e6f4ea;
	--menu-section-green-icon: #1e8e3e;
	--menu-section-indigo-bg: #ece9fe;
	--menu-section-indigo-icon: #5a4bd1;
	--menu-section-orange-bg: #fef0e6;
	--menu-section-orange-icon: #d56e2f;
	--menu-section-yellow-bg: #fff7d6;
	--menu-section-yellow-icon: #c39200;
	--menu-section-gray-bg: #eef0f3;
	--menu-section-gray-icon: #5a6470;
	--menu-section-red-bg: #fde8e8;
	--menu-section-red-icon: #c0392b;
	--menu-section-teal-bg: #d4f0ee;
	--menu-section-teal-icon: #0d8d80;
	--menu-section-pink-bg: #fde8f4;
	--menu-section-pink-icon: #c0277a;
	--menu-section-lime-bg: #f0fae6;
	--menu-section-lime-icon: #5a8a00;
	--menu-section-cyan-bg: #e0f7fa;
	--menu-section-cyan-icon: #0097a7;

	/* Layout */
	--app-rail-width: 82px;
	--tab-bar-height: 64px;

	/* App-Rail palette — fixed (mandator-independent), dark in both themes */
	--app-rail-bg: #1e2531;
	--app-rail-icon: #f6f7f9;
	--app-rail-hover: #2a3142;

	/* Surfaces */
	--surface-soft: #f6f7f9;
	--surface-card: #ffffff;
	--surface-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
}

[data-bs-theme="dark"] {
	--menu-section-blue-bg: #1c2638;
	--menu-section-blue-icon: #7ab0ff;
	--menu-section-green-bg: #1c2e22;
	--menu-section-green-icon: #6ed28a;
	--menu-section-indigo-bg: #25223a;
	--menu-section-indigo-icon: #a397f5;
	--menu-section-orange-bg: #2f231a;
	--menu-section-orange-icon: #f0a36c;
	--menu-section-yellow-bg: #2e2a12;
	--menu-section-yellow-icon: #e6c75a;
	--menu-section-gray-bg: #20242b;
	--menu-section-gray-icon: #aab3bf;
	--menu-section-red-bg: #3a1f1f;
	--menu-section-red-icon: #f08585;
	--menu-section-teal-bg: #162e2c;
	--menu-section-teal-icon: #5fd6ca;
	--menu-section-pink-bg: #38182e;
	--menu-section-pink-icon: #f590c8;
	--menu-section-lime-bg: #1e2a10;
	--menu-section-lime-icon: #a8d44f;
	--menu-section-cyan-bg: #102a2e;
	--menu-section-cyan-icon: #4dd9e8;

	--surface-soft: #0f1115;
	--surface-card: #181b21;
	--surface-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .3);
}

/* ============================================================
   App-Rail (≥md)
   ============================================================ */

.app-rail {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--app-rail-width);
	padding: .75rem .5rem;
	z-index: 1050;
	background: var(--app-rail-bg);
	color: var(--app-rail-icon);
	border-right: 1px solid rgba(0, 0, 0, .12);
}

.app-rail .btn,
.app-rail__item {
	color: var(--app-rail-icon);
	background: transparent;
	border-color: transparent;
}

.app-rail .btn:hover,
.app-rail__item:hover {
	color: var(--app-rail-icon);
	background: var(--app-rail-hover);
}

/* Offcanvas main menu + account menu start to the right of the rail (md+) and float with margin */
@media (min-width: 768px) {

	body.has-app-rail #mainMenu.offcanvas-start,
	body.has-app-rail #accountMenu.offcanvas-start {
		top: 10px;
		bottom: 10px;
		left: calc(var(--app-rail-width) + 10px);
		height: auto;
		border-radius: .75rem;
		border-right: 0;
		box-shadow: var(--surface-shadow);
	}

	body.has-app-rail .offcanvas-backdrop {
		left: var(--app-rail-width);
	}

	/* Bootstrap modals span the full viewport by default, so a centered
	   .modal-dialog centers over the rail too - visually shifted from the
	   actual content area. Constrain the overlay to the content area instead,
	   same idea as the offcanvas/tab-bar rail offsets above. */
	body.has-app-rail .modal {
		left: var(--app-rail-width);
		width: calc(100% - var(--app-rail-width));
	}
}

.app-rail__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
}

.app-rail__item {
	width: 48px;
	height: 48px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.app-rail__avatar {
	display: inline-block;
}

.app-rail__menuitem {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 48px;
	min-height: 48px;
	margin-top: .5rem;
	padding: .25rem;
	border-radius: .5rem;
	text-decoration: none;
	background: var(--menu-tile-bg, var(--menu-section-gray-bg));
	color: var(--menu-tile-icon, var(--menu-section-gray-icon));
	font-size: 1.1rem;
	transition: transform .1s ease;
}

.app-rail__menuitem:hover {
	transform: translateY(-1px);
	color: var(--menu-tile-icon, var(--menu-section-gray-icon));
}

/* Rail items: monochrome (no section colours), icon slightly larger than main-menu tiles (1.875rem) */
.app-rail .app-rail__menuitem {
	--menu-tile-bg: transparent;
	--menu-tile-icon: var(--app-rail-icon);
	font-size: 1.5rem;
}

.app-rail .app-rail__menuitem:hover {
	--menu-tile-bg: var(--app-rail-hover);
}

.app-rail__menuitem:has(.app-rail__menuitem-label) {
	min-height: 52px;
}

.app-rail__menuitem-badge {
	font-size: .6rem;
	min-width: 1.1rem;
	padding: .2em .35em;
}

.app-rail__menuitem-img {
	max-width: 28px;
	max-height: 28px;
	object-fit: contain;
}

.app-rail__menuitem-label {
	display: block;
	margin-top: .15rem;
	max-width: 44px;
	font-size: .55rem;
	line-height: 1;
	color: var(--app-rail-icon);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.app-rail__badge {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-top: .5rem;
	font-size: 1.1rem;
	text-decoration: none;
}

.app-rail__badge:hover {
	background: var(--app-rail-hover);
	border-radius: .5rem;
}

.app-rail__envtag {
	margin-top: .75rem;
	font-size: .7rem;
}

/* Body padding so content does not slide under the rail */
@media (min-width: 768px) {
	body.has-app-rail {
		padding-left: var(--app-rail-width);
	}
}

/* ============================================================
   Hauptmenü — Section Cards + Tile Grid
   ============================================================ */

.menu-section {
	margin-bottom: 1.25rem;
}

.menu-section__title {
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--bs-secondary-color);
	margin: 0 0 .5rem 0;
	padding: 0 .25rem;
}

.menu-section__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .5rem;
}

.menu-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: .75rem .25rem;
	border-radius: .75rem;
	background: var(--menu-tile-bg, var(--menu-section-gray-bg));
	color: var(--menu-tile-icon, var(--menu-section-gray-icon));
	text-decoration: none;
	text-align: center;
	min-height: 80px;
	transition: transform .1s ease, box-shadow .1s ease;
}

.menu-tile:hover {
	transform: translateY(-1px);
	box-shadow: var(--surface-shadow);
	color: var(--menu-tile-icon, var(--menu-section-gray-icon));
}

.menu-tile__icon {
	font-size: 1.875rem;
	margin-bottom: .4rem;
}

.menu-tile__icon--img {
	width: 30px;
	height: 30px;
	object-fit: contain;
}

.menu-tile__label {
	font-size: .75rem;
	line-height: 1.1;
	color: var(--menu-tile-icon, var(--menu-section-gray-icon));
	word-break: break-word;
}

/* Section color variants — each writes the two CSS vars the tile reads */
.menu-section--blue {
	--menu-tile-bg: var(--menu-section-blue-bg);
	--menu-tile-icon: var(--menu-section-blue-icon);
}

.menu-section--green {
	--menu-tile-bg: var(--menu-section-green-bg);
	--menu-tile-icon: var(--menu-section-green-icon);
}

.menu-section--indigo {
	--menu-tile-bg: var(--menu-section-indigo-bg);
	--menu-tile-icon: var(--menu-section-indigo-icon);
}

.menu-section--orange {
	--menu-tile-bg: var(--menu-section-orange-bg);
	--menu-tile-icon: var(--menu-section-orange-icon);
}

.menu-section--yellow {
	--menu-tile-bg: var(--menu-section-yellow-bg);
	--menu-tile-icon: var(--menu-section-yellow-icon);
}

.menu-section--gray {
	--menu-tile-bg: var(--menu-section-gray-bg);
	--menu-tile-icon: var(--menu-section-gray-icon);
}

.menu-section--red {
	--menu-tile-bg: var(--menu-section-red-bg);
	--menu-tile-icon: var(--menu-section-red-icon);
}

.menu-section--teal {
	--menu-tile-bg: var(--menu-section-teal-bg);
	--menu-tile-icon: var(--menu-section-teal-icon);
}

.menu-section--pink {
	--menu-tile-bg: var(--menu-section-pink-bg);
	--menu-tile-icon: var(--menu-section-pink-icon);
}

.menu-section--lime {
	--menu-tile-bg: var(--menu-section-lime-bg);
	--menu-tile-icon: var(--menu-section-lime-icon);
}

.menu-section--cyan {
	--menu-tile-bg: var(--menu-section-cyan-bg);
	--menu-tile-icon: var(--menu-section-cyan-icon);
}

.menu-section--primary {
	--menu-tile-bg: rgba(var(--bs-primary-rgb), .1);
	--menu-tile-icon: var(--bs-primary);
}

/* Tile color variants — same vars as section, applied directly to a single tile.
   Used for the „Mein Menu" section where each tile keeps its origin color. */
.menu-tile--blue {
	--menu-tile-bg: var(--menu-section-blue-bg);
	--menu-tile-icon: var(--menu-section-blue-icon);
}

.menu-tile--green {
	--menu-tile-bg: var(--menu-section-green-bg);
	--menu-tile-icon: var(--menu-section-green-icon);
}

.menu-tile--indigo {
	--menu-tile-bg: var(--menu-section-indigo-bg);
	--menu-tile-icon: var(--menu-section-indigo-icon);
}

.menu-tile--orange {
	--menu-tile-bg: var(--menu-section-orange-bg);
	--menu-tile-icon: var(--menu-section-orange-icon);
}

.menu-tile--yellow {
	--menu-tile-bg: var(--menu-section-yellow-bg);
	--menu-tile-icon: var(--menu-section-yellow-icon);
}

.menu-tile--gray {
	--menu-tile-bg: var(--menu-section-gray-bg);
	--menu-tile-icon: var(--menu-section-gray-icon);
}

.menu-tile--red {
	--menu-tile-bg: var(--menu-section-red-bg);
	--menu-tile-icon: var(--menu-section-red-icon);
}

.menu-tile--teal {
	--menu-tile-bg: var(--menu-section-teal-bg);
	--menu-tile-icon: var(--menu-section-teal-icon);
}

.menu-tile--pink {
	--menu-tile-bg: var(--menu-section-pink-bg);
	--menu-tile-icon: var(--menu-section-pink-icon);
}

.menu-tile--lime {
	--menu-tile-bg: var(--menu-section-lime-bg);
	--menu-tile-icon: var(--menu-section-lime-icon);
}

.menu-tile--cyan {
	--menu-tile-bg: var(--menu-section-cyan-bg);
	--menu-tile-icon: var(--menu-section-cyan-icon);
}

/* ============================================================
   RapidOrder Weather – day summary card
   Same blue tokens as .menu-tile--blue, applied directly since
   this card has no other color variants.
   ============================================================ */

.weather-day-summary {
	background: var(--menu-section-blue-bg);
	color: var(--menu-section-blue-icon);
}

.weather-day-summary__muted {
	color: var(--menu-section-blue-icon);
	opacity: .7;
}

.weather-day-summary__icon {
	display: block;
	width: 90px;
	height: 90px;
	margin: 0 auto;
	background-color: var(--menu-section-blue-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* ============================================================
   Bottom Tab-Bar
   ============================================================ */

.tab-bar {
	position: fixed;
	left: 50%;
	bottom: 1rem;
	transform: translateX(-50%);
	z-index: 1020;
	background: var(--surface-card);
	border-radius: 1rem;
	box-shadow: var(--surface-shadow);
	padding: .35rem .5rem;
	max-width: calc(100% - 1rem);
}

@media (min-width: 768px) {
	body.has-app-rail .tab-bar:not(.tab-bar--left):not(.tab-bar--right) {
		left: calc(50% + (var(--app-rail-width) / 2));
	}
}

.tab-bar--top {
	bottom: auto;
	top: 1rem;
}

.tab-bar--top .tab-bar__item.is-active .tab-bar__link::after {
	bottom: auto;
	top: 0;
}

.tab-bar--left {
	left: 1rem;
	transform: none;
}

.tab-bar--right {
	right: 1rem;
	left: auto;
	transform: none;
}

.tab-bar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
	gap: .25rem;
}

.tab-bar__item {
	display: flex;
	width: 72px;
	flex-shrink: 0;
}

.tab-bar__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: .4rem .5rem;
	border-radius: 1.5rem;
	text-decoration: none;
	color: var(--bs-secondary-color);
	font-size: .8rem;
	line-height: 1.1;
	width: 100%;
	transition: color .1s ease, background-color .1s ease;
}

.tab-bar__link i {
	font-size: 1.1rem;
	margin-bottom: .2rem;
}

.tab-bar__link:hover {
	color: var(--bs-body-color);
}

.tab-bar__item.is-active .tab-bar__link {
	color: var(--bs-primary);
}

.tab-bar__item.is-active .tab-bar__link::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 25%;
	right: 25%;
	height: 2px;
	border-radius: 2px;
	background: var(--bs-primary);
}

/* Filter toggle as first tab-bar entry; header toggle is replaced by it (md+) */
.tab-bar__item--filter {
	width: 44px;
	margin-right: .25rem;
	padding-right: .25rem;
	border-right: 1px solid var(--bs-border-color);
}

.tab-bar__item--filter .tab-bar__link i {
	margin-bottom: 0;
	font-size: 1.25rem;
}

@media (min-width: 768px) {
	body:has(.tab-bar__filter) .rp-filter-toggle-header {
		display: none;
	}
}

.tab-bar__label {
	font-size: .75rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.tab-bar__transform {
	transform: translate(-110%, -30%) !important;
	z-index: 1;
}

.table_header_sort_icon {
	font-size: .75rem;
	margin-left: .25rem;
	color: rgba(var(--bs-emphasis-color-rgb), 0.05);
}

.table_header_row {
	height: 4rem;
}

@keyframes rp-scan-1 { 0%, 24.9% { opacity: 1; } 25%, 100%  { opacity: 0; } }
@keyframes rp-scan-2 { 0%, 24.9% { opacity: 0; } 25%, 49.9% { opacity: 1; } 50%, 100%  { opacity: 0; } }
@keyframes rp-scan-3 { 0%, 49.9% { opacity: 0; } 50%, 74.9% { opacity: 1; } 75%, 100%  { opacity: 0; } }
@keyframes rp-scan-4 { 0%, 74.9% { opacity: 0; } 75%, 100%  { opacity: 1; } }
.rp-scan-1 { animation: rp-scan-1 2s linear infinite; }
.rp-scan-2 { animation: rp-scan-2 2s linear infinite; }
.rp-scan-3 { animation: rp-scan-3 2s linear infinite; }
.rp-scan-4 { animation: rp-scan-4 2s linear infinite; }
.rp-scan-icon { position: relative; display: inline-block; width: 1em; height: 1em; vertical-align: middle; margin-right: .35em; }

body.pb-5 {
	padding-bottom: calc(var(--tab-bar-height) + 1.5rem) !important;
}

body:has(.tab-bar--top) {
	padding-bottom: 0 !important;
}

/* ============================================================
   Content Surface
   ============================================================ */

body {
	background: var(--surface-soft);
}

.card {
	border-radius: .75rem;
	border-color: rgba(0, 0, 0, .06);
	box-shadow: var(--surface-shadow);
}

[data-bs-theme="dark"] .card {
	border-color: rgba(255, 255, 255, .08);
	background: var(--surface-card);
}

/* ============================================================
   Punch Tabs
   ============================================================ */

.punch-tabs {
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.punch-tabs::-webkit-scrollbar {
	display: none;
}

.punch-tabs .nav-link {
	white-space: nowrap;
}

.punch-tabs .nav-link:not(.active) {
	background-color: var(--bs-body-bg);
	border: 1px solid var(--bs-border-color);
	color: var(--bs-body-color);
}

.punch-tabs .nav-link.active {
	background-color: var(--bs-primary);
	color: #fff;
	border-color: var(--bs-primary) !important;
	font-weight: 700 !important;
}

/* ============================================================
   RapidOrder Wizard — Progress bar + row layout
   ============================================================ */

.rp-wizard-progress-item {
	flex: 1;
	position: relative;
	text-align: center;
}

.rp-wizard-progress-connector {
	position: absolute;
	top: 28px;
	height: 4px;
	background-color: var(--bs-secondary-bg, #e9ecef);
	z-index: 0;
}

.rp-wizard-progress-connector-done {
	background-color: var(--bs-primary, #0d6efd);
}

.rp-wizard-progress-connector-left { left: 0; right: 50%; }
.rp-wizard-progress-connector-right { left: 50%; right: 0; }

.rp-wizard-progress-item:first-child .rp-wizard-progress-connector-left,
.rp-wizard-progress-item:last-child .rp-wizard-progress-connector-right {
	background-color: transparent !important;
}

.rp-wizard-progress-circle {
	position: relative;
	z-index: 1;
	width: 56px;
	height: 56px;
	line-height: 56px;
	border-radius: 50%;
	margin: 0 auto;
	background-color: var(--bs-secondary-bg, #e9ecef);
	color: var(--bs-secondary-color, #6c757d);
	font-size: 1.4rem;
}

.rp-wizard-progress-circle-active {
	background-color: var(--bs-primary, #0d6efd);
	color: #fff;
}

.rp-wizard-progress-label {
	margin-top: .5rem;
	font-size: .8rem;
	color: var(--bs-secondary-color, #6c757d);
}

.rp-wizard-progress-label-active {
	color: var(--bs-primary, #0d6efd);
	font-weight: 600;
}

/* Tische/Funktionen steps — sizes the per-row delete button to match the
   height of a form-floating input/select so it lines up instead of
   looking undersized next to the fields. */
.wizard-table-row .wizard-remove-row,
.wizard-function-row .wizard-remove-row {
	width: 2.5rem;
	height: calc(3.5rem + 2px);
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
}

/* RapidOrder release form — matches the artifactUrl download button to the
   height of the form-floating input next to it. */
.rp-release-artifact-download {
	height: calc(3.5rem + 2px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.wizard-table-row:last-of-type > div:last-child,
.wizard-function-row:last-of-type > div:last-child {
	display: none;
}

/* Profil step — the watch field stacks below the rooms below lg; its own
   my-3 bottom margin then just adds unwanted trailing space under the
   position box, so drop it below lg (kept from lg up). */
@media (max-width: 991.98px) {
	.rp-profile-watch-col {
		margin-bottom: 0 !important;
	}
}

/* Funktionen step — the icon-select field's own my-3 top margin duplicates
   the mt-0 already set on its row siblings (image preview, delete button)
   below lg, so drop it there too (kept from lg up). */
@media (max-width: 991.98px) {
	.rp-function-image-col {
		margin-top: 0 !important;
	}
}

/* Geräte step — the API key is one unbreakable token; without this it
   overflows the flex container (and the page) below the lg breakpoint. */
@media (max-width: 991.98px) {
	#rp-api-key-code {
		min-width: 0;
		overflow-wrap: break-word;
		word-break: break-all;
	}
}

/* Geräte step — the button GUID column shrinks to col-auto below lg, but
   .form-control forces width:100% on the input, and plain "width:auto"
   falls back to the browser's default text-input width (~20 characters),
   which is often wider than the previous 50/50 column split on phones. Size
   it explicitly from the GUID's actual character count (set as --rp-guid-ch
   via inline style) so it's exactly as narrow as the content needs. */
@media (max-width: 991.98px) {
	.rp-guid-input {
		/* form-floating's .form-control padding is 1rem .75rem, so the box
		   needs +1.5rem beyond the character count or the value's tail gets
		   clipped/scrolled out of view. */
		width: calc(var(--rp-guid-ch, 20) * 1ch + 1.5rem);
		min-width: 0;
	}
}

/* Geräte step — back/skip/next nav buttons render as btn-sm below lg,
   btn-lg from lg up, by overriding the CSS vars .btn-lg sets. */
@media (max-width: 991.98px) {
	.rp-wizard-nav-btn {
		--bs-btn-padding-y: 0.25rem;
		--bs-btn-padding-x: 0.5rem;
		--bs-btn-font-size: 0.875rem;
		--bs-btn-border-radius: var(--bs-border-radius-sm);
	}
}

/* cancelCall dialog — buttons render as btn-lg below lg (bigger tap targets
   on phones/tablets), back to the default .btn size from lg up, by
   overriding the CSS vars .btn-lg sets. */
@media (min-width: 992px) {
	.rp-cancel-call-btn {
		--bs-btn-padding-y: 0.375rem;
		--bs-btn-padding-x: 0.75rem;
		--bs-btn-font-size: 1rem;
		--bs-btn-border-radius: var(--bs-border-radius);
	}
}

/* Profil step — the delete button is a direct flex sibling of the
   position's bordered box (see _profilePositionRow.html.twig) and
   stretches to match its full height, which varies with the number of
   rooms — a fixed height like the rule above wouldn't fit here. */
.wizard-position-row > .wizard-remove-row {
	width: 2.5rem;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
}

/* Funktionen step — the Code display and the Icon preview aren't
   form-floating fields, so without an explicit height they end up
   shorter than the Typ/Name/Icon inputs and drift out of alignment
   under the row's align-items-end. */
.rp-function-code-col {
	height: calc(3.5rem + 2px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	border: var(--bs-border-width) solid var(--bs-border-color);
}

.rp-function-icon-preview-col {
	height: calc(3.5rem + 2px);
	display: flex;
	align-items: center;
}

/* ============================================================
   RapidOrder Cockpit — Display grid + Kellner walk/run icons
   ============================================================ */

.rp-display-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 0.5rem;
}

.rp-display-card {
	border: 2px solid var(--rp-status-color, #6c757d);
	/* Tint derives from the same --rp-status-color the border uses, so the
	   server-rendered inline value (see _displayCards.html.twig) already
	   paints the correct background before any JS runs. */
	background-color: color-mix(in srgb, var(--rp-status-color, #6c757d) 10%, transparent);
	font-size: 0.85rem;
}

.rp-display-card.rp-display-critical {
	animation: rp-display-border-blink 1s steps(1) infinite;
}

@keyframes rp-display-border-blink {
	0%, 49% { border-color: var(--rp-status-color); }
	50%, 100% { border-color: transparent; }
}

@keyframes rp-walk { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes rp-run  { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }
.rp-off-body-walk { animation: rp-walk 0.5s steps(1) infinite; }
.rp-off-body-run  { animation: rp-run  0.5s steps(1) infinite; }

/* ============================================================
   RapidOrder Auswertung — Stats KPI cards + charts
   ============================================================ */

.kpi-card { min-height: 100px; }
.chart-container { height: 350px; }

/* ============================================================
   Account — Mein Menü (drag & drop item selection)
   ============================================================ */

.myMenu-scroll {
	max-height: calc(100dvh - 320px);
	min-height: 200px;
	overflow-y: auto;
}
.myMenu-thumb {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: .5rem;
	background: var(--menu-tile-bg, var(--menu-section-gray-bg));
	color: var(--menu-tile-icon, var(--menu-section-gray-icon));
	font-size: 1.1rem;
	flex-shrink: 0;
}
#myMenuSelected .list-group-item.ui-sortable-helper {
	background: var(--bs-body-bg);
	box-shadow: var(--surface-shadow);
}
@media (max-width: 767.98px) {
	.myMenu-panel-hidden {
		display: none !important;
	}
	.myMenu-scroll {
		max-height: calc(100dvh - 220px);
	}
	#myMenuColAvailable .card-header,
	#myMenuColSelected .card-header {
		display: none !important;
	}
	#myMenuColAvailable .card,
	#myMenuColSelected .card {
		border-radius: 0 !important;
	}
}
/* Message boxes: the outline button of a warning box. The plain warning yellow is unreadable on the subtle yellow background of alert-warning, so text and border use the emphasis color of the box. */
.alert-warning .btn-outline-warning {
	--bs-btn-color: var(--bs-warning-text-emphasis);
	--bs-btn-border-color: var(--bs-warning-text-emphasis);
	--bs-btn-hover-color: var(--bs-warning-bg-subtle);
	--bs-btn-hover-bg: var(--bs-warning-text-emphasis);
	--bs-btn-hover-border-color: var(--bs-warning-text-emphasis);
	--bs-btn-active-color: var(--bs-warning-bg-subtle);
	--bs-btn-active-bg: var(--bs-warning-text-emphasis);
	--bs-btn-active-border-color: var(--bs-warning-text-emphasis);
}

/* Rich text (Quill): images always have rounded corners, like Bootstrap's .rounded. Applies to the editor and to the
   display (includes/quillContent.html.twig), both use .ql-editor. */
.ql-editor img {
	border-radius: var(--bs-border-radius);
}

/* Rich text (Quill): uploaded videos are <video> elements (not Quill's iframe, so .ql-video does not apply). They
   are at most as wide as the text, the height follows the aspect ratio of the video. */
.ql-editor video {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--bs-border-radius);
}

/* Rich text (Quill): image or video at the left or at the right, the text flows around it (layout templates of the
   editor, classes of FloatImageBlot/FloatVideoBlot and their right variants in templates/form/editor.html.twig). On
   small screens it is above the text. */
.ql-editor img.ql-float-image-left,
.ql-editor video.ql-float-video-left {
	float: left;
	max-width: 40%;
	height: auto;
	margin: 0 1rem .5rem 0;
}

.ql-editor img.ql-float-image-right,
.ql-editor video.ql-float-video-right {
	float: right;
	max-width: 40%;
	height: auto;
	margin: 0 0 .5rem 1rem;
}

@media (max-width: 575.98px) {
	.ql-editor img.ql-float-image-left,
	.ql-editor video.ql-float-video-left,
	.ql-editor img.ql-float-image-right,
	.ql-editor video.ql-float-video-right {
		float: none;
		max-width: 100%;
		margin: 0 0 .5rem 0;
	}
}

/* Rich text (Quill): an uploaded PDF shown inside of the text (PdfBlot, iframe). It is as wide as the text. */
.ql-editor iframe.ql-pdf-inline {
	display: block;
	width: 100%;
	height: 600px;
	border: 0;
	border-radius: var(--bs-border-radius);
	background-color: var(--bs-secondary-bg);
}

@media (max-width: 575.98px) {
	.ql-editor iframe.ql-pdf-inline {
		height: 70vh;
	}
}

/* Rich text (Quill): while editing, a click on an image, video or PDF selects it as a whole (templates/form/editor.html.twig)
   and the class ql-embed-selected marks it. A click inside of an iframe never reaches the page, so in the editor
   (.ql-container) the PDF does not take pointer events; the displayed text is not inside of .ql-container. */
.ql-editor img.ql-embed-selected,
.ql-editor video.ql-embed-selected,
.ql-editor iframe.ql-embed-selected {
	outline: 3px solid var(--bs-primary);
	outline-offset: 2px;
}

.ql-container .ql-editor iframe.ql-pdf-inline {
	pointer-events: none;
}

/* Rich text (Quill): dropdown of the layout templates (templates/form/editor.html.twig). Quill's stylesheet only labels
   the header, font and size pickers, so the caption (data-caption of the label) and the entries (data-label) are set
   here. The first option of the select is the "nothing chosen" state and no entry. */
.ql-snow .ql-picker.ql-template {
	width: 98px;
}
.ql-snow .ql-picker.ql-template .ql-picker-label::before {
	content: attr(data-caption);
}
.ql-snow .ql-picker.ql-template .ql-picker-item::before {
	content: attr(data-label);
}
.ql-snow .ql-picker.ql-template .ql-picker-item:not([data-value]) {
	display: none;
}

/* Rich text (Quill): additional fonts of the font picker. The names are the whitelist in templates/form/editor.html.twig.
   .ql-font-<name> formats the text (editor and display), the ::before rules label the picker entries. */
.ql-font-georgia {
	font-family: Georgia, serif;
}
.ql-font-times {
	font-family: "Times New Roman", Times, serif;
}
.ql-font-verdana {
	font-family: Verdana, Geneva, sans-serif;
}
.ql-font-trebuchet {
	font-family: "Trebuchet MS", sans-serif;
}
.ql-font-courier {
	font-family: "Courier New", Courier, monospace;
}
.ql-picker.ql-font .ql-picker-label[data-value=georgia]::before,
.ql-picker.ql-font .ql-picker-item[data-value=georgia]::before {
	content: 'Georgia';
	font-family: Georgia, serif;
}
.ql-picker.ql-font .ql-picker-label[data-value=times]::before,
.ql-picker.ql-font .ql-picker-item[data-value=times]::before {
	content: 'Times';
	font-family: "Times New Roman", Times, serif;
}
.ql-picker.ql-font .ql-picker-label[data-value=verdana]::before,
.ql-picker.ql-font .ql-picker-item[data-value=verdana]::before {
	content: 'Verdana';
	font-family: Verdana, Geneva, sans-serif;
}
.ql-picker.ql-font .ql-picker-label[data-value=trebuchet]::before,
.ql-picker.ql-font .ql-picker-item[data-value=trebuchet]::before {
	content: 'Trebuchet';
	font-family: "Trebuchet MS", sans-serif;
}
.ql-picker.ql-font .ql-picker-label[data-value=courier]::before,
.ql-picker.ql-font .ql-picker-item[data-value=courier]::before {
	content: 'Courier';
	font-family: "Courier New", Courier, monospace;
}
