/* Variables CSS pour un thème clair épuré par défaut */
:root {
  --bg-color: #f8fafc; /* Slate 50 */
  --panel-bg: rgba(255, 255, 255, 0.75);
  --panel-border: rgba(0, 0, 0, 0.06);
  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #94a3b8; /* Slate 400 */

  /* Palette de couleurs accentuées */
  --primary: #6366f1; /* Indigo 500 */
  --primary-glow: rgba(99, 102, 241, 0.15);
  --secondary: #0ea5e9; /* Sky 500 */
  --secondary-glow: rgba(14, 165, 233, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* Surcharge pour le mode sombre premium */
.dark-theme {
  --bg-color: #05070b;
  --panel-bg: rgba(13, 18, 29, 0.6);
  --panel-border: rgba(255, 255, 255, 0.06);
  --text-primary: #f1f3f9;
  --text-secondary: #8e9bb2;
  --text-muted: #515d74;

  --primary: #7c3aed; /* Violet vibrant */
  --primary-glow: rgba(124, 58, 237, 0.35);
  --secondary: #06b6d4; /* Cyan vibrant */
  --secondary-glow: rgba(6, 182, 212, 0.25);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Arrière-plan magique avec glow violet/cyan */
.glass-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
    #f8fafc;
  transition: background 0.5s ease;
}

.dark-theme .glass-bg {
  background:
    radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    #05070b;
}

/* Utilitaires de masquage */
.hide {
  display: none !important;
}

/* --- BOUTON DE CHANGEMENT DE THÈME GLOBALE --- */
.btn-theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.dark-theme .btn-theme-toggle {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.btn-theme-toggle:hover {
  transform: rotate(30deg) scale(1.1);
  background: var(--text-primary);
  color: var(--bg-color);
}

/* --- ÉCRAN D'AUTHENTIFICATION --- */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  z-index: 1;
}

.auth-card {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.dark-theme .auth-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  font-size: 2.5rem;
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px var(--primary-glow));
  animation: float 4s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.auth-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-header h2 span, .logo-text h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Alert Box */
.alert-box {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.alert-box.success {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Formulaires */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #0f172a;
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Formulaires Dark Mode */
.dark-theme .form-group input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.dark-theme .form-group input:focus {
  background: rgba(124, 58, 237, 0.05);
  box-shadow: 0 0 12px var(--primary-glow);
}

.auth-switch-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.auth-switch-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-switch-text a:hover {
  text-shadow: 0 0 8px var(--primary-glow);
  color: var(--text-primary);
}

/* --- BOUTONS PREMIUM --- */
.btn {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #38bdf8);
  color: white;
  box-shadow: 0 4px 15px var(--secondary-glow);
}

.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
  transform: translateY(-1px);
}

.dark-theme .btn-primary {
  background: linear-gradient(135deg, var(--primary), #a78bfa);
}
.dark-theme .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.55);
}
.dark-theme .btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #22d3ee);
  color: #083344;
}
.dark-theme .btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

/* --- DASHBOARD LAYOUT --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.4s ease;
}

.dark-theme .app-header {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.header-logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-logo p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.accent-text {
  color: var(--primary);
  font-weight: 600;
}

/* User Profile Badge dans Header */
.header-user-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-right: 3.5rem; /* Laisser de la place pour le toggle flottant */
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  border-radius: 50px;
  border: 1px solid var(--panel-border);
  transition: var(--transition);
}

.dark-theme .user-profile {
  background: rgba(255, 255, 255, 0.02);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  text-transform: uppercase;
}

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

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

.user-role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-logout-icon {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-logout-icon:hover {
  background: rgba(239, 68, 68, 0.08);
  transform: scale(1.1);
}

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

/* Grid layout */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.no-gap {
  gap: 1.5rem 0;
}

.span-12 {
  grid-column: span 12;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-5 {
  grid-column: span 5;
}

@media (max-width: 992px) {
  .span-6, .span-7, .span-5 {
    grid-column: span 12;
  }
}

/* --- PANNEAUX DE CONTENU --- */
.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s ease;
}

.dark-theme .panel {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.panel:hover {
  border-color: rgba(0, 0, 0, 0.1);
}

.dark-theme .panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

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

.panel-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.panel-body {
  padding: 1.5rem;
  flex: 1;
}

/* --- METRIQUES EPUREES --- */
.uptime-badge {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--panel-border);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dark-theme .uptime-badge {
  background: rgba(255, 255, 255, 0.03);
}

.metrics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 1.25rem;
}

.mini-metric-card {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
}

.dark-theme .mini-metric-card {
  background: rgba(255, 255, 255, 0.02);
}

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

.metric-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.1rem 0;
}

