/* =====================================================================
   VORKS LICENSE SERVER — Design System v4
   Aesthetic: Hardstyle Industrial · Black/Crimson · Editorial-Tech
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    /* ---- COLOR ---- */
    --bg-base:        #06060a;
    --bg-deep:        #09090f;
    --bg-surface:     #0e0e15;
    --bg-elevated:    #15151e;
    --bg-card:        #11111a;
    --bg-overlay:     rgba(255, 255, 255, 0.03);

    --line:           #1f1f2c;
    --line-strong:    #2c2c3d;
    --line-accent:    rgba(255, 23, 68, 0.25);

    --text:           #f0f0f5;
    --text-muted:     #8a8a9a;
    --text-dim:       #54546a;
    --text-faint:     #2f2f3f;

    --accent:         #ff1744;
    --accent-glow:    #ff4264;
    --accent-deep:    #b3001a;
    --accent-bg:      rgba(255, 23, 68, 0.10);
    --accent-line:    rgba(255, 23, 68, 0.32);

    --success:        #00d97e;
    --success-bg:     rgba(0, 217, 126, 0.10);
    --success-line:   rgba(0, 217, 126, 0.32);

    --warning:        #ffb340;
    --warning-bg:     rgba(255, 179, 64, 0.10);

    --info:           #5b9eff;
    --info-bg:        rgba(91, 158, 255, 0.10);
    --info-line:      rgba(91, 158, 255, 0.32);

    --danger:         #ff3860;
    --danger-bg:      rgba(255, 56, 96, 0.10);

    /* ---- SHAPE ---- */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;

    /* ---- SHADOW ---- */
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:    0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    --shadow-lg:    0 8px 32px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-glow:  0 0 32px rgba(255, 23, 68, 0.18);
    --shadow-card:  0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 3px rgba(0, 0, 0, 0.5), 0 12px 32px -8px rgba(0, 0, 0, 0.5);

    /* ---- TYPOGRAPHY ---- */
    --font-sans:    'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-display: 'Space Grotesk', 'Inter Tight', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

    /* ---- LAYOUT ---- */
    --sidebar-w: 256px;
    --header-h:  64px;
    --container: 1280px;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */

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

html {
    background: var(--bg-base);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 23, 68, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(255, 23, 68, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(91, 158, 255, 0.02) 0%, transparent 60%),
        var(--bg-base);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Subtle grain overlay – gibt Tiefe */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 2px,
            rgba(255, 255, 255, 0.005) 2px,
            rgba(255, 255, 255, 0.005) 4px
        );
    opacity: 0.4;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent); }

/* Custom scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 100px;
    border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-line); }

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.035em;
    background: linear-gradient(180deg, #ffffff 0%, #b8b8c8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 { font-size: 20px; }
h3 { font-size: 16px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    padding: 4px 10px;
    border: 1px solid var(--accent-line);
    border-radius: 100px;
    background: var(--accent-bg);
    margin-bottom: 12px;
}
.eyebrow::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-top: 6px;
    max-width: 65ch;
}

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

code:not(pre code) {
    background: var(--bg-elevated);
    padding: 2px 7px;
    border-radius: var(--r-xs);
    color: var(--accent);
    border: 1px solid var(--line);
    font-size: 0.88em;
}

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

/* =====================================================================
   LAYOUT — Sidebar + Main
   ===================================================================== */

body.has-sidebar {
    min-height: 100vh;
    position: relative;
    z-index: 2;
}
body.has-sidebar .main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

body.auth-only {
    position: relative;
    z-index: 2;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg,
        rgba(11, 11, 17, 0.95) 0%,
        rgba(7, 7, 11, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: -1px;
    width: 1px;
    height: 200px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--accent) 30%,
        var(--accent) 70%,
        transparent 100%);
    opacity: 0.4;
    pointer-events: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 16px;
    color: white;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 4px 12px rgba(255, 23, 68, 0.4);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.brand-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.15) 100%);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1.2;
}
.brand-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Live status indicator on top of sidebar */
.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.sidebar-status .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.9); }
}

.sidebar-section {
    padding: 16px 12px 4px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.sidebar-nav {
    padding: 10px 10px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin-bottom: 1px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--r-sm);
    transition: all 0.15s ease;
    position: relative;
    letter-spacing: -0.005em;
}
.nav-item:hover {
    background: var(--bg-overlay);
    color: var(--text);
}
.nav-item.active {
    background: linear-gradient(90deg,
        rgba(255, 23, 68, 0.12) 0%,
        rgba(255, 23, 68, 0.04) 100%);
    color: var(--text);
    box-shadow: inset 2px 0 0 var(--accent);
}
.nav-item.active .nav-icon { color: var(--accent); }

.nav-icon {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.nav-item:hover .nav-icon { color: var(--text-muted); }

.nav-badge {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    background: var(--bg-elevated);
    padding: 1px 6px;
    border-radius: var(--r-xs);
    border: 1px solid var(--line);
}

.sidebar-divider {
    height: 1px;
    background: var(--line);
    margin: 14px 12px;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
    border-top: 1px solid var(--line);
    padding: 12px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    margin-bottom: 8px;
    background: var(--bg-overlay);
    border: 1px solid var(--line);
    transition: all 0.15s ease;
}
.sidebar-user:hover {
    border-color: var(--line-strong);
    background: var(--bg-elevated);
}

.sidebar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid var(--line);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}
.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.sidebar-user-role { margin-top: 3px; }

.sidebar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 0 4px;
}

/* Lang switcher */
.lang-switch {
    display: inline-flex;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 2px;
    gap: 1px;
}
.lang-switch a {
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    border-radius: 3px;
    transition: all 0.15s ease;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active {
    background: var(--accent);
    color: white;
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    color: var(--text-dim);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    transition: all 0.15s ease;
    cursor: pointer;
}
.icon-btn:hover {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: var(--accent-line);
}

.logout-btn {
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    color: var(--text-dim);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    transition: all 0.15s ease;
}
.logout-btn:hover {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: var(--accent-line);
}

/* =====================================================================
   MAIN CONTENT AREA
   ===================================================================== */

.main-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Top header bar (inside main) */
.app-header {
    height: var(--header-h);
    border-bottom: 1px solid var(--line);
    background: rgba(9, 9, 15, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--text-faint); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

.app-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 32px 32px 48px;
    width: 100%;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px;
    width: 100%;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    position: relative;
}
.page-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.page-header > div:first-child { flex: 1; min-width: 0; }
.page-header h1 { margin-top: 4px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    transition: color 0.15s ease;
}
.back-link:hover { color: var(--accent); }

/* =====================================================================
   STAT GRID — Dashboard cards
   ===================================================================== */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}
.stat:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 40px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.stat:hover::before { opacity: 1; }

.stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 12px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: var(--r-xs);
    font-weight: 600;
}
.stat-trend.up   { color: var(--success); background: var(--success-bg); }
.stat-trend.down { color: var(--accent); background: var(--accent-bg); }

/* =====================================================================
   CARDS
   ===================================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Card-Header sitzt am oberen Rand mit eigenem Padding */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
}

/* Direkt-Children der Card kriegen Padding,
   außer card-header (eigenes), table-wrap/table (eigenes), und card-content (selber definiert) */
.card > form,
.card > p,
.card > ul,
.card > ol,
.card > .api-block,
.card > .card-content {
    padding: 24px;
}
/* Card-Content für expliziten Wrapper */
.card-content { padding: 24px; }

.card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body { padding: 24px; }
.card-body--flush { padding: 0; }

.card-actions { display: flex; gap: 8px; }

/* API-card styling */
.api-card {
    background:
        linear-gradient(135deg,
            rgba(255, 23, 68, 0.04) 0%,
            transparent 50%),
        var(--bg-card);
}

.api-block { margin-bottom: 14px; }
.api-block:last-child { margin-bottom: 0; }
.api-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.api-method {
    display: inline-block;
    padding: 1px 6px;
    background: var(--success-bg);
    color: var(--success);
    border-radius: var(--r-xs);
    border: 1px solid var(--success-line);
    font-size: 9px;
    font-weight: 700;
}
.api-endpoint {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    padding: 12px 16px;
    border-radius: var(--r-md);
    color: var(--text);
    overflow-x: auto;
    white-space: nowrap;
    user-select: all;
    position: relative;
}
.api-endpoint::-webkit-scrollbar { height: 4px; }
.api-endpoint .api-param { color: var(--accent); }
.api-endpoint .api-key   { color: var(--info); }

/* =====================================================================
   FORMS
   ===================================================================== */

.form-group {
    margin-bottom: 16px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=datetime-local], input[type=date], input[type=time], input[type=url], input[type=search],
input[type=tel],
textarea, select {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    transition: all 0.15s ease;
}

input::placeholder, textarea::placeholder {
    color: var(--text-faint);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.15);
}

input:disabled, select:disabled, textarea:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.form-hint {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 6px;
    line-height: 1.5;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

input[type=file] {
    width: 100%;
    background: var(--bg-deep);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
    padding: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
}
input[type=file]:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

input[type=checkbox] {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-xs);
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: all 0.15s ease;
}
input[type=checkbox]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
input[type=checkbox]:checked::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: white;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-sans);
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 0;
    font-weight: 400;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--r-md);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
    user-select: none;
}
.btn:hover {
    border-color: var(--line-strong);
    background: var(--bg-card);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); }

.btn-primary {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    border-color: var(--accent);
    color: white;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 4px 14px rgba(255, 23, 68, 0.35);
}
.btn-primary:hover {
    color: white;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, var(--accent-glow) 0%, var(--accent) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 6px 22px rgba(255, 23, 68, 0.5);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--line);
}

.btn-danger {
    color: var(--danger);
    border-color: rgba(255, 56, 96, 0.3);
}
.btn-danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: var(--r-sm);
}
.btn-block { width: 100%; }

/* Discord button */
.btn-discord {
    background: #5865F2;
    border-color: #5865F2;
    color: white;
}
.btn-discord:hover {
    background: #4f5bda;
    color: white;
    border-color: #5865F2;
}

/* Patreon button */
.btn-patreon {
    background: #ff424d;
    border-color: #ff424d;
    color: white;
}
.btn-patreon:hover {
    background: #e63a44;
    color: white;
    border-color: #ff424d;
}

/* Readonly-Felder (gelockt durch OAuth) */
input.is-locked,
input[readonly].is-locked {
    background: var(--bg-card);
    color: var(--text-muted);
    border-color: var(--line);
    cursor: not-allowed;
    opacity: 0.85;
}
input.is-locked:focus {
    border-color: var(--line);
    box-shadow: none;
    outline: none;
}

/* =====================================================================
   TABLES
   ===================================================================== */

.table-wrap {
    overflow-x: auto;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    font-weight: 600;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
th:first-child { padding-left: 24px; }
th:last-child  { padding-right: 24px; }

td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    vertical-align: middle;
    color: var(--text);
}
td:first-child { padding-left: 24px; }
td:last-child  { padding-right: 24px; }

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

tbody tr {
    transition: background 0.1s ease;
}
tbody tr:hover {
    background: var(--bg-overlay);
}

table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-dim);
}
.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: var(--r-md);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 18px;
}
.empty-state-title { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.empty-state-text { font-size: 12px; color: var(--text-dim); }

/* =====================================================================
   CELLS — User & Product avatars
   ===================================================================== */

.user-cell-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-cell-avatar img,
.user-cell-avatar .fallback {
    width: 32px; height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.user-cell-avatar .fallback {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.product-mark {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background:
        linear-gradient(135deg, rgba(255, 23, 68, 0.10) 0%, rgba(255, 23, 68, 0.02) 100%),
        var(--bg-elevated);
    border: 1px solid var(--accent-line);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    color: var(--accent);
    flex-shrink: 0;
}
.product-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

/* =====================================================================
   BADGES & TAGS
   ===================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid var(--line);
    color: var(--text-muted);
    background: var(--bg-overlay);
    line-height: 1.2;
}

.badge-success {
    color: var(--success);
    border-color: var(--success-line);
    background: var(--success-bg);
}
.badge-success::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 4px var(--success);
}

.badge-danger {
    color: var(--danger);
    border-color: rgba(255, 56, 96, 0.3);
    background: var(--danger-bg);
}
.badge-warning {
    color: var(--warning);
    border-color: rgba(255, 179, 64, 0.4);
    background: var(--warning-bg);
}
.badge-info {
    color: var(--info);
    border-color: var(--info-line);
    background: var(--info-bg);
}
.badge-channel {
    color: var(--info);
    border-color: var(--info-line);
    background: var(--info-bg);
}
.badge-muted {
    background: var(--bg-overlay);
    border-color: var(--line);
    color: var(--text-dim);
}

/* Role badges */
.badge-superadmin {
    color: #ffd24a;
    border-color: rgba(255, 210, 74, 0.4);
    background: rgba(255, 210, 74, 0.10);
}
.badge-admin {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-bg);
}
.badge-moderator {
    color: var(--info);
    border-color: var(--info-line);
    background: var(--info-bg);
}
.badge-vip {
    color: #d670ff;
    border-color: rgba(214, 112, 255, 0.4);
    background: rgba(214, 112, 255, 0.10);
}

/* Version tag */
.version-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-xs);
    background: var(--accent-bg);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.version-tag::before {
    content: 'v';
    color: var(--text-dim);
    font-weight: 400;
}

/* =====================================================================
   ALERTS & NOTIFICATIONS
   ===================================================================== */

.alert {
    padding: 14px 18px;
    border-radius: var(--r-md);
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert::before {
    content: '';
    width: 4px;
    align-self: stretch;
    background: currentColor;
    border-radius: 4px;
    opacity: 0.8;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(255, 56, 96, 0.3);
}
.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-line);
}
.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(255, 179, 64, 0.3);
}
.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: var(--info-line);
}

/* =====================================================================
   AUTH PAGES (Login, Register)
   ===================================================================== */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
}

.auth-wrap::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 23, 68, 0.10) 0%, transparent 60%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}
.auth-footer a {
    color: var(--text-muted);
    font-weight: 500;
}
.auth-footer a:hover { color: var(--accent); }

.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-faint);
}
.or-divider::before, .or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* =====================================================================
   FOOTER
   ===================================================================== */

.footer {
    margin-top: auto;
    padding: 24px 32px;
    color: var(--text-faint);
    font-size: 11px;
    text-align: right;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    border-top: 1px solid var(--line);
}

/* =====================================================================
   UTILS
   ===================================================================== */

.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.actions form.inline { display: inline; margin: 0; }

/* Discord profile cell */
.discord-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-deep);
    border-radius: var(--r-md);
    border: 1px solid var(--line);
}
.discord-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-elevated);
    flex-shrink: 0;
}
.discord-name { font-weight: 600; font-size: 15px; color: var(--text); }

/* Detail panel reveal */
details {
    position: relative;
}
details > summary {
    list-style: none;
    cursor: pointer;
}
details > summary::-webkit-details-marker { display: none; }

/* =====================================================================
   ANIMATIONS — page-load stagger
   ===================================================================== */

.fade-in {
    animation: fadeIn 0.4s ease-out backwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.10s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.20s; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* =====================================================================
   MOBILE SIDEBAR (Off-Canvas Drawer)
   ===================================================================== */

/* Hamburger-Button — auf Desktop versteckt */
.sidebar-toggle {
    display: none;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-xs);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    margin-right: 4px;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}
.sidebar-toggle:active {
    background: rgba(255, 255, 255, 0.08);
}
.sidebar-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.sidebar-toggle-bars {
    position: relative;
    width: 18px;
    height: 14px;
    display: block;
}
.sidebar-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}
.sidebar-toggle-bars span:nth-child(1) { top: 0; }
.sidebar-toggle-bars span:nth-child(2) { top: 6px; }
.sidebar-toggle-bars span:nth-child(3) { top: 12px; }

/* X-Animation wenn offen */
body.sidebar-open .sidebar-toggle-bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}
body.sidebar-open .sidebar-toggle-bars span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.sidebar-open .sidebar-toggle-bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

/* Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 6, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

@media (max-width: 900px) {
    /* Hamburger zeigen */
    .sidebar-toggle {
        display: inline-flex;
    }

    /* Sidebar als Off-Canvas-Drawer von links */
    body.has-sidebar .main-content {
        margin-left: 0;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
        max-width: 320px;
        width: 84%;
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Backdrop sichtbar wenn offen */
    .sidebar-backdrop {
        display: block;
    }
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* Body-Scroll lock wenn Sidebar offen */
    body.sidebar-open {
        overflow: hidden;
    }

    /* App-Header etwas kompakter */
    .app-header {
        padding: 0 16px;
    }

    /* Breadcrumb darf truncaten — sieht sonst gequetscht aus */
    .breadcrumb {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Container-Padding */
    .container { padding: 24px 16px 40px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    h1 { font-size: 24px; }
    .stat-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 22px; }

    /* App-Header noch kompakter — Breadcrumb nimmt verbleibenden Platz */
    .app-header {
        padding: 0 12px;
        gap: 8px;
    }
    .app-header-actions {
        gap: 4px;
    }
}

/* =====================================================================
   MODAL DIALOG
   ===================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 6, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(255, 23, 68, 0.18);
    position: relative;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal {
    transform: translateY(0) scale(1);
}
.modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.modal-lg { max-width: 720px; }
.modal-sm { max-width: 420px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}
.modal-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.modal-close {
    width: 28px; height: 28px;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 18px;
    line-height: 1;
}
.modal-close:hover {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: var(--accent-line);
}

.modal-body {
    padding: 24px;
    max-height: 65vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
}

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

/* Disable scroll on body when modal open */
body.modal-open { overflow: hidden; }

/* =====================================================================
   TOOLBAR — über Listen
   ===================================================================== */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.toolbar-search {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 360px;
}
.toolbar-search input {
    padding-left: 38px;
    background: var(--bg-card);
}
.toolbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    width: 16px;
    height: 16px;
}
.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.toolbar-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* =====================================================================
   CODE SNIPPETS — Tabbed Code Boxes (Integration-Page, Success-Modal)
   ===================================================================== */

.snippet-meta {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
}
.snippet-meta strong {
    color: var(--text);
    font-weight: 600;
}
.snippet-meta code {
    /* Inline-Codes in der Meta-Box etwas dezenter */
    font-size: 0.85em;
}

/* Tab-Reihe */
.snippet-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md) var(--r-md) 0 0;
    padding: 4px;
    margin-bottom: 0;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.snippet-tabs button {
    flex: 0 0 auto;
    padding: 9px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: -0.005em;
    white-space: nowrap;
}

.snippet-tabs button:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.snippet-tabs button.active {
    background: var(--bg-card);
    color: var(--accent);
    border-color: var(--accent-line);
    box-shadow:
        0 0 0 1px var(--accent-line),
        0 1px 4px rgba(255, 23, 68, 0.18);
}

/* Code-Panel */
.snippet-panel {
    display: none;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--r-md) var(--r-md);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}
.snippet-panel.active { display: block; }

.snippet-panel .snippet-meta {
    background: rgba(91, 158, 255, 0.04);
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    padding: 12px 18px;
}

.snippet-panel pre {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    background: var(--bg-deep);
}

.snippet-panel pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre;
    display: block;
}

/* Custom scrollbar dezenter im Code */
.snippet-panel pre::-webkit-scrollbar { height: 6px; }
.snippet-panel pre::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 100px; border: 0; }

/* Copy-Button (oben rechts im Panel) */
.snippet-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 11px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
}
.snippet-copy:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-bg);
}
.snippet-copy.copied {
    color: var(--success);
    border-color: var(--success-line);
    background: var(--success-bg);
}

/* License-Key-Display (Erfolgs-Modal nach Lizenz-Erstellung) */
.key-display {
    display: block;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    background: var(--bg-deep);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-md);
    padding: 14px 18px;
    margin-bottom: 8px;
    color: var(--accent);
    letter-spacing: 0.06em;
    user-select: all;
    word-break: break-all;
    text-align: center;
    box-shadow: 0 0 24px rgba(255, 23, 68, 0.10) inset;
    position: relative;
}
.key-display::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

/* =====================================================================
   STAT CARD V2 — mit Icon rechts (Screenshot-Stil)
   ===================================================================== */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-v2 {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.stat-v2:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.stat-v2-body { flex: 1; min-width: 0; }
.stat-v2-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.stat-v2-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.stat-v2-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
}
.stat-v2-meta svg { width: 12px; height: 12px; opacity: 0.7; }

.stat-v2-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
}
.stat-v2-icon svg { width: 26px; height: 26px; }

.stat-v2-icon.is-accent  { background: linear-gradient(135deg, #ff1744 0%, #d10b34 100%); box-shadow: 0 6px 18px rgba(255, 23, 68, 0.4); }
.stat-v2-icon.is-success { background: linear-gradient(135deg, #00d97e 0%, #00a865 100%); box-shadow: 0 6px 18px rgba(0, 217, 126, 0.35); }
.stat-v2-icon.is-warning { background: linear-gradient(135deg, #ff8c1a 0%, #d96a00 100%); box-shadow: 0 6px 18px rgba(255, 140, 26, 0.35); }
.stat-v2-icon.is-info    { background: linear-gradient(135deg, #5b9eff 0%, #3a7ad8 100%); box-shadow: 0 6px 18px rgba(91, 158, 255, 0.35); }

/* =====================================================================
   FILTER-BAR (Screenshot: Search + 4 Dropdowns)
   ===================================================================== */

.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
}
.filter-card::before {
    content: '';
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

.filter-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}
.filter-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: var(--accent-bg);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.filter-card-icon svg { width: 16px; height: 16px; }
.filter-card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.filter-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 44px;
    margin-bottom: 16px;
}

.filter-search {
    position: relative;
    margin-bottom: 16px;
}
.filter-search input {
    padding: 12px 16px 12px 42px;
    background: var(--bg-deep);
    font-size: 13px;
}
.filter-search input::placeholder { color: var(--text-dim); }
.filter-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.filter-grid label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 500;
}
.filter-grid select,
.filter-grid input {
    background: var(--bg-deep);
    width: 100%;
}

/* =====================================================================
   LICENSE-CARD V2 (Screenshot-Stil)
   ===================================================================== */

.lic-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
    position: relative;
}
.lic-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}
.lic-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--text-dim);
    opacity: 0.4;
}
.lic-card.is-active::before  { background: var(--success); opacity: 1; box-shadow: 0 0 12px var(--success); }
.lic-card.is-expired::before { background: var(--warning); opacity: 1; }
.lic-card.is-disabled::before{ background: var(--accent);  opacity: 1; }

.lic-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.lic-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lic-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--accent-bg);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.lic-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
}
.lic-status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
    margin-top: 2px;
}
.lic-status-line .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}
.lic-card.is-expired .lic-status-line  { color: var(--warning); }
.lic-card.is-disabled .lic-status-line { color: var(--accent); }

.lic-head-right {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-dim);
    font-size: 12px;
    font-family: var(--font-mono);
}
.lic-head-right > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lic-head-right svg { width: 13px; height: 13px; opacity: 0.8; }

.lic-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 18px 22px;
}
@media (max-width: 700px) {
    .lic-body { grid-template-columns: 1fr; }
}

.lic-body-block .lbl {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
}

.lic-key-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 10px 12px;
}
.lic-key-box .key {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    letter-spacing: 0.06em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}
.lic-key-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--r-xs);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.lic-key-btn:hover {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: var(--accent-line);
}
.lic-key-btn.is-success { color: var(--success); }
.lic-key-btn svg { width: 14px; height: 14px; }

.lic-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}
.lic-detail-row + .lic-detail-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.lic-detail-row .label {
    color: var(--text-muted);
    font-size: 12px;
}
.lic-detail-row .value {
    color: var(--text);
    font-weight: 600;
    font-family: var(--font-mono);
}

.lic-foot {
    padding: 12px 22px;
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.lic-cooldown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-mono);
}
.lic-cooldown svg { width: 12px; height: 12px; opacity: 0.7; }

/* =====================================================================
   SIDEBAR ACCOUNT-FOOTER (Screenshot-Stil)
   ===================================================================== */

.sidebar-account {
    margin: auto 12px 16px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
}
.sidebar-account-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.sidebar-account-avatar::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 6px var(--success);
}
.sidebar-account-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.sidebar-account-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-account-role {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.sidebar-signout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 12px 16px;
    padding: 11px 14px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}
.sidebar-signout:hover {
    color: var(--accent);
    background: var(--accent-bg);
    border-color: var(--accent-line);
}
.sidebar-signout svg { width: 14px; height: 14px; }

/* Sidebar muss flex-column sein damit account/signout unten kleben */
.sidebar { display: flex; flex-direction: column; }
.sidebar-spacer { flex: 1; }

/* Brand-Block kompakter (Screenshot-Stil: Logo + Name + Tagline) */
.sidebar-brand-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}
.sidebar-brand-v2 .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.35);
    flex-shrink: 0;
}
.sidebar-brand-v2 .brand-meta { line-height: 1.2; }
.sidebar-brand-v2 .brand-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
}
.sidebar-brand-v2 .brand-tag {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Page-Header-Variante: kleines Icon links neben h1 */
.page-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--accent-bg);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-right: 4px;
}
.page-icon svg { width: 22px; height: 22px; }
.page-header.with-icon {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
/* Page-Icon hat fixe Breite (44px), darf nicht stretchen */
.page-header.with-icon > .page-icon {
    flex: 0 0 auto;
}
/* Der Titel-Container daneben füllt den Rest */
.page-header.with-icon > .page-icon + div {
    flex: 1 1 auto;
    min-width: 0;
}
/* Falls Action-Buttons rechts sind, kleben sie rechts */
.page-header.with-icon > .actions {
    flex: 0 0 auto;
    margin-left: auto;
}

/* =====================================================================
   NAV-ITEM AKTIV-STIL — kräftiger (Screenshot-Variante)
   ===================================================================== */
.nav-item.active {
    background: linear-gradient(135deg,
        rgba(255, 23, 68, 0.18) 0%,
        rgba(255, 23, 68, 0.08) 100%);
    color: var(--text);
    box-shadow:
        inset 0 0 0 1px var(--accent-line),
        0 4px 12px rgba(255, 23, 68, 0.15);
    border-radius: var(--r-md);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--accent);
}
.nav-item { position: relative; }

/* Falls Sub-Label gewünscht */
.nav-label-wrap { display: flex; flex-direction: column; line-height: 1.3; }
.nav-label-wrap .nav-sub {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 400;
    margin-top: 1px;
}
.nav-item.active .nav-label-wrap .nav-sub { color: var(--text-muted); }

/* =====================================================================
   SIDEBAR-FIXES — overflow + scrollbar
   ===================================================================== */
.sidebar {
    overflow-y: auto;
    overflow-x: hidden;
    /* schöne dünne Scrollbar nur wenn nötig */
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--accent-line); }

/* Lang-Switch in der Account-Zeile */
.sidebar-lang {
    display: flex;
    gap: 4px;
    margin: 0 12px 8px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    justify-content: center;
}
.sidebar-lang a {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.15s ease;
}
.sidebar-lang a:hover { color: var(--text); background: var(--bg-deep); }
.sidebar-lang a.active {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}

/* =====================================================================
   PRETTY MODAL (Confirm-Dialog im Site-Style)
   ===================================================================== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 10, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.confirm-overlay.is-open {
    display: flex;
    opacity: 1;
}

.confirm-box {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 23, 68, 0.05);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.confirm-overlay.is-open .confirm-box {
    transform: translateY(0) scale(1);
}

.confirm-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
}
.confirm-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #d10b34);
    box-shadow: 0 4px 14px rgba(255, 23, 68, 0.3);
}
.confirm-icon.is-warning {
    background: linear-gradient(135deg, #ff8c1a, #d96a00);
    box-shadow: 0 4px 14px rgba(255, 140, 26, 0.3);
}
.confirm-icon.is-danger {
    background: linear-gradient(135deg, var(--accent), #d10b34);
    box-shadow: 0 4px 14px rgba(255, 23, 68, 0.35);
}
.confirm-icon.is-info {
    background: linear-gradient(135deg, #5b9eff, #3a7ad8);
    box-shadow: 0 4px 14px rgba(91, 158, 255, 0.3);
}
.confirm-icon.is-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}
.confirm-icon svg { width: 22px; height: 22px; }

.confirm-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.confirm-body {
    padding: 20px 24px 22px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.confirm-body strong { color: var(--text); }

.confirm-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 20px 18px;
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
}
.confirm-foot .btn { min-width: 110px; justify-content: center; }

/* =====================================================================
   SIDEBAR KOMPAKTER — damit auf kleineren Screens weniger gescrollt wird
   ===================================================================== */
.sidebar-brand-v2 {
    padding: 14px 16px 12px;
    margin-bottom: 4px;
}
.sidebar-brand-v2 .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 14px;
}
.sidebar-section {
    padding: 12px 14px 3px !important;
    font-size: 9px !important;
}
.sidebar-nav .nav-item {
    padding: 8px 12px !important;
    font-size: 13px;
    margin-bottom: 1px;
}
.sidebar-divider {
    margin: 8px 14px !important;
}
.sidebar-account {
    margin: auto 10px 8px !important;
    padding: 10px !important;
}
.sidebar-account-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px;
}
.sidebar-lang {
    margin: 0 10px 8px !important;
    padding: 4px !important;
}
.sidebar-lang a {
    padding: 5px 8px !important;
    font-size: 10px !important;
}
.sidebar-signout {
    margin: 0 10px 12px !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
}

/* =====================================================================
   PRODUCT-CARD (Admin → Produkte) im Card-Stil
   ===================================================================== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}
.product-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.product-card.is-inactive {
    opacity: 0.6;
}
.product-card.is-inactive::after {
    content: 'INAKTIV';
    position: absolute;
    top: 12px;
    right: 0;
    padding: 4px 14px 4px 18px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    font-weight: 700;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}
.product-card.is-inactive::before {
    background: var(--text-dim);
    box-shadow: none;
}

.product-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.product-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.product-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.product-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.product-slug {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}
.product-slug strong {
    color: var(--accent);
    font-weight: 600;
}

.product-head-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-mono);
}
.product-stat-pill svg { width: 12px; height: 12px; opacity: 0.8; }
.product-stat-pill.is-active {
    color: var(--success);
    border-color: rgba(0, 217, 126, 0.3);
    background: rgba(0, 217, 126, 0.08);
}
.product-stat-pill.is-active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.product-body {
    padding: 18px 22px;
}
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
@media (max-width: 700px) {
    .product-grid { grid-template-columns: 1fr; }
}
.product-grid .form-group { margin: 0; }
.product-grid label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 500;
    display: block;
}
.product-grid input[type=text],
.product-grid input[type=number] {
    background: var(--bg-deep);
    width: 100%;
}

/* Toggle-Reihe — Checkbox als hübscher Switch */
.product-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease;
}
.product-toggle:hover { border-color: var(--line-strong); }
.product-toggle input[type=checkbox] {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 20px;
    background: var(--line);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
    margin: 0;
    flex-shrink: 0;
}
.product-toggle input[type=checkbox]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.product-toggle input[type=checkbox]:checked {
    background: linear-gradient(135deg, var(--accent), #d10b34);
}
.product-toggle input[type=checkbox]:checked::after {
    transform: translateX(16px);
}
.product-toggle-label {
    flex: 1;
    line-height: 1.3;
}
.product-toggle-title {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}
.product-toggle-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    gap: 12px;
    flex-wrap: wrap;
}
.product-foot-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.product-foot-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ghost-Button mit Akzent-Hover für Lösch-Aktionen */
.btn.danger-link:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-bg);
}

/* =====================================================================
   BINDINGS-BLOCK in Edit-License-Modal
   ===================================================================== */
.bindings-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.bindings-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.bindings-title {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    font-weight: 500;
}
.bindings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.binding-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.binding-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.binding-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}
.binding-lbl {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    width: 110px;
    flex-shrink: 0;
}
.binding-val {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.binding-val.mono { font-family: var(--font-mono); font-size: 11px; }
.bindings-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px dashed var(--line);
    border-radius: var(--r-md);
    color: var(--text-dim);
    font-size: 12px;
}

.modal-subtitle-mono {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.05em;
}

/* =====================================================================
   LIC-TOGGLE — Inline-Toggle als Form-Button
   ===================================================================== */
.lic-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.18s ease;
}
.lic-toggle:hover {
    border-color: var(--line-strong);
    color: var(--text);
}
.lic-toggle .lic-toggle-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.18s ease;
    flex-shrink: 0;
}
.lic-toggle.is-on {
    background: rgba(255, 23, 68, 0.1);
    border-color: var(--accent-line);
    color: var(--accent);
}
.lic-toggle.is-on .lic-toggle-knob {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}
.lic-toggle-text {
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* =====================================================================
   SIDEBAR ULTRA-KOMPAKT — endgültiger Fix damit nix mehr scrollt
   Auch bei vielen Nav-Items soll's auf 700px Höhe noch passen.
   ===================================================================== */
.sidebar-brand-v2 {
    padding: 12px 14px 10px !important;
    margin-bottom: 0 !important;
    gap: 10px !important;
}
.sidebar-brand-v2 .brand-mark {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
}
.sidebar-brand-v2 .brand-name { font-size: 13px !important; }
.sidebar-brand-v2 .brand-tag  { font-size: 10px !important; }

.sidebar-nav { padding: 4px 10px !important; }
.sidebar-section {
    padding: 10px 4px 3px !important;
    font-size: 9px !important;
    letter-spacing: 0.16em !important;
}
.sidebar-nav .nav-item {
    padding: 7px 10px !important;
    font-size: 12.5px !important;
    margin-bottom: 0 !important;
    gap: 9px !important;
}
.sidebar-nav .nav-item .nav-icon {
    width: 16px !important;
    height: 16px !important;
}
.sidebar-divider {
    margin: 6px 4px !important;
}

/* Spacer wirklich flex 1, damit Account-Block nach unten gedrückt wird */
.sidebar-spacer { flex: 1 1 auto !important; min-height: 0 !important; }

/* Footer-Bereich kompakt */
.sidebar-lang {
    margin: 0 10px 6px !important;
    padding: 3px !important;
}
.sidebar-lang a {
    padding: 4px 8px !important;
    font-size: 10px !important;
}
.sidebar-account {
    margin: 0 10px 6px !important;
    padding: 8px 10px !important;
    gap: 8px !important;
}
.sidebar-account-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
}
.sidebar-account-name { font-size: 12px !important; }
.sidebar-account-role {
    padding: 1px 6px !important;
    font-size: 9px !important;
}
.sidebar-signout {
    margin: 0 10px 10px !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
}

