:root {
	/* Farbschema "Stahlblau kontrast" (2026-09-30, ersetzt "Petrol"): Stahlblau #1A3350 für die Navigationsleiste,
	   fast schwarzblaue Grundflächen, helles Himmelblau für Links/Icons/Überschriften/aktive Reiter und Gold
	   (wie der Stern im Logo) als warmer Gegenpol für Hervorhebungen.
	   Bewusst kontrastreich: Fließtext >= 14:1, Sekundärtext >= 8:1 auf den Karten; Abschnitte und Modulgruppen
	   sind farbig abgesetzt (siehe Block "Akzente" am Ende der Datei). */
	/* Grundflächen */
	--hive-bg: #070D16;
	--hive-bg-secondary: #1A3350;
	/* Panels / Karten */
	--hive-surface: #0F1A28;
	--hive-surface-alt: #16263A;
	--hive-surface-hover: #1E3350;
	/* Stahlblau / Himmelblau */
	--hive-primary: #2E6DA8;
	--hive-primary-hover: #3579B8;
	--hive-accent: #7CC4FF;
	/* Überschriften (Abschnittstitel, Kartentitel) */
	--hive-heading: #A9D8FF;
	/* Schrift */
	--hive-text-primary: #EEF4FA;
	--hive-text-secondary: #B7C7DA;
	--hive-text-faint: #7E93AB;
	/* Linien */
	--hive-border: #274061;
	--hive-border-light: #3A5A82;
	/* Hervorhebungen (warmer Gegenpol zum Stahlblau) */
	--hive-highlight: #F5B83D;
	--hive-highlight-hover: #FFCD66;
	/* Status - Info bewusst violett, damit es sich vom blauen Akzent abhebt */
	--hive-success: #62D98E;
	--hive-warning: #FF9F43;
	--hive-danger: #F26565;
	--hive-info: #A78BFA;
	/* dieselben Statusfarben als RGB-Tripel für rgba() (Bot-Karten nach Zustand eingefärbt) */
	--hive-success-rgb: 98, 217, 142;
	--hive-warning-rgb: 255, 159, 67;
	--hive-danger-rgb: 242, 101, 101;
	/* Schrift auf farbigen Flächen */
	--hive-on-primary: #FFFFFF;
	--hive-on-bright: #07111D;

	/* Ressourcenfarben (Rohstoff-Kasten, Planeten-Tabelle) */
	--hive-res-metal: #D6D6D6;
	--hive-res-crystal: #8FD3F0;
	--hive-res-deuterium: #B99BE6;
	--hive-res-energy: #E6C552;
	--hive-res-darkmatter: #5FE0EC;
	--hive-res-msu: var(--hive-accent);

	/* Handlungsbedarf-Stufen: gelb = Hinweis, orange = Warnung, rot = kritisch */
	--hive-level-note: #EFD85C;
	--hive-level-warn: #FF8A3D;
	--hive-level-crit: var(--hive-danger);

	/* Aliase, unter denen der Rest dieser Datei die Farben benutzt */
	--hive-accent-dim: var(--hive-primary);
	--hive-accent-2: var(--hive-primary-hover);
	--hive-bg-elevated: var(--hive-surface-alt);
	--hive-bg-card: var(--hive-surface);
	--hive-text: var(--hive-text-primary);
	/* Sekundärtext (Beschriftungen, Hilfetexte) - --hive-text-faint nur für wirklich Nebensächliches. */
	--hive-text-muted: var(--hive-text-secondary);
	--hive-code-bg: #050A11;
	/* Aktiver Reiter/Eintrag überall gleich (Hauptnavigation, Bot-Leiste, Unterreiter, Modul-Seitenleiste):
	   helles Himmelblau mit leichtem Verlauf, dunkle Schrift. */
	--hive-active-bg: linear-gradient(180deg, #A5D6FF 0%, #5FA8EC 100%);
	--hive-active-text: var(--hive-on-bright);
}

html, body {
	background-color: var(--hive-bg);
	color: var(--hive-text);
	min-height: 100%;
}

body {
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Bootstrap's own .text-muted (#6c757d) is far too dark on this dark petrol theme — route it to the theme token. */
.text-muted {
	color: var(--hive-text-muted) !important;
}

.min-w-0 {
	min-width: 0;
}

a {
	color: var(--hive-accent);
}

a:hover {
	color: var(--hive-primary-hover);
}

.hive-navbar {
	background-color: var(--hive-bg-secondary);
	border-bottom: 1px solid var(--hive-border);
	/* thin gold→orange line along the bottom edge, the two logo colors */
	background-image: linear-gradient(90deg, var(--hive-highlight), var(--hive-accent) 40%, transparent 75%);
	background-size: 100% 2px;
	background-repeat: no-repeat;
	background-position: bottom left;
}

.hive-navbar .navbar-brand {
	color: var(--hive-text);
	font-weight: 600;
	letter-spacing: 0.04em;
}

.hive-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
}

.hive-brand-name {
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	color: var(--hive-on-primary);
}

.hive-brand-sub {
	font-size: 0.56rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--hive-text-secondary);
}

@media (max-width: 1200px) {
	.hive-brand-sub {
		display: none;
	}
}

.hive-navbar .nav-link {
	color: var(--hive-text-muted);
	border-radius: 6px;
	padding: 0.4rem 0.85rem !important;
	margin: 0 0.1rem;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.hive-navbar .nav-link:hover {
	color: var(--hive-text);
	background-color: rgba(255, 255, 255, 0.05);
}

.hive-navbar .nav-link.active {
	color: var(--hive-active-text);
	background: var(--hive-active-bg);
	font-weight: 600;
}

.hive-navbar .nav-link.active .hive-nav-badge {
	color: var(--hive-active-text);
	background-color: color-mix(in srgb, var(--hive-on-bright) 14%, transparent);
	border-color: color-mix(in srgb, var(--hive-on-bright) 40%, transparent);
}

.hive-nav-badge {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-accent);
	background-color: color-mix(in srgb, var(--hive-accent) 12%, var(--hive-bg));
	border: 1px solid var(--hive-accent-dim);
	border-radius: 999px;
	padding: 0.1rem 0.45rem;
	margin-left: 0.4rem;
	vertical-align: middle;
}

.hive-nav-divider {
	width: 1px;
	align-self: stretch;
	margin: 0.4rem 0.75rem;
	background-color: var(--hive-border);
}

/* Inline SVG icons (Services/Icons.cs): inherit color, sized to the surrounding text. */
.hive-icon {
	width: 1.1em;
	height: 1.1em;
	flex: 0 0 auto;
	vertical-align: -0.18em;
}

.hive-navbar .nav-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

/* "Bots" is the global overview, the tabs after the divider belong to the selected bot: a framed tab with
   stronger type sets it apart from those. */
.hive-navbar .nav-link.hive-nav-bots {
	color: var(--hive-text);
	font-weight: 700;
	letter-spacing: 0.02em;
	border: 1px solid var(--hive-highlight);
	background-color: color-mix(in srgb, var(--hive-highlight) 12%, transparent);
}

.hive-navbar .nav-link.hive-nav-bots:hover {
	background-color: color-mix(in srgb, var(--hive-highlight) 24%, transparent);
}

.hive-navbar .nav-link.hive-nav-bots.active {
	border-color: var(--hive-highlight-hover);
}

.hive-navbar .nav-link.hive-nav-bots:not(.active) .hive-icon {
	color: var(--hive-highlight);
}

.hive-card-title-icon {
	color: var(--hive-accent);
	margin-right: 0.4rem;
}

.hive-card {
	background-color: var(--hive-bg-card);
	border: 1px solid var(--hive-border);
	border-radius: 10px;
}

.hive-status-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	margin-right: 6px;
}

.hive-status-dot.running {
	background-color: var(--hive-success);
	box-shadow: 0 0 6px var(--hive-success);
}

.hive-status-dot.stopped {
	background-color: var(--hive-text-muted);
}

.badge.hive-badge-running {
	background-color: color-mix(in srgb, var(--hive-success) 12%, var(--hive-bg));
	color: var(--hive-success);
	border: 1px solid color-mix(in srgb, var(--hive-success) 45%, var(--hive-bg));
	border-radius: 999px;
	padding: 0.35rem 0.7rem;
	font-weight: 500;
}

.badge.hive-badge-stopped {
	background-color: var(--hive-surface-alt);
	color: var(--hive-text-muted);
	border: 1px solid var(--hive-border);
	border-radius: 999px;
	padding: 0.35rem 0.7rem;
	font-weight: 500;
}

.btn-hive-accent {
	background-color: var(--hive-primary);
	border-color: var(--hive-primary);
	color: var(--hive-on-primary);
	font-weight: 600;
}

.btn-hive-accent:hover,
.btn-hive-accent:focus-visible {
	background-color: var(--hive-primary-hover);
	border-color: var(--hive-primary-hover);
	color: var(--hive-on-primary);
}

.btn-hive-accent:disabled {
	background-color: var(--hive-primary);
	border-color: var(--hive-primary);
	color: var(--hive-on-primary);
	opacity: 0.45;
}

.btn-outline-hive {
	border-color: var(--hive-border);
	color: var(--hive-text);
}

.btn-outline-hive:hover {
	border-color: var(--hive-accent);
	color: var(--hive-accent);
	background-color: transparent;
}

.table {
	color: var(--hive-text);
}

.table > :not(caption) > * > * {
	background-color: transparent;
	border-color: var(--hive-border);
	color: var(--hive-text);
}

.form-select, .form-control {
	background-color: var(--hive-bg-elevated);
	border-color: var(--hive-border);
	color: var(--hive-text);
}

.form-select:focus, .form-control:focus {
	background-color: var(--hive-bg-elevated);
	border-color: var(--hive-accent);
	color: var(--hive-text);
	box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--hive-accent) 22%, transparent);
}

.hive-nav-tabs {
	border-bottom-color: var(--hive-border);
}

.hive-nav-tabs .nav-link {
	color: var(--hive-text-muted);
	border: 1px solid transparent;
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.hive-nav-tabs .nav-link:hover {
	color: var(--hive-text);
	border-color: var(--hive-border) var(--hive-border) var(--hive-border);
}

.hive-nav-tabs .nav-link.active {
	color: var(--hive-active-text);
	background: var(--hive-active-bg);
	border-color: var(--hive-accent);
	font-weight: 600;
}

.hive-json-field {
	font-family: "Cascadia Code", Consolas, monospace;
	font-size: 0.8rem;
}

.hive-log-level-Error, .hive-log-level-Fatal { color: var(--hive-danger); }
.hive-log-level-Warning { color: var(--hive-warning); }
/* Information/Debug/Verbose: see the "Logs" block at the end of this file. */

.hive-live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 5px;
	background-color: var(--hive-text-muted);
}

.hive-live-dot.connected {
	background-color: var(--hive-success);
	box-shadow: 0 0 5px var(--hive-success);
}

.hive-live-row {
	animation: hive-live-flash 1.2s ease-out;
}

@keyframes hive-live-flash {
	from { background-color: color-mix(in srgb, var(--hive-accent) 16%, transparent); }
	to { background-color: transparent; }
}

.hive-iframe-wrap {
	position: relative;
	width: 100%;
	height: 78vh;
	border: 1px solid var(--hive-border);
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--hive-bg-elevated);
}

.hive-iframe-wrap iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* Spielen im Vollbild: the wrapper fills the screen, a small bar (bot dropdown, "Modus: manuell/auto",
   "Vollbild verlassen") in the style of ogamed's "Manual mode" switch sits top right, where that switch was. */
.hive-iframe-wrap.is-fullscreen {
	height: 100vh;
	border: 0;
	border-radius: 0;
	background-color: #000;
}

.hive-play-fsbar {
	display: none;
	position: absolute;
	top: 6px;
	right: 10px;
	z-index: 5;
	gap: 4px;
	align-items: center;
}

/* Manual mode on: the switch glows amber so it is not forgotten. */
.hive-play-fsbar-btn.is-manual {
	color: #1a1204;
	background-color: var(--hive-highlight);
	border-color: var(--hive-highlight-hover);
	font-weight: bold;
}

.hive-play-fsbar-btn.is-manual:hover {
	color: #1a1204;
	background-color: var(--hive-highlight-hover);
}

.hive-play-fsbar-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Outside fullscreen the same buttons sit in the bot bar - a bit taller to line up with the gear button. */
.hive-play-settings ~ .hive-play-fsbar-btn {
	padding: 4px 9px;
	align-self: center;
}

.hive-iframe-wrap.is-fullscreen .hive-play-fsbar {
	display: flex;
}

.hive-play-fsbar-btn,
.hive-play-fsbar-select {
	font: 11px/1.4 Verdana, Arial, sans-serif;
	color: #d8dde2;
	background-color: rgba(20, 24, 28, 0.9);
	border: 1px solid #5a6570;
	border-radius: 3px;
	padding: 2px 7px;
	cursor: pointer;
}

.hive-play-fsbar-btn:hover,
.hive-play-fsbar-select:hover {
	background-color: rgba(45, 52, 60, 0.95);
	color: var(--hive-on-primary);
}

