/* ==========================================================================
   FRONTIÈRE HUB — CONTROL PANEL DESIGN SYSTEM (NOIR CHILL)
   ========================================================================== */

:root {
    /* Color Tokens (Dark Mode Default) */
    --bg-app: #08090d;
    --bg-sidebar: #0e1017;
    --bg-card: #131520;
    --bg-card-hover: #181b2a;
    --bg-input: #151824;

    /* Accents */
    --blue-primary: #3b82f6;
    --blue-hover: #2563eb;
    --blue-glow: rgba(59, 130, 246, 0.28);
    --blue-light: #93c5fd;

    --emerald-primary: #10b981;
    --gold-primary: #e5c158;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-muted: #8e95a5;
    --text-dim: #5c6275;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-active: rgba(59, 130, 246, 0.45);

    /* Fonts & Radii */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-luxury: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Background Luxury Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(229, 193, 88, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: ambientFloat 25s ease-in-out infinite alternate;
}

@keyframes ambientFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2%, 2%) scale(1.03); }
    100% { transform: translate(2%, -1%) scale(0.98); }
}

/* Light Theme Variables */
body.theme-light {
    --bg-app: #f4f6fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f3f9;
    --bg-input: #e9ecef;
    --blue-primary: #2563eb;
    --blue-hover: #1d4ed8;
    --blue-glow: rgba(37, 99, 235, 0.2);
    --blue-light: #3b82f6;
    --emerald-primary: #10b981;
    --gold-primary: #d97706;
    --text-primary: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.15);
    --border-active: rgba(37, 99, 235, 0.4);
}

/* 1. Theme Dark / Noir Chill (Défaut) */
body.theme-dark {
    --bg-app: #08090d;
    --bg-sidebar: #0e1017;
    --bg-card: #131520;
    --bg-card-hover: #181b2a;
    --bg-input: #151824;
    --blue-primary: #3b82f6;
    --blue-hover: #2563eb;
    --blue-glow: rgba(59, 130, 246, 0.28);
    --blue-light: #93c5fd;
    --emerald-primary: #10b981;
    --gold-primary: #e5c158;
    --text-primary: #ffffff;
    --text-muted: #8e95a5;
    --text-dim: #5c6275;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-active: rgba(59, 130, 246, 0.45);
}

/* 2. Theme OLED Pitch Black */
body.theme-oled {
    --bg-app: #000000;
    --bg-sidebar: #050505;
    --bg-card: #0a0a0a;
    --bg-card-hover: #141414;
    --bg-input: #0f0f0f;
    --blue-primary: #ffffff;
    --blue-hover: #e2e8f0;
    --blue-glow: rgba(255, 255, 255, 0.25);
    --blue-light: #38bdf8;
    --emerald-primary: #10b981;
    --gold-primary: #facc15;
    --text-primary: #ffffff;
    --text-muted: #a1a1aa;
    --text-dim: #52525b;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-medium: rgba(255, 255, 255, 0.2);
    --border-active: rgba(255, 255, 255, 0.6);
}

/* 3. Theme Crimson Blood Moon */
body.theme-crimson {
    --bg-app: #0c0507;
    --bg-sidebar: #14070a;
    --bg-card: #1c0a0e;
    --bg-card-hover: #260f14;
    --bg-input: #1a080c;
    --blue-primary: #ef4444;
    --blue-hover: #dc2626;
    --blue-glow: rgba(239, 68, 68, 0.35);
    --blue-light: #fca5a5;
    --emerald-primary: #10b981;
    --gold-primary: #f59e0b;
    --text-primary: #fff1f2;
    --text-muted: #fda4af;
    --text-dim: #9f1239;
    --border-subtle: rgba(239, 68, 68, 0.14);
    --border-medium: rgba(239, 68, 68, 0.28);
    --border-active: rgba(239, 68, 68, 0.6);
}

/* 4. Theme Cyberpunk Violet / Améthyste */
body.theme-violet {
    --bg-app: #090414;
    --bg-sidebar: #0f0722;
    --bg-card: #170c33;
    --bg-card-hover: #221245;
    --bg-input: #140a2c;
    --blue-primary: #a855f7;
    --blue-hover: #9333ea;
    --blue-glow: rgba(168, 85, 247, 0.35);
    --blue-light: #d8b4fe;
    --emerald-primary: #10b981;
    --gold-primary: #ec4899;
    --text-primary: #faf5ff;
    --text-muted: #c084fc;
    --text-dim: #7e22ce;
    --border-subtle: rgba(168, 85, 247, 0.14);
    --border-medium: rgba(168, 85, 247, 0.28);
    --border-active: rgba(168, 85, 247, 0.6);
}

/* 5. Theme GitHub Dark Dimmed */
body.theme-github {
    --bg-app: #0d1117;
    --bg-sidebar: #161b22;
    --bg-card: #21262d;
    --bg-card-hover: #30363d;
    --bg-input: #161b22;
    --blue-primary: #58a6ff;
    --blue-hover: #388bfd;
    --blue-glow: rgba(88, 166, 255, 0.3);
    --blue-light: #79c0ff;
    --emerald-primary: #3fb950;
    --gold-primary: #d29922;
    --text-primary: #f0f6fc;
    --text-muted: #8b949e;
    --text-dim: #484f58;
    --border-subtle: rgba(240, 246, 252, 0.1);
    --border-medium: rgba(240, 246, 252, 0.2);
    --border-active: rgba(88, 166, 255, 0.55);
}