/* Sidebar selbst: zur Not Scroll, aber min-height verhindert dass
   sie kleiner wird als content */
.sidebar {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
}

/* =====================================================================
   SETTINGS-FORM-Variante (Update-Server Settings)
   ===================================================================== */
.settings-form .form-group {
    margin-bottom: 18px;
}
.settings-form .form-group:last-child {
    margin-bottom: 0;
}
.settings-form label:not(.product-toggle):not(.product-toggle-label) {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
}
.settings-form input[type=text],
.settings-form input[type=url],
.settings-form input[type=password] {
    background: var(--bg-deep);
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
}
.settings-form input[type=url] {
    font-family: var(--font-mono);
    font-size: 12px;
}
.settings-form .help {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 6px;
    line-height: 1.5;
}
.settings-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* Numbered Steps für "So funktioniert's" */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.steps-list li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    line-height: 1.55;
    color: var(--text-muted);
    font-size: 13px;
}
.steps-list li::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.3);
}
.steps-list li code {
    background: var(--bg-card);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--accent);
    border: 1px solid var(--line);
}

/* =====================================================================
   UPDATE-SERVER-CARDS (License-Server → Admin → Update-Server)
   Stil angelehnt an .product-card
   ===================================================================== */
.us-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.us-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.us-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}
.us-card.is-inactive { opacity: 0.65; }
.us-card.is-inactive::before {
    background: var(--text-dim);
    box-shadow: none;
}

.us-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 12px;
}
.us-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.us-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}
.us-icon svg { width: 18px; height: 18px; }

.us-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.us-meta-line {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-dim);
}
.us-meta-line em { font-style: italic; opacity: 0.7; }
.us-sep { color: var(--text-faint); }

.us-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
}
.us-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.us-status.is-active {
    background: rgba(0, 217, 126, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 217, 126, 0.3);
}
.us-status.is-active .dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}
.us-status.is-inactive {
    background: var(--bg-deep);
    color: var(--text-dim);
    border: 1px solid var(--line);
}
.us-status.is-inactive .dot { background: var(--text-dim); }

.us-body {
    padding: 16px 20px;
}
.us-token-block .lbl {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
}

.us-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

/* Section-Header über einer Liste von Cards */
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 4px 14px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* =====================================================================
   FILTER-CARD (oben in Lizenz-Listen)
   ===================================================================== */
.filter-card {
    padding: 14px 24px 18px;
    border-bottom: 1px solid var(--line);
}
.filter-grid {
    display: grid;
    grid-template-columns: 1fr 220px 200px;
    gap: 10px;
}
@media (max-width: 800px) {
    .filter-grid { grid-template-columns: 1fr; }
}

/* Search-Input mit Icon */
.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}
.filter-search svg {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: var(--text-dim);
    pointer-events: none;
    z-index: 2;
}
.filter-search input[type=text] {
    padding-left: 40px;
    padding-right: 36px;
    background: var(--bg-deep);
}
.filter-search input[type=text]:focus {
    background: var(--bg-card);
    border-color: var(--accent-line);
}
.filter-clear {
    position: absolute;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--line);
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: all 0.15s ease;
    z-index: 2;
}
.filter-clear:hover {
    background: var(--accent);
    color: #fff;
}

/* Bessere Selects */
.filter-select {
    background: var(--bg-deep);
}
.filter-select:focus {
    border-color: var(--accent-line);
}

/* =====================================================================
   ACTIVITY-LIST + STATS (Update-Server Releases-Page)
   ===================================================================== */
.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 800px) {
    .activity-stats { grid-template-columns: 1fr; }
}

.activity-list {
    display: flex;
    flex-direction: column;
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
}
.activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.activity-icon svg { width: 14px; height: 14px; }
.activity-icon.is-success {
    background: rgba(0, 217, 126, 0.1);
    color: var(--success);
}
.activity-icon.is-info {
    background: rgba(91, 158, 255, 0.1);
    color: #5b9eff;
}
.activity-icon.is-muted {
    background: var(--bg-deep);
    color: var(--text-dim);
}

.activity-info { flex: 1; min-width: 0; }
.activity-row1 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    flex-wrap: wrap;
}
.activity-event {
    font-weight: 600;
}
.activity-version {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
}
.activity-meta {
    color: var(--text-dim);
    font-size: 11px;
    font-family: var(--font-mono);
}
.activity-row2 {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}
.activity-time {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}

/* =====================================================================
   CARD-HEAD-VARIANTE — synonym zu card-header
   ===================================================================== */
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 12px;
}
.card-head:last-child { border-bottom: none; }

/* Card-Content kriegt mehr Atemluft */
.card .card-content {
    padding: 22px 24px;
}
@media (max-width: 600px) {
    .card-head { padding: 14px 16px; }
    .card .card-content { padding: 16px; }
}

/* Settings-Form mehr Padding bekommen */
.settings-form {
    padding-top: 4px;
}

/* =====================================================================
   API-DOC-CARD (License-Server → Update-Servers → API-Endpoint)
   ===================================================================== */
.api-doc-card { margin-top: 24px; }
.api-doc-body {
    padding: 22px 26px 24px;
}
.api-doc-intro {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
    margin: 0 0 18px;
}
.api-doc-intro code {
    background: var(--bg-deep);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--line);
    font-size: 11px;
    font-family: var(--font-mono);
}

/* URL-Strip mit Methode-Pille */
.api-endpoint-strip {
    display: flex;
    align-items: stretch;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 22px;
}
.api-method {
    display: grid;
    place-items: center;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    flex-shrink: 0;
}
.api-url {
    flex: 1;
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    background: transparent;
    border: none;
    word-break: break-all;
}

/* Grid: Request links, Response rechts */
.api-doc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}
@media (max-width: 800px) {
    .api-doc-grid { grid-template-columns: 1fr; }
}

.api-doc-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 500;
}

/* Code-Blocks */
.api-code-block {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px 16px;
    overflow-x: auto;
}
.api-code-block pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text);
}
.api-code-block .ck { color: #c9d1d9; }      /* Klammern, Keys */
.api-code-block .cs { color: #00d97e; }      /* Strings */
.api-code-block .cn { color: #ff8c1a; }      /* Numbers */
.api-code-block .cb { color: #5b9eff; }      /* Booleans */

/* Status-Codes-Block */
.api-status-codes {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 16px 18px;
}
.api-status-codes-head {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    margin-bottom: 12px;
    font-weight: 500;
}
.api-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
}
@media (max-width: 600px) {
    .api-status-grid { grid-template-columns: 1fr; }
}
.api-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}
.api-status-code {
    flex-shrink: 0;
    width: 50px;
    text-align: center;
    padding: 3px 0;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.api-status-code.is-success {
    background: rgba(0, 217, 126, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 217, 126, 0.3);
}
.api-status-code.is-warning {
    background: rgba(255, 140, 26, 0.1);
    color: #ff8c1a;
    border: 1px solid rgba(255, 140, 26, 0.3);
}
.api-status-code.is-danger {
    background: rgba(255, 23, 68, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}

/* =====================================================================
   USER-AUTOCOMPLETE-WIDGET
   ===================================================================== */
.user-autocomplete {
    position: relative;
    display: block;
}
.user-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-card);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}
.user-suggest-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    padding: 8px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s ease;
}
.user-suggest-item:hover,
.user-suggest-item.is-hover {
    background: var(--accent-bg);
}
.user-suggest-email {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}
.user-suggest-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
    font-family: var(--font-mono);
}
.user-suggest-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
}

/* Filter-Meta (Treffer-Counter) */
.filter-meta {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Inline-Form-Anpassung damit Autocomplete-Wrapper richtig sitzt */
.assign-form {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}
.assign-form .user-autocomplete { display: inline-block; }

/* =====================================================================
   SALT-ROTATION-RESULT-BOX (nach erfolgreichem rotate_salt)
   ===================================================================== */
.rotation-result-card {
    background: var(--bg-card);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-lg);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(255, 23, 68, 0.18);
    position: relative;
}
.rotation-result-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), #d10b34);
    box-shadow: 0 0 16px var(--accent);
}

.rot-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.rot-head-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(255, 23, 68, 0.4);
}
.rot-head-icon svg { width: 22px; height: 22px; }
.rot-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.rot-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
    font-family: var(--font-mono);
}
.rot-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.rot-warning {
    margin: 14px 22px;
    padding: 12px 16px;
    background: rgba(255, 140, 26, 0.08);
    border: 1px solid rgba(255, 140, 26, 0.3);
    border-radius: var(--r-md);
    color: #ffa052;
    font-size: 12.5px;
    line-height: 1.6;
}
.rot-warning strong { color: #ffb56b; }

.rot-table-wrap {
    margin: 0 22px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    max-height: 480px;
    overflow-y: auto;
}
.rot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.rot-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-deep);
    padding: 10px 14px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.rot-table tbody tr {
    border-bottom: 1px solid var(--line);
}
.rot-table tbody tr:last-child { border-bottom: none; }
.rot-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.rot-table td {
    padding: 10px 14px;
    vertical-align: middle;
}
.rot-user-email {
    color: var(--text);
    font-size: 12px;
}
.rot-user-discord {
    color: var(--text-dim);
    font-size: 11px;
    font-family: var(--font-mono);
    margin-top: 2px;
}
.rot-old-key {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    text-decoration: line-through;
    opacity: 0.7;
}
.rot-new-key {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 23, 68, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 23, 68, 0.2);
}

/* =====================================================================
   DISCORD-MODE-SETTINGS (Produkt-Card)
   ===================================================================== */
.discord-settings {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}
.discord-settings-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    font-weight: 500;
}
.discord-settings-head svg { color: #5865f2; }
.discord-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
@media (max-width: 800px) {
    .discord-mode-grid { grid-template-columns: 1fr; }
}
.discord-mode-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all 0.15s ease;
}
.discord-mode-opt:hover { border-color: var(--line-strong); }
.discord-mode-opt.is-active {
    border-color: var(--accent-line);
    background: rgba(255, 23, 68, 0.06);
    box-shadow: 0 0 0 1px rgba(255, 23, 68, 0.2);
}
.discord-mode-opt input[type=radio] {
    margin: 3px 0 0 0;
    accent-color: var(--accent);
}
.discord-mode-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.discord-mode-sub {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
}
.discord-slots-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.discord-slots-row label {
    margin: 0 !important;
    font-family: var(--font-mono);
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted) !important;
}
.discord-slots-row input { background: var(--bg-card); }

/* =====================================================================
   KO-FI-BLOCK (Lizenz-Edit-Modal)
   ===================================================================== */
.kofi-block {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.kofi-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    font-weight: 500;
}
.kofi-block-head svg { color: #ff5f5f; }
.kofi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}
@media (max-width: 600px) {
    .kofi-grid { grid-template-columns: 1fr; }
}
.kofi-grid .form-group { margin: 0; }
.kofi-hint {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
    padding: 6px 8px;
    background: rgba(255, 23, 68, 0.04);
    border-left: 2px solid var(--accent-line);
    border-radius: 3px;
}

/* =====================================================================
   PENDING-BLOCK + PILL (Vorab-Zuweisung)
   ===================================================================== */
.pending-block {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(91, 158, 255, 0.05);
    border: 1px solid rgba(91, 158, 255, 0.2);
    border-radius: var(--r-md);
}
.pending-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #5b9eff;
    font-weight: 500;
}
.pending-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}
@media (max-width: 600px) {
    .pending-grid { grid-template-columns: 1fr; }
}
.pending-grid .form-group { margin: 0; }
.pending-hint {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
    padding: 6px 8px;
    background: rgba(91, 158, 255, 0.06);
    border-left: 2px solid rgba(91, 158, 255, 0.4);
    border-radius: 3px;
}

/* Pending-Pill in der Lizenz-Tabelle */
.pending-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(91, 158, 255, 0.1);
    border: 1px solid rgba(91, 158, 255, 0.3);
    color: #5b9eff;
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    font-weight: 600;
}

/* =====================================================================
   SIDEBAR FINAL — drei feste Bereiche:
     - sidebar-brand-v2 (oben, fix)
     - sidebar-nav      (Mitte, scrollt falls nötig)
     - sidebar-footer-fixed (unten, fix mit Lang + Account + Logout)
   Sidebar selbst NIE als Ganzes scrollen.
   ===================================================================== */
.sidebar {
    overflow: hidden !important;     /* Outer scroll OFF */
    display: flex;
    flex-direction: column;
}

/* Brand bleibt sticky oben */
.sidebar-brand-v2 {
    flex: 0 0 auto;
}

/* Mittlerer Nav-Bereich — der einzige der scrollt */
.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;                   /* WICHTIG für Flex-Scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 10px !important;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 2px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--accent-line);
}

/* Footer-Block bleibt unten fix */
.sidebar-footer-fixed {
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    padding-top: 8px;
    background: linear-gradient(180deg,
        rgba(7, 7, 11, 0.4) 0%,
        rgba(7, 7, 11, 0.95) 30%);
}

/* Spacer entfernen — wir brauchen ihn nicht mehr */
.sidebar-spacer { display: none !important; }

/* Footer-Items: gleiche Margins wie zuvor */
.sidebar-footer-fixed .sidebar-lang {
    margin: 0 10px 6px !important;
}
.sidebar-footer-fixed .sidebar-account {
    margin: 0 10px 6px !important;
}
.sidebar-footer-fixed .sidebar-signout {
    margin: 0 10px 10px !important;
}

/* =====================================================================
   PAYMENT-RULES CARDS
   ===================================================================== */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
}
@media (max-width: 600px) {
    .rules-grid { grid-template-columns: 1fr; }
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color 0.15s;
}
.rule-card:hover { border-color: var(--line-strong); }
.rule-card.is-inactive { opacity: 0.55; }

.rule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
}
.rule-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.rule-status-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rule-priority {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    padding: 2px 6px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 100px;
}

.rule-body {
    padding: 16px 18px;
}
.rule-section-lbl {
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin-bottom: 4px;
    font-weight: 500;
}
.rule-trigger,
.rule-action {
    padding: 10px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.rule-arrow {
    text-align: center;
    color: var(--text-dim);
    font-size: 18px;
    line-height: 1;
    padding: 6px 0;
}
.rule-trigger-text,
.rule-action-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}
.rule-trigger-text strong,
.rule-action-text strong {
    color: var(--accent);
}

.rule-meta-row {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-dim);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--r-sm);
}
.rule-meta-row strong { color: var(--text-muted); }

.rule-notes {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(91, 158, 255, 0.06);
    border-left: 2px solid rgba(91, 158, 255, 0.4);
    border-radius: 3px;
    font-size: 11.5px;
    color: var(--text-muted);
    font-style: italic;
}

.rule-foot {
    display: flex;
    gap: 6px;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
}

/* =====================================================================
   CREDITS-PAGE / SHOP
   ===================================================================== */
.credits-balance-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.08) 0%, transparent 70%);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-lg);
    margin-bottom: 18px;
    align-items: center;
}
@media (max-width: 600px) {
    .credits-balance-card { grid-template-columns: 1fr; }
}
.credits-balance-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.credits-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    flex-basis: 100%;
    margin-bottom: 6px;
}
.credits-value {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.credits-unit {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.credits-balance-aside {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}
.credits-aside-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 12px;
    background: var(--bg-deep);
    border-radius: var(--r-sm);
}
.credits-aside-row .lbl {
    font-size: 11px;
    color: var(--text-dim);
}
.credits-aside-row .val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}

/* Shop */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
}
@media (max-width: 600px) { .shop-grid { grid-template-columns: 1fr; } }
.shop-product-card {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}
.shop-product-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
}
.shop-product-name {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
}
.shop-product-options {
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.shop-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.shop-option-info { flex: 1; }
.shop-option-title {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}
.shop-option-cost {
    font-size: 11px;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-top: 2px;
}

/* Credits-Settings im Produkt-Card */
.credits-settings {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}
.credits-settings-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    font-weight: 500;
}
.credits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (max-width: 600px) { .credits-grid { grid-template-columns: 1fr; } }
.credits-grid .form-group { margin: 0; }

