/* ════════════════════════════════════════════════════
   BasedPanel – Glassmorphism Dashboard v8.0
   4Based Orange · Dark Mode · Premium SaaS
   ════════════════════════════════════════════════════ */
:root {
    /* ── Accent: 4Based Orange ── */
    --primary:       #f97316;
    --primary-dark:  #ea580c;
    --primary-glow:  rgba(249,115,22,0.12);
    --primary-light: #fb923c;
    --primary-rgb:   249,115,22;

    /* ── Semantic Colors ── */
    --purple:       #a78bfa;
    --cyan:         #22d3ee;
    --green:        #34d399;
    --green-dark:   #16a34a;
    --red:          #f87171;
    --red-dark:     #dc2626;
    --yellow:       #fbbf24;
    --orange:       #fb923c;

    /* ── Backgrounds: Deep Blue-Black ── */
    --bg:           #080a12;
    --bg2:          #0c0e18;
    --bg3:          #131520;
    --bg-dark:      #060810;
    --card:         rgba(14,16,26,0.75);
    --card-hover:   rgba(18,20,32,0.8);
    --card-glass:   rgba(14,16,26,0.6);
    --bg-card:      rgba(14,16,26,0.75);

    /* ── Borders ── */
    --border:       rgba(255,255,255,0.06);
    --border-hi:    rgba(255,255,255,0.10);
    --border-accent:rgba(249,115,22,0.2);
    --orange:       #f97316;

    /* ── Text ── */
    --text:         #f0f2f5;
    --text-dim:     #a0a4b8;
    --text-muted:   #555770;

    /* ── Glass ── */
    --glass-bg:     rgba(255,255,255,0.03);
    --glass-border: rgba(255,255,255,0.06);
    --glass-blur:   12px;

    /* ── Shadows ── */
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:    0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg:    0 12px 48px rgba(0,0,0,0.4);
    --shadow-glow:  0 0 24px rgba(249,115,22,0.08);
    --shadow-card:  0 2px 16px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.04);

    /* ── Radius ── */
    --radius:       14px;
    --radius-sm:    8px;
    --radius-lg:    18px;
    --radius-xl:    22px;

    /* ── Motion ── */
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
    line-height: 1.5;
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-accent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(249,115,22,0); }
}
@keyframes glow-breathe {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

/* ── Type Scale ── */
h1, .h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
h2, .h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.25; }
h3, .h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(249,115,22,0.2); }

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
    width: 260px;
    background: rgba(10,12,20,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 1.1rem 1.15rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: opacity 0.2s;
}
.sidebar-brand:hover { opacity: 0.85; }

/* ── Circle Logo (Sidebar) ── */
.brand-logo-circle {
    width: 38px; height: 38px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(249,115,22,0.2));
    transition: transform 0.25s ease;
}
.sidebar-brand:hover .brand-logo-circle { transform: scale(1.05); }

.brand-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    font-size: 1.0rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.2;
}

.brand-accent {
    color: var(--primary);
}

/* ── Auth Page Logo ── */
.auth-logo-img {
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
}
.auth-logo-svg {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(249,115,22,0.15));
}

.brand-version {
    font-size: 0.55rem;
    color: var(--primary);
    background: rgba(249,115,22,0.08);
    border: 1px solid rgba(249,115,22,0.15);
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 600;
}

.sidebar-nav {
    padding: 0.65rem 0.75rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.nav-section-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.7rem 0.75rem 0.3rem;
}

.sidebar .nav-link {
    display: flex; align-items: center; gap: 0.6rem;
    color: var(--text-dim);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1px;
    font-size: 0.8rem;
    font-weight: 450;
    text-decoration: none;
    transition: all 0.2s var(--ease-out);
    border: 1px solid transparent;
    position: relative;
}

.sidebar .nav-link i { font-size: 0.88rem; width: 18px; text-align: center; opacity: 0.55; transition: all 0.2s var(--ease-out); }

.sidebar .nav-link:hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.03);
}
.sidebar .nav-link:hover i { opacity: 0.85; }

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(249,115,22,0.08);
    border-color: rgba(249,115,22,0.12);
    font-weight: 550;
    box-shadow: none;
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 2px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.sidebar .nav-link.active i { color: var(--primary) !important; opacity: 1; }

/* ── Sidebar Badge für Kündigungen ── */
.nav-badge-cancel {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
    background: rgba(239,68,68,0.2);
    color: #ef4444;
    line-height: 1.2;
}

/* ── Nav Group (klappbar) ───────────────────────────── */
.nav-group { position: relative; }

.nav-group-toggle {
    justify-content: flex-start !important;
}

.nav-chevron {
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.nav-group.open .nav-chevron {
    transform: rotate(180deg);
}

.nav-sub-links {
    display: none;
    flex-direction: column;
    padding-left: 0.5rem;
    margin-top: 1px;
    overflow: hidden;
}

.nav-group.open .nav-sub-links {
    display: flex;
}

.nav-sub-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #6b7280;
    padding: 0.35rem 0.65rem 0.35rem 1.2rem;
    border-radius: 6px;
    margin-bottom: 1px;
    font-size: 0.78rem;
    font-weight: 450;
    text-decoration: none;
    transition: all 0.12s ease;
    border: none;
}

.nav-sub-link i {
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.nav-sub-link:hover {
    color: #d1d5db;
    background: rgba(255,255,255,0.04);
}

.nav-sub-link.active {
    color: var(--primary);
    background: rgba(249,115,22,0.08);
    font-weight: 550;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 0.85rem 0.85rem;
    background: rgba(0,0,0,0.15);
}

.user-row {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    margin-bottom: 0.4rem;
}

.user-avatar {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.user-email {
    font-size: 0.7rem; color: var(--text-dim);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.logout-btn {
    display: flex; align-items: center; gap: 0.45rem;
    color: var(--text-muted); font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s var(--ease-out);
}

.logout-btn:hover { color: var(--red); background: rgba(239,68,68,0.08); }

/* ── Layout ──────────────────────────────────────────── */
main { margin-left: 260px; }

.topbar {
    background: rgba(15,16,21,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}

.topbar-title { font-size: 0.92rem; font-weight: 700; letter-spacing: -0.02em; }

.topbar-badge {
    display: flex; align-items: center; gap: 0.45rem;
    font-size: 0.72rem; color: var(--text-dim);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 2.5s infinite;
}

.status-dot.off { background: var(--text-muted); box-shadow: none; animation: none; }

@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.3} }

.page-content {
    padding: 1.75rem 2.25rem;
    max-width: 1600px;
}

/* ── Cards (Glassmorphism) ───────────────────────────── */
.card {
    background: rgba(14,16,26,0.6);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    color: var(--text);
    box-shadow: var(--shadow-card);
    transition: all 0.3s var(--ease-out);
}

.card:hover {
    border-color: rgba(255,255,255,0.1);
    box-shadow: var(--shadow-card), 0 0 20px rgba(249,115,22,0.04);
}

.card-header {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.95rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
    color: var(--text);
}

.card-title { font-size: 0.88rem; font-weight: 700; margin: 0; letter-spacing: -0.015em; }
.card-body  { padding: 1.25rem; }
.card-body.p-0 { padding: 0; }

/* ── Stat Cards (Glass) ──────────────────────────────── */
.stat-card {
    background: rgba(14,16,26,0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    position: relative; overflow: hidden;
    transition: all 0.3s var(--ease-out);
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.4s var(--ease-out) both;
}

.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0.6;
}

.stat-card::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at top, rgba(201,164,97,0.02) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: rgba(249,115,22,0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.dash-stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.dash-stats-grid .stat-card:nth-child(2) { animation-delay: 0.10s; }
.dash-stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.dash-stats-grid .stat-card:nth-child(4) { animation-delay: 0.20s; }

.stat-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; margin-bottom: 0.8rem;
    background: rgba(255,255,255,0.04) !important;
    color: var(--text-dim) !important;
}

.stat-label {
    font-size: 0.62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.65rem; font-weight: 800;
    letter-spacing: -0.03em; line-height: 1.1;
    color: #fff !important;
    font-variant-numeric: tabular-nums;
}

.stat-sub { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── Inputs ──────────────────────────────────────────── */
.form-control, .form-select {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    width: 100%;
}

.form-control:focus, .form-select:focus {
    background: var(--bg3);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
    outline: none;
}

textarea.form-control { resize: vertical; min-height: 90px; }
.form-control::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg3); }

.form-label {
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-dim); margin-bottom: 0.35rem;
    display: block;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    font-size: 0.8rem; font-weight: 550;
    border-radius: var(--radius-sm); padding: 0.5rem 1rem;
    transition: all 0.2s var(--ease-out);
    border: 1px solid transparent;
    cursor: pointer; display: inline-flex;
    align-items: center; gap: 0.4rem;
    text-decoration: none;
    letter-spacing: -0.01em;
    position: relative; overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent; color: #fff; font-weight: 600;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(249,115,22,0.3);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-color: transparent; color: #fff;
}
.btn-success:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: transparent; color: #fff;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: var(--text-dim);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.08); color: var(--text);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent; border-color: var(--border); color: var(--text-dim);
}
.btn-outline-primary:hover {
    background: rgba(249,115,22,0.08); color: var(--primary-light);
    border-color: rgba(249,115,22,0.25);
}

.btn-warning {
    background: #d97706;
    border-color: transparent; color: #fff;
}
.btn-warning:hover {
    background: #b45309;
    color: #fff;
}

.btn-sm  { padding: 0.25rem 0.55rem; font-size: 0.75rem; border-radius: 5px; }
.btn-lg  { padding: 0.6rem 1.3rem; font-size: 0.88rem; }
.btn-xl  { padding: 0.75rem 1.6rem; font-size: 0.92rem; border-radius: var(--radius); }
.w-100   { width: 100%; justify-content: center; }

