/* ==========================================================================
   TIME CYCLE - Authentication Stylesheet (auth.css)
   Theme: High-end Financial Astrology & Gann Theory SaaS
   Palette: Cosmic Navy / Obsidian Black / Luminous Gold
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-deep: #020812;
  --bg-dark: #06111F;
  --bg-surface: #081525;
  --bg-card: rgba(8, 21, 37, 0.78);
  --bg-card-hover: rgba(14, 32, 56, 0.9);
  --bg-input: rgba(4, 12, 24, 0.75);
  --bg-input-focus: rgba(6, 17, 33, 0.95);

  /* Gold Brand Accents */
  --gold-primary: #F5B82E;
  --gold-light: #FFCA4D;
  --gold-dark: #D99A1E;
  --gold-glow: rgba(245, 184, 46, 0.35);
  --gold-subtle: rgba(245, 184, 46, 0.12);
  --gold-border: rgba(245, 184, 46, 0.22);
  --gold-border-focus: rgba(245, 184, 46, 0.65);

  /* Alert Colors */
  --color-error: #EF4444;
  --bg-error: rgba(239, 68, 68, 0.12);
  --border-error: rgba(239, 68, 68, 0.35);
  --color-success: #10B981;
  --bg-success: rgba(16, 185, 129, 0.12);
  --border-success: rgba(16, 185, 129, 0.35);

  /* Typography Colors */
  --text-pure: #FFFFFF;
  --text-main: #F5F5F5;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --text-dark: #020812;

  /* Typography */
  --font-display: 'Cinzel', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(245, 184, 46, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(30, 58, 138, 0.16) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(6, 17, 31, 0.8) 0%, transparent 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

/* Background Ambient Orbs */
.ambient-glow-1 {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 184, 46, 0.12), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-2 {
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(30, 58, 138, 0.2), transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

/* Gold Text Utility */
.gold-text {
  color: var(--gold-primary);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Main Container Layout */
.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: auto;
}

.auth-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 3.5rem;
}

/* --------------------------------------------------------------------------
   Left Column: Branding & Cosmic Presentation
   -------------------------------------------------------------------------- */
.auth-brand-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-right: 1.5rem;
}

.auth-brand-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.brand-link-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(245, 184, 46, 0.18), transparent 70%);
  box-shadow: 0 0 16px rgba(245, 184, 46, 0.25);
  transition: var(--transition-normal);
  flex-shrink: 0;
}

.brand-link-auth:hover .brand-icon-wrapper {
  transform: rotate(30deg) scale(1.05);
  box-shadow: 0 0 22px var(--gold-glow);
}

.brand-icon-svg {
  width: 24px;
  height: 24px;
  color: var(--gold-primary);
}

.brand-title-auth {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-pure);
  line-height: 1.1;
}

.brand-tagline-auth {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold-primary);
  opacity: 0.95;
}

.auth-brand-tagline-main {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-pure);
  margin-top: 0.5rem;
}

.auth-brand-desc {
  font-size: 0.95rem;
  color: #CBD5E1;
  line-height: 1.7;
}

/* Cosmic Visual Badge Container */
.auth-cosmic-visual {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-visual-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(245, 184, 46, 0.3);
  box-shadow: 
    0 0 40px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(245, 184, 46, 0.2);
}

.auth-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Right Column: Login Card
   -------------------------------------------------------------------------- */
.auth-card-wrapper {
  width: 100%;
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(245, 184, 46, 0.15);
  transition: border-color var(--transition-normal);
  position: relative;
}

