/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1c24;
    color: #e8e9ed;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

:root {
    --bg-0: #14151c;
    --bg-1: #1a1c24;
    --bg-2: #22242e;
    --bg-3: #2a2d39;
    --bg-4: #353846;
    --border: #2f3240;
    --text: #e8e9ed;
    --text-dim: #9aa0b1;
    --text-faint: #6b7080;
    --brand: #7c5cff;
    --brand-2: #a47dff;
    --brand-gradient: linear-gradient(135deg, #7c5cff 0%, #c45dff 50%, #ff5cd0 100%);
    --premium: #ffb547;
    --premium-2: #ff8a3d;
    --premium-gradient: linear-gradient(135deg, #ffb547 0%, #ff8a3d 100%);
    --success: #43b581;
    --danger: #f04747;
    --warning: #faa61a;
    --discord: #5865f2;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 6px 22px -8px rgba(124, 92, 255, .8);
}
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(124, 92, 255, .9); }
.btn-secondary {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-4); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d93b3b; }
.btn-premium {
    background: var(--premium-gradient);
    color: #2a1700;
    box-shadow: 0 6px 22px -8px rgba(255, 138, 61, .9);
}
.btn-lg { padding: 14px 26px; font-size: 15px; }

/* ---------- Landing: Top Nav ---------- */
.top-nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(20, 21, 28, .72);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }

/* ─── CemtBot logo mark ─────────────────────────────────────
   Layered gradient with shimmer, inset highlight, and a small
   "spark" accent in the top-right corner.
*/
.brand-logo,
.sidebar-brand-logo,
.login-logo {
    --logo-size: 38px;
    --logo-font: 18px;
    --logo-radius: 11px;
    position: relative;
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: var(--logo-radius);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 55%),
        linear-gradient(135deg, #7c5cff 0%, #a35cff 35%, #c45dff 70%, #ff5cd0 100%);
    background-size: 200% 200%;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    font-size: var(--logo-font);
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(60, 0, 80, 0.4);
    box-shadow:
        0 8px 24px -6px rgba(124, 92, 255, 0.55),
        0 2px 8px -2px rgba(196, 93, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -8px 16px -8px rgba(0, 0, 0, 0.25);
    animation: brand-shimmer 8s ease-in-out infinite;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    flex-shrink: 0;
    overflow: hidden;
}
/* Glossy diagonal highlight sweep */
.brand-logo::before,
.sidebar-brand-logo::before,
.login-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
        transparent 35%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 65%);
    opacity: 0.7;
    pointer-events: none;
}
/* Tiny spark in the top-right */
.brand-logo::after,
.sidebar-brand-logo::after,
.login-logo::after {
    content: "";
    position: absolute;
    top: 18%;
    right: 18%;
    width: 14%;
    height: 14%;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.95), 0 0 16px rgba(255, 200, 255, 0.6);
    opacity: 0.9;
    animation: brand-spark 3s ease-in-out infinite;
    pointer-events: none;
}
.brand-logo > *,
.sidebar-brand-logo > *,
.login-logo > * { position: relative; z-index: 1; }

/* Variants */
.brand-logo.small { --logo-size: 26px; --logo-font: 13px; --logo-radius: 8px; }
.sidebar-brand-logo { --logo-size: 34px; --logo-font: 16px; --logo-radius: 10px; }
.login-logo { --logo-size: 56px; --logo-font: 26px; --logo-radius: 16px; }

/* Hover interaction (when wrapped in a link/button) */
.brand:hover .brand-logo,
.sidebar-brand-link:hover .sidebar-brand-logo {
    transform: translateY(-1px) rotate(-4deg) scale(1.04);
    box-shadow:
        0 14px 36px -6px rgba(124, 92, 255, 0.75),
        0 2px 8px -2px rgba(196, 93, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -8px 16px -8px rgba(0, 0, 0, 0.25);
}

@keyframes brand-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes brand-spark {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.brand-name {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #d6c2ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 8px; align-items: center; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 120px 24px 80px;
    text-align: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(124, 92, 255, .25), transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(255, 92, 208, .18), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(196, 93, 255, .15), transparent 50%);
    pointer-events: none;
}
.hero-content { position: relative; max-width: 920px; margin: 0 auto; }
.badge-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(124, 92, 255, .15);
    border: 1px solid rgba(124, 92, 255, .35);
    color: var(--brand-2);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}
.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 56px; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 56px; justify-content: center; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong {
    font-size: 28px; font-weight: 800;
    background: var(--brand-gradient);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--text-faint); font-size: 13px; }

/* ---------- Features ---------- */
.features { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.features h2, .premium-section h2, .split-section h2 {
    font-size: 40px; font-weight: 800; letter-spacing: -1px;
    text-align: center; margin-bottom: 12px;
}
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 48px; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: transform .2s ease, border-color .2s ease;
    position: relative;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, .4); }