.hive-iframe-fallback {
	position: absolute;
	inset: 0;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	background-color: var(--hive-bg-elevated);
	text-align: center;
	padding: 2rem;
}

.hive-iframe-fallback.visible {
	display: flex;
}

/* --- Worker page redesign --- */

.hive-worker-status-card {
	border-left: 3px solid var(--hive-border);
	transition: border-left-color 0.2s ease;
}

.hive-worker-status-card.hive-status-card-enabled {
	border-left-color: var(--hive-success);
}

.hive-worker-status-card.hive-status-card-disabled {
	border-left-color: var(--hive-text-muted);
}

.hive-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1rem;
	margin-top: 0.75rem;
}

.hive-stat-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-text-muted);
	margin-bottom: 0.15rem;
}

.hive-stat-value {
	font-size: 0.95rem;
	font-weight: 600;
}

.hive-settings-section {
	margin-bottom: 1rem;
}

.hive-settings-section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	margin: -0.75rem -0.75rem 0.75rem;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--hive-border);
	/* Slightly darker than the surrounding .hive-card/.hive-worker-status-card (--hive-bg-card), using the
	   page background color rather than a new token, so the group title bar reads as a header strip. */
	background-color: var(--hive-bg);
	border-radius: 10px 10px 0 0;
}

.hive-settings-section-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hive-text);
}

/* Weekday sections under SleepMode (Montag..Sonntag) get a colored accent so they stand out from regular
   groups at a glance, instead of blending in with e.g. "Allgemein" or "Telegram-Benachrichtigung". */
.hive-settings-section.hive-settings-section-weekday {
	border-left: 3px solid var(--hive-accent-dim);
	background-color: color-mix(in srgb, var(--hive-accent) 6%, var(--hive-bg-card));
}

.hive-settings-section-weekday .hive-settings-section-header {
	border-bottom-color: var(--hive-accent-dim);
}

.hive-settings-section-weekday .hive-settings-section-title {
	color: var(--hive-accent);
}

/* Fest/Zufällig mode switch above the weekday table */
.hive-weekday-mode-switch .btn-check:checked + .btn-outline-hive {
	background-color: var(--hive-accent-dim);
	border-color: var(--hive-accent);
	color: var(--hive-active-text);
}

/* Horizontal weekday table (Wochentage as columns, Aktiv/Von/Bis or Zufallszeiten as rows) */
.hive-weekday-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 0.75rem;
}

.hive-weekday-table th,
.hive-weekday-table td {
	padding: 0.4rem 0.5rem;
	text-align: center;
	vertical-align: middle;
	border-bottom: 1px solid var(--hive-border);
	white-space: nowrap;
}

.hive-weekday-table thead th {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--hive-text-muted);
	border-bottom: 1px solid var(--hive-border);
}

.hive-weekday-table tbody th {
	text-align: left;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--hive-text-muted);
	white-space: nowrap;
	padding-right: 0.75rem;
}

.hive-weekday-table .hive-field-toggle {
	justify-content: center;
}

.hive-weekday-table input[type="time"] {
	width: 100px;
}

/* Deviation days keep full opacity, standard (non-deviating) days are visually de-emphasized — the table
   reads as "standard schedule above, optional per-day exceptions below" rather than 7 always-equal columns. */
.hive-weekday-cell-inactive input[type="time"] {
	opacity: 0.4;
}

.hive-weekday-copy-bar {
	font-size: 0.85rem;
}

.hive-weekday-copy-target-label {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	color: var(--hive-text-muted);
	white-space: nowrap;
}

.hive-field-toggle {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
}

.hive-field-toggle input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 38px;
	height: 22px;
	margin: 0;
	border-radius: 999px;
	background-color: var(--hive-bg-elevated);
	border: 1px solid var(--hive-border);
	position: relative;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hive-field-toggle input[type="checkbox"]::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--hive-text-muted);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.hive-field-toggle input[type="checkbox"]:checked {
	background-color: var(--hive-accent-dim);
	border-color: var(--hive-accent);
}

.hive-field-toggle input[type="checkbox"]:checked::before {
	transform: translateX(16px);
	background-color: var(--hive-accent);
}

.hive-field-toggle input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--hive-accent);
	outline-offset: 2px;
}

/* Sidebar quick on/off switch: red/green instead of the neutral accent color used elsewhere, so on/off
   reads at a glance without having to look at the status dot on the status card. */
/* Off = neutral grey (not red — red is reserved for errors/dangerous actions), on = green. Gold stays the
   accent for selection/tabs/normal in-form toggles (.hive-field-toggle, unaffected by this override). */
.hive-worker-quick-toggle input[type="checkbox"]:checked {
	background-color: var(--hive-success);
	border-color: var(--hive-success);
}

.hive-worker-quick-toggle input[type="checkbox"]:checked::before {
	background-color: var(--hive-on-primary);
}

.hive-field-advanced {
	margin-top: 0.25rem;
}

.hive-field-advanced > summary {
	cursor: pointer;
	font-size: 0.8rem;
	color: var(--hive-accent);
	list-style: none;
}

.hive-field-advanced > summary::-webkit-details-marker {
	display: none;
}

.hive-field-advanced > summary::before {
	content: "▸";
	display: inline-block;
	margin-right: 0.35rem;
	transition: transform 0.15s ease;
}

.hive-field-advanced[open] > summary::before {
	transform: rotate(90deg);
}

.hive-field-advanced .hive-json-field {
	margin-top: 0.5rem;
}

/* Labeled editors for JSON array fields (WhiteList, Origin, ScanRange, ...) instead of a raw JSON textarea —
   a repeatable list of inputs for plain values, or a small table when the array holds flat objects. */
.hive-json-list-row {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.4rem;
}

.hive-json-list-row input {
	flex: 1 1 auto;
}

.hive-json-list-remove {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	line-height: 1;
	background: none;
	border: 1px solid var(--hive-border);
	border-radius: 6px;
	color: var(--hive-danger);
	cursor: pointer;
}

.hive-json-list-remove:hover {
	border-color: var(--hive-danger);
}

.hive-json-add-btn {
	margin-top: 0.15rem;
}

.hive-json-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.5rem;
}

.hive-json-table th,
.hive-json-table td {
	padding: 0.3rem 0.4rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-json-table th {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--hive-text-muted);
	text-align: left;
	white-space: nowrap;
}

.hive-json-table input {
	width: 100%;
	min-width: 70px;
}

/* --- Worker page: sidebar layout --- */

.hive-worker-shell {
	display: flex;
	align-items: flex-start;
	gap: 1.25rem;
}

.hive-worker-sidebar {
	flex: 0 0 260px;
	width: 260px;
	background-color: var(--hive-bg-card);
	border: 1px solid var(--hive-border);
	border-radius: 10px;
	overflow-x: hidden;
	overflow-y: auto;
	position: sticky;
	top: 1rem;
	max-height: calc(100vh - 2rem);
	z-index: 1;
}

.hive-worker-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem 0.9rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-worker-sidebar-title {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-text-muted);
}

.hive-worker-sidebar-collapse-toggle {
	background: none;
	border: 1px solid var(--hive-border);
	border-radius: 6px;
	color: var(--hive-text-muted);
	line-height: 1;
	padding: 0.2rem 0.5rem;
	cursor: pointer;
}

.hive-worker-sidebar-collapse-toggle:hover {
	color: var(--hive-accent);
	border-color: var(--hive-accent-dim);
}

.hive-worker-sidebar-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.65rem 0.9rem;
	border-bottom: 1px solid var(--hive-border);
	cursor: pointer;
	border-left: 3px solid transparent;
	transition: background-color 0.15s ease, border-left-color 0.15s ease;
}

.hive-worker-sidebar.collapsed {
	flex: 0 0 56px;
	width: 56px;
}

.hive-worker-sidebar.collapsed .hive-worker-sidebar-title,
.hive-worker-sidebar.collapsed .hive-worker-sidebar-category,
.hive-worker-sidebar.collapsed .hive-worker-sidebar-item-name,
.hive-worker-sidebar.collapsed .hive-worker-sidebar-item-techname,
.hive-worker-sidebar.collapsed .hive-worker-quick-toggle {
	display: none;
}

.hive-worker-sidebar-category {
	padding: 0.6rem 0.9rem 0.25rem;
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hive-text-muted);
	border-bottom: 1px solid var(--hive-border);
}

.hive-worker-sidebar-item-techname {
	display: block;
	font-size: 0.7rem;
	color: var(--hive-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-worker-sidebar-item-badge {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.05rem 0.4rem;
	border-radius: 999px;
	background-color: var(--hive-accent-dim);
	color: var(--hive-active-text);
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	vertical-align: middle;
}

.hive-worker-sidebar.collapsed .hive-worker-sidebar-header {
	justify-content: center;
}

.hive-worker-sidebar.collapsed .hive-worker-sidebar-item {
	justify-content: center;
	padding: 0.65rem 0.4rem;
}

.hive-worker-sidebar-item:last-child {
	border-bottom: none;
}

.hive-worker-sidebar-item:hover {
	background-color: var(--hive-bg-elevated);
}

.hive-worker-sidebar-item.active,
.hive-worker-sidebar-item.active:hover {
	background: var(--hive-active-bg);
	border-left-color: var(--hive-accent-2);
}

.hive-worker-sidebar-item.active .hive-worker-sidebar-item-techname {
	color: color-mix(in srgb, var(--hive-on-bright) 70%, transparent);
}

.hive-worker-sidebar-item.active .hive-worker-sidebar-item-badge {
	background-color: var(--hive-active-text);
	color: var(--hive-accent);
}

.hive-worker-sidebar-item-label {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.hive-worker-sidebar-icon {
	width: 1.05rem;
	height: 1.05rem;
	color: var(--hive-text-muted);
}

.hive-worker-sidebar-item.active .hive-worker-sidebar-icon {
	color: var(--hive-active-text);
}

/* Collapsed rail (desktop): the module icon stays as the only identifier next to its status dot. */
.hive-worker-sidebar.collapsed .hive-worker-sidebar-item {
	flex-direction: column;
	gap: 0.3rem;
}

.hive-worker-sidebar-item-name {
	font-size: 0.85rem;
	color: var(--hive-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-worker-sidebar-item.active .hive-worker-sidebar-item-name {
	color: var(--hive-active-text);
	font-weight: 600;
}

.hive-worker-quick-toggle {
	flex: 0 0 auto;
}

.hive-worker-content {
	flex: 1 1 auto;
	min-width: 0;
}

.hive-worker-pane {
	display: none;
}

/* Keeps the last field of a worker's form from ever sitting flush under the sticky save bar below it. */
.hive-edit-section-container {
	padding-bottom: 1.5rem;
}

/* Save bar: sticky to the bottom of the content column (not the whole viewport, so it never covers the
   global instance footer), always reachable while a worker's form is open. */
.hive-save-bar {
	position: sticky;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	background-color: var(--hive-bg-elevated);
	border: 1px solid var(--hive-border);
	border-radius: 10px;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
}

.hive-save-bar-status {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.hive-save-bar-status-text {
	font-size: 0.85rem;
	font-weight: 600;
}

.hive-save-bar-status-text.hive-dirty {
	color: var(--hive-warning);
}

.hive-save-bar-status-text.hive-saving {
	color: var(--hive-accent);
}

.hive-save-bar-status-text.hive-saved {
	color: var(--hive-success);
}

.hive-save-bar-status-text.hive-error {
	color: var(--hive-danger);
}

.hive-save-bar-hint {
	font-size: 0.7rem;
	color: var(--hive-text-muted);
}

.hive-save-bar-actions {
	display: flex;
	gap: 0.5rem;
	flex: 0 0 auto;
}

/* Field-level help text / unit suffix / disabled dependent fields / "0 = unbegrenzt" toggle */

.hive-field-unit {
	font-weight: 400;
	color: var(--hive-text-muted);
	font-size: 0.8em;
}

/* --- Cockpit --- */

.hive-cockpit-empty {
	text-align: center;
	padding: 3rem 1.5rem;
}

.hive-cockpit-meta {
	font-size: 0.78rem;
	color: var(--hive-text-muted);
}

.hive-cockpit-meta.hive-stale {
	color: var(--hive-warning);
}

.hive-cockpit-header-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin-top: 0.5rem;
}

.hive-cockpit-header-stat {
	font-size: 0.85rem;
	color: var(--hive-text-muted);
}

.hive-cockpit-header-stat strong {
	color: var(--hive-text);
	font-weight: 600;
}

.hive-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

.hive-pill-success { background-color: color-mix(in srgb, var(--hive-success) 12%, var(--hive-bg)); color: var(--hive-success); border: 1px solid color-mix(in srgb, var(--hive-success) 45%, var(--hive-bg)); }
.hive-pill-warning { background-color: color-mix(in srgb, var(--hive-warning) 12%, var(--hive-bg)); color: var(--hive-warning); border: 1px solid color-mix(in srgb, var(--hive-warning) 45%, var(--hive-bg)); }
.hive-pill-danger { background-color: color-mix(in srgb, var(--hive-danger) 12%, var(--hive-bg)); color: var(--hive-danger); border: 1px solid color-mix(in srgb, var(--hive-danger) 45%, var(--hive-bg)); }
.hive-pill-muted { background-color: var(--hive-surface-alt); color: var(--hive-text-muted); border: 1px solid var(--hive-border); }

.hive-cockpit-grid {
	display: grid;
	/* minmax(0, 1fr), not plain 1fr - otherwise a grid track won't shrink below an unshrinkable child's
	   (e.g. the planets table) intrinsic min-content width, pushing the whole card past the viewport. */
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	margin-top: 1rem;
}

@media (min-width: 992px) {
	.hive-cockpit-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	.hive-cockpit-span-2 {
		grid-column: span 2;
	}
}

.hive-action-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.hive-action-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.6rem;
	padding: 0.55rem 0.75rem;
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
	border-left: 3px solid var(--hive-border);
	font-size: 0.85rem;
}

.hive-action-item.hive-action-danger { border-left-color: var(--hive-danger); }
.hive-action-item.hive-action-warning { border-left-color: var(--hive-warning); }

.hive-action-item-count {
	flex: 0 0 auto;
	font-size: 0.72rem;
	color: var(--hive-text-muted);
}

.hive-action-item-link {
	margin-left: auto;
	flex: 0 0 auto;
}

.hive-action-none {
	color: var(--hive-text-muted);
	font-size: 0.85rem;
	padding: 0.5rem 0;
}

.hive-slots-bar {
	display: flex;
	height: 10px;
	border-radius: 999px;
	overflow: hidden;
	background-color: var(--hive-bg-elevated);
	border: 1px solid var(--hive-border);
}

.hive-slots-bar-used { background-color: var(--hive-accent); }
.hive-slots-bar-free { background-color: transparent; }

.hive-slots-legend {
	display: flex;
	gap: 1rem;
	font-size: 0.75rem;
	color: var(--hive-text-muted);
	margin-top: 0.35rem;
}

.hive-slots-legend-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	margin-right: 0.3rem;
}

.hive-cockpit-planet-table th, .hive-cockpit-planet-table td {
	white-space: nowrap;
	font-size: 0.82rem;
}

.hive-resource-low {
	color: var(--hive-warning);
	font-weight: 600;
}

.hive-planet-row {
	cursor: pointer;
}

.hive-planet-toggle {
	display: inline-block;
	width: 0.9em;
	color: var(--hive-text-muted);
	transition: transform 0.15s ease;
}

.hive-planet-row-expanded .hive-planet-toggle {
	transform: rotate(90deg);
}

.hive-planet-detail-row td {
	background-color: var(--hive-bg-elevated);
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.hive-planet-detail {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	font-size: 0.82rem;
	white-space: nowrap;
}

.hive-planet-detail .hive-stat-label {
	margin-right: 0.4rem;
}

.hive-worker-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.6rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--hive-border);
	font-size: 0.85rem;
}

.hive-worker-row:last-child {
	border-bottom: none;
}

.hive-worker-row-name {
	flex: 1 1 auto;
	min-width: 0;
}

.hive-activity-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.hive-activity-item {
	font-size: 0.82rem;
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
}

.hive-activity-time {
	flex: 0 0 auto;
	color: var(--hive-text-muted);
	font-variant-numeric: tabular-nums;
}

.hive-activity-message {
	flex: 1 1 auto;
	min-width: 0;
}

.hive-more-actions summary {
	cursor: pointer;
	font-size: 0.78rem;
	color: var(--hive-accent);
	list-style: none;
}

.hive-more-actions summary::-webkit-details-marker {
	display: none;
}

.hive-more-actions summary::before {
	content: "▸ ";
}

.hive-more-actions[open] summary::before {
	content: "▾ ";
}

.hive-cockpit-module-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.15rem;
}

.hive-points-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-bottom: 0.5rem;
}

