/* Recently — sign in, onboarding and account deletion.

   Sign-in uses a two-column split: a dark violet panel carrying the brand on
   the left, the form on the right. A lone centred card on a white page is the
   default every auth template ships with, and it is exactly the "generic SaaS"
   look the brief rules out. Onboarding and delete keep the single-column
   layout (.au-shell-solo), because both are reached from inside the product
   where the brand panel would just be noise. */

.au-split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* --- brand panel --------------------------------------------------------- */

.au-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--app-space-7);
  padding: var(--app-space-7) var(--app-space-7) var(--app-space-6);
  background: var(--app-fg);
  color: #fff;
  overflow: hidden;
}

.au-aside-glow {
  position: absolute;
  left: -30%;
  bottom: -25%;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 74, 255, 0.55) 0%, rgba(109, 74, 255, 0.12) 48%, transparent 70%);
  pointer-events: none;
}

.au-aside > *:not(.au-aside-glow) { position: relative; }

.au-quote {
  margin: 0;
  font-size: var(--app-text-3xl);
  line-height: 1.05;
  color: #fff;
}

/* Same skewed marker device as the landing hero, inverted for a dark panel. */
.au-quote-mark {
  position: relative;
  white-space: nowrap;
}

.au-quote-mark::before {
  content: "";
  position: absolute;
  inset: 0.1em -0.25em 0.08em;
  background: var(--app-lime);
  transform: skew(-10deg) rotate(-0.8deg);
  z-index: -1;
}

.au-quote-mark { color: var(--app-fg); }

.au-aside-list {
  display: grid;
  gap: var(--app-space-3);
  margin: var(--app-space-6) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--app-text-sm);
  color: rgba(255, 255, 255, 0.72);
}

.au-aside-list li {
  display: flex;
  align-items: center;
  gap: var(--app-space-3);
}

.au-aside-list span {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(194, 240, 76, 0.16);
  color: var(--app-lime);
  font-size: 11px;
  font-weight: 700;
}

.au-aside-foot {
  margin: 0;
  font-size: var(--app-text-sm);
  color: rgba(255, 255, 255, 0.45);
}

/* --- form column --------------------------------------------------------- */

.au-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: var(--app-space-7) var(--app-space-5);
}

.au-shell-solo {
  min-height: 100vh;
  max-width: 34rem;
}

.au-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  align-self: flex-start;
  font-family: var(--app-font-display);
  font-weight: 700;
  font-size: var(--app-text-lg);
  letter-spacing: -0.03em;
  color: var(--app-fg);
  text-decoration: none;
}

.au-wordmark-light { color: #fff; }

.au-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-accent);
}

.au-wordmark-light .au-dot { background: var(--app-lime); }

/* Only shown when the brand panel is hidden on narrow screens. */
.au-wordmark-mobile { display: none; }

.au-head { margin: var(--app-space-7) 0 var(--app-space-5); }

.au-head h1 {
  margin: var(--app-space-2) 0 0;
  font-size: var(--app-text-3xl);
  line-height: 1.05;
}

.au-head > p:last-child {
  margin: var(--app-space-3) 0 0;
  color: var(--app-fg-muted);
}

.au-card {
  padding: var(--app-space-6);
  border-radius: var(--app-radius-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow-lg);
}

.au-card-danger {
  /* A flat coral edge rather than a red-tinted card: it flags severity without
     making the body copy hard to read. */
  /* border-top: 4px solid var(--app-negative); */
}

.au-stack {
  display: grid;
  gap: var(--app-space-4);
}

.au-block { width: 100%; }

.au-field { display: grid; gap: var(--app-space-2); }

.au-subhead {
  margin: 0 0 var(--app-space-3);
  font-family: var(--app-font-display);
  font-weight: 700;
  font-size: var(--app-text-lg);
  letter-spacing: -0.02em;
}

.au-list {
  display: grid;
  gap: var(--app-space-2);
  margin: 0;
  padding-left: var(--app-space-5);
  font-size: var(--app-text-sm);
  color: var(--app-fg-muted);
}

.au-hint,
.au-fieldstatus {
  margin: 0;
  font-size: var(--app-text-xs);
  color: var(--app-fg-subtle);
}

.au-fieldstatus { min-height: 1rem; font-weight: 600; }
.au-fieldstatus[data-state="ok"] { color: var(--app-positive); }
.au-fieldstatus[data-state="taken"],
.au-fieldstatus[data-state="invalid"] { color: var(--app-negative); }

