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

:root {
    /* Obsidian Cybersecurity & SOC Palette */
    --bg-base: #000000;
    --bg-surface: #07070a;
    --bg-surface-hover: #0d0d12;
    --bg-surface-active: #121218;
    
    /* Sleek Tech Accents */
    --primary: #2563eb; /* Cobalt Blue */
    --primary-hover: #3b82f6;
    --primary-glow: rgba(37, 99, 235, 0.15);
    
    --accent: #06b6d4; /* Cyber Cyan */
    --accent-glow: rgba(6, 182, 212, 0.15);
    
    /* Security Status Indicators */
    --success: #10b981; /* Threat Level: Low / Safe */
    --success-bg: rgba(16, 185, 129, 0.04);
    --success-border: rgba(16, 185, 129, 0.15);
    
    --danger: #ef4444; /* Threat Level: High / Intrusion Alert */
    --danger-bg: rgba(239, 68, 68, 0.04);
    --danger-border: rgba(239, 68, 68, 0.15);
    
    --warning: #f59e0b; /* Threat Level: Medium / Warning */
    --warning-bg: rgba(245, 158, 11, 0.04);
    --warning-border: rgba(245, 158, 11, 0.15);
    
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.04);
    
    /* Fine borders */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-medium: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 255, 255, 0.2);
    
    /* High-fidelity Typography */
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-tertiary: #52525b;
    --text-accent: #38bdf8;
    
    /* Instrument spacing & borders */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 9999px;
    
    /* High performance transitions */
    --transition-fast: 120ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 220ms cubic-bezier(0.16, 1, 0.3, 1);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.7);
    --shadow-laser: 0 0 12px rgba(37, 99, 235, 0.2);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Subtle tech grid background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.85em;
    letter-spacing: -0.01em;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-cyan {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Premium SOC Plates & Cards */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-md);
    background: var(--bg-surface-hover);
}

/* Accent top line for cards in SOC grid */
.glass-card.card-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

/* High-fidelity interactive buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    outline: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-focus);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-focus);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.btn-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

/* Security Forms & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* High precision Custom Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 20px;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-base);
    border: 1px solid var(--border-medium);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.toggle-switch.active {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-switch.active::after {
    transform: translateX(18px);
    background: #ffffff;
}

/* Micro Status Beacons */
.status-online, .status-offline, .status-expired {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-online {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}
.status-online::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: beaconPulse 2s infinite;
}

.status-offline {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}
.status-offline::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

.status-expired {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

@keyframes beaconPulse {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px var(--success); }
    50% { transform: scale(1.2); opacity: 0.7; box-shadow: 0 0 10px var(--success); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px var(--success); }
}

/* Shimmer Skeleton Loaders */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 20%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Security Tables */
.premium-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.premium-table th {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.01);
}

.premium-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

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

.premium-table tbody tr {
    transition: background var(--transition-fast);
}

.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Modal Windows (Floating Panels) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transform: scale(0.97) translateY(10px);
    transition: all var(--transition-base);
}

.modal-backdrop.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

/* Header & Top Bar Navigation */
.app-topbar {
    height: 64px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99;
}

/* Single Page Application Layout */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Precise Command Sidebar */
.app-sidebar {
    width: 250px;
    background: #040406;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.sidebar-brand-icon {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
}

.nav-item i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.nav-item.active i {
    color: var(--text-primary);
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.01);
}

.user-snippet {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-medium);
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-balance {
    font-size: 0.7rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-family: var(--font-mono);
}

/* Content Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.app-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg-base);
}

/* Sections */
.dashboard-section {
    display: none;
    animation: contentFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-section.active {
    display: block;
}

@keyframes contentFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Bot Grid layout */
.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.bot-card-premium {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bot-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bot-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-medium);
    object-fit: cover;
}

.bot-card-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.bot-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.bot-card-actions .btn {
    flex: 1;
    padding: 0.4rem;
    font-size: 0.8rem;
}