.hive-delta-up {
	color: var(--hive-success);
}

.hive-points-chart-wrap {
	position: relative;
}

.hive-points-chart {
	width: 100%;
	height: 60px;
	display: block;
}

.hive-points-axis-value {
	position: absolute;
	right: 2px;
	font-size: 0.65rem;
	color: var(--hive-text-muted);
	pointer-events: none;
}

.hive-points-axis-max {
	top: -2px;
}

.hive-points-axis-min {
	bottom: -2px;
}

.hive-points-axis {
	display: flex;
	justify-content: space-between;
	font-size: 0.68rem;
	color: var(--hive-text-muted);
	margin-top: 0.2rem;
}

.hive-fields-cell {
	min-width: 90px;
}

.hive-fields-cell span {
	font-size: 0.8rem;
}

.hive-fields-cell.hive-fields-high span {
	color: var(--hive-warning);
	font-weight: 600;
}

.hive-fields-cell.hive-fields-critical span {
	color: var(--hive-danger);
	font-weight: 600;
}

.hive-fields-bar {
	height: 5px;
	border-radius: 999px;
	background-color: var(--hive-bg-elevated);
	border: 1px solid var(--hive-border);
	overflow: hidden;
	margin-top: 0.2rem;
}

.hive-fields-bar-used {
	height: 100%;
	background-color: var(--hive-accent);
}

.hive-fields-cell.hive-fields-high .hive-fields-bar-used {
	background-color: var(--hive-warning);
}

.hive-fields-cell.hive-fields-critical .hive-fields-bar-used {
	background-color: var(--hive-danger);
}

.hive-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.hive-timeline-item {
	position: relative;
	padding-left: 1.1rem;
	padding-bottom: 0.65rem;
	font-size: 0.85rem;
	border-left: 1px solid var(--hive-border);
	margin-left: 0.2rem;
}

.hive-timeline-item:last-child {
	border-left-color: transparent;
	padding-bottom: 0;
}

.hive-timeline-dot {
	position: absolute;
	left: -0.31rem;
	top: 0.2rem;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--hive-accent);
}

.hive-timeline-time {
	color: var(--hive-text-muted);
	margin-right: 0.5rem;
}

/* Visually separates a destructive action (Instanzen "Löschen") from the normal action row next to it. */
.hive-danger-zone {
	padding-left: 0.6rem;
	margin-left: 0.2rem;
	border-left: 1px solid var(--hive-border);
}

.hive-field-range {
	font-weight: 400;
	color: var(--hive-text-muted);
	font-size: 0.75em;
	margin-left: 0.25rem;
}

.hive-celestial-picker {
	margin-bottom: 0.4rem;
}

.hive-field-help {
	margin: 0.15rem 0 0.35rem;
	line-height: 1.35;
}

.form-control:disabled,
.form-select:disabled,
.hive-field-toggle input[type="checkbox"]:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hive-field-toggle-inline {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	cursor: pointer;
}

.hive-zero-unlimited-input[readonly] {
	opacity: 0.6;
}

/* Inline field-level save-error message, injected by workers.js next to the offending field */
.hive-field-error {
	margin-top: 0.25rem;
	font-size: 0.78rem;
	color: var(--hive-danger);
}

.hive-field-error-input {
	border-color: var(--hive-danger) !important;
}

/* Group tabs for large workers (AutoFarm, Expeditions, ...) — Bootstrap's own tab component, no extra JS */
.hive-settings-tabbed .nav-tabs {
	border-bottom-color: var(--hive-border);
}

.hive-worker-pane.active {
	display: block;
}

@media (max-width: 768px) {
	.hive-worker-shell {
		flex-direction: column;
	}

	/* Stacked above the form: no longer sticky (a full-height sticky list would cover the form while scrolling),
	   instead a scrollable box of limited height. Selecting a module scrolls down to its form (workers.js). */
	.hive-worker-sidebar,
	.hive-worker-sidebar.collapsed {
		width: 100%;
		flex: 1 1 auto;
		position: static;
		max-height: 45vh;
	}

	/* "Einklappen" on a phone: instead of the narrow icon rail, only the currently selected module stays. */
	.hive-worker-sidebar.collapsed .hive-worker-sidebar-title,
	.hive-worker-sidebar.collapsed .hive-worker-sidebar-item-name {
		display: inline;
	}

	.hive-worker-sidebar.collapsed .hive-worker-quick-toggle {
		display: inline-flex;
	}

	.hive-worker-sidebar.collapsed .hive-worker-sidebar-header {
		justify-content: space-between;
	}

	.hive-worker-sidebar.collapsed .hive-worker-sidebar-item:not(.active) {
		display: none;
	}

	.hive-worker-sidebar.collapsed .hive-worker-sidebar-item {
		flex-direction: row;
		justify-content: space-between;
		padding: 0.65rem 0.9rem;
	}
}

/* --- Bot-Leiste (_Layout.cshtml): Botwechsel oben auf jeder bot-bezogenen Seite --- */

.hive-botbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.hive-botbar-bots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.hive-botbar-actions {
	display: flex;
	gap: 0.5rem;
	margin-left: auto;
}

.hive-botbar-bot {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background-color: var(--hive-bg-card);
	border: 1px solid var(--hive-border);
	border-radius: 999px;
	padding: 0.3rem 0.85rem;
	font-size: 0.85rem;
	color: var(--hive-text-muted);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.hive-botbar-bot:hover {
	color: var(--hive-text);
	border-color: var(--hive-accent-dim);
}

.hive-botbar-bot.active {
	color: var(--hive-active-text);
	background: var(--hive-active-bg);
	border-color: var(--hive-accent);
	font-weight: 600;
	cursor: default;
}

.hive-botbar-bot.active .hive-status-dot {
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--hive-bg) 55%, transparent);
}

/* --- Shared: player/universe header, status light, property|value tables --- */

.hive-instance-player {
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--hive-text);
	overflow-wrap: anywhere;
}

.hive-instance-universe {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--hive-highlight);
	margin-top: 0.1rem;
}

.hive-instance-lang {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0 0.35rem;
	border: 1px solid var(--hive-accent-dim);
	border-radius: 4px;
	font-size: 0.7rem;
	font-weight: 600;
	vertical-align: middle;
}

.hive-instance-alias {
	font-size: 0.75rem;
	color: var(--hive-text-muted);
	margin-top: 0.2rem;
}

/* Big status light: green = running, red = stopped, amber = starting. Always paired with its text label. */
.hive-status-light {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.4rem 0.8rem 0.4rem 0.55rem;
	border-radius: 999px;
	border: 1px solid var(--hive-border);
	background-color: var(--hive-bg-elevated);
	flex: 0 0 auto;
}

.hive-status-light-lamp {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--hive-text-muted);
}

.hive-status-light-text {
	font-size: 0.95rem;
	font-weight: 700;
}

.hive-status-light.is-running { border-color: color-mix(in srgb, var(--hive-success) 45%, var(--hive-bg)); }
.hive-status-light.is-running .hive-status-light-lamp { background-color: var(--hive-success); box-shadow: 0 0 10px var(--hive-success); }
.hive-status-light.is-running .hive-status-light-text { color: var(--hive-success); }

.hive-status-light.is-stopped { border-color: color-mix(in srgb, var(--hive-danger) 45%, var(--hive-bg)); }
.hive-status-light.is-stopped .hive-status-light-lamp { background-color: var(--hive-danger); box-shadow: 0 0 10px var(--hive-danger); }
.hive-status-light.is-stopped .hive-status-light-text { color: var(--hive-danger); }

.hive-status-light.is-starting { border-color: color-mix(in srgb, var(--hive-warning) 45%, var(--hive-bg)); }
.hive-status-light.is-starting .hive-status-light-lamp { background-color: var(--hive-warning); box-shadow: 0 0 10px var(--hive-warning); }
.hive-status-light.is-starting .hive-status-light-text { color: var(--hive-warning); }

.hive-kv-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.hive-kv-table th,
.hive-kv-table td {
	padding: 0.32rem 1rem;
	border-top: 1px solid var(--hive-border);
	vertical-align: top;
}

.hive-kv-table th {
	font-weight: 500;
	color: var(--hive-text-muted);
}

.hive-kv-table td {
	font-weight: 600;
	color: var(--hive-text);
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	width: 1%;
}

.hive-kv-table-flush th,
.hive-kv-table-flush td {
	padding-left: 0;
	padding-right: 0;
}

.hive-kv-table-flush tr:first-child th,
.hive-kv-table-flush tr:first-child td {
	border-top: none;
}

.hive-kv-label {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-text-muted);
	margin-right: 0.35rem;
}

.hive-kv-empty {
	color: var(--hive-text-muted);
	font-weight: 500;
}

/* --- Instanzen cards --- */

.hive-instance-card-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem 1rem 0.6rem;
}

.hive-instance-sleep {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0 1rem 0.75rem;
}

/* Identity banner (player, universe, alias, status, sleep, Start/Stop): a warm dark gradient from the logo's
   shadowed orange facet into its navy background, with a gold edge. Light text keeps >= 7:1 contrast on it
   (white ~13:1, the light secondary text ~9:1, the light-gold universe ~10:1). */
