/* Variables CSS - Thème DarkRP Ultra Premium */
:root {
    --bg-dark: #07090e;
    --bg-darker: #040508;
    --panel-bg: rgba(15, 17, 26, 0.4);
    --panel-border: rgba(255, 255, 255, 0.08);
    
    --accent-primary: #6366f1; /* Indigo vibrant */
    --accent-secondary: #a855f7; /* Violet néon */
    --accent-glow: rgba(99, 102, 241, 0.5);
    
    --text-main: #f8fafc;
    --text-muted: #64748b;
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.4);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.4);

    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* Empêche le scroll global pour garder un look app native */
}

/* Background animés ou effets lumineux globaux */
body::before {
    content: '';
    position: absolute;
    top: -20%; left: -10%;
    width: 50%; height: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(120px);
    z-index: -1;
    animation: drift 15s infinite alternate ease-in-out;
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%; right: -10%;
    width: 50%; height: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    filter: blur(120px);
    z-index: -1;
    animation: drift 20s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 10%); }
}

/* Particles Canvas */
#particles-dashboard {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Utilitaires */
.text-danger { color: var(--danger); text-shadow: 0 0 10px var(--danger-glow); }
.text-success { color: var(--success); text-shadow: 0 0 10px var(--success-glow); }
.text-muted { color: var(--text-muted); }
.highlight { 
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.3));
}
.mt-4 { margin-top: 1.5rem; }

/* Layout principal */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 10;
}

/* Glassmorphism Extreme */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.glass-panel:hover::before {
    left: 150%;
}

.glass-panel:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Sidebar Ultra Moderne */
.sidebar {
    width: 280px;
    background: rgba(4, 5, 8, 0.7);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--panel-border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    color: var(--text-main);
}
.logo i {
    color: var(--warning);
    font-size: 2.2rem;
    filter: drop-shadow(0 0 12px var(--warning-glow));
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid transparent;
}

.menu-item i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.menu-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(6px);
}

.menu-item.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}
.menu-item.active i {
    color: #fff;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

/* User Profile (Steam) */
.user-profile {
    margin-top: auto;
}
.steam-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(23, 26, 33, 0.8);
    border: 1px solid rgba(42, 71, 94, 0.5);
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.steam-login-btn:hover {
    background: rgba(27, 40, 56, 1);
    box-shadow: 0 0 20px rgba(102, 192, 244, 0.2);
    border-color: #66c0f4;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-bottom: 3rem;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3.5rem;
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(to bottom, rgba(4, 5, 8, 0.9) 0%, transparent 100%);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 24px;
    width: 350px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.search-bar:focus-within {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 20px var(--accent-glow);
    width: 400px;
}
.search-bar i { color: var(--text-muted); font-size: 1.3rem; margin-right: 12px; }
.search-bar input { background: transparent; border: none; color: var(--text-main); outline: none; width: 100%; font-size: 1rem; }

.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 10px 20px;
    border-radius: 24px;
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}
.status-dot {
    width: 10px; height: 10px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tabs System */
.tab-content {
    display: none;
    padding: 0 3.5rem;
    animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.tab-content.active { display: block; }

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.page-header { margin-bottom: 2.5rem; }
.page-header h1 { font-size: 3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.5rem; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.page-header p { color: var(--text-muted); font-size: 1.1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: flex-end; }

/* Dashboard Cards (The "Glow" Effect) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.card {
    padding: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.15); /* Glossy top edge */
}

.card-icon {
    width: 60px; height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}
.card-icon.money { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05)); color: #34d399; border-color: rgba(16, 185, 129, 0.2); box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
.card-icon.time { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05)); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
.card-icon.warn { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05)); color: #f87171; border-color: rgba(239, 68, 68, 0.2); box-shadow: 0 0 20px rgba(239, 68, 68, 0.2); }

.card-info h3 { font-size: 0.95rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.card-info h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }

.dashboard-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}
.detail-box { padding: 1.8rem; border-left: 4px solid var(--accent-secondary); }
.detail-box h3 { font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.detail-box p { font-size: 1.4rem; font-weight: 700; color: #fff; }

/* Stats Charts Layout */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.chart-container { padding: 1.8rem; height: 380px; }
.chart-container h3 { margin-bottom: 1.5rem; font-size: 1.2rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 10px; }
.chart-container h3::before { content: ''; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-primary); box-shadow: 0 0 10px var(--accent-glow); }

/* Custom Tables */
.table-container { width: 100%; overflow-x: auto; padding: 1px; }
.custom-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.custom-table th, .custom-table td { padding: 1.2rem 1.5rem; text-align: left; }
.custom-table th { color: var(--text-muted); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; }
.custom-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.custom-table tbody tr td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.custom-table tbody tr td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
.custom-table tbody tr:hover { background: rgba(255, 255, 255, 0.05); transform: scale(1.005); box-shadow: 0 5px 15px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.05); }
.custom-table td { font-weight: 500; font-size: 1.05rem; }

/* Badges */
.badge { padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; display: inline-block; text-transform: uppercase; letter-spacing: 1px; }
.badge-active { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
.badge-inactive { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }
