/*
 * Oberfläche von ASTRONAUTS Campaigns.
 *
 * Bootstrap liefert weiterhin Raster, Formular-Grundlagen und das Theme-Menü.
 * Alles, was die Seite ausmacht - Farben, Karten, Knöpfe, die Werkzeuge zum
 * Sortieren - steht hier, damit es an einer Stelle zusammenhängt und nicht als
 * Sammlung von Utility-Klassen im Markup verteilt ist.
 *
 * Farben stehen als Variablen oben: einmal hell, einmal dunkel. Das Umschalten
 * übernimmt data-bs-theme (js/color-modes.js).
 */

@font-face {
	font-family: "KinnBlack";
	src: url("../fonts/Kinn-Black.woff2") format("woff2");
	font-display: swap;
}

/* ---------------------------------------------------------------- Farben - */

:root {
	--surface: #ffffff;
	--surface-raised: #ffffff;
	--surface-sunken: #eef1f5;
	--app-bg: #f4f6f9;

	--border: #dde2e9;
	--border-strong: #c2c9d4;

	--text: #151a21;
	--text-muted: #616b7a;
	--text-faint: #8b95a3;

	--accent: #0b8fb4;
	--accent-text: #06718f;
	--accent-soft: rgba(11, 143, 180, .12);
	--accent-contrast: #ffffff;

	--danger: #c23b33;
	--danger-soft: rgba(194, 59, 51, .1);
	--success: #157a58;
	--success-soft: rgba(21, 122, 88, .12);

	--radius-lg: 16px;
	--radius: 10px;
	--radius-sm: 7px;

	--shadow-sm: 0 1px 2px rgba(16, 24, 33, .06);
	--shadow-md: 0 6px 18px rgba(16, 24, 33, .09);
	--shadow-pop: 0 14px 38px rgba(16, 24, 33, .18);

	/* Bootstrap mitziehen, damit Formulare und Menüs nicht aus dem Rahmen fallen. */
	--bs-body-bg: var(--app-bg);
	--bs-body-color: var(--text);
	--bs-border-color: var(--border);
	--bs-secondary-bg: var(--surface-sunken);
	--bs-tertiary-bg: var(--surface-sunken);
	--bs-emphasis-color: var(--text);
	--bs-link-color-rgb: 11, 143, 180;
	--bs-border-radius: var(--radius);
}

[data-bs-theme="dark"] {
	--surface: #151b23;
	--surface-raised: #1a212b;
	--surface-sunken: #11161d;
	--app-bg: #0c1015;

	--border: #29313d;
	--border-strong: #3b4553;

	--text: #e7ebf1;
	--text-muted: #9aa5b3;
	--text-faint: #77818f;

	--accent: #52d4ff;
	--accent-text: #7fdfff;
	--accent-soft: rgba(82, 212, 255, .14);
	--accent-contrast: #06131a;

	--danger: #ff8078;
	--danger-soft: rgba(255, 128, 120, .13);
	--success: #52d3a3;
	--success-soft: rgba(82, 211, 163, .13);

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
	--shadow-md: 0 8px 22px rgba(0, 0, 0, .45);
	--shadow-pop: 0 16px 40px rgba(0, 0, 0, .6);

	--bs-link-color-rgb: 127, 223, 255;
}

/* ----------------------------------------------------------------- Basis - */

body {
	background-color: var(--app-bg);
	color: var(--text);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.app {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 1.25rem 4rem;
}

a {
	color: var(--accent-text);
	text-underline-offset: .2em;
}

a:hover {
	color: var(--accent-text);
}

hr {
	border-color: var(--border);
	opacity: 1;
}

.bi {
	vertical-align: -.125em;
	fill: currentColor;
}

.text-muted-soft {
	color: var(--text-muted);
}

/* ---------------------------------------------------------------- Kopf ---- */

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 0 1rem;
	margin-bottom: 1.75rem;
	border-bottom: 1px solid var(--border);
}

.navbar-brand {
	font-family: "KinnBlack", sans-serif;
	font-size: 1.4rem;
	letter-spacing: .01em;
	color: var(--accent) !important;
	text-decoration: none;
}

.navbar-brand span {
	font-size: 1.4rem !important;
	color: var(--text);
}

/* ------------------------------------------------------------ Kampagne ---- */

.campaign-head {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	padding: 1.75rem 1.75rem 1.5rem;
	margin-bottom: 1.5rem;
}