/* ── Tables ──────────────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: rgba(249,115,22,0.04);
    --bs-table-striped-bg: rgba(255,255,255,0.015);
    color: var(--text); margin: 0; font-size: 0.82rem; border-collapse: collapse; width: 100%;
}

.table thead th {
    background: rgba(255,255,255,0.025) !important; color: var(--text-muted) !important;
    font-size: 0.64rem; font-weight: 650;
    text-transform: uppercase; letter-spacing: 0.7px;
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0.95rem; white-space: nowrap;
}

.table tbody td {
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 0.65rem 0.95rem; vertical-align: middle;
    transition: background 0.15s ease;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(249,115,22,0.04); }

/* ── Badges ──────────────────────────────────────────── */
.badge {
    font-size: 0.65rem; font-weight: 600;
    padding: 0.2em 0.6em; border-radius: 5px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

.badge.bg-success  { background: rgba(34,197,94,0.1)!important; color: #4ade80; border: 1px solid rgba(34,197,94,0.15); }
.badge.bg-danger   { background: rgba(239,68,68,0.1)!important; color: #f87171; border: 1px solid rgba(239,68,68,0.15); }
.badge.bg-info     { background: rgba(6,182,212,0.1)!important;  color: #22d3ee; border: 1px solid rgba(6,182,212,0.15); }
.badge.bg-warning  { background: rgba(234,179,8,0.1)!important;  color: #facc15; border: 1px solid rgba(234,179,8,0.15); }
.badge.bg-secondary{ background: rgba(255,255,255,0.05)!important; color: var(--text-dim); border: 1px solid var(--border); }
.badge.bg-primary  { background: rgba(249,115,22,0.1)!important; color: var(--primary-light); border: 1px solid rgba(249,115,22,0.15); }

/* ── Progress ────────────────────────────────────────── */
.progress {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: 20px; height: 7px; overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 20px; transition: width 0.4s var(--ease-out);
}

/* ── Log Box ─────────────────────────────────────────── */
.log-box {
    background: #050508;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    line-height: 1.7;
    overflow-y: auto;
    color: var(--text-dim);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

/* ── Modal ───────────────────────────────────────────── */
.modal-backdrop { backdrop-filter: blur(8px); }
.modal-content {
    background: rgba(12,14,24,0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    color: var(--text);
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 1.1rem 1.35rem; }
.modal-title  { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.modal-body   { padding: 1.35rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 0.9rem 1.35rem; }
.btn-close    { filter: invert(0.7); }
.btn-close:hover { filter: invert(0.95); }

/* ── Alerts ──────────────────────────────────────────── */
.alert {
    border-radius: 9px; border: 1px solid;
    font-size: 0.85rem; padding: 0.7rem 0.9rem;
}
.alert-danger  { background: rgba(239,68,68,0.07);  border-color: rgba(239,68,68,0.25);  color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.07); border-color: rgba(16,185,129,0.25); color: #6ee7b7; }

/* ── Form Check ──────────────────────────────────────── */
.form-check-input {
    background: var(--bg3); border: 1px solid var(--border-hi);
    width: 1rem; height: 1rem; border-radius: 4px;
}
.form-check-input:checked { background: var(--primary); border-color: var(--primary); }
.form-check-label { color: var(--text-dim); font-size: 0.85rem; }

/* ── Auth Pages ──────────────────────────────────────── */
.auth-wrap {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 30% 20%, rgba(249,115,22,0.07) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(249,115,22,0.05) 0%, transparent 50%),
                var(--bg-dark);
    padding: 2rem;
}

.auth-card {
    background: rgba(14,16,26,0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 100%; max-width: 400px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 60px rgba(249,115,22,0.05);
    animation: fadeIn 0.5s var(--ease-out);
}

.auth-logo {
    width: 48px; height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin: 0 auto 1.2rem;
    color: #fff;
}

.auth-title {
    text-align: center; font-size: 1.25rem; font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff;
    margin-bottom: 0.25rem;
}

.auth-sub {
    text-align: center; font-size: 0.8rem;
    color: var(--text-muted); margin-bottom: 1.75rem;
}

hr.divider { border: none; border-top: 1px solid var(--border); margin: 1.1rem 0; }

.auth-link { color: var(--primary-light); text-decoration: none; font-weight: 500; }
.auth-link:hover { color: var(--primary); text-decoration: underline; }

/* (old bot counter styles removed — now in cc-* command center) */

/* ── Accent Text ─────────────────────────────────────── */
.gradient-text {
    color: var(--primary-light);
}

/* ── Misc ────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 2.5rem 1rem; color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.25; }
.empty-state p { font-size: 0.88rem; margin-bottom: 1.1rem; }

.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.1rem;
}
.section-header h2 { font-size: 1rem; font-weight: 700; }

.table-responsive { overflow-x: auto; border-radius: 0 0 12px 12px; }

/* Navbar fallback */
.navbar.navbar-dark {
    background: var(--bg2) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 0.7rem 1.5rem;
}

/* ── Creator CRM ────────────────────────────────────── */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1rem;
}

.creator-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.creator-card:hover {
    border-color: var(--border-hi);
}

.creator-card.selected {
    border-color: var(--primary);
}

.creator-card-body { padding: 1.1rem; }

.creator-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.creator-avatar {
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.creator-card-info { flex: 1; min-width: 0; }

.creator-card-name {
    font-weight: 700; font-size: 0.92rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.creator-card-email { font-size: 0.72rem; color: var(--text-muted); }

.creator-card-link { padding: 0.2rem 0.45rem; font-size: 0.72rem; }

.creator-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.creator-stat-box {
    background: var(--bg3);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    text-align: center;
}

.creator-stat-value { font-size: 0.95rem; font-weight: 700; color: #fff; }
.stat-green  { color: #fff; }
.stat-cyan   { color: #fff; }
.stat-purple { color: #fff; }
.stat-default { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); }

.creator-stat-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.creator-msg-preview {
    background: var(--bg2);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.creator-msg-preview i { color: var(--text-muted); margin-right: 0.3rem; }

.creator-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* ── Detail Panel ───────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.detail-section { margin-top: 1rem; }

.detail-action-row {
    display: flex; gap: 0.4rem; margin-top: 0.5rem; align-items: center;
}

.detail-inline-form { display: flex; gap: 0.4rem; }

.detail-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-height: 1em;
    margin-top: 0.3rem;
    display: block;
}

.detail-img-thumb {
    max-width: 100%; max-height: 80px;
    border-radius: 8px; border: 1px solid var(--border);
}

.detail-upload-zone {
    border: 2px dashed var(--border-hi);
    border-radius: 8px;
    padding: 0.6rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: border-color 0.2s;
}

.detail-upload-zone:hover { border-color: var(--primary); color: var(--text-dim); }

.detail-stats-list {
    display: flex; flex-direction: column; gap: 0.5rem;
}

.detail-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    background: var(--bg3);
    border-radius: 7px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.detail-stat-row span:last-child { font-weight: 600; }

.detail-earnings-box {
    background: var(--bg3);
    border-radius: 8px;
    padding: 0.7rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.detail-earnings-amount {
    font-size: 1.6rem; font-weight: 900; color: var(--green);
}

.detail-earnings-month {
    font-size: 0.65rem; color: var(--text-muted);
}

.detail-earnings-history {
    margin-top: 0.5rem; font-size: 0.72rem;
}

.detail-actions {
    display: flex; flex-direction: column; gap: 0.4rem;
}

/* ── Earnings Chart ─────────────────────────────────── */
.earnings-chart {
    display: none;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    margin-top: 0.75rem;
    padding: 0 0.2rem;
}

.earnings-bar-wrap {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.earnings-bar {
    width: 100%;
    background: var(--green);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.3s ease;
}

.earnings-bar-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ── Quick-Links Grid ───────────────────────────────── */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.quick-link-btn {
    display: flex; flex-direction: column;
    align-items: center; gap: 0.25rem;
    padding: 0.6rem 0.3rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.65rem; font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}

.quick-link-btn i { font-size: 1rem; }

.quick-link-btn:hover {
    background: rgba(249,115,22,0.07);
    border-color: var(--border-accent);
    color: var(--text);
}

/* ── Screenshot Preview ─────────────────────────────── */
.screenshot-preview {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.screenshot-preview:hover { border-color: var(--primary); }

.screenshot-img {
    width: 100%; display: block;
    border-radius: 8px;
}

/* ── Dashboard Layout ───────────────────────────────── */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.dash-left-col,
.dash-right-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Dashboard Quick-Start ─────────────────────────── */
.dash-quick-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.dash-quick-form .form-select {
    flex: 1;
}

.dash-quick-btns {
    display: flex;
    gap: 0.4rem;
}

/* ── Dashboard Progress ────────────────────────────── */
.dash-progress-text {
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
    color: var(--text-dim);
}

.dash-progress-links {
    display: flex;
    gap: 0.4rem;
}

/* ── Dashboard Creator Mini-Cards ──────────────────── */
.dash-creator-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dash-creator-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    background: var(--bg3);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.dash-creator-item:hover {
    border-color: var(--border-accent);
    background: rgba(249,115,22,0.05);
}

.dash-creator-info {
    flex: 1;
    min-width: 0;
}

.dash-creator-name {
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-creator-stats {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.dash-creator-earning {
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Dashboard Tools Grid ──────────────────────────── */
.dash-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.dash-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dash-tool-btn i {
    font-size: 1.2rem;
    color: var(--primary);
    transition: all 0.2s var(--ease-out);
}

.dash-tool-btn:hover {
    background: rgba(249,115,22,0.07);
    border-color: var(--border-accent);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.dash-tool-btn:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(249,115,22,0.3));
}
.dash-tool-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Dashboard: DB-Übersicht ──────────────────────────── */
.dash-db-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.dash-db-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 0.3rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.dash-db-item:hover {
    background: rgba(249,115,22,0.07);
    border-color: var(--border-accent);
}

.dash-db-item i { font-size: 1rem; }
.dash-db-label { font-size: 0.65rem; color: var(--text-muted); }
.dash-db-count { font-size: 0.88rem; font-weight: 700; color: var(--text); }

/* ── Dashboard: Auto-Post Widget ─────────────────────── */
.dash-post-status {
    display: flex;
    gap: 1rem;
}

.dash-post-stat {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.dash-post-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.dash-post-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.dash-next-post-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    background: var(--bg3);
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════
   COMMAND CENTER (Bot Control) — Clean Single-Column
   ═══════════════════════════════════════════════════════ */

.cc {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Section Card ────────────────────────────────── */
.cc-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.cc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.cc-head h3 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.cc-head h3 i {
    font-size: 0.9rem;
    opacity: 0.5;
}

.cc-head-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Overview ────────────────────────────────────── */
.cc-overview {
    padding: 1.5rem 1.25rem 1rem;
}

.cc-ov-top {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.cc-ov-nums {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.cc-ov-big {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text);
    line-height: 1;
}

.cc-ov-sep {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-muted);
    margin: 0 0.1rem;
}

.cc-ov-total {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dim);
}

.cc-ov-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cc-ov-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.cc-ov-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #34d399);
    border-radius: 3px;
    transition: width 0.8s ease;
    min-width: 2px;
}

.cc-ov-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cc-ov-meta i {
    font-size: 0.65rem;
    margin-right: 0.2rem;
    opacity: 0.6;
}

/* ── Sources ─────────────────────────────────────── */
.cc-sources {
    border-top: 1px solid var(--border);
}

.cc-src-wrap {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cc-src-wrap:last-child { border-bottom: none; }

.cc-src {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    transition: background 0.1s;
}

.cc-src:hover { background: rgba(255,255,255,0.015); }

.cc-src-icon {
    font-size: 0.85rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
    color: #fb923c;
}

.cc-src-wrap[data-source="foryou"] .cc-src-icon { color: #a78bfa; }
.cc-src-wrap[data-source="follower"] .cc-src-icon { color: #93c5fd; }
.cc-src-wrap[data-source="chat"] .cc-src-icon { color: #6ee7b7; }

.cc-src-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    width: 70px;
    flex-shrink: 0;
}

.cc-src-track {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    min-width: 60px;
}

.cc-src-fill {
    height: 100%;
    border-radius: 2px;
    background: #fb923c;
    transition: width 0.6s ease;
}

.cc-src-wrap[data-source="foryou"] .cc-src-fill { background: #a78bfa; }
.cc-src-wrap[data-source="follower"] .cc-src-fill { background: #60a5fa; }
.cc-src-wrap[data-source="chat"] .cc-src-fill { background: #34d399; }

.cc-src-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    min-width: 80px;
    text-align: right;
    white-space: nowrap;
}

.cc-src-num small {
    font-weight: 400;
    color: var(--text-muted);
}

.cc-src-go {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249,115,22,0.08);
    border: 1px solid rgba(249,115,22,0.15);
    border-radius: 7px;
    color: #fb923c;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cc-src-go:hover {
    background: rgba(249,115,22,0.18);
    border-color: rgba(249,115,22,0.35);
}

.cc-src-ok {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.cc-src-new {
    font-size: 0.65rem;
    font-weight: 700;
    color: #34d399;
    background: rgba(52,211,153,0.1);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.cc-src-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0.7;
}

.cc-src-chevron {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
    opacity: 0.5;
}

/* Source Detail Panel */
.cc-src-detail {
    padding: 0 1.25rem 1rem;
    animation: cc-fade-in 0.2s ease;
}
@keyframes cc-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.cc-src-detail-inner {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.cc-src-detail-loading, .cc-src-detail-err {
    padding: 1rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.cc-src-detail-err { color: #f87171; }

.spin { animation: cc-spin 1s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }

.cc-src-accounts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cc-src-acc {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.cc-src-acc-name {
    font-weight: 600;
    color: var(--text);
    min-width: 90px;
}

.cc-src-acc-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    min-width: 50px;
}

.cc-src-acc-fill {
    height: 100%;
    background: #fb923c;
    border-radius: 2px;
}
.cc-src-wrap[data-source="foryou"] .cc-src-acc-fill { background: #a78bfa; }
.cc-src-wrap[data-source="follower"] .cc-src-acc-fill { background: #60a5fa; }
.cc-src-wrap[data-source="chat"] .cc-src-acc-fill { background: #34d399; }

.cc-src-acc-num {
    font-weight: 600;
    color: var(--text-dim);
    min-width: 55px;
    text-align: right;
    white-space: nowrap;
}

.cc-src-acc-dates {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.cc-src-recent {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 0.6rem;
    margin-bottom: 0.5rem;
}

.cc-src-recent-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: block;
    margin-bottom: 0.4rem;
}

.cc-src-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.73rem;
}

.cc-src-user-name {
    font-weight: 600;
    color: var(--text);
    min-width: 100px;
}

.cc-src-user-acc {
    color: var(--text-muted);
}

.cc-src-user-date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.cc-src-target-btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(249,115,22,0.2);
    background: rgba(249,115,22,0.06);
    color: #fb923c;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.cc-src-target-btn:hover {
    background: rgba(249,115,22,0.12);
    border-color: rgba(249,115,22,0.35);
}

/* Source Filter Pill */
.cc-filter-wrap {
    margin-bottom: 0.5rem;
}

.cc-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem 0.3rem 0.7rem;
    background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.25);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fb923c;
}
.cc-filter-pill[data-source="foryou"] { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.25); color: #a78bfa; }
.cc-filter-pill[data-source="follower"] { background: rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.25); color: #60a5fa; }
.cc-filter-pill[data-source="chat"] { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.25); color: #34d399; }

.cc-filter-x {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 0.65rem;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.cc-filter-x:hover { opacity: 1; }

/* ── Run Detail ─────────────────────────────────── */
.cc-run-wrap {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cc-run-wrap:last-child { border-bottom: none; }

.cc-run-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
    opacity: 0.5;
    transition: transform 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.cc-run-detail {
    padding: 0 0.75rem 0.75rem;
    animation: cc-fade-in 0.2s ease;
}

.cc-run-detail-inner {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.cc-run-detail-loading, .cc-run-detail-err {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.cc-run-detail-err { color: #f87171; }

.cc-run-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1.5rem;
}

.cc-rd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}

.cc-rd-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cc-rd-val {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.cc-rs-text-completed { color: #34d399; }
.cc-rs-text-failed { color: #f87171; }
.cc-rs-text-running { color: #f97316; }
.cc-rs-text-stopped { color: #fbbf24; }

.cc-rd-source {
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.68rem;
}
.cc-rd-source[data-source="import"] { background: rgba(249,115,22,0.1); color: #fb923c; }
.cc-rd-source[data-source="foryou"] { background: rgba(167,139,250,0.1); color: #a78bfa; }
.cc-rd-source[data-source="follower"] { background: rgba(96,165,250,0.1); color: #60a5fa; }
.cc-rd-source[data-source="chat"] { background: rgba(52,211,153,0.1); color: #34d399; }

.cc-rd-sent { color: #34d399; }
.cc-rd-err { color: #f87171; }

/* ── Launch Card ─────────────────────────────────── */
.cc-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(148,163,184,0.1);
    color: var(--text-muted);
}

.cc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
}

.cc-dot.running {
    background: #f97316;
    animation: cc-pulse 1.5s infinite;
}

.cc-dot.done {
    background: #34d399;
}

@keyframes cc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}

.cc-launch.running {
    border-color: rgba(249,115,22,0.35);
    box-shadow: 0 0 30px rgba(249,115,22,0.06);
}

/* ── Form ────────────────────────────────────────── */
.cc-form {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cc-lbl {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cc-select,
.cc-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.82rem;
    transition: border-color 0.15s;
    font-family: inherit;
}

.cc-select:focus,
.cc-input:focus {
    outline: none;
    border-color: rgba(249,115,22,0.4);
}

.cc-ta {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* ── Mode Pills ──────────────────────────────────── */
.cc-modes {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cc-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.cc-mode i { font-size: 0.85rem; }

.cc-mode:hover {
    border-color: rgba(249,115,22,0.3);
    color: var(--text-dim);
}

.cc-mode.active {
    border-color: rgba(249,115,22,0.5);
    background: rgba(249,115,22,0.08);
    color: #f97316;
}

.cc-mode-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: -0.3rem 0 0;
    line-height: 1.4;
    min-height: 1em;
}

/* ── Message Bar ─────────────────────────────────── */
.cc-msg-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.cc-spacer { flex: 1; }

.cc-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.cc-btn-ghost:hover {
    border-color: var(--text-dim);
    color: var(--text-dim);
}

.cc-btn-save {
    color: #34d399;
    border-color: rgba(52,211,153,0.25);
}

.cc-btn-save:hover {
    border-color: rgba(52,211,153,0.5);
    background: rgba(52,211,153,0.06);
}

.cc-msg-feedback {
    font-size: 0.68rem;
    min-height: 1em;
    margin-top: 0.2rem;
}

.cc-msg-feedback .ok { color: #34d399; }
.cc-msg-feedback .err { color: #f87171; }

.cc-img-thumb {
    position: relative;
    display: inline-flex;
}

.cc-img-thumb img {
    height: 32px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.cc-img-x {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(220,38,38,0.9);
    border: none; border-radius: 50%;
    color: #fff; font-size: 0.45rem;
    cursor: pointer;
}

/* ── Live Progress ───────────────────────────────── */
.cc-live {
    padding: 1rem;
    background: rgba(249,115,22,0.04);
    border: 1px solid rgba(249,115,22,0.12);
    border-radius: 10px;
    text-align: center;
}

.cc-live-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.cc-live-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
    line-height: 1;
}

.cc-live-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cc-live-bar {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.cc-live-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #34d399);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.cc-live-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.7rem;
    color: var(--text-dim);
}

.cc-live-meta i {
    color: #f97316;
}

/* ── Action Buttons ──────────────────────────────── */
.cc-go {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #f97316, #fb923c);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.cc-go:hover {
    background: linear-gradient(135deg, #ea580c, #f97316);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249,115,22,0.3);
}

.cc-go i { font-size: 1.1rem; }

.cc-stop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.cc-stop:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

/* ── Collapsible Sections ────────────────────────── */
.cc-clickable {
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.cc-clickable:hover {
    background: rgba(255,255,255,0.02);
}

.cc-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.cc-icon-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.cc-icon-btn:hover {
    border-color: var(--border);
    color: var(--text-dim);
}

.cc-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    color: var(--text-muted);
}

/* ── Terminal ────────────────────────────────────── */
.cc-log {
    height: 350px;
    overflow-y: auto;
    padding: 0.7rem 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.72rem;
    line-height: 1.55;
    background: var(--bg1);
}

.cc-log-ph {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 1.5rem 0;
    justify-content: center;
    font-size: 0.75rem;
    font-family: inherit;
}

.cc-log-ph i {
    opacity: 0.3;
    font-size: 1rem;
}

.cc-log-line { padding: 1px 0; word-break: break-word; }
.cc-log-line.ok   { color: #34d399; }
.cc-log-line.err  { color: #f87171; }
.cc-log-line.warn { color: #fbbf24; }
.cc-log-line.info { color: #60a5fa; }

/* ── Run History ─────────────────────────────────── */
.cc-runs {
    max-height: 340px;
    overflow-y: auto;
}

.cc-run {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    transition: background 0.1s;
    cursor: pointer;
}

.cc-run:hover { background: rgba(255,255,255,0.02); }

.cc-run-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cc-rs-completed { background: #34d399; }
.cc-rs-failed    { background: #f87171; }
.cc-rs-running   { background: #f97316; }
.cc-rs-stopped   { background: #fbbf24; }

.cc-run-type {
    font-weight: 600;
    color: var(--text-dim);
    min-width: 50px;
}

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

.cc-run-time {
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.cc-run-dur {
    color: var(--text-muted);
    opacity: 0.7;
}

.cc-run-sent {
    color: #34d399;
    font-weight: 600;
    white-space: nowrap;
}

.cc-run-err {
    color: #f87171;
    white-space: nowrap;
}

.cc-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.cc-empty i { opacity: 0.3; }

/* ── Autopost Layout ───────────────────────────────── */
.autopost-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.autopost-left-col,
.autopost-right-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.autopost-form-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.autopost-drop-zone {
    border: 2px dashed var(--border-hi);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.autopost-drop-zone:hover {
    border-color: var(--primary);
}

.autopost-drop-zone i {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.autopost-drop-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.autopost-preview img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
}

.autopost-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.autopost-date-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: -0.4rem;
}

.autopost-time-slots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.autopost-slot-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.autopost-slot-row input { width: 110px; font-size: 0.8rem; }
.autopost-slot-row span { font-size: 0.68rem; color: var(--text-muted); min-width: 40px; }

.autopost-scheduler-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
}

.autopost-post-item {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.autopost-post-item:hover { background: rgba(249,115,22,0.05); }
.autopost-post-item:last-child { border-bottom: none; }

.autopost-post-thumb {
    width: 44px; height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.autopost-post-info {
    flex: 1;
    min-width: 0;
}

.autopost-post-title {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autopost-post-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════
   LIVE-BROWSER MODAL (Auto-Post)
   ═══════════════════════════════════════════════════════ */
.live-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.live-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.live-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
}

.live-modal-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

.live-modal-body {
    padding: 0.8rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Browser-Frame (Chrome-Fenster-Optik) */
.live-browser-frame {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
}

.live-browser-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}

.live-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.live-url {
    flex: 1;
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--bg3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.4rem;
}

.live-screenshot-wrap {
    position: relative;
    min-height: 250px;
    background: var(--bg);
}

.live-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

/* Log-Sektion im Modal */
.live-log-section {
    background: var(--bg2);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.live-log-header {
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Ergebnis-Banner */
.live-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-top: 1px solid var(--border);
}

.live-result-success {
    background: rgba(52,211,153,0.1);
    color: #34d399;
}

.live-result-error {
    background: rgba(248,113,113,0.1);
    color: #f87171;
}

/* ═══════════════════════════════════════════════════════
   USER-DB – Tags, Bulk, Scores, Filter
   ═══════════════════════════════════════════════════════ */

/* ── Stat Grid (7 Karten) ───────────────────────────── */
.users-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

/* ── Filter Bar ──────────────────────────────────────── */
.users-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 0.8rem;
}
.users-filter-bar label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}
.users-filter-bar .form-control-sm,
.users-filter-bar .form-select-sm {
    font-size: 0.78rem;
    padding: 0.3rem 0.5rem;
}

/* ── Tag System ──────────────────────────────────────── */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: color-mix(in srgb, var(--tag-color, var(--primary)) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--primary)) 30%, transparent);
    color: var(--text);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}
.tag-badge:hover {
    background: color-mix(in srgb, var(--tag-color, var(--primary)) 25%, transparent);
}
.tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tag-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 0 0 0.15rem;
    line-height: 1;
    transition: color 0.15s;
}
.tag-delete:hover { color: var(--red); }

.tag-badge-sm {
    display: inline-flex;
    align-items: center;
    background: color-mix(in srgb, var(--tag-color, var(--primary)) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--tag-color, var(--primary)) 25%, transparent);
    color: var(--text-dim);
    padding: 0.08rem 0.4rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    margin: 1px 0;
}

.tag-create-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* ── Bulk Toolbar ────────────────────────────────────── */
.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.bulk-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-light);
    white-space: nowrap;
}
.bulk-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Score Bar (mini) ────────────────────────────────── */
.score-bar-mini {
    position: relative;
    width: 44px;
    height: 16px;
    background: var(--bg3);
    border-radius: 8px;
    overflow: hidden;
}
.score-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 8px;
    transition: width 0.3s;
}
.score-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ── Inline Edit ─────────────────────────────────────── */
.notes-cell {
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--text-dim);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notes-cell:hover {
    color: var(--text);
    background: var(--glass-bg);
}
.inline-edit-input {
    width: 100%;
    min-height: 50px;
    background: var(--bg2);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--text);
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    resize: vertical;
}
.inline-edit-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* ── Table Helpers ───────────────────────────────────── */
.users-id {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.users-date {
    color: var(--text-muted);
    font-size: 0.7rem;
}
.users-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}
.tags-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}
.text-muted-sm {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ── Users Pagination ────────────────────────────────── */
.users-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
}

/* ── Purple badge for Creator source ─────────────────── */
.badge.bg-purple {
    background: var(--purple) !important;
}

/* ═══════════════════════════════════════════════════════
   MASSDM – Compose, Filters, Progress
   ═══════════════════════════════════════════════════════ */

.massdm-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.massdm-left-col { display: flex; flex-direction: column; gap: 1rem; }
.massdm-right-col { display: flex; flex-direction: column; gap: 1rem; }

.massdm-compose {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
}
.massdm-compose textarea {
    resize: vertical;
    min-height: 80px;
}
.massdm-option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.massdm-option-row input[type="checkbox"] {
    accent-color: var(--primary);
}

.massdm-filter-body {
    padding: 0.7rem 1rem;
}
.massdm-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.massdm-filter-grid label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.massdm-preview {
    background: color-mix(in srgb, var(--cyan) 8%, var(--card));
    border: 1px solid color-mix(in srgb, var(--cyan) 20%, transparent);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    text-align: center;
    margin-bottom: 0.8rem;
}
.massdm-preview-detail {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.massdm-actions {
    display: flex;
    gap: 0.5rem;
}
.massdm-actions .btn { flex: 1; }

/* ── Progress Card ───────────────────────────────────── */
.massdm-progress-card {
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}
.massdm-big-counter {
    font-size: 3rem;
    font-weight: 800;
    color: var(--green);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.massdm-counter-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.massdm-progress-stats {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.4rem;
}
.massdm-progress-stats i {
    margin-right: 0.2rem;
}

.massdm-status-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.6rem;
}
.massdm-status-running { background: color-mix(in srgb, var(--cyan) 20%, transparent); color: var(--cyan); }
.massdm-status-paused  { background: color-mix(in srgb, var(--yellow) 20%, transparent); color: var(--yellow); }
.massdm-status-completed { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.massdm-status-failed  { background: color-mix(in srgb, var(--red) 20%, transparent); color: var(--red); }
.massdm-status-draft   { background: color-mix(in srgb, var(--text-muted) 20%, transparent); color: var(--text-muted); }

/* ── Log Indicator ───────────────────────────────────── */
.massdm-log-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: var(--green);
    font-weight: 600;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-ring 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════
   CHAT – Messenger UI
   ═══════════════════════════════════════════════════════ */

.chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 52px); /* topbar height abziehen */
    overflow: hidden;
    margin: -1.5rem; /* page-content padding neutralisieren */
}

/* ── Sidebar ───────────────────────────────────────── */
.chat-sidebar {
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-sidebar-header {
    display: flex;
    gap: 0.4rem;
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.chat-sidebar-header .form-select { flex: 1; }

.chat-connection-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    font-size: 0.7rem;
}
.chat-conn-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.chat-conn-dot.connected {
    background: var(--green);
}
.chat-conn-dot.disconnected {
    background: var(--text-muted);
}
.chat-conn-dot.connecting {
    background: var(--yellow);
    animation: chat-blink 1s ease-in-out infinite;
}
@keyframes chat-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
.chat-conn-text { color: var(--text-dim); }

.chat-login-log {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
    max-height: 80px;
    overflow-y: auto;
    background: var(--bg);
}
.chat-login-log pre {
    font-size: 0.62rem;
    color: var(--text-dim);
    margin: 0;
    white-space: pre-wrap;
    font-family: 'SF Mono', 'Fira Code', monospace;
    line-height: 1.4;
}

.chat-search {
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--border);
}
.chat-search .form-control {
    background: var(--bg);
    font-size: 0.8rem;
}

.chat-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.75rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    color: var(--text-muted);
}
.chat-stat-earn {
    color: var(--green);
    font-weight: 700;
}

/* ── Konversationsliste ──────────────────────────────── */
.chat-conv-list {
    flex: 1;
    overflow-y: auto;
}

.chat-conv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
}
.chat-conv-empty i { font-size: 1.5rem; opacity: 0.3; }

.chat-conv-loadmore {
    text-align: center;
    padding: 0.8rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}
.chat-conv-loadmore .spinner-border-sm {
    width: 0.7rem; height: 0.7rem;
    border-width: 0.12em;
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.12s;
}
.chat-conv-item:hover { background: rgba(249,115,22,0.06); }
.chat-conv-item.active {
    background: rgba(249,115,22,0.08);
    border-left: 3px solid var(--primary);
}
.chat-conv-item.unread .chat-conv-name { color: #fff; font-weight: 700; }

.chat-conv-avatar {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.chat-conv-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-conv-info {
    flex: 1;
    min-width: 0;
}
.chat-conv-name {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-conv-preview {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-conv-earnings {
    color: var(--green);
    font-weight: 700;
    font-size: 0.68rem;
}

/* Online-Indikator am Avatar */
.chat-conv-avatar.online {
    /* position: relative already set on .chat-conv-avatar */
}
.chat-conv-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background: var(--green);
    border: 2px solid var(--bg2);
    border-radius: 50%;
}

.chat-conv-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}
.chat-conv-time {
    font-size: 0.62rem;
    color: var(--text-muted);
}
.chat-conv-unread {
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ── Rechter Bereich ─────────────────────────────────── */
.chat-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-muted);
}
.chat-empty-state p { font-size: 0.92rem; font-weight: 600; margin: 0; }
.chat-empty-state span { font-size: 0.75rem; }

/* ── Nachricht Header ────────────────────────────────── */
.chat-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}
.chat-msg-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.chat-msg-avatar {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.chat-msg-username {
    font-size: 0.88rem;
    font-weight: 700;
}
.chat-msg-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.chat-msg-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chat-refresh-indicator {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.chat-refresh-indicator i {
    animation: spin 2s linear infinite;
    font-size: 0.7rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Nachrichten-Bereich ──────────────────────────────── */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.chat-msg-loading, .chat-msg-empty, .chat-msg-error {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 2rem;
}
.chat-msg-error { color: var(--red); }

/* ── Datums-Trennlinien ──────────────────────────────── */
.chat-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 0.6rem;
    position: relative;
}
.chat-date-sep::before,
.chat-date-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.chat-date-sep span {
    padding: 0.15rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg2);
    border-radius: 12px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* ── Chat Bubbles ────────────────────────────────────── */
.chat-bubble {
    max-width: 70%;
    padding: 0.55rem 0.8rem;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    margin-bottom: 3px;
    transition: opacity 0.15s;
}
.chat-bubble.grouped {
    margin-top: -1px;
}
.chat-bubble.mine {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-bubble.mine.grouped {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
    align-self: flex-start;
    background: var(--bg3);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.chat-bubble.theirs.grouped {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 4px;
}

.chat-bubble-text { white-space: pre-wrap; }

.chat-bubble-time {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.5);
    text-align: right;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
}
.chat-bubble-time i { font-size: 0.72rem; }
.chat-bubble.theirs .chat-bubble-time {
    color: var(--text-muted);
}

.chat-msg-media {
    margin-bottom: 0.3rem;
    display: block;
}
.chat-msg-media img,
.chat-msg-media video {
    max-width: 280px;
    max-height: 320px;
    border-radius: 8px;
    cursor: pointer;
    display: block;
}

/* Video Thumbnail mit Play-Button */
.chat-video-thumb {
    position: relative;
    cursor: pointer;
    display: inline-block;
}
.chat-video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.chat-video-thumb:hover .chat-video-play { background: rgba(249,115,22,0.8); }
.chat-video-play i { color: #fff; font-size: 24px; margin-left: 3px; }

.chat-msg-media-placeholder {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.chat-msg-media-placeholder i {
    font-size: 1.1rem;
    color: var(--primary);
}

.chat-bubble-price {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--green);
    margin-top: 0.15rem;
    background: rgba(52,211,153,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
}
.chat-bubble-price i { font-size: 0.72rem; }
.chat-bubble.mine .chat-bubble-price {
    color: rgba(52,211,153,0.95);
    background: rgba(52,211,153,0.15);
}

/* ── Eingabe ──────────────────────────────────────────── */
.chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.8rem 0.6rem;
    border-top: 1px solid var(--border);
    background: var(--bg2);
}
.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}
.chat-input-area textarea {
    flex: 1;
    resize: none;
    min-height: 38px;
    max-height: 120px;
    font-size: 0.85rem;
    border-radius: 20px;
    padding: 0.5rem 0.9rem;
}
.chat-send-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.chat-send-btn i { font-size: 0.95rem; }

/* ── Vault Picker ──────────────────────────────────── */
.chat-vault-picker {
    border-bottom: 1px solid var(--border);
    background: var(--bg1);
    max-height: 280px;
    display: flex;
    flex-direction: column;
}
.vault-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.vault-picker-header i { margin-right: 0.3rem; }
.vault-picker-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
/* ── Ordner-Tabs ── */
.vault-folder-bar {
    display: flex;
    gap: 4px;
    padding: 6px 6px 2px;
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}
.vault-folder-bar::-webkit-scrollbar { display: none; }
.vault-folder-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
}
.vault-folder-tab:hover { border-color: var(--primary); color: var(--primary); }
.vault-folder-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.vault-folder-tab i { font-size: 0.65rem; }
.vault-folder-count {
    font-size: 0.6rem;
    opacity: 0.7;
    margin-left: 2px;
}

.vault-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 4px;
    padding: 6px;
    overflow-y: auto;
    flex: 1;
    min-height: 80px;
}
.vault-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.1s;
    background: var(--bg2);
}
.vault-item:hover { border-color: var(--primary); transform: scale(1.03); }
.vault-item.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(249,115,22,0.2); }
.vault-item img { width: 100%; height: 100%; object-fit: cover; }
.vault-item-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.2rem;
}
.vault-item-badge {
    position: absolute; bottom: 3px; right: 3px;
    background: rgba(0,0,0,0.7); color: #fff;
    font-size: 0.65rem; padding: 1px 4px;
    border-radius: 4px;
}
.vault-item-lock {
    position: absolute; top: 3px; right: 3px;
    color: #f59e0b; font-size: 0.6rem;
}
.vault-picker-footer {
    padding: 0.3rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}
.vault-item-count {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.vault-picker-loading, .vault-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Attachment Preview ────────────────────────────── */
.chat-attach-preview {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    background: rgba(249,115,22,0.07);
    border-radius: 10px;
    margin-bottom: 0.4rem;
    position: relative;
}
.attach-thumb-wrap {
    width: 56px; height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: var(--bg2);
}
.attach-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.attach-thumb-wrap .vault-item-badge { bottom: 2px; right: 2px; }
.attach-info { flex: 1; min-width: 0; }
.attach-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 0.3rem;
}
.attach-price-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.attach-price-row label {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin: 0;
}
.attach-price-input {
    display: flex;
    align-items: center;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.15rem 0.4rem;
    width: 80px;
}
.attach-price-prefix {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: 0.15rem;
}
.attach-price-input input {
    border: none;
    background: none;
    color: var(--text);
    font-size: 0.75rem;
    width: 100%;
    padding: 0;
    outline: none;
}
.attach-price-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.attach-remove {
    position: absolute;
    top: 4px; right: 4px;
    width: 24px; height: 24px;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
}

/* ── Attach Button ─────────────────────────────────── */
.chat-attach-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s;
}
.chat-attach-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-attach-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(249,115,22,0.1); }

/* ── Inline Nachrichten-Suche ───────────────────────── */
.chat-search-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.chat-search-inline input {
    width: 160px;
    font-size: 0.78rem;
    border-radius: 14px;
    padding: 0.25rem 0.7rem;
}
.chat-bubble-text mark {
    background: rgba(250,204,21,0.4);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

/* ── Chat Filter/Sort Bar ─────────────────────────────── */
.chat-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
}
.chat-sort-select {
    flex: 1;
    font-size: 0.72rem;
    padding: 0.2rem 0.4rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    min-width: 0;
}
.chat-sort-select:focus { outline: none; border-color: var(--primary); }
.chat-filter-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg3);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.72rem;
    transition: all 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.chat-filter-btn:hover { border-color: var(--border-hi); color: var(--text-dim); }
.chat-filter-btn.active {
    background: rgba(249,115,22,0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* ── Chat CRM Panel ───────────────────────────────────── */
.chat-layout.crm-open {
    grid-template-columns: 320px 1fr 300px;
}

.chat-crm-panel {
    background: var(--bg2);
    border-left: 1px solid var(--border);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chat-layout.crm-open .chat-crm-panel { display: flex; }

.crm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}
.crm-header-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
}
.crm-close-btn {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 1rem; padding: 0.15rem;
    line-height: 1;
}
.crm-close-btn:hover { color: var(--text); }

.crm-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.crm-fan-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}
.crm-fan-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    background: var(--bg3);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.crm-fan-avatar img { width: 100%; height: 100%; object-fit: cover; }
.crm-fan-avatar i { font-size: 1.5rem; color: var(--text-muted); }
.crm-fan-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.15rem;
}
.crm-fan-id {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: monospace;
}
.crm-fan-link {
    font-size: 0.7rem;
    color: var(--primary-light);
    text-decoration: none;
    margin-top: 0.25rem;
}
.crm-fan-link:hover { text-decoration: underline; }

.crm-section {
    margin-bottom: 0.85rem;
}
.crm-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.crm-earnings {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--green);
    text-align: center;
    padding: 0.5rem;
    background: rgba(52,211,153,0.06);
    border: 1px solid rgba(52,211,153,0.15);
    border-radius: 8px;
}

/* ── CRM Abo-Status Sektion ── */
.crm-sub-info {
    text-align: center;
}
.crm-sub-badge-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}
.crm-sub-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    letter-spacing: 0.3px;
}
.crm-sub-badge.sub-active {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
}
.crm-sub-badge.sub-cancelled {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.crm-sub-badge.sub-expired {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}
.crm-sub-badge.sub-none {
    background: var(--bg3);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.crm-sub-follower {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(249,115,22,0.12);
    color: var(--primary-light);
    border: 1px solid rgba(249,115,22,0.2);
}
.crm-sub-details {
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg3);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.crm-sub-details i {
    color: var(--text-muted);
    width: 16px;
    text-align: center;
    margin-right: 0.2rem;
}

/* ── Chat Konversation Badges (Subscriber/Follower) ── */
.chat-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 0.05rem 0.25rem;
    margin-left: 0.25rem;
    line-height: 1.2;
    vertical-align: middle;
}
.chat-badge.subscriber {
    background: rgba(34,197,94,0.2);
    color: #22c55e;
}
.chat-badge.cancelled {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}
.chat-badge.follower {
    background: rgba(249,115,22,0.15);
    color: var(--primary-light);
}

.crm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.crm-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    background: rgba(249,115,22,0.12);
    color: var(--primary-light);
    border: 1px solid rgba(249,115,22,0.15);
}
.crm-tag-badge .tag-x {
    cursor: pointer;
    opacity: 0.6;
    font-size: 0.65rem;
    margin-left: 0.1rem;
}
.crm-tag-badge .tag-x:hover { opacity: 1; }

.crm-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.crm-qtag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text-dim);
    transition: all 0.15s;
}
.crm-qtag:hover { border-color: var(--border-hi); }
.crm-qtag.active {
    background: rgba(249,115,22,0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

.crm-tag-add {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}
.crm-tag-add select {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}
.crm-tag-add button {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

.crm-score-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.crm-score-row input[type="range"] {
    flex: 1;
    height: 4px;
    accent-color: var(--primary);
}
.crm-score-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
    min-width: 2rem;
    text-align: right;
}

.crm-notes textarea {
    width: 100%;
    min-height: 60px;
    font-size: 0.78rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 0.5rem;
    resize: vertical;
}
.crm-notes textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.crm-notes-save {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
}

.crm-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.crm-meta strong { color: var(--text-dim); }

/* ── Tag-Dots in Konversationsliste ───────────────────── */
.chat-conv-name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.chat-conv-tags {
    display: inline-flex;
    gap: 0.15rem;
    flex-shrink: 0;
}
.chat-conv-tag-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Account-Label in Sidebar ─────────────────────────── */
.chat-account-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
    padding: 0.4rem 0.7rem 0.1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.chat-account-label i { color: var(--primary-light); font-size: 0.7rem; }

/* ── Bulk-Import Bar ──────────────────────────────────── */
.chat-bulk-bar {
    padding: 0.5rem 0.7rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.chat-bulk-bar button {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}
.chat-bulk-bar .bulk-status {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ── Chat Import Bar ───────────────────────────────── */
.chat-import-bar {
    padding: 0.4rem 0.7rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.7rem;
}
.chat-import-text {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.chat-import-text .spinner-border {
    width: 0.7rem;
    height: 0.7rem;
    border-width: 0.1rem;
}
.chat-import-stats {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-top: 0.15rem;
}

/* ── CRM Toggle Button ───────────────────────────────── */
.crm-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.crm-toggle-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.crm-toggle-btn.active {
    background: rgba(249,115,22,0.12);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* ═══════════════════════════════════════════════════════
   ACCOUNTS – Cards + Plattform-Auswahl
   ═══════════════════════════════════════════════════════ */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 0.8rem;
}

.account-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.account-card:hover {
    border-color: var(--border-hi);
    box-shadow: var(--shadow-md);
}

.account-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

.account-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.account-card-info { flex: 1; min-width: 0; }
.account-card-name { font-size: 0.88rem; font-weight: 700; }
.account-card-email { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.account-card-body { padding: 0.6rem 0.8rem; }

.account-card-msg {
    display: flex; gap: 0.4rem; align-items: flex-start;
    font-size: 0.75rem; color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.account-card-meta {
    display: flex; gap: 0.8rem;
    font-size: 0.65rem; color: var(--text-muted);
}

.account-card-meta i { font-size: 0.6rem; margin-right: 0.15rem; }

.account-card-footer {
    display: flex; gap: 0.4rem; padding: 0.5rem 0.8rem;
    border-top: 1px solid var(--border);
    background: var(--bg2);
}

/* Plattform Tabs */
.platform-filter-tabs {
    display: flex; gap: 0.4rem;
}

.platform-tab {
    display: flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.75rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.platform-tab:hover { border-color: var(--border-hi); color: var(--text); }
.platform-tab.active { background: rgba(249,115,22,0.08); border-color: var(--primary); color: var(--text); }

.platform-tab-count {
    background: var(--border);
    padding: 0.05rem 0.35rem;
    border-radius: 10px;
    font-size: 0.62rem;
    color: var(--text-muted);
}

.platform-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Plattform-Auswahl in Modals */
.platform-select-group {
    display: flex; gap: 0.5rem;
}

.platform-select-option {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem; font-weight: 600;
    color: var(--text-dim);
    transition: all 0.15s;
    flex: 1;
    justify-content: center;
}

.platform-select-option:hover { border-color: var(--border-hi); color: var(--text); }

.platform-select-option.active {
    border-color: var(--primary);
    background: rgba(249,115,22,0.07);
    color: var(--text);
}

.bg-purple { background-color: var(--primary) !important; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1200px) {
    .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-main-grid { grid-template-columns: 1fr; }
    .cc { max-width: 100%; }
    .cc-modes { flex-direction: column; }
    .autopost-grid { grid-template-columns: 1fr; }
    .users-stats-grid { grid-template-columns: repeat(4, 1fr); }
    .massdm-grid { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 260px 1fr; }
    .chat-layout.crm-open { grid-template-columns: 260px 1fr 260px; }
    .dash-db-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════
   Sidebar Badges (Beta, New)
   ═══════════════════════════════════════════════════════ */
.nav-badge {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    line-height: 1;
}
.nav-badge.beta {
    background: rgba(234,179,8,0.12);
    color: var(--yellow);
    border: 1px solid rgba(234,179,8,0.2);
}
.nav-badge.new {
    background: rgba(34,197,94,0.12);
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.2);
}

/* Badge im Section-Header */
.badge-beta {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
    background: rgba(234,179,8,0.1);
    color: var(--yellow);
    border: 1px solid rgba(234,179,8,0.2);
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 0.4rem;
}

/* ═══════════════════════════════════════════════════════
   API Status Panel (Feature-Seiten)
   ═══════════════════════════════════════════════════════ */
.api-status-panel {
    margin-top: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.api-status-panel.empty {
    border-style: dashed;
    border-color: var(--glass-border);
}
.api-status-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: var(--bg3);
    font-size: 0.78rem;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}
.api-status-header i { color: var(--green); }
.api-count-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    background: rgba(16,185,129,0.1);
    color: var(--green);
    border-radius: 6px;
}
.api-status-list { padding: 0.5rem; }
.api-ep-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.74rem;
    transition: background 0.15s;
}
.api-ep-item:hover { background: rgba(249,115,22,0.06); }
.api-ep-item.fail { opacity: 0.45; }
.api-ep-method {
    font-size: 0.6rem;
    font-weight: 700;
    font-family: monospace;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    min-width: 38px;
    text-align: center;
}
.api-ep-method.get { background: rgba(16,185,129,0.15); color: #10b981; }
.api-ep-method.post { background: rgba(249,115,22,0.15); color: #3b82f6; }
.api-ep-method.put { background: rgba(245,158,11,0.15); color: #f59e0b; }
.api-ep-method.delete { background: rgba(239,68,68,0.15); color: #ef4444; }
.api-ep-code {
    font-size: 0.65rem;
    font-weight: 600;
    font-family: monospace;
    min-width: 28px;
    text-align: center;
}
.api-ep-code.ok { color: var(--green); }
.api-ep-code.fail { color: var(--red); }
.api-ep-path {
    font-size: 0.68rem;
    color: var(--cyan);
    flex: 1;
}
.api-ep-cat {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg3);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}
.api-status-hint {
    padding: 0.5rem 1rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.api-status-hint a { color: var(--cyan); text-decoration: none; }
.api-status-hint a:hover { text-decoration: underline; }
.api-status-empty {
    padding: 2rem;
    text-align: center;
}
.api-status-empty p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.5rem 0 1rem;
}

/* ═══════════════════════════════════════════════════════
   Coming Soon / Feature Preview Pages
   ═══════════════════════════════════════════════════════ */
.feature-coming-soon {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.coming-soon-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.coming-soon-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    margin: 0 auto 1.5rem;
    background: var(--primary);
}
.coming-soon-icon.cyan {
    background: var(--cyan);
}
.coming-soon-icon.green {
    background: var(--green-dark);
}
.coming-soon-icon.yellow {
    background: #ca8a04;
}
.coming-soon-icon.orange {
    background: #ea580c;
}
.coming-soon-icon.purple-light {
    background: var(--purple);
}

.coming-soon-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text);
}

.coming-soon-card > p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1.8rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.coming-soon-features {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 2rem;
    padding: 1.2rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.feature-preview-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-dim);
}
.feature-preview-item i {
    color: var(--green);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.coming-soon-status {
    display: flex;
    justify-content: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
}
.status-badge.wip {
    background: rgba(249,115,22,0.08);
    color: var(--primary-light);
    border: 1px solid rgba(249,115,22,0.15);
}
.status-badge.planned {
    background: rgba(234,179,8,0.08);
    color: var(--yellow);
    border: 1px solid rgba(234,179,8,0.2);
}

/* ═══════════════════════════════════════════════════════
   Settings Page
   ═══════════════════════════════════════════════════════ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    background: var(--glass-bg);
}
.settings-card-header i {
    font-size: 1rem;
    color: var(--primary-light);
}
.settings-card-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
}

.settings-card-body {
    padding: 0;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--glass-border);
    gap: 1rem;
}
.setting-row:last-child { border-bottom: none; }

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.setting-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}
.setting-value {
    font-size: 0.75rem;
    color: var(--text-dim);
}
.setting-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.settings-notice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.2rem;
    background: rgba(249,115,22,0.06);
    border: 1px solid rgba(249,115,22,0.12);
    border-radius: 10px;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.settings-notice i {
    color: var(--primary-light);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════
   Help Center Page
   ═══════════════════════════════════════════════════════ */
.help-search-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    margin-bottom: 1.5rem;
}
.help-search-bar i {
    color: var(--text-muted);
    font-size: 1rem;
}
.help-search-bar .form-control {
    background: transparent;
    border: none;
    font-size: 0.88rem;
    color: var(--text);
    padding: 0.3rem 0;
    box-shadow: none !important;
}
.help-search-bar .form-control::placeholder {
    color: var(--text-muted);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.help-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem;
    transition: all 0.2s ease;
}
.help-card:hover {
    border-color: var(--border-hi);
}

.help-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 1rem;
}

.help-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.help-card > p {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.45;
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.help-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: var(--text-dim);
    line-height: 1.4;
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(249,115,22,0.1);
    color: var(--primary-light);
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}

.help-footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════════
   API Explorer
   ═══════════════════════════════════════════════════════ */
.explorer-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.explorer-account-select {
    flex: 1;
    max-width: 350px;
}
.explorer-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.75rem;
}
.explorer-info .info-label {
    color: var(--text-muted);
}
.explorer-info code {
    color: var(--cyan);
    font-size: 0.72rem;
}

/* Scan Summary */
.scan-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.scan-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    text-align: center;
}
.scan-stat.green { border-color: rgba(52,211,153,0.3); }
.scan-stat.red { border-color: rgba(248,113,113,0.3); }
.scan-stat.purple { border-color: rgba(249,115,22,0.2); }
.scan-stat-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}
.scan-stat.green .scan-stat-num { color: var(--green); }
.scan-stat.red .scan-stat-num { color: var(--red); }
.scan-stat.purple .scan-stat-num { color: var(--primary-light); font-size: 0.8rem; }
.scan-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scan Filter */
.scan-filter-bar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.scan-filter {
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.scan-filter:hover { border-color: var(--primary); color: var(--text); }
.scan-filter.active {
    background: rgba(249,115,22,0.1);
    border-color: rgba(249,115,22,0.2);
    color: var(--primary-light);
}

/* Scan Table */
.scan-table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.scan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.scan-table thead th {
    background: var(--bg3);
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.scan-table tbody tr {
    border-bottom: 1px solid var(--glass-border);
}
.scan-table tbody tr:last-child { border-bottom: none; }
.scan-table tbody td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
}

.scan-status-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
}
.scan-status-badge.ok { background: rgba(52,211,153,0.15); color: var(--green); }
.scan-status-badge.auth { background: rgba(251,191,36,0.15); color: var(--yellow); }
.scan-status-badge.fail { background: rgba(248,113,113,0.12); color: var(--red); }

.scan-cat {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(249,115,22,0.07);
    color: var(--primary-light);
    font-weight: 600;
}
.scan-path {
    font-size: 0.72rem;
    color: var(--cyan);
    word-break: break-all;
}
.scan-desc { color: var(--text-dim); font-size: 0.75rem; }
.scan-time { color: var(--text-muted); font-size: 0.7rem; }

.scan-preview-row td { padding: 0 !important; }
.scan-preview {
    margin: 0;
    padding: 0.6rem 1rem;
    background: var(--bg2);
    font-size: 0.68rem;
    color: var(--text-dim);
    max-height: 200px;
    overflow: auto;
    border-top: 1px solid var(--glass-border);
    white-space: pre-wrap;
    word-break: break-all;
}

/* Manual Test */
.explorer-manual {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}
.explorer-manual h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.explorer-manual h4 i { color: var(--cyan); }

.manual-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.manual-method { width: 100px; }
.manual-endpoint { flex: 1; }

.manual-body-row {
    margin-bottom: 0.75rem;
}

.manual-result {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.75rem;
}
.result-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg3);
}
.result-status {
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
}
.result-status.ok { background: rgba(52,211,153,0.15); color: var(--green); }
.result-status.auth { background: rgba(251,191,36,0.15); color: var(--yellow); }
.result-status.fail { background: rgba(248,113,113,0.12); color: var(--red); }
.result-time { font-size: 0.72rem; color: var(--text-muted); }
.result-url { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; word-break: break-all; }
.result-body {
    margin: 0;
    padding: 1rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Reference */
/* ═══════════════════════════════════════════════════════
   Saved APIs / Feature Map
   ═══════════════════════════════════════════════════════ */
.explorer-saved {
    margin-bottom: 2rem;
}
.saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.saved-header h4 {
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}
.saved-header h4 i { color: var(--green); }
.saved-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Feature Map Summary */
.feature-map-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.fm-big-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1.4rem;
    text-align: center;
    flex: 1;
}
.fm-big-stat.green { border-color: rgba(16,185,129,0.3); }
.fm-big-stat.purple { border-color: rgba(249,115,22,0.2); }
.fm-big-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.fm-big-stat.green .fm-big-num { color: var(--green); }
.fm-big-stat.purple .fm-big-num { color: var(--primary); }
.fm-big-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature Map Cards */
.feature-map-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.feature-map-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.feature-map-card:hover {
    border-color: var(--border-hi);
}
.feature-map-icon {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}
.feature-map-name {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.feature-map-stats {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.fm-ok { color: var(--green); font-weight: 700; }
.fm-total { font-weight: 600; }
.feature-map-bar {
    height: 3px;
    background: var(--bg3);
    border-radius: 2px;
    overflow: hidden;
}
.feature-map-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

/* Saved Categories */
.saved-cat-group {
    margin-bottom: 0.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.saved-cat-group.collapsed .saved-cat-body { display: none; }
.saved-cat-group.collapsed .saved-cat-chevron { transform: rotate(-90deg); }
.saved-cat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg3);
    user-select: none;
}
.saved-cat-header:hover { background: rgba(249,115,22,0.07); }
.saved-cat-icon { font-size: 1rem; }
.saved-cat-count {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}
.saved-cat-chevron {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.saved-cat-body { padding: 0; }
.saved-ep-table {
    width: 100%;
    font-size: 0.74rem;
}
.saved-ep-row {
    border-bottom: 1px solid var(--glass-border);
}
.saved-ep-row:last-child { border-bottom: none; }
.saved-ep-row td { padding: 0.4rem 0.6rem; vertical-align: middle; }
.saved-ep-row.ok { background: rgba(16,185,129,0.03); }
.saved-ep-row.fail { opacity: 0.5; }
.ep-method { width: 55px; }
.method-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    text-transform: uppercase;
}
.method-badge.get { background: rgba(16,185,129,0.15); color: #10b981; }
.method-badge.post { background: rgba(249,115,22,0.15); color: #3b82f6; }
.method-badge.put { background: rgba(245,158,11,0.15); color: #f59e0b; }
.method-badge.delete { background: rgba(239,68,68,0.15); color: #ef4444; }
.ep-status { width: 50px; }
.ep-path code {
    font-size: 0.68rem;
    color: var(--cyan);
    word-break: break-all;
}
.ep-feature { width: 120px; }
.ep-feature-tag {
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid;
    border-radius: 4px;
    white-space: nowrap;
}
.ep-actions { width: 40px; text-align: right; }

.explorer-reference {
    margin-bottom: 2rem;
}
.explorer-reference h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.explorer-reference h4 i { color: var(--yellow); }

.ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.ref-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}
.ref-card h5 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}
.ref-item {
    font-size: 0.74rem;
    color: var(--text-dim);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--glass-border);
}
.ref-item:last-child { border-bottom: none; }
.ref-item code {
    color: var(--cyan);
    font-size: 0.68rem;
    margin-right: 0.4rem;
}

/* ═══════════════════════════════════════════════════════
   Live Scan Terminal Modal
   ═══════════════════════════════════════════════════════ */
.live-scan-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.live-scan-modal {
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    background: #0a0a0c;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Terminal Header (macOS-like) */
.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: #1a1a1e;
    border-bottom: 1px solid #2a2a2e;
}
.terminal-dots {
    display: flex;
    gap: 6px;
}
.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #555;
}
.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
}
.terminal-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.terminal-counter {
    font-size: 0.72rem;
    color: var(--cyan);
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.terminal-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #333;
    background: transparent;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.75rem;
}
.terminal-close-btn:hover { background: #333; color: #fff; }

/* Progress Bar */
.terminal-progress {
    height: 3px;
    background: #1a1a1e;
}
.terminal-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}
.terminal-progress-bar.done {
    background: var(--green);
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.73rem;
    line-height: 1.6;
    min-height: 350px;
    max-height: 55vh;
    color: #c8c8c8;
}

.terminal-line     { white-space: pre; }
.terminal-line.t-green  { color: #28c840; }
.terminal-line.t-cyan   { color: #22d3ee; }
.terminal-line.t-yellow { color: #febc2e; }
.terminal-line.t-red    { color: #ff5f57; }
.terminal-line.t-dim    { color: #555; }

/* Terminal Footer */
.terminal-footer {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.6rem 1rem;
    background: #1a1a1e;
    border-top: 1px solid #2a2a2e;
}
.terminal-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.t-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.t-dot.green  { background: #28c840; }
.t-dot.yellow { background: #febc2e; }
.t-dot.red    { background: #ff5f57; }
.t-dot.blue   { background: #22d3ee; }
.t-label {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.t-num {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ddd;
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.terminal-stat-time {
    margin-left: auto;
    font-size: 0.72rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    main { margin-left: 0; }
    .creator-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .quick-links-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-stats-grid { grid-template-columns: 1fr; }
    .dash-main-grid { grid-template-columns: 1fr; }
    .dash-tools-grid { grid-template-columns: repeat(2, 1fr); }
    .autopost-grid { grid-template-columns: 1fr; }
    .autopost-date-grid { grid-template-columns: 1fr; }
    .users-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .users-filter-bar { gap: 0.3rem; }
    .bulk-toolbar { flex-direction: column; gap: 0.4rem; }
    .massdm-grid { grid-template-columns: 1fr; }
    .massdm-filter-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .help-grid { grid-template-columns: 1fr; }
    .coming-soon-card { padding: 2rem 1.5rem; }
    .ci-profile-grid { flex-direction: column; text-align: center; }
    .mh-folder-grid { grid-template-columns: repeat(2, 1fr); }
    .mh-media-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   GLOBALER ACCOUNT-SWITCHER (Topbar)
   ═══════════════════════════════════════════════════════════ */
.topbar-account-switcher {
    position: relative;
}
.account-switch-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem 0.75rem 0.35rem 0.4rem;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s var(--ease-out);
    white-space: nowrap;
}
.account-switch-btn:hover {
    border-color: rgba(249,115,22,0.25);
    background: rgba(249,115,22,0.06);
}
.account-switch-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(249,115,22,0.3);
    transition: border-color 0.2s;
}
.account-switch-avatar.connected {
    border-color: var(--green);
}
.account-switch-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.account-switch-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}
.account-switch-status {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 400;
}
/* Kept for backward compat */
.account-switch-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--green); }
.account-switch-dot.off { background: #6b7280; }
.account-switch-dot.on { background: var(--green); }

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg3);
    border: 1px solid var(--border-hi);
    border-radius: 12px;
    min-width: 260px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
    z-index: 1000;
    display: none;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.account-dropdown.open {
    display: block;
    animation: fadeIn 0.15s var(--ease-out);
}
.account-dropdown-header {
    padding: 0.65rem 0.85rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}
.account-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    color: var(--text);
    transition: background 0.12s;
}
.account-dropdown-item:hover {
    background: rgba(255,255,255,0.05);
}
.account-dropdown-item.active {
    background: rgba(249,115,22,0.08);
    border-left: 2px solid var(--primary);
}
.dd-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   CREATOR INSIGHTS
   ═══════════════════════════════════════════════════════════ */
.ci-profile-grid {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 0.5rem 0;
}
.ci-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--border);
    overflow: hidden;
}
.ci-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ci-profile-info {
    flex: 1;
    min-width: 0;
}
.ci-display-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}
.ci-username {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}
.ci-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
}
.ci-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.ci-meta-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.ci-meta-item i {
    color: var(--primary);
    font-size: 0.85rem;
}
.ci-mini-stat {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}
.ci-mini-val {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.ci-mini-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════
   MEDIA HUB
   ═══════════════════════════════════════════════════════════ */
.mh-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.mh-folder-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.mh-folder-card:hover {
    border-color: var(--border-hi);
    background: rgba(99, 102, 241, 0.04);
}
.mh-folder-card.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}
.mh-folder-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mh-folder-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.mh-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}
.mh-media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s;
}
.mh-media-item:hover {
    transform: scale(1.03);
    border-color: var(--primary);
}
.mh-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mh-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}
.mh-video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   BUTTON HELPERS
   ═══════════════════════════════════════════════════════════ */
.btn-xs {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS – Tab-System
   ═══════════════════════════════════════════════════════════ */
.settings-tabs {
    display: flex;
    gap: 0.3rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.2rem;
    overflow-x: auto;
    padding-bottom: 0;
}
.settings-tab {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.settings-tab:hover { color: var(--text-dim); }
.settings-tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}
.settings-tab i { font-size: 0.85rem; }

.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; }

.settings-section {
    margin-bottom: 1.5rem;
}
.settings-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}
.settings-row-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.settings-row-value {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.settings-notice {
    background: rgba(249,115,22,0.06);
    border: 1px solid rgba(249,115,22,0.15);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.settings-notice i { font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════
   Discovery UI – Log, Endpoints, Stats
   ═══════════════════════════════════════════════════════ */
.discovery-log-box {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    max-height: 250px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.discovery-log-line {
    white-space: pre-wrap;
    word-break: break-all;
}
.discovery-log-line code {
    color: var(--cyan);
    font-size: inherit;
}
.discovery-log-line strong {
    color: var(--text);
}

.discovery-progress-wrap {
    flex: 1;
    height: 6px;
    background: var(--bg-dark);
    border-radius: 3px;
    overflow: hidden;
    margin-right: 0.5rem;
}
.discovery-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Stats Row */
.discovery-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}
.discovery-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.discovery-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}
.discovery-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Category Cards (collapsible) */
.discovery-category-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.discovery-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
}
.discovery-category-header:hover {
    background: rgba(249,115,22,0.05);
}
.discovery-category-header i:first-child {
    margin-right: 0.4rem;
    color: var(--primary-light);
}
.discovery-chevron {
    transition: transform 0.2s;
    font-size: 0.7rem;
    margin-left: 0.3rem;
    color: var(--text-muted);
}
.discovery-category-card.open .discovery-chevron {
    transform: rotate(180deg);
}
.discovery-category-body {
    display: none;
    padding: 0 0.6rem 0.6rem;
}
.discovery-category-card.open .discovery-category-body {
    display: block;
}

/* Endpoint Rows */
.discovery-endpoint-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.75rem;
}
.discovery-endpoint-row:last-child {
    border-bottom: none;
}
.discovery-method {
    display: inline-block;
    width: 42px;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0;
    border-radius: 4px;
    flex-shrink: 0;
}
.method-get    { background: rgba(34,211,238,0.12); color: #22d3ee; }
.method-post   { background: rgba(52,211,153,0.12); color: #34d399; }
.method-put    { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.method-delete { background: rgba(239,68,68,0.12);   color: #ef4444; }

.discovery-path {
    flex: 1;
    font-size: 0.72rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.discovery-status {
    font-size: 0.68rem;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}
.status-ok   { color: var(--green); }
.status-fail { color: var(--text-muted); }

/* Responsive */
@media (max-width: 640px) {
    .discovery-stats { flex-wrap: wrap; gap: 0.5rem; }
    .discovery-stat { min-width: 60px; }
    .discovery-endpoint-row { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════
   LUXURY ENHANCEMENTS
   ═══════════════════════════════════════════════════════ */

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(249,115,22,0.2); }
::-webkit-scrollbar-corner { background: transparent; }

/* ── Selection ── */
::selection { background: rgba(249,115,22,0.15); color: #fff; }

/* ── Staggered Fade-In for Cards ── */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.16s; }
.card:nth-child(6) { animation-delay: 0.2s; }

/* ── Smooth Page Transition ── */
.page-content { animation: fadeIn 0.3s var(--ease-out); }

/* ── Creator Card Hover Lift ── */
.creator-card {
    transition: all 0.25s var(--ease-out);
}
.creator-card:hover {
    border-color: var(--border-accent) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), 0 0 20px rgba(249,115,22,0.05);
}

/* ── Account Card Hover ── */
.account-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

/* ── Status Dots ── */
.status-dot:not(.off) {
    animation: pulse-accent 2s ease-in-out infinite;
}

/* ── Tooltip Enhancement ── */
[data-bs-toggle="tooltip"] { cursor: help; }
.tooltip-inner {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.72rem;
    box-shadow: var(--shadow-md);
}

/* ── Form Range (Slider) ── */
input[type="range"] {
    accent-color: var(--primary);
}

/* ── Focus Visible Enhancement ── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ════════════════════════════════════════════════════════
   UI POLISH v1.0 — Micro-Interactions & Visual Refinements
   ════════════════════════════════════════════════════════ */

/* ── Skeleton Shimmer Loading ─────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}
.skeleton * { visibility: hidden; }
.skeleton-text {
    display: inline-block;
    height: 0.85em;
    min-width: 60px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    vertical-align: middle;
}
.skeleton-circle {
    border-radius: 50%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ── Sidebar Polish ──────────────────────────────── */
.sidebar-nav {
    scroll-behavior: smooth;
    mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent);
}
.sidebar .nav-link {
    transition: all 0.18s var(--ease-out);
}
.sidebar .nav-link:active {
    transform: scale(0.97);
}
.sidebar .nav-link.active i {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(249,115,22,0.35));
}

/* ── Account Switcher Polish ─────────────────────── */
.account-switch-btn {
    transition: all 0.2s var(--ease-out);
}
.account-switch-btn:active {
    transform: scale(0.97);
}
.account-switch-avatar {
    transition: border-color 0.2s, transform 0.2s var(--ease-out);
}
.account-switch-btn:hover .account-switch-avatar {
    transform: scale(1.05);
}
.account-dropdown.open {
    animation: dropdownSlideIn 0.2s var(--ease-out);
}
@keyframes dropdownSlideIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.account-dropdown-item {
    transition: all 0.12s var(--ease-out);
}
.account-dropdown-item:active {
    transform: scale(0.98);
}

/* ── Compact Stat Strip (Calendar etc.) ──────────── */
.stat-strip {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.stat-strip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(14,16,26,0.55);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.55rem 1rem;
    flex: 1;
    min-width: 0;
    transition: all 0.2s var(--ease-out);
}
.stat-strip-item:hover {
    border-color: rgba(249,115,22,0.12);
}
.stat-strip-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.stat-strip-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    line-height: 1.2;
}
.stat-strip-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}

/* ── Card Hover Micro-Interaction ────────────────── */
.card {
    transition: border-color 0.2s var(--ease-out);
}
.card:hover {
    border-color: rgba(255,255,255,0.08);
}

/* ── Button Press Feedback ───────────────────────── */
.btn:active {
    transform: scale(0.96);
}
.btn {
    transition: all 0.15s var(--ease-out);
}

/* ── Status Dot Pulse ────────────────────────────── */
.status-dot.on {
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
    50% { box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}

/* ── Topbar Badge Polish ─────────────────────────── */
.topbar-badge {
    transition: all 0.2s var(--ease-out);
}
.topbar-badge:hover {
    background: rgba(255,255,255,0.06);
}

/* ── Smooth Page Transitions ─────────────────────── */
.page-content {
    animation: pageIn 0.25s var(--ease-out);
}
@keyframes pageIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Table Row Hover ─────────────────────────────── */
.table tbody tr {
    transition: background 0.12s;
}
.table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* ── Empty State Polish ──────────────────────────── */
.empty-state-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem 1rem;
}

/* ── Tooltip-like Badge ──────────────────────────── */
.tag-soon {
    font-size: 0.5rem;
    background: rgba(249,115,22,0.15);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Scrollbar Fade on Sidebar ───────────────────── */
.sidebar-nav::-webkit-scrollbar-thumb {
    transition: background 0.3s;
}

/* ── Stat Card Number Counter Feel ───────────────── */
.stat-value {
    font-variant-numeric: tabular-nums;
}

/* ── Modal Backdrop Blur ─────────────────────────── */
.modal-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
