/* --- Self-hosted Inter font family ---
 * Loaded locally so we don't depend on fonts.googleapis.com, which under certain
 * User-Agents returned relative woff2 URLs that resolved against this origin and
 * produced repeated 404s for /assets/fonts/Inter-*.woff2.
 */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/assets/fonts/Inter-ExtraBold.woff2') format('woff2');
}

:root {
    --bg-base: #0e0e12;
    --bg-surface: #141419;
    --bg-surface-glass: rgba(20, 20, 25, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a3a6aa;
    --accent-cyan: #00e5ff;
    --accent-purple: #9d00ff;
    --accent-red: #eb455f;
    --accent-blue: #5865F2;
    --font-primary: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-base);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ── Utilities ── */
.text-cyan {
    color: var(--accent-cyan);
}

.text-purple {
    color: var(--accent-purple);
}

.text-red {
    color: var(--accent-red);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* ── Background & Animations ── */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ambient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
    z-index: 2;
}

.sphere-cyan {
    top: -10%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}

.sphere-purple {
    top: 30%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 80px) scale(1.1);
    }
}

/* ── Layout ── */
.dashboard-layout {
    display: flex;
    width: 100%;
    position: relative;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 40px;
    padding-left: 10px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin: 14px 0 6px;
    padding-left: 10px;
    letter-spacing: 1.2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    box-shadow: inset 3px 0 0 transparent;
}

