/* GTK Mandantenportal – Layout & Component Styles */

:root {
    --gtk-100: #ccf2fb;
    --gtk-200: #99e5f7;
    --gtk-300: #66d8f3;
    --gtk-400: #00a8d7;
    --gtk-500: #008cbf;
    --gtk-600: #00719f;
    --gtk-700: #00587f;
    --gtk-800: #003f5f;
    --gtk-900: #00263f;

    /* Globale Font-Size Overrides (Tailwind v4 Variablen) */
    --text-xs: 0.8125rem;   /* 13px statt 12px */
    --text-sm: 0.9375rem;   /* 15px statt 14px */
    --text-base: 1.0625rem; /* 17px statt 16px */
}

/* ============================================
   HEADER
   ============================================ */
.gradient-header {
    background: linear-gradient(135deg, var(--gtk-500) 0%, var(--gtk-600) 50%, var(--gtk-700) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 8px rgba(0, 88, 127, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 50;
}

.gradient-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
}

/* ============================================
   USER MENU
   ============================================ */
.user-menu-trigger {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    border-right: 1px solid #e5e7eb;
    width: 16rem;
    transition: width 0.25s ease;
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 3.5rem;
}

/* Sidebar nav scrollable area */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

/* Stub toggle footer (sticky at sidebar bottom) */
.sidebar-stub-footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0.625rem;
    background: white;
    flex-shrink: 0;
}

.sidebar-stub-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    font-size: var(--text-xs);
    color: #9ca3af;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.sidebar-stub-toggle-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.sidebar-stub-toggle-btn i {
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.sidebar-stub-toggle-btn .link-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-stub-footer {
    padding: 0.5rem;
}

.sidebar.collapsed .sidebar-stub-toggle-btn {
    justify-content: center;
    padding: 0.375rem;
    gap: 0;
}

/* Hide stub items when stubs-hidden class is present */
#app-sidebar.stubs-hidden [data-stub="true"] {
    display: none;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gtk-500);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section-title {
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: #374151;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover {
    background-color: var(--gtk-100);
    color: var(--gtk-700);
}

.sidebar-link:hover i {
    color: var(--gtk-500);
}

.sidebar-link i {
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    margin-right: 0.5rem;
    color: #9ca3af;
    transition: color 0.2s ease;
    font-size: var(--text-sm);
    line-height: 1;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-link i {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .link-text {
    display: none;
}

.sidebar-link.active {
    background-color: var(--gtk-100);
    color: var(--gtk-700);
    font-weight: 500;
}

.sidebar-link.active i {
    color: var(--gtk-500);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: calc(var(--sidebar-width, 16rem) - 0.75rem);
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 51;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #6b7280;
    font-size: 0.625rem;
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--gtk-100);
    color: var(--gtk-500);
    border-color: var(--gtk-300);
}

.sidebar.collapsed .sidebar-toggle {
    left: calc(3.5rem - 0.75rem);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Collapsed sidebar nav spacing */
.sidebar.collapsed .sidebar-nav {
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-nav > div + div {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Tooltip on collapsed sidebar links */
.sidebar.collapsed .sidebar-link {
    position: relative;
}

.sidebar.collapsed .sidebar-link:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0.5rem;
    background: var(--gtk-800);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: var(--text-xs);
    white-space: nowrap;
    z-index: 50;
    pointer-events: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--gtk-400);
    color: white;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary:hover {
    background-color: var(--gtk-500);
    box-shadow: 0 2px 8px rgba(0, 140, 191, 0.3);
}

.btn-primary:active {
    background-color: var(--gtk-600);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--gtk-100);
    color: var(--gtk-700);
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-secondary:hover {
    background-color: var(--gtk-200);
}

/* Button mit Badge: position: relative auf dem Button setzen */
.btn-badge {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    background-color: var(--gtk-600);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 168, 215, 0.15);
}

.card:last-child {
    margin-bottom: 0;
}

/* Cards in Grid-Layouts: gleiche Höhe */
.grid > .card {
    height: 100%;
    margin-bottom: 0;
}

/* ============================================
   EREIGNIS 3-PUNKTE-MENÜ
   ============================================ */
.ereignis-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    font-size: 0.85rem;
    padding: 0;
}
.ereignis-menu-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.ereignis-dropdown {
    position: absolute;
    right: 0;
    top: 1.25rem;
    min-width: 11rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    z-index: 60;
    overflow: hidden;
}
.ereignis-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}
.ereignis-dropdown li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: var(--text-sm);
    color: #374151;
    text-decoration: none;
    transition: background-color 0.1s;
    white-space: nowrap;
}
.ereignis-dropdown li a:hover {
    background-color: #f9fafb;
}
.ereignis-dropdown li a i {
    width: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
}
.ereignis-dropdown li a.ereignis-delete-action {
    color: #dc2626;
}
.ereignis-dropdown li a.ereignis-delete-action i {
    color: #dc2626;
}
.ereignis-dropdown li a.ereignis-delete-action:hover {
    background-color: #fef2f2;
}