/* Modules Config Panels */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.module-card {
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.module-info {
    flex: 1;
}

.module-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.module-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Empty state (0 bots / 0 coins) */
.empty-state {
    max-width: 520px;
    margin: 2rem auto;
    padding: 2rem 1.75rem;
    text-align: center;
}

.empty-state svg {
    width: 56px;
    height: 56px;
    max-width: 56px;
    max-height: 56px;
    margin: 0 auto 1.25rem;
    display: block;
    flex-shrink: 0;
}

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* Landing Specific Styles */
.landing-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.landing-nav-links {
    display: flex;
    gap: 1.5rem;
}

.landing-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.landing-nav-links a:hover {
    color: var(--text-primary);
}

.hero-section {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 0 3rem 0;
    position: relative;
}

.hero-content {
    max-width: 720px;
    text-align: center;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Interactive SVG / Mockup in Hero */
.hero-mockup-container {
    perspective: 1200px;
    margin-top: 4rem;
    width: 100%;
}

.hero-mockup-card {
    background: #050508;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    padding: 0.5rem;
    transform: rotateX(10deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.hero-mockup-card:hover {
    transform: rotateX(0deg) translateY(-8px);
}

.mockup-inner {
    border-radius: var(--radius-md);
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.mockup-header {
    height: 32px;
    background: #08080a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
}

.mockup-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.mockup-title {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    margin-left: auto;
}

.mockup-body {
    padding: 1rem;
    min-height: 250px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Threat visualizer chart mockup */
.threat-canvas {
    border: 1px solid rgba(255,255,255,0.03);
    background: rgba(255,255,255,0.01);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.threat-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-accent);
}

/* Security logs terminal simulator */
.terminal-stream {
    background: #020203;
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #10b981;
    overflow-y: hidden;
    max-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.term-line {
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.term-line.alert {
    color: var(--danger);
}

.term-line.info {
    color: var(--text-accent);
}

/* Modern SLA Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.pricing-card {
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.pricing-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-4px);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 70%), var(--bg-surface);
}

.popular-badge {
    position: absolute;
    top: 12px;
    right: -24px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 2rem;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.pricing-coins {
    font-size: 0.8rem;
    color: var(--text-accent);
    font-family: var(--font-mono);
    margin-top: 0.25rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    line-height: 1;
    color: var(--text-primary);
}

.pricing-price span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex: 1;
}

.pricing-features li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li i {
    width: 14px;
    height: 14px;
    color: var(--success);
}

/* Modern Details Accordion for FAQ */
.faq-container {
    max-width: 680px;
    margin: 4rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-accordion {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-accordion[open] {
    border-color: var(--border-focus);
}

.faq-accordion summary {
    padding: 1rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    user-select: none;
}

.faq-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-accordion summary::after {
    content: '+';
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: transform var(--transition-base);
}

.faq-accordion[open] summary::after {
    transform: rotate(45deg);
    color: var(--text-primary);
}

.faq-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid transparent;
}

.faq-accordion[open] .faq-content {
    border-top-color: rgba(255, 255, 255, 0.02);
}

/* General Layout Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.w-full { width: 100%; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .app-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .nav-item {
        white-space: nowrap;
    }
    
    .sidebar-header, .sidebar-footer {
        display: none;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .app-content {
        padding: 1.25rem;
    }
    
    .mockup-body {
        grid-template-columns: 1fr;
    }
    
    .threat-canvas {
        display: none;
    }
}

/* ---- Bot dashboard v2 ---- */
.app-sidebar {
    overflow-y: auto;
}

.sidebar-nav-group {
    margin: 1rem 0 0.35rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
}

.nav-section-label {
    margin: 1.1rem 0 0.35rem 1rem;
    padding-top: 0.25rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 0.07em;
}

.hub-section-block {
    margin-bottom: 1.75rem;
}

.hub-section-block:last-child {
    margin-bottom: 0;
}

.hub-section-label {
    margin-bottom: 0.75rem;
}

.hub-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.guild-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    flex-wrap: wrap;
}

.guild-bar.hidden {
    display: none;
}

.guild-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.guild-select-wrap {
    flex: 1;
    min-width: 220px;
    max-width: 420px;
}

.guild-select-wrap select {
    width: 100%;
}

.guild-pill-offline {
    font-size: 0.75rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.guild-required-banner {
    padding: 2.5rem;
    text-align: center;
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
}

.guild-required-banner i {
    width: 40px;
    height: 40px;
    color: var(--warning);
    margin-bottom: 0.75rem;
}

.account-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.account-tab-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.account-tab-btn.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--text-primary);
}

.account-pane {
    display: none;
}

.account-pane.active {
    display: block;
}

.premium-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.channel-search {
    position: relative;
}

.channel-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-top: 4px;
    display: none;
}

.channel-search-dropdown.open {
    display: block;
}

.channel-search-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background var(--transition-fast);
}

.channel-search-item:hover,
.channel-search-item.selected {
    background: var(--bg-surface-hover);
}

.embed-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 520px;
}

@media (max-width: 1024px) {
    .embed-workspace {
        grid-template-columns: 1fr;
    }
}

.embed-builder-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.embed-toolbar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.embed-preview-panel {
    padding: 1.5rem;
    background: #313338;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.discord-embed-preview {
    max-width: 432px;
    border-left: 4px solid #5865f2;
    background: #2b2d31;
    border-radius: 0 4px 4px 0;
    padding: 0.65rem 1rem 0.5rem;
    font-size: 0.875rem;
}

.discord-embed-preview .embed-author {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.discord-embed-preview .embed-title {
    font-weight: 600;
    color: #00a8fc;
    margin-bottom: 0.35rem;
}

.discord-embed-preview .embed-desc {
    color: #dbdee1;
    white-space: pre-wrap;
    word-break: break-word;
}

.discord-embed-preview .embed-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.discord-embed-preview .embed-field.full {
    grid-column: 1 / -1;
}

.discord-embed-preview .embed-field-name {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.discord-embed-preview .embed-footer {
    font-size: 0.75rem;
    color: #949ba4;
    margin-top: 0.5rem;
}

/* ——— Inline Discord embed editor (MEE6-style) ——— */
.discord-embed-editor {
    position: relative;
    max-width: 520px;
    font-size: 0.875rem;
}

.discord-embed-editor .embed-color-picker-native {
    position: absolute;
    width: 4px;
    height: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: none;
    padding: 0;
}

.discord-embed-body {
    display: flex;
    background: #2b2d31;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.discord-embed-editor .embed-color-bar {
    width: 4px;
    flex-shrink: 0;
    min-height: 80px;
}

.discord-embed-editor .embed-editor-inner {
    flex: 1;
    padding: 0.65rem 0.85rem 0.55rem;
    min-width: 0;
}

.discord-embed-editor .embed-top-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.discord-embed-editor .embed-main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.discord-embed-editor .embed-author-row,
.discord-embed-editor .embed-footer-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.discord-embed-editor .embed-editable {
    outline: none;
    border-radius: 3px;
    padding: 2px 4px;
    margin: -2px -4px;
    color: #dbdee1;
    word-break: break-word;
    min-height: 1.25em;
}

.discord-embed-editor .embed-editable:focus {
    background: rgba(88, 101, 242, 0.12);
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.35);
}

.discord-embed-editor .embed-editable:empty::before {
    content: attr(data-placeholder);
    color: #72767d;
    pointer-events: none;
}

.discord-embed-editor .embed-author-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.discord-embed-editor .embed-title-editable {
    font-weight: 600;
    font-size: 0.95rem;
    color: #00a8fc;
}

.discord-embed-editor .embed-description {
    color: #dbdee1;
    white-space: pre-wrap;
    line-height: 1.375;
}

.discord-embed-editor .embed-upload-slot {
    border: 2px dashed #4e5058;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #949ba4;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.discord-embed-editor .embed-upload-slot:hover {
    border-color: #5865f2;
    color: #b5bac1;
}

.discord-embed-editor .embed-icon-slot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.discord-embed-editor .embed-icon-slot img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.discord-embed-editor .embed-thumbnail-slot {
    width: 80px;
    height: 80px;
}

.discord-embed-editor .embed-thumbnail-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.discord-embed-editor .embed-image-slot {
    width: 100%;
    min-height: 72px;
    margin-top: 0.35rem;
}

.discord-embed-editor .embed-image-slot img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    object-fit: contain;
}

.discord-embed-editor .embed-upload-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.discord-embed-editor .embed-upload-placeholder svg {
    width: 18px;
    height: 18px;
}

.discord-embed-editor .embed-fields-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.discord-embed-editor .embed-field-row {
    padding: 0.25rem 0;
}

.discord-embed-editor .embed-field-row.full {
    grid-column: 1 / -1;
}

.discord-embed-editor .embed-field-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.15rem;
}

.discord-embed-editor .embed-field-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.8rem;
    color: #fff;
}

.discord-embed-editor .embed-field-value {
    font-size: 0.85rem;
    color: #dbdee1;
}

.discord-embed-editor .embed-field-inline-label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: #949ba4;
    white-space: nowrap;
    cursor: pointer;
}

