body,
html {
	height: 100%;
	margin: 0;
	font-family: "Roboto", sans-serif;
	background-color: #f8f9fa;

	/* FIX: keine Browser-Scrollbar rechts, Scroll findet in App-Containern statt */
	overflow: hidden;
}

.btn {
	background-color: var(--tenant-primary);
	border: 1px solid var(--tenant-primary);
	color: white;
}

header {
	height: 56px;
	display: flex;
	align-items: center;
	padding: 0 1.35rem;
	background-color: var(--tenant-primary);
	font-weight: 400;
	font-size: 1.2rem;
	color: white;
	position: sticky;
	width: 100%;
	box-shadow: 0px 0px 10px 0px rgb(0 0 0 / 50%);
	z-index: 997;
}

#app {
	display: flex;

	/* FIX: stabile Viewport-Höhe, und Flex-Kinder dürfen scrollen */
	height: calc(100vh - 56px);
	height: calc(100dvh - 56px);
	min-height: 0;

	background-color: #F0F3F8;

	/* FIX: verhindert, dass der Body doch wieder scrollt */
	overflow: hidden;
}

/* Sidebar */
.sidebar {
	width: 320px;
	background-color: white;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #dee2e6;
	padding-left: 0.75rem;
	padding-right: 0.75rem;

	/* Sidebar scrollt intern */
	overflow-y: auto;

	/* FIX: wichtig für Flex-Scroll */
	min-height: 0;
}

/* Scrollbar-Styles Sidebar */
.sidebar::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

/* FIX: hier waren die Doppelpunkte falsch */
.sidebar::-webkit-scrollbar-track {
	background: transparent;
}

.sidebar-section.last {
	position: relative;
}

.chat-list {
	position: relative;
}

.chat-list,
.template-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.chat-list li,
.template-list li {
	padding: 0.6rem 1rem;
	border-radius: 6px;
	margin-bottom: 6px;
	cursor: pointer;
}

.chat-list li:hover,
.template-list li:hover {
	background-color: var(--menu-hover-color) !important;
	color: var(--tenant-secondary);
}

.section-title {
	font-size: 0.9rem;
	color: #6c757d;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	padding-left: 1rem !important;
}

/* =========================
   CHAT AREA / CONTENT AREA
   ========================= */

.chat-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	width: 100%;
	max-width: 1400px;

	/* FIX: Flex-Child darf schrumpfen -> Scroll funktioniert */
	min-width: 0;
	min-height: 0;

	/* FIX: andere Ansichten (Formulare etc.) können innerhalb scrollen */
	overflow: auto;

	/* Scrollbar optisch ausblenden, Scroll bleibt */
	scrollbar-width: none;          /* Firefox */
	-ms-overflow-style: none;       /* IE/Edge alt */
}
.chat-area::-webkit-scrollbar {
	width: 0;
	height: 0;
}

/* FIX: Wenn es gezeigt ein Chat ist, soll NICHT die ganze Area scrollen,
   sondern nur .chat-messages. (Chrome/Safari/Edge unterstützen :has) */
.chat-area:has(.chat-messages) {
	overflow: hidden;
}