.campaign-head__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-bottom: .85rem;
}

.campaign-head h1 {
	font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
	font-weight: 700;
	letter-spacing: -.02em;
	margin: 0;
}

.campaign-head__description {
	color: var(--text-muted);
	max-width: 68ch;
	margin-top: .85rem;
}

.campaign-head__description> :first-child {
	margin-top: 0;
}

.campaign-head__description> :last-child {
	margin-bottom: 0;
}

/* Datum, Talents & Co. als ruhige Marker. */
.chip {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .2rem .6rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-sunken);
	color: var(--text-muted);
	font-size: .82rem;
	line-height: 1.6;
	white-space: nowrap;
}

.chip svg {
	width: .9em;
	height: .9em;
	opacity: .75;
}

.chip--person {
	background: var(--accent-soft);
	border-color: transparent;
	color: var(--accent-text);
	font-weight: 500;
}

.chip [contenteditable="true"] {
	outline: none;
	padding: 0 .2rem;
	border-radius: 4px;
}

/* Sprungmarken zu den Boxen. */
.box-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.box-nav a {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .35rem .8rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-sunken);
	color: var(--text);
	font-size: .88rem;
	text-decoration: none;
	transition: border-color .15s, color .15s, background-color .15s;
}

.box-nav a:hover {
	border-color: var(--accent);
	color: var(--accent-text);
	background: var(--accent-soft);
}

.box-nav svg {
	width: .85em;
	height: .85em;
	opacity: .6;
}

/* ---------------------------------------------------------------- Boxen --- */

.boxes {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.box {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	scroll-margin-top: 1.5rem;
	transition: box-shadow .15s, border-color .15s;
}

.box__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--border);
}

.box__heading {
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .75rem;
}

.box-title {
	font-size: 1.3rem;
	font-weight: 650;
	letter-spacing: -.01em;
	margin: 0;
	color: var(--text);
}

.box__talents {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.box__body {
	padding: .25rem 1.5rem;
}

.box__foot {
	padding: 1rem 1.5rem 1.25rem;
	border-top: 1px solid var(--border);
	background: var(--surface-sunken);
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.box__assign {
	padding: 1rem 1.5rem 0;
}

.box__assign .form-label {
	font-size: .82rem;
	color: var(--text-muted);
	margin-bottom: .35rem;
}

/* ------------------------------------------------------------- Elemente --- */

.item {
	padding: 1.25rem 0;
	scroll-margin-top: 1.5rem;
}

/* Die Trennlinie gehört zwischen zwei Elemente - das erledigt der Nachbar,
   damit nach dem Umsortieren nichts nachgezogen werden muss. */
.item+.item {
	border-top: 1px solid var(--border);
}

.item__heading {
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem .6rem;
}

.item__talents {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem;
}

.item__talents:empty {
	display: none;
}

/* Die Talent-Auswahl eines Elements klappt aus dem ⋮-Menü auf und bleibt sonst
   weg - die meisten Elemente gelten ohnehin für alle Talents der Box. */
.item-assign {
	display: none;
	margin-bottom: .75rem;
	padding: .75rem .9rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-sunken);
}

body.edit-mode .item-assign.is-open {
	display: block;
}

.item-assign .form-label {
	font-size: .8rem;
	color: var(--text-muted);
	margin-bottom: .4rem;
}

.item-assign__row {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
}

.item-assign__row .choices,
.item-assign__row .form-select {
	flex: 1 1 auto;
	min-width: 0;
	margin-bottom: 0;
}


.item__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .5rem;
}

.item-description {
	font-size: .96rem;
	font-weight: 650;
	letter-spacing: .01em;
	color: var(--text);
	margin: 0;
	min-width: 0;
}

.item-content {
	color: var(--text);
}

.item-content> :first-child {
	margin-top: 0;
}

.item-content> :last-child {
	margin-bottom: 0;
}

.item-content p {
	margin-bottom: .6rem;
}

.item-content ul,
.item-content ol {
	margin-bottom: .6rem;
	padding-left: 1.25rem;
}

.item-content li {
	margin-bottom: .2rem;
}

.item-content h1,
.item-content h2,
.item-content h3,
.item-content h4 {
	font-size: 1.02rem;
	font-weight: 650;
	margin: 1rem 0 .4rem;
}

