/* =====================================================================
   DevHub — DASHBOARD
   Styles de l'espace client / admin (chargé uniquement par dashboard.html,
   après style.css qui fournit les variables de la DA).
   ===================================================================== */

/* ═══════════════════════════════════════
   PAGE ADMIN DASHBOARD — Dark Core
═══════════════════════════════════════ */
.admin-layout {
  display: flex;
  height: calc(100vh - 68px);
  overflow: hidden;
  gap: 0;
}

/* ── Sidebar ── */
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(9, 9, 9, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: fixed;
  top: 68px;
  left: 0;
  height: calc(100vh - 68px);
  box-sizing: border-box;
  overflow: hidden;
  z-index: 100;
}

/* Profil admin dans la sidebar */
.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 8px;
}

.admin-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.admin-profile-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.admin-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.admin-profile-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-profile-role {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Séparateur */
.admin-sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 0 8px;
}

/* Menu nav */
.admin-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  min-height: 0;
}

.admin-sidebar-footer {
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Boutons du menu */
.admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.admin-link.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Bouton déconnexion */
.btn-logout-admin {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid rgba(255, 75, 75, 0.2);
  border-radius: 10px;
  color: rgba(255, 110, 110, 0.75);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}

.btn-logout-admin:hover {
  background: rgba(255, 75, 75, 0.08);
  border-color: rgba(255, 75, 75, 0.4);
  color: #ff7070;
}

/* Zone contenu */
.admin-content {
  flex: 1;
  margin-left: 260px;
  padding: 36px 40px;
  background: transparent;
  color: #ffffff;
  height: calc(100vh - 68px);
  overflow-y: auto;
  box-sizing: border-box;
}

/* ── Page Accueil Admin ── */
.admin-welcome-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-quick-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.admin-quick-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 26px 22px;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-quick-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.07);
}

.admin-quick-icon {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.admin-quick-label {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.admin-quick-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.4;
}

/* Stats Dashboard */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(
    145deg,
    rgba(12, 12, 12, 0.95),
    rgba(25, 25, 25, 0.95)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 25px 30px;
  width: 420px;
  color: #f5f5f5;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  animation: popup-fade 0.3s ease;
}

.modal-content h3 {
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  text-shadow: none;
  letter-spacing: 0.5px;
}

.modal-content label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #8cfce1;
}

.modal-content select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f5f5f5;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.3s, box-shadow 0.3s;
}

.modal-content input {
  width: 94%;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f5f5f5;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.3s, box-shadow 0.3s;
}

.modal-content input:focus,
.modal-content select:focus {
  border-color: #ffffff;
  box-shadow: none;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#cancel-project {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.7);
  color: #ff6666;
  margin-right: 10px;
  box-shadow: 0 0 10px rgba(255, 80, 80, 0.2);
}

#cancel-project:hover {
  background: rgba(255, 80, 80, 0.2);
  transform: translateY(-2px);
}

#save-project {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #ffffff;
  color: #ffffff;
  box-shadow: none;
}

#save-project:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

@keyframes popup-fade {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* grille */
.projects-grid-pretty {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

/* carte */
.project-card-pretty {
  background: #2b2b2b; /* teal sombre */
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  color: #eaf4f4;
}

/* header */
.pc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pc-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pc-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
}

.pc-titles {
  display: flex;
  flex-direction: column;
}

.pc-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.pc-sub {
  margin: 2px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.pc-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

/* En cours */
.pc-badge-yellow {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  border-color: #ffa500;
}

/* Planifié */
.pc-badge-blue {
  background: rgba(164, 12, 211, 0.15);
  color: #a40cd3;
  border-color: #a40cd3;
}

/* Terminé */
.pc-badge-green {
  background: rgba(11, 201, 87, 0.15);
  color: #0bc957;
  border-color: #0bc957;
}

/* Non payé */
.pc-badge-red {
  background: rgba(255, 57, 57, 0.15);
  color: #ff3939;
  border-color: #ff3939;
}

.pc-meta {
  margin-top: 6px;
}

.pc-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.pc-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.pc-label {
  color: #cde3e3;
  opacity: 0.9;
  font-size: 0.9rem;
}

.pc-value {
  text-align: right;
  font-weight: 600;
  font-size: 0.95rem;
}

.pc-row-progress {
  border-bottom: none !important;
}

.pc-progressbar {
  width: 100%;
  background: #242424;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin: 0 0 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-progressfill {
  height: 100%;
  background: #ffffff;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.2);
  transition: width 300ms ease;
}

.pc-date {
  font-weight: 700;
}

.pc-empty {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  color: #cfe8e8;
}

.filter-icon {
  width: 22px;
  height: 22px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.filter-icon:hover {
  transform: scale(1.1);
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-dropdown {
  position: relative;
}

#filter-toggle {
  cursor: pointer;
}

.filter-menu {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background: #2b2b2b; /* même fond que tes cartes */
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  z-index: 10;
  min-width: 160px;
}

.filter-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 0.9rem;
  color: #eaf4f4;
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-menu label:hover {
  color: #ffffff;
}

.filter-menu input[type="checkbox"] {
  accent-color: #ffffff;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-menu.active {
  display: block;
}

/* === GRID STATS === */
.stats-grid-pretty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* === CARD === */
.stat-card-pretty {
  background: #2b2b2b;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between; /* icône à droite */
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-pretty:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.stat-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.stat-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  margin: 0.2rem 0;
}

.stat-label {
  font-size: 1rem;
  color: #d1d5db;
  margin: 0;
}

.stat-info small {
  font-size: 0.85rem;
  font-weight: 500;
  color: #10b981;
}

.stat-info small.negative {
  color: #ef4444;
}

.evo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.evo-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.evo-up {
  color: #22c55e;
}

.evo-down {
  color: #ef4444;
}

.evo-same {
  color: #10b981;
}

.search-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 260px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.modal-content.large {
  width: 900px; /* plus large */
  max-width: 95%;
}

#edit-project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* caché par défaut */
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6); /* fond sombre semi-transparent */
  z-index: 1000;
}

/* Visible quand actif */
#edit-project-modal.active {
  display: flex;
}

#edit-project-modal .modal-content.large {
  background: #2b2b2b; /* même fond que tes autres modals */
  color: #f1f5f9;
  padding: 25px;
  border-radius: 16px;
  width: 900px; /* plus large */
  max-width: 95%;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.3); /* même style que le reste de ton dashboard */
}

/* Layout interne */
.modal-body {
  display: flex;
  gap: 20px;
}

.modal-left,
.modal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-right textarea {
  flex: 1;
  resize: vertical;
  min-height: 200px;
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-right textarea:focus {
  border-color: #ffffff;
  box-shadow: none;
}

/* Conteneur des boutons */
.modal-actions {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
  gap: 16px; /* plus d’espace entre les deux */
}

/* Boutons génériques */
.modal-actions button {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px; /* taille uniforme */
}

/* Bouton annuler */
.modal-actions .btn-cancel {
  background: transparent;
  border-color: #ef4444;
  color: #ef4444;
}

.modal-actions .btn-cancel:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Bouton sauvegarder */
.modal-actions .btn-save {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.3);
}

.modal-actions .btn-save:hover {
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* DASHBOARD — PAGE NON CONNECTÉE */
.discord-login-section {
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  animation: fadeInUp 0.7s ease;
}

.discord-login-section h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #ffffff;
  margin: 0 auto 14px;
  text-align: center;
  font-family: var(--font-body);
}

.discord-login-section p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 auto 44px;
  text-align: center;
  font-family: var(--font-body);
  max-width: 420px;
}

.discord-login-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #ffffff;
  margin-bottom: 14px;
  font-family: var(--font-body);
}

.discord-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.22), rgba(88, 101, 242, 0.12));
  color: #fff;
  border: 1px solid rgba(88, 101, 242, 0.45);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 28px rgba(88, 101, 242, 0.14);
  letter-spacing: 0.2px;
}


.discord-login-btn:hover {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.38), rgba(88, 101, 242, 0.22));
  border-color: rgba(88, 101, 242, 0.7);
  box-shadow: 0 0 45px rgba(88, 101, 242, 0.25);
  transform: translateY(-2px);
}

.dashboard-container {
  padding: 150px 20px;
  text-align: center;
  color: #ffffff;
  animation: fadeInUp 1.5s ease;
  min-height: 50vh;
}

.dashboard-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.4px;
}

.dashboard-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 32px 0;
  font-weight: 400;
}

.dashboard-subtitle {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px 0;
}

/* ═══════════════════════════════════════
   ACCÈS RESTREINT — Dark Core
═══════════════════════════════════════ */
.restricted-section {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.restricted-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 48px 44px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: fadeInUp 0.5s ease;
}

.restricted-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: #ffffff;
}

.restricted-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.4px;
  font-family: var(--font-body);
}

.restricted-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.65;
  margin: 0;
}

.restricted-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 28px 0;
}

.restricted-hint {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.7;
  margin: 0 0 32px 0;
}

.restricted-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.restricted-btn-main {
  display: block;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.18s ease;
}

