/* ============================================================
   Supporter v3 – modernes Erscheinungsbild
   Farben/Schrift wie Login & Portal (Raleway, #a43e0b auf #1F1F1F)
   Wird NACH Bootstrap geladen und überschreibt dessen Standardlook.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');

:root {
	--accent:        #a43e0b;
	--accent-dark:   #8a340a;
	--accent-hi:     #e2773f;
	--accent-soft:   rgba(164, 62, 11, 0.16);
	--accent-ring:   rgba(226, 119, 63, 0.35);

	--bg:            #1F1F1F;
	--surface:       #262626;
	--surface-2:     #2e2e2e;
	--surface-3:     #363636;
	--border:        rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.14);

	--text:          #f0f0f0;
	--text-2:        #c4c4c4;
	--muted:         #959595;

	--ok:            #4cc27a;
	--info:          #5ba8e5;
	--warn:          #e6b84d;
	--danger:        #e0664a;

	--radius:        12px;
	--radius-lg:     16px;
	--shadow:        0 14px 40px rgba(0, 0, 0, 0.35);
	--ease:          cubic-bezier(.2, .8, .2, 1);
}

/* ---------------- Grundlagen ---------------- */
html, body {
	background: var(--bg) !important;
}
body {
	font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
	font-variant-numeric: lining-nums;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--text) !important;
	-webkit-font-smoothing: antialiased;
	padding: 24px clamp(12px, 2.4vw, 32px) 40px !important;
	margin: 0 !important;
}
a { color: var(--accent-hi); }
a:hover { color: #f19a68; text-decoration: none; }
hr { border-top: 1px solid var(--border) !important; background: none !important; height: 0 !important; margin: 14px 0 !important; }
b, strong { font-weight: 700; }
::selection { background: var(--accent); color: #fff; }

/* dezente Scrollbalken */
* { scrollbar-width: thin; scrollbar-color: #4a4a4a transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #4a4a4a; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------- App-Leiste (Kopf) ---------------- */
#wrapper_head { display: block !important; padding: 0 !important; }
.sp-appbar {
	box-sizing: border-box;
	min-height: 65px; /* gleiche Höhe in allen Apps: Linie liegt im Portal auf derselben Höhe wie die Uhr-Linie */
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
}
.sp-appbar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1 1 auto;
}
.sp-appbar-brand > div { min-width: 0; } /* langer Untertitel kürzt statt die Seite zu verbreitern */

.sp-appbar-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--accent-hi), var(--accent-dark));
	box-shadow: 0 8px 22px rgba(164, 62, 11, 0.35);
}
.sp-appbar-icon svg { width: 22px; height: 22px; fill: #fff; }
.sp-appbar-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.sp-appbar-sub {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 2px;
	font-size: 13px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sp-appbar-sub .avatar,
.sp-appbar-sub img {
	width: 20px !important;
	height: 20px !important;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
}
.sp-role {
	display: inline-flex;
	align-items: center;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--accent-hi);
	background: var(--accent-soft);
	border: 1px solid rgba(226, 119, 63, .3);
}
.sp-appbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-appbar-actions a:hover { text-decoration: none; }
.sp-version { font-size: 11px; color: #6c6c6c; margin-left: 4px; }

/* Ansichts-Kopf (Titel + Aktionen) – neue Ansichten nutzen .sp-head */
.sp-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.sp-head-title {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	min-width: 0;
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.005em;
}
.sp-head-title small { font-size: 13px; font-weight: 500; color: var(--muted); }
.sp-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-head-actions .form-control,
.sp-head-actions select { width: 210px; }

/* ältere Ansichten (Admin) mit .modul_head / .title_modul */
.modul_head { width: 100%; float: left; margin-bottom: 14px; }
.modul_head::after { content: ''; display: table; clear: both; }
.title_modul { font-size: 19px !important; font-weight: 700; line-height: 38px; color: var(--text); }
.btn_logout { float: right; margin-left: 8px; }

/* ---------------- Knöpfe ---------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 38px;
	padding: 7px 14px;
	border-radius: 10px !important;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1.2;
	border: 1px solid transparent;
	box-shadow: none !important;
	transition: background .2s, border-color .2s, color .2s, transform .12s, filter .2s;
}
.btn:active { transform: translateY(1px); }
.btn:focus, .btn.focus { box-shadow: 0 0 0 3px var(--accent-ring) !important; outline: none; }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; border-radius: 8px !important; }

.btn-primary, .btn-success {
	color: #fff !important;
	background: linear-gradient(135deg, #b8490f 0%, var(--accent) 60%, var(--accent-dark) 100%) !important;
	border-color: var(--accent) !important;
}
.btn-primary:hover, .btn-success:hover { filter: brightness(1.1); color: #fff !important; }

.btn-secondary,
.btn-outline-primary,
.btn-outline-warning,
.btn-ghost {
	color: var(--text) !important;
	background: var(--surface-2) !important;
	border-color: var(--border-strong) !important;
}
.btn-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-warning:hover,
.btn-ghost:hover { background: var(--surface-3) !important; border-color: rgba(255,255,255,.24) !important; color: #fff !important; }

.btn-danger {
	color: #ffb4a3 !important;
	background: rgba(224, 102, 74, .12) !important;
	border-color: rgba(224, 102, 74, .4) !important;
}
.btn-danger:hover { background: rgba(224, 102, 74, .22) !important; color: #fff !important; }
.btn-warning {
	color: #f3d38a !important;
	background: rgba(230, 184, 77, .12) !important;
	border-color: rgba(230, 184, 77, .4) !important;
}
.btn-warning:hover { background: rgba(230, 184, 77, .22) !important; color: #fff !important; }

.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }

/* ---------------- Formulare ---------------- */
label, .col-form-label, .control-label {
	color: var(--text-2);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	margin-bottom: 6px;
}
.form-control,
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
	font-family: inherit;
	color: var(--text) !important;
	background: rgba(255, 255, 255, 0.045) !important;
	border: 1px solid var(--border-strong) !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	transition: border-color .2s, background .2s, box-shadow .2s;
}
.form-control { min-height: 40px; font-size: 14.5px; }
textarea.form-control { min-height: 120px; line-height: 1.5; }
.form-control:focus, select:focus, textarea:focus, input:focus {
	border-color: var(--accent-hi) !important;
	background: rgba(164, 62, 11, 0.07) !important;
	box-shadow: 0 0 0 3px var(--accent-ring) !important;
	outline: none;
}
.form-control::placeholder, textarea::placeholder, input::placeholder { color: var(--muted) !important; opacity: 1; }
select option { background: #2a2a2a; color: var(--text); }
.form-control:disabled, .form-control[readonly] { opacity: .65; }
.form-group { margin-bottom: 16px; }

/* Formular-Karte (Ticket erstellen, Admin-Formulare) */
.sp-card,
#update_ticket,
#screen form.form-horizontal {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 20px 18px 6px;
}
.sp-card { padding: 0; overflow: hidden; }
.sp-card-body { padding: 18px; }
.sp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.sp-form-grid .sp-span-2 { grid-column: 1 / -1; }
.sp-form-grid .form-group > div[class^="col"],
.sp-form-grid .form-group > label[class*="col"] { padding: 0; max-width: 100%; flex: 0 0 100%; }
.sp-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
/* Techniker erfasst Ticket für Kunden: Betrieb/Mitarbeiter wählen */
.sp-ticket-pick {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 18px;
	margin-bottom: 16px;
	padding: 18px 18px 2px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}
.sp-ticket-pick .form-group > div[class^="col"],
.sp-ticket-pick .form-group > label[class*="col"] { padding: 0; max-width: 100%; flex: 0 0 100%; }
#update_ticket.sp-form-grid { display: grid; }
#update_ticket .form-group { margin-bottom: 16px; }
@media (max-width: 760px) { .sp-ticket-pick { grid-template-columns: 1fr; } }
.sp-hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

/* Select2 im neuen Look */
.select2-container .select2-selection--single {
	height: 40px !important;
	background: rgba(255, 255, 255, 0.045) !important;
	border: 1px solid var(--border-strong) !important;
	border-radius: 10px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text) !important; line-height: 38px !important; padding-left: 12px; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted) !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--text-2) transparent transparent transparent !important; }
