/* ============================================================
   fMMA AUTH PAGES
   Shared styles for login.html and signup.html.
   ============================================================ */

body {
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
}

/* ----------------------------------------------------------
   AUTH NAV (minimal)
   ---------------------------------------------------------- */
.auth-nav {
  background: var(--palette-black);
  border-bottom: 3px solid var(--accent);
  padding: 0 var(--space-5);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.75rem;
  color: var(--text-on-dark);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.auth-logo em {
  color: var(--accent);
  font-style: normal;
}

.auth-back {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-back:hover {
  color: var(--text-on-dark);
}

/* ----------------------------------------------------------
   AUTH LAYOUT
   ---------------------------------------------------------- */
.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-height));
}

/* Left panel — dark brand side */
.auth-brand {
  background: var(--palette-black);
  padding: var(--space-10) var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-on-dark);
  margin-bottom: var(--space-4);
}

.auth-brand-title em {
  color: var(--accent);
  font-style: normal;
}

.auth-brand-sub {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  max-width: 360px;
  margin-bottom: var(--space-8);
}

.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth-brand-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.auth-brand-feature-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-brand-feature-text {
  font-size: 0.875rem;
  color: var(--text-on-dark-muted);
  line-height: 1.5;
}

.auth-brand-feature-text strong {
  color: var(--text-on-dark);
  font-weight: 600;
}

/* Right panel — form side */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  background: var(--bg-page);
}

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

/* ----------------------------------------------------------
   AUTH FORM
   ---------------------------------------------------------- */
.auth-form-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.auth-form-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color var(--transition-fast);
  border-radius: 0;
  -webkit-appearance: none;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-input.error {
  border-color: var(--accent);
}

.auth-field-error {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
  display: none;
}

.auth-field-error.visible {
  display: block;
}

.auth-submit {
  width: 100%;
  height: 48px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--text-on-dark);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  margin-top: var(--space-2);
}

.auth-submit:hover:not(:disabled) {
  background: var(--accent-dark);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-general-error {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  background: var(--accent-muted);
  border-left: 3px solid var(--accent);
  display: none;
}

.auth-general-error.visible {
  display: block;
}

/* Links below form */
.auth-form-footer {
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: center;
}

.auth-form-footer p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-form-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-form-footer a:hover {
  text-decoration: underline;
}

/* Password reset modal */
.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.auth-modal-overlay.open {
  display: flex;
}

.auth-modal {
  background: var(--bg-surface);
  border-top: 4px solid var(--accent);
  width: 100%;
  max-width: 420px;
  padding: var(--space-6);
}

.auth-modal-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.auth-modal-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.auth-modal-close {
  float: right;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: -4px;
}

.auth-modal-close:hover {
  color: var(--text-primary);
}

.auth-success-msg {
  font-size: 0.875rem;
  color: var(--status-good);
  font-weight: 500;
  display: none;
}

.auth-success-msg.visible {
  display: block;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none; /* hide brand panel on mobile */
  }

  .auth-form-panel {
    padding: var(--space-6) var(--space-4);
    align-items: flex-start;
    padding-top: var(--space-8);
  }
}
