.gg-auth-page {
  min-height: 100vh;
  background: var(--workspace);
  color: var(--ink-1);
  display: grid;
  grid-template-rows: 1fr;
  padding: 14px;
  position: relative;
}

.gg-auth-top {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.gg-auth-theme {
  width: 38px;
  height: 38px;
  box-shadow: var(--shadow-xs);
}

.gg-auth-center {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0;
}

.gg-auth-card {
  width: min(536px, 100%);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gg-auth-card__body {
  padding: 24px 32px 30px;
}

.gg-auth-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.gg-auth-card.is-auth-choice .gg-auth-logo-row {
  justify-content: center;
  margin-bottom: 20px;
}

.gg-auth-logo {
  width: 324px;
  max-width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: center;
  display: block;
  flex: 0 0 auto;
}

.gg-auth-back {
  flex: 0 0 auto;
}

.gg-auth-heading {
  display: grid;
  gap: 6px;
}

.gg-auth-kicker {
  color: var(--deep-blue);
  letter-spacing: 0;
}

.gg-auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-1);
}

.gg-auth-subtitle {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
}

.gg-auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: color-mix(in oklab, var(--surface-sunk) 86%, var(--deep-blue) 4%);
}

.gg-auth-mode-option {
  all: unset;
  min-height: 42px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background 120ms, color 120ms, box-shadow 120ms;
}

.gg-auth-mode-option:hover {
  color: var(--ink-1);
}

.gg-auth-mode-option:focus-visible {
  box-shadow: var(--ring-focus);
}

.gg-auth-mode-option.is-active {
  background: var(--paper);
  color: var(--orange);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.gg-auth-form {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.gg-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gg-auth-field {
  display: grid;
  gap: 6px;
}

.gg-auth-label {
  color: var(--ink-2);
  letter-spacing: 0;
}

.gg-auth-input-shell {
  min-height: 48px;
  padding: 10px 12px;
  box-shadow: none;
}

.gg-auth-input {
  min-width: 0;
}

.gg-auth-inline-button {
  flex: 0 0 auto;
  margin: -4px -6px -4px 6px;
  box-shadow: none;
  color: var(--ink-2);
  font-weight: 700;
}

.gg-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 2px 2px 0;
}

.gg-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
}

.gg-auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--deep-blue);
}

.gg-auth-link {
  color: var(--orange);
  box-shadow: none;
}

.gg-auth-link:hover:not(:disabled) {
  color: var(--orange-600);
}

.gg-auth-actions {
  display: grid;
  margin-top: 8px;
}

.gg-auth-submit {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: var(--r-md);
  font-size: 15.5px;
  font-weight: 700;
}

.gg-auth-message {
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

.gg-auth-message--error {
  color: var(--risk);
  background: var(--risk-50);
  border: 1px solid color-mix(in oklab, var(--risk) 28%, var(--risk-50));
}

.gg-auth-message--notice {
  color: var(--green);
  background: var(--green-50);
  border: 1px solid var(--green-100);
}

.gg-auth-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--workspace);
  padding: 16px;
}

.gg-auth-loading-card {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--ink-2);
  padding: 14px 22px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.gg-auth-loading-logo {
  width: 150px;
  height: 42px;
  object-fit: cover;
  object-position: calc(50% - 8px) calc(50% + 4px);
  display: block;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .gg-auth-page {
    padding: 10px;
  }

  .gg-auth-top {
    top: 10px;
    right: 10px;
  }

  .gg-auth-card {
    width: 100%;
  }

  .gg-auth-card__body {
    padding: 22px 18px 24px;
  }

  .gg-auth-logo {
    width: 278px;
    height: 84px;
  }

  .gg-auth-grid {
    grid-template-columns: 1fr;
  }

  .gg-auth-row {
    align-items: flex-start;
  }

  .gg-auth-link {
    padding-left: 0;
  }
}