.feature-card.highlight { border-color: rgba(255, 92, 208, .4); background: linear-gradient(180deg, var(--bg-2), rgba(255, 92, 208, .05)); }
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center;
    margin-bottom: 18px;
    color: #fff;
}
.feature-icon.purple { background: rgba(124, 92, 255, .2); color: #a47dff; }
.feature-icon.pink { background: rgba(255, 92, 208, .2); color: #ff7ddc; }
.feature-icon.blue { background: rgba(88, 101, 242, .2); color: #7c87ff; }
.feature-icon.green { background: rgba(67, 181, 129, .2); color: #6fd9a3; }
.feature-icon.orange { background: rgba(255, 138, 61, .2); color: #ffaa6e; }
.feature-icon.yellow { background: rgba(250, 166, 26, .2); color: #ffc44a; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
.feature-card p { color: var(--text-dim); font-size: 14px; }
.tag-free, .tag-new {
    position: absolute; top: 18px; right: 18px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-free { background: rgba(67, 181, 129, .15); color: var(--success); }
.tag-new { background: rgba(255, 92, 208, .2); color: #ff7ddc; }

/* ---------- Split Sections ---------- */
.split-section {
    max-width: 1200px; margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.split-section.reverse .split-text { order: 2; }
.eyebrow {
    font-size: 12px; font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--brand-2);
    display: block;
    margin-bottom: 12px;
}
.split-text h2 { text-align: left; margin-bottom: 16px; }
.split-text p { color: var(--text-dim); margin-bottom: 24px; font-size: 16px; }
.check-list { margin-bottom: 28px; }
.check-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--text-dim);
}
.check-list li::before {
    content: "✓";
    position: absolute; left: 0;
    color: var(--brand-2); font-weight: 700;
}
.split-visual {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .5);
}
.mock-roles { display: flex; flex-direction: column; gap: 8px; }
.mock-role {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--bg-3);
    border-radius: 10px;
    border-left: 3px solid var(--c);
    font-size: 14px;
    font-weight: 600;
}
.mock-role .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--c);
}
.mock-role .count {
    margin-left: auto;
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 500;
}
.mock-channels { display: flex; flex-direction: column; gap: 4px; }
.mock-cat { font-size: 11px; font-weight: 700; color: var(--text-faint); padding: 12px 8px 4px; letter-spacing: 0.5px; }
.mock-ch {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 14px;
}
.mock-ch:hover { background: var(--bg-3); color: var(--text); }
.mock-ch.active { background: rgba(124, 92, 255, .15); color: #fff; }
.mock-ch.voice { color: var(--text-dim); }

/* ---------- Premium Section ---------- */
.premium-section { padding: 80px 24px; }
.premium-card {
    max-width: 720px; margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 181, 71, .08), rgba(255, 138, 61, .04));
    border: 1px solid rgba(255, 181, 71, .25);
    border-radius: 22px;
    padding: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.premium-glow {
    position: absolute; inset: -50%;
    background: radial-gradient(circle, rgba(255, 138, 61, .12), transparent 60%);
    pointer-events: none;
}
.premium-label {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--premium-gradient);
    color: #2a1700;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 16px;
    position: relative;
}
.premium-card h2 { font-size: 32px; margin-bottom: 12px; position: relative; }
.premium-card p { color: var(--text-dim); margin-bottom: 28px; position: relative; }
.premium-perks {
    text-align: left; max-width: 360px; margin: 0 auto 28px;
    position: relative;
}
.premium-perks li { padding: 8px 0; color: var(--text); font-size: 14px; }
.premium-note {
    font-size: 12px; color: var(--text-faint);
    margin-top: 16px; position: relative;
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 32px 24px; }
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 14px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-dim); font-size: 14px; }
.footer-links a:hover { color: var(--text); }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-body {
    display: flex;
    background: var(--bg-0);
    height: 100vh;
    overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 280px;
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
/* ─── Sidebar brand (logo at top, links to landing) ────────── */
.sidebar-brand-link {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
    flex-shrink: 0;
}
.sidebar-brand-link:hover { background: var(--bg-2); }
.sidebar-brand-name {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #ffffff 0%, #d6c2ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ─── Server switcher ──────────────────────────────────────── */
.server-switcher {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}
.sidebar-server {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
    text-align: left;
    color: var(--text);
}
.sidebar-server:hover { background: var(--bg-3); border-color: var(--bg-4); }
.server-switcher.open .sidebar-server {
    background: var(--bg-3);
    border-color: var(--brand);
}
.server-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    background: var(--brand-gradient);
    display: grid; place-items: center;
    font-weight: 700; font-size: 11px;
    flex-shrink: 0;
    overflow: hidden;
}
.server-avatar img { width: 100%; height: 100%; object-fit: cover; }
.server-info {
    display: flex; flex-direction: column; overflow: hidden;
    flex: 1; min-width: 0;
}
.server-name {
    font-weight: 700; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-meta {
    font-size: 11px; color: var(--text-faint);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-chevron {
    color: var(--text-faint);
    flex-shrink: 0;
    transition: transform .15s;
}
.server-switcher.open .server-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.server-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 12px; right: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .7);
    z-index: 50;
    max-height: 60vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.server-dropdown[hidden] { display: none; }
.server-dropdown-head {
    padding: 12px 14px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.server-dropdown-sep {
    padding: 8px 14px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--bg-1);
}
.server-dropdown-list {
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: none;
}
.server-dropdown-list::-webkit-scrollbar { display: none; }
.server-row {
    width: 100%;
    background: transparent;
    border: none;
    padding: 8px 10px;
    display: flex; align-items: center; gap: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    text-align: left;
    transition: background .1s;
}
.server-row:hover { background: var(--bg-3); }
.server-row.active { background: rgba(124, 92, 255, .12); }
.server-row.no-bot { opacity: 0.6; }
.server-row.no-bot:hover { opacity: 1; }
.server-row-avatar {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--brand-gradient);
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
    overflow: hidden;
    color: #fff;
}
.server-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.server-row-info {
    flex: 1;
    min-width: 0;
    display: flex; flex-direction: column;
}
.server-row-name {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-row-meta {
    font-size: 11px; color: var(--text-faint);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.server-row-check {
    color: var(--brand);
    font-weight: 700;
    flex-shrink: 0;
    margin-left: 8px;
}
.server-dropdown-add {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    color: var(--brand-2);
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-1);
    transition: background .12s;
}
.server-dropdown-add:hover { background: var(--bg-3); }
.server-dropdown-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-faint);
    font-size: 13px;
}

/* ─── Sidebar nav — clean, no visible scrollbar ────────────── */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
    /* Firefox */
    scrollbar-width: none;
    /* IE/Edge legacy */
    -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 1px;
    transition: background .12s ease, color .12s ease;
    position: relative;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active { background: rgba(124, 92, 255, .15); color: #fff; }
.nav-item.active::before {
    content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px;
    width: 3px; background: var(--brand); border-radius: 0 3px 3px 0;
}
.nav-item .ico { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .dot {
    position: relative;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--bg-4);
    margin-left: 6px;
    flex-shrink: 0;
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s;
}
/* Active-Dot übernimmt das Logo-Look: Multi-Color-Gradient, glossy sheen,
   sanftes Glow, kleiner Sparkle. */
.nav-item .dot.active {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.5), transparent 55%),
        linear-gradient(135deg, #7c5cff 0%, #a35cff 35%, #c45dff 70%, #ff5cd0 100%);
    background-size: 200% 200%;
    box-shadow:
        0 0 8px rgba(124, 92, 255, .55),
        inset 0 1px 0 rgba(255, 255, 255, .45),
        inset 0 -2px 3px -1px rgba(0, 0, 0, .25);
    animation: nav-dot-shimmer 8s ease-in-out infinite;
}
.nav-item .dot.active::after {
    content: "";
    position: absolute;
    top: 14%;
    right: 14%;
    width: 28%;
    height: 28%;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, .9);
    opacity: 0.85;
    pointer-events: none;
}
.nav-item:hover .dot.active {
    transform: scale(1.2);
    box-shadow:
        0 0 12px rgba(196, 93, 255, .75),
        inset 0 1px 0 rgba(255, 255, 255, .55),
        inset 0 -2px 3px -1px rgba(0, 0, 0, .25);
}
@keyframes nav-dot-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.pill-beta {
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(124, 92, 255, .25);
    color: var(--brand-2);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}
.premium-link { color: var(--premium); }
.premium-link:hover { color: var(--premium); }

.nav-section { margin-top: 18px; }
.nav-section-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 1px;
    padding: 6px 12px;
    margin-bottom: 4px;
}

.sidebar-premium {
    margin: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 181, 71, .12), rgba(255, 138, 61, .06));
    border: 1px solid rgba(255, 181, 71, .3);
    display: flex; align-items: center; gap: 12px;
    color: var(--premium);
    text-align: left;
    transition: transform .15s ease;
}
.sidebar-premium:hover { transform: translateY(-1px); }
.sidebar-premium div { display: flex; flex-direction: column; }
.sidebar-premium strong { font-size: 13px; color: var(--premium); }
.sidebar-premium span { font-size: 11px; color: var(--text-dim); }

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }

.main-header {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    background: rgba(20, 21, 28, .8);
    backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 10;
}
.search-box {
    flex: 1; max-width: 480px;
    position: relative;
    display: flex; align-items: center;
}
.search-box svg { position: absolute; left: 14px; color: var(--text-faint); }
.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    transition: border-color .15s;
}
.search-box input:focus { outline: none; border-color: var(--brand); }
.header-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--bg-2);
    display: grid; place-items: center;
    color: var(--text-dim);
    position: relative;
    transition: background .15s;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }
.badge-dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-1);
}
.btn-premium-mini {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--premium-gradient);
    color: #2a1700;
    font-weight: 700;
    font-size: 13px;
}
.btn-premium-mini:hover { transform: translateY(-1px); }
.user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-2);
    border-radius: 999px;
}
.user-avatar {
    width: 32px; height: 32px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 12px;
}

/* ---------- Views ---------- */
.view {
    padding: 32px;
    display: none;
}
.view.active { display: block; }
.page-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.page-head p { color: var(--text-dim); margin-top: 4px; font-size: 14px; }
.head-actions { display: flex; gap: 8px; }