.hive-instance-card-banner {
	background: linear-gradient(135deg, #22446B 0%, #162C46 55%, var(--hive-surface) 100%);
	border-bottom: 2px solid var(--hive-accent);
	color: var(--hive-text);
	border-radius: 9px 9px 0 0;
}

/* Bots page: whole card tinted in the bot's state color (2026-09-30) */
.hive-instance-card.is-state-running { --hive-state: var(--hive-success-rgb); }
.hive-instance-card.is-state-sleeping { --hive-state: var(--hive-warning-rgb); }
.hive-instance-card.is-state-offline { --hive-state: var(--hive-danger-rgb); }

.hive-instance-card[class*="is-state-"] {
	background-color: rgba(var(--hive-state), 0.08);
	border-color: rgba(var(--hive-state), 0.55);
}

.hive-instance-card[class*="is-state-"] .hive-instance-card-banner {
	background: linear-gradient(135deg, rgba(var(--hive-state), 0.26) 0%, rgba(var(--hive-state), 0.08) 100%);
	border-bottom-color: rgb(var(--hive-state));
}

.hive-instance-card-banner .hive-instance-player {
	color: var(--hive-on-primary);
}

.hive-instance-card-banner .hive-instance-universe {
	color: var(--hive-highlight-hover);
}

.hive-instance-card-banner .hive-instance-alias,
.hive-instance-card-banner .hive-kv-label,
.hive-instance-card-banner .hive-kv-empty {
	color: var(--hive-text-secondary);
}

.hive-instance-card-banner .hive-instance-lang {
	border-color: var(--hive-primary-hover);
}

/* Status light and sleep pill keep their own dark backgrounds, so their green/red/amber stays readable. */
.hive-instance-card-banner .hive-status-light,
.hive-instance-card-banner .hive-pill {
	background-color: var(--hive-code-bg);
}

.hive-instance-card-banner .btn-outline-hive {
	border-color: var(--hive-border-light);
	color: var(--hive-on-primary);
}

/* Everything below the banner, collapsed by default (<details>, no JS). */
.hive-instance-details > summary {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 1rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--hive-text-muted);
	cursor: pointer;
	list-style: none;
}

.hive-instance-details > summary::-webkit-details-marker {
	display: none;
}

.hive-instance-details > summary::before {
	content: "\25B8";
	transition: transform 0.15s ease;
}

.hive-instance-details[open] > summary::before {
	transform: rotate(90deg);
}

.hive-instance-details > summary:hover {
	color: var(--hive-accent);
}

/* --- Cockpit header facts (sleep state, fleet slots, connection) --- */
.hive-cockpit-head-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem 1rem;
	font-size: 0.85rem;
}

/* --- Planet resources with storage fill bar (no capacity numbers) --- */
.hive-resource-cell {
	min-width: 110px;
}

.hive-resource-amount {
	font-variant-numeric: tabular-nums;
}

.hive-storage-bar {
	height: 6px;
	border-radius: 999px;
	background-color: var(--hive-bg);
	border: 1px solid var(--hive-border);
	overflow: hidden;
	margin-top: 0.2rem;
}

.hive-storage-bar-fill {
	height: 100%;
}

.hive-storage-bar.is-ok .hive-storage-bar-fill { background-color: var(--hive-success); }
.hive-storage-bar.is-high .hive-storage-bar-fill { background-color: var(--hive-warning); }
.hive-storage-bar.is-full .hive-storage-bar-fill { background-color: var(--hive-danger); }

.hive-storage-legend {
	display: inline-block;
	width: 10px;
	height: 6px;
	border-radius: 999px;
	margin-left: 0.5rem;
	vertical-align: middle;
}

.hive-storage-legend.is-ok { background-color: var(--hive-success); }
.hive-storage-legend.is-high { background-color: var(--hive-warning); }
.hive-storage-legend.is-full { background-color: var(--hive-danger); }

/* Instanzen card: property|value rows at half their normal height. */
.hive-instance-card .hive-kv-table {
	font-size: 0.7rem;
	line-height: 1.2;
}

.hive-instance-card .hive-kv-table th,
.hive-instance-card .hive-kv-table td {
	padding-top: 0.08rem;
	padding-bottom: 0.08rem;
}

.hive-instance-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.6rem 1rem;
	border-top: 1px solid var(--hive-border);
	background-color: color-mix(in srgb, var(--hive-bg) 60%, transparent);
	border-radius: 0 0 10px 10px;
}

.hive-instance-host {
	font-size: 0.72rem;
	color: var(--hive-text-muted);
	font-family: "Cascadia Code", Consolas, monospace;
}

.hive-manage-table th {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-text-muted) !important;
	font-weight: 600;
}

.hive-manage-table td {
	vertical-align: middle;
}

/* --- Module page: selection (sidebar) vs. activation (module header) --- */

.hive-worker-sidebar-dot {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.hive-worker-sidebar-dot.is-on {
	background-color: var(--hive-success);
	box-shadow: 0 0 6px var(--hive-success);
}

.hive-worker-sidebar-dot.is-off {
	background-color: transparent;
	border: 2px solid var(--hive-text-muted);
}

/* "Wird beendet": switched off, still building with resources on the way (vendor patch 20). */
.hive-worker-sidebar-dot.is-finishing {
	background-color: var(--hive-warning);
	border-color: var(--hive-warning);
	box-shadow: 0 0 6px var(--hive-warning);
}

.hive-module-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem 1.25rem;
}

.hive-module-head h2 .hive-pill {
	font-size: 0.72rem;
	vertical-align: middle;
	margin-left: 0.35rem;
}

.hive-module-desc {
	font-size: 0.85rem;
	color: var(--hive-text-muted);
	max-width: 62ch;
}

/* The one control on the page that takes effect immediately: boxed and labeled so it is never mistaken for
   a form field that needs the save button. */
.hive-module-activation {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.5rem 0.8rem;
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
	flex: 0 0 auto;
}

.hive-module-activation-label {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--hive-text);
}

/* Small "?" next to a module title — its title attribute holds the module description (native hover tooltip,
   also reachable by keyboard focus). */
.hive-help-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-left: 0.35rem;
	border-radius: 50%;
	border: 1px solid var(--hive-text-muted);
	color: var(--hive-text-muted);
	font-size: 0.72rem;
	font-weight: 700;
	vertical-align: middle;
	cursor: help;
}

.hive-help-icon:hover,
.hive-help-icon:focus {
	border-color: var(--hive-accent);
	color: var(--hive-accent);
	outline: none;
}

.hive-module-head {
	align-items: center;
}

.hive-status-card-disabled .hive-module-activation-label {
	color: var(--hive-text-muted);
}

.hive-worker-status-card .hive-worker-summary {
	color: var(--hive-text);
}

.hive-worker-state-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0.5rem 0 0.25rem;
}

.hive-save-bar-hint {
	max-width: 70ch;
}

/* Compact forms: tighter spacing, at most two columns (see _SettingFieldGroup.cshtml). */
.hive-settings-section {
	margin-bottom: 0.75rem;
}

.hive-field-grid .form-label {
	margin-bottom: 0.15rem;
	font-weight: 500;
	color: var(--hive-text);
}

.hive-field-grid .hive-field-help {
	font-size: 0.76rem;
	margin: 0 0 0.25rem;
}

.hive-section-intro {
	font-size: 0.8rem;
	color: var(--hive-text-muted);
	margin-bottom: 0.6rem;
}

/* Schlafplan: deviating weekdays as a stacked list of collapsible entries */
.hive-weekday-list {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.hive-weekday-item {
	border: 1px solid var(--hive-border);
	border-left: 3px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
}

.hive-weekday-item.is-deviating {
	border-left-color: var(--hive-accent);
}

.hive-weekday-item > summary {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.45rem 0.75rem;
	cursor: pointer;
	list-style: none;
}

.hive-weekday-item > summary::-webkit-details-marker {
	display: none;
}

.hive-weekday-item > summary::before {
	content: "\25B8";
	color: var(--hive-text-muted);
	transition: transform 0.15s ease;
}

.hive-weekday-item[open] > summary::before {
	transform: rotate(90deg);
}

.hive-weekday-name {
	font-weight: 600;
	min-width: 6.5rem;
}

.hive-weekday-summary {
	font-size: 0.8rem;
	color: var(--hive-text-muted);
}

.hive-weekday-item.is-deviating .hive-weekday-summary {
	color: var(--hive-accent);
}

.hive-weekday-body {
	padding: 0.25rem 0.75rem 0.7rem 1.9rem;
}

.hive-weekday-active {
	margin-bottom: 0.4rem;
}

.hive-weekday-body input[type="time"] {
	max-width: 140px;
}

/* --- Cockpit: compact warnings, merged module table --- */

.hive-action-summary {
	display: inline-flex;
	gap: 0.35rem;
}

.hive-action-list {
	gap: 0.3rem;
}

.hive-action-item {
	flex-wrap: nowrap;
	padding: 0.35rem 0.65rem;
	font-size: 0.84rem;
}

.hive-action-item-message {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-action-item-count {
	padding: 0 0.4rem;
	border-radius: 999px;
	background-color: var(--hive-bg);
	border: 1px solid var(--hive-border);
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--hive-text);
	font-variant-numeric: tabular-nums;
}

.hive-action-item-link {
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

.hive-cockpit-legend {
	font-size: 0.72rem;
	color: var(--hive-text-muted);
	text-align: right;
}

.hive-module-table th {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-text-muted) !important;
	font-weight: 600;
	white-space: nowrap;
}

.hive-module-table td {
	font-size: 0.85rem;
	vertical-align: middle;
}

.hive-module-reason {
	color: var(--hive-text);
}

.hive-module-when {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.hive-module-clock {
	color: var(--hive-text-muted);
	font-size: 0.78rem;
	margin-left: 0.2rem;
}

@media (max-width: 576px) {
	.hive-action-item {
		flex-wrap: wrap;
	}

	.hive-action-item-message {
		white-space: normal;
	}

	.hive-instance-card-head {
		flex-direction: column;
	}
}

/* --- Skripte: sidebar | editor/library | per-script log --- */

.hive-scripts {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr) minmax(260px, 30%);
	gap: 0.75rem;
	height: calc(100vh - 170px);
	min-height: 520px;
}

.hive-scripts-sidebar,
.hive-scripts-main,
.hive-scripts-log {
	background-color: var(--hive-bg-card);
	border: 1px solid var(--hive-border);
	border-radius: 10px;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.hive-scripts-sidebar-head,
.hive-scripts-log-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-scripts-instance {
	margin-left: auto;
	font-size: 0.75rem;
	color: var(--hive-accent);
}

.hive-scripts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1 1 auto;
}

.hive-scripts-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--hive-border);
	border-left: 3px solid transparent;
	cursor: pointer;
	font-size: 0.85rem;
}

.hive-scripts-item:hover {
	background-color: var(--hive-bg-elevated);
}

.hive-scripts-item.active {
	background-color: var(--hive-bg-elevated);
	border-left-color: var(--hive-accent);
}

.hive-scripts-item-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-scripts-item.active .hive-scripts-item-name {
	color: var(--hive-accent);
	font-weight: 600;
}

.hive-scripts-auto {
	font-size: 0.62rem;
	font-weight: 700;
	padding: 0 0.3rem;
	border-radius: 4px;
	border: 1px solid var(--hive-accent-dim);
	color: var(--hive-accent);
}

.hive-scripts-dot {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--hive-text-muted);
}

.hive-scripts-dot.is-running { background-color: var(--hive-success); border-color: var(--hive-success); box-shadow: 0 0 6px var(--hive-success); }
.hive-scripts-dot.is-paused { background-color: var(--hive-warning); border-color: var(--hive-warning); }
.hive-scripts-dot.is-error { background-color: var(--hive-danger); border-color: var(--hive-danger); }

.hive-scripts-empty {
	padding: 0.75rem;
	font-size: 0.82rem;
	color: var(--hive-text-muted);
}

.hive-scripts-sidebar-actions {
	display: flex;
	gap: 0.4rem;
	padding: 0.6rem 0.75rem;
	border-top: 1px solid var(--hive-border);
}

.hive-scripts-upload {
	padding: 0.5rem 0.75rem;
	border-top: 1px solid var(--hive-border);
}

.hive-scripts-upload-label {
	display: block;
	font-size: 0.72rem;
	color: var(--hive-text-muted);
	margin-bottom: 0.25rem;
}

.hive-scripts-upload-result {
	padding: 0 0.75rem 0.6rem;
	font-size: 0.75rem;
	overflow-wrap: anywhere;
}

.hive-scripts-upload-result.is-ok { color: var(--hive-success); }
.hive-scripts-upload-result.is-error { color: var(--hive-danger); }

.hive-scripts-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 0.6rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-scripts-toolbar .btn.active {
	border-color: var(--hive-accent);
	color: var(--hive-accent);
}

.hive-scripts-toolbar-sep {
	width: 1px;
	align-self: stretch;
	background-color: var(--hive-border);
	margin: 0 0.2rem;
}