.select2-dropdown { background: #2a2a2a !important; border: 1px solid var(--border-strong) !important; border-radius: 10px !important; overflow: hidden; }
.select2-results__option { color: var(--text) !important; background: transparent !important; padding: 8px 12px; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--accent) !important; color: #fff !important; }
.select2-search--dropdown .select2-search__field { background: rgba(255,255,255,.06) !important; color: var(--text) !important; border: 1px solid var(--border-strong) !important; border-radius: 8px !important; }

/* ---------------- Tabellen ---------------- */
.sp-table-wrap {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.table {
	color: var(--text) !important;
	background: transparent !important;
	margin-bottom: 0 !important;
}
.table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 12px 14px !important;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted) !important;
	background: #2b2b2b !important;
	border-top: 0 !important;
	border-bottom: 1px solid var(--border) !important;
}
.table td {
	padding: 12px 14px !important;
	vertical-align: middle !important;
	color: var(--text) !important;
	border-top: 1px solid var(--border) !important;
	background: transparent !important;
}
/* Ältere Admin-Tabellen (direkt im Bildschirm) ebenfalls als Karte */
#screen > table.table,
#screen > form > table.table {
	background: var(--surface) !important;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}
.table-striped tbody tr:nth-of-type(odd) { background: rgba(255, 255, 255, 0.015) !important; }
.table-hover tbody tr:hover { background: rgba(226, 119, 63, 0.07) !important; }
.tr_clickable .clickable { cursor: pointer; }
.cut_text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line_height { line-height: 1.4 !important; }