/* ---------- Stats ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    padding: 20px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex; flex-direction: column; gap: 4px;
}
.stat-card span { color: var(--text-dim); font-size: 13px; }
.stat-card strong { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.stat-card em { font-style: normal; font-size: 12px; color: var(--text-faint); }
.stat-card em.up { color: var(--success); }

.overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.ov-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}
.ov-card h3 { font-size: 16px; margin-bottom: 16px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-btn {
    padding: 14px;
    background: var(--bg-3);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, transform .15s;
    text-align: left;
}
.quick-btn:hover { background: var(--bg-4); transform: translateY(-1px); }
.activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-dim);
    display: flex; align-items: center; gap: 8px;
}
.activity-list li:last-child { border-bottom: none; }
.activity-list b { color: var(--text); }
.activity-list em { font-style: normal; margin-left: auto; font-size: 11px; color: var(--text-faint); }
.activity-list .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--bg-4);
    flex-shrink: 0;
}
.activity-list .dot.active { background: var(--success); }

/* ---------- Roles ---------- */
.roles-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    height: calc(100vh - 220px);
}
.roles-list-card, .role-editor,
.channels-tree-card, .channel-editor {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.roles-list-head, .ct-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; font-weight: 600;
}
.roles-list-head .hint, .ct-head .hint { color: var(--text-faint); font-size: 11px; font-weight: 400; }
.roles-list, .channels-tree {
    overflow-y: auto;
    flex: 1;
    padding: 8px;
}
.role-item {
    padding: 10px 12px;
    border-radius: 8px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    transition: background .12s;
    margin-bottom: 2px;
    border-left: 3px solid var(--c);
    background: var(--bg-3);
}
.role-item:hover { background: var(--bg-4); }
.role-item.selected { background: rgba(124, 92, 255, .15); }
.role-item .role-color {
    width: 12px; height: 12px; border-radius: 3px;
    background: var(--c);
    flex-shrink: 0;
}
.role-item .role-name {
    flex: 1;
    font-size: 14px; font-weight: 600;
    color: var(--c);
}
.role-item .role-members {
    font-size: 11px; color: var(--text-faint);
}
.role-item .role-handle {
    color: var(--text-faint);
    cursor: grab;
}

.re-empty {
    flex: 1;
    display: grid; place-items: center;
    color: var(--text-faint);
    padding: 40px;
    text-align: center;
}
.editor-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}
.editor-section { margin-bottom: 28px; }
.editor-section h4 {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-faint); margin-bottom: 12px;
}
.field { margin-bottom: 14px; }
.field label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="search"],
.field input[type="datetime-local"],
.field input[type="date"],
.field input[type="time"],
.field input[type="month"],
.field input[type="week"],
.field textarea,
.field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover:not(:focus):not([type="color"]):not([type="checkbox"]),
.field textarea:hover:not(:focus),
.field select:hover:not(:focus) {
    border-color: rgba(124, 92, 255, 0.4);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--brand, #7c5cff);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
    background: var(--bg-1);
}
.field textarea { min-height: 80px; resize: vertical; }
.field > small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.5;
}

/* Date/time/color picker glyphs (Chromium) */
.field input[type="datetime-local"],
.field input[type="date"],
.field input[type="time"],
.field input[type="month"],
.field input[type="week"] {
    color-scheme: dark;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    position: relative;
}
.field input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.field input[type="date"]::-webkit-calendar-picker-indicator,
.field input[type="time"]::-webkit-calendar-picker-indicator,
.field input[type="month"]::-webkit-calendar-picker-indicator,
.field input[type="week"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: filter .15s, background .15s;
}
.field input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
.field input[type="date"]::-webkit-calendar-picker-indicator:hover,
.field input[type="time"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(1);
    background: rgba(124, 92, 255, 0.2);
}
/* Number-input spinner cleanup */
.field input[type="number"] {
    font-variant-numeric: tabular-nums;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
    opacity: 0.5;
}
.field input[type="number"]:hover::-webkit-inner-spin-button { opacity: 1; }

/* Color picker — fancy swatch */
.field input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 50px; height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-3);
    cursor: pointer;
    padding: 4px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.field input[type="color"]:hover {
    border-color: var(--brand, #7c5cff);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
.field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.field input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
}

/* Multi-select listbox — make it look intentional */
.field select[multiple] {
    padding: 4px;
    min-height: 100px;
    cursor: pointer;
}
.field select[multiple] option {
    padding: 7px 10px;
    border-radius: 5px;
    margin-bottom: 2px;
    transition: background .1s;
}
.field select[multiple] option:checked {
    background: linear-gradient(90deg, #7c5cff 0%, #5b8cff 100%);
    color: #fff;
    box-shadow: 0 1px 4px rgba(124, 92, 255, 0.4);
}
.field select[multiple] option:hover {
    background: rgba(124, 92, 255, 0.15);
}
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type="color"] {
    width: 50px; height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-3);
    cursor: pointer;
}
.color-row input[type="text"] { flex: 1; }
.swatch-row {
    display: flex; gap: 6px; margin-top: 8px;
    flex-wrap: wrap;
}
.swatch {
    width: 24px; height: 24px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .1s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: #fff; }

.toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .label { font-size: 13px; }
.toggle-row .desc { font-size: 11px; color: var(--text-faint); }
.switch {
    position: relative;
    width: 38px; height: 22px;
    background: var(--bg-4);
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s;
}
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(16px); }

.editor-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 8px;
}

/* ---------- Channels ---------- */
.channels-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    height: calc(100vh - 220px);
}
.channel-cat {
    padding: 10px 8px 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 1px;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer;
}
.channel-cat .caret { font-size: 10px; }
.channel-cat .cat-actions { margin-left: auto; opacity: 0; transition: opacity .15s; }
.channel-cat:hover .cat-actions { opacity: 1; }
.channel-cat .cat-actions button {
    color: var(--text-faint);
    padding: 2px 6px;
    font-size: 14px;
    border-radius: 4px;
}
.channel-cat .cat-actions button:hover { background: var(--bg-4); color: var(--text); }
.channel-item {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 1px;
}
.channel-item:hover { background: var(--bg-3); color: var(--text); }
.channel-item.selected { background: rgba(124, 92, 255, .15); color: #fff; }
.channel-item .ch-type { color: var(--text-faint); width: 16px; flex-shrink: 0; }
.channel-item .ch-name { flex: 1; }
.channel-item .ch-actions { opacity: 0; transition: opacity .15s; display: flex; gap: 4px; }
.channel-item:hover .ch-actions { opacity: 1; }
.channel-item .ch-actions button {
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-faint);
    font-size: 12px;
}
.channel-item .ch-actions button:hover { background: var(--bg-4); color: var(--text); }

/* Permission overwrites table */
.perm-overwrites {
    background: var(--bg-3);
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}
.perm-overwrites h5 { font-size: 13px; margin-bottom: 12px; }
.perm-grid {
    display: grid; grid-template-columns: 1fr auto auto auto;
    gap: 8px 12px; align-items: center;
    font-size: 12px;
}
.perm-grid .perm-name { color: var(--text); }
.perm-grid .perm-head { color: var(--text-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.tri-toggle {
    width: 28px; height: 22px;
    border-radius: 6px;
    background: var(--bg-4);
    color: var(--text-faint);
    display: grid; place-items: center;
    cursor: pointer;
    font-size: 12px;
    transition: all .12s;
}
.tri-toggle.allow { background: rgba(67, 181, 129, .2); color: var(--success); }
.tri-toggle.deny { background: rgba(240, 71, 71, .2); color: var(--danger); }

/* Channel type picker */
.type-picker {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.type-card {
    padding: 14px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s;
}
.type-card:hover { border-color: var(--brand); }
.type-card.active { border-color: var(--brand); background: rgba(124, 92, 255, .1); }
.type-card .t-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.type-card .t-desc { font-size: 11px; color: var(--text-faint); }

/* ════════════════════════════════════════════════════════════
   DISCORD COPILOT — chat UI
   ════════════════════════════════════════════════════════════ */
#view-copilot {
    height: calc(100vh - 65px);
    padding: 0;
    display: none;
}
#view-copilot.active { display: flex; }
.copilot-shell {
    display: flex; flex-direction: column;
    flex: 1;
    height: 100%;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 16px;
}
.copilot-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    flex-shrink: 0;
}
.copilot-title {
    display: flex; align-items: center; gap: 14px;
}
.copilot-title h1 {
    font-size: 20px; font-weight: 800; letter-spacing: -0.3px;
    margin: 0;
}
.copilot-title p {
    color: var(--text-dim);
    font-size: 12px;
    margin: 2px 0 0;
}
.copilot-avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--brand-gradient);
    display: grid; place-items: center;
    font-size: 20px;
    box-shadow: 0 4px 16px -4px rgba(124, 92, 255, .5);
}