.discord-embed-editor .embed-field-remove {
    background: transparent;
    border: none;
    color: #ed4245;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.25rem;
    opacity: 0.7;
}

.discord-embed-editor .embed-field-remove:hover {
    opacity: 1;
}

.discord-embed-editor .embed-add-field-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    color: #949ba4;
    background: transparent;
    border: 1px dashed #4e5058;
    border-radius: 4px;
    cursor: pointer;
}

.discord-embed-editor .embed-add-field-btn:hover {
    color: #dbdee1;
    border-color: #5865f2;
}

.discord-embed-editor .embed-footer-text {
    font-size: 0.75rem;
    color: #949ba4;
}

.embed-editor-advanced {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.embed-editor-advanced .form-input {
    font-size: 0.85rem;
}

.embed-workspace-single {
    grid-template-columns: 1fr;
    max-width: 640px;
}

.guild-server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.guild-server-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.guild-server-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.guild-server-card.selected {
    border-color: var(--primary);
    box-shadow: var(--shadow-laser);
}

.guild-server-card img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.autres-subtabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.autres-subtab {
    user-select: none;
    -webkit-user-select: none;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
}

.autres-subtab.active {
    border-color: var(--accent);
    color: var(--text-accent);
    background: var(--accent-glow);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: var(--bg-surface-active);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.tag-chip button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.markdown-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.markdown-hint code {
    font-family: var(--font-mono);
    background: rgba(255,255,255,0.05);
    padding: 1px 4px;
    border-radius: 3px;
}

#tab-hub,
#tab-hub .section-title,
#tab-hub .section-desc,
#tab-hub .hub-module-card,
#tab-hub .module-title,
#tab-hub .module-desc,
#tab-hub .hub-chevron {
    color: #fff;
}

#tab-hub .module-desc,
#tab-hub .hub-chevron {
    color: rgba(255, 255, 255, 0.72);
}

