/* Authentication pages: a two-column split — brand panel on the left,
   form on the right — so the form has something to sit against instead
   of floating in an empty field. Collapses to a single column below
   1024px, where the panel is dropped entirely rather than stacked (it's
   reassurance, not content the user needs to complete the task). */

.auth-page { background: var(--gm-white); }

.auth-split { display: grid; grid-template-columns: 1fr; min-height: 100vh; }

/* --- Left: brand panel (desktop only) ---------------------------------- */
.auth-aside { display: none; }

@media (min-width: 1024px) {
  .auth-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

  .auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-12);
    background: var(--gm-forest);
    color: var(--gm-white);
    padding: var(--space-10) var(--space-12);
    overflow: hidden;
  }
  .auth-aside::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url("../../img/graphics/container-pattern.svg");
    background-repeat: repeat;
    opacity: 0.035;
    pointer-events: none;
  }
  .auth-aside > * { position: relative; z-index: 1; }
}

.auth-aside__brand { align-self: flex-start; }
.auth-aside__brand .logo { height: 38px; }

.auth-aside__eyebrow {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: var(--space-3);
}
.auth-aside__headline {
  font-size: var(--text-2xl);
  line-height: 1.18;
  color: var(--gm-white);
  max-width: 16ch;
  margin-bottom: var(--space-8);
}
.auth-aside__points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.auth-aside__points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--text-sm);
  line-height: 1.5;
  max-width: 38ch;
}
.auth-aside__points .icon { color: var(--gm-green-2); margin-top: 1px; }
.auth-aside__foot {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* --- Right: form column ------------------------------------------------- */
.auth-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-8) var(--gutter) var(--space-16);
  background: var(--gm-paper);
}
@media (min-width: 1024px) {
  .auth-main { align-items: center; background: var(--gm-white); padding-block: var(--space-12); }
}

.auth-main__inner { width: 100%; max-width: 460px; }

.auth-main__brand { margin-bottom: var(--space-8); }
@media (min-width: 1024px) { .auth-main__brand { display: none; } }

/* --- The card ------------------------------------------------------------ */
.auth-card {
  background: var(--gm-white);
  border: var(--hairline);
  border-radius: var(--radius-control);
  padding: var(--space-8) var(--space-6);
}
@media (min-width: 480px) { .auth-card { padding: var(--space-10) var(--space-8); } }
@media (min-width: 1024px) {
  /* On desktop the column itself is white, so the card border would just
     be a box around nothing — drop the chrome and let the form breathe. */
  .auth-card { border: 0; padding: 0; }
}

.auth-card__head { margin-bottom: var(--space-8); }
.auth-card h1 {
  font-size: var(--text-xl);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-2);
}
@media (min-width: 768px) { .auth-card h1 { font-size: var(--text-2xl); } }
.auth-card__lede { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0; max-width: 42ch; }

.auth-card__footer {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: var(--hairline);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.auth-card__footer a { font-weight: 600; text-decoration: none; }
.auth-card__footer a:hover { text-decoration: underline; }

.auth-card .btn--block { margin-top: var(--space-2); }

/* --- Role picker ---------------------------------------------------------
   The old version put a bare radio next to plain text inside a label, so a
   wrapping label ("Transport company") ran back underneath the radio. Grid
   with an explicit control column keeps the text block aligned no matter
   how many lines it takes. */
.role-fieldset { border: 0; padding: 0; margin: 0 0 var(--space-6); }
.role-fieldset__legend {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
  padding: 0;
}
.role-picker { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 420px) { .role-picker { grid-template-columns: 1fr 1fr; } }

.role-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--gm-white);
  cursor: pointer;
  min-height: 64px;
  transition: border-color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.role-option:hover { border-color: var(--gm-steel); }
.role-option input { margin-top: 2px; }
.role-option__text { display: block; font-weight: 600; font-size: var(--text-sm); line-height: 1.35; }
.role-option__hint {
  display: block;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.role-option:has(input:checked) {
  border-color: var(--gm-green);
  background: var(--gm-green-tint);
  box-shadow: inset 0 0 0 1px var(--gm-green);
}
.role-option:has(input:focus-visible) {
  border-color: var(--gm-green);
  box-shadow: 0 0 0 3px rgba(30, 122, 77, 0.16);
}

/* --- Password field with a reveal toggle --------------------------------- */
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 46px;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--color-text-muted);
  cursor: pointer;
}
.password-toggle:hover { color: var(--gm-green); }

/* --- Inline row: remember me / forgot link ------------------------------- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.auth-row--end { justify-content: flex-end; margin-top: calc(var(--space-2) * -1); }
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}
.auth-row__link { font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.auth-row__link:hover { text-decoration: underline; }

/* --- Legal note ----------------------------------------------------------- */
.auth-legal {
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.auth-legal a { color: var(--color-text-muted); text-decoration: underline; }
.auth-legal a:hover { color: var(--gm-green); }
