html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    overflow: hidden;
    margin: 0;
}

:root {
    --rz-icon-font-family: 'Material Symbols Outlined';
    --rz-icon-fill: 0;
    --rz-icon-weight: 300;
    --rz-icon-grade: 0;
    --rz-icon-optical-size: 40;
    --rz-primary: #0f172a;
    /* App-Akzentfarbe (identisch zum Timeline-Blau in .tl-bar) */
    --app-accent: #1976d2;
}

/* Einheitliche Akzentfarbe für native Form-Controls (Checkboxen, Radios, …) */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--app-accent, #1976d2);
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' var(--rz-icon-fill, 0),
        'wght' var(--rz-icon-weight, 300),
        'GRAD' var(--rz-icon-grade, 0),
        'opsz' var(--rz-icon-optical-size, 40);
}

.page {
    height: 100%;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]):not(.rz-chkbox) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.app-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.app-loading-fill {
    flex: 1 1 auto;
    min-height: 0;
}

.app-loading-compact {
    flex: 0 0 auto;
    min-height: 72px;
    padding: 1rem;
}

#components-reconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    pointer-events: none;
    background: rgba(8, 15, 28, 0.72);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 150ms ease, visibility 0s linear 500ms;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transition-delay: 500ms, 0s;
}

#components-reconnect-modal.components-reconnect-hide {
    visibility: hidden;
    opacity: 0;
}

.app-reconnect-panel {
    width: min(100%, 520px);
    min-height: 112px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border: 2px solid #1976d2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    color: #172033;
}

.app-reconnect-spinner {
    width: 28px;
    height: 28px;
    border: 4px solid #dbe7f5;
    border-top-color: var(--app-accent, #1976d2);
    border-radius: 50%;
    animation: app-reconnect-spin 0.8s linear infinite;
}

.components-reconnect-failed .app-reconnect-spinner {
    border-color: #d64545;
    animation: none;
}

.app-reconnect-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.app-reconnect-copy strong {
    font-size: 1.1rem;
}

.app-reconnect-copy span {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.35;
}

#app-reconnect-reload {
    min-height: 42px;
    padding: 0 1rem;
    border: 1px solid #155fa8;
    border-radius: 6px;
    background: #1976d2;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

#app-reconnect-reload:hover {
    background: #155fa8;
}

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

