/* VIZORA auth pages (register / login) and the dashboard.
   Builds on the landing-page palette + fonts (landing.css must be loaded too). */

/* Auth cards --------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  background:
    radial-gradient(800px 480px at 80% -10%, rgba(177, 75, 255, 0.22), transparent 60%),
    radial-gradient(700px 420px at 10% 110%, rgba(56, 232, 255, 0.16), transparent 58%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2.5rem 2.25rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.auth-card .logo {
  display: block;
  text-align: center;
  font-family: var(--logo);
  font-size: 2rem;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.auth-card h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.9rem;
  text-align: center;
  margin: 0 0 0.4rem;
}
.auth-card .auth-sub {
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  margin: 0 0 1.75rem;
}
.field {
  margin-bottom: 1.1rem;
}
.field label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus {
  border-color: var(--accent);
}
.auth-card .btn {
  width: 100%;
  margin-top: 0.5rem;
}
.auth-error {
  background: rgba(255, 75, 107, 0.12);
  border: 1px solid rgba(255, 75, 107, 0.4);
  color: #ff9bb1;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 1.25rem;
}
.auth-foot {
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  margin: 1.5rem 0 0;
  font-size: 0.92rem;
}
.auth-foot a {
  color: var(--accent-2);
}

/* Dashboard ---------------------------------------------------------------- */
.dash {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(177, 75, 255, 0.16), transparent 60%),
    var(--bg);
}
.dash-header {
  border-bottom: 1px solid var(--panel-border);
  background: rgba(7, 7, 11, 0.7);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.dash-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.dash-header .logo {
  font-family: var(--logo);
  font-size: 1.6rem;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dash-header .right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-2);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.credits-pill .spark {
  color: var(--accent);
}
.credits-pill b {
  color: var(--accent-2);
}

.dash-hero {
  padding: 3rem 0 1rem;
}
.dash-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.3rem;
}
.dash-hero p {
  color: var(--muted);
  font-weight: 300;
  margin: 0;
}

.dash-section {
  padding: 2.5rem 0 1rem;
}
.dash-section .sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.dash-section .sec-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 0;
}
.dash-section .sec-head a {
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 300;
}

.creation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.creation {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}
.creation:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.creation .thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(177, 75, 255, 0.35), rgba(56, 232, 255, 0.25));
  display: grid;
  place-items: center;
  font-size: 2rem;
  position: relative;
}
.creation .thumb img,
.creation .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.creation .status-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--fg);
}
.creation .body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.creation .body .title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}
.creation .body .date {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
}
.creation .body .dl {
  margin-top: 0.6rem;
}
.creation .body .dl a {
  display: inline-block;
  font-size: 0.85rem;
  color: #08080c;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.creation .body .dl span.muted {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
}

.empty {
  background: var(--panel);
  border: 1px dashed var(--panel-border);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-weight: 300;
}
.empty a {
  color: var(--accent-2);
}

.dash-spacer {
  height: 3rem;
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 760px) {
  /* Stop the dashboard navbar (logo + credits pill + two buttons) overflowing:
     let it wrap onto a second line and tighten the wide logo tracking. */
  .dash-header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
  }
  .dash-header .logo {
    font-size: 1.3rem;
    letter-spacing: 0.2em;
  }
  .dash-header .right {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .dash-header .right .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  /* Stack the section headers so the "Open studio →" link doesn't crowd the
     title, and let the creation cards reflow to two-up on small screens. */
  .dash-section .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .creation-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 420px) {
  .creation-grid {
    grid-template-columns: 1fr;
  }
}