/* ============================================
   EREIGNIS INTERAKTIONEN (Kommentieren, Gefällt mir, Gelesen)
   ============================================ */
.ereignis-interaktion-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0 0 0;
    margin-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.8rem;
}
.ereignis-kommentieren-link,
.ereignis-like-link {
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
    font-weight: 500;
}
.ereignis-kommentieren-link:hover,
.ereignis-like-link:hover {
    color: var(--gtk-600, #4f46e5);
}
.ereignis-like-link.ereignis-liked {
    color: var(--gtk-600, #4f46e5);
    font-weight: 600;
}
.ereignis-like-count {
    color: #6b7280;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.ereignis-like-count i {
    color: var(--gtk-500, #6366f1);
    font-size: 0.7rem;
}
.ereignis-gelesen-link {
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: auto;
}
.ereignis-gelesen-link:hover {
    color: #374151;
}
.ereignis-gelesen i {
    font-size: 0.75rem;
}
.ereignis-gelesen-dropdown {
    position: absolute;
    right: 0;
    top: 1.5rem;
    min-width: 12rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    z-index: 70;
    padding: 0.5rem 0;
    max-height: 15rem;
    overflow-y: auto;
}
.ereignis-like-dropdown {
    position: absolute;
    right: 0;
    top: 1.5rem;
    min-width: 12rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    z-index: 70;
    padding: 0.5rem 0;
    max-height: 15rem;
    overflow-y: auto;
}
.ereignis-like-count-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.ereignis-gelesen-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: #374151;
}
.ereignis-gelesen-initialen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gtk-400), var(--gtk-600));
    color: white;
    font-weight: 700;
    font-size: 0.45rem;
    flex-shrink: 0;
}
.ereignis-gelesen-avatar {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}
.ereignis-gelesen-avatar img {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
}

