/* ---------------------------------------------------------------------
   Login — aligned to the marketing site (workreef/marketing/site/src/index.css).

   A split surface: the marketing product-hero (dark navy gradient + faint grid)
   as the brand panel, beside the marketing access-form (white panel card, navy
   primary button, paper inputs with an azure focus ring, mono strata eyebrow).
   Serves both the control plane and the app — one brand moment, identical to the
   marketing language. Token-driven; loaded after base.html so its rules win.
   --------------------------------------------------------------------- */

/* The login owns the full viewport — no chrome above it (base.html carries none). */
.wr-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  font-family: var(--wr-font-body);
  color: var(--wr-text);
}

/* ── Brand panel — the marketing dark product hero, distilled ────────────── */
.wr-auth__brand {
  position: relative;
  overflow: hidden;
  color: #E7ECF6;
  background:
    radial-gradient(1100px 560px at 78% -10%, rgba(45, 98, 153, 0.38), transparent 60%),
    linear-gradient(160deg, #101933 0%, #0E1430 55%, #0B1126 100%);
  padding: clamp(2.5rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

/* The marketing hero's faint grid, masked to the top-right. */
.wr-auth__brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(900px 520px at 75% 5%, black, transparent 75%);
  mask-image: radial-gradient(900px 520px at 75% 5%, black, transparent 75%);
  pointer-events: none;
}

.wr-auth__brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1.75rem, 4vh, 2.75rem);
  height: 100%;
  max-width: 30rem;
}

.wr-auth__lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.wr-auth__logo {
  height: 34px;
  width: auto;
  display: block;
}

.wr-auth__wordmark {
  font-family: var(--wr-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.wr-auth__tagline {
  font-family: var(--wr-font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 1.25rem 0 0;
  text-wrap: balance;
}

/* Product glimpse — the multi-LLM quorum gating a promotion, frosted on the
   dark panel (the marketing quorum-card, distilled). Shows the product instead
   of merely describing it. */
.wr-auth__glimpse {
  margin-top: 1.8rem;
  max-width: 23rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.65);
}

.wr-auth__glimpse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.wr-auth__glimpse-eyebrow {
  font-family: var(--wr-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8FB6E8;
}

.wr-auth__glimpse-score {
  font-family: var(--wr-font-mono);
  font-size: 0.62rem;
  color: #6FD6B0;
  border: 1px solid rgba(93, 194, 160, 0.4);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
}

.wr-auth__glimpse-q {
  font-family: var(--wr-font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wr-auth__glimpse-votes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-bottom: 0.75rem;
}

.wr-auth__vote {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #D6DEEC;
}

.wr-auth__vote::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.wr-auth__vote--claude::before { background: #C9824A; }
.wr-auth__vote--gpt::before { background: #1A9E86; }
.wr-auth__vote--gemini::before { background: #4C7DF0; }

.wr-auth__glimpse-verdict {
  font-family: var(--wr-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  color: #6FD6B0;
  background: rgba(93, 194, 160, 0.1);
  border-radius: 6px;
  padding: 0.42rem 0.55rem;
}

.wr-auth__trust {
  list-style: none;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.wr-auth__trust li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: #9FB0CC;
}

.wr-auth__trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5DC2A0;
}

/* ── Form side — the marketing access-form ───────────────────────────────── */
.wr-auth__form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wr-bg);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.wr-auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--wr-surface);
  border: 1px solid var(--wr-glass-border);
  border-radius: 14px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--wr-shadow-lg);
}

/* The lockup shown inside the card on narrow viewports (brand panel hidden). */
.wr-auth__mobile-lockup {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.wr-auth__mobile-lockup .wr-auth__logo { height: 30px; }
.wr-auth__mobile-lockup .wr-auth__wordmark {
  color: var(--wr-text);
  font-size: 1.3rem;
}

/* Eyebrow — JetBrains Mono, tracked, uppercase (marketing). */
.wr-auth__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--wr-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wr-text-subtle);
  margin-bottom: 0.9rem;
}

/* The marketing strata tick — three stacked gradient rules. On the dark brand
   panel the eyebrow is brighter. */
.wr-auth__eyebrow--tick { color: #8FB6E8; }

.wr-auth__eyebrow--tick::before {
  content: "";
  width: 1.6rem;
  height: 7px;
  flex: none;
  background-image:
    linear-gradient(#16B7D9, #16B7D9),
    linear-gradient(#2D6299, #2D6299),
    linear-gradient(#5D7FC0, #5D7FC0);
  background-size: 100% 1px;
  background-position: 0 0, 0 3px, 0 6px;
  background-repeat: no-repeat;
}

.wr-auth__title {
  font-family: var(--wr-font-display);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--wr-text);
  margin: 0 0 0.5rem;
}

.wr-auth__lead,
.wr-auth__context {
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--wr-text-muted);
  margin: 0 0 1.6rem;
}

.wr-auth__context { margin-bottom: 1.25rem; }
.wr-auth__context strong { color: var(--wr-text); font-weight: 600; }

.wr-auth__error {
  background: var(--wr-error-bg, rgba(220, 38, 38, 0.08));
  border: 1px solid color-mix(in srgb, var(--wr-error) 35%, transparent);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--wr-error);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.wr-auth__form { display: grid; gap: 1.1rem; }
.wr-auth__group { display: grid; gap: 0.4rem; }

.wr-auth__group label {
  font-family: var(--wr-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wr-text-muted);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

.wr-auth__group input {
  font-family: var(--wr-font-body);
  font-size: 0.97rem;
  color: var(--wr-text);
  background: var(--wr-bg);
  border: 1px solid var(--wr-glass-border-hov);
  border-radius: 8px;
  padding: 0.72rem 0.9rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wr-auth__group input:focus-visible {
  outline: none;
  border-color: var(--wr-ocean);
  box-shadow: 0 0 0 3px rgba(45, 98, 153, 0.14);
}

/* Marketing primary button — deep navy, 7px radius, subtle lift (NOT a pill). */
.wr-auth__submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wr-primary-3);
  color: #fff;
  font-family: var(--wr-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  margin-top: 0.4rem;
  box-shadow: var(--wr-shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wr-auth__submit:hover {
  background: var(--wr-primary-2);
  transform: translateY(-1px);
  box-shadow: var(--wr-shadow-md);
}

.wr-auth__submit:active { transform: translateY(0); }

.wr-auth__meta {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--wr-text-subtle);
}

.wr-auth__meta a { color: var(--wr-ocean); font-weight: 500; }
.wr-auth__meta a:hover { text-decoration: underline; }

/* ── Responsive — stack to a single column, hide the brand panel ─────────── */
@media (max-width: 860px) {
  .wr-auth { grid-template-columns: 1fr; }
  .wr-auth__brand { display: none; }
  .wr-auth__mobile-lockup { display: flex; }
  .wr-auth__form-side {
    min-height: 100vh;
    /* A whisper of the brand gradient at the top edge so the form side still
       reads as WorkReef, not a bare card on paper. */
    background:
      radial-gradient(700px 240px at 50% -40%, rgba(45, 98, 153, 0.12), transparent 70%),
      var(--wr-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wr-auth__submit { transition: none; }
}
