/* The sign-in page: brand panel on the left, the one form on the right. */

.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}

/* ---------- left: brand panel ---------- */

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 12% 8%,  rgba(110,201,182,.28), transparent 60%),
    radial-gradient(900px  700px at 88% 92%, rgba(16,64,58,.55),   transparent 55%),
    linear-gradient(150deg, var(--brand-700) 0%, var(--brand-900) 100%);
}

/* A soft grid, purely decorative — masked so it fades rather than ending in a
   hard line at the panel edge. */
.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 20% 10%, #000 25%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 20% 10%, #000 25%, transparent 78%);
  pointer-events: none;
}

.auth-brand > * { position: relative; z-index: 1; }

.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  font-weight: 800; font-size: 20px; letter-spacing: .3px;
}
.brand-words { display: flex; flex-direction: column; line-height: 1.15; }
.brand-words strong { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.brand-words span { font-size: 12.5px; opacity: .72; letter-spacing: .09em; text-transform: uppercase; }

.auth-pitch { max-width: 30rem; margin: 40px 0; }
.auth-pitch h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 2.6vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -.025em;
  font-weight: 750;
}
.auth-pitch h1 em { font-style: normal; color: var(--brand-300); }
.auth-pitch p { margin: 0; font-size: 15.5px; line-height: 1.62; color: rgba(255,255,255,.76); }

/* The four roles, stated rather than chosen. Showing them explains why there
   is only one form, which is the question every new user asks first. */
.role-strip { display: grid; gap: 10px; }
.role-strip h2 {
  margin: 0 0 4px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}
.role-row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
}
.role-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.role-row .rn { font-weight: 620; font-size: 14px; }
.role-row .rd { font-size: 12.5px; color: rgba(255,255,255,.62); }
.role-row .rt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.role-row .rd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-foot { font-size: 12.5px; color: rgba(255,255,255,.5); }
.auth-foot a { color: rgba(255,255,255,.78); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ---------- right: the form ---------- */

.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: var(--surface);
}

.auth-card { width: 100%; max-width: 25.5rem; }

.auth-head { margin-bottom: 28px; }
.auth-head h2 {
  margin: 0 0 7px;
  font-size: 1.6rem; letter-spacing: -.02em; font-weight: 700;
}
.auth-head p { margin: 0; color: var(--muted); font-size: 14.5px; }

.field { margin-bottom: 17px; }
.field label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 620; color: var(--ink-2);
}

.control { position: relative; display: flex; align-items: center; }
.control > .ico {
  position: absolute; left: 13px; width: 17px; height: 17px;
  color: var(--muted); pointer-events: none;
}

.input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--muted); opacity: .8; }
.input:hover { border-color: var(--brand-300); }
.input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-050);
}
.input[aria-invalid="true"] { border-color: var(--danger); }

/* Room for the reveal button so long passwords never run under it. */
.control:has(.reveal) .input { padding-right: 46px; }

.reveal {
  position: absolute; right: 6px;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.reveal:hover { color: var(--ink); background: var(--line-soft); }
.reveal svg { width: 17px; height: 17px; }
/* The HTML `hidden` attribute does NOT hide an inline <svg>: the UA stylesheet
   rule that implements it only matches HTML elements. Without this rule both
   eye icons render stacked inside the button. */
.reveal svg[hidden] { display: none; }

.field-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 20px 0 22px;
}

.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.link-quiet { font-size: 13.5px; color: var(--brand); text-decoration: none; font-weight: 560; }
.link-quiet:hover { text-decoration: underline; }

.btn-primary {
  width: 100%;
  padding: 13px 18px;
  font: inherit; font-weight: 640; font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  border: 0; border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: filter .15s, transform .06s;
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }

/* The error banner. aria-live in the markup announces it; this makes it
   impossible to miss visually too. */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  margin-bottom: 20px; padding: 12px 14px;
  font-size: 13.7px; line-height: 1.5;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.auth-note {
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.6px; color: var(--muted); line-height: 1.6;
}
.auth-note strong { color: var(--ink-2); font-weight: 620; }

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

@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  /* The pitch and the role list are context, not task — on a phone the form
     is what the visitor came for, so the panel collapses to a compact header
     and the form sits above the fold. */
  .auth-brand { padding: 28px 26px 30px; }
  .auth-pitch { margin: 22px 0 24px; }
  .auth-pitch h1 { font-size: 1.55rem; }
  .auth-pitch p { font-size: 14.5px; }
  .role-strip { grid-template-columns: 1fr 1fr; }
  .role-strip h2 { grid-column: 1 / -1; }
  .auth-foot { display: none; }
  .auth-panel { padding: 36px 24px 56px; }
}

@media (max-width: 620px) {
  .role-strip { grid-template-columns: 1fr; }
  .role-row .rd { display: none; }
  .auth-brand { padding: 22px 20px 24px; }
  .auth-pitch h1 { font-size: 1.38rem; }
}
