/* Auth pages — tokens-driven styling. Import tokens.css + components.css first in HTML. */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }

/* ── Layout ── */
body {
  font-family: var(--font-body);
  background: var(--paper-100);
  color: var(--ink-900);
  color-scheme: light;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  width: 100%;
}

.auth-wrap {
  width: 100%;
  max-width: 440px;
}

/* ── Header ── */
.auth-header {
  text-align: center;
  margin-bottom: var(--space-5);
}

.auth-logo {
  height: 56px;
  width: auto;
  mix-blend-mode: multiply;
  margin: 0 auto var(--space-3);
  display: block;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.auth-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-700);
  margin: 0;
  line-height: 1.5;
}

/* ── Card ── */
.auth-card {
  background: var(--surface-white);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--elev-1);
}

/* ── Google Button ── */
.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--surface-white);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  box-sizing: border-box;
  min-height: 44px;
}

.google-btn:hover {
  background: var(--learning-blue-100);
  border-color: var(--learning-blue-500);
  box-shadow: var(--elev-1);
}

.google-btn:focus-visible {
  outline: 3px solid var(--learning-blue-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--surface-white);
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--paper-300);
}

.auth-divider-text {
  font-size: 13px;
  color: var(--ink-500);
  font-family: var(--font-body);
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--surface-white);
  outline: none;
  box-sizing: border-box;
  min-height: 44px;
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}

.auth-input:focus-visible {
  border-color: var(--learning-blue-700);
  outline: 3px solid var(--learning-blue-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--surface-white);
}

.auth-input::placeholder { color: var(--ink-700); opacity: 1; }

.auth-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 600;
}

.auth-error {
  font-size: 12px;
  color: var(--danger);
  display: none;
  margin: 0;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--brand-red);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: var(--elev-1);
  transition: background var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
  margin-top: 4px;
  min-height: 44px;
}

.auth-submit-btn:hover {
  background: var(--brand-red-hover);
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}

.auth-submit-btn:focus-visible {
  outline: 3px solid var(--learning-blue-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--surface-white);
}

.auth-submit-btn:disabled {
  background: var(--paper-200);
  color: var(--ink-700);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── Footer text ── */
.auth-footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-700);
  font-family: var(--font-body);
}

.auth-link {
  color: var(--learning-blue-700);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* ── Forgot password ── */
.forgot-link {
  text-align: right;
  margin-top: -4px;
}

.forgot-link a {
  font-size: 12px;
  color: var(--learning-blue-700);
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-body);
}

.forgot-link a:hover {
  text-decoration: underline;
}

/* ── Footer ── */
footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--paper-300);
  background: var(--paper-100);
}

.footer-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-700);
  margin: 0;
}

.footer-brand {
  font-weight: 700;
  color: var(--brand-red);
}

.auth-header a,
footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

footer a { color: var(--learning-blue-700); }

.auth-header a:focus-visible,
footer a:focus-visible {
  border-radius: var(--radius-sm);
  outline: 3px solid var(--learning-blue-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--surface-white);
}

.auth-wrap,
.auth-card,
.auth-title,
.auth-subtitle,
.footer-text {
  overflow-wrap: anywhere;
}

#google-btn-container {
  min-height: 44px;
  align-items: center;
}

@media (max-width: 480px) {
  main { padding: 32px 16px; }
  .auth-card { padding: var(--space-5); }
}