/* Dokument-Links in Verlauf */
.ereignis-inhalt div:has(> i.fas[class*="fa-file"]) {
    cursor: pointer;
}
.ereignis-inhalt div:has(> i.fas[class*="fa-file"]):hover {
    color: var(--gtk-600, #4f46e5);
}

/* Kommentare */
.ereignis-kommentare-container {
    padding: 0;
}
.ereignis-kommentar {
    padding: 0.25rem 0 0.25rem 2.5rem;
}
.ereignis-kommentar-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.ereignis-kommentar-body {
    flex: 1;
    min-width: 0;
}
.ereignis-kommentar-bubble {
    background: #f3f4f6;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #374151;
    line-height: 1.4;
}
.ereignis-kommentar-bubble strong {
    font-size: 0.8rem;
}
.ereignis-kommentar-text {
    word-break: break-word;
}
.ereignis-kommentar-zeit {
    font-size: 0.7rem;
    color: #9ca3af;
    padding: 0.15rem 0.75rem 0;
}

/* Kommentar 3-Punkte-Menü */
.kommentar-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    font-size: 0.7rem;
    padding: 0;
    opacity: 0;
}
.ereignis-kommentar:hover .kommentar-menu-btn {
    opacity: 1;
}
.kommentar-menu-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}
.kommentar-dropdown {
    position: absolute;
    right: 0;
    top: 1.25rem;
    min-width: 10rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    z-index: 60;
    overflow: hidden;
}
.kommentar-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}
.kommentar-dropdown li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.1s;
    white-space: nowrap;
}
.kommentar-dropdown li a:hover {
    background-color: #f9fafb;
}
.kommentar-dropdown li a i {
    width: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.7rem;
}
.kommentar-dropdown li a.kommentar-delete-action {
    color: #dc2626;
}
.kommentar-dropdown li a.kommentar-delete-action i {
    color: #dc2626;
}
.kommentar-dropdown li a.kommentar-delete-action:hover {
    background-color: #fef2f2;
}
.kommentar-edit-area {
    margin-top: 0.25rem;
}

/* Kommentar Aktionen (Gefällt mir, Antworten) */
.kommentar-aktionen {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.15rem 0.75rem 0;
    font-size: 0.7rem;
    color: #9ca3af;
}
.kommentar-like-link,
.kommentar-antworten-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}
.kommentar-like-link:hover,
.kommentar-antworten-link:hover {
    color: var(--gtk-600);
}
.kommentar-liked {
    color: var(--gtk-600) !important;
}
.kommentar-like-count {
    font-weight: 700;
    color: var(--gtk-600);
    margin-left: 0.15rem;
}
.kommentar-like-count-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.kommentar-like-dropdown {
    position: absolute;
    left: 0;
    top: 1.25rem;
    min-width: 12rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    z-index: 70;
    padding: 0.5rem 0;
    max-height: 15rem;
    overflow-y: auto;
}

/* Kommentar Antworten (eingerückt) */
.kommentar-antworten {
    margin-left: 2.25rem;
}
.kommentar-antwort-input {
    margin-left: 2.25rem;
    padding: 0.25rem 0;
}

/* Kommentar Eingabe */
.ereignis-kommentar-input {
    padding: 0.5rem 0 0 2.5rem;
}
.ereignis-kommentar-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    min-height: 2.5rem;
    transition: border-color 0.15s;
}
.ereignis-kommentar-textarea:focus {
    outline: none;
    border-color: var(--gtk-500, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* ============================================
   MODAL / POPUP
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 50;
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 51;
    width: 100%;
    max-width: 32rem;
    padding: 0 1rem;
}

.modal-container-lg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 51;
    width: 100%;
    max-width: 40rem;
    padding: 0 1rem;
}

.modal-container-xl {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 51;
    width: 100%;
    max-width: 52rem;
    padding: 0 1rem;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* ============================================
   INFO BANNER (Auswahl-/Statusanzeigen)
   ============================================ */
.info-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid;
}

.info-banner-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.info-banner-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.info-banner .info-banner-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.info-banner .info-banner-icon {
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.info-banner-success .info-banner-icon {
    color: #16a34a;
}

.info-banner-info .info-banner-icon {
    color: #2563eb;
}

.info-banner .info-banner-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #1f2937;
}

.info-banner .info-banner-detail {
    font-size: var(--text-xs);
    color: #6b7280;
}

.info-banner .info-banner-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: var(--text-sm);
    line-height: 1;
    flex-shrink: 0;
}

.info-banner .info-banner-close:hover {
    color: #6b7280;
}

.info-banner .info-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.info-banner .info-banner-edit {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: var(--text-sm);
    line-height: 1;
}

.info-banner .info-banner-edit:hover {
    color: var(--gtk-600);
}

/* ============================================
   @-MENTION System
   ============================================ */