/* =====================================================================
   "KEY KAUFEN"-MODAL
   ===================================================================== */
.buy-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.buy-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s ease;
    cursor: pointer;
}
.buy-option:hover {
    border-color: var(--accent-line);
    transform: translateX(2px);
}
.buy-option-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--line);
}
.buy-option-kofi:hover .buy-option-icon {
    color: #ff5f5f;
    background: rgba(255, 95, 95, 0.08);
    border-color: rgba(255, 95, 95, 0.3);
}
.buy-option-patreon:hover .buy-option-icon {
    color: #ff424d;
    background: rgba(255, 66, 77, 0.08);
    border-color: rgba(255, 66, 77, 0.3);
}
.buy-option-credits:hover .buy-option-icon {
    color: var(--accent);
    background: rgba(255, 23, 68, 0.08);
    border-color: var(--accent-line);
}
.buy-option-text {
    flex: 1;
    min-width: 0;
}
.buy-option-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.buy-option-sub {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}
.buy-option-arrow {
    font-size: 20px;
    color: var(--text-dim);
    transition: transform 0.15s, color 0.15s;
}
.buy-option:hover .buy-option-arrow {
    color: var(--accent);
    transform: translateX(3px);
}
.buy-rules-hint {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(91, 158, 255, 0.05);
    border: 1px solid rgba(91, 158, 255, 0.18);
    border-radius: var(--r-sm);
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.buy-rules-hint svg {
    color: #5b9eff;
    flex-shrink: 0;
}

/* =====================================================================
   BUY-MODAL — STEPS / TABS / OFFERS
   ===================================================================== */
.buy-modal-intro {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}
.buy-step-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin-bottom: 10px;
    font-weight: 500;
}
.buy-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.buy-product-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font: inherit;
    width: 100%;
}
.buy-product-pick:hover {
    border-color: var(--accent-line);
    transform: translateX(2px);
}
.buy-product-pick-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
}
.buy-status-pill {
    font-size: 10px;
    padding: 3px 8px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.buy-status-pill.is-active {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.08);
}

.buy-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 0;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 14px;
    padding: 4px 0;
}
.buy-back:hover { color: var(--text); }

.buy-product-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 14px;
}
.buy-product-status-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.buy-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 4px;
    margin-bottom: 14px;
}
.buy-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--text-dim);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}
.buy-tab:hover { color: var(--text); }
.buy-tab.is-active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: 0 1px 0 0 rgba(255,255,255,0.04) inset;
}
.buy-tab-icon {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.buy-panel { display: none; flex-direction: column; gap: 8px; }
.buy-panel.is-active { display: flex; }

.buy-offer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s ease;
}
.buy-offer:hover {
    border-color: var(--accent-line);
    transform: translateX(2px);
}
.buy-offer-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--text-muted);
}
.buy-offer-kofi:hover .buy-offer-icon {
    color: #ff5f5f;
    background: rgba(255,95,95,0.08);
    border-color: rgba(255,95,95,0.3);
}
.buy-offer-patreon:hover .buy-offer-icon {
    color: #ff424d;
    background: rgba(255,66,77,0.08);
    border-color: rgba(255,66,77,0.3);
}
.buy-offer-credits:hover .buy-offer-icon {
    color: var(--accent);
    background: rgba(255,23,68,0.08);
    border-color: var(--accent-line);
}
.buy-offer-body { flex: 1; min-width: 0; }
.buy-offer-platform {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.buy-offer-reward {
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: 3px;
}
.buy-offer-reward strong {
    color: var(--accent);
    font-weight: 600;
}
.buy-offer-arrow {
    color: var(--text-dim);
    margin: 0 4px;
}
.buy-offer-sub {
    font-size: 11px;
    color: var(--text-dim);
}
.buy-offer-cta {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    align-self: center;
}

.buy-no-offers {
    padding: 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    background: var(--bg-deep);
    border: 1px dashed var(--line);
    border-radius: var(--r-md);
}

.buy-loading {
    padding: 32px;
    text-align: center;
    color: var(--text-dim);
    font-size: 16px;
}

/* Shop-Visibility-Block in Produkt-Karte */
.shop-visibility-block {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.product-stat-pill.is-shop {
    color: var(--accent);
    border-color: var(--accent-line);
    background: rgba(255, 23, 68, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================================
   PENDING-INTENT BANNER
   ===================================================================== */
.intent-banner-wrap {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.intent-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.08) 0%, transparent 80%);
    border: 1px solid var(--accent-line);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-md);
}
.intent-banner-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(255, 23, 68, 0.08);
    border-radius: var(--r-sm);
    border: 1px solid var(--accent-line);
}
.intent-banner-body {
    flex: 1;
    min-width: 0;
}
.intent-banner-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.intent-banner-text {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.55;
}
.intent-banner-text strong {
    color: var(--text);
}

/* =====================================================================
   PLATFORM LINK SECTIONS (Account-Page)
   ===================================================================== */
.link-block {
    padding: 18px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 14px;
}
.link-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.link-block-platform {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.link-status {
    font-size: 11px;
    padding: 3px 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.link-status.is-linked {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.08);
}
.link-status.is-linked.is-oauth {
    color: var(--accent);
    border-color: var(--accent-line);
    background: rgba(255, 23, 68, 0.08);
}
.link-block-text {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 14px;
}
.link-form .form-group { margin-bottom: 10px; }
.link-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.link-oauth-info {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.link-oauth-info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 12.5px;
}
.link-oauth-info-row span {
    color: var(--text-dim);
}
.link-oauth-info-row code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
}
.link-manual-details {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px dashed var(--line);
    border-radius: var(--r-sm);
}
.link-manual-details summary {
    cursor: pointer;
    font-size: 12px;
    color: var(--text-dim);
    user-select: none;
}
.link-manual-details summary:hover { color: var(--text); }
.link-manual-body { padding-top: 12px; }

/* =====================================================================
   BUY CONFIRM MODAL
   ===================================================================== */
.confirm-platform-icon {
    text-align: center;
    margin-bottom: 12px;
}
.confirm-intro {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}
.confirm-link-status {
    margin-bottom: 16px;
}
.link-status-box {
    padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg-deep);
}
.link-status-box.is-linked {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.05);
}
.link-status-box.is-warning {
    border-color: rgba(255, 165, 0, 0.4);
    background: rgba(255, 165, 0, 0.05);
}
.link-status-head {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.link-status-method {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.link-status-id {
    font-size: 12px;
}
.link-status-id code {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 12px;
}
.link-status-text {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.55;
    margin-bottom: 4px;
}
.confirm-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}
.confirm-checkbox:hover { border-color: var(--accent-line); }
.confirm-checkbox input[type=checkbox] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent);
}
.confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.confirm-actions .btn-primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Generic-Offer (ohne konkrete Regel) */
.buy-offer.is-generic {
    border-style: dashed;
    opacity: 0.85;
}
.buy-offer-generic {
    color: var(--text-dim);
    font-style: italic;
    font-size: 12.5px;
}

/* =====================================================================
   SUB-ALLOCATION — modernes Card-Layout
   ===================================================================== */
.alloc-block {
    padding: 18px 20px;
    background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(0, 0, 0, 0.15) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}
.alloc-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    opacity: 0.25;
}
.alloc-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.alloc-block-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}
.alloc-block-platform svg {
    flex-shrink: 0;
    width: 18px; height: 18px;
}
.alloc-total {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    padding: 5px 14px;
    background: rgba(255, 23, 68, 0.06);
    border: 1px solid var(--accent-line);
    border-radius: 100px;
    white-space: nowrap;
}
.alloc-total::before {
    content: 'Σ ';
    opacity: 0.5;
    font-weight: 400;
}
.alloc-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.alloc-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.alloc-row:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
.alloc-row:focus-within {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.06);
}

.alloc-row-fields {
    display: grid;
    grid-template-columns: 1.5fr 130px 130px 32px;
    gap: 10px;
    align-items: end;
}
.alloc-row-fields > * { margin: 0; }
.alloc-row-fields select,
.alloc-row-fields input {
    margin: 0;
    padding: 9px 11px;
    font-size: 13px;
    height: 38px;
}
.alloc-product { font-weight: 500; }

@media (max-width: 720px) {
    .alloc-row-fields {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "product product"
            "type    amount"
            "remove  remove";
    }
    .alloc-product { grid-area: product; }
    .alloc-type    { grid-area: type; }
    .alloc-amount  { grid-area: amount; }
    .alloc-row-remove {
        grid-area: remove;
        width: 100%;
        height: 32px;
    }
}

.alloc-row-remove {
    width: 32px;
    height: 38px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-dim);
    border-radius: var(--r-sm);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.alloc-row-remove:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(248, 113, 113, 0.05);
}

/* License-Picker innerhalb Row */
.alloc-row-license {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--r-sm);
    border-left: 2px solid var(--accent);
}
.alloc-row-license-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 600;
    margin: 0;
}
.alloc-row-license-label::before {
    content: '🔑';
    font-size: 11px;
    margin-right: 2px;
}
.alloc-row-license select {
    margin: 0;
    padding: 8px 10px;
    font-size: 12.5px;
    font-family: var(--font-mono);
    width: 100%;
    background: var(--bg-card);
}

/* Preview-Zeile pro Row */
.alloc-row-preview {
    font-size: 11px;
    color: var(--text-dim);
    padding: 0 4px;
    min-height: 14px;
    line-height: 1.4;
}
.alloc-row-preview strong { color: var(--text); font-weight: 500; }

/* Action-Buttons */
.alloc-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.alloc-actions .btn-ghost::before {
    content: '+';
    margin-right: 4px;
    font-size: 16px;
    line-height: 1;
    vertical-align: -1px;
}

.alloc-hint {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(91, 158, 255, 0.05);
    border: 1px solid rgba(91, 158, 255, 0.18);
    border-radius: var(--r-sm);
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Banner-Variant: info (für Allocation-Hint) */
.intent-banner.intent-banner-info {
    background: linear-gradient(135deg, rgba(91, 158, 255, 0.06) 0%, transparent 80%);
    border-color: rgba(91, 158, 255, 0.25);
    border-left-color: #5b9eff;
}
.intent-banner.intent-banner-info .intent-banner-icon {
    color: #5b9eff;
    background: rgba(91, 158, 255, 0.08);
    border-color: rgba(91, 158, 255, 0.25);
}
.intent-banner.intent-banner-info .intent-banner-title {
    color: #5b9eff;
}

/* === Admin-Liste: Lizenz-Schlüssel-Spalte mit Notes === */
.col-license-key {
    max-width: 240px;
    min-width: 200px;
}
.col-license-key .lic-user-notes,
.col-license-key .lic-admin-note {
    max-width: 220px;
}

/* Admin-Notiz unter Lizenz-Key — gelb-orange für klare Unterscheidung */
.lic-admin-note {
    margin-top: 4px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 10.5px;
    color: #fbbf24;
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.3;
    max-width: 220px;
    white-space: normal;
    word-break: break-word;
    cursor: help;
}
.lic-admin-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.85;
}

/* === Admin-Liste: User-Notes unter Lizenz-Key === */
.lic-user-notes {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--accent);
    font-family: inherit;
    font-weight: 500;
    line-height: 1.3;
    max-width: 220px;
    white-space: normal;
    word-break: break-word;
    cursor: help;
}

/* Allocation-Row Preview */
.alloc-row {
    grid-template-columns: 1fr auto 110px auto auto;
}
@media (max-width: 600px) {
    .alloc-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "product remove"
            "type    type"
            "amount  amount"
            "preview preview";
    }
    .alloc-row-preview { grid-area: preview; }
}
.alloc-row-preview {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    padding: 2px 8px;
    border-radius: var(--r-sm);
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}
.alloc-row-preview.is-loading { color: var(--text-dim); opacity: 0.6; }
.alloc-row-preview.is-ok {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
}
.alloc-row-preview.is-warn {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

/* Split-Action im Buy-Modal */
.buy-split-link {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    text-align: center;
}
.buy-split-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: transparent;
    border: 1px dashed var(--line);
    border-radius: var(--r-md);
    color: var(--text-dim);
    font-size: 12px;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s;
}
.buy-split-btn:hover {
    border-color: var(--accent-line);
    color: var(--accent);
    border-style: solid;
}

.buy-split-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(255, 23, 68, 0.06);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-md);
}
.buy-split-total span {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.buy-split-total strong {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

/* Auto-Renew aktivierter Toggle-Button */
.btn-success-ghost {
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #4ade80;
}
.btn-success-ghost:hover {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.5);
}

/* =====================================================================
   REDEEM PAGE
   ===================================================================== */
.redeem-card {
    max-width: 560px;
    margin: 0 auto;
}
.redeem-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.redeem-input {
    font-family: var(--font-mono);
    font-size: 18px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    padding: 14px 16px !important;
}
.btn-lg {
    padding: 12px 22px;
    font-size: 14px;
}

.redeem-result {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: var(--r-md);
    margin-bottom: 18px;
    border-width: 1px;
    border-style: solid;
    border-left-width: 3px;
}
.redeem-result.is-success {
    background: rgba(74, 222, 128, 0.05);
    border-color: rgba(74, 222, 128, 0.3);
    border-left-color: #4ade80;
}
.redeem-result.is-error {
    background: rgba(248, 113, 113, 0.05);
    border-color: rgba(248, 113, 113, 0.3);
    border-left-color: #f87171;
}
.redeem-result-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
}
.redeem-result.is-success .redeem-result-icon {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}
.redeem-result.is-error .redeem-result-icon {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}
.redeem-result-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.redeem-result.is-success .redeem-result-title { color: #4ade80; }
.redeem-result.is-error   .redeem-result-title { color: #f87171; }
.redeem-result-message {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* =====================================================================
   TOAST NOTIFICATIONS
   ===================================================================== */
.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--text-dim);
    border-radius: var(--r-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.34, 1.36, 0.64, 1), opacity 0.2s;
    pointer-events: auto;
}
.toast.toast-show {
    transform: translateX(0);
    opacity: 1;
}
.toast.toast-dismiss {
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.28s ease-in, opacity 0.2s;
}
.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--text);
    background: var(--bg-deep);
}
.toast-icon svg { width: 18px; height: 18px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title {
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.toast-message {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--r-sm);
    transition: background 0.15s;
}
.toast-close:hover {
    background: var(--bg-deep);
    color: var(--text);
}

/* Type-Variants */
.toast.toast-success {
    border-left-color: #4ade80;
}
.toast.toast-success .toast-icon {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
}
.toast.toast-success .toast-title { color: #4ade80; }

.toast.toast-credit_added {
    border-left-color: var(--accent);
}
.toast.toast-credit_added .toast-icon {
    color: var(--accent);
    background: rgba(255, 23, 68, 0.08);
}
.toast.toast-credit_added .toast-title { color: var(--accent); }

.toast.toast-credit_removed {
    border-left-color: #fbbf24;
}
.toast.toast-credit_removed .toast-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}
.toast.toast-credit_removed .toast-title { color: #fbbf24; }

.toast.toast-warning {
    border-left-color: #fbbf24;
}
.toast.toast-warning .toast-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

.toast.toast-error {
    border-left-color: #f87171;
}
.toast.toast-error .toast-icon {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

@media (max-width: 600px) {
    .toast-stack {
        left: 12px;
        right: 12px;
        max-width: none;
        top: 12px;
    }
}

/* Credits current balance display in admin modal */
.credits-current {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 16px;
}
.credits-current span {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.credits-current strong {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

/* =====================================================================
   USER ACTION ICON BUTTONS (Admin Users-Tabelle)
   ===================================================================== */
.user-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
.user-action-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.user-action-btn:hover {
    background: var(--bg-deep);
    color: var(--text);
    border-color: var(--accent-line);
}
.user-action-btn-danger:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.06);
}
.user-action-btn svg {
    pointer-events: none;
}

/* Wenn Form innerhalb von .user-actions: Form-Margin entfernen */
.user-actions form.inline {
    margin: 0;
    display: inline-flex;
}

/* =====================================================================
   USERS TABLE — kompakteres Layout
   ===================================================================== */
.users-table th,
.users-table td {
    padding: 12px 14px;
}
.users-table th:first-child,
.users-table td:first-child {
    padding-left: 18px;
}
.users-table th:last-child,
.users-table td:last-child {
    padding-right: 18px;
}

/* Email-Spalte: füllt Rest, mit truncate falls zu lang */
.users-table th:first-child {
    width: auto;
}
.users-table td:first-child .user-cell-avatar {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Discord-Spalte: kompakter */
.users-table th:nth-child(4),
.users-table td:nth-child(4) {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Last-Login-Spalte: kompakt */
.users-table th:nth-child(7),
.users-table td:nth-child(7) {
    white-space: nowrap;
    width: 1%;
}

/* Status-Spalte: kompakt */
.users-table th:nth-child(8),
.users-table td:nth-child(8) {
    width: 1%;
    white-space: nowrap;
}

/* Action-Spalte: nur so breit wie nötig, no-wrap, kein extra padding */
.users-table th:last-child,
.users-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

/* Mobile: erst recht aggressives kompakt machen */
@media (max-width: 1100px) {
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }
    .users-table th:nth-child(4),
    .users-table td:nth-child(4) {
        display: none;
    }
}

/* =====================================================================
   TIER PILLS + LIST
   ===================================================================== */
.tier-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text);
}
.tier-pill.is-manual {
    border-color: var(--accent-line);
    background: rgba(255, 23, 68, 0.05);
    color: var(--accent);
}
.tier-pill.is-seen {
    color: var(--text-dim);
}

.tier-seen-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    padding: 8px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.tier-seen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px dashed var(--line);
}
.tier-seen-item:last-child { border-bottom: 0; }
.tier-seen-item code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text);
}
.tier-seen-meta {
    font-size: 10.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Tier-Counter-Badge */
.tier-count-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-mono);
}

