/*****
** Symbole: Bootstrap Icons (lib/css/bootstrap-icons), als <i class="bi bi-…" aria-hidden="true">
*****/

.bi {
	margin: 0 0.125rem;
	font-size: 1rem;
	line-height: 1;
	color: var(--app-primary);
}

.btn .bi, .nav-link .bi, .dropdown-item .bi {
	color: inherit;
}

a:hover .bi {
	color: var(--app-primary-darker);
}

/* Zustände eines Symbols (z. B. Mahnstufen): vorgemerkt/nicht ausgeführt bzw. nicht verfügbar */
.inactive, .bi.inactive, a:hover .bi.inactive, table.overview td .bi.inactive {
	color: #adb5bd;
}

.deactivated, .bi.deactivated, a:hover .bi.deactivated, table.overview td .bi.deactivated {
	color: #dee2e6;
}

/*****
** Common
*****/
.clear {
	clear: both;
}

.hide {
	display: none;
}

.floatL {
	float: left;
}

.floatR {
	float: right !important;
}

.left {
	text-align: left !important;
}

.right {
	text-align: right !important;
}

.center {
	text-align: center !important;
}

.top {
	vertical-align: top;
}

.bottom {
	vertical-align: bottom;
}

.nowrap {
	white-space: nowrap;
}

.bold {
	font-weight: bold;
}

.italic {
	font-style: italic;
}

.noBorder {
	border: none !important;
}

.noBg {
	background: none !important;
}

.noMargin {
	margin: 0 !important;
}

.noPadding {
	padding: 0 !important;
}

.small {
	font-size: 0.8125rem;
	line-height: 10px;
	margin: 0;
	padding: 0;
}

.gray {
	color: gray;
}

.warning {
	color: #cd0a0a;
}

.success {
	color: #138800;
}

.cGray {
	color: gray !important;
}

.cGreen {
	color: #138800 !important;
}

.cRed {
	color: #cd0a0a !important;
}

.code {
	font-family: "Courier New", Monaco, Courier;
}

.blue {
	color: #0D3763 !important;
}

textarea {
	line-height: 20px;
	resize: none;
}

/*****
** jQuery UI im Aussehen von Bootstrap (Reiter, Dialoge, Kalender, Vorschlagslisten)
*****/
.ui-widget, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
	font-family: inherit;
	font-size: inherit;
}

.ui-widget-content {
	color: var(--bs-body-color);
}

/* Knöpfe behalten in jQuery-UI-Bereichen ihre eigene Schriftfarbe */
.ui-widget-content a.btn {
	color: var(--bs-btn-color);
}

.ui-widget-content a.btn:hover {
	color: var(--bs-btn-hover-color);
}

.ui-widget-content a:not(.btn) {
	color: var(--bs-link-color);
}

.ui-widget-content table.overview th a {
	color: inherit;
}

/* Menüeinträge behalten in jQuery-UI-Bereichen die Menüfarben */
.ui-widget-content a.dropdown-item {
	color: var(--bs-dropdown-link-color);
}

.ui-widget-content a.dropdown-item:hover, .ui-widget-content a.dropdown-item:focus {
	color: var(--bs-dropdown-link-hover-color);
	text-decoration: none;
}

.btn-outline-danger .bi {
	color: inherit;
}

/* Reiter: weiße Leiste, der aktive Reiter trägt Akzentfarbe und eine Linie darunter */
.ui-tabs, .ui-tabs.ui-widget.ui-widget-content {
	clear: both;
	margin-top: 0;
	padding: 0;
	border: 0;
	background: none;
}

.ui-tabs .ui-tabs-nav, .ui-tabs .ui-tabs-nav.ui-widget-header {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.25rem;
	width: fit-content;
	max-width: 100%;
	padding: 0 0.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	scrollbar-width: thin;
}

.ui-tabs .ui-tabs-nav li, .ui-tabs .ui-tabs-nav li.ui-state-default {
	flex: 0 0 auto;
	float: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: none;
	white-space: nowrap;
}

.ui-tabs .ui-tabs-nav li:hover {
	border-bottom-color: #ced4da;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active, .ui-tabs .ui-tabs-nav li.ui-tabs-active:hover {
	border-bottom-color: var(--app-primary);
}

.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
	padding: 0.75rem 0.75rem calc(0.75rem - 3px) 0.75rem;
	font-weight: 500;
	color: #495057;
}

.ui-tabs .ui-tabs-nav li:hover .ui-tabs-anchor {
	color: #212529;
	text-decoration: none;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
	font-weight: 600;
	color: var(--app-primary);
}

.ui-tabs .ui-tabs-nav li.ui-state-focus .ui-tabs-anchor:focus-visible {
	outline: 2px solid var(--app-primary);
	outline-offset: -2px;
	border-radius: var(--bs-border-radius);
}

.ui-tabs .ui-tabs-panel {
	padding: 1.5rem 0 0 0;
	background: none;
}

/* Dialoge wie modal */
.ui-dialog {
	padding: 0;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ui-dialog .ui-dialog-titlebar {
	padding: 0.75rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--bs-border-color);
	border-radius: 0;
	background: none;
	font-size: 1.125rem;
	font-weight: 600;
}

.ui-dialog .ui-dialog-titlebar-close {
	right: 0.75rem;
	border: 0;
	background: none;
}

