/* --- Global Styles & Variables --- */

/* --- 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 {
    color-scheme: dark;
    --bg-dark: #0e0e12;
    --bg-sidebar: #111116;
    --bg-card: rgba(20, 20, 28, 0.7);
    --text-main: #e0e0e0;
    --text-muted: #888899;
    --accent-cyan: #00e5ff;
    --accent-purple: #9d00ff;
    --accent-red: #eb455f;
    --glass-bg: rgba(20, 20, 30, 0.6);
    --glass-bg-hover: rgba(30, 30, 45, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.3);
    --danger: #ff4757;
    --success: #2ed573;
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --sidebar-width: 260px;
}

select {
    color-scheme: dark;
}

select option,
select optgroup {
    background-color: var(--bg-dark, #0e0e12);
    color: var(--text-main, #e0e0e0);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Particle Background --- */
.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.sparkles-left,
.sparkles-right {
    position: absolute;
    width: 60%;
    height: 100%;
    opacity: 0.3;
}

.sparkles-left {
    left: -10%;
    background-image: radial-gradient(circle, var(--accent-cyan) 0%, rgba(0, 0, 0, 0) 60%);
    mask-image: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0.05) 70%);
    -webkit-mask-image: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0.05) 70%);
}

.sparkles-right {
    right: -10%;
    background-image: radial-gradient(circle, var(--accent-purple) 0%, rgba(0, 0, 0, 0) 60%);
    mask-image: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0.05) 70%);
    -webkit-mask-image: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0.05) 70%);
}

/* ===== ANIMATION KEYFRAMES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 229, 255, 0.25);
    }
}

/* ===== LOGIN FULLSCREEN ===== */
.login-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.login-fullscreen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 50px 40px;
    max-width: 420px;
    width: 90%;
    animation: fadeInScale 0.5s ease;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.bot-icon-large {
    font-size: 2.4rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.btn-discord-login {
    background: #5865F2;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family);
}

.btn-discord-login:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

/* ===== SERVER SELECTION VIEW ===== */
#server_select_view {
    display: flex;
    min-height: 100vh;
}

.server-view-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo.clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.sidebar-logo.clickable:hover {
    opacity: 0.8;
}

.bot-icon {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    gap: 2px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar-nav-item.active {
    background: rgba(0, 229, 255, 0.08);
    color: var(--accent-cyan);
    font-weight: 600;
}

.sidebar-nav-item i {
    width: 18px;
    text-align: center;
}

.sidebar-footer-links {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.sidebar-footer-links a:hover {
    color: var(--text-main);
}

.sidebar-user-profile {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-name {
    font-size: 0.82rem;
    color: var(--text-main);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Server Grid Main Area */
.server-view-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.server-view-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.topbar-spacer {
    flex: 1;
}

.topbar-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.topbar-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.topbar-userid {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.server-grid-wrapper {
    padding: 30px;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Server Cards */
.server-card {
    position: relative;
    background: rgba(18, 18, 24, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease backwards;
}

.server-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
    background: rgba(25, 25, 35, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 255, 0.08);
}

.server-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.3s;
}

.server-card:hover .server-card-icon {
    border-color: rgba(0, 229, 255, 0.3);
}

.server-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.server-card-initials {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.server-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-card-add-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.server-card:hover .server-card-add-btn {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--accent-cyan);
}

/* ===== DASHBOARD VIEW WITH SIDEBAR ===== */
#dashboard_view {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    --sidebar-utility-scale: 1;
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
}

/* Core category list grows when utility block is dragged smaller */
.dashboard-sidebar .sidebar-categories {
    flex: 1 1 auto;
    min-height: 0;
}

/* Server Info in Dashboard Sidebar */
.sidebar-server-info {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-server-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar-server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.sidebar-server-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sidebar Search Bar */
.sidebar-search {
    padding: 4px 10px 8px 10px;
    position: relative;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0 10px;
    transition: all 0.25s ease;
    position: relative;
}

.search-bar:focus-within {
    border-color: rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.04);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.08);
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: color 0.25s;
}

.search-bar:focus-within .search-icon {
    color: var(--accent-cyan);
}

#system_search {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.78rem;
    padding: 9px 8px;
    outline: none;
    min-width: 0;
}

#system_search::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
    font-size: 0.76rem;
}

.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 2px);
    background: #1a1a24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 340px;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: fadeIn 0.15s ease;
}

/* Position search recommendations above search bar when lower sidebar is retracted */
.dashboard-sidebar.utility-compact .search-results,
.dashboard-sidebar.utility-mini .search-results,
.dashboard-sidebar.utility-retracted .search-results {
    top: auto;
    bottom: calc(100% + 6px);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
}

.search-results::-webkit-scrollbar {
    width: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(0, 229, 255, 0.06);
}

.search-result-item .result-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item .result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-item .result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item .result-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item .result-category {
    font-size: 0.62rem;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.search-no-results i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 6px;
    opacity: 0.4;
}

/*
 * Vertical resize handle under the search bar — mirror of
 * .sidebar-resize-handle (horizontal width drag on the right edge).
 * Drag up = shrink utility block (more room for core categories);
 * drag down = enlarge utility block.
 */
.sidebar-utility-resize-handle {
    flex-shrink: 0;
    height: 8px;
    margin: 0 10px;
    position: relative;
    cursor: ns-resize;
    z-index: 40;
    touch-action: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.sidebar-utility-resize-handle::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -4px;
    bottom: -4px;
    /* larger hit area without taking layout space */
}

.sidebar-utility-resize-grip {
    width: 36px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transition: background-color 0.2s, box-shadow 0.2s, width 0.2s;
    pointer-events: none;
}

.sidebar-utility-resize-handle:hover,
.sidebar-utility-resize-handle.resizing {
    background-color: rgba(0, 229, 255, 0.08);
}