.item-image-preview {
	display: block;
	max-width: min(340px, 100%);
	/* Hochformatige Bilder (z. B. der Platzhalter) würden sonst die halbe Box
	   einnehmen - die Vorschau bleibt bewusst klein. */
	max-height: 220px;
	width: auto;
	height: auto;
	object-fit: contain;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-sunken);
}

.item-media {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: .75rem;
	margin-bottom: .75rem;
}

/* Kopierbare Zeilen: Command, Link, Chatbot-Text. */
.item-media__actions {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.item-media__actions .form-control {
	max-width: 15rem;
}

.copy-block {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .5rem;
}

.copy-block pre {
	width: 100%;
}

.copy-field {
	display: flex;
	align-items: stretch;
	gap: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-sunken);
	overflow: hidden;
	max-width: 100%;
}

.copy-field__label {
	display: flex;
	align-items: center;
	padding: .45rem .75rem;
	font-size: .82rem;
	color: var(--text-muted);
	background: var(--surface);
	border-right: 1px solid var(--border);
	white-space: nowrap;
}

.copy-field input.form-control,
.copy-field .copy-field__value {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--text);
	padding: .45rem .75rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .88rem;
	box-shadow: none;
}

.copy-field input.form-control:focus {
	box-shadow: inset 0 0 0 2px var(--accent-soft);
	background: var(--surface);
}

.copy-field .copy-field__value {
	display: block;
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
}

.copy-field button {
	flex: 0 0 auto;
	border: 0;
	border-left: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-muted);
	padding: 0 .85rem;
	font-size: .82rem;
	cursor: pointer;
	transition: color .15s, background-color .15s;
}

.copy-field button:hover {
	background: var(--accent-soft);
	color: var(--accent-text);
}

pre {
	background: var(--surface-sunken);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	padding: .85rem 1rem;
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: .88rem;
}

/* ------------------------------------------------------------ Checkbox ---- */

.form-check-input:disabled~.form-check-label,
.form-check-input[disabled]~.form-check-label {
	opacity: 1;
}

.form-check {
	padding-left: 1.85rem;
	margin-bottom: .35rem;
}

.form-check-input {
	border-color: var(--border-strong);
	margin-left: -1.85rem;
}

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

/* --------------------------------------------------------------- Knöpfe --- */

.btn {
	--bs-btn-border-radius: var(--radius-sm);
	font-size: .9rem;
	font-weight: 500;
}

/* Ein neutraler Knopf, der in beiden Themes gleich aussieht. Die Seite
   verteilt btn-outline-light/dark/secondary gemischt - alle drei landen hier. */
.btn-outline-light,
.btn-outline-dark,
.btn-outline-secondary {
	--bs-btn-color: var(--text);
	--bs-btn-border-color: var(--border-strong);
	--bs-btn-bg: var(--surface);
	--bs-btn-hover-color: var(--accent-text);
	--bs-btn-hover-bg: var(--accent-soft);
	--bs-btn-hover-border-color: var(--accent);
	--bs-btn-active-color: var(--accent-text);
	--bs-btn-active-bg: var(--accent-soft);
	--bs-btn-active-border-color: var(--accent);
	--bs-btn-disabled-color: var(--text-faint);
	--bs-btn-disabled-border-color: var(--border);
}

.btn-outline-danger {
	--bs-btn-color: var(--danger);
	--bs-btn-border-color: var(--border-strong);
	--bs-btn-bg: var(--surface);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--danger);
	--bs-btn-hover-border-color: var(--danger);
	--bs-btn-active-bg: var(--danger);
	--bs-btn-active-border-color: var(--danger);
}

.btn-outline-success {
	--bs-btn-color: var(--success);
	--bs-btn-border-color: var(--border-strong);
	--bs-btn-bg: var(--surface);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--success);
	--bs-btn-hover-border-color: var(--success);
	--bs-btn-active-bg: var(--success);
	--bs-btn-active-border-color: var(--success);
}

.btn-secondary {
	--bs-btn-bg: var(--surface-sunken);
	--bs-btn-border-color: var(--border-strong);
	--bs-btn-color: var(--text);
	--bs-btn-hover-bg: var(--border);
	--bs-btn-hover-border-color: var(--border-strong);
	--bs-btn-hover-color: var(--text);
	--bs-btn-active-bg: var(--border);
	--bs-btn-active-color: var(--text);
}