.sp-id {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 7px;
	font-weight: 700;
	font-size: 12.5px;
	color: var(--accent-hi);
	background: var(--accent-soft);
	border: 1px solid rgba(226, 119, 63, .28);
}
.sp-sub { display: block; font-size: 12px; color: var(--muted); }
.sp-empty {
	padding: 34px 16px !important;
	text-align: center;
	color: var(--muted) !important;
}
.sp-empty svg { display: block; width: 34px; height: 34px; margin: 0 auto 8px; fill: #555; }
.sp-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 26px 0 12px;
	font-size: 15px;
	font-weight: 700;
	color: var(--text-2);
}

/* Status-Pillen (bestehende Klassen) */
.open, .pendent, .action, .closed {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	float: none !important;
	width: auto !important;
	padding: 3px 10px 3px 8px !important;
	border-radius: 999px !important;
	font-size: 12px !important;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	border: 1px solid transparent !important;
}
.open::before, .pendent::before, .action::before, .closed::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}
.open    { color: var(--accent-hi) !important; background: var(--accent-soft) !important; border-color: rgba(226,119,63,.35) !important; }
.pendent { color: var(--info) !important;      background: rgba(91,168,229,.12) !important; border-color: rgba(91,168,229,.35) !important; }
.action  { color: var(--warn) !important;      background: rgba(230,184,77,.12) !important; border-color: rgba(230,184,77,.35) !important; }
.closed  { color: var(--ok) !important;        background: rgba(76,194,122,.12) !important; border-color: rgba(76,194,122,.35) !important; }

/* Zähler ungelesene Nachrichten */
.ticket_counter {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	margin-left: 8px !important;
	padding: 0 6px !important;
	border-radius: 999px !important;
	font-size: 11px !important;
	font-weight: 700;
	color: #fff !important;
	background: var(--danger) !important;
	position: static !important;
	box-shadow: 0 0 0 3px rgba(224, 102, 74, .2);
}

/* ---------------- Ticket-Chat ---------------- */
.sp-ticket-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -4px 0 14px;
}
.sp-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 13px;
	color: var(--text-2);
	background: var(--surface);
	border: 1px solid var(--border);
}
.sp-chip svg { width: 14px; height: 14px; fill: var(--muted); }
.sp-chip a { color: var(--text-2); }
.sp-chip a:hover { color: var(--accent-hi); }

.sp-chat {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
#screen #screen_chat,
.sp-chat #screen_chat {
	display: flex !important;
	flex-direction: column;
	height: clamp(320px, 56vh, 680px);
	min-height: 0 !important;
	max-height: none !important;
	overflow-y: auto !important;
	padding: 20px 18px 10px;
	scroll-behavior: auto;
	background:
		radial-gradient(circle at 20% 0%, rgba(164, 62, 11, 0.06), transparent 50%),
		transparent;
}
#screen .ps-container { all: unset; display: block; }
#screen .ps-scrollbar-x-rail, #screen .ps-scrollbar-y-rail { display: none !important; }