.sidebar-utility-resize-handle:hover .sidebar-utility-resize-grip,
.sidebar-utility-resize-handle.resizing .sidebar-utility-resize-grip {
    width: 48px;
    background-color: var(--accent-cyan, #00e5ff);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

body.resizing-sidebar-utility {
    user-select: none !important;
    cursor: ns-resize !important;
}

body.resizing-sidebar-utility * {
    cursor: ns-resize !important;
}

/* Utility block (external dashboards + footer + profile) scales as a unit.
   --sidebar-utility-scale: overall size (0.55–1)
   --utility-label-progress: 1 = full labels, 0 = labels fully faded (smooth)
   Layout class .utility-compact flips to horizontal only after labels fade. */
.sidebar-utility {
    --utility-label-progress: 1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    gap: 0;
    transition: gap 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-utility-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0 10px calc(8px * var(--sidebar-utility-scale, 1)) 10px;
    gap: calc(2px * var(--sidebar-utility-scale, 1));
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: center top;
    transition:
        opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        gap 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        flex-direction 0s;
}

.sidebar-utility-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 6px calc(8px * var(--sidebar-utility-scale, 1)) 6px;
    flex-shrink: 0;
    opacity: var(--utility-label-progress, 1);
    max-height: calc(1px + 16px * var(--utility-label-progress, 1));
    overflow: hidden;
    transition:
        opacity 0.22s ease,
        max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        margin 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-utility .sidebar-utility-item,
.sidebar-utility .sidebar-cat-item.sidebar-utility-item {
    display: flex;
    align-items: center;
    padding: calc(12px * var(--sidebar-utility-scale, 1)) calc(16px * var(--sidebar-utility-scale, 1));
    font-size: calc(0.85rem * var(--sidebar-utility-scale, 1));
    gap: calc(10px * var(--sidebar-utility-scale, 1) * var(--utility-label-progress, 1));
    border-radius: calc(8px * var(--sidebar-utility-scale, 1));
    line-height: 1.2;
    min-height: 0;
    transition:
        padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        gap 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        font-size 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.28s ease,
        background-color 0.2s ease,
        min-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        justify-content 0s;
}

.sidebar-utility .sidebar-utility-item i {
    width: calc(18px * var(--sidebar-utility-scale, 1));
    font-size: calc(0.9rem * var(--sidebar-utility-scale, 1));
    flex-shrink: 0;
    text-align: center;
    transition:
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        font-size 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Labels collapse smoothly (no display:none jump) */
.sidebar-utility .sidebar-utility-item span,
.sidebar-utility .sidebar-footer-links a span,
.sidebar-utility .user-name {
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    opacity: var(--utility-label-progress, 1);
    max-width: calc(var(--utility-label-progress, 1) * 12.5em);
    transform: translateX(calc((1 - var(--utility-label-progress, 1)) * -4px));
    transition:
        opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        max-width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.sidebar-utility .sidebar-footer-links {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding: calc(12px * var(--sidebar-utility-scale, 1)) calc(16px * var(--sidebar-utility-scale, 1));
    gap: calc(6px * var(--sidebar-utility-scale, 1));
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: center top;
    transition:
        opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        gap 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        padding 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-utility .sidebar-footer-links a {
    font-size: calc(0.78rem * var(--sidebar-utility-scale, 1));
    gap: calc(8px * var(--sidebar-utility-scale, 1) * var(--utility-label-progress, 1));
    line-height: 1.25;
    transition:
        padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        gap 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        font-size 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        min-width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-utility .sidebar-footer-links a i {
    font-size: calc(0.78rem * var(--sidebar-utility-scale, 1));
    width: calc(14px * var(--sidebar-utility-scale, 1));
    text-align: center;
    flex-shrink: 0;
    transition:
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        font-size 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-utility .sidebar-user-profile {
    display: flex;
    align-items: center;
    padding: calc(12px * var(--sidebar-utility-scale, 1)) calc(16px * var(--sidebar-utility-scale, 1));
    gap: calc(10px * var(--sidebar-utility-scale, 1) * max(0.35, var(--utility-label-progress, 1)));
    min-height: 0;
    transition:
        padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        gap 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        justify-content 0.2s ease;
}

.sidebar-utility .user-avatar-placeholder {
    width: calc(32px * var(--sidebar-utility-scale, 1));
    height: calc(32px * var(--sidebar-utility-scale, 1));
    font-size: calc(0.75rem * var(--sidebar-utility-scale, 1));
    flex-shrink: 0;
    transition:
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        font-size 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Brief soft-out while flex-direction flips (added by JS) */
.sidebar-utility.utility-layout-fading .sidebar-utility-links,
.sidebar-utility.utility-layout-fading .sidebar-footer-links,
.sidebar-utility.utility-layout-fading .sidebar-user-profile {
    opacity: 0.28;
    transform: translateY(3px) scale(0.97);
    pointer-events: none;
}

/*
 * Compact: horizontal icon toolbar (after labels have faded).
 * Keep transitions so the flip feels like a soft reflow, not a snap.
 */
.dashboard-sidebar.utility-compact .sidebar-utility {
    gap: 2px;
}

.dashboard-sidebar.utility-compact .sidebar-utility-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 4px 8px 6px;
    gap: 4px;
}

.dashboard-sidebar.utility-compact .sidebar-utility-links>.sidebar-utility-divider {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-utility-item,
.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-cat-item.sidebar-utility-item {
    flex: 0 0 auto;
    justify-content: center;
    width: auto;
    min-width: 36px;
    padding: 8px 10px;
    gap: 0;
    border-radius: 8px;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-utility-item span {
    opacity: 0;
    max-width: 0;
    transform: translateX(-4px);
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-utility-item i {
    width: auto;
    font-size: 0.95rem;
    margin: 0;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-utility-item.active::before,
.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-cat-item.sidebar-utility-item.active::before {
    opacity: 0;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 4px 8px 6px;
    gap: 4px;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-footer-links a {
    flex: 0 0 auto;
    justify-content: center;
    min-width: 36px;
    padding: 8px 10px;
    gap: 0;
    border-radius: 8px;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-footer-links a span {
    opacity: 0;
    max-width: 0;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-footer-links a i {
    width: auto;
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-footer-links .sidebar-utility-divider {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
}

.dashboard-sidebar.utility-compact .sidebar-utility .sidebar-user-profile {
    justify-content: center;
    padding: 6px 8px 10px;
    gap: 8px;
}

.dashboard-sidebar.utility-compact .sidebar-utility .user-name {
    opacity: 0;
    max-width: 0;
}

/* Mini: tighter horizontal toolbar */
.dashboard-sidebar.utility-mini .sidebar-utility-links,
.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-footer-links {
    gap: 2px;
    padding: 2px 6px 4px;
}

.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-utility-item,
.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-cat-item.sidebar-utility-item,
.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-footer-links a {
    min-width: 32px;
    padding: 6px 8px;
}

.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-utility-item i,
.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-footer-links a i {
    font-size: 0.85rem;
}

.dashboard-sidebar.utility-mini .sidebar-utility .sidebar-user-profile {
    padding: 4px 6px 8px;
    justify-content: center;
}

.dashboard-sidebar.utility-mini .sidebar-utility .user-avatar-placeholder {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
}

@media (prefers-reduced-motion: reduce) {

    .sidebar-utility,
    .sidebar-utility-links,
    .sidebar-utility-divider,
    .sidebar-utility .sidebar-utility-item,
    .sidebar-utility .sidebar-utility-item i,
    .sidebar-utility .sidebar-utility-item span,
    .sidebar-utility .sidebar-footer-links,
    .sidebar-utility .sidebar-footer-links a,
    .sidebar-utility .sidebar-footer-links a i,
    .sidebar-utility .sidebar-footer-links a span,
    .sidebar-utility .sidebar-user-profile,
    .sidebar-utility .user-avatar-placeholder,
    .sidebar-utility .user-name {
        transition-duration: 0.01ms !important;
    }

    .sidebar-utility.utility-layout-fading .sidebar-utility-links,
    .sidebar-utility.utility-layout-fading .sidebar-footer-links,
    .sidebar-utility.utility-layout-fading .sidebar-user-profile {
        opacity: 1;
        transform: none;
    }
}

/* Sidebar Category Navigation */
.sidebar-categories {
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.sidebar-cat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar-cat-item.active {
    background: rgba(0, 229, 255, 0.08);
    color: var(--accent-cyan);
    font-weight: 600;
}

.sidebar-cat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-cyan);
    border-radius: 0 3px 3px 0;
}

.sidebar-cat-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

/* Dashboard Main Content */
.dashboard-main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px;
    max-width: 100%;
}

/* Section Page Headers */
.section-page-header {
    margin-bottom: 30px;
    animation: slideInLeft 0.3s ease;
}

.section-page-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-page-header h2 i {
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-page-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Settings Sections */
.settings-section {
    animation: fadeIn 0.3s ease;
}

/* --- Cards & Containers --- */
.settings-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s;
}

.settings-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* ===== Schicht-Typen Tabelle (Shift-System) ===== */
.shift-types-table-wrap {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
}

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

.shift-types-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #8e9297);
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shift-types-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

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

.shift-types-table .input-modern {
    min-height: 38px;
    padding: 6px 10px;
}

.shift-types-remove-btn {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    width: 100%;
}

.shift-types-remove-btn:hover {
    background: rgba(239, 68, 68, 0.22);
}

.shift-types-empty {
    text-align: center;
    color: var(--text-muted, #8e9297);
    font-size: 13px;
    padding: 14px 8px;
    font-style: italic;
}

.shift-types-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* --- Typography & Elements --- */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(90deg, var(--accent-cyan), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-heading {
    font-size: 1rem;
    margin-bottom: 10px;
}

.green-glow {
    color: var(--success);
    text-shadow: 0 0 8px rgba(46, 213, 115, 0.3);
}

.red-glow {
    color: var(--danger);
    text-shadow: 0 0 8px rgba(255, 71, 87, 0.3);
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin: 15px 0 5px;
}

.help-text {
    font-size: 0.75rem;
    color: #666677;
    text-transform: none;
    font-weight: normal;
    letter-spacing: 0;
}

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

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

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.logout-link {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    transition: 0.2s;
}

.logout-link:hover {
    text-shadow: 0 0 8px rgba(255, 71, 87, 0.5);
}

/* --- Inputs (Layout Shift Fix: feste 16px Font & Outline statt Border-Change) --- */
.input-modern {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 16px !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-modern:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

.input-modern option {
    background: var(--bg-dark);
    color: #fff;
}

textarea.input-modern {
    resize: vertical;
    min-height: 80px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

/* --- JS Injected Lists & Grids --- */
.team-list-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    min-height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.team-role-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

/* 🔥 DRAG AND DROP STYLES */
.team-role-item.dragging {
    opacity: 0.5;
    background: rgba(0, 229, 255, 0.05);
    border: 1px dashed var(--accent-cyan);
    transform: scale(0.98);
}

.team-role-item.drag-over {
    border-top: 2px solid var(--accent-cyan);
    transform: translateY(2px);
}

.dragging-active .team-role-item * {
    pointer-events: none !important;
}

.drag-grip {
    color: var(--accent-cyan) !important;
    font-size: 1.15rem !important;
    cursor: grab;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid rgba(0, 229, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.drag-grip:hover {
    color: #fff !important;
    background: rgba(0, 229, 255, 0.15) !important;
    border-color: rgba(0, 229, 255, 0.35) !important;
    transform: scale(1.08);
}

.team-role-item small {
    color: var(--text-muted) !important;
}

/* ===== 📟 Dienstnummern-System (3-Schritte-Guide) ===== */
.dn-howto {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(0, 168, 255, 0.06);
    border: 1px solid rgba(0, 168, 255, 0.18);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.dn-howto-step {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dn-howto-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.dn-howto-text b {
    font-size: 0.85rem;
    color: #fff;
}

.dn-howto-text small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dn-howto-arrow {
    color: rgba(0, 168, 255, 0.6);
    font-size: 0.7rem;
}

.dn-step-badge {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a8ff, #9d00ff);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0, 168, 255, 0.35);
}

.dn-commands-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 0;
}

.dn-commands-box summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #00a8ff;
    list-style: none;
    user-select: none;
}

.dn-commands-box summary::-webkit-details-marker {
    display: none;
}

.dn-commands-box summary::before {
    content: '▸';
    margin-right: 8px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.dn-commands-box[open] summary::before {
    transform: rotate(90deg);
}

.dn-commands-box p {
    margin: 0;
    padding: 0 14px 12px 30px;
    font-size: 0.78rem;
    color: #b5bac1;
    line-height: 1.8;
}

.dn-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.dn-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dn-step-head h4 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
}

.dn-field-hint {
    font-size: 0.75rem;
    color: #777788;
    margin: 4px 0 10px;
    line-height: 1.5;
}

.dn-preset-box {
    background: rgba(0, 168, 255, 0.05);
    border: 1px dashed rgba(0, 168, 255, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.dn-preset-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.dn-preset-title small {
    font-weight: 400;
    color: var(--text-muted);
}

.dn-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dn-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dn-preset-btn:hover {
    background: rgba(0, 168, 255, 0.12);
    border-color: rgba(0, 168, 255, 0.5);
    transform: translateY(-1px);
}

.dn-preset-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.dn-preset-fmt {
    font-size: 0.68rem;
    color: #00a8ff;
    font-weight: 600;
}

.dn-group-form {
    margin-top: 16px;
    background: rgba(0, 168, 255, 0.06);
    border: 1px solid rgba(0, 168, 255, 0.25);
    padding: 14px 16px;
    border-radius: 8px;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.dn-group-form-highlight {
    border-color: #2ed573;
    box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.15);
}

.dn-form-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.dn-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dn-field label {
    margin: 0 0 5px;
}

.dn-field .dn-field-hint {
    margin: 4px 0 0;
}

.dn-advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    background: none;
    border: none;
    color: #00a8ff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}

.dn-advanced-toggle:hover {
    color: #4dc3ff;
}

.dn-advanced-caret {
    transition: transform 0.2s ease;
}

.dn-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.dn-preview-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #00a8ff;
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 6px;
    padding: 5px 10px;
}

.dn-preview-badge:empty {
    display: none;
}

.dn-format-badge {
    display: inline-flex;
    align-items: center;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #00e5ff;
    font-family: 'gg sans', 'Noto Sans', sans-serif;
    letter-spacing: 0.3px;
}

.dn-group-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dn-empty {
    color: #a3a6aa;
    text-align: center;
    padding: 14px 10px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.dn-empty small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dn-assign-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .dn-howto {
        justify-content: center;
        text-align: center;
    }
    .dn-howto-arrow {
        display: none;
    }
    .dn-preset-btn {
        flex: 1 1 calc(50% - 8px);
    }
}

/* ===== 🏆 Community-Level-System (3-Schritte-Guide) =====
   Gleiche Optik wie das Dienstnummern-System (cm-* Varianten). */
.cm-howto {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(157, 0, 255, 0.06);
    border: 1px solid rgba(157, 0, 255, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.cm-howto-step {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cm-howto-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cm-howto-text b {
    font-size: 0.85rem;
    color: #fff;
}

.cm-howto-text small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cm-howto-arrow {
    color: rgba(157, 0, 255, 0.6);
    font-size: 0.7rem;
}

.cm-step-badge {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9d00ff, #ff5fa2);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(157, 0, 255, 0.35);
}

.cm-commands-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 0;
}

.cm-commands-box summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a855f7;
    list-style: none;
    user-select: none;
}

.cm-commands-box summary::-webkit-details-marker {
    display: none;
}

.cm-commands-box summary::before {
    content: '▸';
    margin-right: 8px;
    transition: transform 0.2s ease;
    display: inline-block;
}

.cm-commands-box[open] summary::before {
    transform: rotate(90deg);
}

.cm-commands-box p {
    margin: 0;
    padding: 0 14px 12px 30px;
    font-size: 0.78rem;
    color: #b5bac1;
    line-height: 1.8;
}

.cm-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.cm-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cm-step-head h4 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
}

.cm-field-hint {
    font-size: 0.75rem;
    color: #777788;
    margin: 4px 0 10px;
    line-height: 1.5;
}

.cm-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.cm-field label {
    margin: 0 0 5px;
}

.cm-field .cm-field-hint {
    margin: 4px 0 0;
}

.cm-advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    background: none;
    border: none;
    color: #a855f7;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
}

.cm-advanced-toggle:hover {
    color: #c084fc;
}

.cm-advanced-caret {
    transition: transform 0.2s ease;
}

.cm-level-preview {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 10px 12px;
}

.cm-level-preview-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.cm-level-preview-row {
    display: grid;
    grid-template-columns: 64px 1fr 90px;
    align-items: center;
    gap: 10px;
    padding: 3px 0;
    font-size: 0.75rem;
}

.cm-level-preview-lv {
    font-weight: 700;
    color: #a855f7;
}

.cm-level-preview-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.cm-level-preview-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #9d00ff, #ff5fa2);
    border-radius: 4px;
    transition: width 0.25s ease;
}

.cm-level-preview-xp {
    text-align: right;
    color: #b5bac1;
    font-variant-numeric: tabular-nums;
}

.cm-msg-preview {
    margin-top: 12px;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #dbdee1;
}

.cm-msg-preview-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.cm-empty {
    color: #a3a6aa;
    text-align: center;
    padding: 14px 10px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.cm-empty small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

@media (max-width: 600px) {
    .cm-howto {
        justify-content: center;
        text-align: center;
    }
    .cm-howto-arrow {
        display: none;
    }
    .cm-level-preview-row {
        grid-template-columns: 56px 1fr 80px;
    }
}

/* Ticket target-category pill — neutral, not highlighted */
.ticket-target-pill {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    width: max-content;
}

.ticket-target-pill-ok {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #b5bac1;
}

.ticket-target-pill-warn {
    background: rgba(235, 69, 95, 0.08);
    border: 1px solid rgba(235, 69, 95, 0.2);
    color: #eb455f;
}

.add-role-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.cat-input-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

/* Ticket-Kategorie hinzufügen — groß & hell sichtbar */
.btn-add-category:hover {
    background: rgba(165, 180, 252, 0.4) !important;
    border-color: #e0e7ff !important;
    color: #eef2ff !important;
    box-shadow: 0 0 0 2px rgba(199, 210, 254, 0.35), 0 6px 18px rgba(129, 140, 248, 0.4) !important;
    transform: scale(1.05);
}

.btn-add-category:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .cat-input-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(157, 0, 255, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 8px;
    padding: 0 20px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-icon:hover {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
}

.role-controls button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #fff;
    padding: 6px 10px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.role-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
}

.role-controls .btn-danger {
    background: rgba(255, 71, 87, 0.1) !important;
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.role-controls .btn-danger:hover {
    background: var(--danger) !important;
    color: #fff;
}

.auth-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #5865F2;
}

/* --- Footer Actions --- */
.action-footer {
    margin-top: 40px;
    padding-bottom: 40px;
}

.btn-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}

.status-msg {
    color: var(--success);
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    display: none;
    padding: 15px;
    background: rgba(46, 213, 115, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(46, 213, 115, 0.2);
}

/* --- Premium Liquid Glass Dropdowns (Zero Layout Shift) --- */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    margin-top: 5px;
}

.custom-select-wrapper.open {
    z-index: 1000 !important;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
    font-size: 16px !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger span {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.03);
}

.custom-select-wrapper.open .custom-select-trigger {
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
    /* Vergrößert nicht den Container! */
}

/* Sanftes Auffalten des Containers nach unten */
.custom-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    max-height: 350px;
    overflow-y: auto;

    /* Animation Start-State */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

#new_team_role_id+.custom-select-wrapper .custom-options {
    max-height: 500px;
}

/* Animation End-State */
.custom-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-select-search-wrap {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px;
    background: rgba(15, 15, 20, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-select-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: #fff;
    font-size: 14px;
    font-family: var(--font-family);
}

.custom-select-search:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

.custom-option.custom-option-hidden {
    display: none;
}

.panel-post-box {
    background: rgba(0, 229, 255, 0.08);
    border-left: 3px solid var(--accent-cyan);
    padding: 12px 15px;
    margin-top: 16px;
    border-radius: 0 4px 4px 0;
    overflow: visible;
}

.panel-post-kicker {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.panel-post-copy {
    font-size: 13px;
    margin: 5px 0 10px 0;
    color: #dbdee1;
}

.panel-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

#team_list_collapse_content,
#team_list_collapse_content .collapse-inner,
#teamliste_panel_box,
#ticket_panel_box,
#houses_panel_box,
#frak_panel_box,
#selfrole_panel_box,
#abmeldung_panel_box,
#duty_panel_box,
#ingame_ban_panel_box,
#ingame_names_panel_box,
#log_dashboard_panel_box {
    overflow: visible;
}

.custom-option {
    padding: 10px 15px;
    color: #d1d5db;
    cursor: pointer;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.custom-option.selected {
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    font-weight: bold;
}

/* --- Elegantes Checkmark-System für Dropdowns --- */
.check-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.check-mark-icon {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bounce Effekt */
}

/* Plopt schön bouncy auf, wenn selected */
.custom-option.selected .check-mark-icon {
    opacity: 1;
    transform: scale(1);
}

/* --- Einklappbare Sektionen --- */
.collapse-content {
    margin-top: 15px;
    display: block;
}

.collapse-inner {
    padding-bottom: 5px;
}

.collapse-content.collapsed {
    display: none !important;
}

/* --- Custom Toggle Switch --- */
.switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 15px;
    transition: border-color 0.3s;
}

.switch-wrapper:hover {
    border-color: rgba(0, 229, 255, 0.2);
}

.switch-label-text {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 500;
}

.modern-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}

.modern-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1e1f22;
    border: 1px solid #313338;
    border-radius: 24px;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #80848e;
    border-radius: 50%;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-switch input:checked+.slider {
    background-color: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-cyan);
}

.modern-switch input:checked+.slider:before {
    transform: translateX(22px);
    background-color: var(--accent-cyan);
}

/* --- Einklappbare Header --- */
.settings-card.collapsible-card {
    cursor: pointer;
}

.settings-card.collapsible-card .collapse-content {
    cursor: default;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 15px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.collapsible-header:hover {
    border-color: rgba(0, 229, 255, 0.2);
}

.collapse-arrow {
    display: inline-block !important;
    color: #00e5ff !important;
    font-size: 16px !important;
    line-height: 1 !important;
    transition: transform 0.3s ease;
}

.team-role-item input.input-modern {
    flex-grow: 1;
    margin-left: 10px;
}

/* --- Custom Scrollbar for Sidebar --- */
.sidebar-categories::-webkit-scrollbar {
    width: 4px;
}

.sidebar-categories::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-categories::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ===== 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;
}

/* --- J2C Custom Permissions Three-State Toggle --- */
.permission-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background-color 0.2s, border-color 0.2s;
}

.permission-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 70%;
}

.permission-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.permission-description {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.three-state-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.state-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Selected states */
.state-btn.active.deny {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

.state-btn.active.inherit {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.state-btn.active.allow {
    background: var(--success);
    color: #fff;
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.4);
}

/* --- J2C Permission Presets --- */
.perm-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.perm-preset-btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.perm-preset-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.perm-preset-btn:active {
    transform: scale(0.97);
}

/* --- J2C Permission Group Headers --- */
.perm-group-header {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-cyan);
    opacity: 0.7;
    margin: 16px 0 8px 2px;
}

/* --- Responsive: Server Selection Sidebar (icon collapse, unchanged) --- */
@media (max-width: 768px) {
    .server-view-sidebar {
        width: 60px;
        overflow: hidden;
    }

    .server-view-sidebar .sidebar-logo {
        padding: 24px 10px;
        justify-content: center;
    }

    .server-view-sidebar .sidebar-logo span,
    .server-view-sidebar .sidebar-nav-item span,
    .server-view-sidebar .sidebar-footer-links a span,
    .server-view-sidebar .user-name,
    .server-view-sidebar .logo-text {
        display: none !important;
    }

    .server-view-main {
        margin-left: 60px;
    }

    .server-view-sidebar .sidebar-nav-item {
        justify-content: center;
        padding: 12px;
        font-size: 0 !important;
        /* Hide text nodes */
    }

    .server-view-sidebar .sidebar-nav-item i {
        margin: 0;
        font-size: 1.2rem;
    }

    .server-view-sidebar .sidebar-footer-links {
        padding: 16px 10px;
        align-items: center;
    }

    .server-view-sidebar .sidebar-footer-links a {
        font-size: 0 !important;
        /* Hide text nodes */
        justify-content: center;
        padding: 10px 0;
    }

    .server-view-sidebar .sidebar-footer-links a i {
        margin: 0;
        font-size: 1.2rem;
    }

    .server-view-sidebar .sidebar-user-profile {
        padding: 16px 10px;
        justify-content: center;
    }

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

    .server-grid-wrapper {
        padding: 16px;
    }

    .server-card {
        padding: 18px 12px;
    }
}

/* --- Responsive: Dashboard Sidebar Drawer (mobile) --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .dashboard-sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        overflow-y: auto;
    }

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

    .dashboard-main-content {
        margin-left: 0;
        padding: 70px 14px 100px 14px;
        max-width: 100%;
    }

    /* Section page headers — smaller on mobile */
    .section-page-header h2 {
        font-size: 1.3rem;
    }

    .section-page-header p {
        font-size: 0.82rem;
    }

    /* Cards — compact padding on mobile */
    .settings-card {
        padding: 18px 14px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    /* Section titles — slightly smaller */
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    /* Labels — better readability on mobile */
    label {
        font-size: 0.82rem;
        margin: 12px 0 4px;
    }

    /* Grids → single column */
    .input-grid,
    .cat-input-grid,
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    /* Mod log separate box grid → single column */
    #mod_log_separate_box>div {
        grid-template-columns: 1fr !important;
    }

    /* Music checkbox grid → single column */
    .music-checkbox-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    /* Touch targets — minimum 44px for interactive elements */
    .input-modern {
        min-height: 44px;
        padding: 10px 14px;
    }

    textarea.input-modern {
        min-height: 80px;
    }

    .switch-wrapper {
        padding: 12px 14px;
        min-height: 48px;
    }

    .modern-switch {
        width: 48px;
        height: 26px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
    }

    .modern-switch input:checked+.slider:before {
        transform: translateX(22px);
    }

    /* Role items — better mobile layout */
    .team-role-item {
        padding: 12px 14px;
        gap: 10px;
        align-items: center;
    }

    .role-controls button {
        padding: 6px 12px;
        min-height: 36px;
    }

    /* Collapsible headers — touch friendly */
    .collapsible-header {
        padding: 12px 14px;
        min-height: 48px;
    }

    /* Custom dropdown — larger tap areas */
    .custom-select-trigger {
        min-height: 44px;
        padding: 10px 14px;
    }

    .custom-option {
        padding: 12px 15px;
        min-height: 44px;
    }

    .custom-options {
        max-height: 280px;
    }

    /* Info/command boxes — compact */
    .settings-card [style*="border-left: 3px"] {
        padding: 10px 12px !important;
    }

    .settings-card [style*="border-left: 3px"] p {
        font-size: 12px !important;
    }

    /* Add-role boxes */
    .add-role-box {
        flex-direction: column;
    }

    /* btn-icon full width */
    .btn-icon {
        width: 100%;
        padding: 12px;
        text-align: center;
    }

    /* Cat input grid add button */
    .cat-input-grid .btn-icon {
        min-height: 44px;
    }

    /* Fixed save button at bottom (only on mobile) */
    .action-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 10px 14px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: rgba(14, 14, 18, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border-color);
        z-index: 60;
    }

    .dashboard-main-content {
        padding-bottom: 90px;
        /* prevent content from hiding under fixed save button */
    }

    .action-footer .btn-primary {
        font-size: 0.9rem;
        padding: 12px 20px;
    }

    .action-footer .status-msg {
        font-size: 0.82rem;
        padding: 10px;
        margin-top: 10px;
    }

    /* Ticket category items — better stacking */
    .ticket-category-item {
        gap: 8px !important;
        padding: 12px 10px !important;
    }

    .ticket-category-item>div:first-child {
        flex-wrap: wrap;
    }

    /* Log webhook items */
    .team-role-item[style*="max-width: 75%"] {
        max-width: 100% !important;
    }

    /* Feedback categories */
    #feedback_categories_list>div {
        padding: 8px !important;
    }
}

/* --- Security Redirect Card & Animations --- */
.security-redirect-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.security-redirect-card:hover {
    transform: translateY(-5px);
    border-color: rgba(235, 69, 95, 0.4) !important;
    background: rgba(235, 69, 95, 0.06) !important;
    box-shadow: 0 10px 30px rgba(235, 69, 95, 0.15) !important;
}

.security-icon-wrapper {
    position: relative;
    animation: shieldPulse 3s infinite ease-in-out;
}

.btn-security-redirect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-security-redirect:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(235, 69, 95, 0.6) !important;
}

@keyframes shieldPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(235, 69, 95, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(235, 69, 95, 0);
    }
}

/* Hide save button dynamically when the security settings section is active */
.settings-section[data-category="security"]:not([style*="display: none"]):not([style*="display:none"])~#action_footer {
    display: none !important;
}

/* ===== SELF-ROLE REVAMP — DISCORD-LIKE CATEGORY CARDS ===== */

@keyframes srCardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.sr-category-card {
    border-radius: 12px;
    overflow: hidden;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.sr-category-card:hover {
    border-color: rgba(235, 69, 95, 0.35);
    box-shadow: 0 6px 28px rgba(235, 69, 95, 0.12);
}

/* --- Card Header --- */
.sr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: rgba(0, 0, 0, 0.28);
    border-left: 4px solid #eb455f;
    gap: 10px;
    min-height: 52px;
}

.sr-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    overflow: hidden;
}

.sr-card-cat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.sr-card-cat-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #f2f3f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-card-cat-emoji-badge {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sr-card-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.sr-edit-btn {
    padding: 5px 13px;
    font-size: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #dbdee1;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.sr-edit-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

.sr-edit-btn.active {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--accent-cyan);
}

/* --- Banner image inside card --- */
.sr-card-banner {
    width: 100%;
    max-height: 110px;
    object-fit: cover;
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* --- Body / description --- */
.sr-card-body {
    padding: 10px 18px 0 18px;
}

.sr-card-desc-text {
    font-size: 0.84rem;
    color: #b5bac1;
    line-height: 1.55;
    padding-left: 4px;
}

/* --- Role pills row --- */
.sr-card-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px 18px 14px 18px;
    min-height: 44px;
}

.sr-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.78rem;
    color: #dbdee1;
    cursor: default;
    transition: background 0.2s, border-color 0.2s;
}

.sr-role-pill:hover {
    background: rgba(235, 69, 95, 0.18);
    border-color: rgba(235, 69, 95, 0.45);
    color: #fff;
}

.sr-exclusive-badge {
    font-size: 0.62rem;
    padding: 1px 6px;
    background: rgba(235, 69, 95, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(235, 69, 95, 0.3);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-left: 4px;
}

.sr-mode-indicator {
    font-size: 0.7rem;
    color: #80848e;
}

/* --- Collapsible edit panel --- */
.sr-card-edit-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 16px;
    background: rgba(0, 0, 0, 0.22);
    display: none;
}

.sr-card-edit-panel.open {
    display: block;
    animation: fadeIn 0.2s ease;
}

.sr-edit-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #80848e;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 5px;
}

.sr-edit-fields-grid {
    display: grid;
    grid-template-columns: 68px 1fr auto;
    gap: 9px;
    margin-bottom: 12px;
    align-items: end;
}

.sr-roles-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #e06c75;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sr-role-edit-item {
    display: flex;
    gap: 7px;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: border-color 0.2s;
}

.sr-role-edit-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.sr-role-edit-item.animate-new-role {
    animation: srRoleSlideDown 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
}

@keyframes srRoleSlideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: 0;
        border-color: transparent;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 400px;
        /* room for multi-line / stacked mobile rows */
        padding-top: 8px;
        padding-bottom: 8px;
        margin-bottom: 6px;
    }
}

.sr-drag-grip {
    cursor: grab;
    opacity: 0.35;
    padding: 0 3px;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.sr-drag-grip:hover {
    opacity: 0.75;
}

.sr-add-role-btn {
    margin-top: 6px;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.07);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--accent-cyan);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sr-add-role-btn:hover {
    background: rgba(0, 229, 255, 0.14);
    border-color: rgba(0, 229, 255, 0.35);
}

/* --- Add-category inline form --- */
.sr-add-cat-form {
    background: rgba(0, 229, 255, 0.03);
    border: 1px dashed rgba(0, 229, 255, 0.18);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.sr-add-cat-grid {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 9px;
    margin-bottom: 10px;
}

/* --- Empty state --- */
.sr-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #80848e;
    font-size: 0.88rem;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

/* ===== SELF-ROLE LIVE PREVIEW — DISCORD EMBED MOCK ===== */

.sr-preview-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.sr-preview-card-header h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f2f3f5;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.sr-preview-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    padding: 2px 7px;
    background: rgba(59, 165, 93, 0.15);
    color: #3ba55d;
    border: 1px solid rgba(59, 165, 93, 0.3);
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sr-preview-live-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #3ba55d;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ─── Discord-like channel wrapper ─── */
.sr-preview-wrapper {
    background: #313338;
    border-radius: 10px;
    padding: 20px 20px 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
}

.dc-msg-row {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.dc-bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865f2 0%, #7c5bff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 1px;
    user-select: none;
}

.dc-msg-content {
    flex: 1;
    min-width: 0;
}

.dc-msg-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.dc-bot-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f2f3f5;
    line-height: 1;
}

.dc-bot-tag {
    background: #5865f2;
    color: #fff;
    font-size: 0.58rem;
    padding: 1px 4px 1px 4px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
    line-height: 1.4;
}

.dc-msg-time {
    font-size: 0.71rem;
    color: #4e5058;
    font-weight: 400;
}

/* ─── Discord embed ─── */
.dc-embed {
    display: flex;
    flex-wrap: wrap;
    background: #2b2d31;
    border-radius: 4px;
    max-width: 520px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: srCardIn 0.25s ease;
}

.dc-embed>.dc-embed-accent {
    align-self: stretch;
}

.dc-embed>.dc-embed-inner {
    flex: 1;
    min-width: 0;
}

.dc-embed>.dc-embed-image-wrap {
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
    padding: 0 0 0 4px;
    /* align under content, next to accent */
    box-sizing: border-box;
}

.dc-embed-accent {
    width: 4px;
    flex-shrink: 0;
    background: #5865f2;
    min-height: 36px;
}

.dc-embed-inner {
    display: flex;
    width: 100%;
    min-width: 0;
}

.dc-embed-body {
    padding: 10px 14px 10px 12px;
    flex: 1;
    min-width: 0;
}

.dc-embed-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #f2f3f5;
    margin-bottom: 7px;
    line-height: 1.3;
}

.dc-embed-title strong {
    color: inherit;
}

.dc-embed-desc {
    font-size: 0.84rem;
    color: #dbdee1;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dc-embed-desc strong {
    color: #f2f3f5;
    font-weight: 700;
}

.dc-embed-desc em {
    font-style: italic;
}

.dc-embed-desc code {
    background: rgba(0, 0, 0, 0.35);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.82em;
    font-family: 'Consolas', monospace;
}

/* Embed author (Card / Compact styles) */
.dc-embed-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #f2f3f5;
}