/* Mention-Span (in gerendertem Content) */
.mention {
    background: #e0e7ff;
    color: #4338ca;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

/* Mention-Dropdown */
#mention-dropdown {
    position: fixed;
    z-index: 10000;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 220px;
    overflow-y: auto;
    min-width: 240px;
    padding: 0.25rem 0;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: background-color 0.1s;
}

.mention-item-active,
.mention-item:hover {
    background: #f3f4f6;
}

.mention-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gtk-400), var(--gtk-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mention-info {
    flex: 1;
    min-width: 0;
}

.mention-name {
    color: #111827;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-rolle {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Dashboard: Mention Activity Items */
.mention-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    border-left: 3px solid var(--gtk-400);
    transition: background-color 0.15s, border-left-color 0.15s;
    cursor: pointer;
    position: relative;
}

.mention-activity-item:last-child {
    border-bottom: none;
}

.mention-activity-item:hover {
    background: #f0f9ff;
    border-left-color: var(--gtk-500);
}

.mention-activity-avatar {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.mention-activity-content {
    flex: 1;
    min-width: 0;
}

.mention-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.mention-activity-text {
    font-size: var(--text-sm);
    color: #374151;
    margin: 0;
    line-height: 1.4;
}

.mention-activity-text strong {
    font-weight: 600;
    color: #111827;
}

.mention-activity-time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

.mention-activity-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

.mention-activity-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
}

.mention-activity-tag--nachricht {
    background: #ede9fe;
    color: #6d28d9;
}

.mention-activity-tag--kommentar {
    background: #e0e7ff;
    color: #4338ca;
}

.mention-activity-tag--dokument {
    background: #fef3c7;
    color: #92400e;
}

.mention-activity-tag--aufgabe {
    background: #dbeafe;
    color: #1e40af;
}

.mention-activity-tag--default {
    background: #f3f4f6;
    color: #374151;
}

.mention-activity-preview {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.375rem 0 0 0.75rem;
    padding: 0.375rem 0.625rem;
    border-left: 2px solid #d1d5db;
    background: #f9fafb;
    border-radius: 0 0.25rem 0.25rem 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 50%;
    width: 50%;
}

.mention-activity-indicator {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--gtk-400);
    margin-top: 0.375rem;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.form-toggle {
    position: relative;
    display: inline-block;
    width: 2.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.form-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.form-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.form-toggle-slider::before {
    content: '';
    position: absolute;
    height: 0.9rem;
    width: 0.9rem;
    left: 0.175rem;
    bottom: 0.175rem;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.form-toggle input:checked + .form-toggle-slider {
    background-color: var(--gtk-400);
}

.form-toggle input:checked + .form-toggle-slider::before {
    transform: translateX(1rem);
}

.form-toggle input:focus + .form-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 168, 215, 0.1);
}

/* ============================================
   ALERTS (Erfolg, Fehler, Warnung, Info)
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid;
    font-size: var(--text-sm);
    margin-bottom: 1rem;
}

.alert i {
    flex-shrink: 0;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* ============================================
   FORM ELEMENTS (Checkboxen, Labels)
   ============================================ */
.form-check {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    accent-color: var(--gtk-600);
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.form-check span {
    font-size: var(--text-sm);
    color: #374151;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #374151;
}

.form-label .required {
    color: #ef4444;
    margin-left: 0.125rem;
}

select,
.form-input,
.form-select,
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--text-sm);
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #1f2937;
    background-color: white;
    transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gtk-400);
    box-shadow: 0 0 0 3px rgba(0, 168, 215, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Optgroup-Styling */
.form-select optgroup {
    font-weight: 600;
    color: #374151;
}

.form-select option {
    font-weight: 400;
    padding: 0.25rem 0.5rem;
}

/* ============================================
   WIZARD / STEP INDICATOR
   ============================================ */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-step-circle {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 600;
    border: 2px solid #d1d5db;
    color: #9ca3af;
    background-color: white;
    transition: all 0.2s ease;
}

.wizard-step.active .wizard-step-circle {
    border-color: var(--gtk-600);
    background-color: var(--gtk-600);
    color: white;
}

.wizard-step.completed .wizard-step-circle {
    border-color: var(--gtk-500);
    background-color: var(--gtk-500);
    color: white;
}

.wizard-step-label {
    font-size: var(--text-xs);
    color: #9ca3af;
    font-weight: 500;
    display: none;
}

.wizard-step.active .wizard-step-label {
    color: var(--gtk-700);
    display: inline;
}

.wizard-step-connector {
    width: 2rem;
    height: 2px;
    background-color: #d1d5db;
}

.wizard-step.completed + .wizard-step-connector,
.wizard-step.completed ~ .wizard-step-connector {
    background-color: var(--gtk-500);
}

/* ============================================
   DROPDOWN MENU
   ============================================ */
.dropdown-item:hover {
    background-color: #f9fafb;
}

/* ============================================
   DROPDOWN ANIMATION
   ============================================ */
@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-slide-down {
    animation: fadeSlideDown 0.2s ease-out;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-bar {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

/* ============================================
   FOCUS STYLES (Accessibility)
   ============================================ */
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--gtk-400);
    outline-offset: 2px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-icon {
    background: linear-gradient(135deg, var(--gtk-400) 0%, var(--gtk-600) 100%);
}

.login-btn {
    background: #185b8f;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    background: #154f7d;
    box-shadow: 0 2px 8px rgba(24, 91, 143, 0.25);
}

.login-card {
    border-radius: 0.75rem;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.08);
}

.login-input:focus {
    border-color: var(--gtk-400);
    box-shadow: 0 0 0 3px rgba(0, 168, 215, 0.15);
}

.login-tabs {
    display: flex;
    gap: 0.125rem;
    padding: 0.1875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.4375rem;
    background: #ffffff;
    margin-bottom: 1.25rem;
}

.login-tab-btn {
    flex: 1;
    border: none;
    border-radius: 0.3125rem;
    background: transparent;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.42rem 0.625rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.login-tab-btn:hover {
    background: #f9fafb;
    color: #4b5563;
}

.login-tab-btn.active {
    background: #f5f6f7;
    color: #1f2937;
}

.login-auth-note {
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 1rem;
}

.login-auth-note-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    color: #374151;
    font-size: var(--text-sm);
    line-height: 1.5;
}

.login-auth-note-item:last-child {
    margin-bottom: 0;
}

.login-auth-note-item i {
    color: #9ca3af;
    margin-top: 0.2rem;
}

.login-auth-note-item strong {
    color: #1f2937;
    font-weight: 600;
}

/* ============================================
   LIGHTBOX (Fullscreen Detail-Overlay)
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.lightbox-container {
    position: fixed;
    inset: 1.5rem;
    z-index: 101;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    flex-shrink: 0;
}

.lightbox-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    border-radius: 0.375rem;
    transition: all 0.15s;
}

.lightbox-close:hover {
    color: #1f2937;
    background-color: #e5e7eb;
}

.lightbox-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.lightbox-nav {
    width: 15rem;
    border-right: 1px solid #e5e7eb;
    background-color: #f9fafb;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Scrollable inner area of the lightbox nav */
.lb-nav-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

/* Stub toggle footer (sticky at lightbox nav bottom) */
.lb-nav-stub-footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0.625rem;
    background: white;
    flex-shrink: 0;
}