/* Chat Messages Bereich */
.chat-messages {
	flex: 1;
	padding: 2rem;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;

	/* FIX: nötig damit es wirklich scrollt */
	min-height: 0;

	/* Scrollbar optisch ausblenden, Scroll bleibt */
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.chat-messages::-webkit-scrollbar {
	width: 0;
	height: 0;
}

.message {
	display: flex;
	max-width: 75%;
}

.message.user {
	align-self: flex-end;
	justify-content: flex-end;
}

.message.assistant {
	align-self: flex-start;
	justify-content: flex-start;
}

.bubble {
	padding: 1.05rem;
	border-radius: 1.25rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	line-height: 1.5;
	font-size: 1rem;
	background-color: #f1f3f5;
}

.user .bubble {
	background-color: white;
	color: #212529;
}

.assistant .bubble {
	background-color: white;
	color: #212529;
}

.bubble img {
	max-width: 100%;
	border-radius: 12px;
}

/* FIX: Eingabe bleibt sichtbar, auch wenn (Fallback) die chat-area scrollen sollte */
.chat-input {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;

	position: sticky;
	bottom: 0;
	background: inherit;
	z-index: 5;
}

.input-row {
	display: flex;
	gap: 0.5rem;
	position: relative;
}

.chat-input input {
	height: 50px;
	font-size: 1rem;
	flex: 1;
}

.chat-input label {
	min-width: 100px;
}

.dropdown-launcher {
	position: relative;
}

.dropdown-launcher .toggle-menu {
	width: 32px;
	height: 100%;
	font-size: 1.5rem;
	padding: 5px;
	line-height: 1;
	border-radius: 5px;
	color: #212529;
	border: none;
}

.dropdown-launcher .action-menu {
	position: absolute;
	bottom: 50px;
	left: 0;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
	display: none;
	flex-direction: column;
	z-index: 1000;
	overflow: hidden;
}

.dropdown-launcher .action-menu .dropdown-item {
	padding: 0.5rem 1rem;
	cursor: pointer;
	white-space: nowrap;
}

.dropdown-launcher.show .action-menu {
	display: flex;
}

#file-preview-zone .pill {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	background-color: #dee2e6;
	border-radius: 999px;
	font-size: 0.85rem;
	color: #212529;
}

#file-preview-zone .pill i {
	margin-right: 0.5rem;
}

#file-preview-zone .pill .remove {
	margin-left: 0.5rem;
	cursor: pointer;
	font-weight: bold;
}

.btn:active {
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
}

.btn:hover {
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
	color: white;
}

.btn.show{
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
	color: white;
}

.btn:focus-visible {
	background-color: var(--tenant-secondary) !important;
	border-color: var(--tenant-secondary) !important;
}

.chat-list li {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.chat-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.copy-btn-outside {
	align-self: flex-end;
	font-size: 1.2rem;
	color: #888;
	cursor: pointer;
	margin-top: 4px;
	position: relative;
	opacity: 0;
	height: 20px;
	transition: opacity 0.2s ease;
	display: inline-flex;
	align-items: center;
}

.message:hover .copy-btn-outside {
	opacity: 1;
}

.copy-btn-outside:hover {
	color: #000;
}

.copy-btn-outside i {
	font-size: 1.2rem;
}

/* Tooltip */
.copy-btn-outside .tooltiptext {
	visibility: visible;
	opacity: 0;
	width: 80px;
	background-color: #333;
	color: #fff;
	text-align: center;
	border-radius: 4px;
	padding: 2px 6px;
	position: absolute;
	bottom: 140%;
	right: 0;
	font-size: 0.75rem;
	transition: opacity 0.3s;
	pointer-events: none;
}

.bubble .dot-loader {
	display: inline-block;
	font-size: 1.5rem;
	line-height: 1;
	letter-spacing: 2px;
	animation: blink 1.4s infinite both;
}

@keyframes blink {
	0% { opacity: 0.2; }
	20% { opacity: 1; }
	100% { opacity: 0.2; }
}

.pdf-pill {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	margin-bottom: 8px;
	background-color: #dee2e6;
	color: #000;
	font-size: 0.9rem;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 500;
	max-width: 100%;
	overflow-wrap: break-word;
}

.app-mask {
	padding: 2rem;
	display: flex;
	justify-content: center;

	/* FIX: wenn App-Mask direkt in chat-area, darf es nicht breiter werden */
	min-width: 0;
}

.visualizer-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	min-height: 100%;
	padding: 2rem 1rem;

	/* passt weiterhin */
	overflow-y: auto;
}

#result {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#result img {
	width: 100%;
	max-width: 600px;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
	width: 48px;
	height: 48px;
	border: 5px solid #dee2e6;
	border-top: 5px solid var(--tenant-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-top: 2rem;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

#image-preview img {
	margin-top: 1rem;
	max-width: 30%;
	border-radius: 12px;
}

.delete-icon, .edit-icon {
	visibility: hidden;
	opacity: 0;
	color: var(--tenant-secondary);
	width: 16px;
	transition: opacity 0.2s ease;
	flex-shrink: 0;
	margin-left: 4px;
	cursor: pointer;
}

