/* public/style.css */

/* --- BASIS --- */
body {
    margin: 0;
    padding: 0;
    background-color: #18181b;
    color: #efeff1;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.hidden { display: none !important; }

/* --- APP-SHELL & SEITENLEISTE --- */
.app-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 248px;
    background: #141417;
    border-right: 1px solid #26262c;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.25);
    transition: width 0.22s ease;
}

.app-sidebar.is-collapsed {
    width: 68px;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Feste Sidebar-Höhe: Hauptbereich scrollt, Leiste bleibt; Nav-Bereich scrollt bei Bedarf separat */
body.has-fixed-sidebar {
    height: 100vh;
    overflow: hidden;
}

body.has-fixed-sidebar .app-shell {
    height: 100%;
    min-height: 0;
}

body.has-fixed-sidebar .app-sidebar {
    flex-shrink: 0;
    align-self: stretch;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.has-fixed-sidebar .sidebar-scroll--guest {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

body.has-fixed-sidebar .sidebar-scroll--app {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.has-fixed-sidebar .sidebar-nav-section--scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

body.has-fixed-sidebar .sidebar-nav-section--scroll .sidebar-nav {
    padding-bottom: 8px;
}

body.has-fixed-sidebar .sidebar-nav-section--footer {
    flex-shrink: 0;
    border-top: 1px solid #26262c;
    background: #141417;
}

body.has-fixed-sidebar .sidebar-nav-section--footer .sidebar-nav {
    padding-top: 10px;
}

body.has-fixed-sidebar .app-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-hero-wrap {
    padding-bottom: 32px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sidebar-nav-group-label {
    margin: 0 12px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6b75;
}

.sidebar-nav-modules-extra .sidebar-nav-link {
    padding-left: 14px;
    font-size: 0.88rem;
}

.dashboard-page-inner {
    padding: 24px 22px 48px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-welcome-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0 28px;
}

.dashboard-welcome-card {
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.dashboard-welcome-brand {
    margin: 0 0 8px;
    font-size: 2rem;
    color: #efeff1;
    font-weight: 700;
}

.dashboard-modules-section-title {
    margin: 0 0 18px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #efeff1;
    text-align: center;
}

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

.dashboard-modules-loading {
    grid-column: 1 / -1;
    color: #adadb8;
    margin: 0;
}

.dashboard-module-card {
    position: relative;
    background: #1f1f23;
    border: 1px solid #303032;
    border-radius: 12px;
    padding: 16px 44px 40px 16px;
    min-height: 120px;
    box-sizing: border-box;
}

.dashboard-module-card--soon {
    opacity: 0.92;
    border-style: dashed;
}

.dashboard-module-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-module-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #efeff1;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.module-soon-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #bf94ff;
    background: rgba(145, 70, 255, 0.15);
    border-radius: 6px;
    vertical-align: middle;
}

.module-toggle-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.module-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.module-toggle-ui {
    display: block;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #3a3a45;
    transition: background 0.2s ease;
    position: relative;
}

.module-toggle-ui::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #efeff1;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.module-toggle-input:checked + .module-toggle-ui {
    background: #9146FF;
}

.module-toggle-input:checked + .module-toggle-ui::after {
    transform: translateX(18px);
}

.module-toggle-input:focus-visible + .module-toggle-ui {
    outline: 2px solid #bf94ff;
    outline-offset: 2px;
}

.module-toggle-placeholder {
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.dashboard-module-settings {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #adadb8;
    border: 1px solid #3a3a45;
    background: #18181b;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dashboard-module-settings:hover {
    color: #bf94ff;
    border-color: #9146FF;
    background: #26262c;
}

.dashboard-module-settings-icon {
    display: block;
}

.dashboard-module-main {
    padding: 28px 24px 56px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-module-h1 {
    margin: 0 0 12px;
    font-size: 1.65rem;
    color: #efeff1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.module-page-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #bf94ff;
    background: rgba(145, 70, 255, 0.18);
    border-radius: 8px;
}

.dashboard-module-lead {
    margin: 0;
    color: #adadb8;
    font-size: 1.02rem;
    line-height: 1.55;
}

.impressum-main {
    padding: 28px 24px 56px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.impressum-main h1 {
    margin-top: 0;
    font-size: 1.85rem;
}

.impressum-card {
    text-align: left;
    margin-top: 16px;
}

.impressum-card p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.impressum-h2 {
    font-size: 1.1rem;
    color: #bf94ff;
    margin: 1.35rem 0 0.5rem;
}

.impressum-lead {
    font-size: 0.95rem;
    color: #adadb8;
    margin-bottom: 0 !important;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 12px 12px;
    border-bottom: 1px solid #26262c;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #9146FF;
    text-decoration: none;
}

.sidebar-brand-emoji {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1;
}

.sidebar-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar.is-collapsed .sidebar-brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #3a3a42;
    border-radius: 8px;
    background: #1f1f23;
    color: #adadb8;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-toggle:hover {
    color: #efeff1;
    border-color: #9146FF;
    background: #26262c;
}

.sidebar-toggle:focus-visible {
    outline: 2px solid #9146FF;
    outline-offset: 2px;
}

.sidebar-toggle-svg {
    display: block;
}

.app-sidebar.is-collapsed .sidebar-toggle-svg {
    transform: scaleX(-1);
}

.sidebar-nav {
    padding: 12px 10px 16px;
}

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

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #adadb8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav-link:hover {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-link[aria-current="page"] {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.09);
}

.sidebar-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #c8c8d0;
}

.sidebar-nav-link[aria-current="page"] .sidebar-link-icon {
    color: #bf94ff;
}

.sidebar-link-svg {
    width: 20px;
    height: 20px;
    display: block;
}

.app-sidebar.is-collapsed .sidebar-link-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-nav-group-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 10px 8px;
}

.app-sidebar.is-collapsed .sidebar-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #18181b;
    position: relative;
}

/* Login / Profil: schwebt oben rechts, keine Leiste und keine Trennlinie */
.app-topbar {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 22px;
    border: none;
    background: none;
    pointer-events: none;
}

.app-topbar > * {
    pointer-events: auto;
}

@media (max-width: 640px) {
    body.has-fixed-sidebar {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    body.has-fixed-sidebar .app-shell {
        height: auto;
        min-height: 100vh;
    }

    body.has-fixed-sidebar .app-sidebar {
        height: auto;
        max-height: none;
    }

    body.has-fixed-sidebar .sidebar-scroll--app {
        overflow: visible;
    }

    body.has-fixed-sidebar .sidebar-nav-section--scroll {
        overflow: visible;
    }

    body.has-fixed-sidebar .app-main {
        overflow: visible;
    }

    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100% !important;
        border-right: none;
        border-bottom: 1px solid #26262c;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    }

    .app-sidebar.is-collapsed .sidebar-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: bold;
    color: #9146FF;
    text-decoration: none;
}

/* --- USER-MENÜ (oben rechts) --- */
.user-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    line-height: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.user-menu-trigger:hover {
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.5);
    transform: scale(1.04);
}
.user-menu-trigger:focus-visible {
    outline: 2px solid #9146FF;
    outline-offset: 3px;
}

.user-menu-avatar-img {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #9146FF;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    padding: 8px 0;
    background: #232529;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.user-menu-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 8px;
}

.user-menu-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.user-menu-header-avatar.user-menu-avatar-fallback {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.user-menu-identity-text {
    min-width: 0;
    flex: 1;
}

.user-menu-display-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #efeff1;
    line-height: 1.3;
    cursor: default;
    user-select: none;
}

.user-menu-divider {
    height: 1px;
    margin: 4px 0;
    background: #3f3f46;
}

.user-menu-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.9rem;
    color: #efeff1;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}
.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-menu-item.user-menu-logout {
    color: #f87171;
}
.user-menu-item.user-menu-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* --- BUTTONS --- */
.btn, .twitch-btn {
    display: inline-block;
    background-color: #9146FF;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    cursor: pointer;
}
.btn:hover, .twitch-btn:hover { background-color: #772ce8; transform: translateY(-2px); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-secondary {
    background: #3a3a3f;
    color: #efeff1;
    border: 1px solid #4a4a52;
}
.btn-secondary:hover { background: #4a4a52; transform: none; }
.btn-logout { background: #3a3a3d; margin-left: 15px; }
.btn-logout:hover { background: #e91e63; }

/* --- ZENTRIERTE KARTEN (Für Startseite & Login) --- */
.card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.card {
    background-color: #1f1f23;
    padding: 50px 70px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #303032;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

/* --- STARTSEITE (/) --- */
body.home-page {
    min-height: 100vh;
}

.home-hero-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 20px 8px;
}

.home-hero-card .home-hero-lead {
    margin-bottom: 28px;
}

.home-welcome-title {
    color: #bf94ff;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.5rem;
    font-weight: 600;
}

.home-welcome-text {
    margin-bottom: 0 !important;
    color: #adadb8;
    font-size: 1.05rem;
}

/* --- STARTSEITE: Vertrauens-Streamer --- */
.home-trusted {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px 8px;
}

.home-trusted-title {
    text-align: center;
    font-size: 1.35rem;
    color: #efeff1;
    margin: 0 0 20px;
    font-weight: 600;
}

.home-trusted-viewport {
    overflow: hidden;
    width: 100%;
}

.home-trusted-viewport--marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.home-trusted-strip--centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 28px 40px;
    padding: 8px 0 20px;
}

.home-trusted-strip--marquee {
    overflow: hidden;
}

.home-trusted-marquee-track {
    display: flex;
    width: max-content;
    animation: home-trusted-scroll 32s linear infinite;
}

.home-trusted-viewport--marquee:hover .home-trusted-marquee-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .home-trusted-marquee-track {
        animation: none;
    }
}

@keyframes home-trusted-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.home-trusted-marquee-inner {
    display: flex;
    flex-shrink: 0;
    gap: 40px;
    padding: 8px 20px 20px;
}

.home-trusted-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #c8c8d0;
    transition: color 0.15s ease, transform 0.15s ease;
    min-width: 88px;
}

.home-trusted-card:hover {
    color: #efeff1;
    transform: translateY(-2px);
}

.home-trusted-card:focus-visible {
    outline: 2px solid #9146FF;
    outline-offset: 4px;
    border-radius: 12px;
}

.home-trusted-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3a3a45;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    background: #26262c;
}

.home-trusted-avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    background: #9146FF;
}

