:root {
    --bg-dark: #121216;
    --bg-panel: #1e1e24;
    --bg-card: #25252d;
    --text-main: #ffffff;
    --text-muted: #8b8b99;
    --accent: #6b4cff;
    --accent-hover: #5438d6;
    --success: #10b981;
    --gold: #f59e0b;
    --border: #2d2d38;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: var(--bg-dark); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: 260px; background-color: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 0; }
.logo { display: flex; align-items: center; padding: 0 20px 30px; gap: 15px; }
.logo img { width: 40px; height: 40px; border-radius: 4px; }
.nav-menu { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 0 10px; }
.nav-item { padding: 12px 20px; border-radius: 8px; color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 15px; transition: 0.3s; }
.nav-item:hover { background-color: var(--bg-card); color: var(--text-main); }
.nav-item.active { background-color: var(--accent); color: white; }

.user-profile { padding: 20px; border-top: 1px solid var(--border); margin: 0 10px; }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background-color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: bold; }
.badge { background-color: rgba(107, 76, 255, 0.2); color: var(--accent); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; border: 1px solid var(--accent); }

/* MAIN CONTENT */
.main-content { flex: 1; overflow-y: auto; padding: 30px; }

/* HEADER */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.header-left h1 { font-size: 1.5rem; margin-bottom: 5px; }
.header-left p { color: var(--text-muted); font-size: 0.9rem; }
.search-bar { background-color: var(--bg-panel); border: 1px solid var(--border); padding: 10px 15px; border-radius: 8px; display: flex; align-items: center; gap: 10px; width: 300px; }
.search-bar input { background: transparent; border: none; color: white; outline: none; width: 100%; }

/* STATS CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background-color: var(--bg-panel); border: 1px solid var(--border); padding: 20px; border-radius: 12px; display: flex; align-items: center; gap: 20px; }
.stat-icon { width: 50px; height: 50px; border-radius: 10px; background-color: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-icon.players { color: #8b5cf6; }
.stat-icon.quests { color: var(--success); }
.stat-icon.coins { color: #f97316; }
.stat-icon.completed { color: #3b82f6; }
.stat-info h3 { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; margin-bottom: 5px; }
.stat-info p { font-size: 1.8rem; font-weight: 600; }
.stat-sub { color: #8b5cf6; font-size: 0.8rem; }

/* TABLES/LISTS GRID */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background-color: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.panel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 600; }

.list-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }

/* Elements spécifiques */
.player-left { display: flex; align-items: center; gap: 15px; }
.player-avatar { width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.player-name { font-weight: 500; }
.player-date { color: var(--text-muted); font-size: 0.8rem; margin-top: 3px; }
.player-right { display: flex; align-items: center; gap: 15px; }
.gold-text { color: var(--gold); font-weight: bold; }

.activity-left { display: flex; align-items: center; gap: 15px; }
.activity-icon { width: 35px; height: 35px; border-radius: 8px; background-color: rgba(16, 185, 129, 0.1); color: var(--success); display: flex; align-items: center; justify-content: center; }

.btn-full { width: 100%; padding: 12px; background-color: var(--bg-card); border: 1px solid var(--border); color: var(--accent); border-radius: 8px; cursor: pointer; font-weight: 600; margin-top: 15px; transition: 0.2s; }
.btn-full:hover { background-color: var(--border); }

/* LOGIN PAGE */
.login-container { background: var(--bg-dark); color: var(--text-main); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; width: 100%; }
.login-box { background: var(--bg-panel); padding: 40px; border-radius: 12px; border-top: 4px solid var(--accent); text-align: center; width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.login-box h2 { color: var(--accent); margin-bottom: 30px; font-size: 1.8rem; font-weight: 700; }
.login-box input { width: 100%; padding: 12px 15px; margin-bottom: 20px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main); outline: none; border-radius: 6px; transition: 0.3s; font-size: 1rem; }
.login-box input:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(107, 76, 255, 0.3); }
.login-box input::placeholder { color: var(--text-muted); }
.login-box button { width: 100%; padding: 13px; background: var(--accent); color: white; border: none; font-weight: bold; cursor: pointer; border-radius: 6px; font-size: 1rem; transition: 0.3s; }
.login-box button:hover { background: var(--accent-hover); }
.login-error { color: #ff6b6b; margin-bottom: 15px; font-size: 0.9rem; background: rgba(255, 107, 107, 0.1); padding: 12px; border: 1px solid #ff6b6b; border-radius: 6px; }

/* PAGES PRINCIPALES */
.card { background-color: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }

/* TABLES */
.cyber-table { width: 100%; border-collapse: collapse; }
.cyber-table thead tr { border-bottom: 2px solid var(--accent); }
.cyber-table th { padding: 15px; text-align: left; color: var(--accent); font-weight: 600; }
.cyber-table td { padding: 12px 15px; border-bottom: 1px solid var(--border); }
.cyber-table tbody tr:hover { background-color: var(--bg-card); }

/* FORMS */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-main); font-weight: 500; }
.form-control { width: 100%; padding: 12px; background-color: var(--bg-card); border: 1px solid var(--border); color: var(--text-main); border-radius: 6px; font-size: 1rem; }
.form-control:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 10px rgba(107, 76, 255, 0.3); }

/* BUTTONS */
.btn { display: inline-block; padding: 10px 15px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; text-decoration: none; transition: 0.3s; }
.btn-primary { background-color: var(--accent); color: white; }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-danger { background-color: #ef4444; color: white; }
.btn-danger:hover { background-color: #dc2626; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar { width: 200px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
}