.lb-nav-stub-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    font-size: var(--text-xs);
    color: #9ca3af;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.lb-nav-stub-toggle-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.lb-nav-stub-toggle-btn i {
    width: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.lightbox-nav a,
.lightbox-nav button.lb-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1.25rem;
    font-size: var(--text-sm);
    color: #4b5563;
    text-decoration: none;
    transition: all 0.15s;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.lightbox-nav a:hover,
.lightbox-nav button.lb-nav-btn:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.lightbox-nav a.lb-nav-active {
    background-color: var(--gtk-100);
    color: var(--gtk-700);
    font-weight: 600;
    border-right: 3px solid var(--gtk-500);
}

.lightbox-nav a i,
.lightbox-nav button.lb-nav-btn i {
    width: 1.125rem;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================
   Dokumentenverwaltung (Ordner-Tab)
   ============================================ */

.dokverwa-filter-bar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.dokverwa-filter-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.dokverwa-action-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.dokverwa-filter-search {
    position: relative;
    flex: 2;
    min-width: 20rem;
}

.dokverwa-filter-selects {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* Download Historie */
.dokverwa-dlhistorie-files {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    margin-left: 0.25rem;
}

.dokverwa-dlhistorie-files-header {
    color: #6b7280;
    margin-bottom: 0.375rem;
    padding: 0 0.25rem;
}

.dokverwa-dlhistorie-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.1s;
}

.dokverwa-dlhistorie-file:hover {
    background: #f3f4f6;
}

.dokverwa-type-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.dokverwa-type-tab {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.dokverwa-type-tab:hover {
    color: var(--gtk-600);
}

.dokverwa-type-tab.active {
    color: var(--gtk-700);
    font-weight: 600;
    border-bottom-color: var(--gtk-600);
}

.dokverwa-type-tab span {
    color: #9ca3af;
    font-weight: 400;
    margin-left: 0.25rem;
}

.dokverwa-type-tab.active span {
    color: var(--gtk-500);
}

.dokverwa-selection-bar {
    background: var(--gtk-50);
    border: 1px solid var(--gtk-200);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dokverwa-sel-btn {
    background: none;
    border: none;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    color: #374151;
    font-size: 0.875rem;
    transition: background-color 0.15s;
}

.dokverwa-sel-btn:hover {
    background: var(--gtk-100);
    color: var(--gtk-700);
}

.dokverwa-sel-btn-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dokverwa-sel-divider {
    width: 1px;
    height: 1.25rem;
    background: #d1d5db;
    margin: 0 0.25rem;
}

.dokverwa-main {
    display: flex;
    gap: 0;
    min-height: 28rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.dokverwa-sidebar {
    width: 16rem;
    min-width: 16rem;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    background: #fafafa;
    font-size: var(--text-sm);
}

.dokverwa-sidebar-header {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.dokverwa-folder-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: var(--text-sm);
}

.dokverwa-folder-link:hover {
    background: #f3f4f6;
}

.dokverwa-folder-link.dokverwa-folder-active {
    background: var(--gtk-50);
    color: var(--gtk-700);
    font-weight: 600;
}

.dokverwa-folder-count {
    margin-left: auto;
    color: #9ca3af;
    font-size: var(--text-xs);
    font-weight: 400;
}

.dokverwa-folder-group {
    border-bottom: 1px solid #f3f4f6;
}

.dokverwa-folder-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--text-sm);
    color: #111827;
    user-select: none;
    transition: background-color 0.15s;
}

.dokverwa-folder-group-header:hover {
    background: #f3f4f6;
}

.dokverwa-folder-group-header i.fa-chevron-right {
    font-size: 0.625rem;
    transition: transform 0.2s;
    width: 0.75rem;
    text-align: center;
    color: #9ca3af;
}

.dokverwa-folder-group.expanded > .dokverwa-folder-group-header i.fa-chevron-right {
    transform: rotate(90deg);
}

.dokverwa-folder-subgroups {
    display: none;
}

.dokverwa-folder-group.expanded > .dokverwa-folder-subgroups {
    display: block;
}

.dokverwa-subgroup-label {
    padding: 0.25rem 0.75rem 0.125rem 1.75rem;
    font-size: var(--text-xs);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 600;
}

.dokverwa-subfolder-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem 0.25rem 2.5rem;
    color: #4b5563;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: var(--text-sm);
}

.dokverwa-subfolder-link:hover {
    background: #f3f4f6;
}

.dokverwa-subfolder-link.dokverwa-folder-active {
    background: var(--gtk-50);
    color: var(--gtk-700);
    font-weight: 600;
}

.dokverwa-subfolder-link .fa-folder {
    color: #d1d5db;
    font-size: 0.75rem;
}

.dokverwa-table-area {
    flex: 1;
    overflow: auto;
}

.dokverwa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.dokverwa-table thead th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    padding: 0.5rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    z-index: 1;
}

