/* Dashboard-spezifische Styles */

.sidebar {
    background: rgba(13, 27, 62, 0.95);
    min-height: 100vh;
    padding-top: 80px;
    border-right: 1px solid rgba(75, 108, 183, 0.1);
    position: fixed;
    width: 250px;
    z-index: 1000;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 10px;
    border-left: 3px solid transparent;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(148, 70, 255, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

.sidebar-nav i {
    width: 20px;
    margin-right: 10px;
}

.main-dashboard {
    margin-left: 250px;
    padding: 100px 20px 20px;
    transition: margin-left 0.3s ease;
}

.dashboard-header {
    background: rgba(13, 27, 62, 0.7);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(75, 108, 183, 0.1);
}

.dashboard-title {
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: 600;
}

.dashboard-hero-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-hero-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.dashboard-rank-toggle {
    flex: 0 0 auto;
    min-width: min(100%, 320px);
    margin-top: 2px;
    border: 1px solid rgba(120, 144, 197, 0.2);
    background: linear-gradient(155deg, rgba(8, 16, 38, 0.92), rgba(18, 33, 71, 0.82));
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.dashboard-rank-toggle summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.dashboard-rank-toggle summary::-webkit-details-marker {
    display: none;
}

.dashboard-rank-trigger-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #eef4ff;
}

.dashboard-rank-lights {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.dashboard-rank-light {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.dashboard-rank-light.is-green {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
}

.dashboard-rank-light.is-amber {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.dashboard-rank-light.is-red {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

.dashboard-rank-trigger-icon {
    color: rgba(233, 240, 255, 0.72);
    transition: transform 0.2s ease;
}

.dashboard-rank-toggle[open] .dashboard-rank-trigger-icon {
    transform: rotate(180deg);
}

.dashboard-rank-panel {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(120, 144, 197, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}

.dashboard-rank-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    margin-bottom: 10px;
}

.dashboard-rank-panel-priority {
    color: #c4d4ff;
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-rank-power-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.dashboard-rank-power-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.12);
}

.dashboard-rank-power-pill.is-gold {
    color: #ffe08a;
    background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(146,64,14,0.16));
    border-color: rgba(255,215,0,0.28);
}

.dashboard-rank-power-pill.is-violet {
    color: #ddd6fe;
    background: linear-gradient(135deg, rgba(124,58,237,0.24), rgba(30,41,59,0.32));
    border-color: rgba(167,139,250,0.24);
}

.dashboard-rank-power-pill.is-dark {
    color: #dbe7ff;
    background: linear-gradient(135deg, rgba(15,23,42,0.88), rgba(51,65,85,0.52));
    border-color: rgba(148,163,184,0.18);
}

.dashboard-rank-traffic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.dashboard-rank-traffic-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: #dce7ff;
    font-size: 0.75rem;
}

.dashboard-rank-panel-text {
    color: #9fb2d9;
    font-size: 0.8rem;
    line-height: 1.45;
}

.dashboard-rank-toggle-owner {
    border-color: rgba(255, 215, 0, 0.24);
    background: linear-gradient(155deg, rgba(8, 16, 38, 0.96), rgba(33, 21, 78, 0.9));
    box-shadow: 0 12px 28px rgba(0,0,0,0.22), 0 0 24px rgba(124, 58, 237, 0.12);
}

.dashboard-rank-toggle-owner .dashboard-rank-trigger-label {
    color: #fff0b3;
}

.dashboard-hero-avatar {
    flex: 0 0 auto;
    border: 2px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 22px rgba(0,0,0,0.2);
}

.dashboard-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 767px) {
    .dashboard-hero-row {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .dashboard-hero-avatar {
        align-self: flex-end;
        width: 68px;
        height: 68px;
    }

    .dashboard-rank-toggle {
        width: 100%;
        min-width: 0;
    }

    .dashboard-title-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.dashboard-card {
    background: rgba(13, 27, 62, 0.7);
    border: 1px solid rgba(75, 108, 183, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    border-color: rgba(148, 70, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

html.sw-dashboard-is-navigating body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2147483647;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #10b981, #60a5fa);
    background-size: 220% 100%;
    animation: swDashboardNavProgress 0.9s linear infinite;
    box-shadow: 0 0 18px rgba(96, 165, 250, 0.5);
    pointer-events: none;
}

@keyframes swDashboardNavProgress {
    from { background-position: 0 0; }
    to { background-position: 220% 0; }
}

.card-header {
    background: none;
    border-bottom: 1px solid rgba(75, 108, 183, 0.1);
    padding: 0 0 15px 0;
    margin-bottom: 20px;
    color: var(--text-light);
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: inherit;
}

.card-title {
    color: var(--text-light);
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

.form-control {
    background: rgba(13, 27, 62, 0.5);
    border: 1px solid rgba(75, 108, 183, 0.3);
    color: var(--text-light);
    border-radius: 8px;
}

/* Farbige Input-Werte */
.colored-input {
    color: var(--accent-color) !important;
    font-weight: 500;
}

/* Installationsanleitung Styles */
.installation-guide {
    margin: 20px 0;
    position: relative;
}

.installation-progress {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.installation-progress .progress {
    background-color: rgba(255, 255, 255, 0.1);
}

.installation-progress .progress-bar {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

/* ==========================================================================
   SECTION HEADER - Modernes Section-Header Design
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Wenn der Section-Header NICHT in einer .dashboard-card sitzt
   (z. B. in den Bereichen Bots, Einstellungen, Admin, Steuerexport),
   bekommt er selbst die einheitliche Dashboard-Surface, damit alle
   Sektionen optisch identisch aussehen. */
.main-dashboard > .section-header,
.main-content > .section-header {
    background: rgba(13, 27, 62, 0.7);
    border: 1px solid rgba(75, 108, 183, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.dashboard-card .section-header {
    background: none;
    border: none;
    padding: 0 0 18px 0;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 2px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 0.88em;
    color: var(--text-muted, var(--text-secondary));
    margin: 0;
}

/* ==========================================================================
   STATUS BANNER - Moderner Status-Hinweis
   ========================================================================== */
.status-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid;
}

.status-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    flex-shrink: 0;
}

.status-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.status-banner p {
    font-size: 0.85em;
    opacity: 0.85;
    line-height: 1.5;
}

.status-banner-success {
    background: rgba(16,185,129,0.06);
    border-color: rgba(16,185,129,0.2);
}

.status-banner-success .status-banner-icon {
    background: rgba(16,185,129,0.15);
    color: #34d399;
}

.status-banner-success strong { color: #34d399; }

.status-banner-info {
    background: rgba(59,130,246,0.06);
    border-color: rgba(59,130,246,0.2);
}

.status-banner-info .status-banner-icon {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
}

.status-banner-info strong { color: #60a5fa; }

.status-banner-warning {
    background: rgba(245,158,11,0.06);
    border-color: rgba(245,158,11,0.2);
}

.status-banner-warning .status-banner-icon {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
}

.status-banner-warning strong { color: #fbbf24; }

/* ==========================================================================
   MODERN ALERTS - Inline Meldungen
   ========================================================================== */
.modern-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9em;
    line-height: 1.5;
    border: 1px solid;
}

.modern-alert > i {
    margin-top: 2px;
    font-size: 1em;
    flex-shrink: 0;
}

.modern-alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #34d399; }
.modern-alert-danger  { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.2);  color: #f87171; }
.modern-alert-info    { background: rgba(59,130,246,0.08);  border-color: rgba(59,130,246,0.2);  color: #60a5fa; }
.modern-alert-warning { background: rgba(245,158,11,0.08);  border-color: rgba(245,158,11,0.2);  color: #fbbf24; }
.modern-alert-primary { background: rgba(139,92,246,0.08);  border-color: rgba(139,92,246,0.2);  color: #a78bfa; }

.premium-trial-alert {
    align-items: center;
    flex-wrap: wrap;
}

.premium-trial-alert > span {
    flex: 1 1 280px;
    min-width: 0;
}

.premium-trial-alert-form {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .premium-trial-alert-form {
        width: 100%;
        margin-left: 0 !important;
    }

    .premium-trial-alert-form .btn {
        width: 100%;
    }
}

/* ==========================================================================
   INSTALL STEPS - Modernes Stepper-Design
   ========================================================================== */
.install-step {
    display: flex;
    gap: 16px;
    padding: 0 0 28px;
    position: relative;
}

.install-step:last-child {
    padding-bottom: 0;
}

/* Vertikale Verbindungslinie */
.step-connector {
    position: absolute;
    left: 19px;
    top: 42px;
    bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.08);
}

.install-step:last-child .step-connector {
    display: none;
}

.install-step.completed .step-connector {
    background: rgba(16,185,129,0.3);
}

/* Kreisförmiger Step-Indikator */
.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 1;
}

.install-step.current .step-indicator {
    border-color: var(--accent-color);
    background: rgba(139,92,246,0.15);
    color: var(--accent-color);
    box-shadow: 0 0 12px rgba(139,92,246,0.2);
}

.step-indicator.done {
    border-color: #10b981;
    background: rgba(16,185,129,0.15);
    color: #34d399;
}

.step-body {
    flex: 1;
    padding-top: 6px;
    min-width: 0;
}

.step-title {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 4px;
}

.step-detail {
    margin-top: 12px;
}

/* ==========================================================================
   ADMIN SECTION GROUP TITLE - Gruppierung der Admin-Tiles
   ========================================================================== */
.admin-section-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
}

.admin-section-group-title i {
    color: rgba(139,92,246,0.85);
}

/* ==========================================================================
   SETUP CARDS GRID - Download / Setup-Karten
   ========================================================================== */
.setup-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .setup-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.setup-card {
    background: rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 14px;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
}

.setup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.setup-card:hover::before {
    opacity: 1;
}

.setup-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.setup-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    flex-shrink: 0;
}

.setup-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.setup-card-content h6 {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 6px;
}

.setup-card-content p {
    font-size: 0.82em;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.setup-card-actions {
    margin-top: auto;
    padding-top: 8px;
}

.setup-card-actions .btn {
    margin-bottom: 0;
}

.setup-card-content .setup-action-btn,
.card-dark-subtle .setup-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: fit-content;
    min-height: 40px;
    padding: 0.72rem 1.05rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: #f8fafc !important;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: var(--transition), filter 0.18s ease;
}

.setup-card-content .setup-action-btn i,
.card-dark-subtle .setup-action-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.05rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    font-size: 0.76rem;
}

.setup-card-content .setup-action-btn:visited,
.card-dark-subtle .setup-action-btn:visited,
.setup-card-content .setup-action-btn:hover,
.card-dark-subtle .setup-action-btn:hover,
.setup-card-content .setup-action-btn:focus-visible,
.card-dark-subtle .setup-action-btn:focus-visible,
.setup-card-content .setup-action-btn:active,
.card-dark-subtle .setup-action-btn:active {
    color: #ffffff !important;
    text-decoration: none !important;
}

.setup-card-content .setup-action-btn:hover,
.card-dark-subtle .setup-action-btn:hover,
.setup-card-content .setup-action-btn:focus-visible,
.card-dark-subtle .setup-action-btn:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    box-shadow: 0 8px 25px rgba(192, 132, 252, 0.4);
    filter: saturate(1.05);
}

.setup-card-content .setup-action-btn:active,
.card-dark-subtle .setup-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.setup-card-content .setup-action-btn--ghost,
.card-dark-subtle .setup-action-btn--ghost {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    color: #e2e8f0 !important;
    border-color: rgba(100, 116, 139, 0.36);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(2, 6, 23, 0.16);
}

.setup-card-content .setup-action-btn--ghost:hover,
.card-dark-subtle .setup-action-btn--ghost:hover,
.setup-card-content .setup-action-btn--ghost:focus-visible,
.card-dark-subtle .setup-action-btn--ghost:focus-visible {
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.98), rgba(15, 23, 42, 0.98));
    border-color: rgba(148, 163, 184, 0.5);
    color: #eff6ff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 22px rgba(2, 6, 23, 0.22);
}

.setup-guide-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.setup-guide-header {
    margin-bottom: 14px;
}

.setup-guide-main-title {
    display: block;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.setup-guide-section {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.18));
}

.setup-guide-section-title {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.98rem;
    font-weight: 700;
}

.setup-guide-subtitle {
    margin: 12px 0 8px;
    color: var(--text-light);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.setup-guide-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
}

.setup-guide-list li + li {
    margin-top: 6px;
}

.setup-guide-kv {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.setup-guide-kv-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.setup-guide-kv-key {
    color: var(--text-light);
    font-weight: 700;
}

.setup-guide-kv-key code {
    color: var(--text-light);
    font-weight: 700;
    background: transparent;
    padding: 0;
}

.setup-guide-kv-value {
    color: var(--text-secondary);
    min-width: 0;
    word-break: break-word;
}

.setup-guide-kv-value a {
    color: #c4b5fd;
    text-decoration: none;
}

.setup-guide-kv-value a:hover {
    color: #ddd6fe;
    text-decoration: underline;
}

.setup-guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.setup-guide-note {
    margin-top: 12px;
    color: var(--text-secondary);
}

.setup-guide-code {
    margin-top: 14px;
    font-size: 0.8em;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.setup-guide-code code {
    color: var(--accent-color);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .setup-guide-kv-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.code-hint {
    font-size: 0.8em;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    display: inline-block;
}

.code-hint code {
    color: var(--accent-color);
    font-weight: 600;
}

/* ==========================================================================
   DISCORD SETUP CARD
   ========================================================================== */
.discord-setup-card {
    background: rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(88,101,242,0.15);
    border-radius: 14px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.discord-setup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5865f2, #7289da);
}

.discord-setup-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.discord-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discord-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88em;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.discord-checklist-item:hover {
    background: rgba(255,255,255,0.06);
}

.discord-checklist-item i {
    color: #34d399;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==========================================================================
   TWITCH AUTH CARD
   ========================================================================== */
.twitch-auth-card {
    background: rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(145,70,255,0.12);
    border-radius: 16px;
    padding: 28px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.twitch-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9146ff, #772ce8, #9146ff);
    background-size: 200% 100%;
    animation: twitchGradient 3s linear infinite;
}

@keyframes twitchGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.twitch-auth-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.twitch-auth-step {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.twitch-auth-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.twitch-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(145,70,255,0.12);
    border: 1.5px solid rgba(145,70,255,0.3);
    color: #a970ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
    margin-top: 2px;
}

.twitch-step-content {
    flex: 1;
    min-width: 0;
}

.twitch-step-label {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 2px;
}

/* Modern Input Gruppe */
.modern-input-group {
    display: flex;
    align-items: stretch;
}

.modern-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(75,108,183,0.3);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.modern-input-group .form-control {
    border-left: none;
}

.modern-input-group .form-control:focus {
    box-shadow: 0 0 0 0.15rem rgba(148,70,255,0.2);
}

.modern-input-group .form-control:focus + .modern-input-icon,
.modern-input-group:focus-within .modern-input-icon {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ==========================================================================
   RESPONSIVE ANPASSUNGEN
   ========================================================================== */
@media (max-width: 768px) {
    .section-header {
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .section-header-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1em;
    }

    .section-title {
        font-size: 1.15em;
    }

    .setup-cards-grid {
        grid-template-columns: 1fr;
    }

    .setup-card {
        padding: 16px;
        flex-direction: column;
        gap: 10px;
    }

    .twitch-auth-card {
        padding: 20px;
    }

    .status-banner {
        padding: 14px 16px;
        gap: 12px;
    }

    .install-step {
        gap: 12px;
    }

    .step-indicator {
        width: 34px;
        height: 34px;
        font-size: 0.8em;
    }

    .step-connector {
        left: 16px;
    }

    .discord-setup-card {
        padding: 18px;
    }
}

/* Smooth scrolling für Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ==========================================================================
   ADMIN STATUS GRID - Übersichts-Kacheln
   ========================================================================== */
.admin-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.admin-status-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.admin-status-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
}

.admin-status-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    flex-shrink: 0;
}

.admin-status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-status-label {
    font-size: 0.78em;
    color: var(--text-muted, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.admin-status-value {
    font-size: 0.92em;
    font-weight: 600;
    color: var(--text-light);
}

.admin-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-status-dot.dot-green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

.admin-status-dot.dot-yellow {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245,158,11,0.4);
}

.admin-status-dot.dot-red {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239,68,68,0.4);
}

/* ==========================================================================
   ADMIN CONFIG CARD - Konfigurationskarten
   ========================================================================== */
.admin-config-card {
    background: rgba(255,255,255,0.03);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.admin-config-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-light);
}

.admin-config-card-header i {
    font-size: 1.2em;
}

.admin-config-card .form-text {
    color: rgba(223, 232, 255, 0.82) !important;
}

.temp-housekeeping-card {
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(13, 27, 62, 0.82), rgba(20, 16, 42, 0.9));
    border-color: rgba(45, 212, 191, 0.16);
}

.temp-housekeeping-header {
    justify-content: space-between;
    gap: 16px;
}

.temp-housekeeping-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.temp-housekeeping-intro {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(45, 212, 191, 0.07);
    border: 1px solid rgba(45, 212, 191, 0.16);
}

.temp-housekeeping-intro-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 212, 191, 0.12);
    color: #5eead4;
}

.temp-housekeeping-intro p {
    margin: 0;
    color: rgba(235, 242, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.55;
}

.temp-housekeeping-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.temp-housekeeping-stat {
    min-width: 0;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.temp-housekeeping-stat-wide {
    grid-column: span 2;
}

.temp-housekeeping-stat span {
    display: block;
    color: rgba(190, 205, 232, 0.82);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.temp-housekeeping-stat strong {
    display: block;
    color: var(--text-light, #f8fafc);
    font-size: 0.94rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.temp-housekeeping-form {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: end;
}

.temp-housekeeping-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 767.98px) {
    .temp-housekeeping-header {
        align-items: flex-start;
    }

    .temp-housekeeping-intro,
    .temp-housekeeping-form {
        grid-template-columns: 1fr;
    }

    .temp-housekeeping-stat-wide {
        grid-column: auto;
    }
}

.admin-config-card .form-check-label.text-secondary {
    color: rgba(235, 242, 255, 0.9) !important;
}

.admin-config-card .form-check-label.text-secondary a,
.admin-config-card .form-text a {
    color: #9ec5ff;
}

.admin-config-card .form-check-label.text-secondary a:hover,
.admin-config-card .form-check-label.text-secondary a:focus-visible,
.admin-config-card .form-text a:hover,
.admin-config-card .form-text a:focus-visible {
    color: #d7e7ff;
}

.admin-config-badge {
    margin-left: auto;
    font-size: 0.7em;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.admin-config-badge.badge-active {
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.25);
}

/* ==========================================================================
   ADMIN FORM STYLES
   ========================================================================== */
.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.admin-badge-encrypted {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78em;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(16,185,129,0.1);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}

.admin-form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8em;
    color: var(--text-muted, #9ca3af);
}

.admin-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-admin-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9em;
    background: linear-gradient(135deg, var(--primary-color, #8b5cf6), var(--accent-color, #c084fc));
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 15px rgba(139,92,246,0.25);
}

.btn-admin-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139,92,246,0.4);
}

.btn-admin-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.85em;
    background: transparent;
    color: var(--text-secondary, #d1d5db);
    border: 1px solid rgba(255,255,255,0.12);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-admin-secondary:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    color: var(--text-light);
}

/* ==========================================================================
    ADMIN VIEWER EXPORT APP
    ========================================================================== */
.admin-viewer-export-app {
    display: grid;
    gap: 22px;
}

.admin-viewer-export-hero {
    justify-content: space-between;
}

.admin-viewer-export-hero-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-viewer-export-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.admin-viewer-export-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-viewer-export-kpi {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value";
    gap: 3px 12px;
    align-items: center;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.admin-viewer-export-kpi-icon {
    grid-area: icon;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.admin-viewer-export-kpi-icon.is-blue {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.admin-viewer-export-kpi-icon.is-green {
    color: #5eead4;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.admin-viewer-export-kpi-icon.is-amber {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.admin-viewer-export-kpi-label {
    grid-area: label;
    color: rgba(196, 211, 235, 0.86);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-viewer-export-kpi strong {
    grid-area: value;
    min-width: 0;
    color: var(--text-light, #f8fafc);
    font-size: 0.96rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.admin-viewer-export-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.admin-viewer-export-form {
    min-width: 0;
}

.admin-viewer-export-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-viewer-export-form-grid > * {
    min-width: 0;
}

.admin-viewer-export-switch-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(45, 212, 191, 0.07);
    border: 1px solid rgba(45, 212, 191, 0.14);
}

.admin-viewer-export-switch-panel .form-check-label {
    color: var(--text-light, #f8fafc);
    font-weight: 700;
}

.admin-viewer-export-switch-panel span {
    display: block;
    margin-top: 5px;
    color: rgba(196, 211, 235, 0.84);
    font-size: 0.82rem;
    line-height: 1.4;
}

.admin-viewer-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.admin-viewer-export-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.admin-viewer-export-panel {
    min-width: 0;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.admin-viewer-export-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--text-light, #f8fafc);
    font-weight: 800;
}

.admin-viewer-export-panel-head i {
    color: #93c5fd;
}

.admin-viewer-export-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-viewer-export-chip-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: rgba(235, 242, 255, 0.92);
    font-size: 0.8rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.admin-viewer-export-checklist {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.admin-viewer-export-checklist li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    color: rgba(235, 242, 255, 0.88);
    font-size: 0.86rem;
    line-height: 1.45;
}

.admin-viewer-export-checklist i {
    margin-top: 2px;
    color: #5eead4;
}

@media (max-width: 991.98px) {
    .admin-viewer-export-kpi-grid,
    .admin-viewer-export-grid,
    .admin-viewer-export-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-viewer-export-hero {
        align-items: flex-start;
    }

    .admin-viewer-export-hero-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* ==========================================================================
   ADMIN CONFIG SUMMARY - Inline-Zusammenfassung
   ========================================================================== */
.admin-config-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    margin-top: 8px;
}

.admin-config-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84em;
}

.admin-mail-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-mail-form-grid > * {
    min-width: 0;
}

.admin-mail-summary {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.admin-mail-full-row {
    grid-column: 1 / -1;
}

.admin-mail-subject-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.admin-mail-actions {
    grid-column: 1 / -1;
}

.admin-mail-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-mail-preview-grid > * {
    min-width: 0;
}

.admin-mail-preview-hint {
    margin: -8px 0 16px;
}

.admin-mail-preview-frame-wrap {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(10, 15, 30, 0.96) 0%, rgba(17, 24, 49, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.admin-mail-preview-frame {
    width: 100%;
    min-height: 620px;
    border: 0;
    background: #0f172b;
}

.admin-mail-text-preview {
    width: 100%;
    max-width: 620px;
    min-height: 620px;
    margin: 0 auto;
    display: block;
    resize: vertical;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    line-height: 1.55;
    font-family: 'Cascadia Code', 'Consolas', monospace;
}

.summary-label {
    color: var(--text-muted, #9ca3af);
    font-weight: 500;
}

.summary-value {
    color: #a78bfa;
    background: rgba(139,92,246,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.92em;
}

/* ==========================================================================
   ADMIN GUIDE CARD - Anleitungs-Schritte
   ========================================================================== */
.admin-guide-card {
    background: rgba(59,130,246,0.04);
    border: 1px solid rgba(59,130,246,0.12);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
}

.admin-guide-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59,130,246,0.08);
}

.admin-guide-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    flex-shrink: 0;
}

.admin-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88em;
    color: var(--text-secondary, #d1d5db);
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.admin-guide-step:hover {
    background: rgba(59,130,246,0.06);
}

.admin-guide-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8em;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==========================================================================
   ADMIN RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .admin-status-grid {
        grid-template-columns: 1fr;
    }

    .admin-mail-form-grid,
    .admin-mail-preview-grid {
        grid-template-columns: 1fr;
    }

    .admin-mail-preview-frame,
    .admin-mail-text-preview {
        min-height: 460px;
    }

    .admin-mail-preview-frame-wrap,
    .admin-mail-text-preview {
        max-width: 100%;
    }

    .admin-config-card {
        padding: 20px;
        border-radius: 14px;
    }

    .admin-form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .admin-form-actions > * {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .admin-config-summary {
        flex-direction: column;
        gap: 10px;
    }

    .admin-guide-card {
        padding: 16px;
    }
}


.form-control:focus {
    background: rgba(13, 27, 62, 0.7);
    border-color: var(--accent-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(148, 70, 255, 0.25);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-label {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 8px;
}

.form-select {
    background: rgba(13, 27, 62, 0.5);
    border: 1px solid rgba(75, 108, 183, 0.3);
    color: var(--text-light);
    border-radius: 8px;
}

.form-select:focus {
    background: rgba(13, 27, 62, 0.7);
    border-color: var(--accent-color);
    color: var(--text-light);
    box-shadow: 0 0 0 0.2rem rgba(148, 70, 255, 0.25);
}

.form-check-input {
    background-color: rgba(13, 27, 62, 0.5);
    border-color: rgba(75, 108, 183, 0.3);
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.form-check-label {
    color: var(--text-light);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-danger,
.btn-outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #f43f5e);
    border: 1px solid rgba(248, 113, 113, 0.48);
    box-shadow: 0 10px 22px rgba(127, 29, 29, 0.24);
}

.btn-outline-danger {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-danger:hover,
.btn-danger:focus-visible,
.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
    color: #fff;
    transform: translateY(-1px);
    border-color: rgba(252, 165, 165, 0.62);
    box-shadow: 0 12px 24px rgba(127, 29, 29, 0.3), 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: linear-gradient(135deg, #ef4444, #fb7185);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
    background: rgba(220, 38, 38, 0.26);
}

.btn-danger:active,
.btn-outline-danger:active {
    transform: translateY(0);
}

.btn-danger.btn-sm,
.btn-outline-danger.btn-sm {
    gap: 6px;
    padding: 7px 11px;
    font-size: 0.82rem;
}

.btn-danger i,
.btn-outline-danger i {
    margin-right: 0 !important;
}

.btn-outline-secondary {
    border-color: rgba(75, 108, 183, 0.3);
    color: var(--text-secondary);
    border-radius: 8px;
}

.btn-outline-secondary:hover {
    background: rgba(75, 108, 183, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.alert {
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-left: 3px solid #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 3px solid #dc3545;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border-left: 3px solid #17a2b8;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-left: 3px solid #ffc107;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-online {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-offline {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.status-error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.config-section {
    margin-bottom: 40px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(13, 27, 62, 0.3);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(75, 108, 183, 0.1);
}

.download-info h6 {
    color: var(--text-light);
    margin: 0 0 5px 0;
    font-weight: 600;
}

.download-info small {
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(13, 27, 62, 0.7);
    border: 1px solid rgba(75, 108, 183, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-dashboard {
        margin-left: 0;
        padding: 80px 15px 20px;
    }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: var(--accent-color);
        border: none;
        color: white;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        border-radius: 5px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}

/* Code-Blöcke */
.code-block {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(75, 108, 183, 0.2);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 10px 0;
}

/* Tabellen */
.table {
    color: var(--text-light);
}

/* Bootstrap Cards innerhalb des Dashboards dunkler darstellen,
   damit Tabellen/Formulare nicht auf "weißem" Card-Default landen.
   Nicht auf farbige Bootstrap-Utilities (bg-*) anwenden. */
.main-dashboard .card:not(.bg-primary):not(.bg-success):not(.bg-info):not(.bg-warning):not(.bg-danger):not(.bg-secondary):not(.bg-light):not(.bg-dark) {
    background: rgba(13, 27, 62, 0.7);
    border: 1px solid rgba(75, 108, 183, 0.1);
    color: var(--text-light);
    border-radius: 12px;
}

.main-dashboard .card .text-muted,
.main-dashboard .card .form-text {
    color: var(--text-secondary) !important;
}

/* Kontextfarben (Bootstrap table-*) im Dark-Theme lesbar machen */
.main-dashboard .table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.12);
    --bs-table-color: var(--text-light);
    --bs-table-hover-bg: rgba(255, 193, 7, 0.18);
    --bs-table-hover-color: var(--text-light);
}

.main-dashboard .table-info {
    --bs-table-bg: rgba(23, 162, 184, 0.12);
    --bs-table-color: var(--text-light);
    --bs-table-hover-bg: rgba(23, 162, 184, 0.18);
    --bs-table-hover-color: var(--text-light);
}

/* Deaktivieren-Buttons (btn-warning) im Dark-Theme weniger grell */
.main-dashboard .btn-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: var(--text-light);
    border-radius: 8px;
    font-weight: 500;
}

.main-dashboard .btn-warning:hover {
    background: rgba(255, 193, 7, 0.22);
    border-color: rgba(255, 193, 7, 0.65);
    color: var(--text-light);
}

.table-dark {
    background: rgba(13, 27, 62, 0.7);
    border-color: rgba(75, 108, 183, 0.1);
}

.table-dark th,
.table-dark td {
    border-color: rgba(75, 108, 183, 0.1);
}

.table.table-dark thead th,
.table thead.table-dark th {
    background: rgba(75, 108, 183, 0.2);
    color: var(--text-light);
}

/* Navigation Tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(75, 108, 183, 0.1);
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 12px 20px;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: none;
}

/* Progress bars */
.progress {
    background: rgba(13, 27, 62, 0.5);
    border-radius: 10px;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
}

/* ==========================================================================
   CRYPTO / DECRYPT SECTION
   ========================================================================== */
.modern-input {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 10px !important;
    color: var(--text-light, #f3f4f6) !important;
    font-weight: 500;
    padding: 10px 14px !important;
    transition: all 0.3s ease;
}

.modern-input:focus {
    border-color: rgba(139,92,246,0.4) !important;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1) !important;
    background: rgba(255,255,255,0.06) !important;
}

.modern-input::placeholder {
    color: var(--text-muted, #9ca3af) !important;
    font-weight: 400;
}

.crypto-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.crypto-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.82em;
    font-weight: 500;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--text-secondary, #d1d5db);
}

.crypto-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.12);
    font-size: 0.88em;
    color: var(--text-secondary, #d1d5db);
    margin-bottom: 22px;
    line-height: 1.5;
}

.crypto-hint i {
    color: #60a5fa;
    margin-top: 2px;
    font-size: 1em;
    flex-shrink: 0;
}

.crypto-hint-warn {
    background: rgba(245,158,11,0.06);
    border-color: rgba(245,158,11,0.12);
}

.crypto-hint-warn i {
    color: #fbbf24;
}

.crypto-optional-badge {
    font-size: 0.75em;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted, #9ca3af);
}

.crypto-result {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.crypto-output {
    background: rgba(0,0,0,0.2) !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
    letter-spacing: 0.3px;
}

.crypto-migration-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.crypto-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.crypto-step:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(139,92,246,0.15);
}

.crypto-step-num {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82em;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(192,132,252,0.08));
    border: 1px solid rgba(139,92,246,0.2);
    color: #a78bfa;
    flex-shrink: 0;
}

.btn-crypto-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9em;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 15px rgba(239,68,68,0.25);
}

.btn-crypto-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239,68,68,0.4);
}

@media (max-width: 768px) {
    .crypto-status-bar {
        gap: 8px;
    }
    .crypto-status-pill {
        font-size: 0.78em;
        padding: 5px 12px;
    }
    .crypto-migration-steps {
        gap: 8px;
    }
    .crypto-step {
        padding: 12px 14px;
    }
}

/* ==========================================================================
   SETTINGS SECTION
   ========================================================================== */

/* ── Profile Row ── */
.settings-profile-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
}

.settings-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: 2px solid rgba(139,92,246,0.25);
    object-fit: cover;
    flex-shrink: 0;
}

.settings-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.settings-profile-name {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-light, #f3f4f6);
}

.settings-profile-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84em;
    color: var(--text-muted, #9ca3af);
}

.settings-profile-rank {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Detail Items ── */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.3s ease;
}

.settings-item:hover {
    background: rgba(255,255,255,0.045);
    border-color: rgba(139,92,246,0.12);
}

.settings-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88em;
    flex-shrink: 0;
}

.settings-item-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.settings-item-label {
    font-size: 0.88em;
    font-weight: 500;
    color: var(--text-muted, #9ca3af);
}

.settings-item-value {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-light, #f3f4f6);
}

.settings-sensitive-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.settings-sensitive-value {
    word-break: break-word;
}

.settings-sensitive-toggle {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(139,92,246,0.3);
    background: rgba(139,92,246,0.12);
    color: #c4b5fd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.settings-sensitive-toggle:hover {
    background: rgba(139,92,246,0.2);
    border-color: rgba(167,139,250,0.45);
    color: #ddd6fe;
}

.settings-sensitive-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(139,92,246,0.35);
}

.settings-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.3;
}
.settings-status-badge > i {
    flex: 0 0 auto;
}

.settings-status-active {
    background: rgba(16,185,129,0.12);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}

.settings-status-pending {
    background: rgba(245,158,11,0.12);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.2);
}

.settings-status-info {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,0.2);
}

.settings-status-primary {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.2);
}

.mail-notification-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mail-notification-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mail-notification-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: default;
}

.mail-notification-row:hover {
    background: rgba(255,255,255,0.045);
    border-color: rgba(245,158,11,0.18);
}

.mail-notification-row-locked {
    opacity: 0.86;
}

.mail-notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.22);
}

.mail-notification-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.mail-notification-row:not(.mail-notification-row-locked) .mail-notification-copy,
.mail-notification-row:not(.mail-notification-row-locked) .form-check-input {
    cursor: pointer;
}

.mail-notification-title {
    color: var(--text-light, #f3f4f6);
    font-size: 0.94rem;
    font-weight: 700;
}

.mail-notification-desc,
.mail-notification-templates {
    color: var(--text-muted, #9ca3af);
    font-size: 0.8rem;
    line-height: 1.35;
}

.mail-notification-templates {
    color: #b6c2d9;
    word-break: break-word;
}

.mail-notification-switch {
    min-width: 48px;
    display: inline-flex;
    justify-content: flex-end;
    margin: 0;
}

.mail-notification-actions {
    display: flex;
    justify-content: flex-end;
}

/* ── Actions Grid ── */
.settings-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.settings-action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    text-align: center;
}

.settings-action-tile:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(139,92,246,0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.settings-action-tile.settings-action-logout:hover {
    border-color: rgba(239,68,68,0.25);
}

.settings-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15em;
}

.settings-action-label {
    font-size: 0.92em;
    font-weight: 700;
    color: var(--text-light, #f3f4f6);
}

.settings-action-desc {
    font-size: 0.78em;
    color: var(--text-muted, #9ca3af);
    line-height: 1.3;
}

.settings-action-form {
    display: contents;
}

button.settings-action-tile {
    cursor: pointer;
    font: inherit;
    color: inherit;
}

@media (max-width: 768px) {
    .settings-profile-row {
        flex-wrap: wrap;
    }
    .settings-profile-rank {
        margin-left: 0;
        width: 100%;
        margin-top: 4px;
    }
    .settings-item {
        padding: 12px 14px;
    }
    .settings-item-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .settings-sensitive-wrap {
        width: 100%;
        justify-content: space-between;
    }
    .mail-notification-row {
        grid-template-columns: 36px minmax(0, 1fr);
    }
    .mail-notification-switch {
        grid-column: 2;
        justify-content: flex-start;
    }
    .mail-notification-actions {
        justify-content: stretch;
    }
    .mail-notification-actions .btn {
        width: 100%;
    }
    .settings-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tooltips */
.tooltip-inner {
    background: rgba(13, 27, 62, 0.95);
    border: 1px solid rgba(75, 108, 183, 0.3);
    color: var(--text-light);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(13, 27, 62, 0.95);
}

.tooltip.bs-tooltip-right .tooltip-arrow::before {
    border-right-color: rgba(13, 27, 62, 0.95);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: rgba(13, 27, 62, 0.95);
}

.tooltip.bs-tooltip-left .tooltip-arrow::before {
    border-left-color: rgba(13, 27, 62, 0.95);
}

/* ==========================================================================
   CSP-COMPLIANT UTILITY CLASSES (migrated from inline styles)
   ========================================================================== */

/* ── Setup Card Icon Variants ── */
.setup-icon-amber {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(217,119,6,0.25));
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.2);
}
.setup-icon-green {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.25));
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.2);
}
.setup-icon-purple {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(109,40,217,0.25));
    color: #a78bfa;
    border: 1px solid rgba(139,92,246,0.2);
}
.setup-icon-discord {
    background: linear-gradient(135deg, rgba(88,101,242,0.15), rgba(71,82,196,0.25));
    color: #7289da;
    border: 1px solid rgba(88,101,242,0.2);
}
.setup-icon-twitch {
    background: linear-gradient(135deg, rgba(145,70,255,0.15), rgba(100,65,165,0.25));
    color: #a970ff;
    border: 1px solid rgba(145,70,255,0.2);
}
.setup-icon-decrypt {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.1));
    border-color: rgba(245,158,11,0.2);
}
.setup-icon-settings {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(192,132,252,0.1));
    border-color: rgba(139,92,246,0.2);
}