.ui-dialog .ui-dialog-content {
	padding: 1rem;
}

.ui-dialog .ui-dialog-buttonpane {
	margin: 0;
	padding: 0.75rem 1rem;
	border-top: 1px solid var(--bs-border-color);
	background: none;
}

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
	display: flex;
	gap: 0.5rem;
	float: right;
}

.ui-dialog .ui-dialog-buttonpane button {
	margin: 0;
}

.ui-widget-overlay {
	background: #000;
	opacity: 0.5;
}

/* über der mitlaufenden Kopfzeile (z-index 1020) */
.ui-widget-overlay.ui-front {
	z-index: 1050;
}

.ui-dialog.ui-front {
	z-index: 1055;
}

/* Kalender */
.ui-datepicker {
	width: 16rem;
	padding: 0.5rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	font-size: 0.875rem;
}

.ui-datepicker .ui-datepicker-header {
	padding: 0.25rem 0;
	border: 0;
	background: none;
	font-weight: 600;
}

.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
	top: 0.25rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: var(--bs-border-radius);
	background: none;
	cursor: pointer;
}

.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover {
	background: #e6f0f4;
}

.ui-datepicker th {
	padding: 0.25rem 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #6c757d;
}

.ui-datepicker td {
	padding: 0;
}

.ui-datepicker td .ui-state-default {
	display: block;
	width: 2rem;
	height: 2rem;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: var(--bs-border-radius);
	background: none;
	line-height: 2rem;
	text-align: center;
	color: var(--bs-body-color);
}

.ui-datepicker td .ui-state-hover {
	background: #e6f0f4;
}

.ui-datepicker td .ui-state-highlight {
	box-shadow: inset 0 0 0 1px var(--app-primary);
}

.ui-datepicker td .ui-state-active {
	background: var(--app-primary);
	color: #fff;
}

/* Auslöser des Kalenders: Symbolknopf in Feldhöhe direkt am Datumsfeld */
button.ui-datepicker-trigger {
	width: 2.375rem;
	height: 2.375rem;
	margin-left: -1px;
	padding: 0;
	border: 1px solid var(--bs-border-color);
	border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z'/%3E%3C/svg%3E") center no-repeat;
	font-size: 0;
	vertical-align: top;
	cursor: pointer;
}

button.ui-datepicker-trigger:hover {
	background-color: #e6f0f4;
}

.form-control.datePicker, .form-control.dateRange {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	vertical-align: top;
}

/* Vorschlagslisten wie dropdown-menu */
.ui-autocomplete {
	max-height: 24rem;
	padding: 0.25rem 0;
	overflow-x: hidden;
	overflow-y: auto;
	border: 1px solid var(--bs-border-color-translucent);
	border-radius: var(--bs-border-radius);
	background: #fff;
	box-shadow: var(--bs-box-shadow);
	z-index: 1060;
}

.ui-autocomplete .ui-menu-item-wrapper {
	padding: 0.35rem 0.75rem;
}

.ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
	margin: 0;
	border: 0;
	background: var(--app-primary);
	color: #fff;
}

.ui-autocomplete-category {
	padding: 0.5rem 0.75rem 0.15rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--bs-secondary-color);
}

/*****
** Farbwelt und Grundeinstellungen (Bootstrap 5)
*****/
:root {
	--app-primary: #006a8e;
	--app-primary-dark: #00587a;
	--app-primary-darker: #004a66;
	--app-accent: #0a88ad;
	--bs-primary: #006a8e;
	--bs-primary-rgb: 0, 106, 142;
	--bs-link-color: #00607f;
	--bs-link-color-rgb: 0, 96, 127;
	--bs-link-hover-color: #004a66;
	--bs-link-hover-color-rgb: 0, 74, 102;
	--bs-body-font-size: 0.875rem;
	--bs-focus-ring-color: rgba(10, 136, 173, 0.25);
}

.btn-primary {
	--bs-btn-bg: var(--app-primary);
	--bs-btn-border-color: var(--app-primary);
	--bs-btn-hover-bg: var(--app-primary-dark);
	--bs-btn-hover-border-color: var(--app-primary-dark);
	--bs-btn-active-bg: var(--app-primary-darker);
	--bs-btn-active-border-color: var(--app-primary-darker);
	--bs-btn-disabled-bg: var(--app-primary);
	--bs-btn-disabled-border-color: var(--app-primary);
	--bs-btn-focus-shadow-rgb: 10, 136, 173;
}

.btn-outline-primary {
	--bs-btn-color: var(--app-primary);
	--bs-btn-border-color: var(--app-primary);
	--bs-btn-hover-bg: var(--app-primary);
	--bs-btn-hover-border-color: var(--app-primary);
	--bs-btn-active-bg: var(--app-primary-dark);
	--bs-btn-active-border-color: var(--app-primary-dark);
	--bs-btn-focus-shadow-rgb: 10, 136, 173;
}

/* R1/R6: Felder und Knöpfe in Inhaltsschrift (14 px) bei 38 px Höhe */
.form-control, .form-select {
	min-height: 2.375rem;
	font-size: 0.875rem;
}

.btn {
	--bs-btn-font-size: 0.875rem;
	--bs-btn-padding-y: 0.46875rem;
}

.btn-sm {
	--bs-btn-font-size: 0.875rem;
	--bs-btn-padding-y: 0.28125rem;
	--bs-btn-border-radius: var(--bs-border-radius);
}

