/* ============================================================
   auth.css — Professional authentication pages
   Split layout: brand panel + form panel
   Inherits all variables from main.css
   ============================================================ */

/* ── Override the basic auth-page from main.css ────────────── */
.auth-page {
  padding: 0;
  background: var(--color-bg);
}

/* ── Floating theme toggle ─────────────────────────────────── */
.auth-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
  color: var(--color-text);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: var(--font-body);
}
.auth-theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* ── Split layout container ────────────────────────────────── */
.auth-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Brand panel (left side) ───────────────────────────────── */
.auth-brand-panel {
  flex: 0 0 44%;
  background: var(--color-header-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle grid texture overlay */
.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 340px;
}

.auth-brand-logo {
  margin-bottom: 1.5rem;
}
.auth-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-base);
}
.auth-logo-img:hover {
  transform: scale(1.08) rotate(-2deg);
}

.auth-brand-title {
  color: #f0f0f0;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.auth-brand-tagline {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

.auth-brand-runes {
  position: absolute;
  bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  z-index: 1;
  transition: color var(--transition-slow);
}
.auth-brand-runes:hover {
  color: rgba(255, 255, 255, 0.35);
}

/* ── Floating orbs (decorative) ────────────────────────────── */
.auth-brand-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
}
.auth-orb-1 {
  width: 240px;
  height: 240px;
  background: var(--color-accent);
  top: -40px;
  right: -60px;
  animation: auth-float 8s ease-in-out infinite;
}
.auth-orb-2 {
  width: 180px;
  height: 180px;
  background: var(--color-accent-2);
  bottom: 10%;
  left: -30px;
  animation: auth-float 10s ease-in-out infinite reverse;
}
.auth-orb-3 {
  width: 120px;
  height: 120px;
  background: var(--color-success);
  top: 55%;
  right: 15%;
  animation: auth-float 12s ease-in-out infinite 2s;
}

@keyframes auth-float {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(12px, -18px); }
  66%      { transform: translate(-8px, 10px); }
}

/* ── Form panel (right side) ───────────────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--color-bg);
  transition: background var(--transition-base);
}

.auth-form-wrapper {
  width: 100%;
  max-width: 400px;
}

/* ── Form header ───────────────────────────────────────────── */
.auth-form-header {
  margin-bottom: 2rem;
}
.auth-form-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.auth-form-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* ── Form fields ───────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.4rem;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.75rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-bg-raised);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.auth-input-wrapper input::placeholder {
  color: var(--color-text-muted);
}
.auth-input-wrapper input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  background: var(--color-bg);
}
.auth-input-wrapper input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
  color: var(--color-accent);
}

/* ── Submit button ─────────────────────────────────────────── */
.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  margin-top: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.auth-submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.auth-submit-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 111, 165, 0.3);
}
.auth-submit-btn:hover::after {
  transform: translateX(100%);
}
.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.auth-submit-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}
.auth-submit-btn:hover svg {
  transform: translateX(3px);
}

/* ── Divider ───────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.75rem 0;
  gap: 1rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.auth-divider span {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Secondary / outline button ────────────────────────────── */
.auth-secondary-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-accent);
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.auth-secondary-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* ── Footnote link ─────────────────────────────────────────── */
.auth-footnote {
  margin-top: 1.5rem;
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
.auth-footnote a {
  color: var(--color-accent);
  font-weight: 500;
}
.auth-footnote a:hover {
  text-decoration: underline;
}


/* ============================================================
   Responsive
   ============================================================ */

/* Tablet: stack brand on top */
@media (max-width: 900px) {
  .auth-split {
    flex-direction: column;
  }

  .auth-brand-panel {
    flex: 0 0 auto;
    padding: 2.5rem 2rem 2rem;
    min-height: auto;
  }

  .auth-brand-title {
    font-size: 1.6rem;
  }
  .auth-brand-tagline {
    font-size: 0.95rem;
  }

  .auth-orb-1 { width: 160px; height: 160px; }
  .auth-orb-2 { width: 120px; height: 120px; }
  .auth-orb-3 { width: 80px;  height: 80px; }

  .auth-form-panel {
    padding: 2rem 1.5rem 3rem;
  }
}

/* Small phone: tighten up */
@media (max-width: 480px) {
  .auth-brand-panel {
    padding: 2rem 1.5rem 1.5rem;
  }
  .auth-logo-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .auth-brand-title {
    font-size: 1.3rem;
  }
  .auth-brand-tagline {
    font-size: 0.85rem;
  }

  .auth-form-panel {
    padding: 1.5rem 1.25rem 2.5rem;
  }

  .auth-form-header h2 {
    font-size: 1.4rem;
  }

  .auth-input-wrapper input {
    padding: 0.65rem 0.8rem 0.65rem 2.5rem;
    font-size: var(--font-size-sm);
  }

  .auth-submit-btn {
    padding: 0.75rem 1rem;
  }

  .auth-theme-toggle {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}