.restricted-btn-main:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.restricted-btn-secondary {
  display: block;
  padding: 13px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.18s ease;
}

.restricted-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.8);
}

.restricted-logout {
  background: transparent;
  border: none;
  color: rgba(255, 100, 100, 0.5);
  font-size: 12.5px;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.18s ease;
}

.restricted-logout:hover {
  color: #ff7070;
}

/* btn-primary conservé pour autres usages */
.btn-primary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 12px 25px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

/* DASH GESTION ADMIN */
.sidebar {
  width: 240px;
  background-color: #222222;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.sidebar h2 {
  color: #ffffff;
  margin-bottom: 30px;
}
.sidebar a {
  text-decoration: none;
  color: #b9bbbe;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 10px;
  transition: background-color 0.2s, color 0.2s;
}
.sidebar a.active,
.sidebar a:hover {
  background-color: #3a3a3a;
  color: #ffffff;
}
.main {
  flex-grow: 1;
  padding: 30px;
  overflow-y: auto;
}
.heading {
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #ffffff;
}
.form-section {
  background: #3a3a3a;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: #dcddde;
}
.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background: #323232;
  color: #dcddde;
}
.form-group select {
  cursor: pointer;
}
.form-group textarea {
  resize: vertical;
}
body.dashboard button:not(.burger-btn):not(.admin-link):not(.btn-logout-admin):not(.btn-primary):not(.btn-cancel):not(.btn-save):not(.btn-new-client):not(.btn-edit-row):not(.btn-delete-row):not(.btn-cancel-modal):not(.btn-confirm-modal):not(.btn-danger-modal):not(.btn-reinstall-modal):not(.btn-suspend-modal):not(.btn-unsuspend-modal):not(.admin-modal-close):not(.restricted-logout):not(.support-tab-btn):not(.support-chat-send):not(.support-email-action):not(.support-reply-send):not(.support-tag-option):not(.support-request-submit):not(.support-new-btn):not(.embed-tab):not(.btn-embed-primary):not(.btn-embed-secondary):not(.btn-embed-ghost):not(.btn-embed-load-toggle):not(.btn-embed-copy):not(.btn-reset-embed):not(.btn-add-field):not(.btn-remove-field):not([class*="gx-"]) {
  background-color: #ffffff;
  color: #0a0a0a;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s;
}
body.dashboard button:not(.burger-btn):not(.admin-link):not(.btn-logout-admin):not(.btn-primary):not(.btn-cancel):not(.btn-save):not(.btn-new-client):not(.btn-edit-row):not(.btn-delete-row):not(.btn-cancel-modal):not(.btn-confirm-modal):not(.btn-danger-modal):not(.btn-reinstall-modal):not(.btn-suspend-modal):not(.btn-unsuspend-modal):not(.admin-modal-close):not(.restricted-logout):not(.support-tab-btn):not(.support-chat-send):not(.support-email-action):not(.support-reply-send):not(.support-tag-option):not(.support-request-submit):not(.support-new-btn):not(.embed-tab):not(.btn-embed-primary):not(.btn-embed-secondary):not(.btn-embed-ghost):not(.btn-embed-load-toggle):not(.btn-embed-copy):not(.btn-reset-embed):not(.btn-add-field):not(.btn-remove-field):not([class*="gx-"]):hover {
  background-color: #5b6eae;
}
.panel-list {
  margin-bottom: 20px;
}
.panel-item {
  background: #323232;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-item .panel-name {
  flex-grow: 1;
  color: #ffffff;
}
.panel-item button {
  margin-left: 10px;
  font-size: 0.9em;
}

/* ═══════════════════════════════════════
   PAGE CLIENTS — Gestion Pterodactyl
═══════════════════════════════════════ */

/* Toolbar */
.clients-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-new-client {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn-new-client:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

/* Table */
.clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.clients-table thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.clients-table th {
  padding: 10px 14px;
  text-align: left;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.clients-table th:nth-child(3),
.clients-table th:nth-child(4),
.clients-table th:nth-child(5),
.clients-table th:nth-child(6) {
  text-align: center;
  width: 90px;
}

.clients-table td:nth-child(3),
.clients-table td:nth-child(4),
.clients-table td:nth-child(5),
.clients-table td:nth-child(6) {
  width: 90px;
}

.clients-table th:last-child {
  text-align: right;
  width: 190px;
}

.clients-table td:last-child {
  width: 190px;
}

.clients-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  vertical-align: middle;
}

.clients-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.td-user {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.td-username {
  font-weight: 600;
  color: #ffffff;
}

.td-name {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.38);
}

.td-email {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.td-center {
  text-align: center;
}

.td-actions {
  text-align: right;
}

/* Badges */
.badge-on {
  background: rgba(80, 220, 120, 0.12);
  border: 1px solid rgba(80, 220, 120, 0.35);
  color: #50dc78;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-off {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.badge-admin {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* Boutons actions ligne */
.clients-table td:last-child {
  text-align: right;
}

.td-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

/* Bouton modifier ligne */
.btn-edit-row {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
}

.btn-edit-row:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Bouton supprimer ligne */
.btn-delete-row {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255, 75, 75, 0.2);
  border-radius: 8px;
  color: rgba(255, 110, 110, 0.6);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-body);
}

.btn-delete-row:hover {
  background: rgba(255, 75, 75, 0.08);
  border-color: rgba(255, 75, 75, 0.4);
  color: #ff7070;
}

/* ── Badges statut serveur ── */
.srv-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.srv-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.srv-status-active {
  background: rgba(0, 210, 130, 0.12);
  color: #00d282;
  border: 1px solid rgba(0, 210, 130, 0.25);
}
.srv-status-active .srv-status-dot {
  background: #00d282;
  box-shadow: 0 0 6px rgba(0, 210, 130, 0.7);
  animation: srv-pulse-green 2s ease-in-out infinite;
}

.srv-status-suspended {
  background: rgba(255, 70, 70, 0.1);
  color: #ff7070;
  border: 1px solid rgba(255, 70, 70, 0.22);
}
.srv-status-suspended .srv-status-dot {
  background: #ff7070;
}

.srv-status-installing {
  background: rgba(255, 185, 50, 0.1);
  color: #ffb932;
  border: 1px solid rgba(255, 185, 50, 0.22);
}
.srv-status-installing .srv-status-dot {
  background: #ffb932;
  animation: srv-pulse-amber 1.4s ease-in-out infinite;
}

.srv-status-error {
  background: rgba(255, 100, 50, 0.1);
  color: #ff7040;
  border: 1px solid rgba(255, 100, 50, 0.22);
}
.srv-status-error .srv-status-dot {
  background: #ff7040;
}

.srv-status-offline {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.srv-status-offline .srv-status-dot {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes srv-pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(0, 210, 130, 0.7); }
  50% { opacity: 0.5; box-shadow: 0 0 2px rgba(0, 210, 130, 0.2); }
}
@keyframes srv-pulse-amber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* États table */
.clients-loading,
.clients-empty,
.clients-error {
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
}

.clients-error { color: rgba(255, 100, 100, 0.7); }

/* ── Modaux Admin ── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal {
  background: rgba(12, 12, 12, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  width: 460px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: popup-fade 0.22s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.admin-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.admin-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.admin-modal-close:hover {
  background: rgba(255, 75, 75, 0.1);
  color: #ff7070;
}

.admin-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Champs formulaire dans les modaux */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row.two-col {
  flex-direction: row;
  gap: 12px;
}

.form-row.two-col > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row.three-col {
  flex-direction: row;
  gap: 12px;
}

.form-row.three-col > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3px;
}

.form-row .required {
  color: rgba(255, 100, 100, 0.7);
}

.form-row .optional {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}

