/* ==========================================================================
   JC-TOOL WEB DASHBOARD — STYLESHEET (Dark Modern Glassmorphism)
   ========================================================================== */

:root {
  /* Palette Principale */
  --bg-dark: #0b0f19;
  --bg-panel: rgba(18, 24, 38, 0.75);
  --bg-panel-hover: rgba(26, 35, 56, 0.85);
  --bg-card: rgba(22, 30, 48, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);
  
  /* Couleurs d'Accents */
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.4);
  --primary-dark: #0284c7;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  /* Textes */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Dimensions & Rayons */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --sidebar-width: 280px;
  --header-height: 72px;
  
  /* Typographies */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Rajdhani', sans-serif;
  --font-code: 'Fira Code', monospace;
  
  /* Ombres */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.25);
}

/* ─── RESET & BASE ───────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.5) 0px, transparent 100%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Barre de défilement personnalisée */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ─── GLASSMORPHISM & UTILITAIRES ────────────────────────────────────────── */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.hidden {
  display: none !important;
}

.accent-text {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── BOUTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: #fff;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.btn-block {
  width: 100%;
}

/* ─── ÉCRAN D'AUTHENTIFICATION (LOGIN) ───────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9), #050811);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), var(--shadow-glow);
  animation: fadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

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

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

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-wrapper input,
.input-group input,
.input-group textarea,
.select-styled {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.input-group input:not(.input-wrapper input),
.input-group textarea,
.select-styled {
  padding-left: 14px;
}

.input-wrapper input:focus,
.input-group input:focus,
.input-group textarea:focus,
.select-styled:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.auth-error-msg {
  padding: 10px 14px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ─── MISE EN PAGE DU DASHBOARD (LAYOUT) ─────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  border-radius: 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
  z-index: 100;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px 8px;
}

.brand-logo-glow {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.brand-text h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.version-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border-radius: 4px;
}

.server-selector-panel {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selector-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.select-server {
  padding: 8px 12px;
  font-size: 0.85rem;
  background: rgba(11, 15, 25, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
}

.select-server option {
  background: #0f172a;
  color: #fff;
}

.server-status-card {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 20px;
}

.status-indicator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}
.status-dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}
.status-dot.offline {
  background: var(--accent-rose);
  box-shadow: 0 0 10px var(--accent-rose);
}

.status-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.server-meta-info {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.meta-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}
.meta-val.highlight {
  color: var(--accent-emerald);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0.03));
  color: var(--primary);
  border-left: 3px solid var(--primary);
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 10px;
}
.nav-badge.pulse {
  background: var(--accent-rose);
  color: #fff;
  animation: pulse 1.5s infinite;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-purple), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.btn-logout:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}
.btn-logout svg {
  width: 20px;
  height: 20px;
}

/* ─── ZONE PRINCIPALE (MAIN CONTENT) ─────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.page-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.ws-indicator.live {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ─── GESTION DES ONGLETS ────────────────────────────────────────────────── */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-pane.active {
  display: block;
}

/* ─── STATS GRID (VUE D'ENSEMBLE) ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.25);
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-wrapper svg {
  width: 26px;
  height: 26px;
}

.stat-icon-wrapper.blue {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
}
.stat-icon-wrapper.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}
.stat-icon-wrapper.gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}
.stat-icon-wrapper.red {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

/* ─── JOUEURS & MODÉRATION (TAB 2) ───────────────────────────────────────── */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  width: 320px;
}
.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}
.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  width: 100%;
}
.search-box input:focus {
  outline: none;
}

.players-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.player-card:hover {
  border-color: var(--primary-glow);
  transform: translateY(-2px);
}

.player-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-skin-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  flex-shrink: 0;
}

.player-header-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.player-header-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.player-colony-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 2px;
  width: fit-content;
}

.player-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: var(--radius-sm);
}

.player-stat-col {
  display: flex;
  flex-direction: column;
}

.stat-p-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.stat-p-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-code);
}

