/* =========================================
   GLOBAL AUDI STYLE – pour toutes les pages
   ========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: url("bg-dashboard.jpg") center/cover fixed no-repeat;
  color: #f5f5f5;
}

/* léger voile foncé فوق الخلفية */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255,255,255,0.04), rgba(0,0,0,0.88));
  z-index: -1;
}

/* ================== HEADER / NAVBAR =================== */

.audi-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(0,0,0,0.95), rgba(50,0,0,0.98));
  border-bottom: 1px solid rgba(255,0,0,0.6);
  box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  z-index: 50;
}

.audi-header .logo {
  height: 52px;
}

.audi-header .title {
  margin-left: 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audi-header-left {
  display: flex;
  align-items: center;
  color: #fff;
}

/* NAV BUTTONS (نفس روح index) */
.audi-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 16px;
  font-size: 13px;
  color: #eee;
  background: radial-gradient(circle at top, rgba(255,255,255,0.1), rgba(15,15,15,0.95));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
  white-space: nowrap;
}

.nav-btn:hover {
  background: radial-gradient(circle at top, rgba(255,255,255,0.16), rgba(40,0,0,0.98));
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255,0,0,0.8);
}

.nav-btn.nav-active {
  background: linear-gradient(135deg, #ff2a2a, #930000);
  border-color: rgba(255,255,255,0.9);
  color: #fff;
  box-shadow: 0 0 22px rgba(255,0,0,0.9);
}

.nav-btn.nav-logout {
  background: transparent;
  border-color: rgba(255,80,80,0.9);
  color: #ffb3b3;
}
.nav-btn.nav-logout:hover {
  background: rgba(140,0,0,0.9);
  color: #fff;
}

/* ================== PAGE WRAPPER + CARDS =================== */

.page-wrapper {
  min-height: 100vh;
  padding: 90px 40px 40px; /* 90px pour laisser المكان للـ header */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.glass-box {
  width: 100%;
  max-width: 1100px;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.05), rgba(0,0,0,0.96));
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 22px 60px rgba(0,0,0,0.95);
  padding: 26px 28px 30px;
}

/* Version plus étroite (login / signup) */
.glass-box-auth {
  max-width: 480px;
}

/* TITRES GÉNÉRAUX */
.page-title {
  font-size: 26px;
  font-weight: 800;
  color: #ff2a2a;
  text-align: center;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(255,0,0,0.7);
}

.page-subtitle {
  text-align: center;
  font-size: 12px;
  color: #ccc;
  margin-bottom: 24px;
}

/* SECTIONS */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #f5f5f5;
  border-left: 4px solid #ff2a2a;
  padding-left: 10px;
  margin: 24px 0 10px;
}

/* =============== FORMULAIRES =============== */

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #ddd;
}

.form-label span.req {
  color: #ff4d4d;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,10,10,0.95);
  color: #f5f5f5;
  font-size: 13px;
  padding: 10px 11px;
  outline: none;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #ff2a2a;
  box-shadow: 0 0 0 1px rgba(255,0,0,0.4), 0 0 14px rgba(255,0,0,0.9);
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

.form-help {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* Password wrapper (eye icon) */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-control {
  padding-right: 38px;
}
.password-eye {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  cursor: pointer;
  color: #ccc;
}
.password-eye:hover {
  color: #fff;
}

/* =============== BUTTONS =============== */

.btn-red {
  border-radius: 999px;
  border: none;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff2a2a, #9b0000);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255,0,0,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.25s ease;
}

.btn-red:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(255,60,60,1);
}

.btn-red:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 0 14px rgba(255,40,40,0.7);
}

.btn-ghost {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 9px 18px;
  background: transparent;
  color: #eee;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.25s;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 16px rgba(255,255,255,0.4);
}

/* FOOTER GÉNÉRAL */
.page-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  color: #ddd;
}
.page-footer a {
  color: #ffb3b3;
  text-decoration: none;
  font-weight: 600;
}
.page-footer a:hover {
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .audi-header {
    padding: 0 16px;
  }
  .page-wrapper {
    padding: 90px 16px 24px;
  }
}

@media (max-width: 700px) {
  .audi-header {
    flex-direction: column;
    height: auto;
    padding: 10px 16px 12px;
    gap: 8px;
    align-items: flex-start;
  }
  .page-wrapper {
    padding-top: 120px;
  }
  .audi-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}
