/* ===========================
   DISPATCH-RP — Auth Pages
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark:    #080c18;
  --bg-card:    #0d1629;
  --bg-input:   #080c18;
  --border:     #1e3459;
  --border-focus: #2563eb;
  --blue:       #2563eb;
  --blue-light: #3b82f6;
  --blue-hover: #1d4ed8;
  --red:        #ef4444;
  --green:      #22c55e;
  --text:       #e2e8f0;
  --text-muted: #64748b;
  --text-dim:   #94a3b8;
}

body {
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Fond animé avec grille */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Radial glow top-left */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===========================
   TABS
   =========================== */

.auth-tabs {
  display: flex;
  position: relative;
  background: #0d1629;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  border-radius: 7px;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
  font-family: inherit;
}

.tab-btn.active {
  color: #fff;
}

.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--blue-hover), var(--blue));
  border-radius: 7px;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}

/* ===========================
   AUTH CONTAINER
   =========================== */

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  animation: fadeUp 0.4s ease both;
  transition: max-width 0.3s ease;
}

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

/* ===========================
   LOGO / HEADER
   =========================== */

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

.auth-logo .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.auth-logo .badge-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.auth-logo h1 span {
  color: var(--blue-light);
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 6px;
}

/* ===========================
   CARD
   =========================== */

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

/* ===========================
   ALERTS
   =========================== */

.alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  line-height: 1.5;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===========================
   FORM
   =========================== */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s;
}

.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px 11px 42px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

.form-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--blue-light);
}

/* ===========================
   BOUTON
   =========================== */

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--blue-hover), var(--blue));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.3px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  opacity: 1;
}

/* ===========================
   FOOTER LIEN
   =========================== */

.auth-footer {
  text-align: center;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.auth-footer a {
  color: var(--blue-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* ===========================
   PASSWORD STRENGTH
   =========================== */

.pwd-strength {
  margin-top: 10px;
}

.pwd-bar {
  height: 4px;
  background: #1e3459;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.pwd-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s ease, background 0.3s ease;
}

.pwd-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.pwd-rules span {
  font-size: 12px;
  color: #64748b;
  transition: color 0.2s;
}

/* ===========================
   DIVIDER
   =========================== */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 20px;
  color: var(--text-muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
  }
}