.auth-card:hover {
  border-color: rgba(245, 184, 46, 0.35);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.auth-card-subtitle {
  font-size: 0.92rem;
  color: #94A3B8;
}

/* Alert Boxes */
.alert-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-box.alert-error {
  background: var(--bg-error);
  border: 1px solid var(--border-error);
  color: #FCA5A5;
}

.alert-box.alert-success {
  background: var(--bg-success);
  border: 1px solid var(--border-success);
  color: #6EE7B7;
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #E2E8F0;
  letter-spacing: 0.02em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-left {
  position: absolute;
  left: 1.1rem;
  color: var(--gold-primary);
  opacity: 0.85;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.form-input {
  width: 100%;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid rgba(245, 184, 46, 0.2);
  border-radius: var(--radius-md);
  padding: 0 1.1rem 0 2.85rem;
  color: var(--text-pure);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
  color: #64748B;
}

.form-input:focus {
  background: var(--bg-input-focus);
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px rgba(245, 184, 46, 0.25);
}

.form-input.has-error {
  border-color: var(--color-error);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

/* Password Show / Hide Toggle Button */
.password-toggle-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--gold-primary);
  background: rgba(245, 184, 46, 0.1);
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* Inline Error Text */
.field-error-text {
  font-size: 0.78rem;
  color: #F87171;
  margin-top: 0.25rem;
  display: none;
}

.field-error-text.visible {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

/* Forgot Password Row */
.form-extra-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: -0.5rem;
  margin-bottom: 1.6rem;
}

.forgot-password-link {
  font-size: 0.84rem;
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.forgot-password-link:hover {
  color: #FFE082;
  text-decoration: underline;
}

/* Submit Login Button */
.btn-auth-submit {
  width: 100%;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid var(--gold-light);
  box-shadow: 0 6px 24px rgba(245, 184, 46, 0.35);
  cursor: pointer;
  transition: var(--transition-normal);
  text-transform: uppercase;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 184, 46, 0.5);
  background: linear-gradient(135deg, #FFE082 0%, var(--gold-light) 100%);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.btn-auth-submit .btn-arrow {
  transition: transform var(--transition-fast);
  font-size: 1.1rem;
}

.btn-auth-submit:hover .btn-arrow {
  transform: translateX(4px);
}

/* Sign Up Row */
.auth-footer-prompt {
  text-align: center;
  margin-top: 1.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.signup-link-highlight {
  color: var(--gold-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.35rem;
  transition: color var(--transition-fast);
}

.signup-link-highlight:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Back to Home Link */
.auth-back-nav {
  text-align: center;
  margin-top: 1.5rem;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: #94A3B8;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.back-home-link:hover {
  color: var(--gold-primary);
}

/* --------------------------------------------------------------------------
   Responsive Layout Media Queries
/* --------------------------------------------------------------------------
   Signup Specific Layout & Components
   -------------------------------------------------------------------------- */
.auth-wrapper.signup-wrapper {
  max-width: 1180px;
}

.auth-layout-grid.signup-grid {
  grid-template-columns: 0.95fr 1.05fr;
  gap: 3.5rem;
}

/* Cosmic Left Presentation for Signup */
.auth-cosmic-presentation {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
}

.cosmic-art-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cosmic-art-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 25px rgba(245, 184, 46, 0.25));
}

.auth-brand-center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.brand-main-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-primary);
  background: linear-gradient(135deg, #FFF6D6 0%, var(--gold-light) 40%, var(--gold-primary) 70%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(245, 184, 46, 0.4);
  line-height: 1.2;
}

.brand-main-tagline {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #E2E8F0;
}

.brand-star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  color: var(--gold-primary);
  width: 100%;
}

.brand-star-divider::before,
.brand-star-divider::after {
  content: '';
  height: 1px;
  width: 45px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.brand-subtext {
  font-size: 0.95rem;
  color: #94A3B8;
  max-width: 320px;
  line-height: 1.55;
}

/* Two-column Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

/* Star Divider Inside Card */
.card-star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.6rem auto 1.25rem;
  color: var(--gold-primary);
}

.card-star-divider::before,
.card-star-divider::after {
  content: '';
  height: 1px;
  width: 50px;
  background: linear-gradient(90deg, transparent, rgba(245, 184, 46, 0.5), transparent);
}

/* Live Password Requirements */
.password-reqs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: -0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.76rem;
  color: #64748B;
}

.req-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  transition: color var(--transition-fast);
}

.req-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: transparent;
  flex-shrink: 0;
}

.req-icon svg {
  width: 9px;
  height: 9px;
}

.req-item.satisfied {
  color: #34D399;
}

.req-item.satisfied .req-icon {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

/* Terms Checkbox */
.terms-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  font-size: 0.85rem;
  color: #94A3B8;
  cursor: pointer;
  user-select: none;
  line-height: 1.45;
}

.terms-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(245, 184, 46, 0.35);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-content: center;
}

.terms-checkbox:checked {
  background: var(--gold-primary);
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(245, 184, 46, 0.35);
}

.terms-checkbox:checked::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #020812;
  border-bottom: 2px solid #020812;
  transform: rotate(-45deg) translate(1px, -1px);
}

.terms-group a {
  color: var(--gold-primary);
  text-decoration: underline;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.terms-group a:hover {
  color: var(--gold-light);
}

/* "OR" Divider */
.auth-divider-or {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0 1rem;
  color: #64748B;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-divider-or::before,
.auth-divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(245, 184, 46, 0.15);
}

.auth-divider-or span {
  padding: 0 0.85rem;
}

/* --------------------------------------------------------------------------
   Responsive Layout Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .auth-layout-grid,
  .auth-layout-grid.signup-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .auth-brand-column,
  .auth-cosmic-presentation {
    padding-right: 0;
    align-items: center;
    text-align: center;
  }

  .auth-brand-header {
    align-items: center;
  }

  .auth-cosmic-visual,
  .cosmic-art-container {
    display: none; /* Keep focus cleanly on the form on smaller screens */
  }

  .auth-card {
    padding: 2.2rem 1.75rem;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .password-reqs {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1.25rem 0.75rem;
  }

  .auth-card {
    padding: 1.85rem 1.25rem;
    border-radius: var(--radius-md);
  }

  .auth-card-title {
    font-size: 1.6rem;
  }
}