.dc-embed-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Embed fields grid (Clean / Card styles) */
.dc-embed-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-top: 10px;
}

.dc-embed-fields.dc-fields-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.dc-embed-field-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b5bac1;
    margin-bottom: 2px;
    text-transform: none;
}

.dc-embed-field-value {
    font-size: 0.82rem;
    color: #dbdee1;
    line-height: 1.4;
    word-break: break-word;
}

.dc-embed-field-value strong {
    color: #f2f3f5;
    font-weight: 600;
}

.dc-embed-field-value code {
    background: rgba(0, 0, 0, 0.35);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: 'Consolas', monospace;
}

/* Join/Leave: gleiche 2-Spalten-Layout-Logik wie Verify (Config | sticky Preview) */
.joinleave-panel-layout {
    margin-top: 8px;
}

.joinleave-panel-layout .verify-config-main {
    min-width: 0;
}

.joinleave-panel-layout .ticket-style-options {
    grid-template-columns: 1fr;
}

@media (min-width: 520px) {
    .joinleave-panel-layout .ticket-style-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.joinleave-preview-block {
    margin-top: 16px;
    max-width: 640px;
}

/* Welcome / Goodbye custom banner uploader */
.embed-banner-uploader {
    margin-top: 4px;
}

.embed-banner-drop {
    padding: 18px 14px;
}

.embed-banner-drop i {
    font-size: 1.6rem;
}

.embed-banner-current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.embed-banner-thumb {
    width: 96px;
    height: 54px;
    max-width: 96px;
    max-height: 54px;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.embed-banner-current-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.embed-banner-name {
    font-size: 0.82rem;
    color: #dbdee1;
    word-break: break-all;
}

.embed-banner-remove {
    font-size: 0.8rem;
    padding: 4px 10px;
}

.embed-banner-size-wrap {
    margin-top: 12px;
}

.embed-banner-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 0.3s ease;
    border-radius: 3px;
}

.dc-embed-image.joinleave-custom-banner,
.verify-preview-compact .dc-embed-image.joinleave-custom-banner {
    width: 100%;
    max-height: none;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .embed-banner-current {
        flex-direction: column;
        align-items: stretch;
    }

    .embed-banner-thumb {
        width: 100%;
        height: 80px;
    }
}

/* Welcome Link-Button Editor */
.welcome-buttons-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-btn-row {
    display: grid;
    grid-template-columns: 56px 1fr 1.4fr auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.welcome-btn-row .input-modern {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.welcome-btn-row .welcome-btn-emoji {
    text-align: center;
    font-size: 1.1rem;
}

.welcome-btn-remove {
    background: rgba(237, 66, 69, 0.12);
    border: 1px solid rgba(237, 66, 69, 0.35);
    color: #ed4245;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.welcome-btn-remove:hover {
    background: rgba(237, 66, 69, 0.25);
}

@media (max-width: 700px) {
    .welcome-btn-row {
        grid-template-columns: 1fr 1fr auto;
        grid-template-areas:
            "emoji label remove"
            "url url url";
    }

    .welcome-btn-row .welcome-btn-emoji {
        grid-area: emoji;
    }

    .welcome-btn-row .welcome-btn-label {
        grid-area: label;
    }

    .welcome-btn-row .welcome-btn-url {
        grid-area: url;
    }

    .welcome-btn-row .welcome-btn-remove {
        grid-area: remove;
        justify-self: end;
    }
}

@media (max-width: 600px) {

    .dc-embed-fields,
    .dc-embed-fields.dc-fields-3 {
        grid-template-columns: 1fr;
    }
}

.dc-blockquote {
    border-left: 3px solid rgba(255, 255, 255, 0.22);
    padding-left: 9px;
    margin: 1px 0;
    color: #dbdee1;
    line-height: 1.4;
}

.dc-blockquote strong {
    color: #f2f3f5;
    font-weight: 600;
}

.dc-blockquote code {
    background: rgba(0, 0, 0, 0.35);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: 'Consolas', monospace;
    color: #dbdee1;
}

.dc-blockquote-gap {
    border-left-color: transparent;
    min-height: 0.45em;
    color: transparent;
    padding-left: 9px;
}

/* Blockquotes inside embed fields (clean style) */
.dc-embed-field-value .dc-blockquote {
    font-size: inherit;
}

.dc-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 7px 0;
}

/* ========== Ticket Kategorien-Layout Auswahl ========== */
.ticket-style-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 4px;
}

@media (max-width: 800px) {
    .ticket-style-options {
        grid-template-columns: 1fr;
    }
}

.ticket-style-card {
    display: block;
    cursor: pointer;
    margin: 0;
}

.ticket-style-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ticket-style-card-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    min-height: 100%;
    box-sizing: border-box;
}