/* 6. Theme Emerald Matrix */
body.theme-emerald {
    --bg-app: #030e07;
    --bg-sidebar: #06170d;
    --bg-card: #0a2214;
    --bg-card-hover: #0f301d;
    --bg-input: #081d11;
    --blue-primary: #10b981;
    --blue-hover: #059669;
    --blue-glow: rgba(16, 185, 129, 0.35);
    --blue-light: #6ee7b7;
    --emerald-primary: #34d399;
    --gold-primary: #e5c158;
    --text-primary: #ecfdf5;
    --text-muted: #6ee7b7;
    --text-dim: #047857;
    --border-subtle: rgba(16, 185, 129, 0.14);
    --border-medium: rgba(16, 185, 129, 0.28);
    --border-active: rgba(16, 185, 129, 0.6);
}

/* 7. Theme Royal Gold & Caviar */
body.theme-gold {
    --bg-app: #0c0905;
    --bg-sidebar: #140f08;
    --bg-card: #1c150b;
    --bg-card-hover: #271e10;
    --bg-input: #17120a;
    --blue-primary: #e5c158;
    --blue-hover: #ca8a04;
    --blue-glow: rgba(229, 193, 88, 0.35);
    --blue-light: #fef08a;
    --emerald-primary: #10b981;
    --gold-primary: #facc15;
    --text-primary: #fefce8;
    --text-muted: #d4a373;
    --text-dim: #92400e;
    --border-subtle: rgba(229, 193, 88, 0.15);
    --border-medium: rgba(229, 193, 88, 0.3);
    --border-active: rgba(229, 193, 88, 0.65);
}

/* 8. Theme Sakura Midnight */
body.theme-sakura {
    --bg-app: #10060f;
    --bg-sidebar: #170a16;
    --bg-card: #200e1f;
    --bg-card-hover: #2d142b;
    --bg-input: #1a0b19;
    --blue-primary: #f472b6;
    --blue-hover: #ec4899;
    --blue-glow: rgba(244, 114, 182, 0.35);
    --blue-light: #fbcfe8;
    --emerald-primary: #10b981;
    --gold-primary: #fb7185;
    --text-primary: #fdf2f8;
    --text-muted: #f472b6;
    --text-dim: #9d174d;
    --border-subtle: rgba(244, 114, 182, 0.14);
    --border-medium: rgba(244, 114, 182, 0.28);
    --border-active: rgba(244, 114, 182, 0.6);
}

/* 9. Theme Cyber Ice Cyan */
body.theme-cyan {
    --bg-app: #030c14;
    --bg-sidebar: #061422;
    --bg-card: #091e31;
    --bg-card-hover: #0e2942;
    --bg-input: #071929;
    --blue-primary: #06b6d4;
    --blue-hover: #0891b2;
    --blue-glow: rgba(6, 182, 212, 0.35);
    --blue-light: #67e8f9;
    --emerald-primary: #10b981;
    --gold-primary: #38bdf8;
    --text-primary: #ecfeff;
    --text-muted: #67e8f9;
    --text-dim: #0e7490;
    --border-subtle: rgba(6, 182, 212, 0.14);
    --border-medium: rgba(6, 182, 212, 0.28);
    --border-active: rgba(6, 182, 212, 0.6);
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Status Alert */
.status-alert {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

.status-alert.info { background: rgba(59, 130, 246, 0.15); border: 1px solid var(--border-active); color: var(--blue-light); }
.status-alert.success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.status-alert.error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }

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

/* ==========================================================================
   VUE 1 : DEDICATED LOGIN PAGE VIEW (2-COLUMN SPLIT LUXURY)
   ========================================================================== */
.login-view-container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, #0f1322 0%, var(--bg-app) 70%);
    position: relative;
    overflow-y: auto;
    padding: 2rem 1.5rem;
}

.login-bg-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.bg-circles-decorative {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.login-split-card {
    position: relative;
    z-index: 10;
    background: rgba(19, 21, 32, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-medium);
    border-radius: 28px;
    max-width: 1080px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    animation: fadeInScale 0.4s ease-out;
    overflow: hidden;
}

@media (max-width: 900px) {
    .login-split-card {
        grid-template-columns: 1fr;
    }
}

.login-hero-pane {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border-subtle);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

@media (max-width: 900px) {
    .login-hero-pane {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 2rem 1.5rem;
    }
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.brand-emblem-lg {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--border-active);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--blue-glow);
}

.brand-title-lg {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub-lg {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.login-headline {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.65rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-description {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 1.75rem;
}

.login-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.login-feature-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
}

.login-feature-item:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--border-active);
}

.feature-icon-lg {
    font-size: 1.2rem;
    color: var(--blue-primary);
    flex-shrink: 0;
}

.login-feature-item h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-feature-item p {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 1px;
}

/* Right Form Column */
.login-form-pane {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(15, 18, 28, 0.6);
}

@media (max-width: 900px) {
    .login-form-pane {
        padding: 2rem 1.5rem;
    }
}