.hive-btn-run {
	background-color: #3F9A3A;
	border-color: #3F9A3A;
	color: var(--hive-on-primary);
	font-weight: 600;
}

.hive-btn-run:hover { background-color: #4CB046; color: var(--hive-on-primary); }

.hive-btn-stop {
	background-color: #C43D3D;
	border-color: #C43D3D;
	color: var(--hive-on-primary);
	font-weight: 600;
}

.hive-btn-stop:hover { background-color: #D94F4F; color: var(--hive-on-primary); }

.hive-btn-run:disabled,
.hive-btn-stop:disabled {
	opacity: 0.4;
	color: var(--hive-on-primary);
}

.hive-scripts-autostart {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.82rem;
	margin-left: 0.3rem;
	cursor: pointer;
}

.hive-scripts-status {
	margin-left: auto;
	font-size: 0.78rem;
	color: var(--hive-warning);
}

.hive-scripts-status.is-flash {
	color: var(--hive-success);
}

.hive-scripts-editor-wrap {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
}

.hive-scripts-editor-wrap[hidden],
.hive-scripts-library[hidden] {
	display: none;
}

.hive-scripts-placeholder {
	margin: auto;
	color: var(--hive-text-muted);
	font-size: 0.9rem;
}

/* Code editor: line-number gutter + a highlighted <pre> exactly underneath a transparent <textarea>. Both
   share one font/size/line-height/padding so the colored text lines up with the caret pixel for pixel. */
.hive-code {
	flex: 1 1 auto;
	display: flex;
	min-height: 0;
	font-family: "Cascadia Code", Consolas, "Courier New", monospace;
	font-size: 0.8rem;
	line-height: 1.45;
	background-color: var(--hive-code-bg);
	border-radius: 0 0 10px 10px;
	overflow: hidden;
}

.hive-code[hidden] {
	display: none;
}

/* Skript-Formular (const FORM = { ... }): wird statt des Codes gezeigt, Umschalter in der Werkzeugleiste */
.hive-script-view .btn.active {
	background-color: var(--hive-primary);
	border-color: var(--hive-primary);
	color: var(--hive-on-primary);
}

.hive-script-form {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.hive-script-form[hidden] { display: none; }

.hive-script-form-head {
	padding: 0.9rem 1rem 0.25rem;
}

.hive-script-form-title {
	font-size: 1.05rem;
	margin: 0;
}

.hive-script-form-desc {
	color: var(--hive-text-muted);
	font-size: 0.85rem;
	margin: 0.25rem 0 0;
	white-space: pre-line;
}

.hive-script-form-desc:empty { display: none; }

.hive-script-form-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 0.5rem 1rem;
}

.hive-sf-section {
	background-color: var(--hive-bg-elevated);
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	margin-bottom: 0.75rem;
	padding: 0.5rem 0.9rem;
}

.hive-sf-section-title {
	font-weight: 600;
	cursor: pointer;
	padding: 0.2rem 0;
}

.hive-sf-section-desc {
	color: var(--hive-text-muted);
	font-size: 0.8rem;
	margin: 0.25rem 0 0.5rem;
}

.hive-sf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.6rem 1rem;
	padding: 0.5rem 0 0.25rem;
}

.hive-sf-field.is-wide { grid-column: 1 / -1; }

.hive-sf-label {
	display: block;
	font-size: 0.8rem;
	margin-bottom: 0.2rem;
}

.hive-sf-field .hive-bool-head .hive-sf-label {
	display: inline;
	margin: 0;
}

.hive-sf-help {
	color: var(--hive-text-muted);
	font-size: 0.75rem;
	margin-top: 0.2rem;
}

.hive-sf-error {
	color: var(--hive-danger);
	font-size: 0.75rem;
}

.hive-sf-error:empty { display: none; }

.hive-sf-field.is-invalid .form-control,
.hive-sf-field.is-invalid .form-select {
	border-color: var(--hive-danger);
}

.hive-sf-checks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.2rem 1rem;
	max-height: 14rem;
	overflow-y: auto;
}

.hive-sf-check {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
}

.hive-sf-check .form-check-input { margin: 0; }

.hive-script-form-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1rem;
	border-top: 1px solid var(--hive-border);
}

.hive-script-form-status { font-size: 0.8rem; }
.hive-script-form-status.is-ok { color: var(--hive-success); }
.hive-script-form-status.is-error { color: var(--hive-danger); }

.hive-code-gutter {
	flex: 0 0 auto;
	min-width: 3.2em;
	padding: 0.5rem 0.5rem 0.5rem 0.4rem;
	text-align: right;
	white-space: pre;
	color: var(--hive-text-faint);
	background-color: var(--hive-code-bg);
	border-right: 1px solid var(--hive-border);
	overflow: hidden;
	user-select: none;
}

.hive-code-area {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.hive-code-highlight,
.hive-code-input {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 0;
	font: inherit;
	line-height: inherit;
	white-space: pre;
	tab-size: 4;
	overflow: auto;
}

.hive-code-highlight {
	color: var(--hive-text);
	pointer-events: none;
	overflow: hidden;
}

.hive-code-input {
	color: transparent;
	caret-color: var(--hive-accent);
	background: transparent;
	resize: none;
	outline: none;
}

.hive-code-input::selection {
	background-color: color-mix(in srgb, var(--hive-accent) 28%, transparent);
	color: transparent;
}

.tk-c { color: var(--hive-text-faint); font-style: italic; }
.tk-s { color: #9fd07a; }
.tk-n { color: #d19a66; }
.tk-k { color: #c678dd; }
.tk-f { color: var(--hive-accent); }
.tk-x { color: #7fc8f8; }

/* Bibliothek */
.hive-scripts-library {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.hive-scripts-library-head {
	display: flex;
	gap: 0.5rem;
	padding: 0.6rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-scripts-library-body {
	overflow-y: auto;
	padding: 0.6rem 0.9rem 1rem;
}

.hive-library-intro {
	margin-bottom: 0.6rem;
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
}

.hive-library-intro > summary {
	padding: 0.45rem 0.75rem;
	font-weight: 600;
	cursor: pointer;
}

.hive-library-text {
	padding: 0 0.75rem 0.5rem;
	font-size: 0.84rem;
}

.hive-library-text p {
	margin-bottom: 0.45rem;
}

.hive-library-category-title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-accent);
	margin: 1rem 0 0.4rem;
}

.hive-library-entry {
	padding: 0.55rem 0.7rem;
	margin-bottom: 0.4rem;
	border: 1px solid var(--hive-border);
	border-left: 3px solid var(--hive-accent-dim);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
}

.hive-library-sig code {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--hive-accent);
}

.hive-library-desc {
	font-size: 0.83rem;
	margin: 0.2rem 0;
}

.hive-library-returns {
	font-size: 0.78rem;
}

.hive-library-returns code {
	color: var(--hive-highlight-hover);
	white-space: normal;
}

.hive-library-example {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-top: 0.35rem;
}

.hive-library-code {
	flex: 1 1 auto;
	margin: 0;
	padding: 0.4rem 0.6rem;
	font-family: "Cascadia Code", Consolas, monospace;
	font-size: 0.76rem;
	background-color: var(--hive-code-bg);
	border-radius: 6px;
	color: var(--hive-text);
	white-space: pre-wrap;
}

/* Right: script log */
.hive-scripts-log-name {
	font-size: 0.78rem;
	color: var(--hive-accent);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-scripts-log-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 0.4rem 0.6rem;
	font-family: "Cascadia Code", Consolas, monospace;
	font-size: 0.74rem;
	line-height: 1.4;
	background-color: var(--hive-code-bg);
	border-radius: 0 0 10px 10px;
}

.hive-scripts-log-line {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.hive-scripts-log-time {
	color: var(--hive-text-faint);
	margin-right: 0.5rem;
}

.hive-scripts-log-line.is-warn { color: var(--hive-warning); }
.hive-scripts-log-line.is-error { color: var(--hive-danger); }
.hive-scripts-log-line.is-debug { color: var(--hive-text-faint); }
.hive-scripts-log-line.is-system { color: var(--hive-accent); }

@media (max-width: 1100px) {
	.hive-scripts {
		grid-template-columns: 220px minmax(0, 1fr);
		height: auto;
	}

	.hive-scripts-main {
		min-height: 520px;
	}

	.hive-scripts-log {
		grid-column: span 2;
		height: 320px;
	}
}

/* --- Skript-Bibliothek (own page/tab): areas with collapsible categories --- */

.hive-library-page {
	max-width: 1100px;
	margin: 0 auto;
}

.hive-library-page-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 0.75rem;
	margin-bottom: 0.4rem;
}

.hive-library-page-tools {
	display: flex;
	gap: 0.4rem;
	flex: 1 1 420px;
	max-width: 620px;
}

.hive-library-page-tools input {
	flex: 1 1 auto;
}

.hive-library-hits {
	min-height: 1.2rem;
	margin-bottom: 0.4rem;
}

.hive-library-area {
	margin-bottom: 1rem;
}

.hive-library-area-title {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hive-accent);
	margin: 0.9rem 0 0.4rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-library-cat {
	margin-bottom: 0.35rem;
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-card);
}

.hive-library-cat[open] {
	background-color: var(--hive-bg-elevated);
}

.hive-library-cat > summary {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0.8rem;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
}

.hive-library-cat > summary::-webkit-details-marker {
	display: none;
}

.hive-library-cat > summary::before {
	content: "\25B8";
	color: var(--hive-text-muted);
	transition: transform 0.15s ease;
}

.hive-library-cat[open] > summary::before {
	transform: rotate(90deg);
}

.hive-library-count {
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0 0.45rem;
	border-radius: 999px;
	color: var(--hive-accent);
	border: 1px solid var(--hive-accent-dim);
}

/* Preview of the function names in a collapsed category - hidden once it's open. */
.hive-library-names {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--hive-text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: "Cascadia Code", Consolas, monospace;
}

.hive-library-cat[open] .hive-library-names {
	visibility: hidden;
}

.hive-library-cat > .hive-library-entry,
.hive-library-cat > .hive-library-text,
.hive-library-cat > .hive-library-code,
.hive-library-cat > .hive-library-example {
	margin: 0 0.8rem 0.6rem;
}

.hive-library-cat > .hive-library-entry:first-of-type {
	margin-top: 0.2rem;
}

.hive-library-entry.is-highlight {
	border-color: var(--hive-accent);
	box-shadow: 0 0 0 1px var(--hive-accent);
}

/* --- Port-Konflikt (zwei Instanzen auf demselben ogamed-Port) + Vorlagen-Seite --- */
.hive-port-conflict {
	color: var(--hive-warning);
	font-size: 0.78rem;
	white-space: normal;
}
.hive-json-textarea {
	font-family: 'Cascadia Code', Consolas, monospace;
	font-size: 0.85rem;
}
.hive-section-chip {
	display: inline-block;
	margin: 0 0.25rem 0.25rem 0;
	padding: 0.1rem 0.45rem;
	border-radius: 0.3rem;
	border: 1px solid var(--hive-border);
	font-family: 'Cascadia Code', Consolas, monospace;
	font-size: 0.75rem;
	cursor: pointer;
	background: transparent;
	color: inherit;
}
.hive-section-chip:hover { border-color: var(--hive-accent); }

/* --- Smartphone (Bootstrap md = 768px collapses the navbar; sm = 576px is a phone in portrait) --- */

/* Collapsed main navigation: the tabs wrap as pills below the brand instead of overflowing one row. */
@media (max-width: 767.98px) {
	.hive-navbar .navbar-toggler {
		border-color: var(--hive-border);
	}

	.hive-navbar .navbar-toggler:focus {
		box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--hive-accent) 25%, transparent);
	}

	.hive-navbar .navbar-nav {
		gap: 0.3rem;
		padding-top: 0.6rem;
	}

	.hive-navbar .nav-link {
		margin: 0;
	}

	.hive-nav-divider {
		flex-basis: 100%;
		height: 1px;
		width: auto;
		margin: 0.1rem 0;
	}

	/* Skripte: sidebar, editor and log stacked in one column. */
	.hive-scripts {
		grid-template-columns: minmax(0, 1fr);
		height: auto;
		min-height: 0;
	}

	.hive-scripts-list {
		max-height: 30vh;
	}

	.hive-scripts-main {
		min-height: 65vh;
	}

	.hive-scripts-log {
		grid-column: auto;
		height: 280px;
	}

	.hive-scripts-status {
		margin-left: 0;
		flex-basis: 100%;
	}

	.hive-iframe-wrap {
		height: calc(100vh - 190px);
		min-height: 420px;
	}
}

@media (max-width: 575.98px) {
	.container-fluid.px-4 {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	.hive-navbar.mb-4 {
		margin-bottom: 1rem !important;
	}

	/* Section headers (e.g. Cockpit "Module" with its legend): legend wraps below the title. */
	.hive-settings-section-header {
		flex-wrap: wrap;
	}

	.hive-cockpit-legend {
		text-align: left;
	}

	.hive-instance-player {
		font-size: 1.2rem;
	}

	.hive-kv-table th,
	.hive-kv-table td {
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}

	.hive-save-bar {
		gap: 0.4rem;
		padding: 0.5rem 0.75rem;
	}

	.hive-save-bar-hint {
		display: none;
	}

	.hive-save-bar-actions {
		flex: 1 1 100%;
	}

	.hive-save-bar-actions .btn {
		flex: 1 1 auto;
		white-space: nowrap;
	}

	.hive-module-activation {
		flex: 1 1 100%;
	}

	/* Logs: each entry as a compact block (time · level · sender, message below) instead of a 5-column
	   table; the bot column is dropped — the bot is already chosen in the bot bar above. */
	.hive-log-table thead {
		display: none;
	}

	.hive-log-table,
	.hive-log-table tbody {
		display: block;
	}

	.hive-log-table tr {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0.1rem 0.6rem;
		padding: 0.45rem 0.7rem;
		border-bottom: 1px solid var(--hive-border);
	}

	.table.hive-log-table > tbody > tr > td {
		display: block;
		padding: 0;
		border: 0;
		font-size: 0.8rem;
	}

	.table.hive-log-table > tbody > tr > td:nth-child(4) {
		display: none;
	}

	.table.hive-log-table > tbody > tr > td:nth-child(5),
	.table.hive-log-table > tbody > tr > td[colspan] {
		flex-basis: 100%;
		overflow-wrap: anywhere;
	}
}

/* --- Cockpit (2026-09-25): Kopf | Handlungsbedarf, Punkte | Rohstoffe, dann Himmelskörper/Aktivitäten --- */

.hive-cockpit-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

@media (min-width: 992px) {
	.hive-cockpit-layout {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.hive-cockpit-layout .hive-cockpit-span-2 {
		grid-column: span 2;
	}
}

/* Kästen aus Skripten (SetDashboardCard): Statusfarbe nur als linker Rand */
.hive-script-card { border-left: 3px solid var(--hive-info); }
.hive-script-card.is-success { border-left-color: var(--hive-success); }
.hive-script-card.is-warning { border-left-color: var(--hive-warning); }
.hive-script-card.is-danger { border-left-color: var(--hive-danger); }

.hive-script-card-text {
	white-space: pre-line;
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
}

.hive-script-card-rows {
	width: 100%;
	font-size: 0.85rem;
}

.hive-script-card-rows th {
	color: var(--hive-text-muted);
	font-weight: 400;
	padding: 0.15rem 0.75rem 0.15rem 0;
	white-space: nowrap;
	vertical-align: top;
	width: 1%;
}

.hive-script-card-rows td {
	padding: 0.15rem 0;
	word-break: break-word;
}

.hive-script-card-foot {
	margin-top: 0.5rem;
	font-size: 0.75rem;
	color: var(--hive-text-muted);
}

.hive-script-card-remove {
	background: none;
	border: 0;
	color: var(--hive-text-muted);
	font-size: 1.1rem;
	line-height: 1;
	padding: 0 0.25rem;
}

.hive-script-card-remove:hover { color: var(--hive-danger); }

.hive-cockpit-header-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.hive-cockpit-meta {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.hive-status-light.is-sleeping { border-color: color-mix(in srgb, var(--hive-warning) 45%, var(--hive-bg)); }
.hive-status-light.is-sleeping .hive-status-light-lamp { background-color: var(--hive-warning); box-shadow: 0 0 10px var(--hive-warning); }
.hive-status-light.is-sleeping .hive-status-light-text { color: var(--hive-warning); }

/* Handlungsbedarf: three envelopes, colored by level, with a count badge */
.hive-letters {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.6rem;
	margin-bottom: 0.75rem;
}

.hive-letter {
	--level-color: var(--hive-level-note);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	padding: 0.6rem 0.4rem 0.5rem;
	background-color: var(--hive-bg-elevated);
	border: 1px solid var(--hive-border);
	border-bottom: 3px solid var(--level-color);
	border-radius: 8px;
	color: var(--hive-text);
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hive-letter-warning { --level-color: var(--hive-level-warn); }
.hive-letter-danger { --level-color: var(--hive-level-crit); }

.hive-letter:hover:not(:disabled) {
	background-color: color-mix(in srgb, var(--level-color) 10%, var(--hive-bg-elevated));
}

.hive-letter.is-open {
	border-color: var(--level-color);
	background-color: color-mix(in srgb, var(--level-color) 16%, var(--hive-bg-elevated));
}

.hive-letter.is-empty {
	opacity: 0.4;
	cursor: default;
}

.hive-letter-icon {
	position: relative;
	color: var(--level-color);
}

.hive-letter-icon .hive-icon {
	width: 2rem;
	height: 2rem;
}

.hive-letter-count {
	position: absolute;
	top: -0.45rem;
	right: -0.75rem;
	min-width: 1.3rem;
	height: 1.3rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background-color: var(--level-color);
	color: var(--hive-on-bright);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.3rem;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.hive-letter-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--hive-text-muted);
}

.hive-action-item.hive-action-note { border-left-color: var(--hive-level-note); }
.hive-action-item.hive-action-warning { border-left-color: var(--hive-level-warn); }
.hive-action-item.hive-action-danger { border-left-color: var(--hive-level-crit); }

.hive-letter-headline .hive-action-item-message {
	white-space: normal;
	font-weight: 600;
}

/* Punkteentwicklung */
.hive-points-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
}

.hive-points-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.2rem 0.55rem;
	border: 1px solid var(--hive-border);
	border-radius: 999px;
	background-color: var(--hive-bg-elevated);
	color: var(--hive-text);
	font-size: 0.78rem;
	cursor: pointer;
}

.hive-points-chip strong {
	font-variant-numeric: tabular-nums;
}

.hive-points-chip-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: var(--series-color);
	align-self: center;
}

.hive-points-chip-label {
	color: var(--hive-text-muted);
}

.hive-points-chip.is-off {
	opacity: 0.45;
}

.hive-points-chip.is-off .hive-points-chip-dot {
	background-color: transparent;
	border: 2px solid var(--series-color);
}

.hive-delta-down {
	color: var(--hive-danger);
}

.hive-points-chart-host .hive-points-chart {
	width: 100%;
	height: auto;
	display: block;
}

.hive-points-grid {
	stroke: var(--hive-border);
	stroke-width: 1;
}

.hive-points-axis-text {
	fill: var(--hive-text-faint);
	font-size: 11px;
}

/* Rohstoffe: three columns (Metall | Kristall | Deuterium) */
.hive-res-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.6rem;
}