/* Tier-Pill: aktiv-Zustand wenn ausgewählt */
.tier-pill.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.tier-pill.is-active.is-manual,
.tier-pill.is-active.is-seen {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.tier-pill:hover {
    border-color: var(--accent-line);
}

/* =====================================================================
   SHOP V2 — Credit-Shop neu gestaltet
   ===================================================================== */
.shop-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
}
.shop-card-v2 {
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color 0.18s, transform 0.18s;
}
.shop-card-v2:hover {
    border-color: var(--accent-line);
    transform: translateY(-1px);
}
.shop-card-v2.has-license {
    border-left: 3px solid var(--accent);
}

.shop-card-v2-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(to right, rgba(255,23,68,0.04), transparent);
    border-bottom: 1px solid var(--line);
}
.shop-card-v2-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.shop-card-v2-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.shop-card-v2-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 100px;
    font-size: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.shop-card-v2-slug {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
}

.shop-card-v2-body {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    margin: 0;
    transition: background 0.15s, border-color 0.15s;
}
.shop-action-row:hover:not(.is-disabled) {
    border-color: var(--accent-line);
    background: var(--bg-card);
}
.shop-action-row.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.shop-action-row.create-row .shop-action-icon {
    color: var(--accent);
    background: rgba(255, 23, 68, 0.08);
}
.shop-action-row.extend-row .shop-action-icon {
    color: #5b9eff;
    background: rgba(91, 158, 255, 0.08);
}

.shop-action-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
}

.shop-action-info {
    flex: 1;
    min-width: 0;
}
.shop-action-title {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 2px;
}
.shop-action-cost {
    font-size: 11.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.shop-action-license-info {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-dim);
}
.shop-action-license-info code {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.shop-action-license-select {
    margin-top: 8px;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 6px 10px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: var(--r-sm);
}
.shop-action-row button[type="submit"] {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0;
}

@media (max-width: 480px) {
    .shop-grid-v2 {
        grid-template-columns: 1fr;
    }
    .shop-action-row {
        flex-wrap: wrap;
    }
    .shop-action-row button[type="submit"] {
        width: 100%;
        margin-top: 8px;
    }
}

/* =====================================================================
   AUTH V2 — Discord-Hero + Collapsible Email-Form
   ===================================================================== */
.auth-card-v2 {
    /* etwas mehr Spielraum für den Hero-Button */
    max-width: 440px;
}

/* === Discord Hero-Button === */
.btn-discord-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--r-md);
    margin-top: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transition: transform 0.18s, box-shadow 0.25s;
}
.btn-discord-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(88, 101, 242, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    color: white;
}
.btn-discord-hero:active {
    transform: translateY(0);
}

/* Animierter Glow im Hintergrund */
.btn-discord-hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
                rgba(255, 255, 255, 0.18) 0%,
                rgba(255, 255, 255, 0) 50%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: discord-glow-pulse 4s ease-in-out infinite;
}
@keyframes discord-glow-pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}

.btn-discord-hero-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--r-sm);
    backdrop-filter: blur(4px);
    color: white;
    position: relative;
    z-index: 1;
}
.btn-discord-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}
.btn-discord-hero-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: white;
}
.btn-discord-hero-sub {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.3;
}
.btn-discord-hero-arrow {
    flex-shrink: 0;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.18s, color 0.18s;
    position: relative;
    z-index: 1;
}
.btn-discord-hero:hover .btn-discord-hero-arrow {
    transform: translateX(4px);
    color: rgba(255, 255, 255, 0.95);
}

/* === Toggle für Email-Login === */
.auth-toggle-email {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    border: 0;
    padding: 26px 0 14px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-display);
    font-weight: 500;
    transition: color 0.18s;
}
.auth-toggle-email:hover {
    color: var(--text);
}
.auth-toggle-divider {
    flex: 1;
    height: 1px;
    background: var(--line);
    transition: background 0.18s;
}
.auth-toggle-email:hover .auth-toggle-divider {
    background: var(--accent-line);
}
.auth-toggle-label {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.auth-toggle-label::after {
    content: '▼';
    font-size: 8px;
    transition: transform 0.25s;
    opacity: 0.6;
}
.auth-toggle-email.is-open .auth-toggle-label::after {
    transform: rotate(180deg);
}

/* === Collapsible Form === */
.auth-email-form {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s 0.05s,
                margin 0.32s;
    margin-top: 0;
}
.auth-email-form.is-open {
    max-height: 320px;
    opacity: 1;
    margin-top: 4px;
}
.auth-email-form-inner {
    padding-top: 8px;
}

/* Bei reduced motion: keine Animation */
@media (prefers-reduced-motion: reduce) {
    .btn-discord-hero-glow,
    .btn-discord-hero,
    .auth-toggle-label::after,
    .auth-email-form {
        animation: none !important;
        transition: none !important;
    }
}

/* Intent-Banner Warning-Variante (persistent: Sub ohne Allocation) */
.intent-banner.intent-banner-warning {
    background: linear-gradient(to right, rgba(251, 191, 36, 0.06), transparent);
    border-color: rgba(251, 191, 36, 0.35);
    border-left-color: #fbbf24;
}
.intent-banner.intent-banner-warning .intent-banner-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}
.intent-banner.intent-banner-warning .intent-banner-title {
    color: #fbbf24;
}

/* === License-Notes inline + Edit === */
.lic-notes-inline {
    color: var(--text-dim);
    font-weight: 400;
    font-size: 12px;
    margin-left: 4px;
}
.lic-notes-edit-btn {
    background: transparent;
    border: 0;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    border-radius: 4px;
    vertical-align: middle;
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
}
.lic-notes-edit-btn:hover {
    opacity: 1;
    color: var(--accent);
    background: rgba(255, 23, 68, 0.08);
}

/* === Allocation-Row erweitert mit License-Picker === */
.alloc-row { display: flex; flex-direction: column; gap: 6px; }
.alloc-row-fields {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.7fr auto;
    gap: 8px;
    align-items: center;
}
.alloc-row-license {
    margin-top: 2px;
    padding-left: 6px;
    border-left: 2px solid var(--line);
}
.alloc-row-license-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: 4px;
    display: block;
}
.alloc-row-license select { width: 100%; }
.alloc-row-preview { /* bestehend */ }

/* === Patreon OAuth-Card in Verknüpfungs-Sektion === */
.link-oauth-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: var(--text);
}
.link-oauth-card.is-connected {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(to right, rgba(34, 197, 94, 0.04), transparent);
}
.link-oauth-card.is-cta {
    border-color: rgba(255, 66, 77, 0.4);
    background: linear-gradient(135deg, rgba(255, 66, 77, 0.08), rgba(255, 66, 77, 0.02));
    transition: transform 0.15s, box-shadow 0.2s, border-color 0.15s;
    cursor: pointer;
}
.link-oauth-card.is-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 66, 77, 0.7);
    box-shadow: 0 4px 12px rgba(255, 66, 77, 0.15);
    color: var(--text);
}
.link-oauth-icon {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, #ff424d 0%, #ff6b75 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.link-oauth-info { flex: 1; min-width: 0; }
.link-oauth-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.link-oauth-meta {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    margin-top: 2px;
}
.link-oauth-arrow {
    flex-shrink: 0;
    font-size: 18px;
    color: rgba(255, 66, 77, 0.6);
    transition: transform 0.15s;
}
.link-oauth-card.is-cta:hover .link-oauth-arrow {
    transform: translateX(3px);
    color: rgba(255, 66, 77, 1);
}

/* Manuell-Toggle */
.link-manual-toggle {
    margin-top: 10px;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
}
.link-manual-toggle summary {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 12px;
    user-select: none;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}
.link-manual-toggle summary::-webkit-details-marker { display: none; }
.link-manual-toggle summary::before {
    content: '▸';
    font-size: 9px;
    transition: transform 0.15s;
}
.link-manual-toggle[open] summary::before {
    transform: rotate(90deg);
}
.link-manual-toggle summary:hover { color: var(--text); }

/* === Cross-Platform Warning im License-Picker === */
.alloc-license-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 11px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--r-sm);
    font-size: 11px;
    color: #fbbf24;
    line-height: 1.4;
}
.alloc-license-warning-icon {
    flex-shrink: 0;
    font-size: 13px;
    line-height: 1;
}

/* Bereits-zugewiesene Lizenzen im Dropdown visuell markieren */
.alloc-license option[data-already-assigned="1"] {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.04);
}

/* === Credits-Type Allocation: visueller Hinweis === */
.alloc-row:has([data-alloc-type] option[value="credits"]:checked) {
    border-color: rgba(255, 23, 68, 0.25);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.04), transparent);
}
.alloc-row:has([data-alloc-type] option[value="credits"]:checked)::before {
    content: '💎';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    opacity: 0.5;
    pointer-events: none;
}
.alloc-row { position: relative; }

/* =====================================================================
   HEADER-BELL + Notifications-Inbox + Email-Prefs
   ===================================================================== */

/* Bell im app-header */
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-bell {
    position: relative;
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--text-dim);
    transition: all 0.15s;
    border: 1px solid transparent;
}
.header-bell:hover {
    background: var(--bg-card);
    border-color: var(--line);
    color: var(--text);
}
.header-bell-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    font-family: var(--font-mono);
    box-shadow: 0 0 0 2px var(--bg);
}

/* Sidebar-Badge für Notifications */
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-family: var(--font-mono);
}

/* Notifications-Inbox */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.notif-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}
.notif-item.is-unread {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.04), transparent 70%);
    border-color: rgba(255, 23, 68, 0.18);
}
.notif-item.is-unread::before {
    content: '';
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.notif-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.04);
}
.notif-item-icon svg { width: 16px; height: 16px; }

.notif-item.is-success .notif-item-icon { color: #22c55e; background: rgba(34, 197, 94, 0.08); }
.notif-item.is-warning .notif-item-icon { color: #fbbf24; background: rgba(251, 191, 36, 0.08); }
.notif-item.is-error   .notif-item-icon { color: #f87171; background: rgba(248, 113, 113, 0.08); }
.notif-item.is-info    .notif-item-icon { color: #5b9eff; background: rgba(91, 158, 255, 0.08); }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
    line-height: 1.3;
}
.notif-item-text {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 6px;
}
.notif-item-meta {
    font-size: 10.5px;
    color: var(--text-dim);
    opacity: 0.7;
    font-family: var(--font-mono);
}

.notif-item-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.notif-item-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
}
.notif-item-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}
.notif-item-btn-delete:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty-state-icon {
    margin: 0 auto 16px;
    opacity: 0.4;
}
.empty-state-title {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text);
    margin: 0 0 6px;
}
.empty-state-text {
    font-size: 13px;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* Email-Prefs Liste */
.email-prefs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.email-pref-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.email-pref-row:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}
.email-pref-row.is-locked {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(91, 158, 255, 0.03);
    border-color: rgba(91, 158, 255, 0.15);
}
.email-pref-row input[type="checkbox"] {
    margin: 2px 0 0 0;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}
.email-pref-row.is-locked input[type="checkbox"] {
    cursor: not-allowed;
}
.email-pref-info { flex: 1; }
.email-pref-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.email-pref-desc {
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.4;
}

/* Buy-Modal: Credits-Saldo prominent im Header */
.buy-modal-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid var(--accent-line);
    border-radius: 100px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.buy-modal-balance:hover {
    background: rgba(255, 23, 68, 0.14);
    border-color: var(--accent);
    color: var(--accent);
}
.buy-modal-balance svg { opacity: 0.7; }

/* modal-header soll flex sein damit das passt */
.modal-header { display: flex; align-items: center; gap: 8px; }
.modal-header .modal-title { flex: 1; }

/* =====================================================================
   TRANSACTION HISTORY
   ===================================================================== */