.ticket-style-card:hover .ticket-style-card-inner {
    border-color: rgba(88, 101, 242, 0.35);
    background: rgba(88, 101, 242, 0.06);
}

.ticket-style-card input:checked+.ticket-style-card-inner {
    border-color: rgba(88, 101, 242, 0.65);
    background: rgba(88, 101, 242, 0.12);
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.25);
}

.ticket-style-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f2f3f5;
}

.ticket-style-desc {
    font-size: 0.75rem;
    color: #949ba4;
    line-height: 1.35;
}

/* ========== V2 TICKET-KATEGORIEN (mock) — Layout-Varianten ========== */
.dc-cat-section {
    margin: 8px 0 2px 0;
    display: block;
}

.dc-cat-section+.dc-cat-section {
    margin-top: 10px;
}

.dc-cat-header {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #f2f3f5;
    display: block;
    margin: 0;
    line-height: 1.35;
}

.dc-cat-header .dc-cat-emoji {
    margin-right: 6px;
}

.dc-cat-desc {
    margin: 2px 0 0 0;
    padding: 1px 0 1px 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    border-radius: 0;
    font-size: 0.82rem;
    color: #b5bac1;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Superkompakt: nur Name-Zeilen */
.dc-cat-section.dc-cat-style-ultra {
    margin: 2px 0;
}

.dc-cat-section.dc-cat-style-ultra+.dc-cat-section.dc-cat-style-ultra {
    margin-top: 3px;
}

.dc-cat-section.dc-cat-style-ultra .dc-cat-header {
    font-size: 0.84rem;
    font-weight: 600;
}

/* Kompakt: etwas enger, Beschreibung ohne dicke Quote-Optik */
.dc-cat-section.dc-cat-style-compact {
    margin: 5px 0 2px 0;
}

.dc-cat-section.dc-cat-style-compact+.dc-cat-section.dc-cat-style-compact {
    margin-top: 6px;
}

.dc-cat-section.dc-cat-style-compact .dc-cat-header {
    font-size: 0.86rem;
}

.dc-cat-section.dc-cat-style-compact .dc-cat-desc {
    padding-left: 0;
    border-left: none;
    margin-top: 1px;
    font-size: 0.78rem;
    color: #a3a6aa;
}

.dc-cat-btn-row {
    margin-top: 8px;
}

/* ========== VERIFY DASHBOARD: config + compact live preview ========== */
.verify-panel-layout {
    display: grid;
    grid-template-columns: 1fr minmax(340px, 440px);
    gap: 20px;
    align-items: start;
}

@media (max-width: 960px) {
    .verify-panel-layout {
        grid-template-columns: 1fr;
    }

    .verify-preview-side {
        position: static;
        max-width: 620px;
    }
}

.verify-preview-side {
    position: sticky;
    top: 12px;
    min-width: 0;
}

.verify-preview-compact {
    padding: 18px 18px 14px !important;
    font-size: 15px !important;
}

.verify-preview-compact .dc-bot-avatar {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
}

.verify-preview-compact .dc-msg-header {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.verify-preview-compact .dc-embed-title {
    font-size: 1.02rem;
    margin-bottom: 8px;
}

.verify-preview-compact .dc-embed-desc {
    font-size: 0.9rem;
    line-height: 1.5;
}

.verify-preview-compact .dc-embed-body {
    padding: 12px 14px 12px 14px;
}

.verify-preview-compact .dc-embed-thumb {
    width: 80px;
    height: 80px;
    margin: 8px 10px 8px 0;
}

.verify-preview-compact .dc-embed-image {
    max-height: 150px;
}

.verify-preview-compact .dc-interactions {
    margin-top: 12px;
}

.verify-preview-compact .dc-btn-mock {
    font-size: 0.85rem;
    padding: 7px 14px;
}

/* ========== V2 VERIFY-PANEL (mock) ========== */
/* Community Premium: ruhige Sections statt lauter Hero-Boxen */
.dc-verify-hero {
    margin: 2px 0 6px 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f2f3f5;
    line-height: 1.35;
}

.dc-verify-steps {
    margin: 4px 0 6px 0;
    padding: 2px 0 2px 10px;
    background: transparent;
    border: none;
    border-left: 3px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    font-size: 0.82rem;
    color: #b5bac1;
    line-height: 1.45;
}

.dc-verify-steps strong {
    color: #f2f3f5;
}

.dc-role-mention {
    background: rgba(88, 101, 242, 0.18);
    color: #959ef1;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.88em;
    cursor: default;
}

.dc-embed-image-wrap {
    margin-top: 10px;
    display: none;
}

.dc-embed-image-wrap.visible {
    display: block;
}

.dc-embed-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 3px;
}

.dc-embed-footer {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.71rem;
    color: #87898c;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dc-embed-thumb {
    flex-shrink: 0;
    width: 78px;
    height: 78px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin: 8px 8px 8px 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: #4e5058;
    font-size: 0.64rem;
    gap: 3px;
}

.dc-embed-thumb.visible {
    display: flex;
}

.dc-embed-thumb i {
    font-size: 1.2rem;
    opacity: 0.4;
}

/* ─── Interaction areas ─── */
.dc-interactions {
    margin-top: 5px;
}

.dc-reaction-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dc-reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.82rem;
    color: #dbdee1;
    cursor: default;
}