#tab-hub .text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.dashboard-app,
.app-layout {
    user-select: none;
    -webkit-user-select: none;
}

input,
textarea,
select,
[contenteditable="true"],
.form-input,
.premium-picker-search {
    user-select: text;
    -webkit-user-select: text;
}

.hub-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.hub-module-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.hub-module-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hub-module-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hub-chevron {
    margin-left: auto;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.panel-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .panel-layout {
        grid-template-columns: 1fr;
    }
}

.panel-aside {
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.panel-aside-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.variables-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.variables-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.8rem;
}

.var-token {
    font-family: var(--font-mono);
    color: var(--text-accent);
    font-size: 0.75rem;
}

.var-example {
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

.premium-picker {
    position: relative;
}

.premium-picker-trigger {
    text-align: left;
    cursor: pointer;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.premium-picker-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-top: 4px;
    box-shadow: var(--shadow-md);
}

.premium-picker-menu.open {
    display: block;
}

.premium-picker-search {
    margin: 0.5rem;
    width: calc(100% - 1rem);
}

.premium-picker-list {
    max-height: 200px;
    overflow-y: auto;
}

.premium-picker-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.premium-picker-item:hover,
.premium-picker-item.selected {
    background: var(--bg-surface-hover);
}

.premium-picker-empty {
    padding: 0.75rem;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.perm-commands-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: min(70vh, 640px);
    overflow-y: auto;
}

.perm-cmd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.perm-cmd-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 160px;
}

