/* === FORMS / AUTH PAGES — extends theme.css === */

/* Page header */
.page-header {
  background: var(--twilight);
  border-bottom: 1px solid rgba(168,155,222,0.1);
  padding: 1.25rem 0;
}
.page-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--soft-lavender);
  font-style: italic;
  text-decoration: none;
}
.page-logo span { color: var(--gold); }

/* Auth pages */
.auth-page {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--twilight);
  border: 1px solid rgba(168,155,222,0.15);
  border-radius: 20px;
  padding: 48px;
}

.auth-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--soft-lavender);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-brand-moon {
  font-size: 1.4rem;
}

.auth-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.auth-switch {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-switch a { color: var(--soft-lavender); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Intake / form page */
.form-page {
  min-height: 90vh;
  padding: 4rem 0 6rem;
}

.form-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--twilight);
  border: 1px solid rgba(168,155,222,0.15);
  border-radius: 20px;
  padding: 48px;
}

.form-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 0.75rem;
}

.form-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1rem;
  font-style: italic;
}

.form-intro {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Form fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.field {
  margin-bottom: 1.75rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.required { color: var(--gold); }
.hint { color: var(--text-muted); font-weight: 300; font-size: 0.8rem; }
.optional { color: var(--text-muted); font-weight: 300; font-size: 0.8rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
textarea,
select {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(168,155,222,0.2);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder { color: rgba(157,143,196,0.4); }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--soft-lavender);
  box-shadow: 0 0 0 3px rgba(196,181,253,0.15);
}

textarea { resize: vertical; min-height: 90px; }

/* Age bucket buttons */
.age-buttons {
  display: flex;
  gap: 0.75rem;
}

.age-btn {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(168,155,222,0.2);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.age-btn:hover { border-color: var(--soft-lavender); color: var(--cream); }

.age-btn.selected {
  background: var(--deep-indigo);
  border-color: var(--soft-lavender);
  color: var(--soft-lavender);
  box-shadow: 0 0 0 3px rgba(196,181,253,0.1);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold);
  color: #1a1f4a;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
  margin-top: 0.5rem;
}
.btn-primary:hover:not(:disabled) { background: var(--gold-light); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--cream);
  border: 1px solid rgba(168,155,222,0.2);
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--soft-lavender); }

.btn-ghost {
  background: none;
  border: 1px solid rgba(168,155,222,0.2);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { color: var(--cream); border-color: var(--lavender); }

.btn-full { width: 100%; }

/* Error */
.form-error {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 0.875rem;
  padding: 0.875rem 1rem;
  margin-top: 0.5rem;
}

/* Dashboard */
.dashboard-page { padding: 4rem 0 6rem; }

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 2rem;
}

.dashboard-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 0.5rem;
}

.dashboard-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--cream);
  font-style: italic;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.3);
  border-radius: 20px;
  padding: 0.4rem 0.875rem;
  font-size: 0.8rem;
  color: #6ee7b7;
}
.profile-badge strong { color: var(--cream); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  max-width: 440px;
  margin: 0 auto;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: rgba(168,155,222,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--lavender);
}

.empty-state h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.empty-state p { color: var(--text-muted); margin-bottom: 2rem; font-weight: 300; }

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.dash-card {
  background: var(--twilight);
  border: 1px solid rgba(168,155,222,0.12);
  border-radius: 16px;
  padding: 1.75rem;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dash-card-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  font-style: italic;
}

.dash-edit-btn {
  font-size: 0.8rem;
  color: var(--soft-lavender);
  text-decoration: none;
  border: 1px solid rgba(196,181,253,0.3);
  border-radius: 8px;
  padding: 0.25rem 0.75rem;
  transition: all 0.2s;
}
.dash-edit-btn:hover { background: rgba(196,181,253,0.1); }

.arc-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245,158,11,0.12);
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
}

/* Profile details */
.profile-details { display: flex; flex-direction: column; gap: 0; }

.profile-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(168,155,222,0.08);
}
.profile-row:last-child { border-bottom: none; }

.profile-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  min-width: 90px;
  padding-top: 2px;
}

.profile-value {
  font-size: 0.9rem;
  color: var(--cream);
}

.avoid-val { color: #fca5a5; }

/* Story preview */
.story-preview { display: flex; flex-direction: column; gap: 0.75rem; }

.story-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-light);
  font-style: italic;
}

.story-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.6;
}

.story-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.no-story { display: flex; flex-direction: column; gap: 0.75rem; }
.no-story p { font-size: 0.9rem; color: var(--text-muted); font-weight: 300; }
.generate-status { font-size: 0.85rem; font-weight: 500; }

/* Archive */
.archive-section { margin-bottom: 2rem; }

.archive-list { display: flex; flex-direction: column; gap: 0; }

.archive-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(168,155,222,0.08);
}
.archive-row:last-child { border-bottom: none; }

.archive-date {
  flex: 0 0 40px;
  text-align: center;
}
.archive-day {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}
.archive-month {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.archive-info { flex: 1; }
.archive-title { font-size: 0.9rem; color: var(--cream); font-weight: 500; margin-bottom: 0.2rem; }
.archive-meta { font-size: 0.75rem; color: var(--text-muted); }

.word-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--lavender);
  background: rgba(168,155,222,0.1);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}

.archive-empty { padding: 2rem 0; text-align: center; }
.archive-empty p { font-size: 0.9rem; color: var(--text-muted); font-weight: 300; }

.dashboard-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .age-buttons { flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .auth-card, .form-card { padding: 32px 24px; }
  .dashboard-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .page-header-inner, .container { padding: 0 1.25rem; }
}