
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --destructive: 0 84.2% 60.2%;
  --radius: 0.5rem;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}
a { color: inherit; }
.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 3rem;
}
.shell {
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1rem;
}
.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.logo img { height: 2.25rem; width: auto; }
.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card { background: transparent; border: 0; box-shadow: none; }
.tabs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 0.5rem 0 1rem;
  border-bottom: 1px solid hsl(var(--border));
}
.tab {
  padding: 0.5rem 0.25rem 0.75rem;
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.tab[aria-current="page"] {
  color: hsl(var(--foreground));
  border-bottom-color: hsl(var(--foreground));
}
.fields { display: flex; flex-direction: column; gap: 1rem; }
.field { display: grid; gap: 0.5rem; }
.field-wrap { position: relative; }
.field-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 2.75rem;
  padding: 0 2.5rem 0 2.5rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
}
input:focus {
  outline: 2px solid hsl(var(--foreground) / 0.2);
  outline-offset: 1px;
}
.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0;
}
.forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}
.forgot a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 2px;
}
.error { color: hsl(var(--destructive)); font-size: 0.875rem; margin: 0; }
.success {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.875rem;
}
button[type="submit"] {
  height: 3rem;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }
.social {
  margin-top: 1.25rem;
}
.social-label {
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.social-buttons {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.social-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}
.social-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.hint {
  text-align: center;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.language { float: right; font-size: .875rem; font-weight: 400; }
.fields input:not([type=checkbox]) { width: 100%; min-height: 44px; }
.choice { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.choice input { width: auto; }
.description { color: hsl(var(--muted-foreground)); }
button { min-height: 44px; cursor: pointer; }
.secondary { width: 100%; background: transparent; color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); }
nav { font-size: .875rem; line-height: 1.8; }

/* Current Admin auth-form-layout: 400px shell, teal action, pill tabs. */
:root { --radius: .625rem; --font: "Thonburi", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }
.page { padding: 1rem 1.5rem; min-height: 100svh; }
.shell { max-width: 400px; padding-top: 1rem; gap: 1.25rem; }
.logo-text { position: relative; font-size: 1rem; }
.brand { display: block; width: 100%; }
.brand img { display: block; width: min(80%,250px); height: auto; margin: auto; }
.language { position: absolute; right: 0; top: -1rem; font-size: .875rem; font-weight: 400; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; background: #f5f5f5; border: 0; border-radius: 9999px; padding: .25rem; margin: .5rem 0 0; }
.tab { display: flex; align-items: center; justify-content: center; height: 2.75rem; border: 0; border-radius: 9999px; padding: 0 1rem; }
.tab[aria-current="page"] { background: white; box-shadow: 0 1px 3px #00000018; }
button[type="submit"] { background: oklch(.709 .125 181.39); color: white; }
button[type="submit"].social-btn { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid #55b8aa55; background: white; color: inherit; box-shadow: 0 1px 2px #00000010; }
button[type="submit"]:hover { filter: brightness(.97); }
.toggle-password { width: 1.25rem; height: 1.25rem; min-height: 0; }
.toggle-password svg { position: static; transform: none; pointer-events: none; width: 1.25rem; height: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.social { margin-top: 0; }
.social-label { position: relative; font-size: .75rem; }
.social-label:before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: hsl(var(--border)); }
.social-label span { position: relative; background: white; padding: 0 .5rem; }
footer { margin-top: 2rem; text-align: center; font-size: .875rem; color: hsl(var(--muted-foreground)); }
@media(min-width:640px) { .tab { font-size: 1.125rem; } }

/* Match Admin's 56px top controls and responsive auth-page shell. */
.top-controls { height: 56px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 12px 16px; }
.top-controls .language { position: static; float: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; height: 32px; text-decoration: none; color: hsl(var(--muted-foreground)); }
.top-controls svg { width: 16px; height: 16px; }
.theme-toggle { position: relative; display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; min-height: 32px; border: 0; background: transparent; color: hsl(var(--muted-foreground)); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
.page { min-height: calc(100svh - 56px); padding: 8px 24px 16px; }
.shell { min-height: calc(100svh - 80px); padding-top: 16px; }
.forgot { margin-top: 4px; }
footer { margin-top: auto; padding-top: 16px; }
@media(min-width:640px) { .top-controls { padding-inline: 24px; } .page { padding: 16px 32px 24px; } .shell { min-height: calc(100svh - 96px); } }
@media(max-width:767px) { .language span { display: none; } }
[data-theme="dark"] { color-scheme: dark; --background: 0 0% 9%; --foreground: 0 0% 98%; --muted-foreground: 0 0% 71%; --border: 0 0% 24%; --destructive: 0 75% 70%; }
[data-theme="dark"] input:not([type="checkbox"]), [data-theme="dark"] .social-label span, [data-theme="dark"] button[type="submit"].social-btn { background: hsl(var(--background)); color: hsl(var(--foreground)); }
[data-theme="dark"] .tabs { background: #292929; }
[data-theme="dark"] .tab[aria-current="page"] { background: hsl(var(--background)); }
input { color: hsl(var(--foreground)); }
input::placeholder { color: hsl(var(--muted-foreground)); }
.choice { display: block; line-height: 1.6; font-size: .875rem; }
.choice input { margin: 0 8px 0 0; vertical-align: middle; accent-color: oklch(.709 .125 181.39); }