.dokverwa-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.1s;
}

.dokverwa-table tbody tr:hover {
    background: #f9fafb;
}

.dokverwa-table tbody tr.dokverwa-row-new {
    font-weight: 600;
}

.dokverwa-table td {
    padding: 0.5rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #374151;
}

.dokverwa-table td:first-child,
.dokverwa-table th:first-child {
    text-align: center;
    padding: 0.5rem 0.25rem 0.5rem 0.5rem;
}

.dokverwa-table td:nth-child(2) {
    text-align: center;
    padding: 0.5rem 0;
    color: #6b7280;
}

.dokverwa-table .dokverwa-cell-name {
    max-width: 20rem;
}

.dokverwa-th-size,
.dokverwa-th-date,
.dokverwa-th-folder,
.dokverwa-th-month,
.dokverwa-th-year {
    width: 6rem;
}

@media (max-width: 1200px) {
    .dokverwa-th-folder,
    .dokverwa-table td.dokverwa-cell-folder {
        display: none;
    }
}

@media (max-width: 1050px) {
    .dokverwa-th-size,
    .dokverwa-table td.dokverwa-cell-size,
    .dokverwa-th-date,
    .dokverwa-table td.dokverwa-cell-date {
        display: none;
    }
}

@media (max-width: 900px) {
    .dokverwa-sidebar {
        display: none;
    }
}