.nav-item i {
    width: 1.1em;
    text-align: center;
    opacity: 0.85;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item:hover i {
    opacity: 1;
}

/* Aktiver Navigationspunkt — muss klar von inaktiven Einträgen unterscheidbar sein */
.nav-item.active {
    background: rgba(157, 0, 255, 0.16);
    color: #c77dff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent-purple);
}

.nav-item.active i {
    color: var(--accent-purple);
    opacity: 1;
}

/* Externe Links bleiben dezent (kein Kategorie-Wechsel) */
.nav-item.nav-item-external {
    color: rgba(180, 180, 180, 0.95);
}

.nav-item.nav-item-external:hover {
    color: #fff;
}

/* Hover auf aktivem Item: Active-Look beibehalten, nur leicht aufhellen */
.nav-item.active:hover {
    background: rgba(157, 0, 255, 0.22);
    color: #d4a0ff;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

/* ── Top Header ── */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Server Select ── */
.server-select-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.input-dark {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-dark:focus {
    border-color: var(--accent-purple);
}

/* ── Glass Card ── */
.glass-card {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ── Stat Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 14px;
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 8px 25px rgba(157, 0, 255, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cyan-glow {
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
}

.purple-glow {
    background: rgba(157, 0, 255, 0.12);
    color: var(--accent-purple);
}

.red-glow {
    background: rgba(235, 69, 95, 0.12);
    color: var(--accent-red);
}

.stat-data h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    margin-top: 4px;
}

/* ── Filters Bar ── */
.filters-bar {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 20px 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.search-group {
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input-wrapper input {
    width: 100%;
    padding-left: 38px;
}

/* ── Buttons ── */
.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #4752C4;
    transform: translateY(-1px);
}

.btn-purple {
    background: var(--accent-purple);
}

.btn-purple:hover {
    background: #7a00cc;
}

.btn-danger {
    background: rgba(235, 69, 95, 0.15);
    color: #ff4757;
    border: 1px solid rgba(235, 69, 95, 0.3);
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    white-space: nowrap;
}

.btn-danger:hover {
    background: rgba(235, 69, 95, 0.3);
    border-color: rgba(235, 69, 95, 0.5);
    color: #ff6b81;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Table ── */
.table-header {
    margin-bottom: 20px;
}

.table-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.logs-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.logs-table tr:last-child td {
    border-bottom: none;
}

.logs-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.logs-table tr[style*="cursor: pointer"]:hover td {
    background: rgba(0, 229, 255, 0.04);
}

.transcript-table-btn {
    padding: 4px 10px;
    font-size: 0.78rem;
    flex-shrink: 0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.transcript-table-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.45);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-perm {
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
}

.badge-temp {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-cyan);
}

.badge-action {
    background: rgba(88, 101, 242, 0.1);
    color: #8b95f5;
}

/* DashboardV2 specific Badges */
.badge.Tickets {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-cyan);
}

.badge.Häuser_system {
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
}

.badge.Fraktionen {
    background: rgba(157, 0, 255, 0.1);
    color: #9d00ff;
}

.badge.Team {
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
}

.badge.Abmeldungen {
    background: rgba(255, 159, 67, 0.15);
    color: #ff9f43;
}

.badge.Abmeldungen-planned {
    background: rgba(88, 101, 242, 0.12);
    color: #8b95f5;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: #2b2d31;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f4147;
}

/* ── Spinner ── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MOBILE HAMBURGER BUTTON ===== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(17, 17, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--accent-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-cyan);
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 49;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

@media (max-width: 750px) {
    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: var(--bg-surface);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        padding: 70px 16px 30px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-header {
        flex-direction: column;
        gap: 15px;
    }

    .filters-bar {
        padding: 16px;
        gap: 15px;
    }

    .filter-group {
        width: 100%;
    }

    .search-group {
        width: 100%;
    }
}

/* --- SCROLL ANIMATIONS REMOVED --- */

/* --- TEXT GRADIENTS --- */
.gradient-text {
    background: linear-gradient(90deg, #5865F2, #00e5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ----- COMPREHENSIVE MOBILE OPTIMIZATIONS ----- */
@media (max-width: 768px) {

    /* Touch Targets */
    .btn-modern,
    .submit-btn,
    .modal-close-btn,
    .custom-select-trigger,
    .input-modern {
        min-height: 44px !important;
    }

    .sidebar-nav-item,
    .sidebar-footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Layout Overrides */
    .input-grid,
    .card-grid,
    .cat-input-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* Modals */
    .modal-content,
    .edit-song-modal-card,
    .confirm-modal,
    .user-detail-modal {
        width: 95% !important;
        max-width: none !important;
        margin: 10px auto !important;
        padding: 15px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* Padding Reductions */
    .dashboard-main-content {
        padding: 60px 10px 80px 10px !important;
    }

    .settings-card {
        padding: 15px 10px !important;
    }

    /* Table responsive override */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ════════════════════════════════════════════════════════════
   VIEW-SWITCH (Raster / Tabelle)
   ════════════════════════════════════════════════════════════ */
.view-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.view-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.view-btn.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    color: #fff;
}

/* ════════════════════════════════════════════════════════════
   RASTER-ANSICHT — Profil-Karten für Ticket-Logs
   ════════════════════════════════════════════════════════════ */
.logs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.logs-grid-empty {
    grid-column: 1 / -1;
}

.log-user-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 22px 16px;
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
    animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-user-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 229, 255, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.log-user-card.clickable {
    cursor: pointer;
}

.log-user-card.clickable:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.log-user-card.clickable:hover::before {
    opacity: 1;
}

.log-user-card.no-transcript {
    opacity: 0.7;
    cursor: help;
}

.log-user-card.no-transcript:hover {
    border-color: rgba(240, 192, 64, 0.4);
}

.log-user-card.not-clickable {
    opacity: 0.55;
    cursor: default;
}

.log-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.22s ease;
}

.log-user-card.clickable:hover .log-card-avatar {
    border-color: rgba(0, 229, 255, 0.5);
}

.log-card-name {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--text-main);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-card-username {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
}

.log-card-action-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    margin-top: 4px;
    background: rgba(235, 69, 95, 0.14);
    color: var(--accent-red);
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
}

.log-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.log-card-transcript-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 4px 10px;
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 600;
}

.log-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.log-user-card.clickable:hover .log-card-cta {
    opacity: 1;
}

.transcript-hint {
    color: var(--accent-cyan);
    margin-left: 5px;
}

/* ════════════════════════════════════════════════════════════
   ABMELDUNGEN — Raster-Karten (Discord-Panel-Spiegel)
   ════════════════════════════════════════════════════════════ */
.absence-card {
    opacity: 1;
    cursor: default;
    align-items: stretch;
    text-align: left;
    gap: 8px;
    padding: 20px 18px 18px;
}

.absence-card::before {
    background: radial-gradient(circle at top, rgba(255, 159, 67, 0.1), transparent 60%);
    opacity: 1;
}

.absence-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 159, 67, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.absence-card.absence-planned::before {
    background: radial-gradient(circle at top, rgba(88, 101, 242, 0.1), transparent 60%);
}

.absence-card.absence-planned:hover {
    border-color: rgba(88, 101, 242, 0.4);
}

.absence-card .log-card-avatar {
    align-self: center;
    width: 72px;
    height: 72px;
    border-color: rgba(255, 159, 67, 0.35);
}

.absence-card.absence-planned .log-card-avatar {
    border-color: rgba(88, 101, 242, 0.35);
}

.absence-card .log-card-name,
.absence-card .log-card-username {
    text-align: center;
    align-self: center;
}

.absence-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 2px;
}

.absence-status-badge.active {
    background: rgba(255, 159, 67, 0.16);
    color: #ff9f43;
}

.absence-status-badge.planned {
    background: rgba(88, 101, 242, 0.14);
    color: #8b95f5;
}

.absence-status-badge.ended {
    background: rgba(148, 163, 184, 0.16);
    color: #94a3b8;
}

.absence-delete-btn {
    margin-top: 12px;
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.35);
    color: #ff5252;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.08);
    width: 100%;
}

.absence-delete-btn:hover {
    background: rgba(255, 59, 48, 0.28);
    border-color: rgba(255, 59, 48, 0.7);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255, 59, 48, 0.25);
}

.absence-delete-btn:active {
    transform: translateY(0);
}

.absence-delete-btn.table-action-btn {
    margin-top: 0;
    padding: 6px 12px;
    font-size: 0.78rem;
    width: auto;
    white-space: nowrap;
}

.absence-summary {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.absence-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.absence-summary-pill b {
    color: var(--text-main);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.absence-summary-pill.active {
    border-color: rgba(255, 159, 67, 0.28);
    background: rgba(255, 159, 67, 0.08);
}

.absence-summary-pill.active i {
    color: #ff9f43;
}

.absence-summary-pill.planned {
    border-color: rgba(88, 101, 242, 0.28);
    background: rgba(88, 101, 242, 0.08);
}

.absence-summary-pill.planned i {
    color: #8b95f5;
}

.absence-summary-pill.ended {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.08);
}

.absence-summary-pill.ended i {
    color: #94a3b8;
}

.absence-group-empty {
    grid-column: 1 / -1;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.absence-group-empty i {
    margin-right: 6px;
    opacity: 0.65;
}

.absence-until {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.absence-until-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.absence-until i,
.absence-until-row i {
    margin-right: 0;
    color: #ff9f43;
    flex-shrink: 0;
}

.absence-until strong {
    color: var(--text-main);
    font-weight: 600;
}

.absence-rel {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

/* Live-Countdown (aktiv: bis Ende / geplant: bis Start) */
.absence-countdown {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.22);
    color: var(--accent-cyan);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.absence-countdown i {
    color: var(--accent-cyan);
    font-size: 0.72rem;
    opacity: 0.9;
}

.absence-countdown-digits {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.84rem;
    font-weight: 700;
    min-width: 4.5ch;
}

.absence-countdown-label {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: lowercase;
}

.absence-countdown.is-urgent {
    background: rgba(255, 159, 67, 0.12);
    border-color: rgba(255, 159, 67, 0.4);
    color: #ff9f43;
}

.absence-countdown.is-urgent i {
    color: #ff9f43;
}

.absence-countdown.is-zero {
    background: rgba(235, 69, 95, 0.1);
    border-color: rgba(235, 69, 95, 0.3);
    color: #eb455f;
}

.absence-countdown.is-zero i {
    color: #eb455f;
}

.absence-countdown-inline {
    display: inline-flex;
    margin-top: 6px;
}

.absence-card.absence-planned .absence-countdown {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.28);
    color: #8b95f5;
}

.absence-card.absence-planned .absence-countdown i {
    color: #8b95f5;
}

.absence-from {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
    padding: 10px 12px;
    background: rgba(88, 101, 242, 0.06);
    border: 1px solid rgba(88, 101, 242, 0.14);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.absence-from i {
    color: #8b95f5;
    margin-right: 0;
}

.absence-from strong {
    color: var(--text-main);
    font-weight: 600;
}

.absence-reason {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-height: 4.6em;
    overflow: hidden;
}

.absence-reason i {
    margin-top: 2px;
    color: rgba(255, 159, 67, 0.75);
    flex-shrink: 0;
}

.absence-reason span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.absence-banner .day-banner-count.count-active {
    background: rgba(255, 159, 67, 0.18);
    color: #ff9f43;
}

.absence-banner .day-banner-count.count-planned {
    background: rgba(88, 101, 242, 0.16);
    color: #8b95f5;
}

.absence-banner .day-banner-count.count-ended {
    background: rgba(148, 163, 184, 0.16);
    color: #94a3b8;
}

.absence-card.absence-ended {
    opacity: 0.82;
}

.absence-card.absence-ended::before {
    background: radial-gradient(circle at top, rgba(148, 163, 184, 0.1), transparent 60%);
}

.absence-card.absence-ended .log-card-avatar {
    border-color: rgba(148, 163, 184, 0.35);
}

.badge.Abmeldungen-ended {
    background: rgba(148, 163, 184, 0.16);
    color: #94a3b8;
}

.absence-empty {
    border: 1px dashed rgba(46, 213, 115, 0.25);
    border-radius: 16px;
    background: rgba(46, 213, 115, 0.04);
}

/* ════════════════════════════════════════════════════════════
   FOKUS-PANEL / TRANSCRIPT MODAL
   ════════════════════════════════════════════════════════════ */
.transcript-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.transcript-modal-overlay.visible {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.transcript-modal {
    position: relative;
    width: min(1100px, 100%);
    height: min(82vh, 760px);
    max-height: 82vh;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 100%;
    overflow: hidden;
    animation: modalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.transcript-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.transcript-modal-close:hover {
    background: rgba(235, 69, 95, 0.25);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

/* ── Linke Profil-Spalte ── */
.transcript-profile {
    padding: 26px 20px;
    background: linear-gradient(180deg, rgba(157, 0, 255, 0.08), transparent 40%),
        var(--bg-surface-glass);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    min-height: 0;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.transcript-profile::-webkit-scrollbar {
    width: 6px;
}

.transcript-profile::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.transcript-profile::-webkit-scrollbar-track {
    background: transparent;
}

.transcript-profile-avatar {
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
    max-width: 88px;
    max-height: 88px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(0, 229, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-muted);
}

.transcript-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1 / 1;
}

.transcript-profile-name {
    margin-top: 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
}

.transcript-profile-username {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
}

.transcript-profile-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 4px;
}

.tm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tm-badge-opener {
    background: rgba(88, 101, 242, 0.18);
    color: #c5cdf6;
}

.tm-badge-staff {
    background: rgba(87, 242, 135, 0.16);
    color: #a8f3c4;
}

.transcript-profile-meta {
    width: 100%;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tm-meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    text-align: left;
}

.tm-meta-row dt {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.tm-meta-row dd {
    font-size: 0.88rem;
    color: var(--text-main);
    word-break: break-word;
}

.tm-meta-row dd code {
    font-size: 0.78rem;
    color: var(--accent-cyan);
}

/* ── Rechte Chat-Spalte (Discord-Simulation) ── */
.transcript-chat {
    display: flex;
    flex-direction: column;
    background: #2b2d31;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.transcript-chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 60px 12px 16px; /* Added right padding to prevent overlap with absolute close button */
    background: #1e1f22;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.85;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

.transcript-chat-title {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f2f3f5;
}

.transcript-chat-spacer {
    flex: 1;
}

.transcript-chat-count {
    font-size: 0.76rem;
    color: #949ba4;
}

.transcript-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 0 24px;
    background: #313337;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* ── Chat-Nachrichten ── */
.chat-msg {
    display: flex;
    gap: 16px;
    padding: 4px 16px;
    transition: background 0.12s ease;
}

.chat-msg:hover {
    background: rgba(0, 0, 0, 0.04);
}

.chat-msg-continuation {
    padding-left: 68px;
    /* Avatar-Breite + Gap, damit Inhalt bündig ist */
    padding-top: 2px;
    padding-bottom: 2px;
    display: block;
    position: relative;
}

.chat-msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-msg-body {
    min-width: 0;
    flex: 1;
}

.chat-msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.chat-msg-author {
    font-size: 0.98rem;
    font-weight: 600;
}

.chat-msg-time {
    font-size: 0.7rem;
    color: #949ba4;
}

.chat-msg-stamp {
    float: right;
    font-size: 0.66rem;
    color: #949ba4;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.chat-msg-continuation:hover .chat-msg-stamp {
    opacity: 1;
}

.chat-role-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.chat-role-opener {
    background: rgba(88, 101, 242, 0.2);
    color: #c5cdf6;
}

.chat-role-staff {
    background: rgba(87, 242, 135, 0.2);
    color: #a8f3c4;
}

.chat-role-bot {
    background: rgba(255, 255, 255, 0.1);
    color: #d4d7dc;
}

.chat-msg-content {
    color: #dbdee1;
    font-size: 0.95rem;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: normal;
}

.chat-msg-attachments {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-img {
    max-width: 320px;
    max-height: 280px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chat-img:hover {
    transform: scale(1.01);
}

.chat-file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #00a8fc;
    text-decoration: none;
    font-size: 0.85rem;
    width: fit-content;
}

.chat-file-link:hover {
    text-decoration: underline;
}

/* Custom scrollbar für Chat-Body */
.transcript-chat-body::-webkit-scrollbar {
    width: 8px;
}

.transcript-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.transcript-chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
    .transcript-modal {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 92vh;
        max-height: 92vh;
    }

    .transcript-profile {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 18px 60px 18px 16px; /* Right padding to avoid close button overlap */
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        text-align: left;
        gap: 14px;
        height: auto;
        max-height: 35vh;
        min-height: 0;
        overflow-y: auto;
    }

    .transcript-profile-avatar {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        max-width: 56px;
        max-height: 56px;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
    }

    .transcript-profile-meta {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 0;
    }

    .tm-meta-row {
        flex: 1 1 140px;
    }

    .logs-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .log-card-avatar {
        width: 52px;
        height: 52px;
    }

    .chat-msg-continuation {
        padding-left: 16px;
    }
}

/* ─── TOAST NOTIFICATIONS ─── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    width: min(450px, calc(100vw - 32px));
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(120%) scale(0.9);
    opacity: 0;
}

.toast-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-info .toast-icon {
    background: rgba(0, 229, 255, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.toast-warning .toast-icon {
    background: rgba(255, 179, 0, 0.15);
    color: #ffb300;
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.toast-error .toast-icon {
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(235, 69, 95, 0.3);
}

.toast-success .toast-icon {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.toast-content {
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-main);
}

/* ════════════════════════════════════════════════════════════
   TAG-GRUPPIERUNG: Sticky Day-Header für Raster + Tabelle
   ════════════════════════════════════════════════════════════ */

/* ── Tabelle: Separator-Zeile mit sticky innerem Div ── */
.day-separator-row {
    background: transparent;
}

.day-separator-row>.day-separator-cell {
    padding: 0 !important;
    border: 0 !important;
    background: transparent;
}

.day-separator-sticky {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    margin: 16px 0 4px;
    background: linear-gradient(90deg,
            rgba(0, 229, 255, 0.06) 0%,
            rgba(0, 229, 255, 0.02) 40%,
            transparent 75%);
    border-top: 1px solid rgba(0, 229, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.day-separator-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-cyan);
}

.day-separator-label i {
    opacity: 0.75;
}

.day-separator-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* ── Raster: Day-Banner über volle Grid-Breite ── */
.day-banner {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    margin: 16px 0 4px;
    background: linear-gradient(90deg,
            rgba(157, 0, 255, 0.10) 0%,
            rgba(157, 0, 255, 0.03) 40%,
            transparent 75%);
    border-top: 1px solid rgba(157, 0, 255, 0.28);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.day-banner-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-purple);
}

.day-banner-label i {
    opacity: 0.75;
}

.day-banner-count {
    background: rgba(157, 0, 255, 0.18);
    color: var(--accent-purple);
    padding: 3px 11px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

/* Erste Gruppe: weniger Top-Margin */
.logs-grid>.day-banner:first-child,
.logs-table .day-separator-row:first-child .day-separator-sticky {
    margin-top: 4px;
}

/* ── Sticky unter dem Top-Header (responsive Offset) ── */
@media (max-width: 768px) {

    .day-separator-sticky,
    .day-banner {
        /* Top-Header ist im Mobile-Mode höher fixiert (siehe .main-content padding) */
        top: 70px;
        margin-top: 8px;
        padding: 8px 14px;
    }

    .day-separator-label,
    .day-banner-label {
        font-size: 0.72rem;
    }
}
/* ──────────────────────────────────────────────
   SCHICHT & DIENSTNUMMERN – Spezial-Ansichten
   ────────────────────────────────────────────── */
.green-glow {
    background: rgba(46, 213, 115, 0.12);
    color: #2ed573;
}

.orange-glow {
    background: rgba(255, 165, 0, 0.12);
    color: #ffa500;
}

.view-btn.hidden {
    display: none;
}

/* ── Schicht ── */
.shift-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-top: 8px;
}

.shift-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 6px;
}

.shift-status-badge.closed {
    background: rgba(46, 213, 115, 0.12);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.shift-status-badge.auto {
    background: rgba(255, 165, 0, 0.12);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.shift-status-badge.timeout,
.shift-status-badge.other {
    background: rgba(235, 69, 95, 0.12);
    color: #ff4757;
    border: 1px solid rgba(235, 69, 95, 0.3);
}

.shift-status-badge.active {
    background: rgba(46, 213, 115, 0.12);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
    animation: shiftPulse 2s ease-in-out infinite;
}

@keyframes shiftPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.shift-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 100%;
}

.shift-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.shift-live-duration {
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 0.95rem;
}

.shift-card-active {
    border-color: rgba(46, 213, 115, 0.45);
    box-shadow: 0 0 22px rgba(46, 213, 115, 0.12);
}

.shift-live-banner .day-banner-count {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

/* ── Dienstnummern ── */
.dn-number-badge {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2), rgba(157, 0, 255, 0.2));
    border: 1px solid rgba(0, 168, 255, 0.4);
    color: #00a8ff;
    padding: 8px 18px;
    border-radius: 10px;
    margin-top: 10px;
    letter-spacing: 1px;
}

.dn-group-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(157, 0, 255, 0.12);
    color: #a855f7;
    border: 1px solid rgba(157, 0, 255, 0.3);
    margin-top: 8px;
}

.dn-remove-btn {
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(235, 69, 95, 0.4);
    background: rgba(235, 69, 95, 0.1);
    color: #ff4757;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dn-remove-btn:hover {
    background: rgba(235, 69, 95, 0.25);
}

.dn-number-cell {
    color: #00a8ff;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Verwaltungs-Leiste: Hinweise */
.dn-manage-hint {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-muted, #8e9297);
    line-height: 1.5;
    padding-top: 4px;
}

.dn-manage-hint i {
    color: #00a8ff;
    margin-right: 4px;
}

.dn-manage-warn {
    color: #ffa502;
}

.dn-manage-warn i {
    color: #ffa502;
}

.teamliste-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.teamliste-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    margin: 0;
    min-width: 160px;
}

.teamliste-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.teamliste-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
}

.tmg-modal-actions {
    margin-top: 14px;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
}

.tmg-modal-actions-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.settings-section-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-purple);
    margin: 0 0 8px;
}

.tmg-settings-tab-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.tmg-settings-setup-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tmg-settings-setup-links a {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.tmg-settings-setup-links a:hover {
    border-color: rgba(157, 0, 255, 0.45);
    background: rgba(157, 0, 255, 0.12);
}

/* ── Einstellungen-Dialog ── */

/* Override: Settings modal is NOT a 2-col transcript grid */
.system-settings-modal {
    /* Reset transcript-modal grid layout */
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;

    /* Sizing */
    width: min(560px, calc(100vw - 32px));
    max-width: 560px;
    height: auto !important;
    max-height: min(88vh, 780px);

    /* Aesthetics */
    background: linear-gradient(160deg, #18181f 0%, #141419 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(157, 0, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    padding: 0;
}

/* Inner layout wrapper for the settings modal content */
.system-settings-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: min(88vh, 780px);
    padding: 28px 28px 0 28px;
}

/* Header accent bar */
.system-settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.system-settings-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(157, 0, 255, 0.25), rgba(0, 168, 255, 0.15));
    border: 1px solid rgba(157, 0, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #c084fc;
    flex-shrink: 0;
}

.system-settings-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin: 0;
}

.system-settings-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.system-settings-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 4px 20px 0;
    margin-right: -4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.system-settings-body::-webkit-scrollbar {
    width: 5px;
}
.system-settings-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
.system-settings-body::-webkit-scrollbar-track {
    background: transparent;
}

/* Field groups */
.settings-field-group {
    margin-bottom: 6px;
}

.settings-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 7px;
    margin-top: 18px;
}

.settings-field-label:first-child {
    margin-top: 0;
}

/* Override: labels inside body that are plain (not toggle rows) */
.system-settings-body > label:not(.settings-toggle-row),
.settings-dialog-section > label:not(.settings-toggle-row) {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 7px;
    margin-top: 18px;
}

.system-settings-body select,
.system-settings-body input[type="text"],
.system-settings-body textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: var(--text-main);
    padding: 10px 13px;
    font-size: 0.88rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: var(--font-primary);
}