.dc-reaction-count {
    font-size: 0.7rem;
    color: #80848e;
}

.dc-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dc-button {
    padding: 5px 14px;
    background: #4e5058;
    border: none;
    border-radius: 4px;
    color: #dbdee1;
    font-size: 0.84rem;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    font-family: inherit;
}

.dc-select-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 480px;
}

.dc-select-mock {
    background: #1e1f22;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #b5bac1;
    font-size: 0.84rem;
    cursor: default;
}

/* ─── Discord Button-Farb-Varianten (Ticket Panel) ─── */
.dc-button.dc-button-primary {
    background: #5865f2;
    color: #ffffff;
}

.dc-button.dc-button-secondary {
    background: #4e5058;
    color: #ffffff;
}

.dc-button.dc-button-success {
    background: #248046;
    color: #ffffff;
}

.dc-button.dc-button-danger {
    background: #da373c;
    color: #ffffff;
}

.ticket-style-options-colors {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 800px) {
    .ticket-style-options-colors {
        grid-template-columns: 1fr 1fr;
    }
}

.ticket-btn-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ticket-btn-swatch-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.ticket-btn-swatch-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ticket-btn-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    border: 2px solid transparent;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ticket-btn-swatch-default {
    background: #2b2d31;
    color: #b5bac1;
    border-color: rgba(255, 255, 255, 0.12);
}