.form-select-sm {
	min-height: 2rem;
	padding-top: 0.28125rem;
	padding-bottom: 0.28125rem;
	border-radius: var(--bs-border-radius);
}

/* Symbolknopf im Seitenkopf: quadratisch in Knopfhöhe */
.btnEdit.btn-outline-danger {
	width: 2.375rem;
	padding-right: 0;
	padding-left: 0;
}

/* 24 px zwischen Hauptbereichen (R2) */
#views.card, .overviewCard {
	margin-bottom: 1.5rem !important;
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
	border-color: var(--app-accent);
	box-shadow: 0 0 0 0.25rem rgba(10, 136, 173, 0.25);
}

.form-check-input:checked {
	background-color: var(--app-primary);
	border-color: var(--app-primary);
}

.dropdown-item.active, .dropdown-item:active {
	background-color: var(--app-primary);
}

/*****
** Seitenrahmen
*****/
body {
	min-height: 100vh;
	background-color: #f4f6f8;
}

/* Verweise im Inhalt ohne Unterstreichung, wie in Menü und Tabellen */
.app-main a:not(.btn) {
	text-decoration: none;
}

.app-main a:not(.btn):hover {
	text-decoration: underline;
}

.app-navbar {
	min-height: 3.5rem;
	background: var(--app-primary);
}

/* R5/R7: Karten mit 8 px Radius, 1 px Rahmen, ohne Schatten */
.card-header {
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 600;
}

.card-header.bulkCnt {
	font-weight: 400;
}

.card {
	--bs-card-border-radius: 0.5rem;
	--bs-card-inner-border-radius: calc(0.5rem - 1px);
	--bs-card-border-color: #dee2e6;
	--bs-card-cap-bg: #f8f9fa;
	--bs-card-spacer-y: 1rem;
	--bs-card-spacer-x: 1rem;
	--bs-card-cap-padding-y: 0.75rem;
	--bs-card-cap-padding-x: 1rem;
}

.app-navbar .nav-link {
	color: rgba(255, 255, 255, 0.9);
}

.app-navbar .nav-link:hover, .app-navbar .nav-link:focus {
	color: #fff;
}

#mainSearch {
	max-width: 32rem;
}

.app-sidebar {
	flex: 0 0 14rem;
	width: 14rem;
	min-height: calc(100vh - 3.5rem);
	padding: 1rem 0.5rem;
	background: #fff;
	border-right: 1px solid var(--bs-border-color);
}

.app-main {
	min-width: 0;
	padding: 1rem 1.5rem 2rem 1.5rem;
}

.app-footer {
	clear: both;
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid #dee2e6;
	font-size: 0.8125rem;
	color: var(--bs-secondary-color);
}

.app-footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

#shortcodes {
	cursor: pointer;
}

#ajaxLoading {
	display: none;
	position: fixed;
	top: 0;
	left: 50%;
	z-index: 2000;
	padding: 0.25rem 1rem;
	transform: translateX(-50%);
	border-radius: 0 0 0.375rem 0.375rem;
	background: var(--bs-warning);
	font-size: 0.8125rem;
}

/*****
** Navigation
*****/
#navigation, #navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#navigation > li {
	position: relative;
	margin-bottom: 0.125rem;
}

#navigation a {
	display: block;
	padding: 0.35rem 0.75rem;
	border-radius: 0.375rem;
	color: var(--bs-body-color);
	text-decoration: none;
}

#navigation > li > a {
	font-weight: 500;
}

#navigation ul {
	padding: 0 0 0.25rem 0.75rem;
}

#navigation ul a {
	padding: 0.2rem 0.75rem;
	font-size: 0.8125rem;
	color: var(--bs-secondary-color);
}

#navigation a:hover {
	background: var(--bs-tertiary-bg);
}

#navigation a.active {
	background: #e6f0f4;
	color: var(--app-primary);
	font-weight: 600;
}

#navigation li.sub > ul {
	display: none;
}

/* Umschalter zum Auf- und Zuklappen (fügt lib/js/app.js ein) */
#navigation a.arrow {
	position: absolute;
	top: 0.15rem;
	right: 0.125rem;
	width: 1.5rem;
	padding: 0.2rem 0;
	font-size: 0;
	text-align: center;
	color: var(--bs-secondary-color);
	cursor: pointer;
}

#navigation a.arrow::before {
	font-family: "bootstrap-icons";
	content: "\f282";
	font-size: 0.75rem;
}

#navigation li.sub > a.arrow::before {
	content: "\f285";
}

.navNotify {
	position: absolute;
	top: 0.3rem;
	right: 1.875rem;
	z-index: 1;
}

#navigation .navNotify a {
	padding: 0 0.45rem;
	border-radius: 10rem;
	background: var(--bs-danger);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.4;
}

/*****
** Überschriften im Inhalt
*****/
.app-main h1 {
	display: flex;
	align-items: center;
	min-height: 2.375rem;
	margin-bottom: 1.5rem;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;
}

.app-main h2 {
	font-size: 1.125rem;
	line-height: 1.5rem;
	font-weight: 600;
}

.app-main h3 {
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 600;
}

/*****
** Breadcrumb, Meldungen
*****/
.breadcrumb {
	font-size: 0.8125rem;
}