/* Messages container */
.copilot-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}
.copilot-messages::-webkit-scrollbar { width: 6px; }
.copilot-messages::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }

/* Empty state */
.copilot-empty {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: 48px 24px;
    max-width: 640px;
    margin: 0 auto;
}
.copilot-empty-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: var(--brand-gradient);
    display: grid; place-items: center;
    font-size: 32px;
    margin-bottom: 20px;
    box-shadow: 0 12px 32px -8px rgba(124, 92, 255, .6);
    animation: copilot-bob 3s ease-in-out infinite;
}
@keyframes copilot-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.copilot-empty h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #a47dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.copilot-empty p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.6;
}
.copilot-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    width: 100%;
}
.copilot-suggestion {
    padding: 12px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all .15s;
}
.copilot-suggestion:hover {
    background: var(--bg-3);
    border-color: var(--brand);
    color: var(--text);
    transform: translateY(-1px);
}

/* Chat messages */
.msg {
    display: flex;
    margin-bottom: 16px;
    animation: msg-in 0.2s ease;
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg-user { justify-content: flex-end; }
.msg-user .msg-bubble {
    background: var(--brand-gradient);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    max-width: 80%;
    box-shadow: 0 4px 14px -6px rgba(124, 92, 255, .6);
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 14px;
}
.msg-assistant {
    align-items: flex-start;
    gap: 10px;
}
.msg-avatar {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: var(--brand-gradient);
    display: grid; place-items: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}
.msg-assistant .msg-bubble {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px 18px 18px 18px;
    padding: 14px 18px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}
.msg-bubble p { margin: 0 0 8px; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble strong { font-weight: 700; }
.msg-bubble em { font-style: italic; color: var(--text-dim); }
.msg-bubble code {
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    color: var(--brand-2);
}
.msg-bubble pre {
    background: var(--bg-0);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}
.msg-bubble pre code {
    background: transparent;
    color: var(--text);
    padding: 0;
    font-size: 12px;
}
.msg-bubble ul, .msg-bubble ol {
    margin: 6px 0 8px 20px;
    padding: 0;
}
.msg-bubble li {
    list-style: disc;
    margin: 2px 0;
}
.msg-bubble h3 { font-size: 16px; margin: 10px 0 6px; font-weight: 700; }
.msg-bubble h4 { font-size: 14px; margin: 8px 0 4px; font-weight: 700; }
.msg-bubble a { color: var(--brand-2); text-decoration: underline; }

/* Thinking dots */
.msg-thinking {
    display: inline-flex; gap: 4px; align-items: center;
}
.msg-thinking span {
    width: 6px; height: 6px;
    background: var(--text-faint);
    border-radius: 50%;
    animation: thinking 1.2s infinite ease-in-out;
}
.msg-thinking span:nth-child(2) { animation-delay: 0.15s; }
.msg-thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes thinking {
    0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.3); }
}

/* Input row */
.copilot-input-row {
    margin-top: 12px;
    flex-shrink: 0;
}
.copilot-input-wrap {
    position: relative;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px 4px 4px 4px;
    display: flex; align-items: flex-end; gap: 4px;
    transition: border-color .15s, box-shadow .15s;
}
.copilot-input-wrap:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, .12);
}
#copilotInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 44px;
    max-height: 160px;
    line-height: 1.5;
}
#copilotInput::placeholder {
    color: var(--text-faint);
    opacity: 0.85;
}
.copilot-send {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--brand-gradient);
    color: #fff;
    display: grid; place-items: center;
    cursor: pointer;
    border: none;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    flex-shrink: 0;
    box-shadow: 0 4px 14px -6px rgba(124, 92, 255, .6);
}
.copilot-send:hover:not(:disabled) { transform: scale(1.05); }
.copilot-send:disabled { opacity: 0.5; cursor: wait; }
.copilot-send.busy {
    animation: send-pulse 1s infinite ease-in-out;
}
@keyframes send-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.copilot-footer-hint {
    text-align: center;
    margin-top: 8px;
    color: var(--text-faint);
    font-size: 11px;
}

@media (max-width: 768px) {
    .copilot-suggestions { grid-template-columns: 1fr; }
    .copilot-empty h2 { font-size: 22px; }
}

.placeholder-card {
    background: var(--bg-2);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 60px;
    text-align: center;
    color: var(--text-faint);
}

/* ---------- Modals ---------- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 100;
    padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.modal.small { max-width: 380px; padding: 28px; }
.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: var(--text-faint);
    font-size: 22px;
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-crown {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: var(--premium-gradient);
    color: #2a1700;
    display: grid; place-items: center;
    margin: 0 auto 16px;
}
.modal h2 { font-size: 24px; margin-bottom: 8px; }
.modal h3 { font-size: 18px; margin-bottom: 8px; }
.modal p { color: var(--text-dim); margin-bottom: 20px; font-size: 14px; }
.modal .premium-perks { text-align: left; max-width: 320px; margin: 0 auto 24px; }
.modal-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 20px;
}

/* Toast */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 14px 20px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: 10px;
    font-size: 14px;
    z-index: 200;
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, .6);
    transform: translateX(120%);
    transition: transform .3s ease;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }

/* Responsive */
@media (max-width: 1024px) {
    .split-section { grid-template-columns: 1fr; }
    .split-section.reverse .split-text { order: 0; }
    .roles-layout, .channels-layout { grid-template-columns: 1fr; height: auto; }
    .overview-cards { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { width: 240px; }
    .nav-links { display: none; }
    .hero h1 { font-size: 40px; }
    .features h2, .premium-section h2 { font-size: 28px; }
    .main-header { padding: 14px 16px; }
    .view { padding: 16px; }
}

/* ════════════════════════════════════════════════════════════
   TEAMPANEL
   ════════════════════════════════════════════════════════════ */

/* Pill counter in sidebar (offene Bewerbungen) */
.nav-item .pill {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}
.nav-item .pill:empty { display: none; }

/* Tables */
.table-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th {
    background: var(--bg-3);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-3); }
.data-table .empty { text-align: center; color: var(--text-faint); padding: 32px; }
.row-expired { opacity: 0.5; }
.hint {
    padding: 12px 16px;
    background: var(--bg-3);
    color: var(--text-dim);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

/* Group/role badges (TeamPanel) */
.group-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(124, 92, 255, .15);
    color: var(--c);
    border: 1px solid var(--c);
    font-size: 12px;
    font-weight: 600;
}
.color-chip {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Status pills */
.status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-active { background: rgba(67, 181, 129, .15); color: var(--success); }
.status-inactive { background: rgba(154, 160, 177, .15); color: var(--text-dim); }
.status-suspended { background: rgba(240, 71, 71, .15); color: var(--danger); }

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

.row-btn {
    width: 28px; height: 28px;
    border-radius: 6px;
    color: var(--text-faint);
    background: transparent;
    margin: 0 2px;
}
.row-btn:hover { background: var(--bg-4); color: var(--text); }
.row-btn.danger:hover { background: rgba(240, 71, 71, .15); color: var(--danger); }

/* Tabs */
.tab-row { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 10px; }
.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--bg-4); color: var(--text); }