.ticket-btn-swatch-grey { background: #4e5058; width: 32px; min-width: 32px; padding: 0; }
.ticket-btn-swatch-blue { background: #5865f2; width: 32px; min-width: 32px; padding: 0; }
.ticket-btn-swatch-green { background: #248046; width: 32px; min-width: 32px; padding: 0; }
.ticket-btn-swatch-red { background: #da373c; width: 32px; min-width: 32px; padding: 0; }

.ticket-btn-swatch-label:hover .ticket-btn-swatch {
    transform: translateY(-1px);
}

.ticket-btn-swatch-label input:checked + .ticket-btn-swatch {
    box-shadow: 0 0 0 2px #111214, 0 0 0 4px #5865f2;
    border-color: #5865f2;
}

.ticket-btn-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ticket-btn-dot-grey { background: #4e5058; }
.ticket-btn-dot-blue { background: #5865f2; }
.ticket-btn-dot-green { background: #248046; }
.ticket-btn-dot-red { background: #da373c; }

a.dc-button.dc-button-link,
.dc-button.dc-button-link {
    background: transparent;
    color: #00a8fc;
    text-decoration: none;
    pointer-events: auto;
}

/* ─── Components V2 Container Mock (Ticket Panel Layout "Components V2") ─── */
.dc-container {
    position: relative;
    background: #2b2d31;
    border-radius: 8px;
    overflow: hidden;
    max-width: 520px;
    margin-top: 4px;
}

.dc-container-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #57f287;
}

.dc-container-inner {
    padding: 14px 16px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dc-v2-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f2f3f5;
    line-height: 1.3;
}

.dc-v2-h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #f2f3f5;
    line-height: 1.3;
    margin: 2px 0;
}

.dc-v2-desc {
    color: #dbdee1;
    font-size: 0.86rem;
    line-height: 1.45;
    flex: 1;
    min-width: 0;
}

.dc-v2-thumb-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dc-v2-thumb {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.dc-v2-banner {
    border-radius: 6px;
    overflow: hidden;
    max-height: 200px;
}

.dc-v2-banner img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.dc-v2-subtext {
    color: #949ba4;
    font-size: 0.76rem;
    line-height: 1.4;
}

/* ─── Preview placeholder when empty ─── */
.sr-preview-placeholder {
    text-align: center;
    padding: 36px 20px;
    color: #4e5058;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}

/* Sidebar Resize Handle */
.sidebar-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    z-index: 100;
    background: transparent;
    transition: background-color 0.2s;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.resizing {
    background-color: var(--accent-cyan);
}

body.resizing-sidebar {
    user-select: none;
    cursor: ew-resize;
}

/* ===== CUSTOM SCROLLBAR (Global) ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ===== ENHANCED SETTINGS CARD HOVER ===== */
.settings-card {
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    scroll-margin-top: 90px;
    /* leave room under the topbar/sidebar when scrolled to by search */
}

.settings-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

/* ===== SYSTEM SEARCH HIGHLIGHT ===== */
/* Brief cyan glow applied by navigateToSystem() when jumping to a card. */
@keyframes searchHighlightPulse {
    0% {
        border-color: rgba(0, 229, 255, 0.75);
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.55), 0 12px 40px rgba(0, 0, 0, 0.25);
    }

    60% {
        border-color: rgba(0, 229, 255, 0.45);
        box-shadow: 0 0 24px 4px rgba(0, 229, 255, 0.25), 0 12px 40px rgba(0, 0, 0, 0.25);
    }

    100% {
        border-color: var(--card-border, rgba(255, 255, 255, 0.06));
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
}

.settings-card.search-highlight {
    animation: searchHighlightPulse 1.5s ease-out;
    border-color: rgba(0, 229, 255, 0.75);
}

/* ===== SIDEBAR HOVER POLISH ===== */
.sidebar-cat-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-cat-item:hover {
    transform: translateX(3px);
}

.sidebar-cat-item.active {
    transform: translateX(0);
}

/* ===== SECTION FADE-IN ANIMATION ===== */
.settings-section {
    animation: sectionSlideIn 0.35s ease;
}

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

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

/* ===== BUTTON PRESS EFFECTS ===== */
.save-button:active,
.btn-primary:active {
    transform: scale(0.97);
}

/* ===== SWITCH TRANSITION POLISH ===== */
.modern-switch .slider {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-switch .slider::before {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

/* ===== INPUT FOCUS GLOW ===== */
.input-modern:focus,
textarea.input-modern:focus {
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08);
}

/* ===== SERVER CARD HOVER (Server Select) ===== */
.server-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ===== COLLAPSIBLE CARD ANIMATION ===== */
.collapsible-content {
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* ===== SIDEBAR FOOTER LINKS ===== */
.sidebar-footer-links a {
    transition: all 0.2s ease;
}

.sidebar-footer-links a:hover {
    transform: translateX(3px);
}

/* ===========================================================
   WARTERAUM AUDIO PLAYER + CUSTOM SONGS UI
   =========================================================== */

/* ----- Player bar ----- */
.music-player-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.04), rgba(157, 0, 255, 0.04));
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.player-now-playing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 0;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
}

.player-now-playing i.fa-music {
    color: var(--accent-cyan);
    font-size: 1rem;
    flex-shrink: 0;
}

#player_song_name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
}

.player-source-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    flex-shrink: 0;
}

.player-source-badge.custom {
    background: rgba(157, 0, 255, 0.15);
    color: var(--accent-purple);
}

.player-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.player-controls button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.player-controls button:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: scale(1.05);
}

#player_btn_play {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
}

#player_btn_play:hover {
    background: linear-gradient(135deg, #00f0ff, #b300ff);
    color: #fff;
    transform: scale(1.08);
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 2 1 280px;
    min-width: 200px;
}

.player-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
}

#player_seek {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

#player_seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

#player_seek::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--text-muted);
}

#player_volume {
    width: 90px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

#player_volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
}