.breadcrumb a {
	color: var(--bs-secondary-color);
	text-decoration: none;
}

#notifications .alert {
	margin-bottom: 0.75rem;
}

/*****
** Anmeldung
*****/
body.guest {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.5rem 1rem;
	background: linear-gradient(140deg, #003a54 0%, #00607f 50%, #0a88ad 100%) fixed;
}

body.guest #content {
	width: 100%;
	max-width: 26rem;
}

.login-card {
	border: 0;
	--bs-card-border-radius: 0.5rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.guest-footer {
	margin-top: 1rem;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.7);
}

/*****
** Ansichten und Kategorien
*****/
#views {
	font-size: 0.8125rem;
}

#views > .card-body {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

.viewsTable {
	width: auto;
	margin-bottom: 0.5rem;
}

.viewsTable > tbody > tr > * {
	padding-top: 0.125rem;
	padding-bottom: 0.125rem;
}

.viewsTable th {
	width: 8rem;
	font-weight: 600;
	color: var(--bs-secondary-color);
}

#views .spacing a {
	padding: 0 0.2rem;
}

#views .vHeader {
	display: inline-block;
	min-width: 8rem;
	font-weight: 600;
	color: var(--bs-secondary-color);
}

#showViews {
	margin: 0 0 1rem 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bs-link-color);
	cursor: pointer;
}

#showViews::before {
	font-family: "bootstrap-icons";
	content: "\f285";
	margin-right: 0.25rem;
	font-size: 0.75rem;
}

/*****
** Option pane
*****/
#optPane {
	position: relative;
	z-index: 10;
	float: right;
	margin: 0 0 1rem 0.5rem;
}

#pane {
	padding: 0.46875rem 0.75rem;
	border: 1px solid #6c757d;
	border-radius: var(--bs-border-radius);
	background: none !important;
	font-size: 0;
	color: #6c757d;
	cursor: pointer;
}

#pane::before {
	content: "Spalten";
	font-size: 0.875rem;
	line-height: 1.3125rem;
}

#pane:hover {
	background: #6c757d !important;
	color: #fff;
}

#options {
	display: none;
	position: absolute;
	top: 2.875rem;
	right: 0;
	width: 17rem;
	padding: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	font-size: 0.8125rem;
}

#optPane #sortable {
	margin: 0;
	padding: 0;
	list-style: none;
}

#optPane #sortable li {
	margin: 0;
	padding: 0;
	cursor: move;
}

#rowsPerPage {
	width: 6rem;
}

#myList, #noSort {
	list-style: none;
	margin: 0;
	padding: 0;
}

#myList .btn, #noSort .btn {
	margin-top: 5px !important;
}

.sortGrip, a:hover .sortGrip {
	position: absolute;
	margin: 0.125rem 0 0 0;
	color: #adb5bd;
	cursor: move;
}

/* Pfeil der Sortierrichtung im Tabellenkopf */
.bi.sortDir {
	margin: 0;
	font-size: 0.625rem;
	color: inherit;
}

.red {
	background-color: #ff0000 !important;
}

/* R10: Aktionen des Seitenkopfs stehen rechts neben dem Titel */
.btnAdd, .btnEdit {
	float: right;
	margin: 0 0 0 0.5rem;
}

span.highlight {
	background-color: yellow;
}

/*****
** Formulare
*****/
div.formError {
	color: var(--bs-danger);
	font-weight: 600;
}

div.formError .form-control, div.formError .form-select, .form-control.formError {
	border-color: var(--bs-danger);
}

table.stdForm {
	width: 100%;
	max-width: 54rem;
	margin-top: 0.75rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
}

.stdFormInline {
	display: inline-block;
	width: 30rem !important;
	max-width: 100%;
	margin: 0 1.25rem 1.5rem 0;
	vertical-align: top;
}

#dialog-form table.stdForm {
	margin-top: 0;
	border: 0;
}

table.stdForm > tbody > tr > td, table.stdForm > tbody > tr > th {
	padding: 0.5rem 1rem;
	vertical-align: middle;
}

table.stdForm > tbody > tr:first-child > td, table.stdForm > tbody > tr:first-child > th {
	padding-top: 1rem;
}

table.stdForm > tbody > tr:last-child > td, table.stdForm > tbody > tr:last-child > th {
	padding-bottom: 1rem;
}

table.stdForm > tbody > tr > th {
	width: 12rem;
	font-weight: 500;
	text-align: left;
	vertical-align: top;
}

/* Zeilen mit Eingabefeld: Beschriftung auf Höhe der ersten Feldzeile (in reinen Anzeigezeilen steht sie auf Höhe des Werts) */
table.stdForm > tbody > tr:has(> td .form-control, > td .form-select, > td .htmlEditor) > th {
	padding-top: calc(0.5rem + 0.53125rem);
}

table.stdForm > tbody > tr:first-child:has(> td .form-control, > td .form-select, > td .htmlEditor) > th {
	padding-top: calc(1rem + 0.53125rem);
}

table.stdFormInline td {
	width: 18rem;
}

table.stdForm td.headline, table.stdForm td.headline2 {
	padding-top: 1.5rem;
	background: none;
}

table.stdForm td.headline h3, table.stdForm td.headline2 h3 {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.5rem;
	font-weight: 600;
	color: var(--bs-body-color);
}