.perm-cmd-name {
    font-weight: 600;
}

.perm-cmd-default {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.perm-cmd-select {
    min-width: 220px;
    max-width: 320px;
    flex: 1;
}

.picker-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.picker-lucide {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.picker-guild-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.picker-guild-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface-active);
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-left: auto;
}

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

.picker-single-guild {
    padding: 0.75rem 1rem;
}

/* ——— Reaction Roles (MEE6-style) ——— */
.rr-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .rr-layout {
        grid-template-columns: 1fr;
    }
}

.rr-sidebar {
    padding: 1rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.rr-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rr-sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0;
}

.rr-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rr-panel-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.rr-panel-item:hover,
.rr-panel-item.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.rr-panel-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.rr-panel-item-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.rr-empty {
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.rr-builder-card {
    padding: 1.25rem 1.5rem;
}

.rr-builder-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.rr-name-input {
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 320px;
    flex: 1;
}

.rr-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rr-builder-grid {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 320px);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .rr-builder-grid {
        grid-template-columns: 1fr;
    }
}

.rr-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.rr-embed-section {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.15);
}

.rr-reactions-section {
    margin-top: 1rem;
}

.rr-mapping-row {
    display: grid;
    grid-template-columns: auto 80px 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.5rem;
}

.rr-mapping-drag {
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
}

.rr-emoji-input {
    text-align: center;
    font-size: 1.25rem;
    padding: 0.35rem;
}

.rr-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.rr-preview-col {
    position: sticky;
    top: 1rem;
}

.rr-preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin: 0 0 0.75rem;
}

.rr-embed-preview {
    background: #313338;
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 120px;
}

.rr-preview-reactions-wrap {
    margin-top: 0.65rem;
}

.rr-preview-reactions-wrap .rr-preview-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #313338;
    border-radius: var(--radius-md);
}

.rr-preview-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 1.1rem;
}

/* ——— Succès (MEE6-style) ——— */
.ach-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .ach-layout {
        grid-template-columns: 1fr;
    }
}

.ach-sidebar {
    padding: 1rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.ach-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ach-sidebar-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0;
}

.ach-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ach-panel-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.ach-panel-item:hover,
.ach-panel-item.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.ach-panel-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.ach-panel-item-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.ach-empty {
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.ach-builder-card {
    padding: 1.25rem 1.5rem;
}

.ach-builder-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.ach-name-input {
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 360px;
    flex: 1;
}

.ach-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ach-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.ach-tiers-section {
    margin-top: 1rem;
}

.ach-tier-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.15);
}

.ach-tier-card.ach-tier-open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.ach-tier-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.ach-tier-label {
    font-weight: 700;
}

.ach-tier-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border-subtle);
}

.ach-rewards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .ach-rewards-grid {
        grid-template-columns: 1fr;
    }
}

