/* Login: centered surface card with the brand glow, like quotes' login. */
.shell--bare { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-2); }
.shell--bare .page { padding: 0; width: 100%; }

.login {
  width: 100%;
  max-width: 424px;
  margin: 0 auto;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: var(--hairline) solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px var(--color-accent-muted);
  text-align: center;
}

.login::before {
  content: "";
  display: block;
  height: var(--space-8);
  margin-bottom: var(--space-2);
  background: url("/img/logo-full.png") center / contain no-repeat;
}

.login h2 { font-size: var(--font-size-lg); }
.login .page-subtitle { margin-top: var(--space-1); }
.login__box { margin-top: var(--space-3); display: flex; justify-content: center; }
.login__error { margin-top: var(--space-2); color: var(--color-danger); font-size: var(--font-size-sm); }

.login__box { flex-direction: column; align-items: stretch; gap: var(--space-1); }
.login__box--loading { opacity: 0.6; pointer-events: none; }
.login__chip-area, .login__google-btn-wrap { width: 100%; }
.login__google-btn-wrap { position: relative; }

/* Styled button (Google branding guidelines for self-built buttons); the real click lands on the native one above. */
.login__google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  width: 100%;
  height: var(--space-5);
  background: var(--bg-surface);
  border: var(--hairline) solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
  pointer-events: none;
}
.login__google-btn-icon { width: var(--space-2); height: var(--space-2); flex-shrink: 0; }
/* pointer-events:none above means the native iframe takes the hover/focus, so the wrap drives those states. */
.login__google-btn-wrap:hover .login__google-btn,
.login__google-btn-wrap:focus-within .login__google-btn { background: var(--bg-page); border-color: var(--color-accent); }
/* opacity does not affect hit-testing: clicks pass through to the Google iframe. */
.login__google-btn-native { position: absolute; inset: 0; opacity: 0; overflow: hidden; }

/* "Continue as" chip with the account photo. */
.login__google-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-1) var(--space-2);
  background: var(--bg-surface);
  border: var(--hairline) solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
}
.login__google-chip:hover, .login__google-chip:focus-visible { background: var(--bg-page); border-color: var(--color-accent); outline: none; }
.login__google-chip-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-5);
  height: var(--space-5);
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}
.login__google-chip-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login__google-chip-text { display: flex; flex-direction: column; min-width: 0; }
.login__google-chip-name { font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login__google-chip-email { font-size: var(--font-size-xs); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login__link {
  align-self: center;
  margin-top: var(--space-1);
  padding: 0;
  background: none;
  border: 0;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  text-decoration: underline;
  cursor: pointer;
}
.login__link:hover { opacity: 0.85; }
.login__chip-area { display: flex; flex-direction: column; }
.login__chip-area[hidden], .login__google-btn-wrap[hidden], .login__google-chip-img[hidden] { display: none; }