.hp-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.hp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #10b981);
  transition: width 0.3s ease;
}

.player-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── TCHAT EN DIRECT (TAB 3) ────────────────────────────────────────────── */
.chat-layout {
  height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.chat-channel-tabs {
  display: flex;
  gap: 8px;
}

.channel-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.channel-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary-glow);
  color: var(--primary);
}

.chat-messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

.chat-badge-channel {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.chat-badge-channel.public {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
}
.chat-badge-channel.colony {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.chat-msg-content {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  max-width: 80%;
}

.chat-msg-sender {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 2px;
}

.chat-msg-text {
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-msg-time {
  font-size: 0.7rem;
  color: var(--text-dim);
  align-self: flex-end;
  margin-top: 4px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.6);
}

.chat-sender-tag {
  padding: 8px 12px;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
}
.chat-input-bar input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ─── TERMINAL CONSOLE (TAB 4) ───────────────────────────────────────────── */
.terminal-panel {
  height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(5, 8, 17, 0.9);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #eab308; }
.term-dot.green { background: #22c55e; }

.terminal-output {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: var(--font-code);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.term-line {
  line-height: 1.4;
  word-break: break-all;
}
.term-line.info { color: #94a3b8; }
.term-line.warn { color: #facc15; }
.term-line.error { color: #f87171; }

.terminal-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.4);
}

.prompt-symbol {
  font-family: var(--font-code);
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
}

.terminal-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-code);
  font-size: 0.9rem;
}
.terminal-input-bar input:focus {
  outline: none;
}

/* ─── ÉCONOMIE & MARCHÉ (TAB 5) ──────────────────────────────────────────── */
.economy-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.badge-accent {
  padding: 4px 10px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-danger {
  padding: 4px 10px;
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.trade-feed, .death-logs-container, .moderation-logs-container, .activity-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
}

.feed-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ─── KITS GRID (TAB 6) ──────────────────────────────────────────────────── */
.panel-header-bar {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-header-bar .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.kits-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.kit-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kit-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kit-icon {
  width: 44px;
  height: 44px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
}

.kit-title-info h4 {
  font-size: 1rem;
  font-weight: 700;
}
.kit-cooldown {
  font-size: 0.75rem;
  color: var(--accent-amber);
}

/* ─── TÉLÉMÉTRIE (TAB 7) ─────────────────────────────────────────────────── */
.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─── MODALES ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid rgba(56, 189, 248, 0.25);
  animation: fadeInDown 0.3s ease;
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.player-modal-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}

.preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary);
  color: #000;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.radio-pill-group {
  display: flex;
  gap: 8px;
}

.radio-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.radio-pill input {
  display: none;
}
.radio-pill:has(input:checked) {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* ─── FORMATAGE COULEURS MINECRAFT (§ CODES) ─────────────────────────────── */
.mc-black { color: #000000; }
.mc-dark-blue { color: #0000aa; }
.mc-dark-green { color: #00aa00; }
.mc-dark-aqua { color: #00aaaa; }
.mc-dark-red { color: #aa0000; }
.mc-dark-purple { color: #aa00aa; }
.mc-gold { color: #ffaa00; }
.mc-gray { color: #aaaaaa; }
.mc-dark-gray { color: #555555; }
.mc-blue { color: #5555ff; }
.mc-green { color: #55ff55; }
.mc-aqua { color: #55ffff; }
.mc-red { color: #ff5555; }
.mc-light-purple { color: #ff55ff; }
.mc-yellow { color: #ffff55; }
.mc-white { color: #ffffff; }
.mc-bold { font-weight: 700; }
.mc-italic { font-style: italic; }

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-split-grid, .economy-layout, .telemetry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 72px;
    padding: 16px 8px;
  }
  .brand-text, .nav-item span, .nav-badge, .server-status-card, .user-info {
    display: none;
  }
  .main-content {
    margin-left: 72px;
    padding: 16px;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
  }
}