/* ── Section Header Icon Variants ── */
.sh-icon-blue {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}
.sh-icon-purple {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
}
.sh-icon-twitch {
    background: rgba(145,70,255,0.12);
    color: #a970ff;
}
.sh-icon-discord {
    background: rgba(88,101,242,0.12);
    color: #7289da;
}
.sh-icon-guide {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}

/* ── Settings Item Icon Variants ── */
.si-icon-green {
    background: rgba(16,185,129,0.1);
    color: #34d399;
}
.si-icon-purple {
    background: rgba(139,92,246,0.1);
    color: #a78bfa;
}
.si-icon-blue {
    background: rgba(59,130,246,0.1);
    color: #60a5fa;
}
.si-icon-amber {
    background: rgba(245,158,11,0.1);
    color: #fbbf24;
}
.si-icon-pink {
    background: rgba(236,72,153,0.1);
    color: #f472b6;
}

/* ── Action Icon Variants ── */
.ai-icon-purple {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
}
.ai-icon-twitch {
    background: rgba(145,70,255,0.12);
    color: #a970ff;
}
.ai-icon-blue {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}
.ai-icon-green {
    background: rgba(16,185,129,0.12);
    color: #34d399;
}
.ai-icon-amber {
    background: rgba(245,158,11,0.12);
    color: #fbbf24;
}
.ai-icon-cyan {
    background: rgba(6,182,212,0.12);
    color: #67e8f9;
}
.ai-icon-red {
    background: rgba(239,68,68,0.1);
    color: #f87171;
}