.btn-primary {
	--bs-btn-bg: var(--accent);
	--bs-btn-border-color: var(--accent);
	--bs-btn-color: var(--accent-contrast);
	--bs-btn-hover-bg: var(--accent-text);
	--bs-btn-hover-border-color: var(--accent-text);
	--bs-btn-hover-color: var(--accent-contrast);
}

.form-control,
.form-select {
	background-color: var(--surface);
	border-color: var(--border);
	color: var(--text);
	border-radius: var(--radius-sm);
	font-size: .92rem;
}

.form-control:focus,
.form-select:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
	background-color: var(--surface);
	color: var(--text);
}

.form-label {
	font-size: .88rem;
	font-weight: 500;
}

/* ------------------------------------------------- Sortieren & Kopieren --- */

/* Die Werkzeuge liegen rechts in der Kopfzeile einer Box bzw. eines Elements.
   Sichtbar bleiben nur Griff, hoch, runter und ein Menü - alles Weitere steckt
   dahinter, damit die Seite beim Bearbeiten nicht zur Knopfsammlung wird. */
.reorder {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-sunken);
}

body.edit-mode .reorder {
	display: inline-flex;
}

.reorder__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition: background-color .12s, color .12s;
}

.reorder__btn svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
	pointer-events: none;
}

.reorder__btn:hover,
.reorder__btn[aria-expanded="true"] {
	background: var(--surface);
	color: var(--accent-text);
	box-shadow: var(--shadow-sm);
}

.reorder__btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

.reorder__handle {
	cursor: grab;
}

.reorder__handle:active {
	cursor: grabbing;
}

.reorder__sep {
	width: 1px;
	height: 18px;
	background: var(--border);
	margin: 0 2px;
}

/* Das Menü hinter den drei Punkten. */
.reorder__more {
	position: relative;
	display: inline-flex;
}

.reorder__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 1200;
	min-width: 230px;
	padding: .35rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-raised);
	box-shadow: var(--shadow-pop);
}

.reorder__menu[hidden] {
	display: none;
}

.reorder__menu button {
	display: flex;
	align-items: center;
	gap: .6rem;
	width: 100%;
	padding: .45rem .6rem;
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text);
	font-size: .88rem;
	text-align: left;
	cursor: pointer;
}

.reorder__menu button:hover {
	background: var(--accent-soft);
	color: var(--accent-text);
}

.reorder__menu button svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
	opacity: .8;
	flex: 0 0 auto;
}

.reorder__menu button.is-danger {
	color: var(--danger);
}

.reorder__menu button.is-danger:hover {
	background: var(--danger-soft);
	color: var(--danger);
}

.reorder__menu hr {
	margin: .35rem .2rem;
	border-top: 1px solid var(--border);
}

.reorder__jump {
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: .45rem .6rem .55rem;
}

.reorder__jump label {
	font-size: .88rem;
	color: var(--text);
	white-space: nowrap;
}

.reorder__jump input {
	width: 3.6rem;
	padding: .25rem .4rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font-size: .88rem;
	text-align: center;
}

.reorder__jump .reorder-count {
	font-size: .82rem;
	color: var(--text-muted);
	white-space: nowrap;
}

.reorder__jump button {
	width: auto;
	padding: .25rem .6rem;
	border: 1px solid var(--border-strong);
	font-size: .84rem;
}

/* Zustände beim Ziehen. */
.reorder-dragging {
	opacity: .45;
}

.drop-before {
	box-shadow: 0 -3px 0 0 var(--accent);
}

.drop-after {
	box-shadow: 0 3px 0 0 var(--accent);
}

.drop-into {
	outline: 2px dashed var(--accent);
	outline-offset: 4px;
	border-radius: var(--radius);
}

body.edit-mode .box-content {
	min-height: 2.5rem;
}

body.edit-mode .box {
	border-style: dashed;
}

body.edit-mode .box:hover {
	border-color: var(--border-strong);
}

/* Platzhalter für die Werkzeugleiste: ohne Management-Rechte wird er nie
   ersetzt und soll dann auch keinen Platz beanspruchen. */
.reorder-anchor {
	display: none;
}

/* Nur im Bearbeiten-Modus sichtbar. */
.admin-buttons {
	display: none;
}

body.edit-mode .admin-buttons {
	display: block;
}

body.edit-mode button.admin-buttons,
body.edit-mode input.admin-buttons,
body.edit-mode a.admin-buttons,
body.edit-mode span.admin-buttons {
	display: inline-block;
}