.hive-res-col {
	--res-color: var(--hive-res-metal);
	padding: 0.6rem 0.7rem;
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
	border-top: 3px solid var(--res-color);
	min-width: 0;
}

.hive-res-crystal { --res-color: var(--hive-res-crystal); }
.hive-res-deuterium { --res-color: var(--hive-res-deuterium); }

/* MSU (1:2:3) - full-width row below the three resources */
.hive-res-msu {
	--res-color: var(--hive-res-msu);
	grid-column: 1 / -1;
}

.hive-res-msu-ratio {
	font-weight: 600;
	color: var(--hive-text-faint);
	letter-spacing: 0;
}

.hive-res-msu-values {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1rem;
}

.hive-res-name {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--res-color);
}

.hive-res-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: var(--res-color, var(--hive-res-darkmatter));
	flex: 0 0 auto;
}

.hive-res-total {
	font-size: 1.15rem;
	font-weight: 700;
	margin-top: 0.25rem;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.hive-res-rate {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hive-success);
	font-variant-numeric: tabular-nums;
}

.hive-res-day {
	font-size: 0.72rem;
	color: var(--hive-text-faint);
	font-variant-numeric: tabular-nums;
}

.hive-res-dm {
	--res-color: var(--hive-res-darkmatter);
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.7rem;
	font-size: 0.85rem;
	color: var(--hive-text-muted);
}

.hive-res-dm strong {
	color: var(--hive-res-darkmatter);
	font-variant-numeric: tabular-nums;
}

.hive-res-metal-text { color: var(--hive-res-metal) !important; }
.hive-res-crystal-text { color: var(--hive-res-crystal) !important; }
.hive-res-deuterium-text { color: var(--hive-res-deuterium) !important; }
.hive-res-energy-text { color: var(--hive-res-energy) !important; }

/* Planet table: amounts colored by storage fill, energy by sign */
.table > :not(caption) > * > .hive-fill-high,
.hive-fill-sample.hive-fill-high { color: var(--hive-warning); font-weight: 600; }
.table > :not(caption) > * > .hive-fill-crit,
.hive-fill-sample.hive-fill-crit { color: var(--hive-danger); font-weight: 700; }
.table > :not(caption) > * > .hive-energy-pos { color: var(--hive-success); }
.table > :not(caption) > * > .hive-energy-neg { color: var(--hive-danger); font-weight: 700; }

.hive-fill-sample {
	font-weight: 600;
	color: var(--hive-text);
}

/* Small tabs inside a card header (Planeten | Monde) */
.hive-subtabs {
	display: inline-flex;
	gap: 0.25rem;
	padding: 0.15rem;
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
}

.hive-subtab {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.65rem;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--hive-text-muted);
	font-size: 0.8rem;
	font-weight: 600;
}

.hive-subtab.active {
	background: var(--hive-active-bg);
	color: var(--hive-active-text);
}

.hive-subtab:disabled {
	opacity: 0.45;
}

.hive-subtab-count {
	font-size: 0.7rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background-color: rgba(0, 0, 0, 0.18);
}

.hive-settings-section-title {
	display: inline-flex;
	align-items: center;
}

@media (max-width: 575.98px) {
	.hive-res-grid {
		gap: 0.4rem;
	}

	.hive-res-col {
		padding: 0.5rem;
	}

	.hive-res-total {
		font-size: 0.95rem;
	}

	.hive-res-rate {
		font-size: 0.75rem;
	}
}

/* Lebensformen-Forschung: Tier 1 | Tier 2 | Tier 3, slots 1|2 / 3|4 / 5|6 (Views/Workers/_SettingFieldGroup.cshtml) */
.hive-tier-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.hive-tier {
	padding: 0.5rem 0.6rem 0.6rem;
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
}

.hive-tier-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hive-accent);
	margin-bottom: 0.4rem;
}

.hive-tier-slots {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.4rem 0.5rem;
}

.hive-tier-slot {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
}

.hive-tier-slot-label {
	flex: 0 0 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background-color: var(--hive-bg);
	border: 1px solid var(--hive-border);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.3rem;
	text-align: center;
	color: var(--hive-text-muted);
}

.hive-tier-slot input {
	min-width: 0;
}

@media (max-width: 575.98px) {
	.hive-tier-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* --- Spielen: Zahnrad "Spiel-Einstellungen" (Addons wie OGLight) --- */
/* The panel is aligned to the right edge of the whole action bar (not the gear), so it never runs off the
   left side of a narrow screen. */
.hive-botbar-actions {
	position: relative;
}

.hive-play-gear {
	display: inline-flex;
	align-items: center;
	height: 100%;
}

.hive-play-settings-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 0.4rem);
	z-index: 20;
	width: min(340px, calc(100vw - 2.25rem));
	padding: 0.75rem 0.85rem;
	background-color: var(--hive-surface);
	border: 1px solid var(--hive-border-light);
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.hive-play-settings-title {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--hive-text-muted);
	margin-bottom: 0.6rem;
}

.hive-play-settings-option {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	cursor: pointer;
}

.hive-play-settings-option .hive-field-toggle {
	margin-top: 0.1rem;
}

.hive-play-settings-status {
	min-height: 1.2rem;
	margin-top: 0.5rem;
	color: var(--hive-text-muted);
}

.hive-play-settings-status.is-error {
	color: var(--hive-danger);
}


/* Dashboard "Nächste Schritte": buildings | research, three numbered steps each */
.hive-buildplan {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.hive-buildplan-col {
	padding: 0.6rem 0.7rem;
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
	min-width: 0;
}

.hive-buildplan-title {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--hive-accent);
	margin-bottom: 0.35rem;
}

.hive-buildplan-list {
	margin: 0;
	padding-left: 1.2rem;
}

.hive-buildplan-list li {
	padding: 0.15rem 0;
}

.hive-buildplan-list li span:first-child {
	font-weight: 600;
}

.hive-buildplan-level {
	margin-left: 0.4rem;
	font-size: 0.8rem;
	color: var(--hive-text-muted);
	font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
	.hive-buildplan {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Module settings: own planets/moons as a checklist / radio list (workers.js setupCelestialPickers) */
.hive-celestial-checklist-ui,
.hive-celestial-radios {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.25rem 0.75rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--hive-border);
	border-radius: 8px;
	background-color: var(--hive-bg-elevated);
	max-height: 22rem;
	overflow-y: auto;
}

.hive-celestial-checklist-tools {
	grid-column: 1 / -1;
	display: flex;
	gap: 0.75rem;
	font-size: 0.8rem;
}

.hive-celestial-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.2rem 0.3rem;
	border-radius: 6px;
	cursor: pointer;
	min-width: 0;
}