.home-trusted-name {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-trusted-empty {
    margin: 0;
    max-width: 560px;
    text-align: center;
    color: #adadb8;
    font-size: 0.98rem;
    line-height: 1.55;
    padding: 8px 16px 16px;
}

.home-features {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.home-features > h2 {
    margin: 0 0 10px 0;
    font-size: 1.65rem;
    color: #efeff1;
    text-align: center;
}

.home-features-intro {
    text-align: center;
    margin: 0 auto 32px;
    max-width: 640px;
    font-size: 1.05rem;
    color: #adadb8;
    line-height: 1.55;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: #1f1f23;
    border: 1px solid #303032;
    border-radius: 14px;
    padding: 22px 20px 24px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    border-color: #4a4a55;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.feature-card-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(145, 70, 255, 0.12), rgba(31, 31, 35, 0.9));
    border-radius: 14px;
    border: 1px solid #3a3a45;
}

.feature-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.12rem;
    color: #efeff1;
    font-weight: 600;
}

.feature-card p {
    margin: 0 !important;
    font-size: 0.95rem;
    color: #adadb8;
    line-height: 1.55;
    text-align: left;
}

.feature-card code {
    background: #26262c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #d3d3dc;
}

.feature-card a {
    color: #a970ff;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(169, 112, 255, 0.35);
}

.feature-card a:hover {
    color: #bf94ff;
    border-bottom-color: #bf94ff;
}

@media (max-width: 600px) {
    .home-hero-wrap .card {
        padding: 32px 22px;
    }
}

/* --- TYPOGRAFIE --- */
h1 { margin-top: 0; font-size: 2.5rem; margin-bottom: 10px; }
.success-h1 { color: #00fa9a; font-size: 2rem; }
p { color: #adadb8; font-size: 1.2rem; margin-bottom: 40px; }
.success-p { margin-bottom: 10px; }
.hint { font-size: 0.9rem; margin-top: 30px; opacity: 0.7; }

/* Ladekreis für Success-Seite */
.spinner { margin: 30px auto; width: 40px; height: 40px; border: 4px solid rgba(145, 70, 255, 0.2); border-radius: 50%; border-top-color: #9146FF; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* --- DEINE ROADMAP (KANBAN) STYLES --- */
.board { display: flex; gap: 20px; padding: 20px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.column { background-color: #1f1f23; border-radius: 10px; width: 300px; padding: 15px; border: 1px solid #303032; min-height: 300px; flex: 0 1 300px; }
.column h2 { text-align: center; margin-top: 0; font-size: 1.2rem; color: #bf94ff; border-bottom: 2px solid #303032; padding-bottom: 10px; }
.card-list { min-height: 200px; }

.roadmap-card { background-color: #26262c; padding: 15px; border-radius: 8px; margin-bottom: 12px; cursor: default; border: 1px solid #3a3a3f; position: relative; }
.roadmap-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.roadmap-card h3 { margin: 0; font-size: 1.1rem; color: #efeff1; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.roadmap-card-actions { display: flex; flex-shrink: 0; gap: 6px; align-items: flex-start; }

.show-more-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #efeff1;
    background: #18181b;
    border: 1px solid #3a3a3f;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}
.show-more-btn:hover { border-color: #9146FF; color: #bf94ff; background: #1f1f23; }

.roadmap-btn-icon {
    background: #3a3a3f;
    border: none;
    color: #efeff1;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.95rem;
    line-height: 1;
}
.roadmap-btn-icon:hover { background: #4a4a52; }
.roadmap-btn-icon.delete { background: #ff4a4a; color: white; }
.roadmap-btn-icon.delete:hover { background: #ff2a2a; }

.roadmap-btn-text {
    background: #3a3a3f;
    border: 1px solid #4a4a52;
    color: #efeff1;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.roadmap-btn-text:hover { background: #4a4a52; border-color: #9146FF; color: #bf94ff; }

.roadmap-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.roadmap-status-select { background: #0e0e10; color: white; border: 1px solid #26262c; margin-top: 10px; width: 100%; padding: 8px; border-radius: 6px; box-sizing: border-box; }

/* Roadmap: Detail- & Bearbeiten-Modal */
.roadmap-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.roadmap-modal-panel {
    background: #26262c;
    border: 1px solid #3a3a3f;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: min(85vh, 640px);
    overflow: auto;
    padding: 24px 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    animation: roadmapModalIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes roadmapModalIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.roadmap-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #adadb8;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.roadmap-modal-close:hover { color: #efeff1; background: #18181b; }
.roadmap-modal-panel h2 { margin: 0 36px 16px 0; font-size: 1.35rem; color: #efeff1; }
.roadmap-modal-panel .roadmap-modal-body { margin: 0; font-size: 1rem; color: #adadb8; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.roadmap-modal-panel .roadmap-edit-field { width: 100%; box-sizing: border-box; margin-bottom: 12px; padding: 10px 12px; border-radius: 6px; border: 1px solid #3a3a3f; background: #18181b; color: #efeff1; font-size: 1rem; }
.roadmap-modal-panel textarea.roadmap-edit-field { min-height: 120px; resize: vertical; font-family: inherit; }
.roadmap-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; justify-content: flex-end; }
.roadmap-modal-actions .btn-secondary { background: #3a3a3f; color: #efeff1; border: 1px solid #4a4a52; }
.roadmap-modal-actions .btn-secondary:hover { background: #4a4a52; }

.admin-controls { display: none; text-align: center; background-color: #1f1f23; padding: 20px; border-radius: 10px; border: 1px solid #303032; max-width: 600px; margin: 40px auto 20px auto; }
.admin-controls input { padding: 10px; border-radius: 5px; border: 1px solid #3a3a3f; background-color: #18181b; color: white; margin: 5px; width: 200px; }
.admin-controls button { margin-left: 10px; }

/* --- ÖFFENTLICHE COMMANDS-SEITE (/commands) --- */
.commands-page .commands-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}
.commands-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.85rem;
    color: #efeff1;
}
.commands-sub {
    margin: 0 0 20px 0;
    color: #adadb8;
    font-size: 1rem;
}
.commands-toolbar {
    margin-bottom: 28px;
}
.commands-search-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 420px;
}
.commands-search-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #adadb8;
}
.commands-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-size: 1rem;
}
.commands-search-input:focus {
    outline: none;
    border-color: #9146FF;
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.25);
}
.commands-search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.commands-error {
    background: #2a1a1f;
    border: 1px solid #5c2a3a;
    color: #ffb4c4;
    padding: 16px 18px;
    border-radius: 10px;
    max-width: 640px;
}
.commands-section {
    margin-bottom: 40px;
}
.commands-section h2 {
    margin: 0 0 10px 0;
    font-size: 1.35rem;
    color: #bf94ff;
    border-bottom: 2px solid #303032;
    padding-bottom: 10px;
}
.commands-hint {
    color: #adadb8;
    font-size: 0.95rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}
.commands-hint code {
    background: #26262c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.commands-subheading {
    margin: 24px 0 12px 0;
    font-size: 1.05rem;
    color: #efeff1;
}
.commands-mod-note {
    font-size: 0.9rem;
    color: #adadb8;
    margin: 0 0 12px 0;
    line-height: 1.45;
}
.commands-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #303032;
    background: #1f1f23;
}
.commands-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.commands-table thead th {
    text-align: left;
    padding: 12px 14px;
    background: #18181b;
    color: #adadb8;
    font-weight: 600;
    border-bottom: 1px solid #303032;
    white-space: nowrap;
}
.commands-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #2a2a2e;
    vertical-align: top;
    color: #efeff1;
}
.commands-table tbody tr:last-child td {
    border-bottom: none;
}
.commands-table .cmd-name {
    color: #a970ff;
    font-size: 0.95rem;
}
.commands-table .cmd-response {
    max-width: 360px;
    word-break: break-word;
    color: #d3d3dc;
    font-size: 0.9rem;
    line-height: 1.45;
}
.commands-table--mod thead th {
    background: #1a1520;
}
.perm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.perm-everyone { background: #2d3a4a; color: #a8c4e8; }
.perm-subscriber { background: #2d3a2d; color: #9fd89f; }
.perm-vip { background: #3a342d; color: #e8c48a; }
.perm-moderator { background: #3a2d2d; color: #f0a0a0; }
.perm-broadcaster { background: #3a2d4a; color: #d4b4ff; }
.cd-badge {
    font-size: 0.85rem;
    color: #adadb8;
    white-space: nowrap;
}
.cd-sep { opacity: 0.5; margin: 0 2px; }
.commands-empty {
    margin-top: 12px;
    color: #adadb8;
    font-size: 0.95rem;
}

.timers-intro {
    line-height: 1.55;
}
.timers-page .timer-id {
    font-size: 0.8rem;
    color: #c4b8dc;
    word-break: break-all;
}
.timer-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.timer-status.timer-on {
    background: #1a3d2a;
    color: #7dffb0;
}
.timer-status.timer-off {
    background: #3a3a3d;
    color: #adadb8;
}

@media (max-width: 768px) {
    .commands-table thead {
        display: none;
    }
    .commands-table tbody tr {
        display: block;
        padding: 14px 12px;
        border-bottom: 1px solid #2a2a2e;
    }
    .commands-table tbody tr:last-child {
        border-bottom: none;
    }
    .commands-table tbody td {
        display: block;
        padding: 6px 0;
        border: none;
    }
    .commands-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #6e6e78;
        margin-bottom: 4px;
    }
    .commands-table .cmd-response {
        max-width: none;
    }
}

/* --- COMMANDS APP (eingeloggt /commands) --- */
.commands-login-card {
    max-width: 520px;
    margin: 48px auto;
    padding: 36px 32px;
    background: #1f1f23;
    border: 1px solid #303032;
    border-radius: 14px;
    text-align: center;
}
.commands-login-card h1 { font-size: 1.65rem; margin-bottom: 12px; }
.commands-login-card p { margin-bottom: 20px; color: #adadb8; font-size: 1rem; }
.commands-login-hint { font-size: 0.88rem !important; opacity: 0.85; margin-top: 24px !important; margin-bottom: 0 !important; }

.commands-app-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.85rem;
    color: #efeff1;
}
.commands-app-lead {
    margin: 0 0 24px 0;
    color: #adadb8;
    font-size: 1rem;
}

.commands-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #303032;
    margin-bottom: 20px;
    max-width: 1100px;
}
.commands-tab {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 18px 14px;
    cursor: pointer;
    position: relative;
    font-family: inherit;
}
.commands-tab:hover { color: #efeff1; }
.commands-tab.is-active {
    color: #efeff1;
}
.commands-tab.is-active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    background: #1e90ff;
    border-radius: 2px 2px 0 0;
}
.commands-tab-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: #2e7d32;
    border-radius: 6px;
    vertical-align: middle;
}

.commands-app-toolbar {
    margin-bottom: 18px;
    max-width: 1100px;
}

.commands-panel { max-width: 1100px; }

.commands-table--manage .th-toggle { width: 72px; }
.commands-table--manage .th-actions { width: 200px; text-align: right; }
.commands-table--manage .cmd-actions {
    text-align: right;
    white-space: nowrap;
}
.cmd-actions .roadmap-btn-text { margin-left: 6px; }

.cmd-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
}
.cmd-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cmd-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #3a3a3f;
    border-radius: 999px;
    transition: background 0.2s;
}
.cmd-switch-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #adadb8;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cmd-switch input:checked + .cmd-switch-slider {
    background: #9146FF;
}
.cmd-switch input:checked + .cmd-switch-slider::before {
    transform: translateX(20px);
    background: #fff;
}
.cmd-switch input:focus-visible + .cmd-switch-slider {
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.45);
}

.resp-type-badge {
    font-size: 0.8rem;
    color: #c4b8dc;
    background: #26262c;
    padding: 4px 8px;
    border-radius: 6px;
}

.commands-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.commands-page-btn {
    background: #26262c;
    border: 1px solid #3a3a3f;
    color: #efeff1;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}
.commands-page-btn:hover:not(:disabled) {
    border-color: #9146FF;
    color: #bf94ff;
}
.commands-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.commands-page-info {
    font-size: 0.9rem;
    color: #adadb8;
}

.commands-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.commands-modal {
    background: #26262c;
    border: 1px solid #3a3a3f;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: min(90vh, 720px);
    overflow: auto;
    padding: 24px 28px 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.commands-modal--narrow { max-width: 440px; }
.commands-modal h2 {
    margin: 0 36px 16px 0;
    font-size: 1.35rem;
    color: #efeff1;
}
.commands-modal-form .commands-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    text-align: left;
}
.commands-modal-form .commands-field span {
    font-size: 0.85rem;
    color: #adadb8;
}
.commands-modal-form input[type="text"],
.commands-modal-form select,
.commands-modal-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-family: inherit;
    font-size: 1rem;
}
.commands-modal-form textarea { resize: vertical; min-height: 100px; }
.commands-fieldset {
    border: 1px solid #3a3a3f;
    border-radius: 8px;
    padding: 12px 14px 14px;
    margin-bottom: 16px;
    text-align: left;
}
.commands-fieldset legend {
    padding: 0 6px;
    font-size: 0.85rem;
    color: #bf94ff;
}
.commands-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #d3d3dc;
    cursor: pointer;
}
.commands-radio input { margin-top: 3px; }
.commands-modal-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.commands-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.commands-vars-list {
    margin: 0;
    padding-left: 18px;
    color: #adadb8;
    line-height: 1.65;
    font-size: 0.95rem;
}
.commands-vars-list code {
    background: #18181b;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #d3d3dc;
}

.commands-modal--timer {
    max-width: 560px;
}
.commands-field-hint {
    margin: -8px 0 12px;
    font-size: 0.82rem;
    color: #86868d;
    line-height: 1.45;
}
.commands-field-label-inline {
    display: block;
    font-size: 0.85rem;
    color: #adadb8;
    margin-bottom: 8px;
}
.commands-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #d3d3dc;
    cursor: pointer;
}
.commands-checkbox-row input {
    margin-top: 3px;
    flex-shrink: 0;
}
.timer-interval-block {
    margin-bottom: 18px;
}
.commands-range-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}
.commands-range-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #9147ff;
}
.commands-range-num {
    width: 5rem;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-family: inherit;
    font-size: 1rem;
}
.timer-messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.timer-message-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.commands-modal--timer .timer-message-input {
    min-height: 72px;
}
.timer-message-input {
    flex: 1;
    min-width: 0;
    min-height: 72px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-family: inherit;
    font-size: 1rem;
}
.timer-message-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.timer-msg-add-btn,
.timer-msg-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #18181b;
    color: #adadb8;
    cursor: pointer;
    line-height: 1;
}
.timer-msg-add-btn:hover,
.timer-msg-remove-btn:hover {
    border-color: #9147ff;
    color: #efeff1;
}
.timer-msg-remove-btn {
    font-size: 1.25rem;
}
.timer-io-cell {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #adadb8;
}