body.edit-mode .input-group.admin-buttons,
body.edit-mode .copy-field.admin-buttons,
body.edit-mode .list-actions.admin-buttons,
body.edit-mode .add-item.admin-buttons,
body.edit-mode .item-media__actions.admin-buttons {
	display: flex;
}

/* Bearbeitbares zeigt sich beim Darüberfahren, statt dauerhaft als Formularfeld
   im Weg zu stehen. Nur die kurzen Titel tragen einen ständigen Hinweis. */
body.edit-mode [contenteditable="true"] {
	outline: none;
	border-radius: var(--radius-sm);
	padding: .1rem .35rem;
	margin-left: -.35rem;
	transition: background-color .12s, box-shadow .12s;
}

body.edit-mode [contenteditable="true"]:hover {
	background: var(--surface-sunken);
	box-shadow: 0 0 0 1px var(--border);
}

body.edit-mode .box-title[contenteditable="true"],
body.edit-mode .item-description[contenteditable="true"],
body.edit-mode .chip [contenteditable="true"] {
	box-shadow: 0 0 0 1px var(--border-strong);
}

body.edit-mode [contenteditable="true"]:focus,
body.edit-mode .box-title[contenteditable="true"]:focus,
body.edit-mode .item-description[contenteditable="true"]:focus {
	background: var(--surface);
	box-shadow: 0 0 0 2px var(--accent);
}

.add-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
}

.add-item .form-select {
	width: auto;
	min-width: 12rem;
	margin: 0;
}

/* ------------------------------------------------------ Kampagnenliste ---- */

.page-intro {
	margin-bottom: 1.75rem;
}

.page-intro h1 {
	font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem);
	font-weight: 700;
	letter-spacing: -.02em;
	margin: 0 0 .5rem;
}

.page-intro p {
	color: var(--text-muted);
	max-width: 60ch;
	margin: 0;
}

.filter-bar {
	margin: 1.25rem 0 0;
	max-width: 32rem;
}

h3.mt-4 {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin: 2rem 0 .75rem !important;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--text-faint);
}

h3.mt-4::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--border);
}

.list-group {
	margin-bottom: .6rem;
	border-radius: var(--radius);
}

.list-group-item,
.list-group-item-action {
	display: block;
	padding: .9rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius) !important;
	background: var(--surface);
	color: var(--text);
	box-shadow: var(--shadow-sm);
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
	background: var(--surface);
	border-color: var(--accent);
	box-shadow: var(--shadow-md);
	color: var(--text);
}

.campaign-row__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .2rem;
}

.campaign-row__title {
	font-size: 1.02rem;
	font-weight: 650;
	margin: 0;
	min-width: 0;
}

.campaign-row__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: .4rem;
	flex: 0 0 auto;
}

.campaign-row__dates {
	font-size: .82rem;
	color: var(--text-muted);
	white-space: nowrap;
}

.campaign-row__text {
	margin: 0;
	color: var(--text-muted);
	font-size: .9rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.campaign-row__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-top: .75rem;
	padding-top: .75rem;
	border-top: 1px solid var(--border);
}

body:not(.edit-mode) .campaign-row__actions {
	display: none;
}

.campaign-checkbox {
	width: 1.35rem;
	height: 1.35rem;
	margin-left: auto;
	accent-color: var(--accent);
}

.list-actions {
	display: flex;
	gap: .5rem;
	margin-top: 1.5rem;
}

/* --------------------------------------------------------- Chatbot-Timer -- */

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem 1rem;
	margin: 2.5rem 0 1rem;
	padding-bottom: .6rem;
	border-bottom: 1px solid var(--border);
}

.section-head h2 {
	font-size: 1.25rem;
	font-weight: 650;
	margin: 0;
}

.section-head small {
	color: var(--text-muted);
}

#chatbot-timer-list .card,
.timer-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------------- Aktionen ----- */

/* Die schwebende Leiste unten rechts: eine Einheit statt gestapelter Knöpfe. */
.action-bar {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 1500;
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: .4rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-raised);
	box-shadow: var(--shadow-pop);
}

.action-bar .btn {
	border-radius: 999px;
}

.action-bar .btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
}

.action-bar .dropdown-menu {
	border-color: var(--border);
	background: var(--surface-raised);
	box-shadow: var(--shadow-pop);
}

