/* ===== Auth Layout ===== */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* Left decorative panel */
.auth-side {
  width: 420px;
  flex-shrink: 0;
  background: var(--ink);
  color: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(138, 154, 91, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(212, 163, 115, 0.08) 0%, transparent 50%);
}

.auth-side-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
}

.auth-logo {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--parchment);
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 0.5rem;
}

.auth-side-tagline {
  font-family: 'Lora', serif;
  font-style: italic;
  color: var(--sage);
  font-size: 1rem;
  letter-spacing: 0.03em;
}

/* Scribius quill */
.auth-quill {
  margin-top: 3rem;
  color: var(--amber);
  opacity: 0.6;
}

.auth-quill svg {
  display: block;
  margin: 0 auto 0.8rem;
}

.auth-quill-label {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(249, 247, 242, 0.4);
  transition: opacity 0.4s ease;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Auth error message */
.auth-error {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: #c0392b;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

/* Shelf at bottom */
.auth-shelf {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 5px;
  opacity: 0.3;
}

/* ===== Right side (form) ===== */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

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

.auth-title {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  color: var(--charcoal);
  font-size: 1rem;
  margin-bottom: 2rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(26, 35, 46, 0.15);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input::placeholder {
  color: rgba(62, 62, 62, 0.4);
}

.form-group input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.12);
}

/* Password field wrap + toggle */
.pw-field-wrap {
  position: relative;
}

.pw-field-wrap input {
  padding-right: 2.5rem;
}

.auth-pw-toggle {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--charcoal);
  opacity: 0.35;
  cursor: pointer;
  padding: 2px;
  display: flex;
  transition: opacity 0.15s;
}

.auth-pw-toggle:hover {
  opacity: 0.7;
}

.auth-forgot {
  font-size: 0.85rem;
  color: var(--sage);
  text-align: right;
  margin-top: -0.5rem;
  transition: color 0.2s;
}

.auth-forgot:hover {
  color: var(--sage-hover);
}

/* Submit button */
.auth-submit {
  padding: 0.8rem;
  background: var(--sage);
  color: var(--parchment);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  margin-top: 0.3rem;
}

.auth-submit:hover {
  background: var(--sage-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 154, 91, 0.25);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(26, 35, 46, 0.1);
}

.auth-divider span {
  font-size: 0.85rem;
  color: var(--charcoal);
}

/* Social login */
.auth-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--paper);
  border: 1px solid rgba(26, 35, 46, 0.12);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.auth-social:hover {
  background: var(--parchment);
  border-color: rgba(26, 35, 46, 0.2);
  transform: translateY(-1px);
}

/* Switch link */
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.auth-switch a {
  color: var(--sage);
  font-weight: 500;
  transition: color 0.2s;
}

.auth-switch a:hover {
  color: var(--sage-hover);
}

/* ===== Page Transition ===== */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--parchment);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
  }

  .auth-side {
    width: 100%;
    padding: 2rem 1.5rem;
  }

  .auth-logo {
    font-size: 1.6rem;
  }

  .auth-quill {
    display: none;
  }

  .auth-shelf {
    display: none;
  }

  .auth-main {
    padding: 2rem 1.2rem 3rem;
  }

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

  .auth-subtitle {
    font-size: 0.92rem;
  }

  .form-group input {
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
  }

  .auth-submit {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
}