.hive-celestial-row:hover {
	background-color: var(--hive-surface-hover);
}

.hive-celestial-row input {
	flex: 0 0 auto;
	accent-color: var(--hive-primary);
}

.hive-celestial-row-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
}

.hive-celestial-row-text,
.hive-celestial-row-sub {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-celestial-row-sub {
	font-size: 0.75rem;
	color: var(--hive-text-muted);
}

.hive-celestial-row-foreign .hive-celestial-row-text,
.hive-celestial-row-manual .hive-celestial-row-text {
	color: var(--hive-text-muted);
	font-style: italic;
}

/* Single own planet/moon: a plain dropdown instead of the radio list (2026-09-30) */
.hive-celestial-radios {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	max-height: none;
	overflow: visible;
}

/* Own planets/moons as a table: planets left, moons right, one row per position */
.hive-celestial-checklist .hive-celestial-checklist-ui {
	display: block;
}

/* ... collapsed by default, the header shows the selection */
.hive-celestial-checklist .hive-celestial-checklist-ui:has(> .hive-celestial-details:not([open])) {
	max-height: none;
	overflow: visible;
}

.hive-celestial-summary {
	cursor: pointer;
	font-size: 0.85rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-celestial-details[open] > .hive-celestial-summary {
	margin-bottom: 0.4rem;
}

.hive-celestial-checklist .hive-celestial-checklist-tools {
	margin-bottom: 0.35rem;
}

.hive-celestial-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.hive-celestial-table th {
	position: sticky;
	top: -0.5rem;
	z-index: 1;
	background-color: var(--hive-bg-elevated);
	font-weight: 500;
	font-size: 0.75rem;
	color: var(--hive-text-muted);
	text-align: left;
	padding: 0.15rem 0.3rem 0.3rem;
	border-bottom: 1px solid var(--hive-border);
}

.hive-celestial-table td {
	padding: 0.1rem 0.2rem;
	border-bottom: 1px solid color-mix(in srgb, var(--hive-border) 45%, transparent);
	vertical-align: middle;
	width: 42%;
}

.hive-celestial-table td.hive-celestial-coords {
	width: 16%;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--hive-text-muted);
}

.hive-celestial-table tr:last-child td {
	border-bottom: 0;
}

.hive-celestial-cell {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.2rem 0.3rem;
	border-radius: 6px;
	cursor: pointer;
	min-width: 0;
	margin: 0;
}

.hive-celestial-cell:hover {
	background-color: var(--hive-surface-hover);
}

.hive-celestial-cell input {
	flex: 0 0 auto;
	accent-color: var(--hive-primary);
}

.hive-celestial-cell-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hive-celestial-cell.hive-celestial-row-foreign .hive-celestial-cell-name {
	color: var(--hive-text-muted);
	font-style: italic;
}

.hive-celestial-icon {
	display: inline-flex;
	flex: 0 0 auto;
	margin-right: 0.15rem;
	color: var(--hive-accent);
}

.hive-celestial-icon svg {
	width: 1rem;
	height: 1rem;
}

.hive-celestial-table th .hive-celestial-icon {
	vertical-align: -0.2rem;
}

/* Switch in front of its label (module forms, OGLight module); the explanation follows below */
.hive-bool-head {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 0.25rem;
}

.hive-bool-head .form-label {
	cursor: pointer;
	line-height: 1.25;
}

/* Range pairs (von/bis, Minimum/Maximum) on one line - _SettingFieldGroup, FieldPairs */
.hive-range-pair-parts {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.hive-range-part {
	flex: 1 1 9rem;
	min-width: 0;
	max-width: 18rem;
}

.hive-range-part .form-label {
	color: var(--hive-text-muted);
}

.hive-range-sep {
	flex: 0 0 auto;
	padding-bottom: 0.3rem;
	color: var(--hive-text-muted);
}

.hive-range-part.hive-field-disabled,
.hive-fleet-composition.hive-field-disabled {
	opacity: 0.55;
}

/* Manual expedition fleet (FleetComposition in _SettingFieldGroup) */
.hive-fleet-rows {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	max-width: 32rem;
}

.hive-fleet-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 9rem;
	gap: 0.5rem;
	align-items: center;
}

.hive-fleet-ship {
	margin: 0;
	font-size: 0.875rem;
}

.hive-fleet-count .hive-field-toggle-inline {
	margin: 0;
}

.hive-fleet-slot {
	padding-top: 0.35rem;
	border-top: 1px dashed var(--hive-border);
}

.hive-fleet-slot + .hive-fleet-slot {
	padding-top: 0;
	border-top: 0;
}

/* Standardeinstellungen & Layouts: two values (von/bis) in one row */
.hive-tf-pair {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.hive-tf-pair > * {
	flex: 1 1 0;
	min-width: 0;
}

.hive-tf-pair > .hive-range-sep {
	flex: 0 0 auto;
	padding-bottom: 0;
}

/* ---- Standardeinstellungen & Layouts: field form grouped by theme (Views/Dashboard/TemplateFields.cshtml) ---- */
.hive-tf-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
}

.hive-tf-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.hive-tf-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.6rem;
	border: 1px solid var(--hive-border);
	border-radius: 999px;
	background: var(--hive-surface);
	color: var(--hive-text);
	font-size: 0.8rem;
	text-decoration: none;
}

.hive-tf-nav-link:hover {
	background: var(--hive-surface-hover);
	color: var(--hive-text);
}

.hive-tf-count {
	min-width: 1.3rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--hive-primary);
	color: var(--hive-on-primary);
	font-size: 0.7rem;
	text-align: center;
}

.hive-tf-count.is-zero {
	background: var(--hive-surface-alt);
	color: var(--hive-text-muted);
}

.hive-tf-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 1rem;
}

@media (min-width: 1200px) {
	.hive-tf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}

.hive-tf-theme {
	scroll-margin-top: 4.5rem;
}

.hive-tf-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(9rem, 13rem);
	align-items: center;
	gap: 0.15rem 0.75rem;
	padding: 0.35rem 0.5rem;
	margin: 0 -0.5rem;
	border-left: 3px solid transparent;
	border-radius: 4px;
}

.hive-tf-row + .hive-tf-row {
	border-top: 1px solid color-mix(in srgb, var(--hive-border) 55%, transparent);
}

.hive-tf-label label {
	font-size: 0.85rem;
	margin: 0;
}

.hive-tf-help {
	font-size: 0.75rem;
	color: var(--hive-text-muted);
}

.hive-tf-standard {
	grid-column: 1 / -1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.72rem;
	color: var(--hive-text-muted);
}

/* The standard is already named in the control while nothing is set - only repeat it once a value overrides it. */
.hive-tf-row:not(.is-set) .hive-tf-standard {
	display: none;
}

.hive-tf-row.is-set {
	border-left-color: var(--hive-accent);
	background: color-mix(in srgb, var(--hive-accent) 7%, transparent);
}

.hive-tf-reset {
	border: 0;
	background: none;
	padding: 0;
	color: var(--hive-accent);
	font-size: 0.72rem;
}

.hive-tf-reset:hover {
	text-decoration: underline;
}