.dokverwa-file-icon {
    font-size: 0.875rem;
}

.dokverwa-ctx-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.375rem;
    border-radius: 0.25rem;
    cursor: pointer;
    color: #9ca3af;
    font-size: 0.875rem;
}

.dokverwa-ctx-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.dokverwa-ctx-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 12rem;
    z-index: 9999;
    padding: 0.25rem 0;
    display: none;
}

.dokverwa-ctx-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #374151;
    text-decoration: none;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: background-color 0.1s;
}

.dokverwa-ctx-menu a:hover {
    background: #f3f4f6;
}

.dokverwa-ctx-menu a.dokverwa-ctx-danger {
    color: #dc2626;
}

.dokverwa-ctx-menu a.dokverwa-ctx-danger:hover {
    background: #fef2f2;
}

.dokverwa-ctx-sep {
    border-top: 1px solid #f3f4f6;
    margin: 0.25rem 0;
}

.dokverwa-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.lightbox-nav-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 1.25rem;
}

.lightbox-nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.25rem 0.375rem;
}

.lightbox-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: white;
}

/* Einstellungen Sub-Tabs */
.einst-tab {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.einst-tab:hover {
    color: var(--gtk-600);
}

.einst-tab-active {
    color: var(--gtk-700);
    border-bottom-color: var(--gtk-600);
    font-weight: 600;
}

.einst-module-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.einst-module-item i {
    color: #6b7280;
    width: 1rem;
    text-align: center;
}

.einst-module-item span:last-child {
    margin-left: auto;
}

.einst-module-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
}

/* Schnittstellen Accordion */
.einst-schnitt-accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.einst-schnitt-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    background: #f9fafb;
    transition: background 0.15s;
}

.einst-schnitt-accordion-header:hover {
    background: #f3f4f6;
}

/* Mailupload-Rows */
.schnitt-mail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0 0.5rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: var(--text-sm);
    color: #374151;
}

