/* ---------- Auth pages (login / register) ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Full-screen photo behind the form, darkened so text and card stay readable */
.auth-hero {
  flex: 1;
  display: flex;
  align-items: center;      /* vertically centre the form */
  padding: 3rem 0;
  background:
    linear-gradient(100deg, rgba(10, 15, 30, 0.85) 0%, rgba(10, 15, 30, 0.55) 55%, rgba(10, 15, 30, 0.35) 100%),
    url("../img/auth-bg.jpg") center / cover no-repeat;
}

.auth-tagline {
  max-width: 32rem;
  opacity: 0.85;
}

/* The form card: frosted white panel */
.auth-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-radius: 1rem;
  padding: 2.25rem 2rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.35);
}

.auth-card .form-control {
  padding: 0.65rem 0.85rem;
}

.auth-card .btn-primary {
  padding: 0.65rem;
  font-weight: 600;
}

/* Role picker: make the small hint text readable on the selected button */
.btn-check:checked + .btn small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ---------- Navbar ---------- */

/* Aurora: a wide gradient that slowly flows sideways.
   It loops back to its first colour so the animation never "jumps". */
.app-navbar {
  background: linear-gradient(90deg,
    #4c1d95, #6d28d9, #a21caf, #db2777, #ea580c, #db2777, #a21caf, #6d28d9, #4c1d95);
  background-size: 300% 100%;
  animation: aurora 24s linear infinite;
  box-shadow: 0 4px 20px rgba(109, 40, 217, 0.3);
}
.app-navbar .navbar-brand {
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

@keyframes aurora {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

/* Dashboards: brighter aurora with a soft glow spilling onto the page */
.dashboard-page .app-navbar {
  animation-duration: 16s;
  box-shadow:
    0 4px 24px rgba(219, 39, 119, 0.35),
    0 10px 50px rgba(124, 58, 237, 0.25);
}

/* Login / register: dark see-through aurora that melts into the photo */
.auth-page .app-navbar {
  background:
    linear-gradient(rgba(10, 15, 30, 0.6), rgba(10, 15, 30, 0.6)),
    linear-gradient(90deg,
      #4c1d95, #6d28d9, #a21caf, #db2777, #ea580c, #db2777, #a21caf, #6d28d9, #4c1d95);
  background-size: 100% 100%, 300% 100%;
  animation-name: aurora-dim;
  box-shadow: none;
}

@keyframes aurora-dim {
  from { background-position: 0 0, 0% 50%; }
  to   { background-position: 0 0, 300% 50%; }
}

/* "Dashboard" link: plain text that glows softly on hover */
.nav-pill {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
.nav-pill:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Profile chip: avatar + name + role */
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  padding: 0.25rem 0.9rem 0.25rem 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Avatar with a spinning rainbow ring */
.avatar {
  position: relative;
  isolation: isolate;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, #a78bfa, #ec4899, #fb923c);
}

.avatar::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from var(--angle), #a78bfa, #ec4899, #fb923c, #38bdf8, #a78bfa);
  filter: blur(2px);
  animation: spin-border 4s linear infinite;
}

/* Respect users who turn off animations in their OS settings */
@media (prefers-reduced-motion: reduce) {
  .dashboard-page::before,
  .dashboard-page::after,
  .app-navbar,
  .hello,
  .crystal,
  .magic-card::before,
  .avatar::before { animation: none; }
}