@media (max-width: 575.98px) {
	.hive-tf-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- "Captcha lösen" (Views/Login/Captcha) + banner in _Layout ---- */
/* Gameforge's question is white text on a transparent background - it needs a dark backdrop. */
.hive-captcha-question img {
	display: block;
	width: 100%;
	max-width: 660px;
	height: auto;
	background: var(--hive-bg);
	border: 1px solid var(--hive-border);
	border-radius: 6px;
	padding: 6px 8px;
}

.hive-captcha-icons {
	position: relative;
	display: inline-block;
	max-width: 100%;
	background: var(--hive-bg);
	border-radius: 6px;
	padding: 0;
}

.hive-captcha-icons img {
	display: block;
	width: 480px;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.hive-captcha-pick {
	position: absolute;
	top: 0;
	width: 25%;
	height: 100%;
	border: 2px solid transparent;
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
}

.hive-captcha-pick:hover,
.hive-captcha-pick:focus-visible {
	border-color: var(--hive-highlight);
	background: color-mix(in srgb, var(--hive-highlight) 18%, transparent);
	outline: none;
}

.hive-captcha-banner {
	border: 1px solid var(--hive-level-crit);
	border-left-width: 4px;
	background: color-mix(in srgb, var(--hive-level-crit) 12%, var(--hive-surface));
	color: var(--hive-text);
	border-radius: 6px;
	padding: 0.5rem 0.9rem;
	margin-bottom: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
}

/* --- Akzente (Stahlblau kontrast): farbige Überschriften und klar abgesetzte Abschnitte/Modulgruppen --- */

/* Seitentitel und Kartenüberschriften in Himmelblau statt Weiß. */
.hive-main h1, .hive-main .h3,
.hive-card h2, .hive-card h5,
.hive-card .h5 {
	color: var(--hive-heading);
}

/* Kleine Abschnittsüberschriften (h2/h3 class="h6 text-muted"): nicht mehr grau, sondern Akzent in Versalien
   mit einer feinen Linie darunter, damit sie Abschnitte trennen. */
.hive-main h2.h6.text-muted,
.hive-main h3.h6.text-muted {
	color: var(--hive-accent) !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.78rem;
	font-weight: 700;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid color-mix(in srgb, var(--hive-accent) 35%, transparent);
}

/* Karten: hellere Kante, damit sie sich vom Hintergrund abheben. */
.hive-card {
	border-color: var(--hive-border-light);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Gruppenkarten (Modul-Einstellungen, Dashboard, Vorlagen): Kopfleiste farbig getönt, Akzentbalken links,
   Titel in Himmelblau - so ist jede Gruppe klar vom nächsten Block getrennt. */
.hive-settings-section {
	border-left: 3px solid var(--hive-primary);
}

.hive-settings-section-header {
	background: linear-gradient(90deg, color-mix(in srgb, var(--hive-primary) 34%, var(--hive-bg)) 0%, color-mix(in srgb, var(--hive-primary) 12%, var(--hive-bg)) 100%);
	border-bottom: 1px solid color-mix(in srgb, var(--hive-accent) 40%, transparent);
	border-radius: 0 10px 0 0;
}

.hive-settings-section-title {
	color: var(--hive-heading);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.hive-settings-section.hive-settings-section-weekday {
	border-left-color: var(--hive-highlight);
}

.hive-settings-section-weekday .hive-settings-section-title {
	color: var(--hive-highlight);
}

/* Modul-Kopf (Name + Schalter): Akzentkante oben, getönter Hintergrund. */
.hive-worker-status-card {
	border-top: 2px solid var(--hive-accent);
	background: linear-gradient(180deg, color-mix(in srgb, var(--hive-primary) 18%, var(--hive-surface)) 0%, var(--hive-surface) 100%);
}

.hive-worker-status-card .hive-module-head h2 {
	color: var(--hive-heading);
	font-weight: 700;
}

/* Modul-Seitenleiste: Kategorien als farbige Trennbalken zwischen den Modulgruppen. */
.hive-worker-sidebar-header {
	background-color: var(--hive-bg-secondary);
}

.hive-worker-sidebar-title {
	color: var(--hive-heading);
	font-weight: 700;
}

.hive-worker-sidebar-category {
	margin-top: 0.35rem;
	padding: 0.45rem 0.9rem 0.35rem;
	font-size: 0.68rem;
	font-weight: 800;
	color: var(--hive-accent);
	background-color: color-mix(in srgb, var(--hive-primary) 20%, var(--hive-bg));
	border-top: 2px solid var(--hive-primary);
	border-bottom: 1px solid var(--hive-border-light);
}

.hive-worker-sidebar-header + .hive-worker-sidebar-category {
	margin-top: 0;
}

.hive-worker-sidebar-item {
	border-bottom-color: color-mix(in srgb, var(--hive-border-light) 60%, transparent);
}

/* Reiter innerhalb eines Moduls: klare Linie unter der Reiterleiste. */
.hive-nav-tabs {
	border-bottom: 2px solid var(--hive-primary);
}

/* Tabellenköpfe in Akzentfarbe. */
.table > thead > tr > th {
	color: var(--hive-accent);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 2px solid var(--hive-primary);
}

/* Weitere Titel, die bisher weiß/grau waren. */
.hive-sf-section-title,
.hive-library-category-title,
.hive-library-area-title,
.hive-script-form-title,
.hive-buildplan-title,
.hive-play-settings-title {
	color: var(--hive-heading);
}

/* Navigationsleiste: hellere Unterkante (der Gold-Himmelblau-Verlauf darauf kommt von .hive-navbar oben). */
.hive-navbar {
	border-bottom-color: var(--hive-border-light);
}

/* --- Logs: Stufen-Chips, Stufen-Abzeichen, Löschen --- */

.hive-log-levels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.hive-log-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.6rem;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 999px;
	border: 1px solid var(--hive-border-light);
	background-color: var(--hive-surface);
	opacity: 0.5;
	cursor: pointer;
	user-select: none;
}

.hive-log-chip.is-on {
	opacity: 1;
	border-color: currentColor;
	background-color: color-mix(in srgb, currentColor 14%, var(--hive-surface));
}

.hive-log-chip-count {
	font-size: 0.7rem;
	font-weight: 500;
	color: var(--hive-text-muted);
}

.hive-log-level-Verbose { color: var(--hive-text-faint); }
.hive-log-level-Debug { color: var(--hive-info); }
.hive-log-level-Information { color: var(--hive-accent); }

.hive-log-badge {
	display: inline-block;
	min-width: 4.2rem;
	padding: 0.05rem 0.45rem;
	font-size: 0.72rem;
	font-weight: 700;
	text-align: center;
	border-radius: 4px;
	border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
	background-color: color-mix(in srgb, currentColor 12%, transparent);
}

.hive-log-table tbody tr:hover > td {
	background-color: var(--hive-surface-hover);
}

.hive-log-del {
	display: inline-flex;
	padding: 0.15rem;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--hive-text-faint);
	opacity: 0;
	cursor: pointer;
}

.hive-log-table tbody tr:hover .hive-log-del,
.hive-log-del:focus-visible {
	opacity: 1;
}

.hive-log-del:hover {
	color: var(--hive-danger);
	background-color: color-mix(in srgb, var(--hive-danger) 15%, transparent);
}

@media (hover: none) {
	.hive-log-del {
		opacity: 1;
	}
}

/* --- Farbverläufe (Stahlblau kontrast) --- */

/* Seitenhintergrund: stahlblauer Schein von oben links, sonst fast schwarz. */
body {
	background:
		radial-gradient(1200px 600px at 0% 0%, color-mix(in srgb, var(--hive-primary) 22%, transparent) 0%, transparent 70%),
		radial-gradient(900px 500px at 100% 100%, color-mix(in srgb, var(--hive-accent) 7%, transparent) 0%, transparent 70%),
		var(--hive-bg);
	background-attachment: fixed;
}

/* Navigationsleiste: Stahlblau nach dunkel, die Gold-Himmelblau-Linie unten bleibt als zweite Ebene. */
.hive-navbar {
	background-image:
		linear-gradient(90deg, var(--hive-highlight), var(--hive-accent) 40%, transparent 75%),
		linear-gradient(90deg, #22446B 0%, var(--hive-bg-secondary) 45%, #10223A 100%);
	background-size: 100% 2px, 100% 100%;
	background-position: bottom left, 0 0;
	background-repeat: no-repeat;
}

/* Karten: leichter Verlauf von oben (etwas heller) nach unten. */
.hive-card {
	background-image: linear-gradient(180deg, color-mix(in srgb, var(--hive-primary) 9%, var(--hive-surface)) 0%, var(--hive-surface) 55%);
}

/* Hauptbuttons mit Verlauf. */
.btn-hive-accent,
.btn-hive-accent:disabled {
	background-image: linear-gradient(180deg, #3A82C4 0%, var(--hive-primary) 100%);
	border-color: #3A82C4;
}

.btn-hive-accent:hover,
.btn-hive-accent:focus-visible {
	background-image: linear-gradient(180deg, #4A93D6 0%, var(--hive-primary-hover) 100%);
}

/* Speicherleiste unter den Modul-Formularen. */
.hive-save-bar {
	background-image: linear-gradient(90deg, color-mix(in srgb, var(--hive-primary) 26%, var(--hive-surface-alt)) 0%, var(--hive-surface-alt) 60%);
	border-color: var(--hive-border-light);
}

/* Modul-Seitenleiste: dezenter Verlauf nach unten. */
.hive-worker-sidebar {
	background-image: linear-gradient(180deg, color-mix(in srgb, var(--hive-primary) 12%, var(--hive-surface)) 0%, var(--hive-surface) 40%);
}

/* Homeworld mark in own-celestial lists (workers-editors.js). */
.hive-home-mark {
	margin-left: 0.3rem;
	color: var(--hive-highlight);
	font-weight: 700;
}

/* Dashboard card "Lage" (threat assessment). */
.hive-lage-card.is-red { border-color: var(--hive-danger); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hive-danger) 40%, transparent), 0 2px 10px rgba(0, 0, 0, 0.35); }
.hive-lage-card.is-yellow { border-color: var(--hive-warning); }

.hive-lage-attack {
	padding: 0.5rem 0;
	border-top: 1px solid var(--hive-border);
}

.hive-lage-attack:first-of-type {
	border-top: 0;
}

.hive-lage-collision {
	color: var(--hive-danger);
}

/* Disabled fields (e.g. depending on a switch that is off): Bootstrap's light grey background made the light text
   invisible on this dark theme - keep them dark and dimmed instead. */
.form-control:disabled,
.form-select:disabled {
	background-color: var(--hive-surface);
	color: var(--hive-text-secondary);
	border-color: var(--hive-border);
}

/* ---- Login, Lizenz, Demo, Info -------------------------------------------------------------------------------- */
.hive-auth-wrap {
	display: flex;
	justify-content: center;
	padding: 2rem 0 3rem;
}

.hive-auth-card {
	width: 100%;
	max-width: 26rem;
	border-top: 3px solid var(--hive-accent);
}

.hive-nav-user .nav-link {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
}

.hive-nav-user .dropdown-menu {
	background: var(--hive-surface);
	border-color: var(--hive-border);
}

.hive-nav-user .dropdown-item {
	color: var(--hive-text);
}

.hive-nav-user .dropdown-item:hover,
.hive-nav-user .dropdown-item:focus {
	background: var(--hive-surface-hover, var(--hive-bg-elevated));
	color: var(--hive-heading);
}

.hive-demo-badge {
	display: inline-block;
	padding: .2rem .6rem;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 600;
	color: var(--hive-on-bright, #1a1a1a);
	background: linear-gradient(90deg, var(--hive-highlight), color-mix(in srgb, var(--hive-highlight) 70%, white));
}

.hive-license-banner,
.hive-demo-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-bottom: 1rem;
	padding: .6rem 1rem;
	border: 1px solid color-mix(in srgb, var(--hive-warning) 55%, transparent);
	border-left: 4px solid var(--hive-warning);
	border-radius: .5rem;
	background: color-mix(in srgb, var(--hive-warning) 12%, var(--hive-surface));
}

.hive-demo-banner {
	border-color: color-mix(in srgb, var(--hive-highlight) 55%, transparent);
	border-left-color: var(--hive-highlight);
	background: color-mix(in srgb, var(--hive-highlight) 10%, var(--hive-surface));
}

.hive-license-state {
	display: inline-block;
	padding: .15rem .6rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: .85rem;
}

.hive-license-state.is-success { background: color-mix(in srgb, var(--hive-success) 22%, transparent); color: var(--hive-success); }
.hive-license-state.is-info { background: color-mix(in srgb, var(--hive-accent) 22%, transparent); color: var(--hive-accent); }
.hive-license-state.is-danger { background: color-mix(in srgb, var(--hive-danger) 22%, transparent); color: var(--hive-danger); }

.hive-user-actions {
	position: absolute;
	right: 1rem;
	z-index: 5;
	margin-top: .35rem;
	padding: .6rem;
	min-width: 18rem;
	border: 1px solid var(--hive-border);
	border-radius: .5rem;
	background: var(--hive-surface);
	box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .45);
}

.hive-notices {
	max-height: 70vh;
	overflow: auto;
	padding: 1rem;
	border: 1px solid var(--hive-border);
	border-radius: .5rem;
	background: var(--hive-bg);
	color: var(--hive-text-secondary);
	font-size: .8rem;
	white-space: pre-wrap;
}

/* Demo: language switch in the navbar (DemoController.Lang) */
.navbar .nav-link.hive-demo-lang { font-size: .85rem; font-weight: 600; padding-left: .45rem; padding-right: .45rem; }
.navbar .nav-link.hive-demo-lang.active { color: var(--hive-highlight); }

/* Time hint next to time inputs (_TimeHint.cshtml, time-hint.js) */
.hive-time-hint {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.6rem;
	padding: 0.45rem 0.75rem;
	margin-bottom: 0.9rem;
	border: 1px solid var(--hive-border);
	border-left: 3px solid var(--hive-accent);
	border-radius: 6px;
	background: color-mix(in srgb, var(--hive-accent) 7%, var(--hive-surface));
	color: var(--hive-text-secondary, var(--hive-text));
	font-size: 0.85rem;
}
.hive-time-hint strong { color: var(--hive-text); font-variant-numeric: tabular-nums; }
.hive-time-hint-icon svg { width: 16px; height: 16px; color: var(--hive-accent); vertical-align: -3px; }
.hive-time-hint.is-warning {
	border-left-color: var(--hive-warning);
	background: color-mix(in srgb, var(--hive-warning) 10%, var(--hive-surface));
}
.hive-time-hint.is-warning .hive-time-hint-icon svg { color: var(--hive-warning); }
.hive-time-hint-warn { flex-basis: 100%; color: var(--hive-warning); }

/* Flugplaner (Views/FlightPlan/Index.cshtml, flightplan.js) */
.hive-fp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.hive-fp-kind .btn svg { width: 15px; height: 15px; margin-right: 0.35rem; vertical-align: -2px; }
.hive-fp-kind .btn-check:checked + .btn-outline-hive {
	background: linear-gradient(180deg, #A5D6FF, #5FA8EC);
	border-color: var(--hive-accent);
	color: var(--hive-on-bright, #0B1724);
}
.hive-fp-section-title {
	font-weight: 600;
	color: var(--hive-heading, var(--hive-accent));
	border-left: 3px solid var(--hive-accent);
	padding-left: 0.5rem;
	margin-bottom: 0.5rem;
}
.hive-fp-ships { width: 100%; border-collapse: separate; border-spacing: 0 2px; }
.hive-fp-ships td { padding: 1px 4px; vertical-align: middle; }
.hive-fp-ships tr { background: var(--hive-surface-alt, #16263A); }
.hive-fp-ships tr td:first-child { border-radius: 4px 0 0 4px; }
.hive-fp-ships tr td:last-child { border-radius: 0 4px 4px 0; }
.hive-fp-ship-name { font-size: 0.85rem; white-space: nowrap; }
.hive-fp-ship-max { font-size: 0.75rem; text-align: right; white-space: nowrap; width: 1%; font-variant-numeric: tabular-nums; }
.hive-fp-ships select { width: 7.5rem; }
.hive-fp-ships input { width: 7rem; }
.hive-fp-res-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.4rem; }
.hive-fp-res-dot.is-metal { background: #D6D6D6; }
.hive-fp-res-dot.is-crystal { background: #8FD3F0; }
.hive-fp-res-dot.is-deuterium { background: #B99BE6; }
.hive-fp-grid { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 0.75rem; align-items: center; }
.hive-fp-grid .form-label { margin: 0; font-size: 0.875rem; }
.hive-fp-grid [hidden] { display: none !important; }
.hive-fp-target { display: grid; grid-template-columns: 4.5rem 5rem 4rem 1fr 1fr; gap: 0.35rem; }
.hive-fp-narrow { width: 7.5rem; flex: none; }
.hive-fp-auto { width: auto; }
.hive-fp-time { width: 7rem; font-variant-numeric: tabular-nums; }
.hive-fp-preview {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
	gap: 0.4rem 1rem;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--hive-border);
	border-radius: 6px;
	background: var(--hive-surface-alt, #16263A);
}
.hive-fp-preview > div { display: flex; flex-direction: column; }
.hive-fp-preview span { font-size: 0.75rem; color: var(--hive-text-muted); }
.hive-fp-preview strong { font-variant-numeric: tabular-nums; }
.hive-fp-preview [hidden] { display: none !important; }
.hive-fp-preview .hive-fp-preview-note { grid-column: 1 / -1; }
.hive-fp-when { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.hive-fp-when [hidden], .hive-fp [hidden] { display: none !important; }
.hive-fp-behaviour summary { cursor: pointer; color: var(--hive-accent); }
.hive-fp-behaviour-grid { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; align-items: center; }
.hive-fp-behaviour-grid .form-label { margin: 0; }
.hive-fp-behaviour-grid .form-select { width: auto; max-width: 100%; }
.hive-fp-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.hive-fp-actions #fpName { max-width: 22rem; }
.hive-fp-table td { vertical-align: middle; }
.hive-fp-table tr.is-off td { opacity: 0.55; }
.hive-fp-msg { max-width: 22rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hive-fp-kind-icon { font-size: 0.9rem; }
@media (max-width: 575.98px) {
	.hive-fp-grid, .hive-fp-behaviour-grid { grid-template-columns: 1fr; }
	.hive-fp-target { grid-template-columns: repeat(3, 1fr); }
	.hive-fp-ships select, .hive-fp-ships input { width: 100%; }
	.hive-fp .d-flex { flex-wrap: wrap; }
	.hive-fp-behaviour-grid > *, .hive-fp-grid > * { min-width: 0; }
	.hive-fp .form-select { max-width: 100%; }
}

.hive-fp-chain { color: var(--hive-text-muted); }
.hive-fp-recalls { color: var(--hive-text-secondary); }