/* Application cards */
.apps-list { display: flex; flex-direction: column; gap: 12px; }
.app-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.app-head {
    padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.app-head h3 { font-size: 16px; margin-bottom: 2px; }
.app-head small { color: var(--text-faint); font-size: 12px; }
.app-body { padding: 16px 20px; }
.app-body p { margin-bottom: 12px; font-size: 14px; color: var(--text-dim); }
.app-body p:last-child { margin-bottom: 0; }
.app-body strong { color: var(--text); }
.app-actions {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
    display: flex; gap: 8px; justify-content: flex-end;
}
.app-actions.decided { color: var(--text-faint); font-size: 13px; justify-content: flex-start; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #3aa371; }

/* Mini-list (overview cards) */
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px;
    background: var(--bg-3);
    border-radius: 8px;
    gap: 12px;
}
.mini-row strong { display: block; font-size: 13px; }
.mini-row small { display: block; color: var(--text-faint); font-size: 11px; }
.mini-empty { color: var(--text-faint); font-size: 13px; padding: 12px; text-align: center; }

/* Badges */
.badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.badge-pending { background: rgba(250, 166, 26, .15); color: var(--warning); }
.badge-accepted { background: rgba(67, 181, 129, .15); color: var(--success); }
.badge-rejected { background: rgba(240, 71, 71, .15); color: var(--danger); }
.badge-running { background: rgba(67, 181, 129, .15); color: var(--success); }
.badge-upcoming { background: rgba(88, 101, 242, .15); color: #7c87ff; }
.badge-completed { background: rgba(154, 160, 177, .15); color: var(--text-dim); }
.badge-cancelled { background: rgba(240, 71, 71, .15); color: var(--danger); }

/* Semantic variants — also useable as .badge.success etc. */
.badge.success { background: rgba(67, 181, 129, .15); color: var(--success); }
.badge.danger  { background: rgba(240, 71, 71, .15); color: var(--danger); }
.badge.warning { background: rgba(250, 166, 26, .15); color: var(--warning); }
.badge.gold    { background: rgba(255, 181, 71, .18); color: var(--premium); }
.badge.info    { background: rgba(88, 101, 242, .15); color: #7c87ff; }
.badge.brand   { background: rgba(124, 92, 255, .18); color: var(--brand-2); }
.badge.admin   { background: rgba(124, 92, 255, .18); color: var(--brand-2); }
.badge.muted   { background: var(--bg-3); color: var(--text-faint); }

/* row-btn semantic variants */
.row-btn.gold   { color: var(--premium); border-color: rgba(255, 181, 71, .35); }
.row-btn.gold:hover  { background: rgba(255, 181, 71, .12); color: var(--premium); }
.row-btn.primary {
    background: var(--brand-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px -4px rgba(124, 92, 255, .5);
}
.row-btn.primary:hover { filter: brightness(1.1); background: var(--brand-gradient); }

/* Empty-State (shared) */
.empty {
    text-align: center; padding: 40px 20px;
    color: var(--text-faint); font-size: 13px;
}
.empty .empty-icon { font-size: 48px; opacity: .35; margin-bottom: 8px; display: block; }
.empty strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }

/* Department toggle pill */
.toggle-pill {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(240, 71, 71, .15);
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}
.toggle-pill.on { background: rgba(67, 181, 129, .15); color: var(--success); }

/* Form modal field styles */
#formModal .field { margin-bottom: 14px; }
#formModal .field label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 6px;
}
#formModal .field input,
#formModal .field textarea,
#formModal .field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
#formModal .field input:focus,
#formModal .field textarea:focus,
#formModal .field select:focus {
    outline: none; border-color: var(--brand);
}
#formModal .field textarea { resize: vertical; min-height: 70px; }
#formModal .field small {
    font-size: 11px; color: var(--text-faint);
    margin-top: 4px; display: block;
}
#formModal .modal { text-align: left; }
#formModal h2 { font-size: 18px; margin-bottom: 16px; }

/* ════════════════════════════════════════════════════════════
   CHANNEL EDITOR — speed UI
   ════════════════════════════════════════════════════════════ */

/* Keyboard chips in headings */
kbd, .kbd-inline {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-dim);
    margin: 0 2px;
    line-height: 1.3;
}
.kbd-inline { font-size: 10px; opacity: .75; }

/* Search & reload in channel tree head */
.ct-search {
    flex: 1;
    padding: 7px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
}
.ct-search:focus { outline: none; border-color: var(--brand); }
.btn-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-3);
    color: var(--text-dim);
    font-size: 16px;
    border: 1px solid var(--border);
    transition: color .15s, background .15s, transform .3s;
    cursor: pointer;
}
.btn-icon:hover { color: var(--text); background: var(--bg-4); transform: rotate(180deg); }
.ct-head {
    display: flex; align-items: center; gap: 8px;
}
.filter-info {
    padding: 8px 14px;
    background: var(--bg-3);
    color: var(--text-faint);
    font-size: 11px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
}

/* Inline rename input */
.ch-name-input {
    flex: 1;
    padding: 2px 6px;
    background: var(--bg-1);
    border: 1px solid var(--brand);
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    margin: 0;
}
.ch-name-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(124, 92, 255, .3); }

/* More action buttons in channel rows (rename, duplicate, delete) */
.channel-item .ch-actions, .channel-cat .cat-actions {
    display: flex; gap: 2px;
}

/* Cat name made selectable / dbl-clickable */
.channel-cat .cat-name {
    flex: 1;
    cursor: text;
    user-select: text;
}

/* ─── New Channel Modal ───────────────────────────────────── */
.modal.modal-wide {
    max-width: 560px;
    text-align: left;
}
.modal.modal-wide h2 { font-size: 22px; margin-bottom: 6px; text-align: left; }

.ch-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.ch-type-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .15s;
    display: flex; flex-direction: column; gap: 4px;
    color: var(--text);
}
.ch-type-card:hover { border-color: var(--brand-2); background: var(--bg-4); transform: translateY(-2px); }
.ch-type-card.active {
    border-color: var(--brand);
    background: rgba(124, 92, 255, .12);
    box-shadow: 0 0 0 1px var(--brand) inset;
}
.ch-type-icon { font-size: 22px; line-height: 1; }
.ch-type-name { font-size: 13px; font-weight: 700; }
.ch-type-desc { font-size: 11px; color: var(--text-faint); }

#newChannelModal .field { margin-bottom: 14px; }
#newChannelModal .field label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
#newChannelModal .field input,
#newChannelModal .field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
#newChannelModal .field input:focus,
#newChannelModal .field select:focus {
    outline: none; border-color: var(--brand);
}
#newChannelModal small {
    display: block;
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
}

/* Cleaner empty state in editor */
.re-empty {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-faint);
    padding: 40px;
    text-align: center;
}
.re-empty p { margin: 4px 0; }
.re-empty kbd { background: var(--bg-3); }

/* ════════════════════════════════════════════════════════════
   STICKY / PINNED MESSAGES
   ════════════════════════════════════════════════════════════ */
.stickies-list {
    display: flex; flex-direction: column;
    gap: 12px;
}
.sticky-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: opacity .15s;
}
.sticky-card.disabled { opacity: 0.5; }
.sticky-head {
    padding: 14px 18px;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}
.sticky-head h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.sticky-head small { color: var(--text-faint); font-size: 12px; }
.sticky-actions {
    display: flex; gap: 8px; align-items: center;
}
.sticky-preview {
    padding: 14px 18px;
    color: var(--text-dim);
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}
.sticky-preview .muted { font-style: italic; }
.sticky-embed-preview {
    margin: 0 18px 14px;
    padding: 10px 14px;
    background: var(--bg-3);
    border-radius: 8px;
    border-left: 3px solid var(--brand);
    font-size: 13px;
    color: var(--text-dim);
}
.sticky-embed-preview strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}

/* Modal: embed toggle + cooldown styling */
#stickyModal .field { margin-bottom: 14px; }
#stickyModal .field label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
#stickyModal .field input,
#stickyModal .field textarea,
#stickyModal .field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
#stickyModal .field textarea { resize: vertical; min-height: 80px; }
#stickyModal .field input:focus,
#stickyModal .field textarea:focus,
#stickyModal .field select:focus { outline: none; border-color: var(--brand); }
#stickyModal small {
    display: block;
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
}
#stickyModal .toggle-row { padding: 12px 0; }
#stickyModal .toggle-row .label { font-size: 13px; font-weight: 600; }
#stickyModal .toggle-row .desc { font-size: 11px; color: var(--text-faint); }
#stickyEmbedFields {
    padding: 14px;
    background: var(--bg-3);
    border-radius: 10px;
    margin: 12px 0;
}

/* ════════════════════════════════════════════════════════════
   TEMP CHANNELS / SOCIAL / CUSTOM BOT — shared modal styles
   ════════════════════════════════════════════════════════════ */