#player_volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
}

/* ----- Custom songs list ----- */
.custom-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 8px;
    color: var(--accent-cyan);
    font-size: 0.82rem;
    font-weight: 700;
}

.custom-songs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.custom-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.custom-song-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(157, 0, 255, 0.3);
    transform: translateY(-1px);
}

.custom-song-select {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-song-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-cyan);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-song-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(157, 0, 255, 0.15);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.custom-song-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-song-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-song-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.custom-song-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.custom-song-actions button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.custom-song-actions button:hover {
    background: rgba(0, 229, 255, 0.12);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.custom-song-actions button.btn-danger-action:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.custom-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* ----- Upload drop zone ----- */
.upload-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.05);
    transform: translateY(-1px);
}

.upload-drop-zone i {
    font-size: 2.2rem;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.upload-drop-text {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.upload-drop-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.upload-progress {
    margin-top: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

#upload_progress_fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 0.3s ease;
    border-radius: 3px;
}

#upload_progress_text {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.upload-error-box,
.upload-success-box {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    animation: fadeIn 0.25s ease;
}

.upload-error-box {
    background: rgba(255, 71, 87, 0.1);
    border-left: 3px solid var(--danger);
    color: #ff8a96;
}

.upload-success-box {
    background: rgba(46, 213, 115, 0.1);
    border-left: 3px solid var(--success);
    color: #5fe6a0;
}

/* ----- Edit song modal ----- */
.edit-song-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.edit-song-modal-card {
    background: rgba(20, 20, 30, 0.96);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.1);
    animation: scaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.edit-song-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.edit-song-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-song-modal-header h3 i {
    color: var(--accent-cyan);
}

#edit_song_name_display {
    color: var(--accent-cyan);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
}

.edit-song-modal-body {
    padding: 22px 24px;
}

.edit-song-info {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.edit-info-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: var(--text-muted);
}

.waveform-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.waveform-container {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px;
}

.waveform-overlay-labels {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 14px;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.dual-slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.dual-slider-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(157, 0, 255, 0.25);
    pointer-events: none;
    border-radius: 10px;
}

.dual-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    outline: none;
}

.dual-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 6px;
    height: 100px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--accent-cyan);
    border-radius: 3px;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    position: relative;
    top: 8px;
    /* Match waveform padding */
}

.dual-slider::-moz-range-thumb {
    pointer-events: auto;
    width: 6px;
    height: 100px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--accent-cyan);
    border-radius: 3px;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.input-with-suffix {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding-right: 12px;
}

.input-with-suffix .input-modern {
    border: none;
    background: transparent;
    padding: 10px 12px;
    width: 100%;
}

.input-with-suffix .input-modern:focus {
    box-shadow: none;
}

.edit-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
}

@media (max-width: 600px) {
    .edit-controls-grid {
        grid-template-columns: 1fr;
    }
}

.edit-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-control.full-width {
    grid-column: 1 / -1;
}

.edit-control label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edit-control label i {
    color: var(--accent-cyan);
}

.slider-with-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-with-value input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

.slider-with-value input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.slider-with-value input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.slider-with-value>span {
    font-size: 0.82rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
    min-width: 56px;
    text-align: right;
}

.edit-preview-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.edit-preview-buttons button {
    flex: 1;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.edit-song-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    animation: fadeIn 0.2s ease;
}

.edit-song-status.success {
    background: rgba(46, 213, 115, 0.1);
    border-left: 3px solid var(--success);
    color: #5fe6a0;
}

.edit-song-status.error {
    background: rgba(255, 71, 87, 0.1);
    border-left: 3px solid var(--danger);
    color: #ff8a96;
}

/* ----- Standard song checkbox + play button ----- */
.music-checkbox-item .song-play-btn {
    margin-left: auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: var(--accent-cyan);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.music-checkbox-item .song-play-btn:hover {
    background: var(--accent-cyan);
    color: #000;
    transform: scale(1.1);
}

/* ----- Mobile tweaks for music UI ----- */
@media (max-width: 768px) {
    .music-player-bar {
        padding: 10px 12px;
        gap: 10px;
    }

    .player-progress {
        flex-basis: 100%;
    }

    .player-volume {
        flex-basis: 100%;
        justify-content: center;
    }

    .player-now-playing {
        flex-basis: 100%;
        justify-content: center;
    }

    .custom-song-actions button {
        width: 36px;
        height: 36px;
    }

    .edit-song-modal-card {
        max-width: 100%;
        max-height: 95vh;
    }

    .edit-song-modal-header h3 {
        font-size: 0.95rem;
    }

    .edit-song-modal-header h3 span {
        max-width: 200px;
    }

    .edit-preview-buttons button {
        min-width: 100%;
    }
}

/* ----- 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;
    }
}

/* ===========================================================
   FLOATING SAVE CHANGES BAR
   =========================================================== */
.save-changes-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 14px 28px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(157, 0, 255, 0.15);
    z-index: 9999;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    width: max-content;
    max-width: 90%;
}

.save-changes-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.save-changes-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.save-changes-bar-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

.save-changes-text {
    color: #dbdee1;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.save-changes-text i {
    color: #f0c040;
    font-size: 1.1rem;
}

.btn-save-large {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 28px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.25) !important;
    font-family: inherit;
    white-space: nowrap;
}

.btn-save-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.45) !important;
    background: linear-gradient(135deg, #00f0ff, #b300ff) !important;
}

.btn-save-large:active {
    transform: translateY(0);
}

/* --- Ticket Category Expanded Settings --- */
.expanded-settings {
    margin-top: 10px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    animation: slideDown 0.3s ease-out forwards;
    width: 100%;
    box-sizing: border-box;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.role-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    min-height: 40px;
}

.ticket-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    width: max-content;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(165, 180, 252, 0.35);
}

.ticket-form-editor {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ticket-form-editor-head {
    margin-bottom: 8px;
}

.ticket-form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #dbdee1;
    cursor: pointer;
}

.ticket-form-check-lg {
    font-weight: 600;
    color: #e8eaed;
}

.ticket-form-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.ticket-form-mini-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
    color: var(--accent-cyan);
    text-transform: uppercase;
    margin-top: 12px;
}

.ticket-form-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    align-items: end;
    margin-top: 8px;
}

.ticket-form-q-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.ticket-form-q-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ticket-form-q-actions .btn-icon,
.ticket-form-q-actions .btn-danger {
    min-width: 44px;
    min-height: 36px;
}