@media (max-width: 768px) {
    .lightbox-container {
        inset: 0;
        border-radius: 0;
    }

    .lightbox-nav {
        display: none;
    }
}

/* ============================================
   MOBILE SIDEBAR OVERLAY
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 4rem;
    background: rgba(0, 0, 0, 0.3);
    z-index: 39;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   RESPONSIVE – Mobile (< 768px)
   ============================================ */
@media (max-width: 767px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 4rem;
        bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: 16rem !important;
        overflow-y: auto;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Hide desktop collapse toggle on mobile */
    .sidebar-toggle {
        display: none !important;
    }

    /* Never show collapsed state on mobile */
    .sidebar.collapsed {
        width: 16rem !important;
    }

    .sidebar.collapsed .sidebar-section-title {
        visibility: visible;
        height: auto;
        margin: initial;
        padding: initial;
    }

    .sidebar.collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 0.5rem 0.75rem;
        width: auto;
        height: auto;
        margin: 0;
    }

    .sidebar.collapsed .sidebar-link i {
        margin-right: 0.5rem;
    }

    .sidebar.collapsed .sidebar-link span,
    .sidebar.collapsed .link-text {
        display: inline;
    }

    .sidebar.collapsed .sidebar-nav {
        padding: 1rem;
    }

    .sidebar.collapsed .sidebar-nav > div + div {
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }

    /* Main content full width on mobile */
    main {
        padding: 1rem !important;
    }

    /* Compact user dropdown: icon only */
    .user-name-text {
        display: none;
    }

    .user-menu-trigger .fa-chevron-down {
        display: none;
    }

    .user-menu-trigger {
        padding: 0.25rem 0.5rem;
    }
}

/* ============================================
   GLOBAL LOADING BAR (YouTube/GitHub Style)
   ============================================ */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gtk-300), var(--gtk-400), var(--gtk-500));
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 168, 215, 0.4);
    display: none; /* Vorerst deaktiviert – Loading-Skeleton deckt bereits das Lade-Feedback ab, Loading-Bar wäre redundant */
}

.loading-bar.active {
    opacity: 1;
    animation: loading-progress 1.8s ease-in-out infinite;
}

.loading-bar.finishing {
    width: 100% !important;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.4s ease 0.3s;
}

@keyframes loading-progress {
    0% { width: 0; }
    20% { width: 30%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 95%; }
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton-loader {
    padding: 0;
    animation: skeleton-fade-in 0.2s ease;
}

.skeleton-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
}

.skeleton-line {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes skeleton-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   TOOLTIPS (globale Komponente)
   ============================================ */
.gtk-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: #9ca3af;
    margin-left: 0.375rem;
}

.gtk-tooltip .gtk-tooltip-icon {
    font-size: 0.8125rem;
    transition: color 0.15s;
}

.gtk-tooltip:hover .gtk-tooltip-icon {
    color: #6b7280;
}

.gtk-tooltip .gtk-tooltip-content {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-0.75rem);
    background: var(--gtk-800);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    white-space: normal;
    width: max-content;
    max-width: 20rem;
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gtk-tooltip .gtk-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0.75rem;
    border: 5px solid transparent;
    border-top-color: var(--gtk-800);
}

.gtk-tooltip:hover .gtk-tooltip-content {
    display: block;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
#gtk-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.gtk-toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    transform: translateX(calc(100% + 1rem));
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 28rem;
    min-width: 16rem;
}

.gtk-toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.gtk-toast-dismissed {
    transform: translateX(calc(100% + 1rem));
    opacity: 0;
}

.gtk-toast-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.gtk-toast-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.gtk-toast-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.gtk-toast-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.gtk-toast .fas {
    flex-shrink: 0;
    font-size: 1rem;
}

.gtk-toast-message {
    flex: 1;
    line-height: 1.4;
}

.gtk-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
    padding: 0 0.25rem;
    color: inherit;
}

.gtk-toast-close:hover {
    opacity: 1;
}