#tempModal .field,
#socialModal .field { margin-bottom: 14px; }
#tempModal .field label,
#socialModal .field label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
#tempModal .field input,
#tempModal .field select,
#tempModal .field textarea,
#socialModal .field input,
#socialModal .field select,
#socialModal .field textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
#tempModal .field textarea,
#socialModal .field textarea { resize: vertical; min-height: 70px; }
#tempModal small,
#socialModal small {
    display: block; font-size: 11px; color: var(--text-faint);
    margin-top: 4px;
}
#tempModal .field-row,
#socialModal .field-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
#tempModal .toggle-row,
#socialModal .toggle-row { padding: 12px 0; }
#tempModal .toggle-row .label,
#socialModal .toggle-row .label { font-size: 13px; font-weight: 600; }

/* ─── Custom Bot card ─────────────────────────────────────── */
.custom-bot-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    max-width: 720px;
}
.cb-status {
    padding: 24px;
    display: flex; gap: 16px; align-items: center;
    border-bottom: 1px solid var(--border);
}
.cb-status.active { background: linear-gradient(135deg, rgba(124, 92, 255, .08), transparent); }
.cb-status.idle { background: var(--bg-3); }
.cb-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 2px solid var(--brand);
    flex-shrink: 0;
}
.cb-status > div:not(.cb-avatar) {
    display: flex; flex-direction: column; gap: 4px;
}
.cb-status strong { font-size: 18px; }
.cb-status small { font-size: 12px; color: var(--text-faint); }
.cb-status .badge { align-self: flex-start; margin-top: 4px; }

.cb-form {
    padding: 24px;
}
.cb-form h3 { font-size: 15px; margin-bottom: 12px; }
.cb-form > p {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.7;
    padding: 12px 16px;
    background: var(--bg-3);
    border-radius: 10px;
    border-left: 3px solid var(--brand);
}
.cb-form > p a { color: var(--brand-2); text-decoration: underline; }
.cb-form .field { margin-bottom: 14px; }
.cb-form .field label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.cb-form .field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: 'Courier New', monospace;
}
.cb-form .field input:focus { outline: none; border-color: var(--brand); }
.cb-form small {
    display: block; font-size: 11px; color: var(--text-faint); margin-top: 4px;
}
.cb-actions {
    display: flex; gap: 8px; margin-top: 16px; align-items: center;
}
.cb-test {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}
.cb-test.loading { background: var(--bg-3); color: var(--text-dim); }
.cb-test.ok { background: rgba(67, 181, 129, .15); color: var(--success); }
.cb-test.err { background: rgba(240, 71, 71, .15); color: var(--danger); }

/* Social platform tabs at the top of the social view */
#view-social .tab-row {
    flex-wrap: wrap;
    max-width: max-content;
}

/* ════════════════════════════════════════════════════════════
   FEATURE-CARDS (Welcome / Auto-Mod / Levels / Tickets)
   ════════════════════════════════════════════════════════════ */
.feature-card-form {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    max-width: 760px;
}
.feature-card-form .field { margin-bottom: 14px; }
.feature-card-form .field label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.feature-card-form .field input,
.feature-card-form .field textarea,
.feature-card-form .field select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
.feature-card-form .field textarea { resize: vertical; min-height: 70px; }
.feature-card-form .field input:focus,
.feature-card-form .field textarea:focus,
.feature-card-form .field select:focus { outline: none; border-color: var(--brand); }
.feature-card-form .field-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.feature-card-form small {
    display: block; font-size: 11px; color: var(--text-faint); margin-top: 4px;
}
.feature-card-form .toggle-row { padding: 10px 0; }
.feature-card-form .toggle-row .label { font-size: 13px; font-weight: 600; }
.feature-card-form .toggle-row .desc { font-size: 11px; color: var(--text-faint); }
.amh {
    margin: 24px 0 8px;
    padding-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    border-bottom: 1px solid var(--border);
}

.reward-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-3);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}

.leaderboard {
    display: flex; flex-direction: column; gap: 4px;
    margin-top: 12px;
}
.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-3);
    border-radius: 8px;
    font-size: 13px;
}
.lb-rank { font-weight: 800; color: var(--brand-2); }
.lb-user { font-family: monospace; font-size: 11px; color: var(--text-dim); }
.lb-level { font-weight: 600; }
.lb-xp { color: var(--text-faint); font-size: 12px; }

/* Common modal field styles for new modals */
#rrModal .field,
#cmdModal .field,
#pollModal .field,
#reminderModal .field { margin-bottom: 14px; }
#rrModal .field label,
#cmdModal .field label,
#pollModal .field label,
#reminderModal .field label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
#rrModal .field input, #rrModal .field select, #rrModal .field textarea,
#cmdModal .field input, #cmdModal .field select, #cmdModal .field textarea,
#pollModal .field input, #pollModal .field select, #pollModal .field textarea,
#reminderModal .field input, #reminderModal .field select, #reminderModal .field textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
#rrModal .field textarea, #cmdModal .field textarea,
#pollModal .field textarea, #reminderModal .field textarea {
    resize: vertical; min-height: 70px;
}
#rrModal small, #cmdModal small, #pollModal small, #reminderModal small {
    display: block; font-size: 11px; color: var(--text-faint); margin-top: 4px;
}
#rrModal .field-row, #cmdModal .field-row,
#pollModal .field-row, #reminderModal .field-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
#rrModal .toggle-row, #cmdModal .toggle-row, #pollModal .toggle-row {
    padding: 12px 0;
}

/* ════════════════════════════════════════════════════════════
   TEAMPANEL EXTRAS — Calendar, Todos, Automations, Profile
   ════════════════════════════════════════════════════════════ */

/* Member link */
.tp-member-link {
    cursor: pointer;
    color: var(--text);
    transition: color .12s;
}
.tp-member-link:hover { color: var(--brand-2); text-decoration: underline; }