.form-row input,
.form-row select {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.form-row input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.form-row select option {
  background: #1b1b1b;
  color: rgba(255, 255, 255, 0.85);
}

.form-row select optgroup {
  background: #131313;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.form-row textarea {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13.5px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
}

.form-row textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

.form-row textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Boutons footer modal */
.btn-cancel-modal {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.btn-cancel-modal:hover {
  border-color: rgba(255, 75, 75, 0.4);
  color: #ff7070;
}

.btn-confirm-modal {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.btn-confirm-modal:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

/* Bouton danger (suppression) dans modal */
.btn-danger-modal {
  padding: 10px 24px;
  background: rgba(255, 75, 75, 0.1);
  border: 1px solid rgba(255, 75, 75, 0.35);
  border-radius: 10px;
  color: #ff7070;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}

.btn-danger-modal:hover {
  background: rgba(255, 75, 75, 0.18);
  border-color: rgba(255, 75, 75, 0.6);
  box-shadow: 0 0 16px rgba(255, 75, 75, 0.15);
}

/* Footer modal edit — split gauche/droite */
.srv-edit-footer {
  justify-content: space-between !important;
  align-items: center;
}

.srv-edit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.srv-edit-save {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Bouton Réinstaller */
.btn-reinstall-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: rgba(255, 185, 50, 0.08);
  border: 1px solid rgba(255, 185, 50, 0.3);
  border-radius: 10px;
  color: #ffb932;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}

.btn-reinstall-modal:hover {
  background: rgba(255, 185, 50, 0.15);
  border-color: rgba(255, 185, 50, 0.55);
  box-shadow: 0 0 14px rgba(255, 185, 50, 0.12);
}

/* Bouton Suspendre */
.btn-suspend-modal {
  padding: 9px 16px;
  background: rgba(255, 100, 60, 0.08);
  border: 1px solid rgba(255, 100, 60, 0.28);
  border-radius: 10px;
  color: #ff7048;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}

.btn-suspend-modal:hover {
  background: rgba(255, 100, 60, 0.15);
  border-color: rgba(255, 100, 60, 0.5);
  box-shadow: 0 0 14px rgba(255, 100, 60, 0.12);
}

/* Bouton Réactiver (inverse du suspend) */
.btn-unsuspend-modal {
  padding: 9px 16px;
  background: rgba(0, 210, 130, 0.08);
  border: 1px solid rgba(0, 210, 130, 0.3);
  border-radius: 10px;
  color: #00d282;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-body);
}

.btn-unsuspend-modal:hover {
  background: rgba(0, 210, 130, 0.15);
  border-color: rgba(0, 210, 130, 0.5);
  box-shadow: 0 0 14px rgba(0, 210, 130, 0.12);
}

/* Modal de confirmation compact */
.admin-modal-sm {
  max-width: 400px;
}

.delete-confirm-text {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 10px 0;
}

.delete-confirm-username {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.delete-confirm-warn {
  font-size: 12px;
  color: rgba(255, 110, 110, 0.7);
  margin: 0;
}

/* ═══════════════════════════════════════
   EMBEDS DISCORD — layout tabulé
═══════════════════════════════════════ */
.embed-workspace {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}

/* ── Colonne éditeur ── */
.embed-editor-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Barre d'onglets ── */
.embed-tabs-bar {
  display: flex;
  gap: 2px;
  padding: 10px 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.embed-tabs-bar::-webkit-scrollbar {
  height: 3px;
}

.embed-tabs-bar::-webkit-scrollbar-track {
  background: transparent;
}

.embed-tabs-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.embed-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  position: relative;
  white-space: nowrap;
  font-family: var(--font-body);
}

.embed-tab:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

.embed-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.embed-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ffffff;
  border-radius: 2px 2px 0 0;
}

.embed-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.embed-tab-badge:empty {
  display: none;
}

/* ── Panels des onglets ── */
.embed-tab-panels {
  padding: 18px 18px 0;
}

.embed-tab-panel {
  display: none;
}

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

/* ── Groupes de champs ── */
.embed-field-group {
  margin-bottom: 14px;
}

.embed-field-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 6px;
}

.embed-field-group input,
.embed-field-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #dcddde;
  font-size: 13.5px;
  font-family: var(--font-body);
  transition: border-color 0.15s;
  outline: none;
}

.embed-field-group input:focus,
.embed-field-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.embed-field-group textarea {
  resize: vertical;
  min-height: 80px;
}

.embed-field-group input::placeholder,
.embed-field-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.embed-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.embed-color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.embed-color-row input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 2px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
}

.embed-color-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.embed-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  user-select: none;
}

.embed-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Items de champs dynamiques ── */
.embed-field-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.embed-field-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.embed-field-item-num {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.embed-field-item input,
.embed-field-item textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: #dcddde;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.embed-field-item input:focus,
.embed-field-item textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.embed-field-item input::placeholder,
.embed-field-item textarea::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.embed-field-item textarea {
  resize: vertical;
  min-height: 60px;
}

/* ── Bouton ajouter champ ── */
.btn-add-field {
  display: block;
  width: 100%;
  padding: 9px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}

.btn-add-field:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

/* ── Bouton supprimer champ ── */
.btn-remove-field {
  padding: 4px 8px;
  background: rgba(237, 66, 69, 0.08);
  border: 1px solid rgba(237, 66, 69, 0.2);
  border-radius: 6px;
  color: rgba(237, 66, 69, 0.7);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-remove-field:hover {
  background: rgba(237, 66, 69, 0.18);
  color: #ed4245;
}

/* ── Barre d'action ── */
.embed-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.embed-target-selectors {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.embed-select {
  flex: 1;
  min-width: 0;
  padding: 8px 30px 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  color: #dcddde;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.embed-select option {
  background: #212121;
  color: #dcddde;
}

.embed-select:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.embed-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.embed-action-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-embed-primary {
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-embed-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.btn-embed-primary:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-embed-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-embed-secondary {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-embed-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.btn-reset-embed {
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-reset-embed:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

/* ── Ligne webhook URL ── */
.embed-webhook-row {
  padding: 0 18px 10px;
}

.embed-webhook-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: #dcddde;
  font-size: 12.5px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}

.embed-webhook-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.embed-webhook-input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

/* ── Notification inline ── */
.embed-notify {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 0 18px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  animation: fadeInNotify 0.2s ease;
  flex-wrap: wrap;
}

.embed-notify.hidden {
  display: none;
}

.embed-notify.embed-notify-success {
  background: rgba(87, 242, 135, 0.1);
  border: 1px solid rgba(87, 242, 135, 0.25);
  color: #57f287;
}

.embed-notify.embed-notify-error {
  background: rgba(237, 66, 69, 0.1);
  border: 1px solid rgba(237, 66, 69, 0.25);
  color: #ed4245;
}

.embed-notify.embed-notify-info {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.embed-notify-icon {
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.embed-notify-id {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-left: auto;
}

.embed-notify-id code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 12px;
}

.btn-embed-copy {
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11.5px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-embed-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

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

/* ── Colonne prévisualisation ── */
.embed-preview-col {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.embed-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.embed-preview-label-text {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.35);
}

.btn-embed-load-toggle {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-embed-load-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.embed-load-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}

.embed-load-row.hidden {
  display: none;
}

.embed-load-row input {
  flex: 1;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  color: #dcddde;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  min-width: 0;
  transition: border-color 0.15s;
}

.embed-load-row input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.embed-load-row input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.btn-embed-ghost {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  color: #ffffff;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.btn-embed-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
}

.embed-preview-box {
  padding: 16px;
  background: #3a3a3a;
  min-height: 200px;
}

/* ── Prévisualisation Discord ── */
.discord-embed {
  font-family: "Whitney", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.embed-wrapper {
  background: #323232;
  border-radius: 4px;
  padding: 12px 16px 12px 12px;
  max-width: 520px;
  overflow: hidden;
}

.embed-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.embed-author-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.embed-author-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.embed-title-wrapper {
  margin-bottom: 2px;
}

.embed-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.embed-title-link {
  font-size: 15px;
  font-weight: 700;
  color: #00b0f4;
  text-decoration: none;
}

.embed-title-link:hover {
  text-decoration: underline;
}

.embed-description {
  font-size: 13.5px;
  color: #dcddde;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 4px;
}

.embed-middle {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  align-items: flex-start;
}

.embed-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.embed-field-block {
  flex: 0 0 100%;
}

.embed-field-inline {
  flex: 1;
  min-width: 120px;
}

.embed-field-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.embed-field-value {
  font-size: 12.5px;
  color: #dcddde;
  line-height: 1.4;
}

.embed-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.embed-image {
  width: 100%;
  max-width: 400px;
  border-radius: 4px;
  margin-top: 8px;
  display: block;
}

.embed-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
}

.embed-footer-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .embed-workspace {
    grid-template-columns: 1fr;
  }
  .embed-preview-col {
    position: static;
  }
}

@media (max-width: 640px) {
  .embed-target-selectors {
    flex-direction: column;
  }
  .embed-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .embed-action-btns {
    justify-content: flex-end;
  }
  .embed-field-row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════
   DASHBOARD CLIENT — Fonctionnalités à venir
═══════════════════════════════════════ */
.coming-soon-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  gap: 14px;
}

.coming-soon-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 8px;
}

.coming-soon-label {
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.coming-soon-sub {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.25);
  margin: 0;
  max-width: 340px;
  line-height: 1.6;
}

/* ==================== SUPPORT ==================== */

/* Onglets */
.support-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.support-tab-btn {
  position: relative;
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

/* Badge notif style téléphone sur les onglets */
.tab-notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: #ff4757;
  color: #ffffff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  border: 1.5px solid #0b0b0b;
}

.support-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.support-tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

/* Layout split admin */
.support-layout {
  display: flex;
  height: 620px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

/* Liste des conversations */
.support-convo-list {
  width: 270px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.015);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-convo-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 2px solid transparent;
  transition: background 0.15s;
}

.support-convo-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.support-convo-item.active {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #ffffff;
}

.support-convo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
}

.support-convo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-convo-info {
  flex: 1;
  min-width: 0;
}

.support-convo-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-convo-preview {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.support-convo-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.support-convo-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.22);
}

.support-convo-unread {
  background: #ffffff;
  color: #090909;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* Petite avatar ronde dans le footer des cartes admin */
.support-convo-avatar-sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
}

.support-convo-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-convo-name-sm {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}

/* Zone de chat (admin split + client standalone) */
.support-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.support-chat-container {
  display: flex;
  flex-direction: column;
  height: 540px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.support-chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.18);
  font-size: 13px;
}

.support-chat-header {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.support-chat-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

.support-chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-chat-header-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

/* Messages scrollables */
.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-message {
  display: flex;
  flex-direction: column;
  max-width: 74%;
}

.support-message.from-client {
  align-self: flex-end;
  align-items: flex-end;
}

.support-message.from-admin {
  align-self: flex-start;
  align-items: flex-start;
}

.support-admin-label {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.28);
  margin-bottom: 3px;
  font-weight: 500;
}

.support-bubble {
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

.support-message.from-client .support-bubble {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ddf4ff;
  border-bottom-right-radius: 4px;
}

.support-message.from-admin .support-bubble {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  border-bottom-left-radius: 4px;
}

.support-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 3px;
  padding: 0 2px;
}

/* Input area */
.support-chat-input-area {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

.support-chat-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #ffffff;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  transition: border-color 0.18s;
}

.support-chat-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.support-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.support-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.support-chat-send:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Email list */
.support-email-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-email-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.support-email-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.support-email-card.unread {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  border-left-color: #ffffff;
}

.support-email-card.unread .support-email-from {
  color: #ffffff;
  font-weight: 700;
}

.support-email-card.unread .support-email-subject {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.support-email-card.unread::after {
  content: '';
  position: absolute;
  top: 15px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: none;
}

.support-email-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 12px;
}

.support-email-from {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.support-email-addr {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
  margin-left: 6px;
}

.support-email-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.support-email-subject {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 5px;
}

.support-email-preview {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.support-email-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

/* Notice IMAP non configuré */
.support-imap-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.18);
  border-radius: 12px;
  padding: 16px 20px;
  color: rgba(255, 210, 100, 0.8);
  font-size: 13px;
}

/* États génériques */
.support-loading,
.support-empty,
.support-error {
  padding: 28px 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.22);
  line-height: 1.6;
}

.support-error {
  color: rgba(255, 100, 100, 0.55);
}

/* Actions sur les emails (Répondre / Supprimer) */
.support-email-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.support-email-action {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.support-email-action.reply {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.support-email-action.reply:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}

.support-email-action.delete {
  background: rgba(255, 75, 75, 0.07);
  border: 1px solid rgba(255, 75, 75, 0.18);
  color: rgba(255, 100, 100, 0.75);
}

.support-email-action.delete:hover {
  background: rgba(255, 75, 75, 0.14);
  border-color: rgba(255, 75, 75, 0.35);
}

/* Zone de réponse inline */
.support-reply-area {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-reply-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 12.5px;
  font-family: var(--font-body);
  outline: none;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  transition: border-color 0.18s;
}

.support-reply-textarea:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.support-reply-textarea::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.support-reply-send {
  align-self: flex-end;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.support-reply-send:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Bouton annuler dans zone de réponse email */
.support-email-action.support-reply-cancel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
}

.support-email-action.support-reply-cancel:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Badge notification sur le lien Support de la sidebar */
.sidebar-notif-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ffffff;
  color: #090909;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}

/* Avatars dans les bulles de message (vue admin) */
.support-message.from-other {
  flex-direction: row;
  align-self: flex-start;
  align-items: flex-start;
  gap: 8px;
  max-width: 80%;
}

.support-message.from-self {
  align-self: flex-end;
  align-items: flex-end;
}

.support-bubble-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.support-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 3px;
}

.support-msg-avatar-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ─── Tag badges ─────────────────────────────────────────────── */
.support-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.support-tag-badge.tag-questions {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.support-tag-badge.tag-technique {
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.22);
  color: #f5a623;
}

.support-tag-badge.tag-bug {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.22);
  color: #ff4757;
}

.support-tag-badge.tag-other {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.support-tag-badge.tag-small {
  font-size: 10px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* ─── Formulaire d'ouverture de demande ────────────────────────── */
.support-request-form {
  max-width: 560px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.support-request-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.support-request-header svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.support-request-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
}

.support-request-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  line-height: 1.5;
}

.support-form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.3px;
}

.support-form-required {
  color: #ff4757;
}

/* Sélecteur de catégorie */
.support-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.support-tag-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}

.support-tag-option:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.15);
}

