/* =========================================================================
   auth.css — sign-in page layout and form styles (templates/login.html)
   Inherits design tokens from css/tokens.css.
   ========================================================================= */

.auth-page {
  padding: clamp(2.5rem, 6vw, 4.5rem) 1rem 5rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-title {
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}

.auth-subtitle {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

.auth-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  background: var(--surface-raised);
  border: 1px solid #8E8693;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-google-btn:hover {
  background: var(--surface);
  border-color: var(--ink-soft);
  color: var(--ink);
}

.auth-google-btn:active {
  background: var(--bg-sunken);
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.auth-input {
  font: inherit;
  font-size: max(1rem, 1em);
  line-height: 1.4;
  min-height: 48px;
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: var(--surface-raised);
  border: 1px solid #8E8693;
  border-radius: var(--r-md);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
  color: var(--muted);
}

.auth-input:hover {
  border-color: var(--ink-soft);
}

.auth-input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

.auth-input:user-invalid {
  border-color: var(--error);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-sent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.125rem;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  border-radius: var(--r-lg);
  color: var(--ink);
}

.auth-sent-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-ink);
}

.auth-sent-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.auth-sent p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.auth-sent-retry {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.auth-sent-retry:hover {
  text-decoration: underline;
}

.auth-footer {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.auth-legal {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.auth-legal a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.auth-legal a:hover {
  color: var(--accent);
}

.auth-password-link {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-password-link a {
  display: inline-block;
  padding: 0.125rem 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-password-link a:hover {
  color: var(--accent);
}

@media (pointer: coarse) {
  .auth-input,
  .auth-google-btn,
  .auth-submit {
    min-height: 52px;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 2rem 1rem 3.5rem;
  }

  .auth-card {
    padding: 1.5rem;
    gap: 1.25rem;
  }
}