.au-confirm-hint {
  margin: 0;
  font-size: var(--app-text-sm);
  color: var(--app-fg-muted);
}

.au-confirm-hint code {
  padding: 2px 7px;
  border-radius: var(--app-radius-sm);
  background: var(--app-surface-sunk);
  font-family: var(--app-font-mono);
  font-size: 0.9em;
  font-weight: 600;
  color: var(--app-fg);
}

/* --- username field ------------------------------------------------------ */

.au-username {
  display: flex;
  align-items: center;
  padding: 0 var(--app-space-4);
  border: 1.5px solid var(--app-border-strong);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.au-username:focus-within {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 4px var(--app-accent-soft);
}

.au-username > span {
  font-size: var(--app-text-sm);
  font-weight: 600;
  color: var(--app-fg-subtle);
  white-space: nowrap;
}

.au-username input {
  flex: 1;
  min-width: 0;
  padding: var(--app-space-3) 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--app-fg);
}

.au-username input:focus { outline: none; }

/* --- oauth buttons ------------------------------------------------------- */

/* Two up, because Google and Microsoft are peers and stacking them makes the
   card taller than the form it introduces. Below the phone breakpoint they go
   one per row -- side by side the labels start truncating. */
.au-oauth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--app-space-3);
}

.au-oauth-btn {
  /* Provider names are short, so the default pill padding leaves the logo and
     label floating. Tighten it and let the grid set the width. */
  width: 100%;
  padding-inline: var(--app-space-3);
  font-size: var(--app-text-sm);
}

.au-oauth-logo {
  width: 18px;
  height: 18px;
  flex: none;
}

/* --- divider ------------------------------------------------------------- */

.au-divider {
  display: flex;
  align-items: center;
  gap: var(--app-space-3);
  margin: var(--app-space-5) 0;
  color: var(--app-fg-subtle);
  font-size: var(--app-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.au-divider::before,
.au-divider::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: var(--app-border);
}

/* --- status and footers -------------------------------------------------- */

.au-status {
  margin: var(--app-space-4) 0 0;
  min-height: 1.25rem;
  font-size: var(--app-text-sm);
  font-weight: 500;
  color: var(--app-fg-muted);
}

.au-status[data-state="error"] { color: var(--app-negative); }
.au-status[data-state="ok"] { color: var(--app-positive); }

.au-error {
  margin: 0 0 var(--app-space-4);
  padding: var(--app-space-3) var(--app-space-4);
  border-radius: var(--app-radius-sm);
  background: var(--app-negative-soft);
  color: #8c1d20;
  font-size: var(--app-text-sm);
  font-weight: 600;
}

.au-fine,
.au-alt {
  margin: var(--app-space-5) 0 0;
  font-size: var(--app-text-sm);
  color: var(--app-fg-subtle);
}

/* Sits inside the card under the status line rather than between cards, so it
   needs the gap of a sibling paragraph, not of a new section. */
.au-alt-tight { margin-top: var(--app-space-2); }

/* --- verification and reset steps ---------------------------------------- */

.au-verify-actions {
  margin-top: var(--app-space-5);
  gap: var(--app-space-3);
}

/* The primary action here is sometimes an <a>, which is not a flex item of the
   grid's making -- without this it shrink-wraps its text. */
.au-verify-actions > .app-btn { width: 100%; }

.au-verify-hint { margin-top: var(--app-space-3); }

.au-fine a,
.au-alt a {
  color: var(--app-fg-muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.au-fine a:hover,
.au-alt a:hover { color: var(--app-accent); }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .au-split { grid-template-columns: 1fr; min-height: auto; }
  /* The brand panel is decorative, so it is dropped rather than stacked --
     stacking it would push the form below the fold on a phone. */
  .au-aside { display: none; }
  .au-wordmark-mobile { display: inline-flex; }
  .au-shell { min-height: 100vh; }
}

@media (max-width: 560px) {
  .au-shell { padding: var(--app-space-6) var(--app-space-4); }
  .au-card { padding: var(--app-space-5); }
  .au-head { margin-top: var(--app-space-6); }
  .au-head h1 { font-size: var(--app-text-2xl); }
  /* Side by side the provider labels start truncating at this width. */
  .au-oauth { grid-template-columns: 1fr; }
}