.support-tag-option.active[data-tag="Questions"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.support-tag-option.active[data-tag="Problème technique"] {
  background: rgba(245, 166, 35, 0.1);
  border-color: rgba(245, 166, 35, 0.35);
  color: #f5a623;
}

.support-tag-option.active[data-tag="Signaler un bug"] {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.35);
  color: #ff4757;
}

.support-request-desc {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-family: var(--font-body);
  resize: vertical;
  min-height: 96px;
  box-sizing: border-box;
  transition: border-color 0.18s;
  line-height: 1.55;
}

.support-request-desc:focus {
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
}

.support-request-desc::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.support-request-submit {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%);
  border: none;
  border-radius: 10px;
  color: #090909;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
  transition: opacity 0.15s, box-shadow 0.15s, transform 0.12s;
  margin-top: 4px;
}

.support-request-submit:hover:not(:disabled) {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.support-request-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.support-request-submit:disabled {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
  cursor: not-allowed;
}

/* Barre de ticket dans le chat client */
.support-ticket-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.support-ticket-desc-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.38);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ─── Admin-content en mode support (pas de scroll page) ──────── */
#client-content[data-page="support"] {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── Layout client support deux colonnes ────────────────────── */
.support-client-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

/* Colonne gauche : liste des demandes */
.support-client-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-client-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0 2px;
}

/* Bouton nouvelle demande */
.support-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
}

.support-new-btn:hover {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

/* Conteneur des cartes */
#support-tickets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
}

/* Carte de ticket (liste gauche) */
.support-ticket-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}

.support-ticket-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.18s;
}

.support-ticket-card.active,
.support-ticket-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.support-ticket-card.active {
  border-color: rgba(255, 255, 255, 0.2);
}

.support-ticket-card.active::before {
  background: #ffffff;
}

.support-ticket-card.tag-questions::before  { background: #ffffff; }
.support-ticket-card.tag-technique::before  { background: #f5a623; }
.support-ticket-card.tag-bug::before        { background: #ff4757; }

.support-ticket-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.support-ticket-card-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.support-ticket-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-ticket-card-date {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.22);
}

/* Statut "En cours" */
.support-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-left: auto;
}

.support-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: none;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: none; }
  50%       { opacity: 0.5; box-shadow: none; }
}

/* Statut Traitée — dot vert fixe */
.support-status-dot.treated {
  background: #32cd64;
  box-shadow: 0 0 6px rgba(50, 205, 100, 0.5);
  animation: none;
}

.support-status-badge.treated {
  color: rgba(50, 205, 100, 0.85);
}

/* Carte traitée : légèrement atténuée, barre gauche verte */
.support-ticket-card.status-treated {
  opacity: 0.6;
}
.support-ticket-card.status-treated::before {
  background: rgba(50, 205, 100, 0.4);
}
.support-ticket-card.status-treated.active,
.support-ticket-card.status-treated:hover {
  opacity: 1;
}

/* Séparateur "Demandes traitées" */
.support-treated-separator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 4px;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.22);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.support-treated-separator::before,
.support-treated-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

/* Bouton changement de statut dans le header du chat */
#support-chat .support-status-change-btn {
  -webkit-appearance: none;
  appearance: none;
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 500;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.3);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 4px 10px 4px 8px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  white-space: nowrap;
  line-height: 1;
}
#support-chat .support-status-change-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}
#support-chat .support-status-change-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#support-chat .support-status-change-btn.treated {
  color: rgba(50, 205, 100, 0.55);
  border-color: rgba(50, 205, 100, 0.18);
}
#support-chat .support-status-change-btn.treated:hover {
  color: rgba(50, 205, 100, 0.95);
  border-color: rgba(50, 205, 100, 0.35);
  background: rgba(50, 205, 100, 0.06);
}

/* Alignement avatar dans le footer des cartes */
.support-convo-avatar-sm {
  flex-shrink: 0;
  align-self: center;
}

/* Colonne droite : chat ou formulaire */
.support-client-main {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

/* Placeholder si aucune demande sélectionnée */
.support-client-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.15);
}

.support-client-placeholder svg {
  opacity: 0.25;
}

.support-client-placeholder p {
  font-size: 13px;
  margin: 0;
}

/* ═══════════════════════════════════════
   RESPONSIVE — Tablette & Mobile
═══════════════════════════════════════ */

/* ── Éléments mobiles cachés sur desktop ── */
.admin-mobile-bar    { display: none; }
.sidebar-overlay     { display: none; }
.sidebar-close-btn   { display: none; }