.ticket-form-q {
    margin-top: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.ticket-form-q-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ticket-form-q-num {
    font-size: 12px;
    font-weight: 700;
    color: #c7d2fe;
}

.ticket-form-empty {
    color: #949ba4;
    font-size: 13px;
    font-style: italic;
    padding: 8px 0;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(179, 0, 255, 0.15));
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.role-pill button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.role-pill button:hover {
    color: #ff4757;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}
/* ===== QUICK NAV � floating system dock (desktop, bottom right) ===== */
.quicknav {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.quicknav.hidden {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
    visibility: hidden;
}

.quicknav-chips {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(14, 14, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateY(10px) scale(0.92);
    transform-origin: bottom right;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.22s;
}

.quicknav.open .quicknav-chips {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.quicknav-chip {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: quicknavPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.quicknav-chip:hover {
    color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 229, 255, 0.25);
}

/* Pop-in finished -> static state (enables hover/active transforms) */
.quicknav-chip.qnav-ready {
    animation: none;
}

.quicknav-chip.active {
    color: var(--accent-cyan);
    border-color: rgba(0, 229, 255, 0.55);
    background: rgba(0, 229, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12), 0 6px 20px rgba(0, 229, 255, 0.2);
}

.quicknav-chip.just-clicked {
    animation: quicknavChipPulse 0.5s ease;
}

.quicknav-chip:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Tooltip */
.quicknav-chip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 4px);
    padding: 5px 10px;
    border-radius: 7px;
    background: rgba(14, 14, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
}

.quicknav-chip:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* FAB */
.quicknav-fab {
    pointer-events: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(20, 20, 30, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, border-color 0.25s;
}

.quicknav-fab i {
    font-size: 1.15rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quicknav.open .quicknav-fab i {
    transform: rotate(90deg);
}

.quicknav-fab:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: 0 10px 32px rgba(0, 229, 255, 0.3);
}

.quicknav-fab:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

@keyframes quicknavPopIn {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(10px);
    }

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

@keyframes quicknavChipPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.55);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(0, 229, 255, 0);
    }
}

/* Mobile positioning lives in mobile.css (floats above the bottom chrome) */

/* ==========================================================================
   CATEGORY: EXTRAS � System-Bl�cke (Gradient-Borders, Akzente, Glass)
   Scoped auf die Extras-Kategorie; alle IDs/Handler bleiben unangetastet.
   ========================================================================== */
.settings-section[data-category="extras"] {
    position: relative;
    isolation: isolate;
}

/* --- Ambienter Hintergrund-Glow hinter der ganzen Kategorie --- */
.settings-section[data-category="extras"]::before {
    content: "";
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    height: 420px;
    background:
        radial-gradient(620px 260px at 14% 0%, rgba(0, 229, 255, 0.09), transparent 68%),
        radial-gradient(520px 240px at 88% 6%, rgba(157, 0, 255, 0.08), transparent 68%);
    pointer-events: none;
    z-index: -1;
}

/* --- Hero-Header: Titel im Kategorie-Verlauf + Feature-Pill --- */
.settings-section[data-category="extras"] .section-page-header h2 {
    background: linear-gradient(92deg, #ffffff 0%, var(--accent-cyan) 42%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 14px rgba(0, 229, 255, 0.18));
}

.extras-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    color: #bfeaff;
    background:
        linear-gradient(rgba(12, 16, 26, 0.88), rgba(12, 16, 26, 0.88)) padding-box,
        linear-gradient(135deg, rgba(0, 229, 255, 0.55), rgba(157, 0, 255, 0.55)) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.14);
}

/* ==========================================================================
   System-Container � das Herzst�ck: jedes System als eigener Block
   ========================================================================== */
.extras-system {
    --sys-accent: #00e5ff;
    --sys-accent-2: #4f8bff;
    --sys-rgb: 0, 229, 255;
    --sys-rgb2: 79, 139, 255;
    --sys-glow: rgba(0, 229, 255, 0.28);

    position: relative;
    z-index: 1;
    margin: 0 0 40px 0;
    padding: 30px 30px 28px 30px;
    border-radius: 20px;
    scroll-margin-top: 90px;

    /* Fallback (ohne Gradient-Border-Support) */
    background: rgba(11, 12, 18, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.08);

    /* Gradient-Border via double-background-Trick */
    background:
        linear-gradient(rgba(11, 12, 18, 0.72), rgba(11, 12, 18, 0.72)) padding-box,
        linear-gradient(180deg,
            rgba(var(--sys-rgb), 0.5) 0%,
            rgba(var(--sys-rgb), 0.12) 18%,
            rgba(255, 255, 255, 0.05) 55%,
            rgba(var(--sys-rgb2), 0.12) 92%,
            rgba(var(--sys-rgb2), 0.4) 100%) border-box;
    border-color: transparent;

    backdrop-filter: blur(16px) saturate(1.25);
    -webkit-backdrop-filter: blur(16px) saturate(1.25);
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;

    animation: extrasSystemIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.extras-system:nth-of-type(2) { animation-delay: 0.08s; }
.extras-system:nth-of-type(3) { animation-delay: 0.16s; }

.extras-system:hover {
    transform: translateY(-3px);
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(var(--sys-rgb), 0.14),
        0 6px 40px var(--sys-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Leuchtende Akzentlinie oben am System-Block */
.extras-system::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 28px;
    right: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sys-accent), var(--sys-accent-2));
    box-shadow: 0 0 14px var(--sys-glow);
    transform-origin: left;
    transform: scaleX(0.35);
    opacity: 0.8;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.extras-system:hover::before {
    transform: scaleX(1);
    opacity: 1;
}

/* System-Header */
.extras-system-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
    padding: 0 68px 20px 0;
}

/* Ausblendende Trennlinie (mask-image) */
.extras-system-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
            rgba(var(--sys-rgb), 0.5) 0%,
            rgba(var(--sys-rgb), 0.15) 40%,
            rgba(255, 255, 255, 0.04) 85%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 92%);
    mask-image: linear-gradient(90deg, #000 0%, transparent 92%);
}

/* Icon-Chip mit eigenem Verlauf + Gloss */
.extras-system-icon {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sys-accent), var(--sys-accent-2));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 8px 24px var(--sys-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.extras-system-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.3) 0%, transparent 48%);
    pointer-events: none;
}

.extras-system:hover .extras-system-icon {
    transform: translateY(-3px) rotate(-7deg) scale(1.06);
    box-shadow:
        0 12px 30px var(--sys-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.extras-system-heading {
    flex: 1;
    min-width: 0;
}

/* Titel mit System-Verlauf */
.extras-system-title {
    margin: 0;
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.25;
    background: linear-gradient(94deg, var(--sys-accent) 0%, var(--sys-accent-2) 62%, #ffffff 130%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(var(--sys-rgb), 0.16));
}

/* Zusatz-Badge im Titel (z.B. "Sticky Roles") */
.extras-system-sub {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--sys-accent);
    background: rgba(var(--sys-rgb), 0.1);
    border: 1px solid rgba(var(--sys-rgb), 0.32);
    vertical-align: middle;
    -webkit-text-fill-color: currentColor;
}

.extras-system-desc {
    margin: 7px 0 0 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 660px;
}

/* Gro�e Index-Nummer als Outline-Deko */
.extras-system-index {
    position: absolute;
    top: -10px;
    right: 0;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(var(--sys-rgb), 0.4);
    opacity: 0.55;
    user-select: none;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.extras-system:hover .extras-system-index {
    opacity: 0.95;
    transform: translateY(-3px);
}

/* Karten im Block: etwas heller als der Container f�r Kontrast */
.extras-system .settings-card {
    background: linear-gradient(180deg, rgba(23, 23, 34, 0.88), rgba(18, 18, 27, 0.78));
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.extras-system .settings-card:last-child {
    margin-bottom: 0;
}

/* :has() � leuchtet den ganzen System-Block, wenn eine Karte per Suche markiert ist */
.extras-system:has(.settings-card.search-highlight)::before {
    transform: scaleX(1);
    opacity: 1;
}

.extras-system:has(.settings-card.search-highlight) {
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.38),
        0 0 0 2px rgba(var(--sys-rgb), 0.4),
        0 0 44px var(--sys-glow);
}

@keyframes extrasSystemIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .extras-system {
        padding: 22px 18px 20px 18px;
        margin-bottom: 30px;
        border-radius: 16px;
    }

    .extras-system-header {
        gap: 14px;
        padding-right: 52px;
        margin-bottom: 20px;
    }

    .extras-system-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .extras-system-title {
        font-size: 1.12rem;
    }

    .extras-system-sub {
        display: none;
    }

    .extras-system-index {
        font-size: 2.3rem;
        top: -4px;
    }

    .extras-system::before {
        left: 18px;
        right: 18px;
    }
}

/* --- Barrierefreiheit: Animationen respektieren --- */
@media (prefers-reduced-motion: reduce) {
    .extras-system,
    .extras-system-icon,
    .extras-system-index {
        transition: none;
        animation: none;
    }

    .extras-system::before {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* --- Vorerst ausgeblendet: Ticket Live-Auslastung --- */
#ticket_demand_card {
    display: none !important;
}

/* --- Houses System Category & Owner Dropdowns (Body-Portal) --- */
.hcat-wrapper, .howner-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
.hcat-wrapper.open { z-index: 100; }
.hcat-input { padding-right: 26px !important; text-overflow: ellipsis; }
.hcat-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #949ba4;
    cursor: pointer;
    padding: 3px 5px;
    font-size: 11px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}
.hcat-btn:hover { color: #daa520; background: rgba(255, 255, 255, 0.08); }
.hcat-btn i { transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.hcat-wrapper.open .hcat-btn i { transform: rotate(180deg); color: #daa520; }

.hcat-dropdown {
    position: fixed;
    min-width: 160px;
    width: max-content;
    max-width: 280px;
    max-height: 230px;
    overflow-y: auto;
    background: rgba(20, 21, 28, 0.98);
    border: 1px solid rgba(218, 165, 32, 0.35);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75), 0 0 15px rgba(218, 165, 32, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px;
    z-index: 100050;
    box-sizing: border-box;
}
.hcat-dropdown::-webkit-scrollbar { width: 5px; }
.hcat-dropdown::-webkit-scrollbar-thumb { background: rgba(218, 165, 32, 0.3); border-radius: 4px; }
.hcat-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(218, 165, 32, 0.6); }

.hcat-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #daa520;
    padding: 4px 8px 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hcat-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    font-size: 12.5px;
    color: #dbdee1;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.hcat-option:hover, .hcat-option.highlighted {
    background: rgba(218, 165, 32, 0.18);
    color: #ffffff;
}
.hcat-option.selected {
    background: rgba(218, 165, 32, 0.12);
    color: #daa520;
    font-weight: 600;
}
.hcat-opt-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcat-opt-count {
    font-size: 10.5px;
    color: #949ba4;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}
.hcat-option.selected .hcat-opt-count { background: rgba(218, 165, 32, 0.25); color: #daa520; }
.hcat-option-new {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
    padding-top: 6px;
    color: #5fe6a0;
}
.hcat-option-new:hover, .hcat-option-new.highlighted {
    background: rgba(95, 230, 160, 0.15);
    color: #ffffff;
}
.hcat-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hcat-list::-webkit-scrollbar { width: 4px; }
.hcat-list::-webkit-scrollbar-thumb { background: rgba(218, 165, 32, 0.3); border-radius: 4px; }
.hcat-empty { padding: 8px 10px; font-size: 12px; color: #80848e; text-align: center; font-style: italic; }
.hcat-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 5px; padding-top: 5px; }
.hcat-create-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 10px;
    background: rgba(218, 165, 32, 0.12);
    border: 1px dashed rgba(218, 165, 32, 0.45);
    border-radius: 6px;
    color: #ffd700;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.hcat-create-btn:hover {
    background: rgba(218, 165, 32, 0.25);
    border-color: #ffd700;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.25);
}

.howner-dropdown {
    position: fixed;
    min-width: 200px;
    width: max-content;
    max-width: 320px;
    max-height: 240px;
    overflow-y: auto;
    background: rgba(20, 21, 28, 0.98);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 229, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px;
    z-index: 100050;
    box-sizing: border-box;
}