.system-settings-body select:focus,
.system-settings-body input[type="text"]:focus,
.system-settings-body textarea:focus {
    border-color: rgba(157, 0, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(157, 0, 255, 0.12);
}

.system-settings-body textarea {
    resize: vertical;
    min-height: 72px;
}

/* Color picker row */
.settings-color-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.settings-color-row input[type="color"] {
    width: 44px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: none;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
}

.settings-color-row input[type="text"] {
    flex: 1;
}

/* Toggle rows */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 13px 15px;
    margin: 10px 0 !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-toggle-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-toggle-row small {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    display: block;
    margin-top: 2px;
}

.settings-toggle-row strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Toggle switch style for checkboxes in toggle-rows */
.settings-toggle-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.settings-toggle-row input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.settings-toggle-row input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #9d00ff, #00a8ff);
    border-color: rgba(157, 0, 255, 0.5);
}

.settings-toggle-row input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

/* Role list */
.settings-role-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 6px;
    padding: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.settings-role-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 7px 10px;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background 0.12s ease;
    margin: 0 !important;
}

.settings-role-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.settings-role-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #9d00ff;
    flex-shrink: 0;
}

/* Info box */
.settings-info-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(0, 168, 255, 0.06);
    border: 1px solid rgba(0, 168, 255, 0.18);
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.5;
}