/* ── Barre mobile dashboard ── */
.admin-mobile-bar {
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  background: rgba(9, 9, 9, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  gap: 12px;
}

.admin-mobile-toggle {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
  margin-left: -6px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.admin-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

.admin-mobile-toggle span {
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 2px;
  display: block;
  transition: all 0.25s ease;
}

.admin-mobile-bar-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-mobile-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

/* ── Overlay backdrop ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  animation: overlayIn 0.22s ease;
}

.sidebar-overlay.active {
  display: block;
}

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

/* ── Bouton fermer sidebar ── */
.sidebar-close-btn {
  align-self: flex-end;
  width: 28px;
  height: 28px;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-body);
  transition: color 0.2s, background 0.2s;
  margin-bottom: 10px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-close-btn:hover {
  background: rgba(255, 75, 75, 0.08) !important;
  color: #ff7070;
}

/* ── Tablette / Mobile (≤ 900px) — sidebar off-canvas ── */
@media (max-width: 900px) {
  /* Afficher la barre mobile */
  .admin-mobile-bar {
    display: flex;
  }

  /* Afficher le bouton fermer dans sidebar */
  .sidebar-close-btn {
    display: flex !important;
  }

  /* Layout principal */
  .admin-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 60px);
    overflow: visible;
    position: relative;
  }

  /* Sidebar — off-canvas drawer */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 16px 24px;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 12px 0 50px rgba(0, 0, 0, 0.7);
  }

  /* Nav links — redeviennent verticaux dans le drawer */
  .admin-menu {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 3px;
    overflow-y: visible;
    overflow-x: visible;
    padding-bottom: 4px;
  }

  .admin-link {
    padding: 12px 14px;
    font-size: 13.5px;
    width: 100%;
    flex: none;
  }

  .admin-sidebar-footer {
    padding-top: 12px;
    margin-top: auto;
  }

  .btn-logout-admin {
    width: 100%;
    padding: 11px 14px;
  }

  /* Contenu — pleine largeur */
  .admin-content {
    margin-left: 0;
    width: 100%;
    height: auto;
    min-height: calc(100vh - 112px);
    overflow-y: visible;
    padding: 24px 20px;
  }

  /* Grilles */
  .admin-quick-cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  /* Login / restricted tablette */
  .discord-login-section h1,
  .discord-login-title {
    font-size: 30px;
  }

  .restricted-card {
    max-width: 440px;
  }

  /* Table clients — scroll horizontal */
  #clients-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .clients-table {
    min-width: 640px;
  }

  .clients-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-input {
    width: 100%;
  }

  /* Support client — colonne unique sur mobile */
  .support-client-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .support-client-main {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    min-height: 200px;
  }

  .support-client-placeholder {
    padding: 32px 16px;
  }
}

/* ── Mobile (≤ 540px) ── */
@media (max-width: 540px) {
  .admin-mobile-bar {
    height: 48px;
    padding: 0 12px;
  }

  .admin-mobile-bar-title {
    font-size: 13px;
  }

  .admin-content {
    padding: 18px 14px;
    min-height: calc(100vh - 104px);
  }

  .admin-welcome-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .dashboard-title {
    font-size: 21px;
  }

  .admin-quick-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .admin-quick-card {
    padding: 16px 12px;
  }

  /* Page login non connecté */
  .discord-login-section {
    padding: 50px 18px;
  }

  .discord-login-section h1,
  .discord-login-title {
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  .discord-login-section p {
    font-size: 13.5px;
    margin-bottom: 32px;
  }

  .discord-login-btn {
    padding: 13px 24px;
    font-size: 14px;
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* Restricted card */
  .restricted-card {
    padding: 36px 20px;
  }

  .restricted-title {
    font-size: 22px;
  }

  .restricted-actions {
    gap: 8px;
  }

  /* Modaux — plein écran sur mobile */
  .admin-modal {
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
  }

  .admin-modal-sm {
    max-width: 95vw;
  }

  .admin-modal-body {
    flex-direction: column;
  }

  .form-row.two-col,
  .form-row.three-col {
    flex-direction: column;
    gap: 0;
  }

  /* Support — form moins de padding sur petit écran */
  .support-request-form {
    padding: 16px !important;
  }

  .support-tag-options {
    flex-direction: column;
  }

  .support-tag-option {
    width: 100%;
    justify-content: flex-start;
  }

  /* Bot selector — pleine largeur sur mobile */
  .bot-selector-bar {
    gap: 8px;
  }

  .bot-selector-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 9px 10px;
    font-size: 0.78rem;
  }

  /* Bot card — ajustements mobiles */
  .bot-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .bot-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bot-controls-grid {
    grid-template-columns: 1fr;
  }

  .bot-power-btns {
    flex-direction: column;
    gap: 8px;
  }

  .btn-bot-power {
    padding: 12px;
    font-size: 13px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MON BOT — page client
═══════════════════════════════════════════════════════════════ */

/* ── Sélecteur de bot ─────────────────────────────────────── */
.bot-selector-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bot-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px;
  color: rgba(255,255,255,0.6) !important;
  font-size: 0.82rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  -webkit-appearance: none !important;
  appearance: none !important;
  outline: none;
}

.bot-selector-btn:hover {
  background: rgba(255, 255, 255,0.08) !important;
  border-color: rgba(255, 255, 255,0.25) !important;
  color: #fff !important;
}

.bot-selector-btn.active {
  background: rgba(255, 255, 255,0.12) !important;
  border-color: rgba(255, 255, 255,0.4) !important;
  color: #ffffff !important;
}

.bot-sel-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.bot-sel-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255,0.15);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Carte en-tête du bot ─────────────────────────────────── */
.bot-main-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  flex-wrap: wrap;
}

.bot-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.bot-main-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
}

.bot-main-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255,0.12);
  border: 2px solid rgba(255, 255, 255,0.25);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
}

/* Pastille de présence sur l'avatar */
.bot-presence-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #161616;
}

.bot-card-info {
  flex: 1;
  min-width: 0;
}

