/* PSY-Bot v4 — Dashboard CSS */
:root {
    --bg: #0a0a0f;
    --bg2: #0f0f1a;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #7c3aed;
    --accent2: #2563eb;
    --accent-glow: rgba(124, 58, 237, 0.3);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Typography ─────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: #a78bfa; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Navbar ─────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand .logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    -webkit-text-fill-color: white;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.navbar-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}
.navbar-links a:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ── Cards / Glassmorphism ───────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    background: var(--surface-hover);
}

/* ── Hero Section ────────────────────────────────── */
.hero {
    text-align: center;
    padding: 100px 32px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #a78bfa;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Section ─────────────────────────────────────── */
.section {
    padding: 80px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* ── Feature Grid ────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Steps ───────────────────────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    text-align: center;
}

.step {
    position: relative;
    padding: 24px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 auto 16px;
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Pricing ─────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    align-items: start;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: rgba(124, 58, 237, 0.08);
    transform: scale(1.03);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.15);
}

.pricing-card .tier-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-card .price {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.pricing-card .price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin: 16px 0;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    flex-shrink: 0;
}

/* ── Module Toggle Cards ─────────────────────────── */
.module-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all var(--transition);
    border-left: 4px solid var(--border);
}

.module-card.enabled {
    border-left-color: var(--success);
}

.module-card.premium-module {
    border-left-color: var(--warning);
}

.module-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.module-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ── Premium Badge ───────────────────────────────── */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

/* ── Server Cards ────────────────────────────────── */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.server-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.server-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.server-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    object-fit: cover;
}

.server-icon-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 12px;
    color: white;
}

.server-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ── Dashboard Panel ─────────────────────────────── */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 65px);
}

.sidebar {
    width: 240px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    flex-shrink: 0;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}

.sidebar-guild {
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sidebar-guild img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.sidebar-guild .guild-name {
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    list-style: none;
    padding: 0 8px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.sidebar-nav li a:hover {
    background: var(--surface);
    color: var(--text);
}

.sidebar-nav li a.active {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

.panel-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.panel-section {
    display: none;
}
.panel-section.active {
    display: block;
}

.panel-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ── Forms ───────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* ── Status Widget ───────────────────────────────── */
.status-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

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

.status-dot.online { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* ── Logs Table ──────────────────────────────────── */
.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.logs-table th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logs-table tr:hover td {
    background: var(--surface);
}

/* ── Ticket Row ──────────────────────────────────── */
.ticket-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.ticket-status.open { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.ticket-status.claimed { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.ticket-status.closed { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* ── Footer ──────────────────────────────────────── */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 40px 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* ── Alerts ──────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.alert-info { background: rgba(37,99,235,0.1); border: 1px solid rgba(37,99,235,0.3); color: #60a5fa; }

/* ── Loading Spinner ─────────────────────────────── */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 12px 16px; }
    .navbar-links { display: none; }
    .hero { padding: 60px 16px; }
    .section { padding: 48px 16px; }
    .dashboard-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .panel-content { padding: 20px 16px; }
    .pricing-card.featured { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════
   PSY-Bot v5 Additions
   ─────────────────────────────────────────────────── */

/* ── Theme Toggle Button ─────────────────────────── */
.theme-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px 10px;
    margin-left: 8px;
    transition: background 0.2s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.15); }

/* ── Light Mode Overrides ────────────────────────── */
body.light-mode {
    --bg: #f4f4f8;
    --bg-secondary: #ffffff;
    --text: #1a1a2e;
    --text-muted: #4b5563;
    --border: rgba(0,0,0,0.1);
    background: #f4f4f8;
    color: #1a1a2e;
}
body.light-mode .navbar {
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .navbar a { color: #374151; }
body.light-mode .card,
body.light-mode .glass-card,
body.light-mode .panel-card,
body.light-mode .version-card,
body.light-mode .component-row,
body.light-mode .metric-card {
    background: rgba(255,255,255,0.9);
    border-color: rgba(0,0,0,0.08);
    color: #1a1a2e;
}
body.light-mode .sidebar {
    background: rgba(255,255,255,0.95);
    border-right: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .sidebar-link { color: #374151; }
body.light-mode .sidebar-link:hover,
body.light-mode .sidebar-link.active { background: rgba(139,0,255,0.08); color: #7c3aed; }
body.light-mode .section-title,
body.light-mode .version-date,
body.light-mode .subtitle { color: #6b7280; }
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background: #f9fafb;
    border-color: rgba(0,0,0,0.12);
    color: #1a1a2e;
}
body.light-mode .footer { background: #1a1a2e; }
body.light-mode .theme-toggle { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #374151; }

/* ── Onboarding Wizard ───────────────────────────── */
.wizard-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; backdrop-filter: blur(4px);
}
.wizard-modal {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 100%);
    border: 1px solid rgba(192,132,252,0.2);
    border-radius: 20px; padding: 40px;
    width: 100%; max-width: 540px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.wizard-progress-bar {
    height: 4px; background: rgba(255,255,255,0.1);
    border-radius: 2px; margin-bottom: 32px; overflow: hidden;
}
.wizard-progress-fill {
    height: 100%; background: linear-gradient(90deg, #8B00FF, #c084fc);
    border-radius: 2px; transition: width 0.3s ease;
}
.wizard-step-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.wizard-step-desc { color: #9ca3af; margin-bottom: 28px; line-height: 1.6; }
.wizard-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
body.light-mode .wizard-modal { background: #ffffff; border-color: rgba(139,0,255,0.15); }

/* ── Annual billing toggle ───────────────────────── */
.billing-toggle {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 30px; padding: 6px 16px; width: fit-content;
    margin: 0 auto 28px; cursor: pointer;
}
.billing-toggle span { font-size: 0.9rem; color: #9ca3af; }
.billing-toggle span.active { color: #fff; font-weight: 600; }
.save-badge {
    background: rgba(34,197,94,0.15); color: #4ade80;
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 20px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700;
}

/* ── Coupon Input ────────────────────────────────── */
.coupon-row {
    display: flex; gap: 8px; margin-top: 14px;
}
.coupon-badge {
    background: rgba(34,197,94,0.1); color: #4ade80;
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 6px; padding: 4px 10px; font-size: 0.85rem;
}

/* ── Console section ─────────────────────────────── */
.console-output {
    background: #0a0a0f; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 14px; font-family: monospace;
    font-size: 0.82rem; line-height: 1.6; height: 260px;
    overflow-y: auto; color: #a3e635; white-space: pre-wrap;
    word-break: break-all;
}
.console-input-row { display: flex; gap: 8px; margin-top: 10px; }
.console-input-row input { font-family: monospace; flex: 1; }

/* ── Player table ────────────────────────────────── */
.player-table { width: 100%; border-collapse: collapse; }
.player-table th, .player-table td {
    padding: 10px 14px; text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
}
.player-table th { color: #9ca3af; font-weight: 600; }
.player-table tr:hover td { background: rgba(255,255,255,0.02); }
.player-actions { display: flex; gap: 6px; }

/* ── Uptime bar ──────────────────────────────────── */
.navbar .active { color: #c084fc !important; }

/* ═══════════════════════════════════════════════════════
   PSY-Bot v8 — TOP NAV REDESIGN
   ═══════════════════════════════════════════════════════ */

/* TOP NAV */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 16px;
}
.topnav-left { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.topnav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; font-weight: 800;
  color: var(--text); text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.brand-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; -webkit-text-fill-color: initial; }
.guild-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer;
  font-size: 0.9rem; color: var(--text-muted);
  transition: var(--transition);
}
.guild-pill:hover { background: var(--surface-hover); color: var(--text); }
.guild-arrow { font-size: 0.7rem; }
.topnav-tabs { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.topnav-tab {
  padding: 8px 16px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition); text-decoration: none;
  border: 1px solid transparent; background: none;
}
.topnav-tab:hover { background: var(--surface); color: var(--text); }
.topnav-tab.active {
  background: rgba(124,58,237,0.15); color: #c084fc;
  border-color: rgba(124,58,237,0.3);
}
.topnav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* PAGES */
.page-wrapper { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.page { display: none; }
.page.active { display: block; }

/* Hide old sidebar */
.sidebar { display: none !important; }
.dashboard-layout { display: block !important; }
.panel-content { margin: 0 !important; padding: 0 !important; }
.navbar { display: none !important; }

/* IDENTITY CARDS */
.identity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-top: 20px;
}
.identity-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.identity-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.identity-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  flex-shrink: 0;
}
.identity-badge {
  padding: 2px 8px; border-radius: 10px; font-size: 0.75rem;
  background: rgba(124,58,237,0.2); color: #c084fc;
  border: 1px solid rgba(124,58,237,0.3);
}
.identity-field {
  display: flex; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.identity-field:last-child { border-bottom: none; }
.identity-field-label { color: var(--text-muted); }

/* WEBHOOKS */
.webhook-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.webhook-table-wrap { overflow-x: auto; }
.slide-panel {
  position: fixed; right: -440px; top: 0;
  width: 420px; height: 100vh;
  background: var(--bg2); border-left: 1px solid var(--border);
  z-index: 500; transition: right 0.3s ease;
  padding: 24px; overflow-y: auto;
}
.slide-panel.open { right: 0; }
.slide-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 499;
}
.slide-overlay.open { display: block; }

/* USERS */
.user-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px;
}
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; flex-shrink: 0; color: white;
}
.role-badge { padding: 2px 10px; border-radius: 10px; font-size: 0.78rem; font-weight: 600; }
.role-owner { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.role-admin { background: rgba(124,58,237,0.15); color: #c084fc; border: 1px solid rgba(124,58,237,0.3); }
.role-viewer { background: rgba(148,163,184,0.1); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }

/* QUICK ACTION CARDS */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.quick-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  cursor: pointer; transition: var(--transition); text-align: center;
}
.quick-card:hover { background: var(--surface-hover); border-color: var(--accent); transform: translateY(-2px); }
.quick-card-icon { font-size: 2rem; margin-bottom: 8px; }
.quick-card-title { font-weight: 600; font-size: 0.95rem; }
.quick-card-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* LOG CATEGORY TABS (logs page) */
.log-cat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.log-cat-btn {
  padding: 5px 14px; border-radius: 20px; font-size: 0.82rem;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.log-cat-btn.active {
  background: rgba(124,58,237,0.15); color: #c084fc;
  border-color: rgba(124,58,237,0.4);
}
.log-level-info { color: #94a3b8; }
.log-level-warn { color: #fbbf24; }
.log-level-error { color: #f87171; }
.log-level-success { color: #4ade80; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f87171; display: inline-block;
  animation: pulse 1s infinite;
}
.live-dot.active { background: #4ade80; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* TAB BUTTONS (server page) */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.tab-btn:hover { background: var(--surface-hover); color: var(--text); }
.tab-btn.active { background: rgba(124,58,237,0.15); color: #c084fc; border-color: rgba(124,58,237,0.3); }

/* FORM SELECT */
.form-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 6px 10px; font-size: 0.85rem;
}