.settings-info-box i {
    color: #00a8ff;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Section divider */
.settings-section-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 18px 0;
}

/* Footer */
.system-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px;
    margin: 0 -28px 0 -28px; /* Bleed to edges */
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .system-settings-modal {
        width: calc(100vw - 24px);
        max-height: 92vh;
        border-radius: 16px;
    }
    .system-settings-inner {
        padding: 20px 18px 0 18px;
    }
    .system-settings-footer {
        padding: 14px 18px;
        margin: 0 -18px 0 -18px;
    }
}

/* ════════════════════════════════════════════════════════════
   BESTÄTIGUNGS-MODAL (Custom Confirm Dialog)
   ════════════════════════════════════════════════════════════ */
.confirm-modal-overlay {
    z-index: 2500 !important;
}

.confirm-dialog-modal {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;
    width: min(480px, calc(100vw - 32px));
    max-width: 480px;
    height: auto !important;
    max-height: min(90vh, 600px);
    background: linear-gradient(165deg, #181822 0%, #121217 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(235, 69, 95, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    padding: 0;
    animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-dialog-inner {
    display: flex;
    flex-direction: column;
    padding: 26px 26px 0 26px;
}

.confirm-dialog-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.confirm-dialog-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.confirm-dialog-icon.is-danger {
    background: linear-gradient(135deg, rgba(235, 69, 95, 0.22), rgba(255, 77, 77, 0.12));
    border: 1px solid rgba(235, 69, 95, 0.38);
    color: #ff6b7d;
    box-shadow: 0 0 20px rgba(235, 69, 95, 0.2);
}

.confirm-dialog-icon.is-warning {
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.22), rgba(255, 195, 18, 0.12));
    border: 1px solid rgba(255, 165, 2, 0.38);
    color: #ffa502;
    box-shadow: 0 0 20px rgba(255, 165, 2, 0.2);
}