.action-bar .dropdown-item {
	color: var(--text);
}

.action-bar .dropdown-item:hover,
.action-bar .dropdown-item.active {
	background: var(--accent-soft);
	color: var(--accent-text);
}

#edit-button {
	display: none;
}

body.edit-mode #edit-button {
	display: none !important;
}

/* ------------------------------------------------------------- Choices ---- */

.choices {
	margin-bottom: 0;
}

.choices__inner {
	background-color: var(--surface);
	border-color: var(--border);
	border-radius: var(--radius-sm) !important;
	color: var(--text);
	min-height: 40px;
	padding: .3rem .5rem;
}

.choices__input,
.choices__list {
	background-color: transparent;
	color: var(--text);
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
	background: var(--surface-raised);
	border-color: var(--border);
	color: var(--text);
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.is-highlighted {
	background-color: var(--accent-soft) !important;
	color: var(--accent-text);
}

/* Das X zum Entfernen liefert Choices als weißes Icon - im hellen Theme
   wäre es auf dem hellen Chip unsichtbar. */
.choices__button {
	filter: brightness(0);
	opacity: .45;
	border-left-color: var(--border) !important;
}

.choices__button:hover {
	opacity: .8;
}

[data-bs-theme="dark"] .choices__button {
	filter: none;
	opacity: .6;
}

.choices__list--multiple .choices__item {
	background-color: var(--accent-soft) !important;
	border: 1px solid transparent !important;
	border-radius: 999px !important;
	color: var(--accent-text) !important;
	font-weight: 500;
	padding: .15rem .6rem;
}

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

dialog {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface-raised);
	color: var(--text);
	box-shadow: var(--shadow-pop);
	padding: 1.5rem;
	max-width: 32rem;
	width: calc(100% - 2rem);
}

dialog::backdrop {
	background: rgba(6, 10, 15, .55);
}

dialog h3 {
	font-size: 1.15rem;
	font-weight: 650;
	margin: 0;
}

footer {
	color: var(--text-faint);
	font-size: .85rem;
	border-top: 1px solid var(--border);
	padding-top: 1.25rem;
	margin-top: 3rem;
}

/* ------------------------------------------------------------- Schmal ----- */

@media (max-width: 720px) {
	.app {
		padding: 0 1rem 5rem;
	}

	.campaign-head {
		padding: 1.25rem;
	}

	.box__head {
		flex-direction: column;
		align-items: stretch;
		padding: 1rem 1.1rem;
	}

	.box__body {
		padding: .25rem 1.1rem;
	}

	.box__foot,
	.box__assign {
		padding-left: 1.1rem;
		padding-right: 1.1rem;
	}

	.item__head {
		flex-direction: column;
		gap: .5rem;
	}

	.reorder {
		align-self: flex-start;
	}

	.action-bar {
		right: .75rem;
		bottom: .75rem;
		flex-wrap: wrap;
		max-width: calc(100vw - 1.5rem);
		justify-content: flex-end;
	}
}

/* --------------------------------------------------------------- Badges --- */

.badge {
	border-radius: 999px;
	font-weight: 500;
	font-size: .76rem;
	padding: .3em .7em;
}

.badge.text-bg-secondary {
	background: var(--surface-sunken) !important;
	color: var(--text-muted) !important;
	border: 1px solid var(--border);
}

.badge.text-bg-primary {
	background: var(--accent-soft) !important;
	color: var(--accent-text) !important;
	border: 1px solid transparent;
}

.badge.text-bg-success {
	background: var(--success-soft) !important;
	color: var(--success) !important;
	border: 1px solid transparent;
}

/* Timer-Karten des Chatbots. */
.chatbot-timer>div {
	background: var(--surface) !important;
	border: 1px solid var(--border) !important;
	border-radius: var(--radius) !important;
	box-shadow: var(--shadow-sm);
	padding: 1.1rem 1.25rem !important;
}

.chatbot-timer h5 {
	font-size: 1rem;
	font-weight: 650;
}

.alert-warning {
	border-radius: var(--radius);
	border-color: var(--border);
}

/* -------------------------------------------------------------- Vorlagen -- */

.templates {
	margin-top: 2.5rem;
}

.template-list {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}

.template-row {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	padding: .6rem .9rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	color: var(--text);
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s;
}

.template-row:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-md);
	color: var(--text);
}

.template-row__name {
	font-weight: 600;
	font-size: .95rem;
}
