/* =============================================================================
   AUTH PAGES (/signin, /signup) — Google Account style
   Centered column, Material fields, pill buttons, bottom bar.
   ============================================================================= */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Centered content area */
.auth-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 48px 20px 24px;
}

.auth-container-modern {
  width: 100%;
  max-width: 448px;
  animation: auth-in 0.3s ease-out;
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header: logo + heading (minimal Google-style layout) */
.auth-header-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-box { margin-bottom: 18px; }
.auth-logo-img { width: 76px; height: 76px; border-radius: 50%; }
.auth-header-title {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
}
.auth-header-desc {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 380px;
}

/* Auth card section heading ("Sign in") */
.auth-h1 {
  font-size: 26px;
  font-weight: 400;
  text-align: center;
}
.auth-sub {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted);
  margin: 6px 0 26px;
}

/* Field spacing */
.auth-field-group { margin-bottom: 16px; }
.auth-field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 6px 4px;
}

/* Google-style outlined field box */
.btn-field-box {
  position: relative;
}
.btn-field-box .input {
  padding: 20px 16px 8px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}
.btn-field-box .input::placeholder { color: transparent; }
.btn-field-box label.floating {
  position: absolute;
  left: 15px;
  top: 18px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.13s ease-out;
  padding: 0 2px;
}
.btn-field-box .input:focus + label.floating,
.btn-field-box .input:not(:placeholder-shown) + label.floating {
  top: 7px;
  font-size: 12px;
  color: var(--accent);
  background: var(--bg-input);
}
.btn-field-box.box-error .input { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.btn-field-box.box-error label.floating { color: var(--danger); }
.btn-field-box .input-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  line-height: 0;
}
.auth-field-error-note {
  font-size: 12px;
  color: var(--danger);
  margin: 6px 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
}

/* Small helper text under fields */
.auth-helper {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 6px 4px 0;
  line-height: 1.5;
}
.auth-helper a { font-weight: 500; }

/* Main action row — Google: left link, right "Next" button */
.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.auth-actions .btn { min-width: 110px; }

/* Links row under form (Google: "Forgot email?") */
.auth-links-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.auth-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  text-align: left;
  align-self: flex-start;
}
.auth-link:hover { text-decoration: underline; color: var(--accent-hover); }

/* Secondary full-width button (back buttons on forgot/reset views) */
.btn-secondary-auth {
  width: 100%;
  margin-top: 10px;
}

/* Guest-mode security hint ("Not your computer?") */
.auth-guest-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 34px;
}
.auth-guest-note a { font-weight: 500; }

/* Minimal mode switcher tabs (Sign In / Sign Up) */
.auth-nav-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--chip);
  border-radius: var(--radius-pill);
  padding: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.auth-tab-btn {
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}
.auth-tab-btn:hover { color: var(--text); text-decoration: none; }
.auth-tab-btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}

/* ------------------------------------------- Account chooser (Google style) */
.chooser-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.chooser-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: background 0.12s;
}
.chooser-row:last-of-type { border-bottom: none; }
.chooser-row:hover { background: var(--bg-hover); }
.chooser-row.is-disabled { opacity: 0.5; cursor: not-allowed; }
.chooser-meta { display: flex; flex-direction: column; min-width: 0; }
.chooser-name { font-size: 15px; font-weight: 500; color: var(--text); }
.chooser-email { font-size: 13px; color: var(--text-muted); }
.chooser-row .avatar { width: 40px; height: 40px; font-size: 15px; }
.chooser-add .acct-plus { width: 40px; height: 40px; border-radius: 50%; background: var(--chip); }
.chooser-row.chooser-add { color: var(--text-muted); }
.chooser-remove {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  line-height: 0;
}
.chooser-remove:hover { background: var(--chip); color: var(--danger); }

/* ---------------------------------------------- auth bottom bar (footer) */
.auth-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.auth-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.auth-footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.auth-footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer-links a:hover { color: var(--accent); }

/* Branded terms notice card on final sign-up step */
.auth-info-card {
  margin-top: 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.auth-divider-line {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}
.accent-link { color: var(--accent); font-weight: 500; }

/* ------------------------------------------------------------ step flow */
.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}
.step-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 22px;
}
.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, width 0.2s;
}
.step-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }

/* Radio / checkbox rows (e.g. "Show password") */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  margin: 12px 0;
}
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 480px) {
  .auth-main { padding: 28px 14px 16px; }
  .auth-header-title { font-size: 23px; }
  .auth-h1 { font-size: 23px; }
  .auth-actions { flex-direction: column-reverse; align-items: stretch; }
  .auth-actions .btn { width: 100%; }
}