/* Detailkarten tragen eine Kartenüberschrift (16/24), keinen Abschnittstitel */
table.stdFormInline td.headline h3, table.stdFormInline td.headline2 h3 {
	font-size: 1rem;
}

/* Menüs heben sich wie andere Überlagerungen durch einen Schatten ab */
.dropdown-menu {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

table.stdForm .form-control, table.stdForm .form-select {
	display: inline-block;
	width: 24rem;
	max-width: 100%;
}

/* Mehrfachauswahl als Liste von Kontrollkästchen */
.checkList {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.checkList .form-check {
	min-height: 0;
	margin: 0;
}

/* Detailkarten (z. B. Kundenansicht): zwei unabhängige Spalten mit 24 px Abstand */
.ui-tabs-panel:has(> table.stdFormInline) {
	max-width: 61.5rem;
}

.ui-tabs-panel > table.stdFormInline {
	display: table;
	float: left;
	clear: left;
	margin: 0 0 1.5rem 0;
}

.ui-tabs-panel > table.stdFormInline:nth-of-type(even) {
	float: right;
	clear: right;
}

table.stdForm textarea.form-control {
	min-height: 5rem;
}

table.stdForm .form-control.datePicker, table.stdForm .form-control.dateRange {
	width: 10rem;
}

table.stdForm .input-group {
	flex-wrap: nowrap;
	width: 24rem;
	max-width: 100%;
}

table.stdForm .input-group > .form-control {
	width: auto;
	min-width: 0;
}

.form-control.datePicker, .form-control.dateRange {
	display: inline-block;
	width: 10rem;
}

.formRequired {
	color: var(--bs-danger);
}

.customDefaults {
	float: right;
}

.collapseForm {
	position: relative;
	max-width: 54rem;
}

.collapseForm .showHideAll {
	position: absolute;
	top: 1rem;
	right: 0.75rem;
	z-index: 1;
}

/*****
** Übersichtstabellen
*****/
.overviewCard {
	overflow: hidden;
}

.overviewCard .table-responsive, .ui-tabs .ui-tabs-nav, .ui-tabs .ui-tabs-nav.ui-widget-header {
	background:
		linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) 0 0 / 2.5rem 100% no-repeat local,
		linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0 / 2.5rem 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 0 / 0.75rem 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 100% 0 / 0.75rem 100% no-repeat scroll;
	scrollbar-width: thin;
}

/* Beträge und Zahlen brechen nicht um, Namensspalten behalten eine lesbare Breite */
table.overview td.right, table.overview th {
	white-space: nowrap;
}

table.overview td[class*="company"], table.overview td[class*="subject"], table.overview td.ovc-title {
	min-width: 12rem;
}

.ui-tabs .ui-tabs-nav, .ui-tabs .ui-tabs-nav.ui-widget-header {
	background-color: #fff;
}

table.overview {
	--bs-table-bg: transparent;
}

table.overview th {
	white-space: nowrap;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bs-secondary-color);
}

table.overview th a {
	color: inherit;
	text-decoration: none;
}

table.overview th a:hover {
	color: var(--app-primary);
}

table.overview > :not(caption) > * > * {
	padding: 0.5rem 0.75rem;
	font-variant-numeric: tabular-nums;
}

table.overview td.right, table.overview td.center {
	white-space: nowrap;
}

/* Filter-Symbole im Kopf zurückhaltend, Aktionssymbole als kompakte Symbolknöpfe */
table.overview th .bi {
	color: #adb5bd;
}

table.overview th a:hover .bi {
	color: var(--app-primary);
}

table.overview td.icon a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--bs-border-radius);
}

table.overview td.icon a:hover {
	background: #e6f0f4;
	text-decoration: none;
}

table.overview td.icon .bi {
	margin: 0;
	color: #6c757d;
}

table.overview td.icon a:hover .bi {
	color: var(--app-primary);
}

table.overview > tbody > tr:last-child > td {
	border-bottom: 0;
}

table.overview a {
	text-decoration: none;
}

table.overview td.icon {
	width: 2rem;
	padding-right: 0;
	padding-left: 0.25rem;
}

table.overview tr.checked > td {
	--bs-table-bg-state: #e6f0f4;
	background-color: #e6f0f4;
}

/* Bezeichnung vor einer Summe unter der Liste */
table.overview .totalOverview {
	display: block;
	position: relative;
}

/* steht links neben dem Betrag in der (leeren) Nachbarzelle und verbreitert die Betragsspalte nicht */
table.overview .totalLabel {
	position: absolute;
	right: 100%;
	margin-right: 1.5rem;
	font-size: 0.8125rem;
	font-weight: 400;
	white-space: nowrap;
	color: #6c757d;
}

table.overview tr.totals > td {
	border-top: 1px solid var(--bs-border-color);
	border-bottom: 0;
	background: var(--bs-tertiary-bg);
}

table.overview .status {
	font-size: 0.75rem;
}

