/* ============================================================
   PAGE DE CONNEXION
   ============================================================ */
.auth-wrapper {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  position: relative;
  overflow: hidden;
}

.bg-blobs {
  position: absolute;
  inset: 0;
  filter: blur(80px);
  z-index: 0;
}

.blob {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.15;
  animation: blobFloat 12s infinite alternate;
}

.blob:nth-child(2) {
  background: #a855f7;
  right: 15%;
  top: 10%;
  animation-delay: -3s;
}

.blob:nth-child(3) {
  background: #0ea5e9;
  left: 10%;
  bottom: 10%;
  animation-delay: -6s;
}


.auth-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 10px 0;
  letter-spacing: -1px;
}

.badge-pulse {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-alt);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  display: inline-block;
  border: 1px solid rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 18px var(--primary-glow);
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  margin-top: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
}


/* ============================================================
   PAGE DE CONNEXION
   ============================================================ */
.login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 900px 600px at 20% 20%, rgba(99,102,241,0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 80% 80%, rgba(168,85,247,0.10), transparent 60%),
    var(--bg-dark);
  z-index: 9999;
}

.login-card {
  background: rgba(15, 20, 40, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px 44px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-icon {
  font-size: 3.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.15);
  border-radius: 20px;
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 12px 40px rgba(99,102,241,0.3), 0 0 0 1px rgba(99,102,241,0.15);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}

.login-logo > div {
  text-align: center;
}

.login-logo .logo-txt {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.login-logo .logo-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.login-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-white);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-input {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-white);
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.login-input:focus { border-color: var(--primary); box-shadow: var(--ring-soft); }

.login-subtitle {
  margin: -12px 0 0;
  font-size: 0.83rem;
  color: var(--text-muted);
  text-align: center;
}

.login-error {
  font-size: 0.82rem;
  color: var(--danger);
  min-height: 18px;
  text-align: center;
}

.btn-discord-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #5865f2;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 18px rgba(88,101,242,0.35);
}
.btn-discord-login:hover {
  background: #4752c4;
  box-shadow: 0 6px 24px rgba(88,101,242,0.5);
}


.login-terms {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0 0;
  line-height: 1.4;
}

/* Sidebar user info */
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
}
.sidebar-user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sidebar-user-pseudo {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-alt);
  background: rgba(99,102,241,0.12);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}
.sidebar-logout-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
}
.sidebar-logout-btn:hover { color: var(--danger); }

.sidebar-footer-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* Admin tabs */
.admin-tabs-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
}

.admin-tab-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 7px 16px;
  font-size: 0.83rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.admin-tab-btn:hover { background: rgba(99,102,241,0.07); color: var(--text-white); }
.admin-tab-btn.active {
  background: rgba(99,102,241,0.15);
  border-color: var(--primary);
  color: var(--primary-alt);
}

/* Loading / error / empty */
.admin-loading { color: var(--text-muted); padding: 24px; font-size: 0.88rem; text-align: center; }
.admin-error   { color: var(--danger);     padding: 16px; font-size: 0.88rem; }
.admin-empty   { color: var(--text-muted); padding: 32px 16px; font-size: 0.9rem; text-align: center; } /* alias → .empty-state */

/* Stats */
.admin-kpi-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-kpi {
  flex: 1;
  min-width: 90px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
}
.admin-kpi-val      { font-size: 1.6rem; font-weight: 800; }
.admin-kpi-lbl      { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-kpi-green    { color: var(--success); }
.admin-kpi-red      { color: var(--danger); }

.admin-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  font-size: 0.85rem;
  transition: background var(--dur-1, 140ms) ease;
}
.admin-stat-row:hover { background: rgba(255, 255, 255, 0.055); }
.admin-stat-num { font-weight: 700; color: var(--primary-alt); }
.admin-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.admin-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding-top: 8px;
}
.admin-bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.admin-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s;
  opacity: 0.8;
}
.admin-bar-label { font-size: 0.66rem; color: var(--text-muted); text-align: center; }

/* Accès users */
.admin-user-header,
.admin-user-row {
  display: grid;
  grid-template-columns: 1fr 130px 60px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  font-size: 0.85rem;
}
.admin-user-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-alt);
  margin-bottom: 6px;
}
.admin-user-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  margin-bottom: 4px;
  transition: background var(--dur-1, 140ms) ease;
}
.admin-user-row:hover { background: rgba(255, 255, 255, 0.055); }
.admin-user-pseudo { font-weight: 600; }
.admin-user-discord { color: var(--text-muted); font-size: 0.78rem; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-role    { font-weight: 700; font-size: 0.8rem; }
.admin-user-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* Backup */
.admin-backup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 0.83rem;
  transition: background var(--dur-1, 140ms) ease;
}
.admin-backup-row:hover { background: rgba(255, 255, 255, 0.055); }
.admin-backup-name { flex: 1; font-family: monospace; font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-backup-meta { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }

/* Discord members */
.admin-discord-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
}
.admin-discord-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
}
.admin-discord-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--glass);
}
.admin-discord-info { flex: 1; min-width: 0; }
.admin-discord-pseudo { font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-discord-tag    { font-size: 0.74rem; color: var(--text-muted); }
.admin-discord-role   { font-size: 0.78rem; color: var(--primary-alt); font-weight: 600; white-space: nowrap; }

/* Announce banner */
.admin-announce-banner {
  background: linear-gradient(90deg, rgba(251,191,36,0.12), rgba(251,191,36,0.06));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--expert);
  margin-bottom: 20px;
}