.hist-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.hist-stat {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
}
.hist-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.hist-stat-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.hist-filters {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.hist-filter {
    padding: 8px 14px;
    font-size: 12.5px;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.hist-filter:hover { color: var(--text); }
.hist-filter.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.hist-list { display: flex; flex-direction: column; gap: 6px; }
.hist-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.hist-row-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
}
.hist-icon-kofi    { color: white; background: linear-gradient(135deg, #ff5f5f, #e02e2e); }
.hist-icon-patreon { color: white; background: linear-gradient(135deg, #ff424d, #cc1e2a); }
.hist-icon-plus    { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.hist-icon-minus   { color: #f87171; background: rgba(248, 113, 113, 0.1); }

.hist-row-body { flex: 1; min-width: 0; }
.hist-row-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.hist-row-title strong { font-weight: 700; }
.hist-row-detail {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.hist-row-key {
    font-family: var(--font-mono);
    font-size: 11px;
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--text);
}
.hist-row-credits {
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
}
.hist-row-balance {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}
.hist-row-from {
    font-style: italic;
    opacity: 0.7;
}
.hist-row-note {
    font-size: 11px;
    color: var(--text-dim);
    opacity: 0.6;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.4;
}
.hist-row-date {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    text-align: right;
    line-height: 1.3;
}
.hist-row-time {
    display: block;
    opacity: 0.6;
    margin-top: 1px;
}
.hist-pill {
    display: inline-block;
    padding: 1px 8px;
    background: rgba(91, 158, 255, 0.1);
    border: 1px solid rgba(91, 158, 255, 0.25);
    color: #5b9eff;
    border-radius: 100px;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* =====================================================================
   LICENSE-CARD: SESSIONS-DETAILS (collapsible)
   ===================================================================== */
.lic-sessions-block {
    border-top: 1px dashed var(--line);
    margin-top: 4px;
}
.lic-sessions-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 11.5px;
    color: var(--text-dim);
    user-select: none;
    list-style: none;
    transition: color 0.15s, background 0.15s;
}
.lic-sessions-toggle::-webkit-details-marker { display: none; }
.lic-sessions-toggle::before {
    content: '▸';
    font-size: 9px;
    opacity: 0.6;
    transition: transform 0.15s;
}
.lic-sessions-block[open] .lic-sessions-toggle::before {
    transform: rotate(90deg);
}
.lic-sessions-toggle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}
.lic-sessions-count {
    margin-left: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text);
    font-weight: 600;
}
.lic-sessions-fails {
    margin-left: auto;
    color: #fbbf24;
    font-size: 10.5px;
}

.lic-sessions-list { padding: 4px 16px 14px; }
.lic-sessions-list-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
}
.lic-sessions-list-title:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.lic-sessions-list-title.is-warning { color: #fbbf24; }
.lic-sessions-list-hint {
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.6;
    font-weight: 400;
}

.lic-session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
}
.lic-session-row.is-fail {
    background: rgba(251, 191, 36, 0.04);
    border-color: rgba(251, 191, 36, 0.18);
}
.lic-session-row-icon {
    flex-shrink: 0;
    color: var(--text-dim);
    opacity: 0.7;
}
.lic-session-row.is-fail .lic-session-row-icon { color: #fbbf24; opacity: 1; }
.lic-session-row-body { flex: 1; min-width: 0; }
.lic-session-row-main {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 1px;
}
.lic-session-row-meta {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    line-height: 1.4;
}
.lic-session-row-from { font-style: italic; opacity: 0.7; }
.lic-session-kill {
    flex-shrink: 0;
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
}
.lic-session-kill:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}

/* =====================================================================
   ADMIN: EMAIL-TEMPLATES (Variable-Pills + Preview)
   ===================================================================== */
.tpl-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.btn-link-small {
    background: transparent;
    border: 0;
    color: var(--accent);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
}
.btn-link-small:hover { color: var(--text); }

.tpl-vars-help {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 16px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--r-xs);
}
.tpl-vars-help-label {
    font-size: 10.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-right: 4px;
}
.tpl-var-pill {
    background: rgba(255, 23, 68, 0.06);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    padding: 2px 9px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s;
}
.tpl-var-pill:hover {
    background: rgba(255, 23, 68, 0.14);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.email-preview-modal .modal-body {
    background: var(--bg-deep);
}
.email-preview-headers {
    padding: 14px 18px;
    background: linear-gradient(180deg, #fafafa, #eeeeee);
    border-bottom: 1px solid #d0d0d0;
    color: #222;
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.email-preview-headerrow {
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.email-preview-label {
    flex-shrink: 0;
    width: 60px;
    color: #777;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.email-preview-headerrow span:not(.email-preview-label) {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.email-preview-subject {
    color: #111;
    font-weight: 600;
    font-size: 13px;
}

.email-preview-meta {
    padding: 10px 12px;
    background: var(--bg-deep);
    border-radius: var(--r-xs);
    font-size: 12.5px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent);
}
.email-preview-body {
    background: #f4f4f7;
    color: #222;
    padding: 0;
    font-family: -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    max-height: 600px;
    overflow-y: auto;
}
.email-preview-body table { border-collapse: collapse; }
.email-preview-body p { margin: 0 0 10px; }
.email-preview-body a { color: #1a73e8; }
.email-preview-body strong { color: #000; }
.email-preview-body blockquote {
    margin: 12px 0;
    padding: 8px 14px;
}

.email-preview-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(251, 191, 36, 0.1);
    border-top: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    font-size: 12px;
}
.email-preview-footer code {
    color: #fff8d8;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
}

/* =====================================================================
   ADMIN: Email-Templates — Tabs (Template + Sprache)
   ===================================================================== */
.tpl-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    overflow-x: auto;
    flex-wrap: wrap;
    scrollbar-width: thin;
}
.tpl-tab {
    flex-shrink: 0;
    padding: 10px 14px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-display);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.tpl-tab:hover { color: var(--text); }
.tpl-tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tpl-panel { display: none; }
.tpl-panel.is-active { display: block; }

.tpl-lang-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 0;
}
.tpl-lang-tab {
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--text-dim);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.tpl-lang-tab:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}
.tpl-lang-tab.is-active {
    background: rgba(255, 23, 68, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}
.tpl-preview-btn { margin-left: auto; }

.tpl-lang-panel { display: none; }
.tpl-lang-panel.is-active { display: block; }


/* =====================================================================
   ADMIN: Broadcast (Mass-Notifications)
   ===================================================================== */
.bc-target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.bc-target-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.bc-target-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.bc-target-card input[type="radio"] {
    margin: 2px 0 0 0;
    accent-color: var(--accent);
    flex-shrink: 0;
}
.bc-target-card:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.06), transparent 70%);
}
.bc-target-info { flex: 1; min-width: 0; }
.bc-target-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.bc-target-desc {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 4px;
}
.bc-target-count {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--accent);
}

/* Toast-Preview im Compose-Form */
.bc-preview {
    padding: 24px;
    background: var(--bg-deep);
    border: 1px dashed var(--line);
    border-radius: var(--r-sm);
    display: flex;
    justify-content: center;
}
.bc-preview .toast {
    margin: 0;
    pointer-events: none;
    max-width: 380px;
}

/* History */
.bc-history { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.bc-history-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.bc-history-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-xs);
}
.bc-icon-info    { background: rgba(91, 158, 255, 0.1);  color: #5b9eff; }
.bc-icon-success { background: rgba(34, 197, 94, 0.1);   color: #22c55e; }
.bc-icon-warning { background: rgba(251, 191, 36, 0.1);  color: #fbbf24; }
.bc-icon-error   { background: rgba(248, 113, 113, 0.1); color: #f87171; }

.bc-history-body { flex: 1; min-width: 0; }
.bc-history-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.bc-history-message {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 4px;
}
.bc-history-meta {
    font-size: 10.5px;
    color: var(--text-dim);
    opacity: 0.7;
    font-family: var(--font-mono);
}

/* =====================================================================
   ADMIN: Top-Donors / Donor-Stats
   ===================================================================== */
.donor-platform-bar {
    height: 28px;
    display: flex;
    border-radius: var(--r-xs);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}
.donor-platform-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    transition: filter 0.15s;
}
.donor-platform-segment:hover { filter: brightness(1.1); }
.donor-platform-segment.is-kofi    { background: linear-gradient(135deg, #ff5f5f, #e02e2e); }
.donor-platform-segment.is-patreon { background: linear-gradient(135deg, #ff424d, #cc1e2a); }

.donor-platform-legend {
    display: flex;
    gap: 18px;
    margin-top: 12px;
}
.donor-platform-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.donor-platform-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.donor-platform-dot.is-kofi    { background: #e02e2e; }
.donor-platform-dot.is-patreon { background: #cc1e2a; }
.donor-platform-name { color: var(--text-dim); }
.donor-platform-value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}

/* Donor-Tabelle */
.donor-table th { background: var(--bg-deep); }
.donor-table td.num { font-family: var(--font-mono); text-align: right; }

.donor-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
}
.donor-rank.is-rank-1 { background: linear-gradient(135deg, #ffd700, #d4a300); color: #000; }
.donor-rank.is-rank-2 { background: linear-gradient(135deg, #d0d0d0, #999);    color: #000; }
.donor-rank.is-rank-3 { background: linear-gradient(135deg, #cd7f32, #8b5a2b); color: white; }

.donor-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.donor-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-deep);
    object-fit: cover;
    flex-shrink: 0;
}
.donor-user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
}
.donor-user-info { min-width: 0; }
.donor-user-name {
    display: block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    line-height: 1.2;
}
.donor-user-name:hover { color: var(--accent); }
.donor-user-email {
    font-size: 10.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    line-height: 1.3;
}

.donor-mini-bar {
    display: flex;
    height: 8px;
    width: 100px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 100px;
    overflow: hidden;
}
.donor-mini-seg.is-kofi    { background: #e02e2e; }
.donor-mini-seg.is-patreon { background: #cc1e2a; }

/* =====================================================================
   ADMIN: Broadcast-Page (Mass-Notification)
   ===================================================================== */
.bcast-preview-wrap {
    background: var(--bg-deep);
    border: 1px dashed var(--line);
    border-radius: var(--r-sm);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bcast-preview-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--text-dim);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.bcast-preview-toast.is-info    { border-left-color: #5b9eff; }
.bcast-preview-toast.is-success { border-left-color: #22c55e; }
.bcast-preview-toast.is-warning { border-left-color: #fbbf24; }
.bcast-preview-toast.is-error   { border-left-color: #f87171; }

.bcast-preview-icon {
    flex-shrink: 0;
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
}
.bcast-preview-toast.is-info    .bcast-preview-icon { color: #5b9eff; background: rgba(91, 158, 255, 0.12); }
.bcast-preview-toast.is-success .bcast-preview-icon { color: #22c55e; background: rgba(34, 197, 94, 0.12); }
.bcast-preview-toast.is-warning .bcast-preview-icon { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.bcast-preview-toast.is-error   .bcast-preview-icon { color: #f87171; background: rgba(248, 113, 113, 0.12); }

.bcast-preview-body { flex: 1; min-width: 0; }
.bcast-preview-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.bcast-preview-message {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.5;
    word-break: break-word;
}

.bcast-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
}
.bcast-history-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.bcast-history-row:last-child { border-bottom: 0; }
.bcast-history-meta {
    flex-shrink: 0;
    width: 110px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
}
.bcast-history-text {
    flex: 1;
    color: var(--text);
}

/* =====================================================================
   TICKET-SYSTEM
   ===================================================================== */

/* Ticket-Liste */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ticket-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.1s;
    position: relative;
}
.ticket-row:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}
.ticket-row.has-unread {
    border-color: rgba(255, 23, 68, 0.4);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.04), transparent 70%);
}
.ticket-row.has-unread::before {
    content: '';
    position: absolute;
    left: 0; top: 14px; bottom: 14px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}
.ticket-row.is-resolved, .ticket-row.is-closed { opacity: 0.7; }

.ticket-row-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    border-radius: var(--r-sm);
    font-size: 18px;
}
.ticket-row-body { flex: 1; min-width: 0; }
.ticket-row-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.ticket-row-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}
.ticket-row-subject {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ticket-row-unread {
    background: var(--accent);
    color: white;
    padding: 1px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.ticket-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.ticket-row-time {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    text-align: right;
    line-height: 1.3;
}
.ticket-row-time span {
    display: block;
    opacity: 0.6;
    margin-top: 1px;
}

/* Pills für Status / Priorität / Kategorie */
.ticket-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.ticket-pill-status.ticket-status-open           { background: rgba(91, 158, 255, 0.12);  color: #5b9eff; border-color: rgba(91, 158, 255, 0.3); }
.ticket-pill-status.ticket-status-pending        { background: rgba(91, 158, 255, 0.12);  color: #5b9eff; border-color: rgba(91, 158, 255, 0.3); }
.ticket-pill-status.ticket-status-awaiting_user  { background: rgba(251, 191, 36, 0.12);  color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }
.ticket-pill-status.ticket-status-resolved       { background: rgba(34, 197, 94, 0.12);   color: #22c55e; border-color: rgba(34, 197, 94, 0.3); }
.ticket-pill-status.ticket-status-closed         { background: rgba(255, 255, 255, 0.04); color: var(--text-dim); }

.ticket-pill-prio.ticket-prio-low     { background: rgba(255, 255, 255, 0.04); }
.ticket-pill-prio.ticket-prio-normal  { background: rgba(255, 255, 255, 0.04); }
.ticket-pill-prio.ticket-prio-high    { background: rgba(251, 146, 60, 0.12);  color: #fb923c; border-color: rgba(251, 146, 60, 0.3); }
.ticket-pill-prio.ticket-prio-urgent  { background: rgba(248, 113, 113, 0.15); color: #f87171; border-color: rgba(248, 113, 113, 0.4); animation: ticket-pulse 2s ease-in-out infinite; }
@keyframes ticket-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticket-pill-meta {
    font-size: 10.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Filter-Bar im Admin */
.ticket-admin-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.ticket-admin-filter-bar select,
.ticket-admin-filter-bar input {
    padding: 6px 10px;
    font-size: 12.5px;
}

.hist-filter-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Ticket-Detail Layout (Admin: Grid mit Sidebar) */
.ticket-admin-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1024px) {
    .ticket-admin-grid {
        grid-template-columns: 1fr;
    }
}

.ticket-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* Chat-Container */
.ticket-chat {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ticket-messages {
    padding: 18px;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-anchor: auto;
    scroll-behavior: smooth;
}
/* Anker-Element am Ende: hält Scroll-Position bei neuen Messages unten */
.ticket-messages-anchor {
    overflow-anchor: auto;
    height: 1px;
}

/* Message Bubble */
.ticket-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 85%;
}
.ticket-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.ticket-msg-staff {
    align-self: flex-start;
}
.ticket-msg-system {
    align-self: center;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px dashed var(--line);
    text-align: center;
}
.ticket-msg-system-text {
    font-size: 11.5px;
    color: var(--text-dim);
    font-style: italic;
}
.ticket-msg-system-time {
    font-size: 10px;
    color: var(--text-dim);
    opacity: 0.6;
    font-family: var(--font-mono);
    margin-top: 1px;
}

.ticket-msg.is-internal .ticket-msg-bubble {
    background: rgba(251, 191, 36, 0.08) !important;
    border: 1px dashed rgba(251, 191, 36, 0.4);
}

.ticket-msg-avatar {
    flex-shrink: 0;
    width: 32px; height: 32px;
}
.ticket-msg-avatar img,
.ticket-msg-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-deep);
    object-fit: cover;
}
.ticket-msg-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
}

.ticket-msg-bubble-wrap {
    flex: 1;
    min-width: 0;
}
.ticket-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--text-dim);
}
.ticket-msg-user .ticket-msg-meta { justify-content: flex-end; }
.ticket-msg-meta strong {
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 600;
}
.ticket-msg-staff-badge {
    background: rgba(255, 23, 68, 0.12);
    color: var(--accent);
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    border: 1px solid var(--accent-line);
}
.ticket-msg-internal-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.ticket-msg-time {
    font-family: var(--font-mono);
    font-size: 10.5px;
    opacity: 0.7;
}
.ticket-msg-source {
    font-size: 10px;
    opacity: 0.6;
}

.ticket-msg-bubble {
    padding: 10px 14px;
    border-radius: var(--r-sm);
    line-height: 1.5;
    font-size: 13px;
    word-wrap: break-word;
}
.ticket-msg-user .ticket-msg-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}
.ticket-msg-staff .ticket-msg-bubble {
    background: var(--bg-deep);
    color: var(--text);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.ticket-msg-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}
.ticket-attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 11px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}
.ticket-attachment-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.ticket-attachment-size {
    color: var(--text-dim);
    font-size: 10px;
    font-family: var(--font-mono);
}

/* Reply-Form */
.ticket-reply-form {
    border-top: 1px solid var(--line);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-deep);
}
.ticket-reply-form textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    padding: 10px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
}
.ticket-reply-form textarea:focus {
    border-color: var(--accent);
    outline: none;
}
.ticket-reply-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ticket-attach-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
}
.ticket-attach-label:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}
.ticket-attach-label input[type="file"] { display: none; }
.ticket-internal-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-dim);
    cursor: pointer;
}
.ticket-internal-label input[type="checkbox"] {
    accent-color: #fbbf24;
}
.ticket-reply-hint {
    font-size: 10.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    opacity: 0.7;
}

.ticket-close-form {
    border-top: 1px solid var(--line);
    padding: 10px 14px;
    text-align: right;
    background: var(--bg-deep);
}

.ticket-closed-notice {
    border-top: 1px solid var(--line);
    padding: 14px;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
    justify-content: center;
}

.ticket-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 0;
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
}
.ticket-typing[hidden] { display: none !important; }
.ticket-typing-dot {
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
    animation: ticket-typing-bounce 1.4s ease-in-out infinite;
}
.ticket-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ticket-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes ticket-typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-3px); opacity: 1; }
}

/* Admin-Sidebar (rechts neben Chat) */
.ticket-admin-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ticket-side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ticket-side-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-deep);
    object-fit: cover;
}
.ticket-side-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
}
.ticket-side-user-name {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
}
.ticket-side-user-name a {
    color: var(--text);
    text-decoration: none;
}
.ticket-side-user-name a:hover { color: var(--accent); }
.ticket-side-user-email {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.ticket-side-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-top: 1px dashed var(--line);
}
.ticket-side-label {
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}


/* =====================================================================
   ADMIN: SMTP-Profile (Default + Support)
   ===================================================================== */

/* Status-Pill für Card-Header (Aktiv/Inaktiv-Indikator) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-display);
    border: 1px solid;
}
.status-pill-on {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}
.status-pill-off {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    border-color: var(--line);
}
.status-pill-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}
.status-pill-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Toggle-Label (Checkbox + Text-Block) */
.toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color 0.15s, background 0.15s;
}
.toggle-label:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.toggle-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--accent);
    width: 16px; height: 16px;
}
.toggle-label:has(input[type="checkbox"]:checked) {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.05), transparent 70%);
}
.toggle-text { flex: 1; }
.toggle-text strong {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}

/* Profile-Selector pro Template */
.tpl-profile-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--line);
    border-radius: var(--r-xs);
    margin-bottom: 12px;
    font-size: 12px;
}
.tpl-profile-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tpl-profile-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.15s;
}
.tpl-profile-radio:hover {
    background: rgba(255, 255, 255, 0.04);
}
.tpl-profile-radio input[type="radio"] {
    accent-color: var(--accent);
    margin: 0;
    flex-shrink: 0;
}
.tpl-profile-radio:has(input[type="radio"]:checked) {
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid var(--accent-line);
    padding: 3px 9px;
}
.tpl-profile-radio.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tpl-profile-radio span {
    color: var(--text);
    font-weight: 500;
}
.tpl-profile-radio small {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    opacity: 0.8;
}
.tpl-profile-radio small.text-muted {
    color: var(--text-dim);
    opacity: 0.6;
    font-style: italic;
}


/* =====================================================================
   ADMIN: SMTP-Tabs (Default / Support)
   ===================================================================== */
