/* Auth + legal pages — matches hadexs.com Clerk-style screens */

.auth-body-page {
  font-family: "DM Sans", Inter, system-ui, sans-serif;
  background: #070708;
  min-height: 100vh;
}

.auth-body-page.light {
  --bg: #f4f4f5;
  --bg-elev: #ffffff;
  --bg-input: #f4f4f5;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --ink: #18181b;
  --mute: #52525b;
  --dim: #71717a;
  background: #f4f4f5;
}

.auth-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.8);
  color: var(--mute);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.auth-body-page.light .auth-theme-toggle {
  background: rgba(255, 255, 255, 0.9);
}

.auth-theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(1040px, 100%);
  min-height: min(640px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 40px 40px 28px;
}

.auth-panel-top .wordmark {
  letter-spacing: 0.22em;
  font-size: 0.78rem;
}

.auth-panel h2 {
  font-family: "DM Sans", Inter, system-ui, sans-serif;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin: 28px 0 6px;
}

.auth-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}

.auth-google-wrap {
  position: relative;
  padding-top: 6px;
}

.last-used-badge {
  position: absolute;
  top: 0;
  right: 10px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--mute);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.4;
}

.auth-panel .btn {
  height: 44px;
  border-radius: 10px;
}

.auth-panel .btn-primary {
  height: 44px;
  background: #f4f4f5;
  color: #09090b;
}

.auth-body-page.light .auth-panel .btn-primary {
  background: #18181b;
  color: #fafafa;
}

.auth-legal {
  max-width: 360px;
  margin: auto auto 0;
  padding-top: 24px;
  width: 100%;
  text-align: center;
  color: var(--dim);
  font-size: 0.74rem;
  line-height: 1.5;
}

.auth-legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal docs */
.legal-page {
  font-family: "DM Sans", Inter, system-ui, sans-serif;
  background: #070708;
  color: #f4f4f5;
  min-height: 100vh;
}

.legal-page.light {
  background: #fafafa;
  color: #18181b;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 7, 8, 0.88);
  backdrop-filter: blur(12px);
}

.legal-page.light .legal-header {
  background: rgba(250, 250, 250, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.legal-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a1a1aa;
  font-size: 0.88rem;
  font-weight: 500;
}

.legal-back:hover {
  color: inherit;
}

.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-main h1 {
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.legal-lead {
  color: #a1a1aa;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 36px;
}

.legal-page.light .legal-lead {
  color: #52525b;
}

.legal-section {
  margin-bottom: 28px;
}

.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.legal-section p,
.legal-section li {
  color: #a1a1aa;
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-page.light .legal-section p,
.legal-page.light .legal-section li {
  color: #52525b;
}

.legal-section ul {
  margin: 10px 0 0 1.15rem;
  display: grid;
  gap: 8px;
}

.legal-section a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-callout {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
  color: #c7d2fe;
  font-size: 0.9rem;
  line-height: 1.55;
}

.legal-page.light .legal-callout {
  color: #3730a3;
  background: rgba(99, 102, 241, 0.08);
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-visual {
    min-height: 220px;
  }

  .auth-panel {
    padding: 28px 22px 24px;
  }
}