@media (max-width: 520px) {
    .app-reconnect-panel {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    #app-reconnect-reload {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Radzen Tabs – Tab-Inhalt füllt verfügbare Höhe */
.rz-tabview {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.rz-tabview-panels {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.rz-tabview-panel {
    height: 100%;
    overflow: hidden;
    padding: 1rem 0 1rem 0;
}

/* Radzen DataGrid – fill parent and scroll only the table body */
.rz-data-grid {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rz-datatable-scrollable {
    flex: 1 !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.rz-datatable-scrollable-wrapper {
    flex: 1 !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.rz-datatable-scrollable-view {
    flex: 1 !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rz-datatable-scrollable-body {
    flex: 1 !important;
    min-height: 0;
    overflow-y: auto !important;
}

/* ── Header Styling ── */
.rz-header {
    background-color: var(--rz-primary); /* matcht Sidebar-Oberkante – kohärente Optik */
    color: #e5e7eb;
    height: 56px;
    min-height: 56px;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    padding: 0 0.5rem;
}

/* Innerer Stack füllt Header und ist vertikal zentriert */
.rz-header .app-header-stack {
    width: 100%;
    height: 100%;
    align-items: center;
}
.rz-header .app-header-spacer {
    flex: 1;
}
.rz-header .app-header-actions {
    padding-right: 0.75rem;
    height: 100%;
}

/* Generische Text- & Link-Farben im Header */
.rz-header a,
.rz-header span,
.rz-header .rz-label,
.rz-header .rz-text {
    color: #e5e7eb;
}

/* Brand-Label */
.rz-header .app-header-brand {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding-left: 0.25rem;
}

/* Username-Text dezenter */
.rz-header .app-header-username {
    color: #cbd5e1;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Logout-Form: nur Wrapper, kein eigenes Styling */
.rz-header .app-header-logout-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* Icon-Buttons (Sidebar-Toggle, Profil, Logout) – einheitlicher Look & Hover */
.rz-header .rz-sidebar-toggle,
.rz-header .app-header-iconlink,
.rz-header .app-header-iconbtn {
    color: #e5e7eb;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.rz-header .rz-sidebar-toggle:hover,
.rz-header .app-header-iconlink:hover,
.rz-header .app-header-iconbtn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.rz-header .app-header-iconlink .material-symbols-outlined,
.rz-header .app-header-iconbtn .material-symbols-outlined {
    font-size: 1.4rem;
}

/* Admin-Impersonation */
.app-header-impersonation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.app-header-impersonation-icon {
    font-size: 1.1rem !important;
    color: #ffb74d;
}
.app-header-impersonation .rz-dropdown {
    width: 260px;
    font-size: 0.85rem;
}

/* Aktiver Verein / Akademie – Kontext-Switcher im Header */
.app-header-context-switch {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.app-header-context-icon {
    font-size: 1.15rem !important;
    color: #9ec5ff;
}
.app-header-context-switch .rz-dropdown {
    font-size: 0.85rem;
}

/* Dropdowns im Header (z. B. Admin-Impersonation) – dunkles Theme statt weißer Kasten */
.rz-header .rz-dropdown {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px !important;
    color: #e5e7eb !important;
    min-height: 36px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.rz-header .rz-dropdown:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.rz-header .rz-dropdown.rz-state-focused,
.rz-header .rz-dropdown:focus-within {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: #63a2ff !important;
    box-shadow: 0 0 0 2px rgba(99, 162, 255, 0.25) !important;
}
.rz-header .rz-dropdown .rz-dropdown-label,
.rz-header .rz-dropdown .rz-placeholder,
.rz-header .rz-dropdown .rz-dropdown-trigger {
    color: #e5e7eb !important;
    background: transparent !important;
}
.rz-header .rz-dropdown .rz-placeholder {
    color: rgba(229, 231, 235, 0.55) !important;
}

/* ══════════════════ Sidebar Styling ══════════════════ */
.rz-sidebar {
    background-image: linear-gradient(180deg, var(--rz-primary) 100%, var(--rz-primary) 0%);
    width: 200px;
    padding: 0 !important;
    transition: width 0.2s ease;
    /* Hide native scrollbar so menu items stay flush with the right edge
       (a reserved scrollbar would leave a gap on hover/active backgrounds).
       Scrolling still works via wheel/trackpad/touch. */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* legacy Edge/IE */
}
.rz-sidebar::-webkit-scrollbar {    /* Chromium/WebKit */
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}
.rz-sidebar *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}
body.sidebar-collapsed .rz-sidebar {
    width: 64px;
}

/* ── Reset Radzen container chrome (panel, list, items) ── */
.rz-sidebar .rz-panel-menu {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    scrollbar-width: none;
}
.rz-sidebar .rz-panel-menu ul,
.rz-sidebar .rz-panel-menu .rz-navigation-items {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item {
    border-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item-children {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Item wrapper: flush edges, full width, no rounding ── */
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper {
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ── Item link: uniform height + identical left padding for ALL levels ── */
.rz-sidebar .rz-panel-menu .rz-navigation-item-link,
.rz-sidebar .rz-panel-menu .rz-navigation-item .rz-navigation-item-link {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    box-sizing: border-box !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ── Icons: always visible, fixed slot, identical for ALL levels ── */
.rz-sidebar .rz-panel-menu .rz-navigation-item-icon {
    display: inline-flex !important;
    visibility: visible !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    min-width: 24px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
}

/* Kill Material ripple/click effect */
.rz-sidebar .rz-panel-menu .rz-navigation-item-link:active,
.rz-sidebar .rz-panel-menu .rz-navigation-item-link:not(.rz-state-disabled):active {
    background: transparent !important;
    background-color: transparent !important;
    background-size: unset !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item-link:before,
.rz-sidebar .rz-panel-menu .rz-navigation-item-link:active:before {
    display: none !important;
}

/* ── Collapsed sidebar: hide text, center icons ── */
body.sidebar-collapsed .rz-sidebar .rz-navigation-item-text {
    display: none !important;
}
/* Hide the expand/collapse chevron when sidebar is collapsed – keeps all icons aligned */
body.sidebar-collapsed .rz-sidebar .rz-panel-menu .rz-navigation-item-icon-children {
    display: none !important;
}
body.sidebar-collapsed .rz-sidebar .rz-panel-menu .rz-navigation-item-link,
body.sidebar-collapsed .rz-sidebar .rz-panel-menu .rz-navigation-item .rz-navigation-item-link {
    justify-content: center !important;
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Colors: default / hover / active ── */
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:link,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:visited {
    background: transparent !important;
    background-color: transparent !important;
    color: #d7d7d7 !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item-text,
.rz-sidebar .rz-panel-menu .rz-navigation-item-icon {
    color: #d7d7d7 !important;
}
/* Focus / keyboard – nur für nicht-aktive Items */
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:focus:not(.rz-navigation-item-wrapper-active),
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:focus-visible:not(.rz-navigation-item-wrapper-active),
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:focus-within:not(.rz-navigation-item-wrapper-active) {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}
/* Hover */
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:hover,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:active {
    background-color: rgba(99, 162, 255, 0.2) !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:hover .rz-navigation-item-text,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper:hover .rz-navigation-item-icon {
    color: #93bbff !important;
}
/* Active / selected – inset box-shadow to avoid layout shift */
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active:hover,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active:focus,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active:active,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active:focus-visible {
    background-color: rgba(99, 162, 255, 0.2) !important;
    box-shadow: inset 3px 0 0 #63a2ff !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active .rz-navigation-item-text,
.rz-sidebar .rz-panel-menu .rz-navigation-item-wrapper-active .rz-navigation-item-icon {
    color: #93bbff !important;
}

/* ── Sidebar: section divider ── */
.rz-sidebar .sidebar-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0.4rem 0;
}

/* ── Sidebar: "coming soon" items – dimmed but still clickable ── */
.rz-sidebar .rz-panel-menu .rz-navigation-item.menu-item-soon .rz-navigation-item-text,
.rz-sidebar .rz-panel-menu .rz-navigation-item.menu-item-soon .rz-navigation-item-icon {
    color: rgba(160, 170, 185, 0.45) !important;
}
.rz-sidebar .rz-panel-menu .rz-navigation-item.menu-item-soon .rz-navigation-item-wrapper:hover .rz-navigation-item-text,
.rz-sidebar .rz-panel-menu .rz-navigation-item.menu-item-soon .rz-navigation-item-wrapper:hover .rz-navigation-item-icon {
    color: rgba(160, 170, 185, 0.7) !important;
}

/* ── Sidebar Gruppen-Header (z. B. "Profile") ── */
.rz-sidebar .profile-group-header {
    padding: 0.75rem 1rem 0.25rem 1rem;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    overflow: hidden;
}

/* Im eingeklappten Sidebar-Zustand: Header zu schmalem Divider reduzieren */
body.sidebar-collapsed .rz-sidebar .profile-group-header {
    font-size: 0;
    line-height: 0;
    padding: 0;
    margin: 0.5rem 0.75rem;
    color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── ProfileCard (Steckbrief) ── */
.profile-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.profile-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.profile-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.profile-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-card-initials {
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    line-height: 1;
}
.profile-card-title {
    display: flex;
    flex-direction: column;
}
.profile-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}
.profile-card-body .field-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.35rem 0;
}
.profile-card-body .field-row .field-label {
    color: #64748b;
    min-width: 140px;
    flex-shrink: 0;
}
.profile-card-body .field-row .field-value {
    font-weight: 500;
}
.profile-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.profile-card-footer:has(.assignment-list) {
    justify-content: flex-start;
}
.assignment-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}
.assignment-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #64748b;
}
.assignment-pending {
    flex-basis: 100%;
}
/* Gemeinsame Verein/Akademie-Badge auf der Spielerkarte */
.scope-badge {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.scope-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.scope-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #2563eb;
    background: #dbeafe;
    border-radius: 4px;
    padding: 0.05rem 0.32rem;
    flex-shrink: 0;
}
.scope-tag-academy {
    color: #b45309;
    background: #fef3c7;
}
.scope-tag-season {
    color: #047857;
    background: #d1fae5;
}
.scope-tag-team {
    color: #6d28d9;
    background: #ede9fe;
}
.scope-tag-members {
    color: #475569;
    background: #e2e8f0;
}
.scope-val {
    font-size: 0.8rem;
    color: #334155;
}

/* ═══════════════════════════════════════════════════════
   DASHBOARD WIDGETS
   ═══════════════════════════════════════════════════════ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    align-items: start;
}
.dashboard-widget {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dashboard-widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    background: #334155;
    border-bottom: 1px solid #1e293b;
}
.dashboard-widget-title {
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Aktionsbuttons in der dunklen Widget-Kopfzeile hell darstellen */
.dashboard-widget-header .rz-button,
.dashboard-widget-header .rz-button .rz-button-text,
.dashboard-widget-header .rz-button .rzi {
    color: #ffffff !important;
}
.dashboard-widget-header .rz-button:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}
.dashboard-widget-body {
    padding: 1rem 1.1rem;
    flex: 1;
}
.dashboard-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.dashboard-list-item:last-child {
    border-bottom: none;
}
.dashboard-empty {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Zweispaltiges Profil-Dashboard: links Profile, rechts gestapelte Info-Widgets */
.dashboard-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.dashboard-two-col > .dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (max-width: 1100px) {
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
}

/* Mannschafts-/Saison-Karten im Info-Widget */
.dashboard-team-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.dashboard-team-row:last-child {
    border-bottom: none;
}
.dashboard-scope-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: #64748b;
}
.dashboard-chat-btn {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--rz-primary, #2563eb);
    flex-shrink: 0;
}
.dashboard-chat-btn:hover:not(:disabled) {
    background: #eff6ff;
}
.dashboard-chat-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}
.dashboard-season-block {
    padding: 0.6rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.dashboard-season-block:last-child {
    border-bottom: none;
}
.dashboard-reg-banner {
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    margin-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.dashboard-reg-open {
    background: #ecfdf5;
    color: #047857;
}
.dashboard-reg-closed {
    background: #fef2f2;
    color: #b91c1c;
}
.dashboard-reg-pending {
    background: #fffbeb;
    color: #b45309;
}

/* Dreispaltiges Profil-Dashboard: links Profilverwaltung, Mitte Termine, rechts Mannschaften/Wünsche */
.dashboard-three-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}
.dashboard-three-col > .dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.dashboard-three-col.dashboard-no-profile {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 1280px) {
    .dashboard-three-col {
        grid-template-columns: 1fr;
    }
    .dashboard-three-col.dashboard-no-profile {
        grid-template-columns: 1fr;
    }
}

/* Vereinheitlichtes Dashboard: 3 Spalten mit Mindestbreite, bricht auf 2/1 um */
.mf-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    align-items: start;
}
.mf-dash-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

/* Profilverwaltung in der linken Spalte: Karten untereinander, Anlegen-Aktionen unten */
.profile-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.25rem;
    overflow-y: auto;
    height: 100%;
}
.profile-stack > .profile-card {
    width: 100% !important;
    align-self: stretch !important;
}
.profile-stack > .profile-add {
    order: 99;
}

/* Klickbare/auswählbare Profil-Karte (Spieler-Selektion) */
.profile-card-selectable {
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.profile-card-selectable:hover {
    background: #f1f5f9;
}
.profile-card-selected,
.profile-card-selected.profile-card-selectable:hover {
    background: #dbeafe;
    border-color: #2563eb !important;
}
.profile-card-selected .profile-card-header {
    border-bottom-color: #bfdbfe;
}
.profile-card-selected .profile-card-avatar {
    background: #bfdbfe;
}

/* ── Kalender: linke Profil-Spalte (Spieler/Trainer-Auswahl) ── */
.calendar-profile-pane {
    flex-shrink: 0;
    width: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #e2e8f0;
    padding-right: 0.75rem;
    transition: width 0.15s ease;
}
.calendar-profile-pane.collapsed {
    width: 64px;
    padding-right: 0.5rem;
}
.calendar-profile-pane-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.1rem 0 0.5rem;
}
.calendar-profile-pane.collapsed .calendar-profile-pane-head {
    justify-content: center;
}
.calendar-profile-pane-title {
    font-weight: 600;
    color: #475569;
}
.calendar-profile-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.15rem;
}
.calendar-profile-list .profile-card {
    width: 100%;
}
/* Kompakte Karten: leeren Karten-Body ausblenden (weniger Infos im Kalender) */
.calendar-profile-list .profile-card-body:empty {
    display: none;
}
/* Eingeklappt: nur klickbare Avatare zentriert */
.calendar-profile-pane.collapsed .calendar-profile-list {
    align-items: center;
}
.calendar-profile-avatar {
    width: 48px;
    height: 48px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.calendar-profile-avatar:hover {
    background: #e2e8f0;
}
.calendar-profile-avatar.selected {
    border-color: #2563eb;
    background: #bfdbfe;
}
.calendar-profile-avatar .profile-card-initials {
    font-size: 1.1rem;
}

/* Vormund-Hinweis */
.profile-guardian-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #bfdbfe;
}

/* Mitglieder-Liste einer Chat-Gruppe */
.dashboard-members-block {
    margin-top: 0.6rem;
}
.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 60vh;
    overflow-y: auto;
}
.chat-history-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.chat-history-icon {
    font-size: 1.15rem;
    line-height: 1.3;
}
.chat-history-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.chat-history-text {
    font-size: 0.88rem;
    color: #1e293b;
}
.chat-history-time {
    font-size: 0.7rem;
    color: #94a3b8;
}
.dashboard-members-head {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.dashboard-members-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.55rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.dashboard-group-member {
    font-size: 0.72rem;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
}
.dashboard-group-member-admin {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}
.dashboard-group-member-mine {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    font-weight: 600;
}
.dashboard-group-member-coach {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.dashboard-member-remove {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0.2rem;
    border-radius: 999px;
    cursor: pointer;
    color: #94a3b8;
    vertical-align: middle;
}
.dashboard-member-remove:hover {
    color: #b91c1c;
}

/* Gruppenadmin-Kennzeichnung + Mitgliederverwaltung im Dashboard */
.dashboard-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}
.dashboard-manage-btn {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    flex-shrink: 0;
}
.dashboard-manage-btn:hover {
    background: #f1f5f9;
    color: #1d4ed8;
}
.dashboard-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
}
.dashboard-action-btn:hover {
    background: #f1f5f9;
}
.dashboard-action-btn-danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}
.dashboard-action-btn-danger:hover {
    background: #fee2e2;
}
.dashboard-inline-action {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.dashboard-manage-panel {
    margin-top: 0.5rem;
    padding: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.dashboard-manage-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin: 0.4rem 0 0.3rem;
}
.dashboard-manage-title:first-child {
    margin-top: 0;
}
.dashboard-manage-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
    font-size: 0.82rem;
    color: #334155;
}
.dashboard-manage-row > span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-manage-iconbtn {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    flex-shrink: 0;
}
.dashboard-manage-iconbtn:hover {
    background: #e2e8f0;
    color: #1d4ed8;
}
.dashboard-manage-search {
    width: 100%;
    margin: 0.25rem 0 0.4rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.82rem;
}
.dashboard-manage-empty {
    font-size: 0.78rem;
    color: #94a3b8;
    padding: 0.3rem 0;
}
/* Scrollbare Kandidatenliste: füllt verfügbaren Platz nach unten, dann Scroll */
.dashboard-candidate-list {
    max-height: min(45vh, 22rem);
    overflow-y: auto;
    margin-right: -0.2rem;
    padding-right: 0.2rem;
}
.dashboard-guardian-hint {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-left: 0.35rem;
}


/* ═══════════════════════════════════════════════════════
   CUSTOM BUTTON OVERRIDES – Pill-shaped, branded styles
   ═══════════════════════════════════════════════════════ */

/* ── 1. Base reset – every Radzen button ── */
/* border-radius for all styled buttons incl. text-variant */
.rz-button:not(.rz-datepicker-trigger):not(.rz-numeric-button) {
    border-radius: 9999px !important;
}

/* border + other resets only for non-text-variant */
.rz-button:not(.rz-datepicker-trigger):not(.rz-numeric-button):not(.rz-variant-text) {
    box-shadow: none !important;
    font-weight: 500 !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
    border-width: 1px !important;
    border-style: solid !important;
}

/* Kill Radzen Material ripple overlay */
.rz-button::before { display: none !important; }

/* ── 2. Primary – dark navy (matches sidebar) ── */
.rz-button.rz-primary {
    background: #203254 !important;
    border-color: #203254 !important;
    color: #fff !important;
}
.rz-button.rz-primary:hover:not([disabled]):not(.rz-state-disabled) {
    background: #2d4470 !important;
    border-color: #2d4470 !important;
    color: #fff !important;
}

/* ── 3. Secondary – slate ── */
.rz-button.rz-secondary:not(.rz-datepicker-trigger):not(.rz-numeric-button):not([disabled]):not(.rz-state-disabled) {
    background: #fff !important;
    border-color: #64748b !important;
    color: #1e293b !important;
}
.rz-button.rz-secondary:not(.rz-datepicker-trigger):not(.rz-numeric-button):hover:not([disabled]):not(.rz-state-disabled) {
    background: #e2e8f0 !important;
}

/* ── 4. Info – blue ── */
.rz-button.rz-info {
    background: #fff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
}
.rz-button.rz-info:hover:not([disabled]):not(.rz-state-disabled) {
    background: #dbeafe !important;
}

/* ── 5. Success – green ── */
.rz-button.rz-success {
    background: #fff !important;
    border-color: #22c55e !important;
    color: #15803d !important;
}
.rz-button.rz-success:hover:not([disabled]):not(.rz-state-disabled) {
    background: #dcfce7 !important;
}

/* ── 6. Danger – red ── */
.rz-button.rz-danger {
    background: #fff !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}
.rz-button.rz-danger:hover:not([disabled]):not(.rz-state-disabled) {
    background: #fee2e2 !important;
}

/* ── 7. Warning – amber ── */
.rz-button.rz-warning {
    background: #fff !important;
    border-color: #f59e0b !important;
    color: #b45309 !important;
}
.rz-button.rz-warning:hover:not([disabled]):not(.rz-state-disabled) {
    background: #fef3c7 !important;
}

/* ── 8. Light – soft slate ── */
.rz-button.rz-light {
    background: #fff !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}
.rz-button.rz-light:hover:not([disabled]):not(.rz-state-disabled) {
    background: #e2e8f0 !important;
}

/* ── 9. Dark ── */
.rz-button.rz-dark {
    background: #fff !important;
    border-color: #475569 !important;
    color: var(--rz-primary) !important;
}
.rz-button.rz-dark:hover:not([disabled]):not(.rz-state-disabled) {
    background: #e2e8f0 !important;
}

/* ── 10. Disabled ── */
.rz-button[disabled],
.rz-button.rz-state-disabled {
    opacity: 1 !important;
    border-color: rgb(200, 200, 200) !important;
    background-color: #efefef !important;
    color: rgb(200, 200, 200) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ── 11. Text variant – keep borderless ── */
.rz-button.rz-variant-text {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.rz-button.rz-variant-text:hover:not([disabled]):not(.rz-state-disabled) {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: transparent !important;
}

/* ── RadzenSwitch – checked state uses Primary navy ── */
.rz-switch.rz-switch-checked .rz-switch-circle::before {
    background: #203254 !important;
}

/* ═══════════════════════════════════════════════════════
   STYLED FILTER BAR – SelectBar als Pill-Button-Gruppe
   RadzenSelectBar rendert als div.rz-buttonset > div.rz-button
   ═══════════════════════════════════════════════════════ */

/* Secondary variant – alle Buttons neutral, aktiver hervorgehoben */
.secondary-filter-bar.rz-buttonset {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 0.4rem !important;
}
.secondary-filter-bar.rz-buttonset .rz-button {
    border-radius: 9999px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    color: #475569 !important;
    box-shadow: none !important;
    font-weight: 500 !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}
.secondary-filter-bar.rz-buttonset .rz-button::before { display: none !important; }
.secondary-filter-bar.rz-buttonset .rz-button:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}
.secondary-filter-bar.rz-buttonset .rz-button.rz-state-active {
    background: #334155 !important;
    border-color: #334155 !important;
    color: #fff !important;
}
.secondary-filter-bar.rz-buttonset .rz-button.rz-state-active:hover {
    background: #1e293b !important;
    border-color: #1e293b !important;
}

/* Strip SelectBar wrapper chrome */
.styled-filter-bar.rz-buttonset {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 0.4rem !important;
}

/* Base for every item-button */
.styled-filter-bar.rz-buttonset .rz-button {
    border-radius: 9999px !important;
    border: 1px solid !important;
    box-shadow: none !important;
    font-weight: 500 !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}
.styled-filter-bar.rz-buttonset .rz-button::before { display: none !important; }

/* ── Alle – Primary (navy) ── */
.styled-filter-bar.rz-buttonset .rz-button:nth-child(1) {
    border-color: #203254 !important;
    background: #fff !important;
    color: #203254 !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(1):hover {
    background: #e2e8f0 !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(1).rz-state-active {
    background: #203254 !important;
    border-color: #203254 !important;
    color: #fff !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(1).rz-state-active:hover {
    background: #2d4470 !important;
    border-color: #2d4470 !important;
}

/* ── Erfolge – Success (green) ── */
.styled-filter-bar.rz-buttonset .rz-button:nth-child(2) {
    border-color: #22c55e !important;
    background: #fff !important;
    color: #15803d !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(2):hover {
    background: #dcfce7 !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(2).rz-state-active {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #fff !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(2).rz-state-active:hover {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

/* ── Angriffe – Danger (red) ── */
.styled-filter-bar.rz-buttonset .rz-button:nth-child(3) {
    border-color: #ef4444 !important;
    background: #fff !important;
    color: #b91c1c !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(3):hover {
    background: #fee2e2 !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(3).rz-state-active {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}
.styled-filter-bar.rz-buttonset .rz-button:nth-child(3).rz-state-active:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* ===================== Global Chat ===================== */
/* Color palette matching the app header (var(--rz-primary) dark-slate theme) */
.chat-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: var(--rz-primary);
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    z-index: 900;
    transition: background .15s, transform .15s;
}
.chat-fab:hover { background: #1e293b; transform: translateY(-2px); }
.chat-fab.disabled { background: #334155; color: #64748b; cursor: default; box-shadow: none; }
.chat-fab.disabled:hover { background: #334155; transform: none; }
.chat-fab .material-symbols-outlined { font-size: 1.6rem; }
.chat-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    min-width: 1.1rem;
    text-align: center;
    font-weight: 600;
    border: 2px solid var(--rz-primary);
}

.chat-overlay-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 901;
}
.chat-overlay {
    position: fixed;
    right: 1.25rem;
    bottom: 5.25rem;
    width: 720px;
    max-width: calc(100vw - 2rem);
    height: 560px;
    max-height: calc(100vh - 7rem);
    background: #1e293b;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 902;
    border: 1px solid rgba(255,255,255,0.06);
}
/* Scrollbars only inside the chat overlay so they match the dark chat
   theme, while the rest of the app keeps its default scrollbars.
   `scrollbar-color`/`scrollbar-width` are inherited properties, so they
   also reach the emoji-picker's shadow DOM (Firefox + Chromium). */
.chat-overlay {
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,0.45) transparent;
}
.chat-overlay ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.chat-overlay ::-webkit-scrollbar-track {
    background: transparent;
}
.chat-overlay ::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.45);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.chat-overlay ::-webkit-scrollbar-thumb:hover {
    background: rgba(148,163,184,0.7);
    background-clip: padding-box;
}
.chat-overlay ::-webkit-scrollbar-corner {
    background: transparent;
}
.chat-overlay.maximized {
    right: 1.5rem;
    bottom: 1.5rem;
    top: 1.5rem;
    left: 1.5rem;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
}
/* In maximised mode keep both panes visible even when a conversation is open,
   and give the conversation pane a comfortable reading width. */
@media (min-width: 601px) {
    .chat-overlay.maximized.show-conv .chat-pane-left { display: flex; }
    .chat-overlay.maximized .chat-pane-left { width: 320px; }
    .chat-overlay.maximized .chat-messages { padding-left: 1.25rem; padding-right: 1.25rem; }
}
.chat-overlay-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: var(--rz-primary);
    color: #e5e7eb;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chat-overlay-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #e5e7eb;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-iconbtn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 6px;
}
.chat-iconbtn:hover { background: rgba(255,255,255,0.08); }
.chat-iconbtn-sm {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 6px;
}
.chat-iconbtn-sm:hover { background: rgba(255,255,255,0.08); color: #e5e7eb; }

.chat-overlay-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.chat-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.chat-group-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.chat-group-row:hover { background: rgba(255,255,255,0.05); }
.chat-group-icon { color: #9ec5ff; }
.chat-group-name { font-weight: 600; color: #e5e7eb; }
.chat-group-sub { font-size: 0.78rem; color: #64748b; }
.chat-unread {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    min-width: 1.2rem;
    text-align: center;
}

.chat-pinned {
    flex-shrink: 0;
    max-height: 45%;
    overflow-y: auto;
    background: rgba(255,185,0,0.08);
    border-bottom: 1px solid rgba(253,230,138,0.2);
    padding: 0.5rem;
}
.chat-poll {
    background: var(--rz-primary);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.6rem;
    margin-bottom: 0.5rem;
}
.chat-poll-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    color: #e5e7eb;
}
.chat-poll-closed {
    font-size: 0.72rem;
    color: #fbbf24;
    background: rgba(251,191,36,0.12);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
}
.chat-poll-opt {
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.35rem;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.chat-poll-opt.votable { cursor: pointer; }
.chat-poll-opt.votable:hover { border-color: #3b82f6; }
.chat-poll-opt.voted { border-color: #3b82f6; background: rgba(59,130,246,0.12); }
.chat-poll-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: rgba(59,130,246,0.15);
    z-index: 0;
    transition: width .2s;
}
.chat-poll-opt-text { position: relative; z-index: 1; flex: 1; font-size: 0.88rem; color: #e5e7eb; }
.chat-poll-opt-count { position: relative; z-index: 1; font-size: 0.8rem; color: #94a3b8; font-weight: 600; }
.chat-poll-foot { font-size: 0.75rem; color: #64748b; margin-top: 0.2rem; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.chat-msg { max-width: 80%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg.system {
    align-self: center;
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.chat-msg-sender { font-size: 0.74rem; color: #64748b; margin-bottom: 0.1rem; }
.chat-msg-bubble {
    display: inline-block;
    background: var(--rz-primary);
    color: #e5e7eb;
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    font-size: 0.9rem;
    word-break: break-word;
    text-align: left;
    white-space: pre-wrap;
}
.chat-msg.mine .chat-msg-bubble { background: #2563eb; color: #fff; }
.chat-msg-time { font-size: 0.68rem; color: #7c8ea7; margin-top: 0.1rem; }

.chat-composer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: #1e293b;
}
.chat-composer .chat-iconbtn { color: #9ec5ff; }
.chat-composer-input {
    flex: 1;
    border: 1px solid #334155;
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    outline: none;
    background: var(--rz-primary);
    color: #e5e7eb;
}
.chat-composer-input::placeholder { color: #475569; }
.chat-composer-input:focus { border-color: #3b82f6; }

.chat-form { padding: 0.85rem; overflow-y: auto; }
.chat-form-title { font-weight: 600; color: #e5e7eb; margin-bottom: 0.5rem; }
.chat-label { display: block; font-size: 0.78rem; color: #94a3b8; margin: 0.4rem 0 0.15rem; }
.chat-input {
    width: 100%;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 0.4rem;
    box-sizing: border-box;
    background: var(--rz-primary);
    color: #e5e7eb;
}
.chat-input::placeholder { color: #475569; }
.chat-input:focus { border-color: #3b82f6; }
.chat-check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #94a3b8; margin: 0.3rem 0; }
.chat-error { color: #f87171; font-size: 0.82rem; margin: 0.25rem 0; }
.chat-chip {
    border: 1px solid #334155;
    background: var(--rz-primary);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #94a3b8;
}
.chat-chip.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.chat-btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
}
.chat-btn-primary:hover { background: #1d4ed8; }
.chat-btn-primary:disabled { opacity: 0.6; cursor: default; }
.chat-btn-text {
    background: transparent;
    border: none;
    color: #9ec5ff;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
}
.chat-manage { padding: 0.75rem; overflow-y: auto; }
.chat-member-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.88rem;
    color: #e5e7eb;
}

/* ---- Two-pane layout ---- */
.chat-2pane {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}
.chat-pane-left {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: #162032;
    min-height: 0;
}
.chat-pane-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}
.chat-pane-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.chat-rooms {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.chat-rooms-section {
    padding: 0.4rem 0.7rem 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}
.chat-pane-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-conv-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: #162032;
    flex-shrink: 0;
}
.chat-conv-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #e5e7eb;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-conv-head .chat-iconbtn { color: #9ec5ff; }
.chat-back-mobile { display: none; }
.chat-group-row.active { background: rgba(59,130,246,0.12); }

/* ---- Pinned widgets header ---- */
.chat-pinned-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fbbf24;
    padding: 0.15rem 0.25rem 0.4rem;
}

/* ---- Poll extras ---- */
.chat-poll-badge {
    font-size: 0.7rem;
    color: #c4b5fd;
    background: rgba(139,92,246,0.15);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
}
.chat-poll-identity {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
.chat-poll-identity-select {
    flex: 1;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 0.25rem 0.4rem;
    font-size: 0.82rem;
    outline: none;
    background: var(--rz-primary);
    color: #e5e7eb;
}
.chat-poll-voters {
    font-size: 0.72rem;
    color: #64748b;
    margin: -0.2rem 0 0.4rem 0.4rem;
}
.chat-guardian-hint {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}
.chat-msg-poll-inline { align-self: stretch; max-width: 100%; }

/* ---- Widget menu ---- */
.chat-widget-wrap { position: relative; display: flex; }
.chat-widget-menu {
    position: absolute;
    bottom: calc(100% + 0.3rem);
    left: 0;
    background: var(--rz-primary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    padding: 0.3rem;
    z-index: 5;
    min-width: 150px;
}
.chat-widget-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #e5e7eb;
    text-align: left;
}
.chat-widget-item:hover { background: rgba(255,255,255,0.06); }

/* ---- Conversation menu (leave / delete) ---- */
.chat-conv-menu {
    bottom: auto;
    top: calc(100% + 0.3rem);
    left: auto;
    right: 0;
}
.chat-widget-item-danger { color: #f87171; }
.chat-widget-item-danger:hover { background: rgba(239,68,68,0.1); }
.chat-owner-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(251,191,36,0.12);
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    margin-left: 0.35rem;
}
.chat-role-badge {
    font-size: 0.68rem;
    color: #94a3b8;
    background: rgba(255,255,255,0.08);
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    margin-left: 0.35rem;
}
.chat-confirm {
    margin: 0.5rem 0.7rem;
    padding: 0.7rem;
    border: 1px solid rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.08);
    border-radius: 10px;
}
.chat-confirm-text {
    font-size: 0.85rem;
    color: #fca5a5;
    margin-bottom: 0.6rem;
}
.chat-btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
}
.chat-btn-danger:hover { background: #b91c1c; }
.chat-btn-danger:disabled { opacity: 0.6; cursor: default; }

/* ---- Emoji popover ---- */
.chat-emoji-popover {
    position: absolute;
    bottom: 4rem;
    left: 0.6rem;
    z-index: 6;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
    border-radius: 10px;
    overflow: hidden;
}
.chat-emoji-host emoji-picker {
    --background: var(--rz-primary);
    --border-color: rgba(255,255,255,0.1);
    --category-font-color: #94a3b8;
    --text-color: #e5e7eb;
    height: 320px;
}

@media (max-width: 600px) {
    .chat-overlay {
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .chat-pane-left { width: 100%; border-right: none; }
    .chat-pane-right { display: none; }
    .chat-overlay.show-conv .chat-pane-left { display: none; }
    .chat-overlay.show-conv .chat-pane-right { display: flex; }
    .chat-back-mobile { display: flex; }
}

/* ── Kalender (eigene Komponente) ── */
.cal2 { display: flex; flex-direction: column; height: 100%; min-height: 0; font-size: 0.8rem; }
.cal2-toolbar { display: flex; align-items: center; gap: 6px; padding: 2px 2px 10px; flex: 0 0 auto; }
.cal2-nav { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.cal2-toolbar .cal2-title { flex: 1 1 auto; text-align: center; font-weight: 700; font-size: 1.1rem; }
.cal2-btn { border: 1px solid var(--rz-base-300, #d0d0d0); background: var(--rz-base-100, #fff); border-radius: 6px; padding: 7px 14px; cursor: pointer; font-size: 0.9rem; line-height: 1.2; color: inherit; }
.cal2-btn-icon { font-size: 1.15rem; padding: 5px 13px; line-height: 1; }
.cal2-btn:hover { background: var(--rz-base-200, #f0f0f0); }
.cal2-btn.active { background: var(--rz-primary, #1565c0); color: #fff; border-color: var(--rz-primary, #1565c0); }
.cal2-viewswitch { display: inline-flex; }
.cal2-viewswitch .cal2-btn { border-radius: 0; border-left: none; }
.cal2-viewswitch .cal2-btn:first-child { border-radius: 6px 0 0 6px; border-left: 1px solid var(--rz-base-300, #d0d0d0); }
.cal2-viewswitch .cal2-btn:last-child { border-radius: 0 6px 6px 0; }
.cal2-body { flex: 1 1 auto; min-height: 0; display: flex; }

/* Zeitraster (Woche/Tag) */
.cal2-tg { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; border: 1px solid var(--rz-base-300, #e0e0e0); border-radius: 8px; overflow: hidden; }
.cal2-tg-head { display: flex; flex: 0 0 auto; border-bottom: 1px solid var(--rz-base-300, #e0e0e0); background: var(--rz-base-50, #fafafa); }
.cal2-tg-corner { flex: 0 0 52px; }
.cal2-tg-dayhead { flex: 1 1 0; text-align: center; padding: 7px 2px; font-weight: 600; font-size: 0.85rem; border-left: 1px solid var(--rz-base-400, #cbd5e1); line-height: 1.15; }
.cal2-tg-dayhead.today { color: var(--rz-primary, #1565c0); }
.cal2-tg-dayhead .dnum { font-size: 1.15rem; font-weight: 700; }
.cal2-tg-allday { display: flex; flex: 0 0 auto; border-bottom: 1px solid var(--rz-base-300, #e0e0e0); min-height: 22px; max-height: 90px; overflow: auto; background: var(--rz-base-50, #fafafa); }
.cal2-tg-allday-axis { flex: 0 0 52px; font-size: 0.66rem; color: #888; padding: 3px 5px; text-align: right; }
.cal2-tg-allday-cell { flex: 1 1 0; border-left: 1px solid var(--rz-base-400, #cbd5e1); padding: 2px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal2-allday-chip { font-size: 0.7rem; font-weight: 600; border-radius: 4px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal2-tg-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding-top: 8px; }
.cal2-tg-grid { display: flex; position: relative; height: 100%; }
.cal2-tg-axis { flex: 0 0 52px; display: flex; flex-direction: column; }
.cal2-tg-hour { flex: 1 1 0; min-height: 46px; position: relative; }
.cal2-tg-hour:nth-of-type(odd) { background: rgba(0, 0, 0, 0.04); }
.cal2-tg-hour > span { position: absolute; top: -8px; right: 7px; font-size: 0.72rem; color: #888; }
.cal2-tg-col { flex: 1 1 0; position: relative; display: flex; flex-direction: column; border-left: 1px solid var(--rz-base-400, #cbd5e1); min-width: 0; }
.cal2-tg-slot { flex: 1 1 0; min-height: 46px; border-top: 1px solid var(--rz-base-200, #e8e8e8); cursor: pointer; }
.cal2-tg-slot:nth-of-type(odd) { background: rgba(0, 0, 0, 0.04); }
.cal2-tg-slot:hover { background: rgba(33, 150, 243, 0.14); }
.cal2-tg-col.holiday-public { background-image: repeating-linear-gradient(45deg, rgba(229,57,53,0.10) 0, rgba(229,57,53,0.10) 8px, transparent 8px, transparent 16px); }
.cal2-tg-col.holiday-school { background-image: repeating-linear-gradient(45deg, rgba(255,152,0,0.10) 0, rgba(255,152,0,0.10) 8px, transparent 8px, transparent 16px); }

/* Termine im Zeitraster */
.cal2-ev { position: absolute; border-radius: 6px; padding: 3px 7px; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.28); box-sizing: border-box; color: #fff; font-size: 0.8rem; line-height: 1.2; }
.cal2-ev .ev-time { font-weight: 700; font-size: 0.74rem; opacity: 0.95; }
.cal2-ev .ev-title { font-weight: 600; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal2-ev .ev-detail { font-size: 0.7rem; opacity: 0.92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal2-ev .ev-badges { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.cal2-ev .ev-badge { background: rgba(255,255,255,0.3); border-radius: 999px; font-size: 0.7rem; font-weight: 700; padding: 0 5px; min-width: 1.15rem; text-align: center; }
.cal2-ev .ev-badge-name { border-radius: 6px; min-width: 0; padding: 0 6px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal2-ev .ev-badge-mine { background: #ffd54f; color: #2b2300; font-weight: 800; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); }

/* Monatsansicht */
.cal2-month { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; border: 1px solid var(--rz-base-300, #e0e0e0); border-radius: 8px; overflow: hidden; }
.cal2-month-head { display: flex; flex: 0 0 auto; background: var(--rz-base-50, #fafafa); border-bottom: 1px solid var(--rz-base-300, #e0e0e0); }
.cal2-month-head > div { flex: 1 1 0; text-align: center; padding: 4px; font-weight: 600; font-size: 0.72rem; }
.cal2-month-grid { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.cal2-month-week { flex: 1 1 0; display: flex; min-height: 0; border-top: 1px solid var(--rz-base-200, #eee); }
.cal2-month-week:first-child { border-top: none; }
.cal2-month-cell { flex: 1 1 0; min-width: 0; border-left: 1px solid var(--rz-base-200, #eee); padding: 2px 3px; display: flex; flex-direction: column; gap: 1px; overflow: hidden; cursor: pointer; }
.cal2-month-cell:first-child { border-left: none; }
.cal2-month-cell.other { background: var(--rz-base-50, #fafafa); color: #aaa; }
.cal2-month-cell.today .cal2-month-daynum { background: var(--rz-primary, #1565c0); color: #fff; border-radius: 999px; }
.cal2-month-cell.holiday-public { background-image: repeating-linear-gradient(45deg, rgba(229,57,53,0.08) 0, rgba(229,57,53,0.08) 8px, transparent 8px, transparent 16px); }
.cal2-month-cell.holiday-school { background-image: repeating-linear-gradient(45deg, rgba(255,152,0,0.08) 0, rgba(255,152,0,0.08) 8px, transparent 8px, transparent 16px); }
.cal2-month-daynum { align-self: flex-start; font-size: 0.78rem; font-weight: 600; min-width: 1.3rem; height: 1.3rem; display: flex; align-items: center; justify-content: center; }
.cal2-month-chips { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.cal2-month-chip { font-size: 0.72rem; border-radius: 3px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; cursor: pointer; flex: 0 0 auto; }
.cal2-month-chip.cancelled { text-decoration: line-through; opacity: 0.8; }
.cal2-month-more { font-size: 0.68rem; color: #777; cursor: pointer; flex: 0 0 auto; }
.cal2-month-holiday-label { font-size: 0.66rem; font-weight: 600; color: #b71c1c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Platzbelegungs-Raster (Tage × Plätze, 15-Minuten-Zeilen) ── */
.cog { display: flex; flex-direction: column; min-height: 0; font-size: 0.8rem; }
.cog-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 2px 2px 8px; flex: 0 0 auto; }
.cog-title { font-weight: 700; font-size: 1rem; }
.cog-spacer { flex: 1 1 auto; }
.cog-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cog-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; }
.cog-legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cog-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; cursor: pointer; user-select: none; }
.cog-empty { padding: 14px; color: #777; font-size: 0.85rem; }
.cog-scroll { overflow: auto; border: 1px solid var(--rz-base-300, #e0e0e0); border-radius: 8px; max-height: 70vh;
              cursor: grab; touch-action: none; overscroll-behavior: contain; user-select: none; }
.cog-scroll.is-dragging { cursor: grabbing; }
.allocation-layout .cac { max-height: var(--allocation-pane-max-height, 70vh); }
.cog-inner { display: inline-block; min-width: 100%; }
.cog-head { display: flex; position: sticky; top: 0; z-index: 3; background: var(--rz-base-50, #fafafa); }
.cog-head2 { top: 27px; border-bottom: 1px solid var(--rz-base-300, #e0e0e0); }
.cog-corner { flex: 0 0 auto; position: sticky; left: 0; z-index: 4; background: var(--rz-base-50, #fafafa); }
.cog-dayhead { flex: 0 0 auto; text-align: center; padding: 5px 2px; font-weight: 700; font-size: 0.82rem; border-left: 2px solid var(--rz-base-400, #cbd5e1); box-sizing: border-box; }
.cog-courthead { flex: 0 0 auto; text-align: center; padding: 3px 1px; font-size: 0.68rem; color: #555; border-left: 1px solid var(--rz-base-300, #e0e0e0); box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cog-courthead.daystart { border-left: 2px solid var(--rz-base-400, #cbd5e1); }
.cog-body { display: flex; position: relative; }
.cog-axis { flex: 0 0 auto; position: sticky; left: 0; z-index: 2; background: var(--rz-base-50, #fafafa); }
.cog-hour { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rz-base-200, #e8e8e8); }
.cog-hour > span { position: absolute; top: -1px; right: 6px; font-size: 0.7rem; color: #888; }
.cog-col { flex: 0 0 auto; position: relative; box-sizing: border-box; border-left: 1px solid var(--rz-base-200, #e8e8e8);
           background-image: repeating-linear-gradient(to bottom, var(--rz-base-200, #e8e8e8) 0 1px, transparent 1px 112px); }
.cog-col.daystart { border-left: 2px solid var(--rz-base-400, #cbd5e1); }
.cog-blocked { position: absolute; left: 0; right: 0; background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.055) 0, rgba(0,0,0,0.055) 5px, transparent 5px, transparent 10px); }
.cog-slot { position: absolute; left: 2px; right: 2px; border-radius: 5px; padding: 3px 2px; box-sizing: border-box;
            overflow: hidden; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.cog-slot.conflict { outline: 2px solid #e53935; outline-offset: -2px; }
.cog-vtext { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; max-height: 100%; }
.cog-slot-time { position: absolute; left: 3px; bottom: 4px; max-height: calc(100% - 8px); font-size: 0.64rem; font-weight: 700; }
.cog-coach { position: absolute; left: 50%; top: 50%; max-height: calc(100% - 8px); font-weight: 700; font-size: 0.82rem;
             transform: translate(-50%, -50%) rotate(180deg); }
.cog-slot-players { position: absolute; top: 4px; right: 3px; bottom: 4px; display: flex; gap: 2px; overflow: hidden; }
.cog-player { font-size: 0.68rem; opacity: 0.9; }

/* ── Kommentar-Sidebar der Platzbelegung ── */
.cac { display: flex; flex-direction: column; border: 1px solid var(--rz-base-300, #e0e0e0); border-radius: 8px; width: 340px; flex: 0 0 340px; height: var(--allocation-comment-pane-height, var(--allocation-pane-max-height, 70vh)); min-height: 0; max-height: none; overflow: hidden; background: var(--rz-base-background-color, #fff); }
.cac.collapsed { width: 48px; flex: 0 0 48px; height: var(--allocation-comment-pane-height, var(--allocation-pane-max-height, 70vh)); }
.cac-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--rz-base-300, #e0e0e0); }
.cac-collapsed-trigger { position: relative; width: 100%; height: 100%; min-height: 0; padding: 10px 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.cac-collapsed-trigger:hover { background: var(--rz-base-100, #f5f5f5); }
.cac-collapsed-trigger:focus-visible { outline: 2px solid var(--rz-primary, #2563eb); outline-offset: -3px; }
.cac-collapsed-title { position: absolute; left: 50%; top: 50%; writing-mode: vertical-rl; transform: translate(-50%, -50%) rotate(180deg);
                       font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.cac-collapsed-count { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); min-width: 22px; height: 22px; padding: 0 5px;
                       display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 999px;
                       background: var(--rz-warning, #f59e0b); color: #fff; font-size: 0.7rem; line-height: 1; font-weight: 700; }
.cac-collapsed-trigger .rz-icon { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); }
.cac-head-title { font-weight: 700; font-size: 0.88rem; flex: 1 1 auto; }
.cac-count { font-size: 0.72rem; background: var(--rz-base-200, #eee); border-radius: 999px; padding: 1px 7px; }
.cac-opts { padding: 6px 8px; border-bottom: 1px solid var(--rz-base-200, #eee); font-size: 0.78rem; }
.cac-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.cac-round { display: flex; align-items: center; gap: 8px; color: #888; font-size: 0.72rem; font-weight: 700; }
.cac-round::before, .cac-round::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--rz-base-300, #e0e0e0); }
.cac-item { border: 1px solid var(--rz-base-300, #e0e0e0); border-radius: 8px; padding: 6px 8px; font-size: 0.8rem; }
.cac-thread { display: flex; flex-direction: column; gap: 6px; }
.cac-reply { margin-left: 18px; border-left-width: 3px; }
.cac-reply-composer { margin-left: 18px; padding: 7px; border: 1px dashed var(--rz-base-300, #d0d0d0); border-radius: 8px; background: var(--rz-base-50, #fafafa); }
.cac-item.own { background: rgba(21,101,192,0.06); border-color: rgba(21,101,192,0.3); }
.cac-item.state-resolved { opacity: 0.62; }
.cac-item.draft { border-style: dashed; }
.cac-meta { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: #666; margin-bottom: 3px; flex-wrap: wrap; }
.cac-author { font-weight: 700; color: #333; }
.cac-badge { border-radius: 999px; padding: 0 6px; font-size: 0.66rem; font-weight: 700; }
.cac-badge.open { background: #fff3e0; color: #e65100; }
.cac-badge.ack { background: #e3f2fd; color: #0d47a1; }
.cac-badge.done { background: #e8f5e9; color: #1b5e20; }
.cac-badge.draft { background: #eeeeee; color: #555; }
.cac-text { white-space: pre-wrap; word-break: break-word; }
.cac-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.cac-new { flex: 0 0 auto; border-top: 1px solid var(--rz-base-200, #eee); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cac textarea { width: 100%; resize: vertical; min-height: 58px; font: inherit; font-size: 0.8rem; padding: 5px 6px; border: 1px solid var(--rz-base-300, #d0d0d0); border-radius: 6px; box-sizing: border-box; }
.cac-empty { color: #888; font-size: 0.8rem; padding: 6px 2px; }


/* Hervorgehobene Info-Box (Trainer / Spieler / Platz) in Dialogen */
.cal2-infobox { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.75rem 0.9rem; border-radius: 8px; background: var(--rz-primary-lighter, #eef2ff); border-left: 4px solid var(--rz-primary, #1565c0); }
.cal2-infobox-row { display: flex; gap: 0.6rem; align-items: baseline; }
.cal2-infobox-label { flex: 0 0 4.5rem; font-size: 0.8rem; font-weight: 700; color: var(--rz-primary, #1565c0); text-transform: uppercase; letter-spacing: 0.02em; }
.cal2-infobox-value { flex: 1 1 auto; font-size: 1rem; font-weight: 600; color: var(--rz-text-color, #1b1b1b); }


/* ===== Meine Familie / Profile & Mitgliedschaften ===== */
.mf-section-label { font-weight:600; font-size:.85rem; color:#475569; margin-bottom:.35rem; }

.mf-profile-chip { display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .6rem; border:1px solid #cbd5e1; border-radius:999px; cursor:pointer; user-select:none; font-size:.9rem; background:#fff; }
.mf-profile-chip input { margin:0; }
.mf-profile-chip-on { border-color:#0f172a; background:#0f172a; color:#fff; }

.mf-browser-search { margin:.6rem 0 .5rem; }
.mf-browser-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:.7rem; max-height:440px; overflow-y:auto; padding:2px .25rem 2px 0; }
.mf-browser-empty { color:#64748b; font-size:.9rem; padding:.75rem 0; grid-column:1 / -1; }

.mf-org-card { display:flex; gap:.75rem; padding:.85rem .9rem; border:1px solid #e2e8f0; border-radius:.7rem; cursor:pointer; background:#fff; transition:border-color .12s, box-shadow .12s, transform .12s; }
.mf-org-card:hover { border-color:#94a3b8; box-shadow:0 4px 14px rgba(15,23,42,.08); transform:translateY(-1px); }
.mf-org-card-on { border-color:#0f172a; box-shadow:0 0 0 2px #0f172a inset; }
.mf-org-icon { font-size:2.1rem; color:#2563eb; }
.mf-org-body { flex:1; min-width:0; }
.mf-org-name { font-weight:600; font-size:1.02rem; }
.mf-org-meta { font-size:.8rem; color:#64748b; margin-top:.1rem; }
.mf-org-desc { font-size:.85rem; color:#475569; margin-top:.3rem; line-height:1.35; }
.mf-org-link { font-size:.8rem; display:inline-block; margin-top:.35rem; }

.mf-layout { display:flex; gap:1rem; height:100%; min-height:0; }
.mf-list { width:280px; flex-shrink:0; display:flex; flex-direction:column; gap:.4rem; overflow-y:auto; }
.mf-detail { flex:1; min-width:0; overflow-y:auto; }
.mf-profile-item { display:flex; align-items:center; gap:.55rem; padding:.55rem .7rem; border:1px solid #e2e8f0; border-radius:.55rem; cursor:pointer; background:#fff; }
.mf-profile-item:hover { border-color:#94a3b8; }
.mf-profile-item-on { border-color:#0f172a; background:#0f172a; color:#fff; }
.mf-profile-item .material-symbols-outlined { font-size:1.4rem; }
.mf-profile-item-name { font-weight:600; }
.mf-profile-item-sub { font-size:.78rem; opacity:.8; }

/* Profil-Karten-Fluss (Steckbrief-Cards nebeneinander, umbrechend) */
.mf-cards-flow { display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; align-content:flex-start; overflow-y:auto; height:100%; padding:.25rem; }
.mf-cards-flow > .profile-card { width:300px; flex:0 0 auto; align-self:flex-start; }
.mf-add-card { min-height:150px; }
.mf-add-inner { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.75rem; padding:2rem 1.25rem; height:100%; text-align:center; font-size:.9rem; }

.mf-mem-row { display:flex; align-items:center; gap:.6rem; padding:.55rem .7rem; border:1px solid #e2e8f0; border-radius:.5rem; margin-bottom:.4rem; }
.mf-mem-icon { font-size:1.3rem; color:#64748b; }
.mf-mem-body { flex:1; min-width:0; }
.mf-mem-name { font-weight:600; }
.mf-mem-sub { font-size:.8rem; color:#64748b; }
.mf-badge { font-size:.72rem; padding:.1rem .45rem; border-radius:999px; background:#e2e8f0; color:#334155; }
.mf-badge-cancel { background:#fee2e2; color:#b91c1c; }

/* ═══════════════════════════════════════════════════════
   CUSTOM ALERT OVERRIDES – dezentere, weniger grelle Alerts
   (RadzenAlert rendert standardmäßig kräftige Vollton-Hintergründe
   mit Schlagschatten; hier stattdessen sanfte Pastellfarben,
   analog zu den Button-Farbtönen weiter oben)
   ═══════════════════════════════════════════════════════ */

/* Kräftigen Schlagschatten entfernen, dünnen Rahmen zur Abgrenzung ergänzen */
.rz-alert.rz-variant-filled,
.rz-alert.rz-variant-flat {
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.rz-alert.rz-primary:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #eef1f6 !important;
    --rz-alert-color: #203254 !important;
    --rz-alert-title-color: #203254 !important;
    --rz-alert-icon-color: #203254 !important;
}

.rz-alert.rz-secondary:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #f1f5f9 !important;
    --rz-alert-color: #1e293b !important;
    --rz-alert-title-color: #1e293b !important;
    --rz-alert-icon-color: #1e293b !important;
}

.rz-alert.rz-info:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #dbeafe !important;
    --rz-alert-color: #1d4ed8 !important;
    --rz-alert-title-color: #1d4ed8 !important;
    --rz-alert-icon-color: #1d4ed8 !important;
}

.rz-alert.rz-success:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #dcfce7 !important;
    --rz-alert-color: #15803d !important;
    --rz-alert-title-color: #15803d !important;
    --rz-alert-icon-color: #15803d !important;
}

.rz-alert.rz-warning:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #fef3c7 !important;
    --rz-alert-color: #b45309 !important;
    --rz-alert-title-color: #b45309 !important;
    --rz-alert-icon-color: #b45309 !important;
}

.rz-alert.rz-danger:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #fee2e2 !important;
    --rz-alert-color: #b91c1c !important;
    --rz-alert-title-color: #b91c1c !important;
    --rz-alert-icon-color: #b91c1c !important;
}

.rz-alert.rz-light:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #f8fafc !important;
    --rz-alert-color: #475569 !important;
    --rz-alert-title-color: #475569 !important;
    --rz-alert-icon-color: #475569 !important;
}

.rz-alert.rz-dark:not(.rz-variant-outlined):not(.rz-variant-text) {
    --rz-alert-background-color: #e2e8f0 !important;
    --rz-alert-color: var(--rz-primary) !important;
    --rz-alert-title-color: var(--rz-primary) !important;
    --rz-alert-icon-color: var(--rz-primary) !important;
}