/* Nachrichten */
#screen .media.media-chat {
	display: flex !important;
	align-items: flex-end;
	gap: 10px;
	margin: 0 0 14px !important;
	padding: 0 !important;
	max-width: 100%;
	flex: none;
}
/* Verlauf unten verankern: wenige Nachrichten stehen unten über dem Eingabefeld, wie in Messengern */
#screen #screen_chat > :first-child { margin-top: auto !important; }
/* Ticket geöffnet: ganzer Verlauf blendet einmal sanft ein */
#screen #screen_chat.is-ready > * { animation: spChatIn .35s var(--ease) both; }
/* Neue Nachricht: gleitet von unten herein, eigene von rechts, fremde von links */
#screen .media.media-chat.is-new { animation: spMsgNew .5s cubic-bezier(.16, 1, .3, 1) both; transform-origin: bottom left; }
#screen .media.media-chat.media-chat-reverse.is-new { transform-origin: bottom right; animation-name: spMsgNewOwn; }
#screen .media.media-chat.is-new .media-body p:not(.meta) { animation: spBubbleGlow 1.6s ease-out .2s both; }
#screen .chat-day.is-new { animation: spChatIn .4s var(--ease) both; }
@keyframes spChatIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spMsgNew { 0% { opacity: 0; transform: translate(-10px, 14px) scale(.96); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes spMsgNewOwn { 0% { opacity: 0; transform: translate(10px, 14px) scale(.96); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes spBubbleGlow { 0% { box-shadow: 0 0 0 0 rgba(226, 119, 63, .45); } 100% { box-shadow: 0 0 0 10px rgba(226, 119, 63, 0); } }

/* Tages-Trenner und leerer Verlauf */
#screen .chat-day { flex: none; display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#screen .chat-day::before, #screen .chat-day::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--border); }
#screen .chat-empty { margin: auto; padding: 30px 10px; text-align: center; color: var(--muted); font-size: 14px; }
#screen .media.media-chat.media-chat-reverse { flex-direction: row-reverse; }
#screen .media-chat .avatar {
	flex: none;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px;
	border-radius: 50% !important;
	object-fit: cover;
	background: #fff;
	margin: 0 !important;
	border: 2px solid var(--surface-2);
}
#screen .media-chat .media-body {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	max-width: min(76%, 680px);
	padding: 0 !important;
	flex: 0 1 auto !important;
}
#screen .media-chat.media-chat-reverse .media-body { align-items: flex-end; }
#screen .media-chat .media-body p:not(.meta) {
	position: relative;
	margin: 0 0 3px !important;
	padding: 10px 14px !important;
	border-radius: 16px 16px 16px 5px !important;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--text) !important;
	background: var(--surface-2) !important;
	border: 1px solid var(--border);
	word-break: break-word;
	white-space: normal;
}
#screen .media-chat.media-chat-reverse .media-body p:not(.meta) {
	color: #fff !important;
	background: linear-gradient(135deg, #b8490f, var(--accent-dark)) !important;
	border-color: transparent;
	border-radius: 16px 16px 5px 16px !important;
	box-shadow: 0 8px 20px rgba(164, 62, 11, .25);
}
#screen .media-chat .media-body p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#screen .media-chat .media-body p img { max-width: 100%; border-radius: 10px; margin-top: 6px; }
#screen .media-chat .media-body p.meta {
	margin: 0 4px !important;
	padding: 0 !important;
	font-size: 11.5px !important;
	color: var(--muted) !important;
	background: none !important;
	opacity: 1 !important;
}
/* Systemmeldungen zentriert und dezent */
#screen .media.media-chat.media-system {
	justify-content: center;
	flex-direction: row !important;
}
#screen .media-system .avatar { display: none; }
#screen .media-system .media-body { align-items: center !important; max-width: 90% !important; }
#screen .media-system .media-body p:not(.meta) {
	padding: 6px 12px !important;
	font-size: 12.5px;
	color: var(--text-2) !important;
	background: rgba(255, 255, 255, 0.04) !important;
	border: 1px dashed var(--border-strong) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	text-align: center;
}
@keyframes spMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* "Neue Nachrichten"-Hinweis */
.sp-new-msg {
	position: absolute;
	left: 50%;
	bottom: 86px;
	z-index: 3;
	display: none;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	color: #fff;
	background: var(--accent);
	box-shadow: 0 8px 24px rgba(0,0,0,.4);
	transform: translateX(-50%);
	cursor: pointer;
}
.sp-new-msg.is-on { display: inline-flex; animation: spMsgIn .25s var(--ease) both; }
.sp-new-msg svg { width: 14px; height: 14px; fill: currentColor; }