.metric-info .subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.metric-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* progress ring mini */
.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 150.8;
  stroke-dashoffset: 150.8;
  stroke-linecap: round;
}

.progress-ring__circle-bg {
  stroke: rgba(0, 0, 0, 0.04);
}

.dark-theme .progress-ring__circle-bg {
  stroke: rgba(255, 255, 255, 0.05);
}

.bar-visual {
  width: 70px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 50px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.dark-theme .progress-bar-container {
  background: rgba(255, 255, 255, 0.05);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 50px;
  transition: width 0.5s ease;
}

.icon-visual {
  font-size: 1.8rem;
  opacity: 0.65;
  background: rgba(0, 0, 0, 0.02);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-theme .icon-visual {
  background: rgba(255, 255, 255, 0.03);
}

.db-icon {
  color: var(--primary);
}

.status-online-text {
  color: #059669; /* Emerald 600 */
  font-size: 1.3rem !important;
}

.dark-theme .status-online-text {
  color: var(--success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.text-red {
  color: var(--danger);
}

/* --- SECTION ADMIN --- */
.admin-only-wrapper {
  grid-column: span 12;
}

.badge-count {
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pill-badge {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.scrollable-body {
  max-height: 380px;
  overflow-y: auto;
}

/* Tableaux */
.table-container {
  width: 100%;
}

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

.users-table th, .users-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.dark-theme .users-table th, .dark-theme .users-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.users-table th {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.005);
}

.dark-theme .users-table th {
  background: rgba(255, 255, 255, 0.005);
}

.users-table tr:hover td {
  background: rgba(0, 0, 0, 0.008);
}

.dark-theme .users-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Console SurrealDB */
.console-helper {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.console-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.console-form textarea {
  width: 100%;
  height: 90px;
  background: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: none;
  transition: var(--transition);
}

.dark-theme .console-form textarea {
  background: #030406;
  border: 1px solid var(--panel-border);
}

.console-form textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 10px var(--secondary-glow);
}

.console-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preset-queries {
  display: flex;
  gap: 0.5rem;
}

.btn-preset {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-main);
  transition: var(--transition);
}

.dark-theme .btn-preset {
  background: rgba(255, 255, 255, 0.03);
}

.btn-preset:hover {
  background: var(--text-primary);
  color: var(--bg-color);
}

/* Terminal output style */
.terminal-response {
  margin-top: 1rem;
  border-radius: var(--radius-md);
  background-color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dark-theme .terminal-response {
  background-color: #030406;
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.terminal-titlebar {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dark-theme .terminal-titlebar {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.terminal-titlebar .dot.red { background: var(--danger); }
.terminal-titlebar .dot.yellow { background: var(--warning); }
.terminal-titlebar .dot.green { background: var(--success); }

.terminal-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 0.5rem;
}

.json-viewer {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.dark-theme .json-viewer {
  color: #a5b4fc;
}

/* Console de Logs */
.logs-console {
  background: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  height: 180px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dark-theme .logs-console {
  background: #030406;
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.log-line {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.log-time { color: var(--text-muted); }
.log-level {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}
.level-info { background: rgba(16, 185, 129, 0.12); color: #059669; }
.level-warn { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.level-error { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

.dark-theme .level-info { color: var(--success); }
.dark-theme .level-warn { color: var(--warning); }
.dark-theme .level-error { color: var(--danger); }

.log-msg {
  color: #f1f5f9;
  flex: 1;
}

.log-source {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.logs-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-buttons {
  display: flex;
  background: rgba(0, 0, 0, 0.02);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
}

.dark-theme .filter-buttons {
  background: rgba(255, 255, 255, 0.02);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover { color: var(--text-primary); }
.filter-btn.active {
  background: var(--primary);
  color: white;
}

/* --- SECTION USER STANDARD --- */
.user-only-wrapper {
  grid-column: span 12;
}

.welcome-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.welcome-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.welcome-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 600px;
}

.user-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.stat-widget {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--panel-border);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.dark-theme .stat-widget {
  background: rgba(255, 255, 255, 0.02);
}

.widget-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.text-green { color: #059669; }
.dark-theme .text-green { color: var(--success); }

/* Graphique d'activité standard */
.activity-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
}

.activity-chart-wrapper {
  height: 120px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  overflow: hidden;
}

.dark-theme .activity-chart-wrapper {
  background: rgba(0, 0, 0, 0.2);
}

.activity-chart {
  width: 100%;
  height: 100%;
}

.activity-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-indicator.blue { background: var(--secondary); }
.dot-indicator.green { background: var(--success); }

/* --- FOOTER --- */
.app-footer {
  margin-top: auto;
  padding: 2rem 0 1rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.system-specs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* --- ANIMATIONS --- */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}