.form-header-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.form-emblem-small {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--border-active);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.form-pane-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-pane-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.login-action-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    text-align: left;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.85rem 1rem 0.85rem 2.6rem;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font-sans);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.license-key-field {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.btn-toggle-pwd {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.35rem;
    transition: color var(--transition-fast);
}

.btn-toggle-pwd:hover {
    color: var(--text-primary);
}

.login-error-msg {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
}

.btn-license-login {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    transition: all var(--transition-smooth);
    margin-top: 0.35rem;
}

.btn-license-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.6);
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
}

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

.login-footer-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.code-badge {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--blue-light);
}

/* ==========================================================================
   VUE 2 : DASHBOARD CONTROL PANEL (3 COLONNES)
   ========================================================================== */
.panel-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Left Sidebar */
.panel-sidebar {
    width: 270px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-brand {
    padding: 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-emblem {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--border-active);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--blue-glow);
}

.brand-title {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-dim);
}

.sidebar-menu {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.menu-category {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin: 1.25rem 0.5rem 0.5rem 0.5rem;
}

.menu-category:first-child {
    margin-top: 0;
}

.nav-item {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-align: left;
    position: relative;
}

.nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--text-dim);
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(3px);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-item:hover i {
    color: var(--blue-primary);
    transform: scale(1.1);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0.06) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3.5px;
    background: linear-gradient(180deg, var(--blue-light), var(--blue-primary));
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--blue-primary);
}

.nav-item.active i {
    color: var(--blue-light);
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.6));
}

.sidebar-footer {
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-user-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blue-primary);
}