table.overview .status0 { color: #dc3545; }
table.overview .status1 { color: #198754; }
table.overview .status2 { color: #6c757d; }
table.ovoffers .status0 { color: #6c757d; }
table.ovoffers .status1 { color: #dc3545; }
table.ovoffers .status2 { color: #b98511; }
table.ovoffers .status3 { color: #198754; }

div.bulkCnt {
	font-size: 0.8125rem;
}

.splitter {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8125rem;
}

.splitter a {
	padding: 0.15rem 0.5rem;
	border-radius: 0.375rem;
	text-decoration: none;
}

.splitter a:hover {
	background: var(--bs-tertiary-bg);
}

/*****
** Statusmarken
*****/
.labelOverview {
	display: inline-block;
	min-width: 3.75rem;
	padding: 0.125rem 0.5rem;
	border-radius: var(--bs-border-radius);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1rem;
	text-align: center;
	text-transform: lowercase;
	color: #fff !important;
}

.invoice0, .queue0, .offer1, .user1, .mailspool0 { background-color: #dc3545; }
.invoice1, .queue2, .offer3, .sale1, .user0, .mailspool1 { background-color: #198754; }
.invoice2, .offer0, .sale0, .queue1 { background-color: #6c757d; }
.offer2 { background-color: #b98511; }

/* Kommentare und Historie: Karte in Belegbreite, Zeitpunkt und Benutzer ohne Umbruch */
.overviewCard:has(> .table-responsive > table.comments) {
	max-width: 56rem;
}

table.comments {
	width: 100%;
}

table.comments td:first-child, table.comments td:nth-child(3) {
	width: 1%;
	white-space: nowrap;
}

table.comments td:nth-child(2) {
	width: 2.5rem;
}

table.comments td.user {
	width: 5rem;
	padding: 0.35rem;
	font-size: 0.8125rem;
}

.filterBox, .tagBox {
	display: none;
	padding: 0.75rem;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-border-radius);
	background: #fff;
}

.filterBox {
	margin: 0.5rem 0 1rem 0;
}

.filterBox #manualEntry {
	clear: both;
	margin-top: 1rem;
}

.tagBox {
	position: absolute;
	z-index: 9;
	width: 19rem;
	box-shadow: var(--bs-box-shadow);
}

.tagBox .btn {
	float: right;
	margin-top: 0.4rem;
}

.infobrutto {
	margin-left: 0.5rem;
	color: var(--bs-secondary-color);
}

.bruttonetto {
	margin-left: 0.375rem;
}

.bgHighlight {
	color: #936209 !important;
	background-color: #ffffe0 !important;
}

img.loading {
	position: absolute;
	margin: -4px 0 0 -30px;
}

/*****
** Startseite: Kacheln in zwei Spalten
*****/
.startColumn {
	float: left;
	width: calc(50% - 0.75rem);
	min-height: 4rem;
	margin-right: 1.5rem;
}

.startColumn + .startColumn {
	margin-right: 0;
}

.startColumn .portlet, .startColumn .portlet.ui-widget-content {
	margin: 0 0 1.5rem 0;
	overflow: hidden;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
}

.startColumn .portlet-header, .startColumn .portlet-header.ui-widget-header {
	padding: 0.75rem 1rem;
	border: 0;
	border-bottom: 1px solid #dee2e6;
	border-radius: 0;
	background: #f8f9fa;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 600;
	color: var(--bs-body-color);
	cursor: move;
}

.startColumn .portlet-header .ui-icon {
	float: right;
	margin-top: 0.25rem;
	cursor: pointer;
}

.startColumn .portlet-content {
	padding: 1rem;
}

.startColumn .portletHide .portlet-content {
	display: none;
}

.startColumn .portlet table {
	width: 100%;
	margin: 0;
}

.startColumn .portlet table th {
	padding-top: 0;
}

.startColumn .portlet table.static {
	width: 100%;
	margin: 0 0 0.5rem 0;
}

.startColumn .portlet table.static td {
	padding: 0.25rem 0.5rem;
	background: none;
}

.startColumn .ui-sortable-placeholder {
	height: 3rem !important;
	margin-bottom: 1.5rem;
	border: 1px dashed #adb5bd !important;
	border-radius: 0.5rem;
	visibility: visible !important;
}

.startColumn .ui-sortable-placeholder * {
	visibility: hidden;
}

.startColumn .tableAction {
	margin-bottom: 1rem;
}

.startColumn .portlet-content .italic, .startColumn .portlet-content i, .startColumn .portlet-content em {
	font-size: 0.8125rem;
	font-style: normal;
	color: #6c757d;
}

.startColumn .portlet-content .center {
	text-align: left !important;
}

/* Zähler als flache Marke (R4) */
.counter {
	float: left;
	min-width: 3.5rem;
	margin: 0 1rem 0 0;
	padding: 0.25rem 0.75rem;
	border-radius: 0.5rem;
	background: #6c757d;
	color: #fff;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;
	text-align: center;
}

.counterGreen {
	background: #198754;
}

.counterRed {
	background: #dc3545;
}

/*****
** Kommentare (Notizen an Kunden und Belegen)
*****/
.notesList {
	max-width: 56rem;
}

.notesList .note {
	padding: 0.75rem 0;
	border-bottom: 1px solid #dee2e6;
}

.notesList .note .headline {
	font-weight: 600;
}

.notesList .note .headline a {
	float: right;
}

/*****
** Versandpläne: Aktionen als Karten links, Zuordnung rechts
*****/
.sendActionCnt {
	float: left;
	width: 26rem;
	max-width: 45%;
	margin: 0 1.5rem 0 0;
}

.sendActionCnt .sendAction {
	margin: 0 0 1.5rem 0;
	padding: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
}

.sendActionCnt .sendAction p:last-child {
	display: flex;
	gap: 0.5rem;
	margin: 0;
}

.sendAssignments {
	min-width: 0;
	overflow: hidden;
}

.sendAssignments table.stdForm {
	margin-top: 0;
}

/*****
** Belegansicht (Rechnung, Angebot, Auftrag, Lieferschein, Gutschrift, Serienvorlage)
*****/
#invoice {
	padding-left: 0;
}

#documentInterval {
	max-width: 56rem;
	margin: 0 0 1.5rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
}

#documentInterval table {
	width: 100%;
	margin: 0;
	padding: 0;
}

#documentInterval table td {
	text-align: center;
	vertical-align: middle;
}

#documentInterval table td.left, #documentInterval table td.right {
	width: 195px;
}

/* Werkzeugleiste und Beleg: dieselbe Breite, dieselbe Kartenhülle */
#documentOptions, .paperBoxContainer {
	max-width: 56rem;
}

/* Aktionen eines Belegs: Gruppen mit Titel, darunter die Aktionen als Textverweise (kompakt, alles sichtbar) */
#documentOptions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75rem 2.5rem;
	max-width: 56rem;
	margin: 0 0 1.5rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
}

.docToolGroup {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.docToolTitle {
	margin-bottom: 0.125rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.25rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #6c757d;
}

.docToolTitle .bi {
	margin-left: 0;
	font-size: 0.875rem;
	color: inherit;
}

.docToolTitle.deactivated, .docToolTitle.inactive {
	color: #adb5bd;
}

.docToolLink {
	font-size: 0.875rem;
	line-height: 1.375rem;
	white-space: nowrap;
}

.paperBox {
	padding: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
}

/* Positionen: Kopf, Zeilen und Summen teilen sich dieselben Spalten */
#invoice .docTableHead, #invoice .docTableBody, #invoice .docTableFoot {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	font-variant-numeric: tabular-nums;
}

#invoice .docTableHead {
	border-bottom: 1px solid #dee2e6;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #6c757d;
}

#invoice .docTableBody {
	border-bottom: 1px solid #dee2e6;
}