/* ── Admin Status Icon Variants ── */
.sti-icon-indigo {
    background: rgba(99,102,241,0.12);
    color: #818cf8;
}
.sti-icon-green {
    background: rgba(16,185,129,0.12);
    color: #34d399;
}
.sti-icon-amber {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}
.sti-icon-purple {
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
}
.sti-icon-blue {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}

/* ── Color Utilities ── */
.clr-accent { color: var(--accent-color); }
.clr-purple { color: #a78bfa; }
.clr-blue { color: #60a5fa; }
.clr-discord { color: #7289da; }
.clr-discord-brand { color: #5865F2; }
.clr-twitch { color: #a970ff; }
.clr-amber { color: #fbbf24; }
.clr-amber-dark { color: #f59e0b; }
.clr-green { color: #34d399; }
.clr-green-dark { color: #10b981; }
.clr-red { color: #f87171; }
.clr-indigo { color: #818cf8; }
.clr-pink { color: #f472b6; }
.clr-violet { color: #c4b5fd; }
.clr-text-muted { color: var(--text-muted); }
.clr-text-secondary { color: var(--text-secondary); }
.clr-text-secondary-fallback { color: var(--text-secondary, #d1d5db); }
.clr-text-light { color: var(--text-light); }
.clr-text-primary { color: var(--text-primary); }
.clr-active { color: #10b981; }
.clr-inactive { color: #ef4444; }

/* ── Typography Utilities ── */
.fs-05 { font-size: 0.5em; }
.fs-06 { font-size: 0.6em; }
.fs-084 { font-size: 0.84em; }
.fs-085 { font-size: 0.85em; }
.fs-09 { font-size: 0.9em; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.m0-fw700 { margin: 0; font-weight: 700; }

/* ── Layout / Spacing Utilities ── */
.mb-0-imp { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.pt-8 { padding-top: 8px; }
.pad-14-16 { padding: 14px 16px; }
.m0 { margin: 0; }
.m0-pl18 { margin: 0; padding-left: 18px; }
.lh-155 { line-height: 1.55; }
.jc-start { justify-content: flex-start; }
.jc-start-gap12 { justify-content: flex-start; gap: 12px; }
.jc-start-gap12-wrap { justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.mw-360 { max-width: 360px; }
.mw-min220 { min-width: 220px; }
.rounded-end-lg { border-radius: 0 8px 8px 0; }
.progress-h8 { height: 8px; }

/* ── Border Utilities ── */
.border-top-subtle { border-top: 1px solid rgba(148,163,184,0.2); }
.bc-blue { border-color: rgba(59,130,246,0.2); }
.bc-discord { border-color: rgba(88,101,242,0.2); }
.bc-twitch { border-color: rgba(145,70,255,0.2); }
.bc-red { border-color: rgba(239,68,68,0.2); }
.bc-red-strong { border-color: rgba(239,68,68,0.25); }

/* ── Code Highlight Badges ── */
.code-purple {
    color: #a78bfa;
    background: rgba(139,92,246,0.1);
    padding: 1px 6px;
    border-radius: 4px;
}
.code-purple-lg {
    color: #a78bfa;
    background: rgba(139,92,246,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.code-amber {
    color: #fbbf24;
    background: rgba(245,158,11,0.1);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ── Config Badge Variants ── */
.cbadge-green {
    background: rgba(16,185,129,0.12);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}
.cbadge-violet {
    background: rgba(168,85,247,0.12);
    color: #c4b5fd;
    border: 1px solid rgba(168,85,247,0.2);
}
.cbadge-red {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}
.cbadge-prod {
    background: rgba(16,185,129,0.2);
    color: #34d399;
}
.cbadge-dev {
    background: rgba(245,158,11,0.2);
    color: #fbbf24;
}

/* ── Display Utilities ── */
.d-none-csp { display: none; }

/* ── Card / Background Variants ── */
.card-dark-subtle {
    background: rgba(17,24,39,0.55);
    border: 1px solid rgba(148,163,184,0.18);
}

.youtube-workflow-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.youtube-workflow-card .form-control,
.youtube-workflow-card .form-select,
.youtube-workflow-card .input-group,
.youtube-workflow-card .youtube-workflow-actions a,
.youtube-workflow-card .youtube-workflow-head,
.youtube-workflow-card .youtube-workflow-points {
    max-width: 100%;
    box-sizing: border-box;
}
.youtube-workflow-card details,
.youtube-workflow-card details[open] > *:not(summary) {
    overflow-x: auto;
}

.youtube-workflow-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.youtube-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.youtube-workflow-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
    line-height: 1.5;
}

.youtube-workflow-warning i {
    margin-top: 2px;
    color: #fbbf24;
}

.youtube-workflow-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.youtube-workflow-point {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.16);
    background: rgba(255,255,255,0.03);
}

.youtube-workflow-point-label {
    display: inline-flex;
    margin-bottom: 6px;
    color: #93c5fd;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.youtube-workflow-point strong {
    display: block;
    color: #f8fafc;
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 700;
}

.youtube-workflow-footnote a {
    color: #c4b5fd;
    text-decoration: none;
    font-weight: 700;
}

.youtube-workflow-footnote a:hover,
.youtube-workflow-footnote a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 991px) {
    .youtube-workflow-points {
        grid-template-columns: 1fr;
    }
}

/* ── Account Info Row Styles ── */
.acc-label {
    color: var(--text-muted);
    font-size: 0.85em;
}
.acc-value-bold { font-weight: 600; }
.acc-value-secondary {
    font-weight: 500;
    font-size: 0.9em;
    opacity: 0.8;
}
.acc-value-date {
    font-weight: 500;
    font-size: 0.9em;
}

.account-license-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.account-license-input {
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.26);
    background: linear-gradient(180deg, rgba(23, 30, 59, 0.92) 0%, rgba(18, 24, 49, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(5, 10, 26, 0.22);
    color: #eef2ff;
}

.account-license-input:focus {
    border-color: rgba(250, 204, 21, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(250, 204, 21, 0.14), inset 0 1px 0 rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(27, 35, 68, 0.96) 0%, rgba(20, 27, 54, 0.98) 100%);
    color: #ffffff;
}

.account-license-input::placeholder {
    color: rgba(191, 201, 255, 0.62);
}

.account-license-btn {
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.account-license-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.account-license-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(167, 139, 250, 0.18);
}

.account-license-btn-primary {
    color: #fff7d6;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.24) 0%, rgba(234, 179, 8, 0.14) 100%);
    border-color: rgba(250, 204, 21, 0.55);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(234, 179, 8, 0.12);
}

.account-license-btn-primary:hover:not(:disabled) {
    color: #fffbea;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.32) 0%, rgba(245, 158, 11, 0.2) 100%);
    border-color: rgba(252, 211, 77, 0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 14px 26px rgba(245, 158, 11, 0.18);
}

.account-license-btn-secondary {
    color: #dbe4ff;
    background: rgba(30, 41, 79, 0.72);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.account-license-btn-secondary:hover:not(:disabled) {
    color: #f8faff;
    background: rgba(45, 58, 108, 0.88);
    border-color: rgba(125, 211, 252, 0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 24px rgba(14, 165, 233, 0.1);
}

.account-license-btn:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .account-license-actions {
        align-items: stretch;
    }

    .account-license-btn {
        flex: 1 1 calc(50% - 5px);
    }
}

@media (max-width: 389.98px) {
    .main-dashboard {
        padding: 76px 12px 16px;
    }

    .dashboard-header,
    .dashboard-card,
    .admin-config-card,
    .admin-guide-card,
    .setup-guide-section,
    .twitch-auth-card {
        padding: 14px;
    }

    .sidebar-toggle {
        top: 14px;
        left: 14px;
    }

    .dashboard-rank-toggle summary,
    .dashboard-rank-panel-top,
    .section-header,
    .status-banner,
    .admin-status-item,
    .admin-form-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-rank-lights {
        margin-left: 0;
    }

    .dashboard-rank-trigger-icon {
        align-self: flex-end;
    }

    .setup-card-content .setup-action-btn,
    .card-dark-subtle .setup-action-btn,
    .btn-admin-primary,
    .btn-admin-secondary,
    .account-license-btn {
        width: 100%;
        white-space: normal;
    }

    .setup-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .setup-card-actions,
    .setup-card-actions .btn,
    .twitch-copy-actions {
        width: 100%;
    }

    .setup-card-content .setup-action-btn,
    .card-dark-subtle .setup-action-btn {
        justify-content: center;
    }

    .setup-guide-kv-row,
    .twitch-auth-header,
    .twitch-auth-step {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .twitch-step-number {
        margin-top: 0;
    }

    .admin-status-grid,
    .settings-actions-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-config-summary,
    .admin-config-summary-item,
    .account-license-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-value,
    .admin-mail-subject-pill {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .main-dashboard .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-dashboard .table-responsive > .table {
        min-width: 640px;
    }

    .youtube-workflow-actions .setup-action-btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
}

/* ── Dynamic Status Indicators ── */
.dot-active-clr {
    color: #10b981;
    font-size: 0.6em;
}
.dot-inactive-clr {
    color: #ef4444;
    font-size: 0.6em;
}

/* ── Crypto Step Descriptions ── */
.step-title { color: var(--text-light); }
.step-desc {
    margin: 4px 0 0;
    font-size: 0.84em;
    color: var(--text-secondary, #d1d5db);
}
.step-desc-spaced {
    margin: 4px 0 8px;
    font-size: 0.84em;
    color: var(--text-secondary, #d1d5db);
}

/* ── Guide Styles ── */
.guide-link {
    color: var(--accent-color);
    text-decoration: underline;
}
.guide-note {
    font-size: 0.85em;
    color: var(--text-secondary);
}
.guide-h6 {
    margin: 0;
    font-weight: 700;
    color: var(--text-light);
}

/* ── Animation Utility ── */
.sw-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Team-Zugang (Tenant-Delegates) */
.sw-delegate-note-field { min-width: 220px; }
.sw-delegate-invite-code { word-break: break-all; display: block; margin-top: 4px; }

/* === StreamElements Guard === */
.streamguard-card .streamguard-switch-card {
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.streamguard-card .streamguard-switch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    max-width: 760px;
}

.streamguard-card .streamguard-switch-form {
    margin: 0;
}

.streamguard-card .streamguard-switch-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    color: var(--text-primary, #f3f4f6);
    text-align: left;
    box-shadow: 0 12px 26px rgba(3, 7, 18, 0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.streamguard-card .streamguard-switch-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.36);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
}

.streamguard-card .streamguard-switch-btn:disabled {
    cursor: default;
    opacity: 1;
}

.streamguard-card .streamguard-switch-btn.is-active {
    border-color: rgba(139, 92, 246, 0.44);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.38));
    box-shadow: 0 18px 36px rgba(76, 29, 149, 0.24);
}

.streamguard-card .streamguard-switch-btn-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    flex: 0 0 auto;
}

.streamguard-card .streamguard-switch-btn.is-active .streamguard-switch-btn-icon {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.14);
}

.streamguard-card .streamguard-switch-btn-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.streamguard-card .streamguard-switch-btn-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-primary, #f3f4f6);
    line-height: 1.2;
    word-break: break-word;
}

.streamguard-card .streamguard-switch-btn-meta {
    font-size: 0.78rem;
    color: rgba(243, 244, 246, 0.76);
    line-height: 1.2;
}

.streamguard-card .streamguard-disclosure {
    margin-top: 16px;
    border: 1px solid rgba(147, 197, 253, 0.16);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.streamguard-card .streamguard-disclosure > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    color: #f5f7ff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.streamguard-card .streamguard-disclosure > summary::-webkit-details-marker {
    display: none;
}

.streamguard-card .streamguard-disclosure > summary:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.42);
}

.streamguard-card .streamguard-disclosure:hover,
.streamguard-card .streamguard-disclosure[open] {
    border-color: rgba(125, 211, 252, 0.28);
    background: linear-gradient(180deg, rgba(12, 26, 58, 0.66), rgba(255, 255, 255, 0.03));
}

.streamguard-card .streamguard-disclosure-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.streamguard-card .streamguard-disclosure-title i {
    color: #7dd3fc;
    flex: 0 0 auto;
}

.streamguard-card .streamguard-disclosure-cue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(239, 246, 255, 0.9);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.streamguard-card .streamguard-disclosure-cue i {
    font-size: 0.72rem;
    transition: transform 0.18s ease;
}

.streamguard-card .streamguard-disclosure[open] .streamguard-disclosure-cue {
    background: rgba(125, 211, 252, 0.16);
    color: #dff4ff;
}

.streamguard-card .streamguard-disclosure[open] .streamguard-disclosure-cue i {
    transform: rotate(180deg);
}

.streamguard-card .streamguard-disclosure-body {
    padding: 0 0 2px;
}

.streamguard-card .streamguard-runstatus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.streamguard-card .streamguard-runstatus-stat {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.streamguard-card .streamguard-runstatus-stat-status {
    border-color: rgba(125, 211, 252, 0.22);
    background: linear-gradient(180deg, rgba(14, 116, 144, 0.18), rgba(255, 255, 255, 0.025));
}

.streamguard-card .streamguard-runstatus-label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.72);
}

.streamguard-card .streamguard-runstatus-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #f8fafc;
    word-break: break-word;
}

.streamguard-card .streamguard-runstatus-meta {
    display: block;
    margin-top: 7px;
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.72);
}

.streamguard-card .streamguard-runstatus-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 14px;
    font-size: 0.84rem;
    color: rgba(226, 232, 240, 0.82);
}

.streamguard-card .streamguard-runstatus-summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(241, 245, 249, 0.92);
    line-height: 1.5;
}

.streamguard-card .streamguard-runstatus-summary i {
    margin-top: 2px;
    color: #7dd3fc;
    flex: 0 0 auto;
}

.streamguard-card .streamguard-runstatus-pillrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.streamguard-card .streamguard-runstatus-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(241, 245, 249, 0.92);
    font-size: 0.78rem;
    line-height: 1.2;
}

.streamguard-card .streamguard-runstatus-pill strong {
    font-size: 0.84rem;
    font-weight: 800;
    color: #fff;
}

.streamguard-card .streamguard-runstatus-pill.is-adjusted {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.12);
}

.streamguard-card .streamguard-runstatus-pill.is-subscriber {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
}

.streamguard-card .streamguard-runstatus-pill.is-verification,
.streamguard-card .streamguard-runstatus-pill.is-baseline,
.streamguard-card .streamguard-runstatus-pill.is-unchanged {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(59, 130, 246, 0.11);
}

.streamguard-card .streamguard-runstatus-pill.is-error {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(239, 68, 68, 0.12);
}

.streamguard-card .streamguard-runstatus-disclosure {
    margin-top: 16px;
}

.streamguard-card .streamguard-runstatus-table-wrap {
    max-height: 380px;
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.28);
}

.streamguard-card .streamguard-runstatus-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.streamguard-card .streamguard-runstatus-detail-table {
    min-width: 980px;
}

.streamguard-card .streamguard-runstatus-table th,
.streamguard-card .streamguard-runstatus-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

.streamguard-card .streamguard-runstatus-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(15, 23, 42, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.82);
}

.streamguard-card .streamguard-runstatus-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018);
}

.streamguard-card .streamguard-runstatus-table td {
    color: rgba(248, 250, 252, 0.94);
    font-size: 0.9rem;
}

.streamguard-card .streamguard-runstatus-table td.is-numeric {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.streamguard-card .streamguard-runstatus-table td.is-note,
.streamguard-card .streamguard-runstatus-table th.is-wide {
    min-width: 280px;
}

.streamguard-card .streamguard-runstatus-cell-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.streamguard-card .streamguard-runstatus-cell-tag.state-subscriber {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.14);
    color: #fde68a;
}

.streamguard-card .streamguard-runstatus-cell-tag.state-not_subscriber {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.streamguard-card .streamguard-runstatus-cell-tag.state-check_failed {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.streamguard-card .streamguard-runstatus-cell-tag.state-not_checked,
.streamguard-card .streamguard-runstatus-cell-tag.state-unknown {
    border-color: rgba(96, 165, 250, 0.26);
    background: rgba(59, 130, 246, 0.11);
    color: #bfdbfe;
}

.streamguard-card .streamguard-history-form .form-control,
.streamguard-card .streamguard-history-form .btn {
    min-height: 48px;
}

.streamguard-card .streamguard-history-search-hint {
    margin-top: 8px;
}

.streamguard-card .streamguard-history-table-wrap {
    max-height: 70vh;
    overflow: auto;
}

.streamguard-card .streamguard-history-form-submit {
    align-self: flex-end;
}

.streamguard-card .streamguard-history-form .streamguard-history-form-submit .btn {
    min-height: 48px;
}

.streamguard-card .streamguard-history-sortable thead th {
    padding: 0;
}

.streamguard-card .streamguard-sort-link {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 11px 12px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.streamguard-card .streamguard-sort-link:hover,
.streamguard-card .streamguard-sort-link:focus {
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.08);
    text-decoration: none;
}

.streamguard-card .streamguard-history-sortable thead th.is-numeric .streamguard-sort-link {
    justify-content: flex-end;
}

.streamguard-card .streamguard-sort-icon {
    font-size: 0.72rem;
    opacity: 0.4;
    transition: opacity 0.15s ease, color 0.15s ease;
    margin-left: 2px;
}

.streamguard-card .streamguard-sort-icon.is-active {
    opacity: 1;
    color: #60a5fa;
}

.streamguard-card .streamguard-sort-link:hover .streamguard-sort-icon {
    opacity: 0.85;
}

/* === Team-Zugang / Delegates === */
.delegates-card .section-subtitle {
    max-width: 780px;
}

.delegates-card .delegates-stats {
    margin-bottom: 20px;
}

.delegates-card .delegates-stat-card {
    min-height: 104px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.delegates-card .delegates-stat-copy {
    min-width: 0;
}

.delegates-card .delegates-stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.delegates-card .delegates-stat-icon.stat-icon-green { background: linear-gradient(135deg, #10b981, #059669); }
.delegates-card .delegates-stat-icon.stat-icon-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.delegates-card .delegates-stat-icon.stat-icon-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.delegates-card .delegates-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary, #f3f4f6);
}

.delegates-card .delegates-stat-label {
    margin-top: 4px;
    font-size: 0.86rem;
    color: var(--text-secondary, #d1d5db);
}

.delegates-card .delegates-invite-card {
    border: 1px solid rgba(139,92,246,0.18);
}

.delegates-card .team-api-docs summary {
    cursor: pointer;
    color: var(--text-primary, #f3f4f6);
}

.delegates-card .team-api-examples {
    display: grid;
    gap: 14px;
}

.delegates-card .team-api-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15,23,42,0.52);
    border: 1px solid rgba(148,163,184,0.16);
    color: var(--text-secondary, #d1d5db);
    font-size: 0.86rem;
}

.delegates-card .team-api-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(59,130,246,0.16);
    color: #bfdbfe;
    border: 1px solid rgba(96,165,250,0.28);
    font-weight: 700;
    letter-spacing: 0;
}

.delegates-card .team-api-live-test {
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(59,130,246,0.025));
    border: 1px solid rgba(96,165,250,0.24);
}

.delegates-card .team-api-live-test-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.delegates-card .team-api-live-test h5 {
    margin: 0 0 5px;
    color: var(--text-primary, #f3f4f6);
    font-size: 1rem;
    line-height: 1.35;
}

.delegates-card .team-api-live-test p {
    margin: 0;
    color: var(--text-secondary, #d1d5db);
    font-size: 0.88rem;
    line-height: 1.55;
}

.delegates-card .team-api-live-test-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.delegates-card .team-api-live-key-input {
    flex: 1 1 320px;
    min-width: min(100%, 240px);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.88rem;
}

.delegates-card .team-api-live-test-controls .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    white-space: nowrap;
}

.delegates-card .team-api-live-status {
    min-height: 20px;
    margin-top: 8px;
    color: var(--text-secondary, #d1d5db);
    font-size: 0.86rem;
}

.delegates-card .team-api-live-status-ok {
    color: #86efac;
}

.delegates-card .team-api-live-status-error {
    color: #fca5a5;
}

.delegates-card .team-api-live-result {
    margin-top: 12px;
    max-height: 360px;
}

.delegates-card .team-api-example {
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.042), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
}

.delegates-card .team-api-example h5 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    color: var(--text-primary, #f3f4f6);
    font-size: 0.98rem;
    line-height: 1.35;
}

.delegates-card .team-api-example h5 > span:first-child {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.18);
    color: #dbeafe;
    border: 1px solid rgba(96,165,250,0.3);
    font-size: 0.82rem;
    font-weight: 800;
}

.delegates-card .team-api-example p {
    margin: 0 0 10px;
    color: var(--text-secondary, #d1d5db);
    font-size: 0.88rem;
    line-height: 1.55;
}

.delegates-card .team-api-code-label {
    margin: 10px 0 5px;
    color: #93c5fd;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.delegates-card .team-api-code {
    margin: 0;
    padding: 11px 12px;
    overflow-x: auto;
    border-radius: 10px;
    background: rgba(3,7,18,0.78);
    border: 1px solid rgba(148,163,184,0.16);
    color: #dbeafe;
    font-size: 0.82rem;
    line-height: 1.55;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.delegates-card .team-api-code code {
    display: block;
    min-width: 0;
    color: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.delegates-card .team-api-example-compact .team-api-code {
    color: #e5e7eb;
}

.delegates-card .team-api-error-list {
    display: grid;
    gap: 8px;
}

.delegates-card .team-api-error-row {
    display: grid;
    grid-template-columns: minmax(160px, 210px) 1fr;
    gap: 10px;
    align-items: start;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(3,7,18,0.52);
    border: 1px solid rgba(148,163,184,0.14);
    color: var(--text-secondary, #d1d5db);
    font-size: 0.86rem;
    line-height: 1.45;
}

.delegates-card .team-api-error-row code {
    color: #dbeafe;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
}

.delegates-card .team-api-footnote {
    margin: 2px 0 0;
    color: var(--text-secondary, #d1d5db);
    font-size: 0.86rem;
    line-height: 1.55;
}

@media (max-width: 575.98px) {
    .delegates-card .team-api-example {
        padding: 12px;
        border-radius: 12px;
    }

    .delegates-card .team-api-code {
        font-size: 0.78rem;
    }

    .delegates-card .team-api-error-row {
        grid-template-columns: 1fr;
    }
}

.delegates-card .delegate-invite-fresh {
    padding: 14px;
    border-radius: 14px;
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.22);
}

.delegates-card .delegate-invite-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.delegates-card .delegate-invite-input-group .delegate-invite-url-input {
    flex: 1 1 280px;
    min-width: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    font-size: 0.88rem;
}

.delegates-card .delegate-invite-input-group .btn {
    white-space: nowrap;
}

.delegates-card .delegates-member-grid {
    margin-top: 0;
}

.delegates-card .delegate-member-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 26px rgba(3,7,18,0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.delegates-card .delegate-member-card:hover {
    transform: translateY(-2px);
    border-color: rgba(139,92,246,0.32);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

.delegates-card .delegate-member-card-active {
    border-color: rgba(16,185,129,0.45);
    background: linear-gradient(180deg, rgba(16,185,129,0.08), rgba(16,185,129,0.03));
}

.delegates-card .delegate-card-copy {
    min-width: 0;
}

.delegates-card .delegate-avatar,
.delegates-card .delegate-avatar-fallback {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    border-radius: 18px;
    flex: 0 0 58px;
}

.delegates-card .delegate-avatar {
    display: block;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 18px rgba(15,23,42,0.18);
}

.delegates-card .delegate-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f3f4f6;
    background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(139,92,246,0.92));
    border: 1px solid rgba(255,255,255,0.08);
}

.delegates-card .delegate-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #f3f4f6);
    word-break: break-word;
}

.delegates-card .delegate-card-meta {
    line-height: 1.45;
}

.delegates-card .delegate-note-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.78rem;
    color: var(--text-secondary, #d1d5db);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delegates-card .delegate-card-actions {
    display: grid;
    gap: 10px;
}

.delegates-card .delegate-card-actions-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.delegates-card .delegate-card-actions form {
    margin: 0;
}

.delegates-card .delegate-card-actions .btn {
    width: 100%;
}

.delegates-card .delegate-active-badge {
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-weight: 700;
}

.delegates-card .delegates-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--text-secondary, #d1d5db);
    text-align: center;
}

.delegates-card .delegates-empty i {
    font-size: 1.8rem;
    opacity: 0.7;
}

.delegates-card .delegates-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #d1d5db);
}

@media (max-width: 991.98px) {
    .delegates-card .delegate-card-actions-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .streamguard-card .streamguard-switch-grid {
        grid-template-columns: 1fr;
    }

    .streamguard-card .streamguard-disclosure > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .streamguard-card .streamguard-disclosure-cue {
        align-self: flex-start;
    }

    .streamguard-card .streamguard-runstatus-grid {
        grid-template-columns: 1fr;
    }

    .streamguard-card .streamguard-runstatus-submeta {
        flex-direction: column;
        gap: 6px;
    }

    .delegates-card .delegate-invite-input-group .btn {
        width: 100%;
    }
}

/* === StreamElements Guard Streamstats-aligned refresh === */
.streamguard-shell {
    display: grid;
    gap: 18px;
}

.streamguard-shell > .mb-12,
.streamguard-shell > .mb-16,
.streamguard-shell .modern-alert {
    margin-bottom: 0 !important;
}

.streamguard-hero {
    margin-bottom: 0;
}

.streamguard-card .admin-config-card {
    margin-bottom: 0 !important;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.30);
    box-shadow: none;
    overflow: hidden;
}

.streamguard-card .admin-config-card-header {
    min-height: 54px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 8, 23, 0.20) !important;
    color: #f8fafc;
    font-size: 1.02rem;
    line-height: 1.25;
}

.streamguard-card .admin-config-card-header > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.streamguard-card .admin-config-card > .p-3,
.streamguard-card .admin-config-card > form.p-3 {
    padding: 16px !important;
}

.streamguard-card .streamguard-switch-card {
    border-color: rgba(148, 163, 184, 0.16);
}

.streamguard-card .streamguard-switch-grid {
    max-width: none;
}

.streamguard-card .streamguard-switch-btn,
.streamguard-card .streamguard-runstatus-stat,
.streamguard-card .streamguard-runstatus-summary,
.streamguard-card .streamguard-disclosure,
.streamguard-card .streamguard-runstatus-table-wrap {
    border-radius: 8px;
    box-shadow: none;
}

.streamguard-card .streamguard-switch-btn {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(2, 8, 23, 0.24);
}

.streamguard-card .streamguard-switch-btn:hover:not(:disabled),
.streamguard-card .streamguard-switch-btn.is-active {
    transform: none;
    border-color: rgba(96, 165, 250, 0.34);
    background: rgba(30, 64, 175, 0.14);
}

.streamguard-card .streamguard-switch-btn-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 8px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(96, 165, 250, 0.22);
}

.streamguard-card .streamguard-switch-btn.is-active .streamguard-switch-btn-icon {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
}

.streamguard-card .streamguard-switch-btn-title {
    color: #f8fafc;
    font-weight: 800;
}

.streamguard-card .streamguard-switch-btn-meta {
    color: #94a3b8;
}

.streamguard-card .streamguard-disclosure {
    margin-top: 14px;
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(2, 8, 23, 0.24);
}

.streamguard-card .streamguard-disclosure:hover,
.streamguard-card .streamguard-disclosure[open] {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(15, 23, 42, 0.38);
}

.streamguard-card .streamguard-disclosure > summary {
    padding: 13px 14px;
    font-size: 0.94rem;
}

.streamguard-card .streamguard-disclosure-title i {
    color: #bfdbfe;
}

.streamguard-card .streamguard-disclosure-cue {
    background: rgba(15, 23, 42, 0.46);
    color: #cbd5e1;
    box-shadow: none;
}

.streamguard-card .streamguard-runstatus-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.streamguard-card .streamguard-runstatus-stat {
    min-height: 112px;
    padding: 15px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.34);
}

.streamguard-card .streamguard-runstatus-stat-status {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(30, 64, 175, 0.14);
}

.streamguard-card .streamguard-runstatus-label {
    margin-bottom: 9px;
    letter-spacing: 0;
    text-transform: none;
    color: #94a3b8;
    font-size: 0.82rem;
}

.streamguard-card .streamguard-runstatus-value {
    font-size: 1.28rem;
    font-weight: 900;
}

.streamguard-card .streamguard-runstatus-meta,
.streamguard-card .streamguard-runstatus-submeta {
    color: #94a3b8;
}

.streamguard-card .streamguard-runstatus-summary {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(2, 8, 23, 0.24);
}

.streamguard-card .streamguard-runstatus-summary i {
    color: #bfdbfe;
}

.streamguard-card .streamguard-runstatus-pill {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(2, 8, 23, 0.28);
}

.streamguard-card .streamguard-runstatus-table-wrap {
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(2, 8, 23, 0.22);
}

.streamguard-card .streamguard-runstatus-table thead th {
    background: rgba(15, 23, 42, 0.96);
    color: #94a3b8;
    letter-spacing: 0;
}

@media (max-width: 991px) {
    .streamguard-card .streamguard-runstatus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .streamguard-card .streamguard-runstatus-grid,
    .streamguard-card .streamguard-switch-grid,
    .streamguard-status-grid {
        grid-template-columns: 1fr;
    }

    .streamguard-card .admin-config-card-header {
        display: grid !important;
        gap: 10px;
        align-items: start !important;
    }
}

/* === Einheitliche Consent-/Zustimmungs-Bloecke (sw-consent) =================
   Webseitenweit identisches Design fuer rechtliche Zustimmungs-Checkboxen
   (Datenschutz, AGB, Verantwortung, Kauf-Widerruf, Policy-Acks).
   Vorbild: Live-Uebersetzungs-AGB-Karte. Eine Quelle, ein Look. */
.sw-consent {
    margin-top: .85rem;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .30);
    background: rgba(15, 23, 42, .40);
    display: flex;
    flex-direction: column;
    gap: .7rem;
}
.sw-consent.is-pending { border-color: rgba(252, 211, 77, .45); background: rgba(252, 211, 77, .07); }
.sw-consent.is-accepted { border-color: rgba(34, 197, 94, .40); background: rgba(34, 197, 94, .07); }
.sw-consent-row {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    margin: 0;
    cursor: pointer;
}
.sw-consent-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    margin: .12rem 0 0;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, .55);
    background: rgba(15, 23, 42, .85);
    cursor: pointer;
    position: relative;
    transition: background .15s ease, border-color .15s ease;
}
.sw-consent-row input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: rgba(34, 197, 94, .85);
}
.sw-consent-row input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.sw-consent-row input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(125, 211, 252, .7);
    outline-offset: 2px;
}
.sw-consent-text { font-size: .86rem; color: rgba(255, 255, 255, .82); line-height: 1.5; }
.sw-consent-text a { color: #7dd3fc; text-decoration: underline; }
.sw-consent-note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    color: rgba(255, 255, 255, .55);
    font-size: .78rem;
    line-height: 1.45;
    margin: 0;
}
.sw-consent-note i { margin-top: .18rem; color: rgba(145, 70, 255, .7); }
.sw-consent-ok { display: flex; align-items: center; gap: .5rem; color: #86efac; font-size: .88rem; font-weight: 600; }