.chat-list li:hover .delete-icon {
	visibility: visible;
	opacity: 1;
}

.chat-list li:hover .edit-icon {
	visibility: visible;
	opacity: 1;
}

.chat-list li.active,
.template-list li.active {
	background-color: var(--menu-hover-color) !important;
	color: var(--tenant-secondary);
}

/* SVG im aktiven Listenelement weiß färben */
.chat-list li.active svg,
.template-list li.active svg {
	fill: var(--tenant-secondary);
}

input:focus {
	outline: none;
	box-shadow: 0 0 0 0.25rem rgba(var(--menu-hover-color-rgb), 1) !important;
	border-color: var(--tenant-secondary) !important;
}

.dataTables_filter input:focus {
	box-shadow: none !important;
}

.dataTables_length .form-select:focus {
	box-shadow: none !important;
}

.input-wrapper {
	display: flex;
	flex-direction: column;
	border: 1px solid #dee2e6;
	border-radius: 1rem;
	padding: 0.75rem;
	background-color: white;
	gap: 0.75rem;
}

/* Textbereich */
.input-wrapper textarea {
	resize: none;
	border: none;
	outline: none;
	font-size: 1rem;
	line-height: 1.5;
	max-height: 8.5em;
	overflow-y: auto;
	background: transparent;
	min-height: 24px;
}

/* Leiste darunter */
.input-toolbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* Upload-Button (Plus) */
.toolbar-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #212529;
	font-size: 1.4rem;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toolbar-btn:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

/* Action-Dropdown */
.dropdown-launcher {
	position: relative;
}

.dropdown-launcher .action-menu {
	position: absolute;
	bottom: 42px;
	left: 0;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 0.5rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
	display: none;
	flex-direction: column;
	z-index: 1000;
	overflow: hidden;
}

.dropdown-launcher.show .action-menu {
	display: flex;
}

.dropdown-item {
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	cursor: pointer;
	white-space: nowrap;
	background-color: #fff;
	color: black;
}

.dropdown-item:hover {
	background-color: var(--menu-hover-color) !important;
	color: black;
}

.dropdown-item:active {
	background-color: var(--tenant-primary) !important;
	color: white;
}

/* Senden-Button */
.send-button {
	background-color: var(--tenant-primary);
	color: white;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin-left: auto;
}

.send-button:hover {
	background-color: var(--tenant-secondary);
}

.menu-item {
	display: flex;
	align-items: center;
	cursor: pointer;
	max-width: 100%;
	overflow: hidden;
}
.menu-item svg {
	margin-right: 5px;
}

.bubble h1 {
	font-size: 2rem;
	line-height: 1.3;
	margin-bottom: 1rem;
}

.bubble h2 {
	font-size: 1.5rem;
	line-height: 1.4;
	margin-bottom: 0.75rem;
}

.bubble h3 {
	font-size: 1.25rem;
	line-height: 1.4;
	margin-bottom: 0.5rem;
}

.bubble h4 {
	font-size: 1.125rem;
	line-height: 1.5;
	margin-bottom: 0.5rem;
}

.bubble h5 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.bubble h6 {
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.sidebar-button {
	padding-left: 1rem;
	padding-right: 1rem;
}

.chat-list::-webkit-scrollbar {
	width: 6px;
}

.chat-list::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.chat-list::-webkit-scrollbar-track {
	background: transparent;
}

.badge.bg-primary {
	background-color: var(--tenant-secondary) !important;
}

.bg-primary {
	background-color: var(--tenant-secondary) !important;
}

.bubble p {
	margin-bottom: 0 !important;
}

.message.assistant .bubble p {
	margin-bottom: 1rem !important;
}

.message.assistant .bubble p:last-of-type {
	margin-bottom: 0 !important;
}

.section-title.collapsed svg {
	transform: rotate(0deg);
	transition: transform 0.2s;
}

.section-title svg {
	transform: rotate(180deg);
	transition: transform 0.2s;
}

.chat-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	max-width: 100%;
	overflow: hidden;
}

