/*
 * Webway Live Chat — unauthenticated pages (/login, /register, /invite/**).
 * Tokens come verbatim from the "Sticky Auth" Claude Design canvas
 * (design-import/Sticky Auth.dc.html): a two-panel split — near-black #2A2A28
 * marketing panel on the left carrying the webway.chat wordmark, an uppercase
 * display headline and four rotated sticker chips; a cream #F1EDE2 form panel
 * on the right over a dotted grid, with pill tabs, letter-spaced micro labels,
 * #FFFCF4 inputs and a pill CTA that flips to hot pink on hover.
 *
 * Deliberately standalone — it does NOT load app.css. The agent app is a dark
 * theme (`color-scheme: dark` at :root); this design is light, and mixing the
 * two would hand the native form controls, autofill and scrollbars the wrong
 * scheme. Anything these pages need is defined here.
 */

:root {
  color-scheme: light;

  --au-bg: #F1EDE2;
  --au-panel: #2A2A28;
  --au-panel-text: #F4EEE0;
  --au-ink: #141414;
  --au-muted: #655d52;
  --au-line: #d8d2c3;
  --au-line-2: #E7E1D2;
  --au-input: #FFFCF4;

  --au-yellow: #FFD400;
  --au-pink: #FF2E93;
  --au-green: #3f8f6a;
  --au-amber: #E9A92B;

  --au-r-pill: 999px;
  --au-r-field: 12px;
  --au-r-chip: 16px;
  --au-r-sticker: 5px;

  --au-font: Barlow, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --au-display: "Archivo Black", "Arial Black", Impact, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--au-bg);
  color: var(--au-ink);
  font-family: var(--au-font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--au-panel); text-decoration: none; }
a:hover { color: var(--au-pink); }