#invoice .docTableFoot {
	background: #f8f9fa;
}

/* Summenzeilen: Bezeichnung nimmt den freien Platz, der Betrag steht in der Spalte "Gesamt" */
#invoice .docTableFoot > div:first-child {
	flex: 1 1 auto;
}

#invoice .docTableFoot > .docCol7 {
	float: none !important;
}

/* Sammelaktion unter den Positionen: Auswahl und Knopf gleich hoch */
#invoice .docTableBody > .form-select {
	width: auto;
	min-height: 2rem;
	padding-top: 0.28125rem;
	padding-bottom: 0.28125rem;
}

#invoice .docTableBody:has(> .form-select) {
	align-items: center;
}

.docCol1 { flex: 0 0 1.5rem; }
.docCol2 { flex: 0 0 4.5rem; }
.docCol3, .docCol36, .docCol37 { flex: 1 1 0; min-width: 0; }
.docCol4, .docCol5, .docCol6 { flex: 0 0 5.5rem; white-space: nowrap; }
.docCol7 { flex: 0 0 7rem; white-space: nowrap; }

.docTableEdit {
	width: 100%;
	max-width: 40rem;
}

.docTableEdit td {
	padding: 0.15rem 0.25rem;
	vertical-align: top;
}

/*****
** HTML-Editor
*****/
#html-textarea {
	height: 300px;
	font-family: Menlo, Consolas, monospace;
}

.htmlEditorToolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.htmlEditorArea {
	min-height: 300px;
	padding: 8px 10px;
	overflow: auto;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: var(--bs-border-radius);
}

.htmlEditorArea:focus {
	border-color: #0a88ad;
	outline: 0;
}

/*****
** Installer (gleicher Rahmen wie die Anmeldung, breitere Karte)
*****/
body.installer #content {
	max-width: 44rem;
}

body.installer h2 {
	margin: 1.5rem 0 1rem 0;
	font-size: 1.125rem;
	line-height: 1.5rem;
}

body.installer .alert {
	margin-bottom: 0.5rem;
	padding: 0.5rem 0.75rem;
}

/* bestandene Prüfungen als ruhige Liste */
.installChecks {
	margin: 1rem 0 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: #6c757d;
}

.installChecks li {
	padding: 0.125rem 0 0.125rem 1.5rem;
	overflow-wrap: anywhere;
}

.installChecks li::before {
	content: "\2713";
	float: left;
	margin-left: -1.5rem;
	font-weight: 700;
	color: #198754;
}

.installAccess {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	margin-bottom: 0.5rem;
	padding: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #f8f9fa;
}

.installAccess span {
	display: block;
	font-size: 0.8125rem;
}

.installAccess code {
	font-size: 1.125rem;
	color: #212529;
}

.installLog {
	margin-top: 1.5rem;
	font-size: 0.8125rem;
	color: #6c757d;
}

.installLog summary {
	cursor: pointer;
}

body.installer h2:first-of-type {
	margin-top: 0;
}

body.installer .errorDetails {
	display: block;
	margin-top: 0.25rem;
	font-family: var(--bs-font-monospace);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

/*****
** Fortschritt beim Versand aus dem Mailspool
*****/
#spool_statusbox {
	width: 20rem;
	margin: 1rem 0;
}