.confirm-dialog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #ffffff);
    letter-spacing: -0.01em;
    margin: 0;
}

.confirm-dialog-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted, #8e9297);
    margin: 3px 0 0;
}

.confirm-dialog-body {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.confirm-dialog-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #e2e5e8;
    margin: 0;
}

.confirm-dialog-text strong {
    color: #ffffff;
    font-weight: 700;
}

.confirm-dialog-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(235, 69, 95, 0.08);
    border: 1px solid rgba(235, 69, 95, 0.22);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #ff9aa8;
}

.confirm-dialog-hint i {
    color: #ff6b7d;
    margin-top: 2px;
    flex-shrink: 0;
}

.confirm-dialog-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 26px;
    margin: 0 -26px 0 -26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.btn-ghost-cancel {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #c9ccd1;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.btn-ghost-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-danger-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #eb455f 0%, #c92a2a 100%);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 18px rgba(235, 69, 95, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-danger-confirm:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(235, 69, 95, 0.5);
}

.btn-danger-confirm:active {
    transform: translateY(0);
}

.btn-primary-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #9d00ff 0%, #00a8ff 100%);
    border: 1px solid rgba(157, 0, 255, 0.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 18px rgba(157, 0, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary-confirm:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(157, 0, 255, 0.5);
}

@media (max-width: 600px) {
    .confirm-dialog-modal {
        width: calc(100vw - 24px);
        border-radius: 16px;
    }
    .confirm-dialog-inner {
        padding: 20px 18px 0 18px;
    }
    .confirm-dialog-footer {
        padding: 14px 18px;
        margin: 0 -18px 0 -18px;
    }
}