.edit-icon,
.delete-icon {
	visibility: hidden;
	opacity: 0;
	color: var(--tenant-secondary);
	width: 16px;
	transition: opacity 0.2s ease;
	flex-shrink: 0;
	cursor: pointer;
	margin-left: 0;
}

.chat-title-text {
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.icon-group {
	display: flex;
	gap: 8px;
}

/* Die letzte Sidebar-Sektion (Letzte Chats) füllt den Rest */
.sidebar-section.last {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

/* Die Chatliste selbst füllt die .last-Sektion und scrollt bei Bedarf */
.chat-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: 4px;
	max-height: 400px;
}

/* Dein Wrapper */
.input-wrapper {
	position: relative;
}

/* Browser/Theme-Highlight beim Drag/Focus komplett aus */
.input-wrapper,
.input-wrapper:focus,
.input-wrapper:focus-within {
	outline: none !important;
	box-shadow: none !important;
}

/* Falls dein Theme beim Drag eine Border setzt: */
.input-wrapper.dragover {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

/* Vollflächiges Overlay */
.drop-overlay {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: transparent;
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	pointer-events: none;
	z-index: 999;
	opacity: 0;
	transition: opacity 150ms ease;
}

/* Aktiv nur während Drag */
.input-wrapper.dragover .drop-overlay {
	background: var(--tenant-primary);
	opacity: 0.95;
	pointer-events: auto;
}

.tooltip-wide .tooltip-inner {
	max-width: 550px !important;
}

/* Container begrenzen + zentrieren */
.visualizer-wrapper #gallery-container {
	max-width: 600px;
}

/* Sidebar: eigener Scroll für alles */
.sidebar {
	height: 100%;
	min-height: 0;
	overflow-y: auto;
}

/* Andere Sektionen behalten ihre natürliche Höhe */
.sidebar-section {
	flex: 0 0 auto;
}

/* Letzte Sektion wächst mit */
.sidebar-section.last {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

/* Chatliste: bekommt EIGENE Scrollbar + max-height */
.chat-list {
	flex: 1 1 auto;
	min-height: 200px;
	max-height: 100%;
	overflow-y: auto;
	padding-right: 4px;
}

.mic-btn.recording svg {
	color: red;
}
#mic-controls button {
	margin-left: .5rem;
	font-size: 1.2rem;
}
.hidden { display: none; }

#mic-visual {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	max-width: 100%;
}
#mic-wave {
	width: 100%;
	height: 40px;
	background: none;
	border-radius: 6px;
	color: var(--tenant-primary);
}
.mic-actions button {
	font-size: 16px;
	background: none;
	border: none;
	cursor: pointer;
}

.mic-actions {
	width: 7%;
}

.hidden {
	display: none !important;
}

#mic-loader {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}
.loader {
	width: 18px;
	height: 18px;
	border: 2px solid #ccc;
	border-top: 2px solid #007bff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

#transcribe-loader {
	position: absolute;
	top: 20%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	z-index: 50;
}