.smtp-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg-deep);
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.smtp-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    font-family: var(--font-display);
    margin-bottom: -1px;
    position: relative;
}
.smtp-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}
.smtp-tab.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}
.smtp-tab-icon {
    flex-shrink: 0;
    display: inline-flex;
    color: var(--text-dim);
    transition: color 0.15s;
}
.smtp-tab.is-active .smtp-tab-icon {
    color: var(--accent);
}
.smtp-tab-label {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
    min-width: 0;
}
.smtp-tab-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.smtp-tab-from {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}
.smtp-tab-status {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 4px;
}
.smtp-tab-status.is-on {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.smtp-tab-status.is-warning {
    background: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    animation: smtp-status-pulse 2s ease-in-out infinite;
}
.smtp-tab-status.is-off {
    background: var(--text-dim);
    opacity: 0.5;
}
@keyframes smtp-status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.smtp-tabpane {
    display: none;
}
.smtp-tabpane.is-active {
    display: block;
    animation: smtp-pane-fade 0.18s ease-out;
}
@keyframes smtp-pane-fade {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Auf Mobile: Tab-Labels enger */
@media (max-width: 600px) {
    .smtp-tabs { padding: 0 8px; }
    .smtp-tab { padding: 10px 12px; gap: 8px; }
    .smtp-tab-from { max-width: 140px; font-size: 10px; }
    .smtp-tab-name { font-size: 12px; }
}

/* =====================================================================
   ADMIN: Branding-Section (Details/Summary in SMTP-Tabs)
   ===================================================================== */
.email-brand-section {
    margin: 24px 0 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
}
.email-brand-section:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.email-brand-section[open] {
    border-color: rgba(255, 23, 68, 0.35);
    background: rgba(255, 255, 255, 0.035);
}
.email-brand-section summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    user-select: none;
    list-style: none;
    transition: background 0.15s;
}
.email-brand-section summary::-webkit-details-marker { display: none; }
.email-brand-section summary:hover {
    background: rgba(255, 255, 255, 0.04);
}
.email-brand-section summary::after {
    content: '+';
    margin-left: auto;
    font-size: 20px;
    color: var(--text-dim);
    transition: transform 0.2s, color 0.15s;
    line-height: 1;
}
.email-brand-section[open] summary::after {
    content: '−';
    color: var(--accent);
}
.email-brand-summary-hint {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    margin-left: 4px;
}
.email-brand-fields {
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.email-brand-fields .form-group {
    margin: 0;
}
.email-brand-fields label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 6px;
    display: block;
}
.email-brand-fields input[type="text"],
.email-brand-fields input[type="url"],
.email-brand-fields input[type="email"],
.email-brand-fields textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
}
.email-brand-fields input[type="text"]:focus,
.email-brand-fields input[type="url"]:focus,
.email-brand-fields input[type="email"]:focus,
.email-brand-fields textarea:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.35);
}
.email-brand-fields input::placeholder,
.email-brand-fields textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.email-brand-fields .form-hint {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11.5px;
    margin-top: 6px;
}

/* Brand-Lang-Tabs (DE/EN für Tagline + Footer) */
.brand-lang-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-xs);
    padding: 3px;
    gap: 0;
    margin-bottom: 8px;
}
.brand-lang-tab {
    padding: 5px 12px;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.brand-lang-tab:hover {
    color: rgba(255, 255, 255, 0.85);
}
.brand-lang-tab.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

/* =====================================================================
   ADMIN: Logo-Mode-Tabs (URL / Upload) im Branding-Block
   ===================================================================== */
.logo-mode-tabs {
    display: inline-flex;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    padding: 3px;
    gap: 0;
    margin-bottom: 10px;
}
.logo-mode-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.logo-mode-tab:hover {
    color: var(--text);
}
.logo-mode-tab input[type="radio"] {
    display: none;
}
.logo-mode-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.logo-mode-pane {
    margin-top: 6px;
}

/* Upload-Preview */
.logo-upload-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    margin-bottom: 10px;
}
.logo-upload-preview img {
    max-height: 48px;
    max-width: 200px;
    object-fit: contain;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%) 0 0/12px 12px,
                linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%) 6px 6px/12px 12px;
    background-color: #fafafa;
    padding: 4px 8px;
    border-radius: 4px;
}
.logo-upload-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
.logo-upload-meta code {
    font-size: 10.5px;
    color: var(--text-dim);
    word-break: break-all;
    max-width: 100%;
}

/* =====================================================================
   ADMIN: Tickets Overview — Stats + Inbox-Tabelle
   ===================================================================== */
.tk-overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.tk-stat {
    display: block;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.tk-stat:hover:not(.is-readonly) {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}
.tk-stat.is-active {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.06), transparent 70%);
}
.tk-stat.is-urgent {
    border-color: rgba(248, 113, 113, 0.4);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.06), transparent 70%);
}
.tk-stat.is-readonly { cursor: default; }
.tk-stat-label {
    font-family: var(--font-display);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 6px;
}
.tk-stat-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.tk-stat-value small {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
    margin-left: 2px;
}
.tk-stat-empty { color: var(--text-dim); font-weight: 400; }
.tk-stat.is-urgent .tk-stat-value { color: #f87171; }

/* Inbox-Tabelle */
.tk-inbox {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
}
.tk-inbox-head, .tk-inbox-row {
    display: grid;
    grid-template-columns: 90px 1fr 200px 160px 140px 80px;
    gap: 14px;
    align-items: center;
    padding: 10px 16px;
}
.tk-inbox-head {
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    font-weight: 600;
}
.tk-inbox-row {
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--line);
    transition: background 0.12s;
    position: relative;
}
.tk-inbox-row:last-child { border-bottom: 0; }
.tk-inbox-row:hover { background: rgba(255, 255, 255, 0.025); }
.tk-inbox-row.has-unread {
    background: linear-gradient(90deg, rgba(255, 23, 68, 0.04), transparent 30%);
}
.tk-inbox-row.has-unread::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}
.tk-inbox-row.is-resolved, .tk-inbox-row.is-closed { opacity: 0.6; }
.tk-inbox-row.is-prio-urgent .tk-inbox-subject-text { color: #f87171; }

.tk-inbox-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tk-inbox-status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-dim);
}
.tk-inbox-status-dot.tk-status-open,
.tk-inbox-status-dot.tk-status-pending  { background: #5b9eff; box-shadow: 0 0 0 3px rgba(91,158,255,0.18); }
.tk-inbox-status-dot.tk-status-awaiting_user { background: #fbbf24; }
.tk-inbox-status-dot.tk-status-resolved { background: #22c55e; }
.tk-inbox-status-dot.tk-status-closed   { background: var(--text-dim); opacity: 0.5; }

.tk-inbox-prio-flag { font-size: 12px; }
.tk-inbox-unread {
    background: var(--accent);
    color: white;
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1.4;
}

.tk-inbox-subject { min-width: 0; }
.tk-inbox-subject-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    overflow: hidden;
}
.tk-inbox-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
}
.tk-inbox-subject-text {
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.has-unread .tk-inbox-subject-text { color: white; }
.tk-inbox-subject-status {
    font-size: 10.5px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.tk-inbox-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.tk-inbox-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--bg-deep);
    object-fit: cover;
    flex-shrink: 0;
}
.tk-inbox-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}
.tk-inbox-user-name {
    font-size: 12.5px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-inbox-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
}
.tk-inbox-cat-icon { font-size: 13px; }
.tk-inbox-cat-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tk-inbox-assignee { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-inbox-assignee-empty { color: var(--text-dim); font-style: italic; opacity: 0.7; }

.tk-inbox-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    text-align: right;
}

.hist-filter-badge.is-muted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
}

/* Mobile Inbox */
@media (max-width: 900px) {
    .tk-inbox-head { display: none; }
    .tk-inbox-row {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
        gap: 6px 12px;
    }
    .tk-inbox-meta { grid-row: 1 / 3; align-self: start; padding-top: 4px; flex-direction: column; }
    .tk-inbox-subject { grid-column: 2; }
    .tk-inbox-user, .tk-inbox-tag, .tk-inbox-assignee, .tk-inbox-time {
        grid-column: 2;
        font-size: 11.5px;
    }
    .tk-inbox-user, .tk-inbox-tag { display: inline-flex; }
    .tk-inbox-assignee, .tk-inbox-time { display: inline-block; }
}

/* Admin-Sidebar erweiterung */
.tk-side-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}
.tk-side-stat {
    background: var(--bg-deep);
    padding: 8px 10px;
    border-radius: var(--r-xs);
}
.tk-side-stat-label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 2px;
}
.tk-side-stat-value {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.tk-side-stat-value small {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 500;
}

.tk-side-license {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
}
.tk-side-license-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.tk-side-license-product {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}
.tk-side-license-status {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 100px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tk-side-license-status.is-active { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.tk-side-license-status.is-expired { background: rgba(248, 113, 113, 0.12); color: #f87171; }
.tk-side-license-key {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 8px;
    border-radius: 4px;
    display: block;
    margin-bottom: 6px;
    word-break: break-all;
}
.tk-side-license-meta {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.tk-side-license-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tk-side-license-actions .btn {
    font-size: 11px;
    padding: 5px 10px;
}

.tk-cat-hint {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(91, 158, 255, 0.06);
    border: 1px dashed rgba(91, 158, 255, 0.25);
    border-radius: var(--r-xs);
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.5;
}
.tk-cat-hint strong { color: #5b9eff; display: block; margin-bottom: 3px; font-size: 11px; }

/* User Ticket-New: Custom File-Upload Button */
.tk-file-dropzone {
    border: 2px dashed var(--line);
    border-radius: var(--r-sm);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg-deep);
}
.tk-file-dropzone:hover, .tk-file-dropzone.is-dragover {
    border-color: var(--accent);
    background: rgba(255, 23, 68, 0.04);
}
.tk-file-dropzone input[type="file"] { display: none; }
.tk-file-dropzone-icon {
    color: var(--text-dim);
    margin-bottom: 8px;
}
.tk-file-dropzone:hover .tk-file-dropzone-icon { color: var(--accent); }
.tk-file-dropzone-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.tk-file-dropzone-hint {
    font-size: 11.5px;
    color: var(--text-dim);
}
.tk-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.tk-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
}
.tk-file-item-icon { color: var(--text-dim); flex-shrink: 0; }
.tk-file-item-name {
    flex: 1;
    font-size: 12px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tk-file-item-size {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-dim);
    flex-shrink: 0;
}
.tk-file-item-remove {
    background: transparent;
    border: 0;
    color: var(--text-dim);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 16px;
    line-height: 1;
}
.tk-file-item-remove:hover { color: #f87171; }

/* =====================================================================
   ADMIN: Tickets Filter-Bar (modernisiert)
   ===================================================================== */
.tk-status-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    padding: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    width: fit-content;
}
.tk-status-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dim);
    border-radius: var(--r-xs);
    transition: background 0.15s, color 0.15s;
}
.tk-status-tab:hover { color: var(--text); }
.tk-status-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.tk-status-tab-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--text-dim);
}
.tk-status-tab-dot.tk-status-open { background: #5b9eff; }
.tk-status-tab-dot.tk-status-closed { background: #22c55e; opacity: 0.7; }
.tk-status-tab-count {
    background: rgba(255, 23, 68, 0.15);
    color: var(--accent);
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}
.tk-status-tab-count.is-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
}
.tk-status-tab.is-active .tk-status-tab-count {
    background: var(--accent);
    color: white;
}

.tk-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.tk-filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 0 12px;
    transition: border-color 0.15s;
}
.tk-filter-search:focus-within {
    border-color: var(--accent);
}
.tk-filter-search svg {
    color: var(--text-dim);
    flex-shrink: 0;
}
.tk-filter-search input {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 9px 0;
    font-size: 13px;
    outline: none;
}
.tk-filter-search input::placeholder { color: var(--text-dim); }

.tk-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tk-filter-select {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--text);
    padding: 9px 30px 9px 12px;
    font-size: 12.5px;
    font-family: var(--font-display);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2399999d' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.tk-filter-select:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.tk-filter-select:focus {
    border-color: var(--accent);
    outline: none;
}

.tk-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--r-sm);
    color: #f87171;
    text-decoration: none;
    transition: background 0.15s;
}
.tk-filter-reset:hover {
    background: rgba(248, 113, 113, 0.18);
}

/* =====================================================================
   ADMIN: Discord DM-Templates Editor
   ===================================================================== */
.dm-tpl-type-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    flex-wrap: wrap;
}
.dm-tpl-type-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: 0;
    border-radius: var(--r-xs);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
}
.dm-tpl-type-tab:hover { color: var(--text); }
.dm-tpl-type-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.dm-tpl-type-icon {
    font-size: 15px;
    line-height: 1;
}
.dm-tpl-pane {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.dm-tpl-vars {
    padding: 10px 12px;
    background: var(--bg-deep);
    border-radius: var(--r-xs);
    font-size: 11.5px;
    color: var(--text-dim);
    margin-bottom: 14px;
    line-height: 1.8;
}
.dm-tpl-vars strong {
    color: var(--text);
    font-weight: 600;
    margin-right: 8px;
}
.dm-tpl-var-chip {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(91, 158, 255, 0.1);
    border: 1px solid rgba(91, 158, 255, 0.25);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #5b9eff;
    cursor: pointer;
    transition: background 0.15s;
    margin: 2px 2px 2px 0;
}
.dm-tpl-var-chip:hover {
    background: rgba(91, 158, 255, 0.2);
}

/* =====================================================================
   USER: Account-Page — Card-Konsistenz Fixes
   ===================================================================== */

/* Connections-Card linker roter Strich entfernen falls aus account.php */
.card[id="alloc"] {
    /* Keine zusätzliche linke Linie — alloc-block hat eigene Akzente */
}
.card[id="alloc"]::before {
    display: none;
}

/* Connections-Card Discord */
.discord-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.discord-profile .discord-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--line);
}
.discord-profile .discord-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

/* Allocation-Block: kein Premium-Akzent-Streifen mehr (überfüllt UI), sondern leichterer Look */
.alloc-block {
    padding: 18px 20px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}
.alloc-block::before {
    display: none; /* Roter Strich links entfernen — sieht zu busy aus mit mehreren Plattformen */
}
.alloc-block:last-child { margin-bottom: 0; }

/* Plattform-Header oben mit Badge-Style */
.alloc-block[data-platform="kofi"] .alloc-block-platform { color: #ff5f5f; }
.alloc-block[data-platform="patreon"] .alloc-block-platform { color: #ff424d; }

/* Stats-Sum Badge passt zum Akzent */
.alloc-total {
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid rgba(255, 23, 68, 0.25);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}
.alloc-total::before {
    content: 'Σ ';
    opacity: 0.7;
    margin-right: 2px;
}

/* =====================================================================
   ADMIN: Platform-Tabs (Ko-fi / Patreon / Donations / Donors)
   ===================================================================== */
.platform-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 5px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    flex-wrap: wrap;
    width: fit-content;
}
.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--r-xs);
    transition: background 0.15s, color 0.15s;
}
.platform-tab:hover { color: var(--text); }
.platform-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.platform-tab svg { flex-shrink: 0; }

@media (max-width: 600px) {
    .platform-tabs { width: 100%; }
    .platform-tab { flex: 1; justify-content: center; padding: 9px 8px; font-size: 12px; }
}

/* =====================================================================
   ADMIN: Lizenz-Action-Buttons (kompaktes Dropdown)
   ===================================================================== */
.lic-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    justify-content: flex-end;
}
/* Buttons in der Action-Zelle minimal halten */
.lic-actions .btn-sm {
    padding: 6px 8px !important;
    font-size: 11.5px;
}
.lic-actions .btn-sm svg {
    flex-shrink: 0;
}
.lic-actions form.inline {
    margin: 0;
}
.lic-action-menu {
    position: relative;
    display: inline-block;
}
.lic-action-menu-trigger {
    padding: 6px 8px !important;
}
.lic-action-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 100;
    padding: 6px;
    text-align: left;
}
.lic-action-menu.is-open .lic-action-menu-dropdown {
    display: block;
}
.lic-action-menu-item {
    margin: 0;
    display: block;
}
.lic-action-menu-item button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--r-xs);
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
}
.lic-action-menu-item button:hover {
    background: rgba(255, 255, 255, 0.06);
}
.lic-action-menu-item button svg {
    color: var(--text-dim);
    flex-shrink: 0;
}
.lic-action-menu-item.is-danger button {
    color: #f87171;
}
.lic-action-menu-item.is-danger button svg {
    color: #f87171;
}
.lic-action-menu-item.is-danger button:hover {
    background: rgba(248, 113, 113, 0.1);
}
.lic-action-menu-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}

/* =====================================================================
   ADMIN: Lizenz-Liste — Spalten-Kompaktion
   ===================================================================== */
/* Action-Spalte braucht keinen extra Padding */
table td:last-child {
    padding-right: 14px !important;
}

/* "Pending Aktivierung" Badge enger formatieren */
.badge-info {
    white-space: nowrap;
    font-size: 10.5px;
    line-height: 1.2;
    padding: 4px 10px;
}

/* Status-Badge kompakter */
.lic-actions + td .badge,
table td .badge {
    white-space: nowrap;
}

/* =====================================================================
   ADMIN: Settings-Tabs (Branding/Integration/Logs/Debug/Update/Guide)
   ===================================================================== */
.settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 5px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    flex-wrap: wrap;
    overflow-x: auto;
}
.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--r-xs);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.settings-tab:hover { color: var(--text); }
.settings-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.settings-tab svg { flex-shrink: 0; }

@media (max-width: 700px) {
    .settings-tabs { flex-wrap: nowrap; }
    .settings-tab { font-size: 12px; padding: 8px 10px; }
    .settings-tab span { display: none; }
}

/* =====================================================================
   ADMIN: Logs-Tabellen — Spalten-Truncation & Tooltips
   ===================================================================== */
