/*
 * The Devise screens: a single centred card on a full-height canvas.
 *
 * No header bar and no rail -- there is nowhere to navigate to before you have
 * signed in -- but the PTAG mark and the green accent line are both here, so a
 * sign-in page is recognisably the same product as the app behind it. Glacier
 * puts the logo *with* tagline on login and splash screens; this app bundles
 * only the plain mark, so the tagline is set in type beneath it.
 */

.auth-body {
  min-height: 100dvh;
  padding: var(--space-6) var(--space-4);
  background: var(--surface-secondary);
}

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--space-12));
}

.auth__panel {
  width: 100%;
  max-width: 26rem;
}

.auth__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  color: var(--text-heading);
  text-decoration: none;
}

.auth__brand:hover {
  text-decoration: none;
}

/* Glacier's login placement: logo with tagline, centred, max 200px. */
.auth__logo {
  width: 160px;
  height: auto;
  display: block;
}

.auth__brand-name {
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* The green accent line, carried onto the auth card so the brand signature is
   present before sign-in too. */
.auth__card {
  padding: var(--space-8);
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-top: 2px solid var(--ptag-green);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.auth__header {
  margin-bottom: var(--space-6);
}

.auth__title {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--text-heading);
}

/* A line under the title: who the invitation is for, why a link failed. */
.auth__subtitle {
  margin-top: var(--space-2);
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
}

.auth__section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-primary);
}

.auth__section-title {
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--text-heading);
}

.auth__section-text {
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
  color: var(--text-tertiary);
  font-size: var(--text-body-sm);
}

.auth__footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-primary);
  text-align: center;
  font-size: var(--text-body-sm);
  color: var(--text-tertiary);
}

.auth__footer-line + .auth__footer-line {
  margin-top: var(--space-1);
}

.auth__help {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--text-caption);
}

.auth__link {
  font-weight: 500;
  text-decoration: none;
}

.auth__link:hover {
  text-decoration: underline;
}

.auth__legal {
  margin-top: var(--space-6);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-caption);
}

@media (max-width: 479px) {
  .auth__card {
    padding: var(--space-6);
  }
}