#transcribe-loader .spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #ccc;
	border-top-color: var(--tenant-secondary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

img, svg {
	vertical-align: unset;
}

.active>.page-link{
	background-color: var(--tenant-primary);
	border-color: var(--tenant-primary);
}

.form-control:focus{
	box-shadow: none;
}

.nav-link-custom {
	color: rgba(255,255,255,0.85);
	text-decoration: none;
	font-size: 16px;
	padding: 6px 12px;
	border-radius: 6px;
	transition: 0.2s ease-in-out;
}

.nav-link-custom:hover {
	background: var(--tenant-secondary) !important;
	color: #fff;
}

.nav-link-custom.active {
	background: var(--tenant-secondary) !important;
	color: #fff;
	font-weight: 600;
}

.nav-icon svg {
	width: 18px;
	height: 18px;
	fill: white !important;
	color: white !important;
	display: block;
}

.nav-link-custom {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.template-list li svg {
	fill: var(--tenant-secondary);
}

.btn:disabled{
	border-color: var(--tenant-primary) !important;
	background-color: var(--tenant-primary) !important;
}

.agent-hint-icon {
	margin-left: auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.template-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	position: relative;
}

.template-list li:hover .agent-hint-icon {
	opacity: 1;
	visibility: visible;
}

.template-list li .agent-hint-icon svg {
	fill: var(--tenant-secondary);
}

/* TRASH DARF SICH NIE DREHEN */
.section-title .delete-all-icon svg {
	transform: none !important;
}

/* Overlay über der Chatliste */
#chat-list-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.75);
	backdrop-filter: blur(2px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	pointer-events: all;
}

/* Inhalt zentriert */
.chat-list-overlay-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	font-size: 0.95rem;
	color: var(--tenant-secondary);
}

/* Spinner styling */
#chat-list-overlay .spinner {
	width: 36px;
	height: 36px;
	border: 4px solid #dee2e6;
	border-top-color: var(--tenant-secondary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ========= SCROLL-FIX PATCH (ganz ans Ende der custom.css) ========= */

/* Body soll nicht die App scrollen (keine Browser-Scrollbar rechts) */
html, body{
  height: 100% !important;
  overflow: hidden !important;
}

/* App muss wirklich eine feste Höhe haben und Kinder dürfen scrollen */
#app{
  display: flex !important;
  height: calc(100vh - 56px) !important;
  height: calc(100dvh - 56px) !important; /* mobile safe */
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Sidebar scrollt intern */
#app .sidebar{
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* Content-Bereich: soll bei Formularseiten scrollen können */
#app .chat-area{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Chat-Seite: hier soll NICHT die ganze chat-area scrollen,
   sondern nur der Nachrichtenbereich */
#app .chat-area:has(.chat-messages){
  overflow: hidden !important;
}

/* Nachrichtenbereich muss in Flex-Layout schrumpfen dürfen -> sonst kein Scroll */
#app .chat-messages{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Input bleibt unten sichtbar */
#app .chat-input{
  flex: 0 0 auto !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 10 !important;
}

/* Optional: keine sichtbare Scrollbar, aber scroll bleibt */
#app .chat-area,
#app .chat-messages{
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#app .chat-area::-webkit-scrollbar,
#app .chat-messages::-webkit-scrollbar{
  width: 0;
  height: 0;
}
/* ===== FINAL SCROLL FIX (ganz ans Ende) ===== */

/* Body niemals scrollen lassen (keine Browser-Scrollbar rechts) */
html, body {
  height: 100% !important;
  overflow: hidden !important;
}

/* App Höhe fix + children dürfen intern scrollen */
#app {
  height: calc(100vh - 56px) !important;
  height: calc(100dvh - 56px) !important;
  overflow: hidden !important;
  min-height: 0 !important;
}

/* Sidebar bleibt intern scrollbar */
#app .sidebar {
  height: 100% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* STANDARD: Content-Seiten (Formulare etc.) scrollen in .chat-area */
#app .chat-area {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* CHAT: sobald .chat-messages existiert -> .chat-area darf NICHT scrollen */
#app .chat-area .chat-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Chat-Area bei Chat-Layout: overflow hidden erzwingen, aber ohne :has() */
#app .chat-area:has(.chat-messages),
#app .chat-area.chat-view,
#app .chat-area.chat {
  overflow: hidden !important;
}

/* Input bleibt unten sichtbar */
#app .chat-input {
  flex: 0 0 auto !important;
  position: sticky !important;
  bottom: 0 !important;
  z-index: 10 !important;
}

/* Scrollbars ausblenden (optisch), Scroll bleibt */
#app .chat-area,
#app .chat-messages {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
#app .chat-area::-webkit-scrollbar,
#app .chat-messages::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.sidebar-section:first-of-type > .section-title {
  margin-top: 0 !important;
}

.add-agenda,
.add-task{
  display: inline-flex !important;
  align-items: center !important;      /* gleiche Höhe */
  justify-content: center !important;  /* zentriert im Button */
  gap: .5rem !important;               /* optional Abstand */
  width: 100% !important;              /* nur nötig, wenn der Button volle Breite hat */
  text-align: center !important;       /* Fallback */
}

.add-agenda svg,
.add-task svg{
  display: block !important;
}