#spool_statustxt {
	position: absolute;
	width: 20rem;
	margin-top: -1.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5rem;
	text-align: center;
	color: #212529;
}

.ui-progressbar, .ui-progressbar.ui-widget-content {
	height: 1.5rem;
	overflow: hidden;
	border: 0;
	border-radius: var(--bs-border-radius);
	background: #e9ecef;
}

.ui-progressbar .ui-progressbar-value {
	margin: 0;
	border: 0;
	background: #9fc9d8 !important;
}

/*****
** Konfiguration: Bereichsliste links, Einstellungen rechts in einer Karte
*****/
#config {
	display: flex;
	max-width: 72rem;
	overflow: hidden;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	background: #fff;
}

#configSections {
	flex: 0 0 14rem;
	margin: 0;
	padding: 0.5rem;
	border-right: 1px solid #dee2e6;
	background: #f8f9fa;
	list-style: none;
}

#configSections li a {
	display: block;
	padding: 0.35rem 0.75rem;
	border-radius: var(--bs-border-radius);
	color: var(--bs-body-color);
	text-decoration: none;
}

#configSections li a:hover {
	background: #e9ecef;
	text-decoration: none;
}

#configSections li a.active {
	background: #e6f0f4;
	color: var(--app-primary);
	font-weight: 600;
}

#configOptions {
	flex: 1 1 auto;
	min-width: 0;
}

#configOptions > p {
	margin: 1rem 1rem 0 1rem;
}

#configOptions table.stdForm {
	margin: 0;
	border: 0;
}

/*****
** Autocomplete
*****/
#searchcustomer {
	margin-bottom: 0.5rem;
}

.app-main h2 + #searchcustomer table.stdForm {
	margin-top: 0;
}

/*****
** Vorschläge der Suche in der Kopfzeile (nach Bereichen gegliedert)
*****/
ul.catcomplete {
	width: 34rem !important;
	max-height: 70vh;
	overflow-y: auto;
}

ul.catcomplete .ui-autocomplete-category {
	display: block;
	margin: 0.5rem 0 0 0;
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #6c757d;
}

ul.catcomplete .ui-menu-item {
	display: block;
	float: none;
	clear: none;
}

ul.catcomplete .ui-menu-item a, ul.catcomplete .ui-menu-item .ui-menu-item-wrapper {
	display: block;
	padding: 0.375rem 0.75rem;
	font-size: 0.875rem;
}

ul.catcomplete .ui-menu-item a.ui-state-active, ul.catcomplete .ui-menu-item a.ui-state-hover, ul.catcomplete .ui-menu-item .ui-menu-item-wrapper.ui-state-active {
	margin: 0;
	border-color: transparent;
	border-radius: 0;
	background: #e6f0f4;
	color: #004a66;
}

/*****
** Statistics
*****/
.statContent {
	position: relative;
	height: 340px;
}

/*****
** Hinweise für den Einstieg (R4: Informationsfläche)
*****/
#introductionHints {
	margin: 0 0 1.5rem 0;
	padding: 1rem;
	border-radius: 0.5rem;
	background: #e6f0f4;
	color: #004a66;
}

#introductionHints h2 {
	margin: 0 0 0.25rem 0;
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 600;
	color: #004a66;
}

#introductionHints div {
	max-width: 48rem;
}

#introductionHints #hideIntroductionHints {
	float: none;
	display: inline-block;
	margin: 0.5rem 0 0 0;
	color: #004a66;
	text-decoration: underline;
}

#hideIntroductionHints {
	float: right;
	margin: 0 0 1rem 0;
	font-size: 0.8125rem;
	color: #6c757d;
}

/*****
** Vorlagen-Editor
*****/
/* Vorlagenlisten als schmale Spalte links, Arbeitsfläche daneben */
.editorLayout {
	display: grid;
	grid-template-columns: 18rem minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}

.editorLists .stdFormInline {
	display: block;
	width: auto !important;
	margin: 0 0 1.5rem 0;
}

.editorLists h2 {
	margin-top: 0;
	font-size: 1rem;
	line-height: 1.5rem;
}

.editorWork .templateEditorHeader {
	margin-top: 0;
}

.templateList {
	margin-bottom: 1rem;
	padding-left: 1.25rem;
	overflow-wrap: anywhere;
}

.templateEditorHeader, .templateEditor {
	max-width: 72rem;
	border: 1px solid #dee2e6;
}

.templateEditorHeader {
	margin: 1.5rem 0 0 0;
	padding: 0.75rem 1rem;
	border-bottom: 0;
	border-radius: 0.5rem 0.5rem 0 0;
	background: #f8f9fa;
}

.templateEditor {
	margin-bottom: 1.5rem;
	overflow: hidden;
	border-radius: 0 0 0.5rem 0.5rem;
	font-size: 0.875rem;
}

.templateEditor .CodeMirror {
	height: 32rem;
}

.CodeMirror-activeline-background {
	background: #e6f0f4;
}

/*****
** Letter
*****/

.letterContent {
	margin-top: 1.5rem;
}

.letterContent #html-textarea, .letterContent .htmlEditorArea {
	width: 100%;
	max-width: 56rem;
	height: 28rem;
}

.fullWidth {
    width: 100%;
}

.form_helptext {
	margin-top: 0.25rem;
	font-size: 0.8125rem;
	line-height: 1.25rem;
	color: #6c757d;
}