/* Eingabe (Composer) */
.sp-composer {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	padding: 12px 14px;
	border-top: 1px solid var(--border);
	background: #232323;
}
.sp-composer .avatar {
	flex: none;
	width: 32px !important;
	height: 32px !important;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	margin-bottom: 4px;
}
.sp-composer textarea#txt_user {
	flex: 1 1 auto;
	min-height: 42px;
	max-height: 200px;
	padding: 10px 14px;
	resize: none;
	overflow-y: auto;
	font-size: 14.5px;
	line-height: 1.45;
	border-radius: 12px !important;
}
.sp-composer-btn {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	border: 1px solid var(--border-strong);
	color: var(--text-2);
	background: var(--surface-2);
	cursor: pointer;
	transition: background .2s, color .2s, filter .2s, transform .12s;
}
.sp-composer-btn:hover { background: var(--surface-3); color: #fff; text-decoration: none; }
.sp-composer-btn:active { transform: translateY(1px); }
.sp-composer-btn svg { width: 19px; height: 19px; fill: currentColor; }
.sp-composer-btn.is-send { color: #fff; border-color: var(--accent); background: linear-gradient(135deg, #b8490f, var(--accent-dark)); }
.sp-composer-btn.is-send:hover { filter: brightness(1.12); }
.sp-composer-btn.is-busy { pointer-events: none; opacity: .6; }
.sp-composer-hint { padding: 0 14px 10px; font-size: 11.5px; color: #6f6f6f; background: #232323; }

.sp-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: var(--radius);
	font-size: 14px;
	color: #f3d38a;
	background: rgba(230, 184, 77, .08);
	border: 1px solid rgba(230, 184, 77, .3);
}
.sp-notice svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* eingebettete Bereiche (Rapporte / Infos / Aufgaben) */
.sp-embeds { margin-top: 22px; }
.sp-embeds iframe {
	display: block;
	width: 100%;
	min-height: 320px;
	border: 1px solid var(--border) !important;
	border-radius: var(--radius-lg);
	background: var(--surface);
	margin-bottom: 16px;
}
.sp-embeds iframe.is-empty { display: none; }

/* ---------------- Dialog (Bootstrap-Modal) ---------------- */
.modal-backdrop.show { opacity: .6; }
.modal-content {
	color: var(--text);
	background: #262626 !important;
	border: 1px solid var(--border-strong) !important;
	border-radius: var(--radius-lg) !important;
	box-shadow: var(--shadow);
}
.modal-header, .modal-footer { border-color: var(--border) !important; }
.modal-title { font-weight: 700; }
.modal-header .close { color: var(--text); text-shadow: none; opacity: .7; }
.modal-header .close:hover { color: #fff; opacity: 1; }

/* Datei-Upload-Fenster */
#black_overlay_screen_form_datacenter {
	background: rgba(10, 10, 10, .65) !important;
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}
#box_screen_form_datacenter {
	background: #262626 !important;
	border: 1px solid var(--border-strong) !important;
	border-radius: var(--radius-lg) !important;
	box-shadow: var(--shadow);
	color: var(--text);
}
.jFiler-input-dragDrop {
	background: rgba(255,255,255,.03) !important;
	border: 2px dashed var(--border-strong) !important;
	border-radius: var(--radius) !important;
	color: var(--text-2) !important;
}
.jFiler-input-dragDrop:hover { border-color: var(--accent-hi) !important; }
.jFiler-input-choose-btn { background: var(--accent) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; }

/* ---------------- Ladeanzeige ---------------- */
/* Ladeanzeige: siehe ../../css/ladeanzeige.css */

/* Nachrichtenbereich oben (Fehler / Status) */
.status:empty { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 760px) {
	body { padding: 14px 12px 28px !important; font-size: 14px; }
	.sp-appbar-title { font-size: 19px; }
	.sp-head-title { font-size: 17px; }
	.sp-head-actions { width: 100%; }
	.sp-head-actions .form-control, .sp-head-actions select { width: 100%; flex: 1 1 100%; }
	.sp-form-grid { grid-template-columns: 1fr; }
	.table thead { display: none; }
	.table, .table tbody, .table tr, .table td { display: block; width: 100% !important; }
	.table tr { padding: 10px 12px; border-top: 1px solid var(--border); }
	.table td { border: 0 !important; padding: 2px 0 !important; white-space: normal; }
	#screen .media-chat .media-body { max-width: 84%; }
}

@media (prefers-reduced-motion: reduce) {
	#screen .media.media-chat, #screen .media.media-chat.is-new, #screen #screen_chat.is-ready > *, #screen .chat-day, .sp-new-msg.is-on { animation: none !important; }
}

/* ---------------- Eingang (Schnell-Tickets ohne Betrieb) ---------------- */
.ein-liste { display: grid; gap: 14px; }
.ein-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 16px 18px;
	transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.ein-card.is-urgent { border-color: rgba(224, 102, 74, .45); box-shadow: inset 3px 0 0 var(--danger); }
.ein-card.is-done { opacity: 0; transform: translateX(16px); }
.ein-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ein-who { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.ein-urgent { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ffb4a3; background: rgba(224, 102, 74, .12); border: 1px solid rgba(224, 102, 74, .4); }
.ein-contact { display: flex; flex-wrap: wrap; gap: 6px; }
.ein-tickets { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ein-ticket {
	display: flex; align-items: center; gap: 12px; width: 100%;
	padding: 9px 12px; text-align: left; font: inherit; color: var(--text);
	background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
	transition: border-color .2s, background .2s;
}
.ein-ticket:hover { border-color: var(--accent-hi); background: var(--surface-3); }
.ein-ticket-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ein-ticket-main small { color: var(--muted); font-size: 12px; }
.ein-text { margin: 10px 2px 0; color: var(--text-2); font-style: italic; overflow-wrap: anywhere; }
.ein-assign { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ein-suggest { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; font-size: 13.5px; color: #8fd98f; }
.ein-suggest svg { width: 16px; height: 16px; fill: currentColor; }
.ein-suggest span { color: var(--muted); }
.ein-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ein-row .ein-firma { flex: 1 1 240px; width: auto; }
.ein-neu { margin-top: 14px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.ein-neu[hidden] { display: none; }
.ein-plz { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
#eingang_badge[hidden] { display: none !important; }

/* Eingang – Personen ohne eingerichteten Zugang */
.ein-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.sp-section-title { margin-top: 30px; }
.ein-table td { vertical-align: middle !important; }
.ein-td-actions { text-align: right; white-space: nowrap; }
.ein-td-actions .btn { margin-left: 8px; }
.ein-invited { font-size: 12px; color: var(--muted); }

/* ---------------- Admin-Modus: Rahmen in Signalfarbe um das ganze Fenster + Etikett oben ----------------
   Gleich im Supporter-Admin und im Rapporter-Admin (15.10.2026) */
body.is-admin-mode::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	pointer-events: none;
	border: 3px solid #f0b955;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), inset 0 0 24px rgba(240, 185, 85, .12);
}
.admin-mode-tag {
	position: fixed;
	top: 0;
	left: 50%;
	z-index: 2147483001;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 12px 4px;
	border-radius: 0 0 9px 9px;
	background: #f0b955;
	color: #2a2007 !important;
	font: 700 11px/1.4 'Raleway', system-ui, sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.admin-mode-tag svg { width: 13px; height: 13px; fill: currentColor; }
.admin-mode-tag span { opacity: .7; font-weight: 600; letter-spacing: .04em; text-transform: none; }
.admin-mode-tag:hover span { opacity: 1; text-decoration: underline; }
@media print { body.is-admin-mode::before, .admin-mode-tag { display: none; } }

/* Hinweis mit Sprung in ein anderes Werkzeug (z.B. Supporter → Rapporter-Mitarbeiter) */
.sp-notice-link { margin: 0 0 16px; }
.sp-notice-link > span { flex: 1 1 auto; }
.sp-notice-link .btn { flex: none; white-space: nowrap; }
.sp-notice-link .btn svg { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 760px) { .sp-notice-link { flex-wrap: wrap; } .sp-notice-link .btn { width: 100%; justify-content: center; } }

/* ---------------- Handy (15.10.2026): Admin-Leiste wischbar, Admin-Etikett ohne Überdeckung ---------------- */
@media (max-width: 760px) {
	nav[aria-label="Admin-Bereiche"] {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		width: calc(100% + 24px) !important;
		margin: 0 -12px;
		padding: 2px 12px 8px;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
		mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 28px), transparent);
	}
	nav[aria-label="Admin-Bereiche"]::-webkit-scrollbar { display: none; }
	nav[aria-label="Admin-Bereiche"] > .btn { flex: 0 0 auto !important; scroll-snap-align: start; white-space: nowrap; }
	body.is-admin-mode { padding-top: 26px !important; }
	.admin-mode-tag { white-space: nowrap; font-size: 10px; padding: 2px 10px 3px; }
}
@media (max-width: 760px) {
	/* Eingang: Gäste und Regeln als Karten mit Beschriftung */
	.ein-table td[data-label]:not(:first-child)::before { content: attr(data-label) " · "; color: var(--muted); font-size: 12px; }
	.ein-table .ein-td-actions { text-align: left; white-space: normal; padding-top: 8px !important; }
	.ein-table .ein-td-actions .btn { margin: 0 8px 0 0; }
	.ein-table .ein-invited { display: block; margin-bottom: 6px; }
	/* Alte Admin-Tabellen (Supporter, Technik, Nutzer): Zellen nebeneinander statt je eine Zeile */
	#tablePreview tr { display: flex !important; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
	#tablePreview td { display: inline-block !important; width: auto !important; max-width: 100%; }
	#tablePreview td:first-child { font-weight: 600; }
	#tablePreview td[colspan] { width: 100% !important; }
	/* Formulare im Admin: Felder immer volle Breite (z.B. PLZ) */
	#screen .form-control:not([type=checkbox]):not([type=radio]) { width: 100% !important; max-width: 100%; }
	#screen form .row > [class*="col-"], #screen .form-group > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
}

/* ---------------- Eingang (vereinfacht 18.10.2026): Ticket + Bereich je Zeile ---------------- */
.ein-ticket-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); gap: 8px; align-items: center; }
.ein-ticket-zeile .ein-ticket { min-width: 0; }
.ein-ticket-main b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; white-space: normal; line-height: 1.35; }
.ein-bereich.is-invalid, .ein-firma.is-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(224, 102, 74, .25) !important; }
.ein-urgent-txt { color: #ffb4a3; font-weight: 600; }
.btn.is-busy { pointer-events: none; opacity: .65; }
@media (max-width: 760px) {
	.ein-ticket-zeile { grid-template-columns: 1fr; }
}

/* Ticket archivieren: Datum und Betrag der Ticketpauschale (21.10.2026) */
.sp-pausch { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border-strong); text-align: left; }
.sp-pausch-titel { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sp-pausch-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.sp-pausch-grid label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.sp-pausch-schnell { display: flex; gap: 6px; margin-top: 8px; }
.sp-pausch-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 480px) { .sp-pausch-grid { grid-template-columns: 1fr; } }

/* Bildschirme: Links für die Ticket-Anzeige (22.10.2026) */
.bs-neu { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 0 0 18px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.bs-feld { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.bs-check { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.bs-check input { width: 18px; height: 18px; accent-color: var(--accent-hi); }
.bs-check small { color: var(--muted); }
.bs-liste { display: grid; gap: 12px; }
.bs-karte { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.bs-karte.is-gesperrt { opacity: .6; }
.bs-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.bs-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16px; }
.bs-name svg { width: 20px; height: 20px; fill: var(--accent-hi); }
.bs-marke { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--text-2); border: 1px solid var(--border-strong); }
.bs-marke.is-rot { color: #ffb4a3; border-color: rgba(224, 102, 74, .45); }
.bs-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bs-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.bs-status.is-live::before { background: #4cc27a; box-shadow: 0 0 8px #4cc27a; }
.bs-link { display: flex; gap: 8px; margin-top: 12px; }
.bs-link input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.bs-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.bs-klein { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.bs-weg:hover { color: #ff8b87 !important; border-color: rgba(217, 83, 79, .5) !important; }
@media (max-width: 640px) { .bs-link { flex-wrap: wrap; } .bs-link input { flex: 1 1 100%; } .bs-neu .btn { width: 100%; justify-content: center; } }