.bot-card-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-card-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.bot-activity-preview {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.bot-card-meta {
  margin-left: auto;
}

.bot-last-ping {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

/* ── Statuts couleurs ─────────────────────────────────────── */
.status-online   { background: #3ba55d; }
.status-idle     { background: #faa81a; }
.status-dnd      { background: #ed4245; }
.status-invisible,
.status-offline  { background: rgba(255,255,255,0.2); }
.status-streaming { background: #593695; }

.bot-status-badge.status-online   { background: rgba(59,165,93,0.15);  color: #3ba55d;  }
.bot-status-badge.status-idle     { background: rgba(250,168,26,0.15); color: #faa81a; }
.bot-status-badge.status-dnd      { background: rgba(237,66,69,0.15);  color: #ed4245; }
.bot-status-badge.status-invisible,
.bot-status-badge.status-offline  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.4); }

/* ── Stats grid ───────────────────────────────────────────── */
.bot-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.bot-stat-card {
  padding: 20px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.bot-stat-card:hover {
  background: rgba(255, 255, 255,0.05);
  border-color: rgba(255, 255, 255,0.2);
}

.bot-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.bot-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Contrôles grid ───────────────────────────────────────── */
.bot-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.bot-control-panel {
  padding: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bot-control-panel-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.4);
}

/* Status options */
.bot-status-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bot-status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.87rem;
  color: rgba(255,255,255,0.6);
  border: 1px solid transparent;
  transition: all 0.15s;
  user-select: none;
}

.bot-status-option:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.bot-status-option.selected {
  background: rgba(255, 255, 255,0.08);
  border-color: rgba(255, 255, 255,0.25);
  color: #fff;
}

.bot-status-dot-sm {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Activity row */
.bot-activity-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-activity-select {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.87rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
}

.bot-activity-select:focus {
  border-color: rgba(255, 255, 255,0.4);
}

.bot-activity-select option {
  background: #212121;
}

.bot-activity-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.87rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.bot-activity-input:focus {
  border-color: rgba(255, 255, 255,0.4);
}

.bot-activity-input::placeholder {
  color: rgba(255,255,255,0.3);
}

/* Reset forcé — écrase la couleur d'accent OS sur tous les boutons du bot */
.bot-main-wrap button,
.bot-selector-bar button {
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Save / apply button */
.btn-bot-save {
  padding: 7px 15px;
  background: rgba(255, 255, 255,0.12) !important;
  border: 1px solid rgba(255, 255, 255,0.35) !important;
  border-radius: 7px;
  color: #ffffff !important;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  align-self: flex-start;
  outline: none;
}

.btn-bot-save:hover:not(:disabled) {
  background: rgba(255, 255, 255,0.22) !important;
  border-color: rgba(255, 255, 255,0.65) !important;
}

.btn-bot-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer panneau (bouton + hint) */
.bot-panel-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.bot-panel-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
}

/* Power panel */
.bot-power-panel {
  gap: 12px;
}

.bot-power-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
  line-height: 1.5;
}

.bot-power-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-bot-power {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  justify-content: center;
  outline: none;
}

.btn-bot-power:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-bot-restart {
  background: rgba(255, 255, 255,0.1) !important;
  border: 1px solid rgba(255, 255, 255,0.3) !important;
  color: #ffffff !important;
}

.btn-bot-restart:hover:not(:disabled) {
  background: rgba(255, 255, 255,0.2) !important;
  border-color: rgba(255, 255, 255,0.5) !important;
}

.btn-bot-stop {
  background: rgba(237,66,69,0.1) !important;
  border: 1px solid rgba(237,66,69,0.3) !important;
  color: #ed4245 !important;
}

.btn-bot-stop:hover:not(:disabled) {
  background: rgba(237,66,69,0.2) !important;
  border-color: rgba(237,66,69,0.5) !important;
}

/* Notifications inline dans les panels */
.bot-control-notify {
  font-size: 0.8rem;
  border-radius: 7px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.25s ease;
  opacity: 0;
}

.bot-control-notify.visible {
  padding: 8px 12px;
  max-height: 80px;
  opacity: 1;
}

.bot-notify-success {
  background: rgba(59,165,93,0.12);
  color: #3ba55d;
  border: 1px solid rgba(59,165,93,0.25);
}

.bot-notify-error {
  background: rgba(237,66,69,0.12);
  color: #ed4245;
  border: 1px solid rgba(237,66,69,0.25);
}

/* Empty state */
.bot-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 24px;
  text-align: center;
}

.bot-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.bot-empty-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .bot-controls-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bot-power-panel {
    grid-column: 1 / -1;
  }

  .bot-power-btns {
    flex-direction: row;
  }

  .btn-bot-power {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .bot-controls-grid {
    grid-template-columns: 1fr;
  }

  .bot-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bot-card-header {
    flex-wrap: wrap;
  }

  .bot-power-btns {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LOGS CLIENT — Timeline d'activité
═══════════════════════════════════════════════════════════════ */

/* ── Barre de filtres ── */
.logs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.logs-filter-btn {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  color: rgba(255, 255, 255, 0.45) !important;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none !important;
}

.logs-filter-btn:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.logs-filter-btn.active {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

/* ── Feed timeline ── */
.logs-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Loading ── */
.logs-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

.logs-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: logSpin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes logSpin {
  to { transform: rotate(360deg); }
}

/* ── Empty state ── */
.logs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 50px 20px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 13px;
  text-align: center;
}

/* ── Entrée de log ── */
.log-entry {
  display: flex;
  gap: 0;
  position: relative;
}

.log-entry-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  flex-shrink: 0;
}

/* Avatar de l'acteur */
.log-actor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  z-index: 1;
}

.log-actor-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  z-index: 1;
}

.log-actor-devhub {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  z-index: 1;
}

/* Ligne verticale de la timeline */
.log-line {
  flex: 1;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 0 0;
  min-height: 20px;
}

.log-entry:last-child .log-line {
  display: none;
}

/* ── Corps de l'entrée ── */
.log-entry-body {
  flex: 1;
  padding: 2px 0 20px 14px;
  min-width: 0;
}

.log-entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* Badge type */
.log-type-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.log-type-login          { background: rgba(88, 101, 242, 0.15); color: #7289da; border: 1px solid rgba(88, 101, 242, 0.2); }
.log-type-status_change  { background: rgba(59, 165, 93, 0.12);  color: #3ba55d; border: 1px solid rgba(59, 165, 93, 0.2); }
.log-type-activity_change{ background: rgba(250, 166, 26, 0.12); color: #faa61a; border: 1px solid rgba(250, 166, 26, 0.2); }
.log-type-power_restart  { background: rgba(237, 66, 69, 0.12);  color: #ed4245; border: 1px solid rgba(237, 66, 69, 0.2); }

.log-entry-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  min-width: 0;
}

.log-entry-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

.log-entry-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}

.log-tag {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
}

.log-tag-accent {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.log-entry-actor {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.25);
}

.log-entry-actor strong {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

/* =====================================================================
   DA noir & blanc — ajustements du dashboard
   ===================================================================== */

/* Page non connectée */
.discord-login-section {
  animation: none;
  gap: 0;
}

.discord-login-section h1,
.discord-login-title {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-size: clamp(28px, 4.4vw, 48px);
  max-width: 820px;
  padding-bottom: 18px;
  border-bottom: 4px solid var(--text);
}

.discord-login-section p {
  color: var(--text-2);
  margin-top: 18px;
}

.discord-login-btn {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: var(--radius-pill);
  box-shadow: none;
  font-weight: 600;
}

.discord-login-btn:hover {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
  box-shadow: none;
  transform: none;
}

.dashboard-container {
  color: var(--text);
  animation: none;
}

.dashboard-title {
  font-family: var(--font-display);
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* =====================================================================
   DA DevHub — dashboard (sidebar, accueil, support)
   Variables --accent*, --line*, --text*, --bg* définies dans style.css
   ===================================================================== */

/* Dégradé des icônes SVG (défini une fois dans dashboard.html) */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.grad-start { stop-color: var(--accent); }
.grad-end   { stop-color: var(--accent-2); }

/* ---------- Sidebar ---------- */
.admin-sidebar {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right: 1px solid var(--line);
}

.admin-profile {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-profile-avatar,
.admin-profile-initial {
  border: 1px solid var(--line-strong);
}

.admin-profile-name {
  font-size: 14px;
}

.admin-profile-role {
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-sidebar-divider,
.admin-sidebar-footer {
  background: none;
  border-color: var(--line);
}

.admin-sidebar-divider {
  height: 1px;
  background: var(--line);
}

.admin-link {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: transparent;
  color: var(--text);
}

.admin-link.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  color: var(--text);
  box-shadow: none;
}

.admin-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.sidebar-notif-badge {
  background: var(--accent-grad);
  color: #0a0a0a;
}

.btn-logout-admin {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-2);
}

.btn-logout-admin:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--err);
}

/* ---------- En-tête des pages ---------- */
.admin-welcome-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.admin-welcome-header .dashboard-title {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.05;
  margin-bottom: 10px;
}

.admin-welcome-header .dashboard-text {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- Accueil : cartes d'accès rapide ---------- */
.admin-quick-cards {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.admin-quick-card {
  position: relative;
  gap: 10px;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.admin-quick-card:hover {
  background: var(--bg-card);
  border-color: var(--line-strong);
  transform: none;
  box-shadow: none;
}

.admin-quick-card::after {
  content: "→";
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--text-3);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.admin-quick-card:hover::after {
  color: var(--accent);
  transform: translateX(3px);
}

.admin-quick-icon {
  width: 44px;
  height: 44px;
  justify-content: center;
  margin-bottom: 8px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.admin-quick-icon svg {
  width: 22px;
  height: 22px;
}

.admin-quick-label {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.admin-quick-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ---------- Support : onglets ---------- */
.support-tabs {
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.support-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-2);
  font-size: 14px;
}

.support-tab-btn:hover:not(.active) {
  background: transparent;
  color: var(--text);
}

.support-tab-btn.active {
  background: var(--accent-grad) bottom / 100% 2px no-repeat;
  border: none;
  color: var(--text);
}

.tab-notif-badge {
  position: static;
  min-width: 18px;
  height: 18px;
  background: var(--accent-grad);
  color: #0a0a0a;
}

/* ---------- Support : liste des demandes ---------- */
.support-layout {
  height: clamp(460px, calc(100vh - 330px), 780px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.support-convo-list {
  width: 300px;
  padding: 10px;
  background: var(--bg);
  border-right: 1px solid var(--line);
}

.support-ticket-card {
  padding: 14px 16px 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.support-ticket-card.active,
.support-ticket-card:hover {
  background: var(--bg-card);
  border-color: var(--line-strong);
}

.support-ticket-card.active {
  border-color: var(--accent-line);
}

.support-ticket-card::before {
  border-radius: 0;
}

.support-ticket-card.active::before,
.support-ticket-card.tag-questions::before {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.support-ticket-card-desc {
  font-size: 13px;
  color: var(--text-2);
}

.support-ticket-card-date,
.support-convo-name-sm {
  color: var(--text-3);
}

.support-tag-badge {
  border-radius: var(--radius-pill);
}

.support-tag-badge.tag-questions {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.support-convo-unread {
  background: var(--accent-grad);
  color: #0a0a0a;
}

.support-status-badge {
  color: var(--text-2);
}

.support-status-dot {
  background: var(--accent);
  animation: none;
}

.support-status-dot.treated {
  background: var(--ok);
  box-shadow: none;
}

.support-treated-separator {
  color: var(--text-3);
}

/* ---------- Support : conversation ---------- */
.support-chat-header {
  padding: 14px 20px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.support-chat-header-name {
  font-size: 15px;
}

.support-chat-messages {
  padding: 20px;
  gap: 12px;
}

.support-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.support-message.from-other .support-bubble {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.support-message.from-self .support-bubble {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.support-time {
  font-size: 11px;
  color: var(--text-3);
}

.support-chat-empty,
.support-client-placeholder {
  color: var(--text-3);
}

.support-chat-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.support-chat-input {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.support-chat-input:focus {
  border-color: var(--accent);
}

.support-chat-send {
  background: var(--accent-grad);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a0a0a;
}

.support-chat-send:hover {
  background: var(--accent-grad);
  opacity: 0.88;
}

/* Vue client : ses messages à droite en vert, ceux du support en gris */
.support-message.from-client:not(.from-other) .support-bubble {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.support-message.from-admin:not(.from-self) .support-bubble {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.support-admin-label {
  color: var(--text-3);
}

/* ---------- Support : e-mails ---------- */
.support-email-list {
  gap: 10px;
}

.support-email-card {
  padding: 16px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.support-email-card:hover {
  background: var(--bg-card);
}

.support-email-card.unread {
  background: var(--bg-elev);
  border-color: var(--line-strong);
  border-left-color: var(--accent);
}

.support-email-card.unread::after {
  display: none;
}

.support-email-subject {
  font-size: 14px;
}

.support-email-preview,
.support-email-body {
  font-size: 13px;
  color: var(--text-2);
}

.support-email-action {
  border-radius: var(--radius-pill);
}

.support-email-action.reply {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.support-reply-textarea:focus {
  border-color: var(--accent);
}

.support-reply-send {
  background: var(--accent-grad);
  border: none;
  border-radius: var(--radius-pill);
  color: #0a0a0a;
}

.support-reply-send:hover {
  background: var(--accent-grad);
  opacity: 0.88;
}

/* ---------- Support : côté client ---------- */
.support-client-main {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.support-new-btn {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
}

.support-new-btn:hover {
  background: rgba(134, 211, 111, 0.16);
  border-color: var(--accent);
}

.support-request-form {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.support-request-submit {
  background: var(--accent-grad);
  color: #0a0a0a;
  border-radius: var(--radius-pill);
}

.support-request-submit:hover:not(:disabled) {
  opacity: 0.88;
  box-shadow: none;
  transform: none;
}

.support-request-desc:focus {
  border-color: var(--accent);
}

.support-tag-option.active[data-tag="Questions"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

/* ---------- Divers (validé précédemment) ---------- */
.embed-tab.active::after {
  background: var(--accent-grad);
}

.bot-selector-btn.active,
.logs-filter-btn.active {
  background: var(--accent-soft) !important;
  border-color: var(--accent-line) !important;
}

.bot-stat-icon {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.modal-actions .btn-save:hover {
  background: var(--accent-grad);
  color: #0a0a0a;
}

#save-project {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.pc-progressfill {
  background: var(--accent-grad);
}

.filter-menu input[type="checkbox"],
.embed-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
}

.modal-content select:focus,
.modal-right textarea:focus {
  border-color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .support-layout {
    flex-direction: column;
    height: auto;
  }

  .support-convo-list {
    width: auto;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .support-chat {
    min-height: 460px;
  }
}

@media (max-width: 540px) {
  .admin-quick-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-quick-card {
    padding: 18px;
  }

  .admin-quick-card::after {
    top: 18px;
    right: 18px;
  }
}

/* =====================================================================
   Client — Mon bot
   ===================================================================== */
.bot-main-wrap {
  gap: 16px;
}

/* En-tête */
.bot-card-header {
  gap: 20px;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bot-main-avatar,
.bot-main-avatar-placeholder {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line-strong);
}

.bot-presence-dot {
  width: 18px;
  height: 18px;
  bottom: 1px;
  right: 1px;
  border: 3px solid var(--bg-elev);
  transition: background-color 0.3s var(--ease);
}

.bot-card-name {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.1;
}

.bot-card-status-row {
  gap: 12px;
}

.bot-status-badge {
  gap: 7px;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: transparent !important;
  transition: color 0.3s var(--ease);
}

.bot-status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.bot-activity-preview {
  max-width: 340px;
  font-size: 13px;
  color: var(--text-2);
}

/* Couleurs de présence */
.status-online  { background: var(--ok); }
.status-idle    { background: var(--warn); }
.status-dnd     { background: var(--err); }
.status-invisible,
.status-offline { background: var(--text-3); }

.bot-status-badge.status-online  { color: var(--ok); }
.bot-status-badge.status-idle    { color: var(--warn); }
.bot-status-badge.status-dnd     { color: var(--err); }
.bot-status-badge.status-invisible,
.bot-status-badge.status-offline { color: var(--text-3); }

/* Indicateur de synchro en direct */
.bot-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
}

.bot-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: bot-live-pulse 2s ease-in-out infinite;
}

.bot-live.is-down .bot-live-dot {
  background: var(--err);
  animation: none;
}

@keyframes bot-live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .bot-live-dot { animation: none; }
}

.bot-last-ping {
  font-size: inherit;
  color: inherit;
}

/* Bandeau des modifications en attente */
.bot-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
}

.bot-pending[hidden] {
  display: none;
}

.bot-pending-text {
  font-size: 14px;
  color: var(--text);
}

/* Statistiques */
.bot-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.bot-stat-card {
  align-items: stretch;
  gap: 14px;
  padding: 18px 20px;
  text-align: left;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bot-stat-card:hover {
  background: var(--bg-elev);
  border-color: var(--line-strong);
}

.bot-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bot-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.bot-stat-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}

.bot-stat-value {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bot-stat-value.is-down {
  color: var(--err);
}

/* Panneaux de contrôle */
.bot-controls-grid {
  gap: 16px;
}

.bot-control-panel {
  gap: 16px;
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bot-control-panel-title {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: #8a8a8a;
}

.bot-status-options {
  gap: 8px;
}

.bot-status-option {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
}

.bot-status-option:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  color: var(--text);
}

.bot-status-option.selected {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--text);
}

.bot-activity-row {
  gap: 10px;
}

.bot-activity-select,
.bot-activity-input {
  padding: 11px 14px;
  background-color: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.bot-activity-select:focus,
.bot-activity-input:focus {
  border-color: var(--accent);
}

.bot-activity-select option {
  background: var(--bg-elev);
}

.bot-panel-footer {
  margin-top: auto;
}

.bot-power-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}

/* Boutons (forcés : une ancienne règle générique cible tous les boutons du dashboard) */
.btn-bot-save {
  padding: 9px 20px !important;
  background: var(--accent-grad) !important;
  border: none !important;
  border-radius: var(--radius-pill) !important;
  color: #0a0a0a !important;
  font-size: 13.5px !important;
  font-weight: 600;
  transition: opacity 0.2s var(--ease);
}

.btn-bot-save:hover:not(:disabled) {
  background: var(--accent-grad) !important;
  opacity: 0.88;
}

.btn-bot-save:disabled {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-3) !important;
  opacity: 1;
}

.btn-bot-power {
  justify-content: center;
  gap: 8px;
  padding: 11px 20px !important;
  border-radius: var(--radius-pill) !important;
  font-size: 14px !important;
}

.btn-bot-restart {
  background: var(--text) !important;
  border: 1px solid var(--text) !important;
  color: var(--bg) !important;
}

.btn-bot-restart:hover:not(:disabled) {
  background: transparent !important;
  border-color: var(--text) !important;
  color: var(--text) !important;
}

.btn-bot-pending {
  padding: 8px 16px !important;
  font-size: 13px !important;
}

/* Notifications */
.bot-control-notify {
  border-radius: var(--radius-sm);
}

.bot-notify-success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: var(--ok);
}

.bot-notify-error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--err);
}

.bot-empty-title { color: var(--text-2); }
.bot-empty-sub   { color: var(--text-3); }

@media (max-width: 1100px) {
  .bot-controls-grid { grid-template-columns: 1fr 1fr; }
  .bot-power-panel   { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .bot-controls-grid { grid-template-columns: 1fr; }
  .bot-stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .bot-card-meta     { margin-left: 0; width: 100%; }
}

/* =====================================================================
   Pied de page complet dans le dashboard
   ===================================================================== */
body.dashboard .site-footer {
  position: relative;
  z-index: 150;
}

/* Ordinateur : la sidebar fait partie de la page et défile avec elle
   (sinon le pied de page recouvre le bouton Déconnexion).
   Le menu mobile (≤ 900px) reste en panneau par-dessus. */
@media (min-width: 901px) {
  .admin-sidebar {
    position: relative;
    top: auto;
    left: auto;
  }

  .admin-content {
    margin-left: 0;
  }
}

/* =====================================================================
   Admin — Gestion des bots (classes gx-)
   ===================================================================== */
.gx-loading,
.gx-empty,
.gx-empty-sm {
  color: var(--text-3);
  font-size: 14px;
}

.gx-empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.gx-error {
  padding: 16px 18px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  background: rgba(248, 113, 113, 0.06);
  color: var(--err);
  font-size: 14px;
}

.gx-muted {
  color: var(--text-3);
  font-size: 13px;
}

.gx-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

/* Bandeaux */
.gx-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}

.gx-banner.is-warn {
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.07);
  color: var(--warn);
}

.gx-banner.is-error {
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
  color: var(--err);
}

/* KPI */
.gx-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}

.gx-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.gx-kpi:last-child {
  border-right: none;
}

.gx-kpi-label,
.gx-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.gx-kpi-value,
.gx-stat-value {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.gx-kpi-value.is-accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

/* Barre d'outils */
.gx-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.gx-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
}

.gx-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.gx-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

.gx-search input:focus {
  border-color: var(--accent);
}

.gx-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
}

body.dashboard .gx-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

body.dashboard .gx-seg-btn span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

body.dashboard .gx-seg-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.gx-manager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

.gx-manager span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.gx-manager.is-online span { background: var(--ok); }
.gx-manager.is-offline { color: var(--warn); border-color: rgba(251, 191, 36, 0.3); }
.gx-manager.is-offline span { background: var(--warn); }

/* Grille des bots */
.gx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

body.dashboard .gx-bot-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

body.dashboard .gx-bot-card:hover {
  background: var(--bg-card);
  border-color: var(--line-strong);
}

.gx-bot-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gx-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.gx-avatar {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
}

.gx-avatar-ph {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--text);
}

.gx-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-elev);
  background: var(--text-3);
}

.gx-avatar-wrap.is-lg .gx-dot {
  width: 18px;
  height: 18px;
  border-width: 3px;
}

.gx-dot.is-online   { background: var(--ok); }
.gx-dot.is-starting { background: var(--warn); }
.gx-dot.is-stopped  { background: var(--err); }

.gx-bot-ident {
  flex: 1;
  min-width: 0;
}

.gx-bot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 16px;
}

.gx-bot-id {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gx-bot-id,
.gx-row-sub code,
code.gx-row-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.gx-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-3);
}

.gx-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.gx-pill.is-online   { color: var(--ok); }
.gx-pill.is-starting { color: var(--warn); }
.gx-pill.is-stopped  { color: var(--err); }
.gx-pill.is-neutral  { color: var(--text-2); border-color: var(--line-strong); }
.gx-pill.is-neutral::before { display: none; }

.gx-bot-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gx-bot-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.gx-bot-stats span {
  font-family: var(--font-display);
  font-stretch: 110%;
  font-weight: 700;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.gx-bot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.gx-bot-foot > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gx-arrow {
  color: var(--text-3);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

body.dashboard .gx-bot-card:hover .gx-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* Boutons */
body.dashboard .gx-btn,
body.dashboard .gx-back,
body.dashboard .gx-id {
  font-family: var(--font-body);
}

body.dashboard .gx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}

body.dashboard .gx-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

body.dashboard .gx-btn:hover:not(:disabled) {
  border-color: var(--text);
  background: transparent;
}

body.dashboard .gx-btn.is-accent {
  border: none;
  background: var(--accent-grad);
  color: #0a0a0a;
}

body.dashboard .gx-btn.is-accent:hover:not(:disabled) {
  background: var(--accent-grad);
  opacity: 0.88;
}

body.dashboard .gx-btn.is-light {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

body.dashboard .gx-btn.is-light:hover:not(:disabled) {
  background: transparent;
  color: var(--text);
}

body.dashboard .gx-btn.is-danger {
  color: var(--err);
}

body.dashboard .gx-btn.is-danger:hover:not(:disabled) {
  border-color: var(--err);
  background: rgba(248, 113, 113, 0.08);
}

body.dashboard .gx-btn.is-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

body.dashboard .gx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.dashboard .gx-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}

body.dashboard .gx-back svg {
  width: 16px;
  height: 16px;
}

body.dashboard .gx-back:hover {
  background: none;
  color: var(--text);
}

/* En-tête du bot */
.gx-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.gx-head-info {
  flex: 1;
  min-width: 220px;
}

.gx-head-name {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  line-height: 1.1;
}

.gx-head-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body.dashboard .gx-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

body.dashboard .gx-id svg {
  width: 12px;
  height: 12px;
}

body.dashboard .gx-id:hover {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.gx-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Onglets */
.gx-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

body.dashboard .gx-tab {
  flex-shrink: 0;
  margin-bottom: -1px;
  padding: 11px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

body.dashboard .gx-tab:hover {
  background: transparent;
  color: var(--text);
}

body.dashboard .gx-tab.is-active {
  background: var(--accent-grad) bottom / 100% 2px no-repeat;
  color: var(--text);
}

/* Statistiques du bot */
.gx-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.gx-stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.gx-stat-value {
  font-size: 22px;
}

/* Panneaux */
.gx-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.gx-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.gx-cols .gx-panel {
  margin-bottom: 0;
}

.gx-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.gx-panel-sub {
  margin: -6px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

/* Barres d'utilisation */
.gx-bars {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gx-bars li {
  display: grid;
  grid-template-columns: minmax(90px, 150px) 1fr 52px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.gx-bar-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  color: var(--text);
}

.gx-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.gx-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-grad);
}

.gx-bar-value {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--text-2);
}

/* Journal */
.gx-logs {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gx-logs li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.gx-logs li:last-child {
  border-bottom: none;
}

.gx-log-text {
  font-size: 13.5px;
  color: var(--text);
}

.gx-log-meta {
  font-size: 12px;
  color: var(--text-3);
}

/* Informations */
.gx-info {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px 20px;
  margin: 0;
}

.gx-info dt {
  font-size: 13px;
  color: var(--text-3);
}

.gx-info dd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}

.gx-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.gx-user img,
.gx-user > span:first-child {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.gx-user > span:first-child {
  display: grid;
  place-items: center;
  background: var(--bg-card);
  font-size: 11px;
  font-weight: 700;
}

.gx-user-name {
  font-weight: 600;
}

.gx-user code,
.gx-tag code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.gx-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  font-size: 12px;
  color: var(--text);
}

/* Présence */
.gx-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
}

.gx-preview strong {
  color: var(--text);
}

.gx-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 12px;
}

.gx-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}

.gx-check input {
  accent-color: var(--accent);
}

/* Modules */
.gx-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.gx-mod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.gx-mod:hover {
  border-color: var(--line-strong);
}

.gx-mod.is-on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.gx-mod input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gx-switch {
  position: relative;
  flex-shrink: 0;
  width: 34px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s var(--ease);
}

.gx-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s var(--ease);
}

.gx-mod.is-on .gx-switch {
  background: var(--accent-grad);
}

.gx-mod.is-on .gx-switch::after {
  transform: translateX(14px);
  background: #0a0a0a;
}

.gx-mod input:focus-visible + .gx-switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gx-mod-name {
  font-size: 14px;
  color: var(--text);
}

/* Serveurs / commandes : lignes */
.gx-invite .gx-panel-sub {
  margin-top: 6px;
}

.gx-invite-row {
  display: grid;
  grid-template-columns: 220px 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.gx-table {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.gx-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}

.gx-guild-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
}

.gx-row-main {
  flex: 1;
  min-width: 0;
}

.gx-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14.5px;
}

.gx-row-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-3);
}

.gx-row-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 96px;
  font-size: 11px;
  color: var(--text-3);
}

.gx-row-cell strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.gx-cmd {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}

.gx-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Paramètres */
.gx-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.gx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.gx-field small {
  color: var(--text-3);
}

.gx-field-wide {
  grid-column: 1 / -1;
}

.gx-color {
  display: flex;
  gap: 10px;
}

.gx-color input[type="color"] {
  width: 46px;
  height: 44px;
  flex-shrink: 0;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}

.gx-inline {
  display: flex;
  gap: 10px;
}

.gx-inline .bot-activity-input {
  flex: 1;
}

.gx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  align-items: center;
}

.gx-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text);
}

body.dashboard .gx-tag button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  cursor: pointer;
}

