/* ============================================================
 * ESP32 WebBuilder — Sign In / Sign Up Page
 * Copyright © 2026 G9Six, LLC. All rights reserved.
 *
 * Reuses the lp-* palette and shell classes (.lp-header, .lp-logo,
 * .lp-nav, .lp-footer) from the landing page so the visual identity
 * is continuous — the user feels like they're inside the same product.
 * Auth-specific styles are namespaced .auth-*.
 * ============================================================ */

:root {
  --lp-bg:        #f9fafc;
  --lp-panel:     #e7ecf3;
  --lp-panel-2:   #d6dee8;
  --lp-line:      #bac6d6;
  --lp-ink:       #23303d;
  --lp-dim:       #5d7186;
  --lp-accent:    #1f7fd6;
  --lp-accent-dim:#4a93d8;
  --lp-accent-text:#ffffff;
  --lp-grid-dot:  #aebccd;
  --lp-warn:      #b06d12;
  --lp-error:     #c0392b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.55;
  display: flex; flex-direction: column;
  background-image: radial-gradient(circle, var(--lp-grid-dot) 1px, transparent 1.4px);
  background-size: 26px 26px;
  background-attachment: fixed;
}
a { color: var(--lp-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
 * Shared shell — mirrors landing.css so the header/footer feel
 * identical. Kept in sync by hand; if you change one, change both.
 * ============================================================ */
.lp-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(231, 236, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--lp-line);
}
.lp-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 14px;
  color: var(--lp-accent); letter-spacing: 0.04em;
}
.lp-logo::before { content: "▶ "; color: var(--lp-accent-dim); }
.lp-logo:hover { text-decoration: none; }
.lp-nav { display: flex; align-items: center; gap: 24px; }
.lp-nav-link {
  color: var(--lp-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.lp-nav-link:hover { color: var(--lp-ink); text-decoration: none; }

.lp-footer {
  border-top: 1px solid var(--lp-line);
  background: var(--lp-panel);
  padding: 18px 32px;
  font-size: 11px;
  color: var(--lp-dim);
}
.lp-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
}
.lp-footer-links a { color: var(--lp-dim); }
.lp-footer-links a:hover { color: var(--lp-accent); }

/* ============================================================
 * Auth card layout
 * ============================================================ */
.auth-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--lp-panel);
  border: 1px solid var(--lp-line);
  border-radius: 4px;
  padding: 36px 32px 28px;
  box-shadow: 0 8px 32px rgba(35, 48, 61, 0.08);
}
.auth-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; font-weight: 700;
  color: var(--lp-ink); letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.auth-subtitle {
  font-size: 13px; color: var(--lp-dim);
  margin: 0 0 24px;
}

/* Pre-launch coming-soon image, sits at the top of the auth-card
   above the title. Square asset; capped so a tall image doesn't push
   the form below the fold. */
.auth-coming-soon {
  display: block;
  margin: -8px auto 18px;
  width: 100%; max-width: 260px;
  height: auto;
  border-radius: 4px;
}

/* ============================================================
 * OAuth provider buttons (Google / GitHub) — sit above the email
 * form and the tab strip. Each button has a small inline-SVG glyph
 * on the left and a uniform label.
 * ============================================================ */
.auth-providers {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.auth-provider {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--lp-bg);
  color: var(--lp-ink);
  border: 1px solid var(--lp-line);
  border-radius: 2px;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.auth-provider:hover  { border-color: var(--lp-accent); }
.auth-provider:disabled {
  opacity: 0.55; cursor: not-allowed; border-color: var(--lp-line);
}
.auth-provider-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
}
/* GitHub icon uses currentColor; keep it on the ink color. Google's
   own brand colors live in its inline SVG and need no override. */
.auth-provider-github .auth-provider-icon { color: var(--lp-ink); }

/* "or with email" rule under the provider buttons. */
.auth-divider {
  display: flex; align-items: center;
  color: var(--lp-dim); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 8px 0 18px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: ""; flex: 1; border-top: 1px solid var(--lp-line);
}
.auth-divider span { padding: 0 10px; }

/* ============================================================
 * Tabs
 * ============================================================ */
.auth-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--lp-line);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  background: transparent; color: var(--lp-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.auth-tab:hover { color: var(--lp-ink); }
.auth-tab.active {
  color: var(--lp-accent);
  border-bottom-color: var(--lp-accent);
}
/* Disabled sign-up tab during private beta. Stays in the strip for
   layout but reads as inert: muted color, no hover, not-allowed cursor. */
.auth-tab.is-disabled {
  color: var(--lp-dim);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.auth-tab.is-disabled:hover { color: var(--lp-dim); }

/* Small note under the tab strip explaining why sign-up is off. */
.auth-beta-note {
  font-size: 11px;
  color: var(--lp-dim);
  text-align: center;
  margin: -16px 0 18px;
  letter-spacing: 0.02em;
}

/* ============================================================
 * Form fields
 * ============================================================ */
.auth-form {
  display: flex; flex-direction: column; gap: 14px;
}
/* `display: flex` above outranks the browser's [hidden] { display: none }
   default. Restore the hide behavior explicitly so swapping tabs works. */
.auth-form[hidden] { display: none; }
.auth-field {
  display: flex; flex-direction: column; gap: 6px;
}
.auth-label {
  font-size: 11px;
  color: var(--lp-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-optional {
  text-transform: none; letter-spacing: 0;
  font-size: 10px; color: var(--lp-dim);
  opacity: 0.7;
}
.auth-field input {
  background: var(--lp-bg);
  color: var(--lp-ink);
  border: 1px solid var(--lp-line);
  border-radius: 2px;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.12s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--lp-accent);
}

/* ============================================================
 * Error box — hidden until something to say. Stays in the DOM
 * so the layout doesn't jump when an error appears.
 * ============================================================ */
.auth-error {
  font-size: 12px;
  color: var(--lp-error);
  padding: 0;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.12s;
}
.auth-error.visible {
  opacity: 1;
  padding: 6px 10px;
  border-left: 2px solid var(--lp-error);
  background: rgba(192, 57, 43, 0.06);
  min-height: 22px;
}

/* Positive notice — used to confirm "verification email sent" after a
   sign-up. Mirrors .auth-error's shape but in the accent color so it
   reads as success rather than failure. */
.auth-info {
  font-size: 12px;
  color: var(--lp-accent);
  padding: 0; min-height: 0; opacity: 0;
  transition: opacity 0.12s;
}
.auth-info.visible {
  opacity: 1;
  padding: 6px 10px;
  border-left: 2px solid var(--lp-accent);
  background: rgba(31, 127, 214, 0.08);
  min-height: 22px;
}

/* ============================================================
 * Submit button + aux links
 * ============================================================ */
.auth-submit {
  background: var(--lp-accent);
  color: var(--lp-accent-text);
  border: 1px solid var(--lp-accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 12px 18px;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.12s, border-color 0.12s;
}
.auth-submit:hover {
  background: var(--lp-accent-dim);
  border-color: var(--lp-accent-dim);
}
.auth-aux {
  display: flex; justify-content: space-between;
  font-size: 11px;
  margin-top: 2px;
}
.auth-link { color: var(--lp-accent); }
.auth-link:hover { text-decoration: underline; }

.auth-fineprint {
  font-size: 10px;
  color: var(--lp-dim);
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--lp-line);
  text-align: center;
  line-height: 1.5;
}

/* ============================================================
 * Small screens
 * ============================================================ */
@media (max-width: 480px) {
  .lp-header { padding: 12px 16px; }
  .auth-main { padding: 30px 14px; }
  .auth-card { padding: 28px 22px 22px; }
}