.ach-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.text-amber-600 { color: #d97706; }
.text-yellow-500 { color: #eab308; }
.text-cyan-400 { color: #22d3ee; }

.ach-hub-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ach-hub-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.ach-hub-subtab {
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.ach-hub-subtab:hover {
    color: var(--text-primary);
}

.ach-hub-subtab.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}

.ach-create-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ach-create-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    border: 1px dashed var(--border-subtle);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.ach-create-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.ach-create-card h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.ach-create-card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.ach-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.ach-hub-search {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.ach-card {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ach-card:hover {
    border-color: var(--primary);
}

.ach-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.ach-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
}

.ach-card-meta {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 0.2rem;
}

.ach-hex-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.ach-hex {
    width: 28px;
    height: 28px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-tertiary);
}

.ach-hex.unlocked.bronze { background: rgba(217, 119, 6, 0.25); color: #fbbf24; }
.ach-hex.unlocked.silver { background: rgba(156, 163, 175, 0.25); color: #e5e7eb; }
.ach-hex.unlocked.gold { background: rgba(234, 179, 8, 0.25); color: #fde047; }
.ach-hex.unlocked.diamond { background: rgba(34, 211, 238, 0.2); color: #67e8f9; }

.ach-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ach-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    transition: width 0.3s ease;
}

.ach-progress-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.ach-editor-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.ach-editor-back:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

.ach-cmd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.ach-cmd-table th,
.ach-cmd-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.ach-cmd-table th {
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ach-cmd-table code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
}

.log-module-card {
    padding: 1.25rem;
}

.log-module-card--boosts {
    grid-column: 1 / -1;
}

.log-boost-embed-mount .discord-embed-editor {
    max-width: 100%;
}

.log-boost-embed-section .module-desc {
    font-size: 0.8rem;
}

.log-module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.perm-cmd-list {
    max-height: 60vh;
    overflow-y: auto;
}

.perm-cmd-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.embed-workspace-fixed {
    align-items: start;
    max-height: calc(100vh - 180px);
    overflow: hidden;
}

.embed-builder-scroll {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.embed-preview-sticky {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 200px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.embed-preview-inner {
    overflow-y: auto;
    flex: 1;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

/* ——— Niveaux hub (réutilise ach-hub-subtabs) ——— */
.lvl-hub {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ——— Auto-modération (cartes détection type DraftBot) ——— */
.mod-tabs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.mod-tab-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    margin: 0;
}

.mod-tab-info {
    flex: 1;
    min-width: 0;
}

.mod-tab-title {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.mod-tab-desc {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

/* Bot profile editor (Account → Profil) */
.bot-profile-editor {
    position: relative;
}

.bot-profile-banner-wrap {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, #1a1a2e 100%);
    cursor: pointer;
    overflow: hidden;
}

.bot-profile-banner-wrap.bot-profile-banner--empty {
    background: linear-gradient(135deg, #5865f2 0%, #2b2d31 70%);
}

.bot-profile-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bot-profile-banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s;
}

.bot-profile-banner-wrap:hover .bot-profile-banner-overlay {
    opacity: 1;
}

.bot-profile-banner-remove {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff !important;
}

.bot-profile-body {
    position: relative;
    padding: 0 1.5rem 1.5rem;
    margin-top: -48px;
}

.bot-profile-avatar-btn {
    position: relative;
    width: 96px;
    height: 96px;
    padding: 0;
    border: 4px solid var(--bg-surface);
    border-radius: 50%;
    background: var(--bg-elevated);
    cursor: pointer;
    overflow: hidden;
    display: block;
}

.bot-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.bot-profile-avatar-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
}

.bot-profile-avatar-btn:hover .bot-profile-avatar-hover {
    opacity: 1;
}

/* Présence — statuts colorés + activités */
.presence-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
}

.presence-status-opt {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.15s, background 0.15s;
}

.presence-status-opt:hover {
    border-color: var(--primary);
}

.presence-status-opt.active {
    border-color: var(--primary);
    background: rgba(88, 101, 242, 0.12);
}

.presence-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.presence-activities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.presence-activity-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.presence-activity-index {
    width: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.presence-activity-row .pres-activity-input {
    flex: 1;
}