/* ─── Calendar ───────────────────────────────────────────── */
.tp-cal-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
}
.tp-cal-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.tp-cal-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.tp-cal-head h3 {
    font-size: 16px; font-weight: 700;
    text-transform: capitalize;
    margin: 0;
}
.tp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    padding: 1px;
}
.tp-cal-dow {
    padding: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.5px;
    background: var(--bg-1);
    text-transform: uppercase;
}
.tp-cal-cell {
    background: var(--bg-2);
    min-height: 88px;
    padding: 6px 6px 4px;
    position: relative;
    cursor: pointer;
    transition: background .1s;
}
.tp-cal-cell:hover { background: var(--bg-3); }
.tp-cal-empty { background: var(--bg-1); cursor: default; }
.tp-cal-today {
    background: rgba(124, 92, 255, 0.08);
}
.tp-cal-today .tp-cal-day {
    background: var(--brand-gradient);
    color: #fff;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700;
}
.tp-cal-day {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.tp-cal-events { display: flex; flex-direction: column; gap: 2px; }
.tp-cal-event {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform .1s;
}
.tp-cal-event:hover { transform: translateX(2px); }
.tp-cal-more {
    font-size: 10px;
    color: var(--text-faint);
    padding: 0 6px;
}

/* Upcoming list */
.tp-cal-side {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.tp-cal-side h3 {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    border-bottom: 1px solid var(--border);
    margin: 0;
}
.tp-event-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .12s;
}
.tp-event-row:hover { background: var(--bg-3); }
.tp-event-row:last-child { border-bottom: none; }
/* Discord-Preview styles are defined inline in dashboard.html (legacy
   block, more complete). Wenn weitere Seiten Discord-Previews brauchen,
   die Inline-Definition in /styles.css migrieren. */

/* Discord-Preview Discord-Button (shared, da auch im Poll-Editor benutzt) */
.discord-btn {
    background: #4e5058;
    color: #fff;
    border: 0;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .12s, transform .12s;
}
.discord-btn:hover { background: #6d6f78; transform: translateY(-1px); }

/* Extra-breites Modal für Side-by-Side Layouts wie Poll-Editor */
.modal.modal-xwide {
    max-width: min(1100px, 96vw);
    width: 96vw;
}
.poll-modal-grid {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(420px, 1.2fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .poll-modal-grid { grid-template-columns: 1fr; }
}

/* Scroll-fähiges Modal (Fallback wenn Inhalt zu groß für Viewport) */
.modal.modal-scroll {
    max-height: 88vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.modal.modal-scroll::-webkit-scrollbar { width: 8px; }
.modal.modal-scroll::-webkit-scrollbar-track { background: transparent; }
.modal.modal-scroll::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 4px;
}
.modal.modal-scroll::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* ─── Aufklappbare Sections (native <details>) ────────────────── */
.accordion {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.accordion[open] {
    border-color: rgba(124, 92, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.accordion > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    user-select: none;
    transition: background .12s;
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary:hover { background: rgba(124, 92, 255, 0.06); }
.accordion > summary::after {
    content: "›";
    margin-left: auto;
    font-size: 22px;
    line-height: 1;
    color: var(--text-faint);
    transform: rotate(90deg);
    transition: transform .2s;
}
.accordion[open] > summary::after { transform: rotate(-90deg); color: var(--brand); }
.accordion .acc-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
}
.accordion .acc-hint {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-faint);
    letter-spacing: 0.2px;
}
.accordion .acc-body {
    padding: 4px 14px 12px;
    border-top: 1px solid var(--border);
}
.accordion .acc-body .field:last-child { margin-bottom: 0; }

/* Invite leaderboard rows */
.inv-row {
    display: grid;
    grid-template-columns: 60px 1fr auto 60px;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.inv-row:last-child { border-bottom: none; }
.inv-row:hover { background: var(--bg-3); }
.inv-rank { font-size: 18px; text-align: center; }
.inv-name strong { display: block; font-size: 13px; }
.inv-name small { font-size: 11px; color: var(--text-faint); }
.inv-counts { display: flex; gap: 4px; justify-content: flex-end; }
.inv-counts .badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Moderator log entries */
.mod-entry {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background .12s;
}
.mod-entry:hover { background: var(--bg-3); }
.mod-entry-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.mod-entry-body { flex: 1; min-width: 0; }
.mod-entry-head { font-size: 13px; margin-bottom: 2px; }
.mod-entry-meta { font-size: 11px; color: var(--text-faint); margin-bottom: 4px; }
.mod-entry-reason {
    font-size: 12px;
    background: var(--bg-2);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 2px solid var(--border);
    margin-top: 4px;
}
.mod-entry-reason.muted { color: var(--text-faint); font-style: italic; }
/* ─── Custom Checkboxes ─────────────────────────────────────
   1) input[type="checkbox"] becomes a polished square check
   2) input[type="checkbox"] inside .switch-label becomes a
      Discord-style toggle (track + sliding thumb)              */

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--bg-1);
    cursor: pointer;
    position: relative;
    transition: background .15s, border-color .15s, box-shadow .15s;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0;
}
input[type="checkbox"]:hover {
    border-color: var(--brand);
}
input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.3);
}
input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #7c5cff 0%, #5b8cff 100%);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.4);
}
input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
input[type="checkbox"]:disabled {
    opacity: 0.5; cursor: not-allowed;
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}
.switch-label:hover input[type="checkbox"]:not(:disabled) {
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

/* Discord-style toggle override when inside .switch-label */
.switch-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 42px; height: 24px;
    border-radius: 999px;
    border: 0;
    background: var(--bg-3);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.switch-label input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.35);
    transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1);
}
.switch-label input[type="checkbox"]::after {
    /* override the checkmark from the base style */
    display: none;
}
.switch-label input[type="checkbox"]:checked {
    background: linear-gradient(90deg, #7c5cff 0%, #5b8cff 100%);
    box-shadow: 0 0 12px rgba(124, 92, 255, 0.4);
}
.switch-label input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

/* Super-Admin Top-Button (Dashboard + Landing) — gemeinsamer Style */
.btn-admin, .btn-admin-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #ff3b5c 0%, var(--danger) 100%);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(240, 71, 71, 0.45), inset 0 1px 0 rgba(255,255,255,0.18);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn-admin-top { margin-right: 8px; }
.btn-admin:hover, .btn-admin-top:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(240, 71, 71, 0.55), inset 0 1px 0 rgba(255,255,255,0.22);
    filter: brightness(1.08);
}
.btn-admin:active, .btn-admin-top:active { transform: translateY(0); }

/* Tear-off calendar style event date */
.tp-event-date {
    --evt-color: var(--brand);
    width: 52px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: stretch;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 4px 12px rgba(0,0,0,0.25);
    position: relative;
}
.tp-event-date::before {
    /* zwei kleine "Klammer"-Punkte oben wie an einem Kalenderblatt */
    content: "";
    position: absolute; top: 4px; left: 0; right: 0;
    height: 3px;
    background:
        radial-gradient(circle at 30% 50%, rgba(255,255,255,0.55) 0 1.4px, transparent 1.6px),
        radial-gradient(circle at 70% 50%, rgba(255,255,255,0.55) 0 1.4px, transparent 1.6px);
    pointer-events: none;
    z-index: 2;
}
.tp-event-mon {
    background: var(--evt-color);
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--evt-color) 100%, white 10%) 0%, var(--evt-color) 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-align: center;
    padding: 5px 0 4px;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.tp-event-day {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    color: var(--text);
    text-align: center;
    padding: 6px 0 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.tp-event-dow {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-faint);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0 0 6px;
}
.tp-event-body { flex: 1; min-width: 0; }
.tp-event-body strong {
    display: block; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tp-event-body small {
    display: block;
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 2px;
}

/* ─── Todos Kanban ────────────────────────────────────────── */
.tp-todo-board {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}
.tp-todo-col {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.tp-todo-col-head {
    padding: 12px 16px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}
.tp-todo-count {
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--text-dim);
}
.tp-todo-list {
    padding: 10px;
    display: flex; flex-direction: column; gap: 8px;
    min-height: 200px;
}
.tp-todo-empty {
    text-align: center;
    color: var(--text-faint);
    padding: 24px 8px;
    font-size: 12px;
}
.tp-todo-card {
    background: var(--bg-3);
    border-radius: 10px;
    padding: 12px;
    position: relative;
    border-left: 3px solid var(--text-faint);
    transition: transform .1s, box-shadow .1s;
}
.tp-todo-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.4);
}
.tp-todo-card.prio-low { border-left-color: var(--success); }
.tp-todo-card.prio-medium { border-left-color: var(--warning); }
.tp-todo-card.prio-high { border-left-color: var(--danger); }
.tp-todo-card.overdue { background: rgba(240, 71, 71, 0.08); }
.tp-todo-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
}
.tp-todo-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    line-height: 1.4;
}
.tp-todo-foot {
    display: flex; gap: 8px; flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-faint);
}
.tp-todo-due.overdue { color: var(--danger); font-weight: 600; }
.tp-todo-actions {
    display: flex; gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.tp-todo-actions button {
    flex: 1;
    padding: 4px;
    border-radius: 4px;
    background: transparent;
    color: var(--text-faint);
    font-size: 11px;
    cursor: pointer;
    transition: background .1s;
}
.tp-todo-actions button:hover { background: var(--bg-4); color: var(--text); }

/* ─── Automation action rows ────────────────────────────── */
.tp-auto-action {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 8px;
    padding: 8px;
    background: var(--bg-3);
    border-radius: 8px;
    margin-bottom: 6px;
    align-items: center;
}
.tp-auto-action select, .tp-auto-action input {
    padding: 6px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 12px;
    width: 100%;
}
.tp-auto-params {
    display: flex; gap: 6px;
}
.tp-auto-params > * { flex: 1; }

/* ─── Member profile ──────────────────────────────────────── */
.modal.modal-large {
    max-width: 720px;
    text-align: left;
}
.tp-profile-head {
    display: flex; align-items: center; gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.tp-profile-avatar {
    width: 64px; height: 64px;
    background: var(--brand-gradient);
    border-radius: 16px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}
.tp-profile-head h2 { font-size: 22px; margin-bottom: 4px; }
.tp-profile-head p { margin: 0 0 4px; }
.tp-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.tp-stat {
    background: var(--bg-3);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.tp-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-2);
}
.tp-stat span {
    font-size: 11px;
    color: var(--text-faint);
}
.tp-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.tp-profile-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    margin-bottom: 8px;
}
.tp-profile-row {
    padding: 8px 12px;
    background: var(--bg-3);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}
