/**
 * Auth Pages — login / register / forgot-password
 * Focused full-height centered layout, CAMS2 card anatomy.
 * All values ride design tokens (var(--…)) — no raw colors here;
 * dark mode follows automatically via the semantic token flips.
 *
 * @author Amit Haridas, ConcreteInfo
 */

/* Card column — single 400px card on the gray canvas */
.auth-shell {
  width: 100%;
  max-width: 25rem; /* 400px */
}

/* The auth card */
.auth-panel {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
  padding: var(--spacing-6); /* 24px */
}

/* Brand lockup (logo mark + wordmark) inside the card */
.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  margin-bottom: var(--spacing-5);
}

.auth-brand-logo {
  /* Sized by height: the wordmark is 200x56, so a 32x32 box squeezed it to ~9px tall. */
  height: 32px;
  width: auto;
  max-width: 132px;
  object-fit: contain;
  flex-shrink: 0;
}

.auth-brand-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

.auth-brand-by {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-tight);
  color: var(--muted);
}

/* Heading + one-line subcopy */
.auth-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.auth-sub {
  margin-top: var(--spacing-1);
  margin-bottom: var(--spacing-5);
  font-size: var(--font-size-sm);
  color: var(--muted);
}

/* Footer link under the card */
.auth-footnote {
  margin-top: var(--spacing-6);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* "Or continue with" divider chip — rides the card surface in both modes */
.auth-divider-chip {
  background-color: var(--bg-elevated);
}

/* Flash (error/success) on auth pages — subtle card-width box.
   Tailwind handles spacing (mx-4 mt-6); this file owns width + centering. */
.auth-flash {
  max-width: 25rem; /* 400px — matches the card column */
  border-radius: var(--radius-xl);
}

@media (min-width: 640px) {
  .auth-flash {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Invite-only notice modal on register.php — CAMS2 panel anatomy
   (bespoke inline modal on that page; same chrome as components/modal.css) */
.auth-modal-panel {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.auth-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-height: auto; /* override base.css 44px touch target */
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.auth-modal-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* ==========================================================================
   Auth information panel — login.php / register.php
   Same visual language as the landing page (assets/css/homepage-v7.css):
   a light card with a hairline border on the grey canvas, one orange accent,
   greyscale structure. Light theme only — the auth pages have no dark variant
   because the card anatomy they sit in is light.

   Hidden below 1024px: a returning user on a phone should reach the email
   field without scrolling past decoration.
   ========================================================================== */
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 25rem) minmax(0, 31rem);
  gap: 3rem;
  /* start, not center — the two cards share a top edge instead of floating at
     unrelated heights, and the panel can then stick while a tall form scrolls */
  align-items: start;
  width: 100%;
  max-width: 63rem;
  /* Centres the pair when there is room, and does nothing when there is not.
     Replaces items-center on the parent, which clipped register.php's form
     above the fold and made the top unreachable by scrolling. */
  margin-block: auto;
}
@media (max-width: 1023px) {
  .auth-split { grid-template-columns: minmax(0, 25rem); justify-content: center; }
  .auth-info { display: none; }
}

/* Sticky so it stays alongside the form while a long one (register) scrolls,
   instead of stranding a short card beside a tall form. */
.auth-info {
  position: sticky;
  top: 2rem;
  background-color: var(--bg-elevated, #fff);
  border: 1px solid var(--border-default, #e3e3e3);
  border-radius: var(--radius-xl, 12px);
  box-shadow: var(--shadow-1, 0 1px 2px rgba(13, 11, 9, 0.05));
  padding: 1.75rem 1.625rem;
}

/* Matches the landing page's .eyebrow — mono, tracked, orange, with the
   18px dash rule in front of it. */
.ai-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin: 0 0 0.75rem;
}
.ai-eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--color-brand);
  flex: none;
}

.ai-title {
  font-family: var(--font-family-heading, 'Barlow Condensed', sans-serif);
  font-weight: 800;
  font-size: 2.125rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-primary, #0d0b09);
  margin: 0 0 1.5rem;
}
.ai-title .o { color: var(--color-brand); }

/* The rail and bars are inline SVG sized by their viewBox; without an explicit
   height they collapse on narrow columns — the same failure the landing hero
   had on mobile. */
.ai-rail { display: block; width: 100%; height: auto; margin-bottom: 1.5rem; }
.ai-bars { display: block; width: 100%; height: auto; margin-bottom: 1.375rem; }

.ai-stats {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid var(--border-default, #e3e3e3);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
}
.ai-stats > div { padding-right: 1.5rem; border-right: 1px solid var(--border-default, #e3e3e3); }
.ai-stats > div:last-child { border-right: 0; padding-right: 0; }
.ai-stats b {
  display: block;
  font-family: var(--font-family-heading, 'Barlow Condensed', sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-brand);
  margin-bottom: 0.3rem;
}
.ai-stats span {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.5625rem;
  line-height: 1.35;
  color: var(--muted, #9a9696);
  display: block;
}

.ai-lede {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary, #464646);
  margin: 0 0 1.125rem;
}

.ai-standards {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 1rem;
}
.ai-standards li {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.5625rem;
  letter-spacing: 0.04em;
  color: var(--muted, #9a9696);
  background: var(--bg-tertiary, #f1f1f1);
  border: 1px solid var(--border-default, #e3e3e3);
  border-radius: 4px;
  padding: 3px 7px;
}

.ai-foot {
  border-top: 1px solid var(--border-default, #e3e3e3);
  padding-top: 0.875rem;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary, #464646);
}