body.dashboard .gx-tag button svg {
  width: 12px;
  height: 12px;
}

body.dashboard .gx-tag button:hover {
  background: rgba(248, 113, 113, 0.15);
  color: var(--err);
}

/* Notifications */
#gx-toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 48px));
}

.gx-toast {
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.gx-toast.is-visible {
  opacity: 1;
  transform: none;
}

.gx-toast.is-success { border-color: var(--accent-line); }
.gx-toast.is-success::before { content: "✓  "; color: var(--accent); font-weight: 700; }
.gx-toast.is-error   { border-color: rgba(248, 113, 113, 0.4); color: var(--err); }
.gx-toast.is-warn    { border-color: rgba(251, 191, 36, 0.4); color: var(--warn); }
.gx-toast.is-pending::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: gx-spin 0.8s linear infinite;
}

@keyframes gx-spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1100px) {
  .gx-cols,
  .gx-form { grid-template-columns: 1fr; }
  .gx-invite-row { grid-template-columns: 1fr 1fr; }
  .gx-invite-row .bot-activity-input { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 700px) {
  .gx-kpis { grid-template-columns: 1fr 1fr; }
  .gx-kpi:nth-child(2) { border-right: none; }
  .gx-kpi:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .gx-manager { margin-left: 0; }
  .gx-info { grid-template-columns: 1fr; gap: 6px; }
  .gx-info dd { margin-bottom: 10px; }
  .gx-row { flex-wrap: wrap; row-gap: 12px; }
  .gx-row-main { flex: 1 1 calc(100% - 64px); }
  .gx-row-cell { align-items: flex-start; min-width: 0; margin-right: 12px; }
  .gx-row .gx-btn { margin-left: auto; }
  .gx-bars li { grid-template-columns: 1fr auto; }
  .gx-bar { grid-column: 1 / -1; order: 3; }
}
