/* Shared layout for the auth flow (login.html, forgot_password.html, reset_password.html).
   Previously each page duplicated this block; kept as one file so a visual tweak
   only needs to happen once. Loaded after theme.css, before any page-specific <style>. */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.login-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--space-4);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
}
.login-navbar .logo {
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  color: var(--primary);
  display: flex; align-items: center; line-height: 0;
}
.login-navbar .logo .brand-lockup { height: 30px; width: auto; max-width: 170px; display: block; }
.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  background: radial-gradient(ellipse 640px 420px at 50% 0%, var(--primary-light) 0%, var(--bg) 68%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-5);
  background: var(--color-bg-elevated);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: panel-fade-in var(--transition-base);
}
.login-card .page-title { margin-bottom: 6px; font-size: 1.6rem; }
.login-card .btn-primary { width: 100%; margin-top: var(--space-2); }

.hint-merged {
  font-size: var(--fs-aux);
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
  line-height: 1.45;
}
.back-link {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--fs-body);
  text-align: center;
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  line-height: 1;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border-radius: 4px;
}
.eye-btn:hover { opacity: 1; }
.eye-btn:focus-visible {
  outline: none;
  opacity: 1;
  box-shadow: var(--focus-ring);
}
.eye-btn svg { width: 18px; height: 18px; display: block; }

/* Error / success message boxes (login.html uses .err, forgot/reset use .msg) */
.err, .msg {
  font-size: var(--fs-body);
  line-height: 1.5;
}
.err:not(:empty), .msg:not(:empty) {
  margin-top: var(--space-3);
  padding: 8px 10px;
  border-radius: 8px;
}
.err:not(:empty) {
  color: var(--color-danger);
  background: var(--danger-light);
  border-left: 3px solid var(--color-danger);
}
.msg.ok:not(:empty) { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.msg.err:not(:empty) { background: var(--danger-light); color: var(--color-danger); border-left: 3px solid var(--color-danger); }

/* Sign-up forms, one look on both sides (login.html's register panel; TalkWebe for Business
   signup.html): the fields in titled groups, the password rules ticked as they are met, and
   a line under "confirm password" saying whether the two match. */
.form-group { margin: 0 0 var(--space-3); }
.form-group-title {
  display: flex; align-items: center; gap: 10px;
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--fs-aux); font-weight: 650; letter-spacing: .04em;
  color: var(--text-muted);
}
.form-group-title::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 420px) { .form-pair { grid-template-columns: minmax(0, 1fr); } }
.pw-rules {
  display: flex; flex-wrap: wrap; gap: 2px 12px;
  margin: 6px 0 0; padding: 0; list-style: none;
  font-size: var(--fs-aux); line-height: 1.6; color: var(--text-muted);
}
.pw-rules li::before { content: "○ "; }
.pw-rules li.met { color: var(--success); }
.pw-rules li.met::before { content: "✓ "; }
.pw-match { margin: 6px 0 0; font-size: var(--fs-aux); line-height: 1.5; }
.pw-match:empty { display: none; }
.pw-match.ok { color: var(--success); }
.pw-match.ok::before { content: "✓ "; }
.pw-match.bad { color: var(--color-danger); }
.reveal-link {
  display: inline-block; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-body); color: var(--primary);
}
.reveal-link:hover { text-decoration: underline; }