.user-info-sm {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name-sm {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-tag-sm {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.btn-logout-icon {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.35rem;
    border-radius: 6px;
    transition: background var(--transition-fast);
}

.btn-logout-icon:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Center Panel */
.panel-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 2.25rem 2.5rem;
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel-tab-content {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.panel-tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.tab-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tab-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.text-blue { color: var(--blue-primary) !important; }
.text-emerald { color: var(--emerald-primary) !important; }
.text-gold { color: var(--gold-primary) !important; }

/* Search Box */
.search-input-wrapper {
    position: relative;
    width: 280px;
}

.search-input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.9rem;
}

.search-input-wrapper input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-input-wrapper input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

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

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.server-card:hover, .server-card.selected {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.server-card-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.server-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--blue-primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.server-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.server-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-id {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.server-badges {
    display: flex;
    gap: 0.5rem;
}

.badge-owner {
    background: rgba(229, 193, 88, 0.12);
    border: 1px solid rgba(229, 193, 88, 0.3);
    color: var(--gold-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-admin {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-member {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.btn-select-server {
    width: 100%;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-primary);
    border-radius: 10px;
    padding: 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-select-server:hover {
    background: var(--blue-primary);
    color: #ffffff;
}

/* Profile Card */
.profile-card-large {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-header-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.prof-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--blue-primary);
    box-shadow: 0 0 20px var(--blue-glow);
}

.prof-titles h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}

.prof-titles p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--border-active);
    color: var(--blue-primary);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.detail-box {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.detail-key {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.detail-val {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Logs Table */
.logs-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ==========================================================================
   DISCORD SURVEILLANCE & AUDIT LOGS DESIGN SYSTEM
   ========================================================================== */
.discord-live-indicator {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #6ee7b7;
    letter-spacing: 0.05em;
}

.live-radar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald-primary);
    box-shadow: 0 0 10px var(--emerald-primary);
    animation: livePulse 2s infinite ease-in-out;
}

.logs-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.log-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all var(--transition-fast);
}

.log-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.log-kpi-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.log-kpi-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.log-kpi-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.log-kpi-value {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.log-kpi-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.logs-toolbar-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.logs-category-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem;
    border-radius: 12px;
    overflow-x: auto;
}

.log-cat-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.log-cat-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.log-cat-btn.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

.log-badge-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
}

.badge-danger-count {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.logs-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.logs-search-box {
    position: relative;
    flex-grow: 1;
    min-width: 260px;
    max-width: 450px;
}

.logs-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 0.55rem 1rem 0.55rem 2.3rem;
    border-radius: 10px;
    outline: none;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.logs-search-input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.logs-btn-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-live-stream {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.55rem 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-live-stream.active {
    background: rgba(16, 185, 129, 0.22);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.pulse-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 1.8s infinite;
}

.logs-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.logs-rich-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-rich-table th {
    background: rgba(255, 255, 255, 0.025);
    padding: 0.8rem 1rem;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    white-space: nowrap;
}

.logs-rich-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 0.84rem;
}

.logs-rich-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.log-time-chip {
    display: inline-flex;
    flex-direction: column;
}

.log-time-main {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
}

.log-time-sub {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.log-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
}

.cat-messages { background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.35); color: #93c5fd; }
.cat-voice { background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.cat-members { background: rgba(229, 193, 88, 0.14); border: 1px solid rgba(229, 193, 88, 0.35); color: #fef08a; }
.cat-moderation { background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }
.cat-bot { background: rgba(168, 85, 247, 0.14); border: 1px solid rgba(168, 85, 247, 0.35); color: #d8b4fe; }

.log-channel-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    color: var(--text-muted);
}

.log-event-detail-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.log-event-title-line {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.log-event-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.35;
}

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.btn-danger-sm:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

/* ==========================================================================
   RADAR VOCAL EN DIRECT DESIGN SYSTEM
   ========================================================================== */
.radar-tab-filter {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.radar-tab-filter:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.radar-tab-filter.active {
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.18);
}

.voice-radar-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.voice-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.15rem;
}

.radar-loading-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

.voice-room-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.voice-room-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-active);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.voice-room-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.9rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.voice-room-title-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.soundwave-anim {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    flex-shrink: 0;
}

.soundwave-bar {
    width: 3px;
    background: #10b981;
    border-radius: 2px;
    animation: soundwaveBounce 1.2s infinite ease-in-out;
}

.soundwave-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.soundwave-bar:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.soundwave-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.soundwave-bar:nth-child(4) { height: 16px; animation-delay: 0.4s; }

@keyframes soundwaveBounce {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

.voice-room-name {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-room-count-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.voice-room-members-list {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
}

.voice-member-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: all var(--transition-fast);
}

.voice-member-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.voice-member-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.voice-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.voice-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(16, 185, 129, 0.5);
}

.voice-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid var(--bg-card);
}

.voice-member-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.voice-member-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-member-tag {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.voice-status-pills {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.status-pill-speaking {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-pill-mute {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-pill-deaf {
    background: rgba(229, 193, 88, 0.15);
    border: 1px solid rgba(229, 193, 88, 0.35);
    color: #fef08a;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-pill-stream {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #d8b4fe;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Offline Drawer */
.radar-offline-drawer {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.radar-offline-header {
    background: rgba(255, 255, 255, 0.025);
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.radar-offline-header:hover {
    background: rgba(255, 255, 255, 0.045);
}

.offline-title-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: transform var(--transition-fast);
}

.radar-offline-drawer.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.radar-offline-drawer.collapsed .radar-offline-body {
    display: none;
}

.radar-offline-body {
    padding: 1.15rem;
    border-top: 1px solid var(--border-subtle);
}

.radar-offline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.radar-offline-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.radar-offline-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.75;
}

.radar-offline-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats Widgets */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-card-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-widget-icon {
    font-size: 2.2rem;
}

.stat-widget-info {
    display: flex;
    flex-direction: column;
}

.stat-widget-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.stat-widget-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

/* ==========================================================================
   THEME STUDIO & LIVE PREVIEWER
   ========================================================================== */
.theme-live-preview-box {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.theme-live-preview-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-primary), var(--gold-primary), var(--emerald-primary));
}

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

.preview-box-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.preview-status-pill {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.preview-mockup-canvas {
    display: flex;
    background: var(--bg-app);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    gap: 1.25rem;
    align-items: center;
}

.mockup-sidebar-sample {
    width: 140px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mockup-brand-dot {
    width: 24px;
    height: 6px;
    background: var(--blue-primary);
    border-radius: 4px;
    margin-bottom: 0.35rem;
}

.mockup-nav-item {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mockup-nav-item.active {
    background: var(--blue-glow);
    color: var(--blue-light);
    font-weight: 700;
}

.mockup-main-sample {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mockup-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 130px;
}

.mockup-kpi-card.highlight {
    border-color: var(--border-active);
    background: linear-gradient(145deg, var(--blue-glow) 0%, var(--bg-card) 100%);
}

.mockup-kpi-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-dim);
}

.mockup-kpi-val {
    font-size: 1.15rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.mockup-kpi-sub {
    font-size: 0.65rem;
    color: var(--emerald-primary);
}

.mockup-kpi-badge {
    font-size: 0.65rem;
    color: var(--gold-primary);
    font-weight: 700;
}

.mockup-btn-sample {
    background: linear-gradient(135deg, var(--blue-hover) 0%, var(--blue-primary) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--blue-glow);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grille des Thèmes */
.themes-grid-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.luxury-theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transition: all var(--transition-luxury);
    position: relative;
    overflow: hidden;
}

.luxury-theme-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.luxury-theme-card.active {
    border-color: var(--border-active);
    box-shadow: 0 0 20px var(--blue-glow);
}

.theme-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.theme-identity i {
    font-size: 1.2rem;
}

.theme-identity h4 {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.theme-applied-badge {
    display: none;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.luxury-theme-card.active .theme-applied-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.theme-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    min-height: 2.2rem;
}

.theme-swatch-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.swatch-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.theme-card-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.btn-theme-preview {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.btn-theme-preview:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-theme-apply {
    flex: 1;
    background: linear-gradient(135deg, var(--blue-hover) 0%, var(--blue-primary) 100%);
    border: none;
    color: #ffffff;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 4px 12px var(--blue-glow);
    transition: all var(--transition-fast);
}

.btn-theme-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--blue-glow);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.input-group input {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.theme-option {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.theme-option.active {
    border-color: var(--blue-primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-primary);
}

/* Right Preview Aside */
.panel-preview-aside {
    width: 320px;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-subtle);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hide aside on stats/hierarchy tabs */
.panel-layout.aside-hidden .panel-preview-aside {
    width: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    border-left: none;
    pointer-events: none;
}

.panel-layout.aside-hidden .panel-main {
    flex: 1;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.preview-card-body {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.preview-avatar-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-primary) 100%);
    margin-bottom: 1rem;
    box-shadow: 0 0 20px var(--blue-glow);
}

.prev-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #1e1f22;
}

.prev-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.prev-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
    margin-bottom: 1rem;
}

.prev-badge {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-primary);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.prev-divider {
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
    margin: 1.5rem 0;
}

.prev-stats-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.prev-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.prev-stat-item span {
    color: var(--text-muted);
}

.prev-stat-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Animations & Utilities */
.hidden { display: none !important; }

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

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

/* ==========================================================================
   HIERARCHY TAB STYLES
   ========================================================================== */
.hierarchy-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary-sm {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.btn-secondary-sm:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--blue-primary);
}

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

.hierarchy-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.hierarchy-search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.9rem;
    pointer-events: none;
}

.hierarchy-search-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition-fast);
}

.hierarchy-search-input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.hierarchy-stats-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 0.9rem;
    border-radius: 30px;
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.badge-stat strong {
    color: var(--text-primary);
}

.hierarchy-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.25rem 0.25rem 2rem 0.25rem;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}

/* CRITICAL FIX: flex-shrink: 0 prevents flex container from collapsing role blocks to 2px lines */
.hierarchy-role-block {
    flex-shrink: 0;
    min-height: 54px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-fast);
    animation: fadeInUp 0.25s ease-out;
}

.hierarchy-role-block:hover {
    border-color: var(--border-medium);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hierarchy-role-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 54px;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.hierarchy-role-header:hover {
    background: var(--bg-card-hover);
}

.role-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 10px currentColor;
}

.role-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff !important;
    flex: 1;
    letter-spacing: 0.01em;
}

.role-member-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.role-chevron {
    color: var(--text-dim);
    font-size: 0.8rem;
    transition: transform 0.25s ease;
    margin-left: 0.25rem;
}

.hierarchy-role-block.open .role-chevron {
    transform: rotate(90deg);
}

.hierarchy-role-members {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.hierarchy-role-block.open .hierarchy-role-members {
    display: grid;
}

.member-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem 0.5rem 0.5rem;
    transition: var(--transition-fast);
}

.member-chip:hover {
    border-color: var(--blue-primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.member-chip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-medium);
    flex-shrink: 0;
}

.member-chip-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.member-chip-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-chip-tag {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hierarchy-empty-role {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-style: italic;
    padding: 0.4rem 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .panel-preview-aside { display: none; }
}

@media (max-width: 768px) {
    .login-card { padding: 2rem; }
    .login-features-grid { grid-template-columns: 1fr; }
    .panel-layout { flex-direction: column; }
    .panel-sidebar { width: 100%; height: auto; }
    .hierarchy-toolbar { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   FORMULAIRE DE CONNEXION PAR LICENCE LCF
   ========================================================================== */
.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1rem;
    text-align: left;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-icon {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 0.85rem 2.8rem 0.85rem 2.75rem;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.license-key-field {
    font-family: monospace, var(--font-main);
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--blue-primary);
}

.form-input:focus {
    border-color: var(--blue-primary);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.btn-toggle-pwd {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.btn-toggle-pwd:hover {
    color: #ffffff;
}

.login-error-msg {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.btn-license-login {
    width: 100%;
    margin-top: 0.5rem;
}

.code-badge {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.82rem;
}

.font-mono {
    font-family: monospace;
    letter-spacing: 1px;
}

/* ==========================================================================
   ONGLET ADMINISTRATION
   ========================================================================== */
.admin-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group-sm {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group-sm label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input-sm, .form-select-sm {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #ffffff;
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition-fast);
}

.form-input-sm:focus, .form-select-sm:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.btn-primary-sm {
    background: var(--blue-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition-fast);
}

.btn-primary-sm:hover {
    background: var(--blue-hover);
}

.btn-secondary-xs {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary-xs:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-medium);
}

.licenses-table-wrapper {
    overflow-x: auto;
}

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

.licenses-table th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-medium);
}

.licenses-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.badge-role-admin {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-role-agent {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--blue-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.btn-danger-xs {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger-xs:hover {
    background: rgba(239, 68, 68, 0.3);
}

.badge-protected {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
}

.admin-form-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.flex-1 { flex: 1; min-width: 120px; }
.flex-2 { flex: 2; min-width: 200px; }

.form-color-picker {
    height: 38px;
    padding: 2px 4px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

.form-textarea-sm {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 0.88rem;
    outline: none;
    resize: vertical;
    transition: all var(--transition-fast);
}

.form-textarea-sm:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.dm-action-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-gold-sm {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-gold-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.dm-status-msg {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.dm-status-msg.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.dm-status-msg.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dm-status-msg.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   ANALYTICS & STATS GRID
   ========================================================================== */
.analytics-section {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header-row h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.live-pill {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.bg-blue-glow { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.bg-gold-glow { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); }
.bg-emerald-glow { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.bg-indigo-glow { background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(139, 92, 246, 0.3); }

.stat-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-card-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-card-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-card-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.analytics-bars-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bars-grid {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.bar-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bar-labels strong {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}

.progress-bar-fill {
    height: 100%;
    transition: width 0.5s ease-in-out;
}

.fill-gold { background: #f59e0b; }
.fill-blue { background: #3b82f6; }
.fill-emerald { background: #10b981; }

/* ==========================================================================
   RECRUITEMENT & TICKET SYSTEM
   ========================================================================== */
.tickets-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    min-height: 520px;
}

.tickets-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 480px;
}

.ticket-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.ticket-item:hover, .ticket-item.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--blue-primary);
}

.ticket-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem 0;
}

.ticket-chat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ticket-chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
    gap: 0.75rem;
    padding: 4rem 1rem;
}

.placeholder-icon {
    font-size: 3rem;
    color: var(--blue-primary);
    opacity: 0.5;
}

.ticket-chat-active {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
}

.ticket-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.ticket-chat-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ticket-id-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ticket-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-emerald-xs {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-emerald-xs:hover {
    background: rgba(16, 185, 129, 0.3);
}

.ticket-messages-box {
    flex: 1;
    min-height: 340px;
    max-height: 380px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.chat-msg {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.chat-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.chat-msg-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-msg-author {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-msg-time {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.chat-msg-text {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.ticket-send-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-gold-xs {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn-gold-xs:hover {
    background: rgba(245, 158, 11, 0.3);
}

.margin-top-md {
    margin-top: 1.25rem;
}

/* CALENDAR & ABSENCE STYLES */
.calendar-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.calendar-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.form-textarea-sm {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    width: 100%;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.form-textarea-sm:focus {
    outline: none;
    border-color: var(--color-blue);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.event-card-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.event-card-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(30, 41, 59, 0.7);
}

.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.event-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f8fafc;
}

.event-badge-meeting {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-badge-absence {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-details {
    font-size: 0.84rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.event-reason {
    font-size: 0.86rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.2rem;
}

/* INTERACTIVE MONTHLY CALENDAR GRID STYLES */
.calendar-widget-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

.calendar-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-month-title-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.calendar-month-title-wrap h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-meeting {
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.dot-absence {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.calendar-nav-btn-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.5rem;
}

/* Grille des jours du calendrier */
.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    width: 100%;
}

.calendar-day-cell {
    min-height: 82px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all var(--transition-fast);
    position: relative;
}

.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.calendar-day-cell.other-month {
    opacity: 0.22;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.02);
}

.calendar-day-cell.today-cell {
    border-color: var(--blue-primary);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.03) 100%);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.2);
}

.calendar-day-cell.today-cell .day-number {
    color: var(--blue-light);
    font-weight: 800;
}

.day-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    line-height: 1;
}

.day-events-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    flex-grow: 1;
}

.calendar-pill-meeting {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-pill-absence {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   MODULE STATISTIQUES — PREMIUM DESIGN SYSTEM v2
   ========================================================================== */

/* Bandeau des canaux Discord */
.stats-channel-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, rgba(19, 21, 32, 0.85) 0%, rgba(25, 28, 45, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(16px);
}

.channel-badge-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
    transition: all var(--transition-fast);
}

.channel-badge-item:hover {
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.12);
}

.channel-badge-item strong {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.channel-id-tag {
    display: block;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    margin-top: 1px;
}

.channel-badge-item.period-info {
    margin-left: auto;
    background: transparent;
    border-color: transparent;
}

.channel-badge-item .badge-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.status-indicator-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--emerald-primary);
    box-shadow: 0 0 8px var(--emerald-primary);
    animation: livePulse 2s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes livePulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   KPI CARDS GRID
   ========================================================================== */
.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.stat-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.stat-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.stat-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.stat-kpi-card:hover::before {
    opacity: 1;
}

.stat-kpi-card.kpi-highlight-gold {
    border-color: rgba(229, 193, 88, 0.25);
    background: linear-gradient(160deg, rgba(229, 193, 88, 0.06) 0%, var(--bg-card) 50%);
}

.stat-kpi-card.kpi-highlight-gold::before {
    background: linear-gradient(90deg, transparent, rgba(229, 193, 88, 0.5), transparent);
}

.stat-kpi-card.kpi-highlight-emerald {
    border-color: rgba(16, 185, 129, 0.25);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-card) 50%);
}

.stat-kpi-card.kpi-highlight-emerald::before {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
}

.kpi-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.kpi-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.kpi-title {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
}

.kpi-sub {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
    line-height: 1.35;
}

.kpi-champion-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.3rem;
}

.kpi-champ-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
    display: block;
}

.kpi-champion-user h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.1rem;
}

.kpi-badge-gold {
    display: inline-block;
    background: rgba(229, 193, 88, 0.15);
    border: 1px solid rgba(229, 193, 88, 0.3);
    color: var(--gold-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
}

.kpi-badge-emerald {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
}

/* ==========================================================================
   PODIUMS — TOP 3 SHOWCASE (LUXURY GOLD/SILVER/BRONZE)
   ========================================================================== */
.podiums-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

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

.podium-card {
    background: linear-gradient(145deg, rgba(19, 21, 32, 0.95) 0%, rgba(25, 28, 45, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    transition: all var(--transition-smooth);
}

.podium-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.podium-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, rgba(229, 193, 88, 0.6), rgba(59, 130, 246, 0.5), rgba(16, 185, 129, 0.6));
    box-shadow: 0 0 12px rgba(229, 193, 88, 0.4);
}

.podium-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.podium-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.podium-places-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.85rem;
    padding: 1.25rem 0 0.5rem;
}

.podium-place-box {
    flex: 1;
    max-width: 165px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1rem 0.65rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all var(--transition-luxury);
    backdrop-filter: blur(10px);
}

.podium-place-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* 1st place — Luxury Golden Throne */
.podium-place-box.first-place {
    flex: 1.25;
    max-width: 185px;
    background: linear-gradient(175deg, rgba(229, 193, 88, 0.16) 0%, rgba(229, 193, 88, 0.03) 100%);
    border: 1.5px solid rgba(229, 193, 88, 0.6);
    box-shadow: 0 6px 24px rgba(229, 193, 88, 0.18), inset 0 0 20px rgba(229, 193, 88, 0.05);
    padding-bottom: 1.3rem;
    margin-top: -0.6rem;
    animation: goldPulseGlow 4s infinite ease-in-out;
}

@keyframes goldPulseGlow {
    0%, 100% { box-shadow: 0 6px 24px rgba(229, 193, 88, 0.18); }
    50% { box-shadow: 0 8px 32px rgba(229, 193, 88, 0.35); }
}

.podium-place-box.first-place:hover {
    transform: translateY(-6px) scale(1.02);
}

/* 2nd place — Silver */
.podium-place-box.second-place {
    background: linear-gradient(175deg, rgba(203, 213, 225, 0.1) 0%, transparent 100%);
    border: 1px solid rgba(203, 213, 225, 0.3);
}

/* 3rd place — Bronze */
.podium-place-box.third-place {
    background: linear-gradient(175deg, rgba(217, 119, 6, 0.1) 0%, transparent 100%);
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.podium-rank-icon {
    font-size: 1.4rem;
    margin-bottom: 0.15rem;
    line-height: 1;
    display: inline-block;
    animation: floatCrown 3s ease-in-out infinite;
}

@keyframes floatCrown {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(2deg); }
}

.podium-avatar-wrap {
    position: relative;
    margin-bottom: 0.45rem;
}

.podium-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: #1e293b;
    display: block;
    transition: transform var(--transition-fast);
}

.podium-place-box:hover .podium-avatar-img {
    transform: scale(1.06);
}

.podium-place-box.first-place .podium-avatar-img {
    width: 58px;
    height: 58px;
    border: 2.5px solid var(--gold-primary);
    box-shadow: 0 0 16px rgba(229, 193, 88, 0.4);
}

.podium-badge-rank {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.badge-gold { background: linear-gradient(135deg, #fef08a, var(--gold-primary)); }
.badge-silver { background: linear-gradient(135deg, #ffffff, #cbd5e1); }
.badge-bronze { background: linear-gradient(135deg, #fed7aa, #f59e0b); color: #fff; }

.podium-user-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 125px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.1rem;
}

.podium-user-value {
    font-size: 0.92rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #e5c158 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.podium-user-pct {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* ==========================================================================
   SUB-TAB NAVIGATION & SEARCH
   ========================================================================== */
.stats-navigation-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}

.stats-sub-tabs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    padding: 0.3rem;
    border-radius: 12px;
    overflow-x: auto;
}

.stats-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-family: var(--font-sans);
}

.stats-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.stats-tab-btn.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.stats-tab-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.08rem 0.4rem;
    border-radius: 5px;
    min-width: 18px;
    text-align: center;
}

.stats-tab-badge.badge-red {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.stats-search-wrap {
    position: relative;
    min-width: 240px;
    flex-grow: 1;
    max-width: 360px;
}

.stats-search-wrap .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.8rem;
    pointer-events: none;
}

.stats-search-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 0.55rem 1rem 0.55rem 2.3rem;
    border-radius: 10px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-sans);
}

.stats-search-input:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.stats-search-input::placeholder {
    color: var(--text-dim);
}

/* ==========================================================================
   VIEW PANES & TABLE SYSTEM
   ========================================================================== */
.stats-view-pane {
    display: none;
}

.stats-view-pane.active {
    display: block;
    animation: statsFadeIn 0.3s ease-out;
}

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

.stats-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.stats-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.stats-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.stats-custom-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.stats-custom-table th {
    background: rgba(255, 255, 255, 0.025);
    padding: 0.75rem 1rem;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    white-space: nowrap;
}

.stats-custom-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 0.85rem;
}

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

.stats-custom-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.stats-custom-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.012);
}

.stats-custom-table tbody tr:nth-child(even):hover td {
    background: rgba(255, 255, 255, 0.035);
}

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

/* ==========================================================================
   RANK CHIPS & BADGES
   ========================================================================== */
.rank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 30px;
    height: 28px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.78rem;
    font-family: var(--font-heading);
    padding: 0 0.35rem;
}

.rank-chip.rank-gold {
    background: linear-gradient(135deg, rgba(229, 193, 88, 0.25), rgba(229, 193, 88, 0.12));
    border: 1.5px solid rgba(229, 193, 88, 0.55);
    color: var(--gold-primary);
    box-shadow: 0 0 8px rgba(229, 193, 88, 0.2);
}

.rank-chip.rank-gold i {
    font-size: 0.65rem;
}

.rank-chip.rank-silver {
    background: rgba(203, 213, 225, 0.12);
    border: 1.5px solid rgba(203, 213, 225, 0.4);
    color: #cbd5e1;
}

.rank-chip.rank-bronze {
    background: rgba(217, 119, 6, 0.12);
    border: 1.5px solid rgba(217, 119, 6, 0.4);
    color: #f59e0b;
}

.rank-chip.rank-default {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-weight: 700;
}

/* ==========================================================================
   TABLE USER CELLS
   ========================================================================== */
.table-user-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.table-user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e293b;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    display: block;
}

.table-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.table-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-user-tag {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.table-user-tag code {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    color: var(--text-muted);
}

/* ==========================================================================
   ROLE BADGES, PROGRESS BARS & STATUS BADGES
   ========================================================================== */
.table-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

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

.stat-bar-container {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.stat-bar-track {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.stat-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: barShine 3.5s infinite linear;
}

@keyframes barShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fill-blue-stat { background: linear-gradient(90deg, #2563eb, #3b82f6, #93c5fd); box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
.fill-emerald-stat { background: linear-gradient(90deg, #059669, #10b981, #6ee7b7); box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.fill-gold-stat { background: linear-gradient(90deg, #d97706, #e5c158, #fef08a); box-shadow: 0 0 10px rgba(229, 193, 88, 0.4); }

.stat-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--gold-primary);
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(229, 193, 88, 0.3);
}

.stat-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
}

.badge-status-full {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.badge-status-textonly {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.badge-status-vocalonly {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
}

.badge-status-inactive {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* ==========================================================================
   INACTIVE WARNING BANNER
   ========================================================================== */
.inactive-warning-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, rgba(229, 193, 88, 0.06), rgba(229, 193, 88, 0.02));
    border: 1px solid rgba(229, 193, 88, 0.2);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.15rem;
    color: #fef08a;
}

.inactive-warning-banner strong {
    display: block;
    color: var(--gold-primary);
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
}

.inactive-warning-banner p {
    font-size: 0.78rem;
    color: #94a3b8;
}

.margin-top-sm {
    margin-top: 0.75rem;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */
.table-loading-cell {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.table-loading-cell i {
    margin-right: 0.4rem;
}

/* ==========================================================================
   UTILITIES FOR STATISTICS
   ========================================================================== */
.text-gold { color: var(--gold-primary); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* ==========================================================================
   SENTINELLE-IA : DESIGN SYSTEM ASSISTANT INTELLIGENT
   ========================================================================== */
.nav-badge-ai {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #d8b4fe;
    letter-spacing: 0.05em;
}

.pulse-ai-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7;
    animation: livePulse 2s infinite ease-in-out;
}

.ai-chat-interface-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 210px);
    min-height: 520px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.ai-suggestions-row {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    flex-shrink: 0;
}

.ai-suggestions-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ai-suggestions-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.ai-pill-btn {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.ai-pill-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.ai-chat-feed {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ai-chat-feed::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.ai-msg-bubble {
    display: flex;
    gap: 0.85rem;
    max-width: 88%;
    animation: fadeInScale 0.25s ease-out;
}

.ai-msg-bubble.assistant {
    align-self: flex-start;
}

.ai-msg-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-msg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ai-msg-bubble.assistant .ai-msg-avatar {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #d8b4fe;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.25);
}

.ai-msg-bubble.user .ai-msg-avatar {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.ai-msg-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ai-msg-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-author-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-badge-role {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.ai-msg-text {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.ai-msg-bubble.user .ai-msg-text {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(37, 99, 235, 0.18) 100%);
    border-color: rgba(59, 130, 246, 0.35);
    border-top-right-radius: 4px;
}

.ai-msg-bubble.assistant .ai-msg-text {
    border-top-left-radius: 4px;
}

.ai-msg-text h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #d8b4fe;
    margin-bottom: 0.65rem;
    font-family: var(--font-heading);
}

.ai-msg-text h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
}

.ai-msg-text p {
    margin-bottom: 0.5rem;
}

.ai-msg-text ul, .ai-msg-text ol {
    margin-left: 1.25rem;
    margin-bottom: 0.65rem;
}

.ai-msg-text li {
    margin-bottom: 0.35rem;
}

.ai-msg-text blockquote {
    border-left: 3px solid #a855f7;
    background: rgba(168, 85, 247, 0.08);
    padding: 0.5rem 0.85rem;
    border-radius: 0 8px 8px 0;
    margin-top: 0.65rem;
    font-size: 0.82rem;
    color: #e9d5ff;
}

.ai-msg-text code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #93c5fd;
}

.ai-chat-input-bar {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-subtle);
    padding: 0.9rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.ai-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.ai-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    pointer-events: none;
}

#aiUserInput {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 0.75rem 2.6rem 0.75rem 2.6rem;
    border-radius: 12px;
    outline: none;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

#aiUserInput:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.btn-clear-ai {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.35rem;
    transition: color var(--transition-fast);
}

.btn-clear-ai:hover {
    color: #ef4444;
}

.btn-send-ai {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
    transition: all var(--transition-fast);
}

.btn-send-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.5);
}

/* Floating AI Hologram Widget */
.floating-ai-launcher {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #170c33 0%, #090414 100%);
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45), 0 0 16px rgba(99, 102, 241, 0.35);
    transition: all var(--transition-smooth);
    animation: floatBounce 3.5s infinite ease-in-out;
}

.floating-ai-launcher:hover {
    transform: scale(1.1) translateY(-4px);
    border-color: #d8b4fe;
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.65), 0 0 24px rgba(99, 102, 241, 0.5);
}

.ai-sphere-aura {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(168, 85, 247, 0.4);
    animation: rotateAura 8s infinite linear;
    pointer-events: none;
}

@keyframes rotateAura {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.ai-sphere-icon {
    font-size: 1.45rem;
    color: #d8b4fe;
}

.ai-launcher-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(19, 21, 32, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.floating-ai-launcher:hover .ai-launcher-tooltip {
    opacity: 1;
    transform: translateX(0);
}