.logs-validation-table,
.logs-reset-table {
    table-layout: fixed;
    width: 100%;
}
.logs-validation-table th,
.logs-validation-table td,
.logs-reset-table th,
.logs-reset-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}
.logs-validation-table .col-time,
.logs-reset-table .col-time {
    white-space: nowrap;
    font-size: 11px;
    width: 90px;
}
.logs-validation-table .col-key,
.logs-reset-table .col-key {
    font-size: 11px;
    width: 130px;
}
.logs-validation-table .col-domain-hwid {
    width: 160px;
    line-height: 1.4;
}
.logs-validation-table .col-ip,
.logs-reset-table .col-ip {
    font-size: 11px;
    width: 110px;
}
.logs-validation-table .col-msg,
.logs-reset-table .col-msg {
    font-size: 12px;
    max-width: 260px;
    white-space: nowrap;
}
.logs-reset-table .col-user {
    font-size: 11px;
    max-width: 180px;
    white-space: nowrap;
}

/* =====================================================================
   ADMIN: License-Edit Modal — User-Verknüpfungs-Info-Box
   ===================================================================== */
.kofi-user-link-info {
    margin: 8px 0 16px;
    padding: 12px 14px;
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--r-sm);
    font-size: 12.5px;
}
.kofi-user-link-info--empty {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--line);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}
.kofi-user-link-info-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #22c55e;
    font-family: var(--font-display);
    font-size: 12.5px;
    margin-bottom: 8px;
}
.kofi-user-link-info-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kofi-user-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.kofi-user-link-platform {
    font-family: var(--font-display);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 60px;
}
.kofi-user-link-row code {
    font-size: 11.5px;
    background: var(--bg-deep);
    padding: 2px 8px;
    border-radius: 3px;
}
.kofi-user-link-row .btn-sm {
    margin-left: auto;
    padding: 4px 10px !important;
    font-size: 11px;
}
.kofi-user-link-info-foot {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(34, 197, 94, 0.2);
    font-size: 11.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* =====================================================================
   FOOTER — Site-weit mit Legal-Links + Discord-Support
   ===================================================================== */
.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 12px;
}
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
    flex-wrap: wrap;
}
.site-footer-brand {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    opacity: 0.7;
}
.site-footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.site-footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.site-footer-links a:hover {
    color: var(--text);
}
.site-footer-discord {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 100px;
    color: #8ea1f0 !important;
    font-weight: 500;
}
.site-footer-discord:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #b3c1f7 !important;
}
@media (max-width: 600px) {
    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* =====================================================================
   LEGAL-PAGES — Inhalt-Renderer
   ===================================================================== */
.legal-content {
    line-height: 1.7;
    font-size: 14px;
}
.legal-content h2 {
    margin: 28px 0 14px;
    font-size: 22px;
    color: var(--text);
}
.legal-content h2:first-child {
    margin-top: 0;
}
.legal-content h3 {
    margin: 24px 0 12px;
    font-size: 17px;
    color: var(--text);
}
.legal-content h4 {
    margin: 20px 0 10px;
    font-size: 15px;
    color: var(--text);
}
.legal-content p {
    margin: 0 0 14px;
    color: var(--text-dim);
}
.legal-content strong {
    color: var(--text);
}
.legal-content ul {
    margin: 0 0 16px;
    padding-left: 22px;
    color: var(--text-dim);
}
.legal-content ul li {
    margin-bottom: 6px;
}
.legal-content a {
    color: var(--accent);
    text-decoration: none;
}
.legal-content a:hover {
    text-decoration: underline;
}
.legal-meta {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    font-size: 11.5px;
    color: var(--text-dim);
    opacity: 0.7;
}

/* =====================================================================
   ADMIN: Branding Sub-Tabs (Favicon / Legal / Support)
   ===================================================================== */
.branding-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 5px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    flex-wrap: wrap;
    width: fit-content;
}
.branding-subtab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--r-xs);
    transition: background 0.15s, color 0.15s;
}
.branding-subtab:hover { color: var(--text); }
.branding-subtab.is-active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Legal-Page-Type Tabs in Branding */
.legal-page-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    width: fit-content;
}
.legal-page-tab {
    padding: 7px 16px;
    background: transparent;
    border: 0;
    border-radius: var(--r-xs);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
}
.legal-page-tab:hover { color: var(--text); }
.legal-page-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
}

/* =====================================================================
   ADMIN: Email-Template Panel-Header (klare Titel + Beschreibung)
   ===================================================================== */
.tpl-panel-header {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.05), rgba(255, 23, 68, 0.01));
    border: 1px solid rgba(255, 23, 68, 0.15);
    border-radius: var(--r-sm);
    position: relative;
}
.tpl-panel-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.tpl-panel-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}
.tpl-panel-techname {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 10.5px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-dim);
    padding: 2px 8px;
    border-radius: 3px;
    font-family: var(--font-mono);
    opacity: 0.6;
}
.tpl-panel-techname:hover { opacity: 1; }

/* =====================================================================
   VORKS ID — Hero-Button
   ===================================================================== */
.btn-vorks-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.12), rgba(255, 23, 68, 0.04));
    border: 1px solid rgba(255, 23, 68, 0.35);
    border-radius: var(--r-sm);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    overflow: hidden;
}
.btn-vorks-hero:hover {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.2), rgba(255, 23, 68, 0.08));
    border-color: var(--accent);
    transform: translateY(-1px);
}
.btn-vorks-hero-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-vorks-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}
.btn-vorks-hero-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.btn-vorks-hero-sub {
    font-size: 11.5px;
    color: var(--text-dim);
}
.btn-vorks-hero-arrow {
    font-size: 22px;
    color: var(--accent);
    font-weight: 700;
}

/* =====================================================================
   2FA — Backup Codes
   ===================================================================== */
.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px 0;
}
.backup-code {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    color: var(--text);
    text-align: center;
    letter-spacing: 0.1em;
    user-select: all;
}

/* =====================================================================
   ADMIN USER-DETAIL PAGE
   ===================================================================== */
.user-detail-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.user-detail-stat {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.user-detail-stat-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: 6px;
}
.user-detail-stat-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.user-detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
}
@media (max-width: 900px) {
    .user-detail-stats { grid-template-columns: repeat(2, 1fr); }
    .user-detail-grid  { grid-template-columns: 1fr; }
}

/* Key-Value-Tabelle in Detail-Page */
.table-kv {
    width: 100%;
    border-collapse: collapse;
}
.table-kv th {
    text-align: left;
    font-size: 11.5px;
    color: var(--text-dim);
    font-weight: 500;
    padding: 7px 0;
    width: 110px;
    vertical-align: top;
}
.table-kv td {
    padding: 7px 0;
    font-size: 13px;
    color: var(--text);
}
.table-kv tr + tr th,
.table-kv tr + tr td {
    border-top: 1px solid var(--line);
}
.table-compact th,
.table-compact td {
    padding: 6px 8px;
    font-size: 12px;
}

/* =====================================================================
   ADMIN — Vorks ID Settings (überarbeitet)
   ===================================================================== */

/* Status-Hero oben */
.vorks-status-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: var(--bg-card);
}
.vorks-status-hero.is-active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.02));
    border-color: rgba(34, 197, 94, 0.35);
}
.vorks-status-hero.is-active .vorks-status-icon {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}
.vorks-status-hero.is-ready {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(251, 191, 36, 0.02));
    border-color: rgba(251, 191, 36, 0.3);
}
.vorks-status-hero.is-ready .vorks-status-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}
.vorks-status-hero.is-pending {
    background: linear-gradient(135deg, rgba(91, 158, 255, 0.06), rgba(91, 158, 255, 0.02));
    border-color: rgba(91, 158, 255, 0.3);
}
.vorks-status-hero.is-pending .vorks-status-icon {
    color: #5b9eff;
    background: rgba(91, 158, 255, 0.15);
}
.vorks-status-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vorks-status-body { flex: 1; }
.vorks-status-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.vorks-status-sub {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}
.vorks-status-sub a { color: var(--accent); }

/* Setup-Steps */
.vorks-setup-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.vorks-setup-steps > li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.vorks-setup-step-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #d10b34);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
}
.vorks-setup-step-body { flex: 1; min-width: 0; }
.vorks-setup-step-title {
    font-family: var(--font-display);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.vorks-setup-step-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 10px;
}
.vorks-setup-step-text:last-child { margin-bottom: 0; }
.vorks-setup-step-body em { color: var(--text); font-style: normal; font-weight: 500; }
.vorks-setup-step-body code {
    font-size: 11.5px;
    background: var(--bg-card);
    padding: 2px 7px;
    border-radius: 3px;
}

/* Field-Tabelle in Setup-Step */
.vorks-setup-fields {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}
.vorks-setup-fields th {
    text-align: left;
    padding: 6px 10px 6px 0;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: 110px;
    white-space: nowrap;
    vertical-align: middle;
}
.vorks-setup-fields td {
    padding: 6px 0;
    font-size: 12.5px;
    color: var(--text);
}
.vorks-setup-fields tr + tr th,
.vorks-setup-fields tr + tr td {
    border-top: 1px dashed var(--line);
}
.vorks-setup-copy {
    user-select: all;
    word-break: break-all;
}
.vorks-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 22px;
    padding: 0;
    margin-left: 6px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text-dim);
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.15s;
}
.vorks-copy-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

/* Toggle-Card */
.vorks-toggle-card {
    margin-bottom: 22px;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.vorks-toggle-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    margin: 0;
}
.vorks-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vorks-toggle-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vorks-toggle-text strong {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}
.vorks-toggle-text span {
    font-size: 12px;
    color: var(--text-dim);
}
.vorks-toggle-text code {
    font-size: 11px;
    background: var(--bg-card);
    padding: 1px 6px;
    border-radius: 3px;
}
.vorks-toggle-switch {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    position: relative;
    transition: background 0.18s;
}
.vorks-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.18s;
}
.vorks-toggle-label input:checked ~ .vorks-toggle-switch {
    background: var(--accent);
}
.vorks-toggle-label input:checked ~ .vorks-toggle-switch::after {
    transform: translateX(20px);
}

/* Erweiterte Optionen Details */
.vorks-advanced {
    margin: 14px 0 6px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
}
.vorks-advanced summary {
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.vorks-advanced[open] summary { color: var(--text); margin-bottom: 8px; }
.vorks-advanced summary:hover { color: var(--text); }

/* =====================================================================
   ERROR-PAGE — 403 / 404 / Permission-Denied
   ===================================================================== */
.error-page-card {
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.error-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 23, 68, 0.1);
    color: var(--accent);
    margin-bottom: 18px;
}
.error-page-code {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.error-page-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
}
.error-page-message {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 20px;
}
.error-page-meta {
    font-size: 12.5px;
    color: var(--text-dim);
    padding: 12px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.error-page-meta strong { color: var(--text); }
.error-page-hint {
    font-size: 12.5px;
    color: var(--text-dim);
    padding: 14px 18px;
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--r-sm);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 20px;
}
.error-page-hint strong { color: #fbbf24; }
.error-page-hint code {
    background: var(--bg-deep);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11.5px;
}
.error-page-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================================
   ADMIN — Vorks ID Radio-Group (Sync-Strategy)
   ===================================================================== */
.vorks-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.vorks-radio {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.15s;
}
.vorks-radio:hover { border-color: rgba(255, 23, 68, 0.3); }
.vorks-radio input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.vorks-radio:has(input:checked) {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.04), rgba(255, 23, 68, 0.01));
    border-color: rgba(255, 23, 68, 0.4);
}
.vorks-radio-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vorks-radio-body strong {
    font-family: var(--font-display);
    font-size: 13.5px;
    color: var(--text);
    font-weight: 600;
}
.vorks-radio-body small {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* =====================================================================
   ADMIN — DM-Logs-Page
   ===================================================================== */
.dm-filter-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
}
.dm-filter-tab {
    padding: 6px 14px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--r-xs);
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
    transition: all 0.15s;
}
.dm-filter-tab:hover { color: var(--text); }
.dm-filter-tab.is-active {
    background: var(--bg-card);
    color: var(--text);
}

.dm-log-table {
    width: 100%;
    border-collapse: collapse;
}
.dm-log-table th {
    text-align: left;
    padding: 12px 14px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}
.dm-log-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    vertical-align: top;
}
.dm-log-table tr:last-child td { border-bottom: 0; }
.dm-log-table tr.is-failed {
    background: rgba(248, 113, 113, 0.04);
}
.dm-log-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.dm-log-error {
    color: #f87171;
    font-size: 12px;
    line-height: 1.4;
    max-width: 460px;
}
.dm-log-content {
    color: var(--text-dim);
    font-size: 12px;
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Troubleshooting */
.dm-troubleshoot {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dm-troubleshoot-item {
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-left: 3px solid #f87171;
    border-radius: var(--r-xs);
}
.dm-troubleshoot-error {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: #f87171;
    margin-bottom: 6px;
}
.dm-troubleshoot-fix {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}
.dm-troubleshoot-fix strong { color: var(--text); }
.dm-troubleshoot-fix code {
    font-size: 11.5px;
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 3px;
}
.dm-troubleshoot-fix a { color: var(--accent); }

/* =====================================================================
   MOBILE FIX — page-header mit überlappenden Action-Buttons (Users-Page etc.)
   ===================================================================== */
@media (max-width: 720px) {
    .page-header {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
    }
    .page-header .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    .page-header .actions .btn {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }
    /* Eyebrow-Pill und h1 nicht mehr verdrücken */
    .page-header .eyebrow {
        display: inline-flex;
        margin-bottom: 6px;
    }
    .page-header h1 {
        font-size: 22px;
        line-height: 1.2;
        margin-top: 2px;
        word-break: normal;
        overflow-wrap: anywhere;
    }
    .page-header .subtitle,
    .page-header .page-subtitle {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Auf Mobile: Test-Toast und ähnliche Util-Buttons nur Icon */
@media (max-width: 720px) {
    .btn-icon-mobile .btn-label {
        display: none;
    }
    .btn-icon-mobile {
        flex: 0 0 auto !important;
        padding: 8px 10px !important;
    }
}

/* =====================================================================
   CODE-BLOCK (für API-Doku etc.)
   ===================================================================== */
.code-block {
    margin: 8px 0;
    padding: 14px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text);
    overflow-x: auto;
    white-space: pre;
    word-wrap: normal;
}

/* =====================================================================
   ADMIN — Inline-Editor für max_activations
   ===================================================================== */
.activation-cell {
    position: relative;
    display: inline-block;
}
.activation-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}
.activation-trigger:hover {
    border-color: var(--accent);
    background: rgba(255, 23, 68, 0.05);
}
.activation-trigger.is-override {
    border-color: rgba(91, 158, 255, 0.45);
    background: rgba(91, 158, 255, 0.06);
}
.activation-trigger.is-full {
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.06);
}
.activation-trigger.is-full strong { color: #fbbf24; }
.activation-trigger strong { font-weight: 700; }
.activation-badge {
    margin-left: 4px;
    color: #5b9eff;
    font-size: 11px;
}

/* Popover */
.activation-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    z-index: 50;
    text-align: left;
}
.activation-popover.is-open { display: block; }
.activation-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
}
.activation-popover-label {
    display: block;
    font-family: var(--font-display);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.activation-popover-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 8px;
}
.activation-popover-row .btn {
    padding: 0;
    width: 32px;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
}
.activation-popover-input {
    flex: 1;
    min-width: 60px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    color: var(--text);
    padding: 6px 8px;
    appearance: textfield;
    -moz-appearance: textfield;
}
.activation-popover-input::-webkit-inner-spin-button,
.activation-popover-input::-webkit-outer-spin-button {
    -webkit-appearance: none; margin: 0;
}
.activation-popover-hint {
    font-size: 11.5px;
    color: var(--text-dim);
    margin: 6px 0;
    line-height: 1.5;
}
.activation-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

/* Außerhalb-Klick schließt das Popover */
@media (max-width: 720px) {
    .activation-popover {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 16px;
        right: 16px;
        transform: none;
        min-width: 0;
    }
    .activation-popover::before { display: none; }
}

/* =====================================================================
   Key Reveal-Box (Upload-Keys, Server-Keys)
   ===================================================================== */
.key-reveal {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 4px;
}
.key-reveal-value {
    flex: 1;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fbbf24;
    background: var(--bg-deep);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--r-sm);
    padding: 14px 18px;
    overflow-x: auto;
    white-space: nowrap;
    user-select: all;
    display: flex;
    align-items: center;
}
.key-reveal-copy {
    flex-shrink: 0;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .key-reveal { flex-direction: column; }
}

/* =====================================================================
   Scope-Auswahl im Server-Key Modal
   ===================================================================== */
.scope-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.scope-option {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.15s;
    align-items: flex-start;
}
.scope-option:hover { border-color: rgba(255, 23, 68, 0.3); }
.scope-option input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.scope-option:has(input:checked) {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.04), rgba(255, 23, 68, 0.01));
    border-color: rgba(255, 23, 68, 0.4);
}
.scope-option > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.scope-option strong {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}
.scope-option small {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}
