/* Full-screen auth overlay (login wall) — matches the trainer's dark theme. */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 700px at 50% -10%, #1a2030 0%, var(--bg) 60%);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 26px 24px;
}

.auth-brand {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
/* uses the shared .brand-mark square (theme.css); just keep the gap/size tidy here */
.auth-brand { gap: 9px; }

.auth-consent { margin: 12px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.auth-consent a { color: var(--gold); text-decoration: none; }
.auth-consent a:hover { text-decoration: underline; }

.auth-title { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.4; }
.auth-sub b, .auth-title b { color: var(--text); }

.auth-msg { min-height: 0; font-size: 12.5px; line-height: 1.4; margin: 0 0 12px; }
.auth-msg:empty { margin: 0; }
.auth-msg.err {
  color: #ff9aa5; background: #2a1d22; border: 1px solid #4a2a32;
  border-radius: 8px; padding: 8px 11px;
}
.auth-msg.ok {
  color: var(--green); background: #142a20; border: 1px solid #214; border-color: #1d3a2b;
  border-radius: 8px; padding: 8px 11px;
}

.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-in {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.15s ease;
}
.auth-in::placeholder { color: #5e6678; }
.auth-in:focus { border-color: var(--gold-soft); }
.auth-otp { letter-spacing: 6px; text-align: center; font-size: 18px; font-weight: 700; }

.auth-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #1a1406;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-soft) 100%);
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  margin-top: 2px;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.auth-btn:hover { filter: brightness(1.08); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: 0.6; cursor: default; }

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 16px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.auth-google {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  text-decoration: none;
  font-weight: 600; font-size: 14px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px; transition: filter 0.15s ease;
}
.auth-google:hover { filter: brightness(1.14); }
.auth-google .g-mark {
  font-weight: 800; color: #fff;
  background: conic-gradient(from -45deg, #ea4335, #fbbc05, #34a853, #4285f4, #ea4335);
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}

.auth-links {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.auth-links a {
  color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: none;
}
.auth-links a:hover { color: var(--gold); }

/* topbar: signed-in user + logout */
.user-chip { color: var(--muted); font-size: 13px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip b { color: var(--text); }
#logout-btn { padding: 9px 12px; }
.auth-hidden { display: none !important; }