input, button { font-family: var(--au-font); }
input::placeholder { color: #6f665b; }

.display {
  font-family: var(--au-display);
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

/* ── Split shell ─────────────────────────────────────────────────────────── */

.auth-split { min-height: 100vh; display: flex; flex-wrap: wrap; }

/* ── Left: marketing panel ───────────────────────────────────────────────── */

.auth-pitch {
  flex: 1 1 420px;
  min-width: min(100%, 300px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  padding: 44px 30px;
  background: var(--au-panel);
  color: var(--au-panel-text);
  /* The sticker chips are rotated a degree or two past their box. */
  overflow-x: clip;
}
.auth-pitch .brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* webway.chat wordmark (dark-background lockup). Height-locked; the
   width/height attributes on the <img> hold the 6.86:1 box before the SVG
   loads, so the panel doesn't reflow. */
.auth-pitch .brand-logo { display: block; height: 34px; width: auto; }

.sticker {
  display: inline-block;
  transform: rotate(-3deg);
  background: var(--au-yellow);
  color: var(--au-panel);
  padding: 3px 8px;
  border-radius: var(--au-r-sticker);
  font: 700 9.5px var(--au-font);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pitch-line {
  margin: 0;
  font-family: var(--au-display);
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: .86;
  letter-spacing: -.05em;
  text-transform: uppercase;
  text-wrap: balance;
}
.pitch-line em { font-style: normal; color: var(--au-yellow); }

.pitch-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 78px;
  padding: 12px 8px;
  border: 2px solid transparent;
  border-radius: var(--au-r-chip);
  font: 700 11px var(--au-font);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  background: var(--au-panel-text);
  color: var(--au-panel);
}
.chip svg { flex: none; }
.chip.a { transform: rotate(-1.5deg); }
.chip.b { transform: rotate(1.2deg); background: var(--au-pink); color: #fff; }
.chip.c { transform: rotate(1deg); background: transparent; border-color: var(--au-panel-text); color: var(--au-panel-text); }
.chip.d { transform: rotate(-1.2deg); background: var(--au-yellow); color: var(--au-panel); }
.chip .accent { color: #A3005C; }

/* ── Right: form panel ───────────────────────────────────────────────────── */

.auth-form-panel {
  flex: 1 1 480px;
  min-width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 52px 44px;
  background-color: var(--au-bg);
  background-image:
    radial-gradient(circle at 82% 12%, rgba(42, 42, 40, .055) 0 34%, transparent 34.6%),
    radial-gradient(circle at 82% 12%, rgba(42, 42, 40, .05) 0 22%, transparent 22.6%),
    radial-gradient(circle at 12% 88%, rgba(255, 46, 147, .07) 0 26%, transparent 26.5%),
    radial-gradient(circle at 1.4px 1.4px, rgba(42, 42, 40, .09) 1.4px, transparent 1.5px);
  background-size: auto, auto, auto, 24px 24px;
}

.auth-tabs {
  display: inline-flex;
  align-self: flex-start;
  gap: 5px;
  padding: 5px;
  border-radius: var(--au-r-pill);
  background: var(--au-line-2);
  border: 1px solid var(--au-line);
}
.auth-tab {
  padding: 10px 20px;
  border-radius: var(--au-r-pill);
  white-space: nowrap;
  font: 700 10.5px var(--au-font);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--au-muted);
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.auth-tab:hover { color: var(--au-panel); }
.auth-tab.active {
  transform: rotate(-1.5deg);
  background: var(--au-panel);
  color: var(--au-panel-text);
  box-shadow: 0 8px 18px rgba(42, 42, 40, .22);
}
.auth-tab.active:hover { color: var(--au-panel-text); }

.auth-title {
  margin: 0;
  font-family: var(--au-display);
  font-size: clamp(28px, 3vw, 36px);
  line-height: .98;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 18ch;
  padding-bottom: 14px;
}

.auth-body { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.field-row { display: flex; flex-wrap: wrap; gap: 14px; }
.field-row .field { flex: 1 1 170px; min-width: 0; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font: 700 10px var(--au-font);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--au-muted);
}
.field-head { display: flex; align-items: center; gap: 10px; }
.field-head .field-label { flex: 1; }

.field input {
  height: 48px;
  width: 100%;
  padding: 0 15px;
  border: 1px solid var(--au-line);
  border-radius: var(--au-r-field);
  background: var(--au-input);
  color: var(--au-ink);
  font: 500 15px var(--au-font);
  outline: none;
}
.field input:focus { border-color: var(--au-panel); }
/* Chrome paints autofilled fields pale blue; repaint them as the cream input. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--au-input) inset;
  -webkit-text-fill-color: var(--au-ink);
}
.field input.ok { border-color: var(--au-green); }
.field input.bad { border-color: var(--au-pink); }

.field-toggle {
  border: 0;
  padding: 0;
  background: none;
  color: var(--au-panel);
  font: 700 10px var(--au-font);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.field-toggle:hover { color: var(--au-pink); }

.field-note {
  font: 700 10px var(--au-font);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--au-pink);
}
.field-note.ok { color: var(--au-green); }

/* Password strength meter (three bars + a label), filled by js/auth.js. */
.strength { display: flex; align-items: center; gap: 11px; }
.strength-bars { flex: 1; display: flex; gap: 4px; }
.strength-bars span { flex: 1; height: 4px; border-radius: var(--au-r-pill); background: var(--au-line); }
.strength-label {
  flex: none;
  font: 700 10px var(--au-font);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--au-muted);
}
.strength[data-score="1"] .strength-bars span.on,
.strength[data-score="1"] .strength-label { color: var(--au-pink); }
.strength[data-score="2"] .strength-bars span.on,
.strength[data-score="2"] .strength-label { color: var(--au-amber); }
.strength[data-score="3"] .strength-bars span.on,
.strength[data-score="3"] .strength-label { color: var(--au-green); }
/* The score sets the colour once, on both the lit bars and the label. */
.strength .strength-bars span.on { background: currentColor; }

.btn-auth {
  height: 52px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--au-r-pill);
  background: var(--au-panel);
  color: var(--au-panel-text);
  font: 700 12.5px var(--au-font);
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .16s ease, color .16s ease;
}
.btn-auth:hover { background: var(--au-pink); color: #fff; }

.foot-note { margin: 0; font: 500 12.5px/1.6 var(--au-font); color: var(--au-muted); text-wrap: pretty; }
.foot-note a { font-weight: 700; }

/* ── Flashes / notes ─────────────────────────────────────────────────────── */

.flash {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--au-r-field);
  border: 1px solid var(--au-line);
  background: var(--au-input);
  border-left: 4px solid var(--au-pink);
  font: 500 13.5px/1.5 var(--au-font);
  color: var(--au-ink);
}
.flash-ok { border-left-color: var(--au-green); }
.auth-note { border-left-color: var(--au-yellow); }
.auth-note strong { font-weight: 700; }

/* ── Narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .auth-pitch { gap: 24px; padding: 30px 22px; }
  .pitch-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-form-panel { padding: 34px 22px 44px; }
}