.tp-profile-notes {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--bg-3);
    border-radius: 10px;
    border-left: 3px solid var(--brand);
    font-size: 13px;
    color: var(--text-dim);
}

@media (max-width: 1024px) {
    .tp-cal-layout { grid-template-columns: 1fr; }
    .tp-todo-board { grid-template-columns: 1fr; }
    .tp-profile-grid { grid-template-columns: 1fr; }
    .tp-profile-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Searchable Select (über bestehendem <select>) ---------- */
.ss-wrap {
    position: relative;
    width: 100%;
}
.ss-input {
    width: 100%;
    padding: 9px 32px 9px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.ss-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
}
.ss-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--text-dim);
    border-bottom: 1.5px solid var(--text-dim);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
    transition: transform .15s;
}
.ss-wrap.ss-open::after {
    transform: translateY(-30%) rotate(-135deg);
}
.ss-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    z-index: 100;
    padding: 4px;
}
.ss-opt {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    transition: background .1s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ss-opt:hover, .ss-opt.ss-focus {
    background: var(--bg-3);
}
.ss-opt.ss-active {
    background: rgba(124, 92, 255, .18);
    color: var(--brand-2);
}
.ss-opt .ss-hash {
    color: var(--text-dim);
    font-weight: 500;
}
.ss-opt .ss-cat {
    color: var(--text-dim);
    font-size: 11px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ss-empty, .ss-more {
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--text-dim);
    text-align: center;
}

/* Role mode: Farbpunkt vor Name */
.ss-rolecolor {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}

/* User mode: Avatar + Name + ID */
.ss-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-3);
}
.ss-avatar-fallback {
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: linear-gradient(135deg, var(--bg-3), var(--bg-1));
}
.ss-user-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ss-user-id {
    font-size: 10.5px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: rgba(255, 255, 255, .04);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.ss-more {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 8px;
}
.ss-count {
    font-size: 11px;
    color: var(--text-dim);
    padding: 6px 10px 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Hide enhanced native <select> */
select.ss-enhanced {
    display: none !important;
}

/* ---------- Duration picker (Tage/Std/Min) ---------- */
.duration-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.duration-picker .dp-unit {
    position: relative;
}
.duration-picker input[type="number"] {
    width: 100%;
    padding: 9px 12px 9px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    -moz-appearance: textfield;
}
.duration-picker input[type="number"]::-webkit-outer-spin-button,
.duration-picker input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.duration-picker input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
}
.duration-picker .dp-label {
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ---------- Role multipliers ---------- */
.role-mult-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.role-mult-row {
    display: grid;
    grid-template-columns: 1fr 110px 32px;
    gap: 8px;
    align-items: start;
}
.role-mult-row .rm-mult {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    text-align: center;
}
.role-mult-row .rm-mult:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .18);
}
.role-mult-row .rm-del {
    background: rgba(239, 68, 68, .12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, .3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    height: 38px;
}
.role-mult-row .rm-del:hover {
    background: rgba(239, 68, 68, .22);
}
.role-mult-add {
    margin-top: 10px;
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-dim);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
}
.role-mult-add:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ──────────────────────────────────────────────────────────────
   Color-Picker (createColorPicker → .clrpick)
   Wird von Webhook-Tool, Sticky, Settings, Channel-Embeds,
   Member-Backup u.a. genutzt.
   ────────────────────────────────────────────────────────────── */
.clrpick {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.clrpick-swatch {
    width: 44px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transition: border-color .15s, transform .15s;
}
.clrpick-swatch:hover {
    border-color: rgba(124, 92, 255, 0.5);
    transform: translateY(-1px);
}
.clrpick-swatch input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    background: transparent;
    opacity: 0;
    cursor: pointer;
}
.clrpick-hex {
    width: 96px;
    padding: 8px 10px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    text-transform: uppercase;
    transition: border-color .15s, box-shadow .15s;
}
.clrpick-hex:hover { border-color: rgba(124, 92, 255, 0.4); }
.clrpick-hex:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
    background: var(--bg-1);
}
.clrpick-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.clrpick-preset {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform .12s, border-color .12s, box-shadow .12s;
}
.clrpick-preset:hover {
    transform: scale(1.15);
    border-color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

/* ──────────────────────────────────────────────────────────────
   Mitglieder-Backup (Premium-Feature)
   ────────────────────────────────────────────────────────────── */
.pill-pro {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--premium-gradient);
    color: #1c1300;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.4;
}

.mb-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 18px;
}
.mb-card.is-premium-gate {
    background: linear-gradient(135deg, rgba(255, 181, 71, .08), rgba(124, 92, 255, .06));
    border-color: rgba(255, 181, 71, .25);
}
.mb-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.mb-card-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mb-card-head p {
    margin: 4px 0 0;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}
.mb-card-head .mb-card-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-self: flex-start;
}
.mb-card-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.mb-card-footer.is-end { justify-content: flex-end; }

.mb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.mb-stat {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mb-stat-label {
    font-size: 11.5px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
}
.mb-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.mb-stat-value.is-status-on { color: var(--success); }
.mb-stat-value.is-status-off { color: var(--text-dim); }
.mb-stat-value.is-text { font-size: 14px; font-weight: 600; line-height: 1.4; }
.mb-stat-sub {
    font-size: 11.5px;
    color: var(--text-faint);
}

.mb-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.mb-link-input {
    flex: 1;
    min-width: 240px;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12.5px;
    transition: border-color .15s, box-shadow .15s;
}
.mb-link-input:hover { border-color: rgba(124, 92, 255, 0.4); }
.mb-link-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.mb-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mb-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: background .15s, border-color .15s;
}
.mb-row:hover {
    background: var(--bg-0);
    border-color: var(--bg-4);
}
.mb-row-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.mb-row-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--bg-3);
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.mb-row-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.mb-row-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mb-row-sub {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mb-row-sub code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11px;
    background: rgba(255,255,255,.04);
    padding: 1px 6px;
    border-radius: 4px;
}
.mb-row-meta {
    color: var(--text-faint);
    font-size: 11px;
    margin-top: 3px;
}
.mb-row-meta .warn { color: var(--warning); }
.mb-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.mb-row-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-faint);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    transition: all .15s;
}
.mb-row-btn:hover {
    background: var(--bg-3);
    border-color: var(--border);
    color: var(--text);
}
.mb-row-btn.is-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(240, 71, 71, .1);
}

.mb-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-faint);
    background: var(--bg-1);
    border: 1px dashed var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.6;
}

.mb-search {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color .15s, box-shadow .15s;
}
.mb-search:hover { border-color: rgba(124, 92, 255, 0.4); }
.mb-search:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.mb-summary {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
}
.mb-summary strong { color: var(--text); }
.mb-summary .ok { color: var(--success); }
.mb-summary .warn { color: var(--warning); }
.mb-summary .err { color: var(--danger); }
.mb-summary pre {
    background: var(--bg-0, #0d0e13);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 11.5px;
    overflow: auto;
    max-height: 200px;
}

.mb-status-line {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}
.mb-status-line[hidden] { display: none; }
.mb-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(67, 181, 129, .15);
    flex-shrink: 0;
}
.mb-status-dot.is-pulse {
    animation: mb-pulse 2s ease-in-out infinite;
}
@keyframes mb-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(67, 181, 129, .15); }
    50% { box-shadow: 0 0 0 6px rgba(67, 181, 129, .05); }
}
