/* Account access: a compact, centered surface with Nuvix blue for interaction. */
.auth-body {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 20px 14px;
  background: var(--bg);
}
.auth-main { width: min(100%, 480px); margin-inline: auto; }
.auth-main > .logo { display: flex; width: max-content; margin: 0 auto 12px; font-size: 17px; }
.auth-panel {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 18px;
}
.auth-panel h1 { font-size: 25px; margin-bottom: 7px; }
#auth-description { font-size: 14px; }
.auth-tabs { display: flex; margin: 10px 0; }
.auth-tabs button { flex: 1; min-height: 40px; }
.auth-tabs button.on {
  color: #c6d8ff;
  background: #17243a;
  border-color: #34517b;
}
.google-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.google-button:hover { background: var(--bg-3); border-color: #46536a; }
.google-mark { width: 18px; height: 18px; display: block; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 12px;
  margin: 10px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
#auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "name email" "password confirm" "password-help password-help" "captcha captcha" "error error" "submit submit";
  column-gap: 14px;
  align-items: start;
}
#name-field { grid-area: name; }
#email-field { grid-area: email; }
#password-field { grid-area: password; }
#confirm-field { grid-area: confirm; }
#auth-form > .field { min-width: 0; margin-bottom: 8px; }
.auth-panel input { min-height: 36px; font-size: 15px; }
.auth-panel input:focus { border-color: var(--accent); background: #121720; }
#password-help { grid-area: password-help; margin: -5px 0 8px; }
.field-help { font-size: 12.5px; color: var(--dim); }
#captcha-box {
  grid-area: captcha;
  min-width: 0;
  margin: 2px 0 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
#captcha-box .field { margin-bottom: 10px; }
.captcha-image-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
#captcha-image {
  display: block;
  width: 300px;
  max-width: min(100%, 300px);
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: #f6f7fa;
}
#captcha-box .field-help { margin-bottom: 0; }
#auth-error { grid-area: error; }
#auth-submit { grid-area: submit; }
.auth-submit { width: 100%; min-height: 44px; }
.auth-note { margin-top: 8px; font-size: 12px; line-height: 1.4; }
.auth-main > .more { display: flex; justify-content: center; margin-top: 8px; }
@media (max-width: 640px) {
  .auth-body { padding: 10px 14px 14px; }
  .auth-panel { padding: 16px; }
  #auth-form { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  #auth-form > * { grid-area: auto; grid-column: 1; }
  .auth-panel input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .google-button { transition: none; }
}


/* Keep the complete account form readable at laptop and tablet widths. */
@media (max-width: 720px) {
  .auth-body { padding: 6px 12px 8px; }
  .auth-main > .logo { margin-bottom: 8px; }
  .auth-panel { padding: 12px; }
  .auth-panel h1 { font-size: 23px; margin-bottom: 5px; }
  #auth-description { font-size: 13px; line-height: 1.35; }
  .auth-tabs { margin: 8px 0; }
  .auth-tabs button { min-height: 36px; }
  .google-button { min-height: 40px; }
  .auth-divider { margin: 8px 0; }
  #auth-form { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; row-gap: 0; }
  #auth-form > * { grid-area: auto; grid-column: 1; }
  #auth-form > .field { margin-bottom: 5px; }
  .auth-panel input { min-height: 38px; font-size: 16px; }
  #password-help { margin: -1px 0 5px; font-size: 11.5px; line-height: 1.3; }
  #captcha-box { margin: 2px 0 4px; padding-top: 7px; }
  #captcha-box .field { margin-bottom: 6px; }
  .captcha-image-row { gap: 8px; margin-bottom: 5px; }
  #captcha-image { width: 280px; max-width: min(100%, 280px); }
  #captcha-box .field-help { font-size: 11.5px; line-height: 1.3; }
  .auth-submit { min-height: 40px; }
  .auth-note { margin-top: 6px; font-size: 11.5px; line-height: 1.3; }
  .auth-main > .more { margin-top: 4px; }
}

/* Stack account fields at every viewport size and keep the form compact. */
.auth-body { padding: 6px 14px 8px; }
.auth-main > .logo { margin-bottom: 8px; }
.auth-panel { padding: 12px; }
.auth-panel h1 { margin-bottom: 5px; }
#auth-description { font-size: 13px; line-height: 1.35; }
.auth-tabs { margin: 8px 0; }
.auth-tabs button { min-height: 36px; }
.google-button { min-height: 40px; }
.auth-divider { margin: 8px 0; }
#auth-form {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
  column-gap: 0;
  row-gap: 0;
}
#auth-form > * { grid-area: auto; grid-column: 1; }
#auth-form > .field { margin-bottom: 5px; }
.auth-panel input { min-height: 38px; font-size: 16px; }
#password-help { margin: -1px 0 5px; font-size: 11.5px; line-height: 1.3; }
#captcha-box { margin: 2px 0 4px; padding-top: 7px; }
#captcha-box .field { margin-bottom: 6px; }
.captcha-image-row { gap: 8px; margin-bottom: 5px; }
#captcha-image { width: 280px; max-width: min(100%, 280px); }
#captcha-box .field-help { font-size: 11.5px; line-height: 1.3; }
.auth-submit { min-height: 40px; }
.auth-note { margin-top: 6px; font-size: 11.5px; line-height: 1.3; }
.auth-main > .more { margin-top: 4px; }

/* Final detail pass: align the CAPTCHA and give controls clear, quiet states. */
.auth-panel { box-shadow: 0 18px 42px rgba(0, 0, 0, .2); }
.auth-panel h1 { letter-spacing: -.025em; }
.auth-panel input {
  background: #0d0f12;
  transition: border-color .16s ease, background-color .16s ease;
}
.auth-panel input:hover { border-color: #454a54; }
.auth-panel input:focus-visible {
  outline: 2px solid rgba(104, 145, 218, .45);
  outline-offset: 2px;
}
#captcha-box { padding-top: 8px; }
.captcha-image-row { justify-content: center; margin: 8px 0 7px; }
#captcha-image {
  width: 320px;
  max-width: min(100%, 320px);
  border-radius: 8px;
}

/* Match CAPTCHA width to the form fields. */
#captcha-image {
  width: 100%;
  max-width: 100%;
  height: auto;
}