/*
 * Auth screen styles — login / signup gate. Layered on top of style.css so it
 * reuses the same CSS variables (dark/light theming stays consistent). Loaded by
 * login.html; the small account chip on the hub reuses .auth-btn* too.
 * SEE: hub account gate — sign-in on entry + guest fallback (2026-07-28)
 */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Soft branded backdrop built from theme variables — no external image. */
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(110, 168, 254, 0.16), transparent 60%),
    radial-gradient(900px 500px at 110% 120%, rgba(77, 139, 255, 0.14), transparent 55%),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* ---- Left brand panel ---- */
.auth-brand {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  color: var(--text);
  background:
    linear-gradient(160deg, rgba(110, 168, 254, 0.12), transparent 70%),
    var(--bg-card);
  border-right: 1px solid var(--border);
}
.auth-brand__logo { color: var(--accent); }
.auth-brand__title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth-brand__pitch {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}
.auth-brand__points {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-brand__points li {
  position: relative;
  padding-left: 26px;
  color: var(--text-dim);
  font-size: 14px;
}
.auth-brand__points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

/* ---- Right auth panel ---- */
.auth-panel {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-card { display: flex; flex-direction: column; gap: 18px; }

.auth-card__head { display: flex; flex-direction: column; gap: 4px; }
.auth-card__title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.auth-card__sub { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---- Tabs ---- */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.auth-tab.is-active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* ---- Message line ---- */
.auth-msg {
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  border: 1px solid transparent;
}
.auth-msg--error { color: #f85149; background: rgba(248, 81, 73, 0.12); border-color: rgba(248, 81, 73, 0.5); }
.auth-msg--ok { color: #3fb950; background: rgba(63, 185, 80, 0.12); border-color: rgba(63, 185, 80, 0.5); }

/* ---- Form ---- */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.auth-field input {
  padding: 11px 13px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
}
.auth-field input::placeholder { color: var(--text-dim); opacity: 0.7; }
.auth-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.auth-row { display: flex; align-items: center; gap: 10px; }
.auth-row--between { justify-content: space-between; }
.auth-check { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 13px; cursor: pointer; }
.auth-check input { width: 15px; height: 15px; accent-color: var(--accent-strong); }
.auth-link { color: var(--accent); font-size: 13px; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* ---- Buttons (shared with the hub account chip) ---- */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}
.auth-btn:hover { border-color: var(--accent); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn--primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.auth-btn--primary:hover { opacity: 0.92; border-color: var(--accent-strong); }
.auth-btn--social { background: var(--bg); }
.auth-btn--ghost { background: transparent; color: var(--accent); border-color: transparent; }
.auth-btn--ghost:hover { background: rgba(110, 168, 254, 0.1); border-color: transparent; }

/* ---- Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-guestnote {
  margin: -6px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

.auth-demo-note {
  margin: 4px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--badge-text);
  background: var(--badge-bg);
  border-radius: 9px;
}

/* ---- Hub header account chip (rendered by hub.js on index.html) ---- */
.hub-header__inner--account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hub-feedback-link { margin-left: auto; text-decoration: none; }
.hub-account {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-account__chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.hub-account__avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.hub-account__info { display: flex; flex-direction: column; line-height: 1.2; }
.hub-account__name { font-size: 14px; font-weight: 700; color: var(--text); }
/* Member name doubles as a rename control (click → prompt → syncs to the shared profile). */
.hub-account__name--editable { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.hub-account__role { font-size: 11px; color: var(--text-dim); }
.hub-account__action { width: auto; padding: 8px 14px; font-size: 13px; }

@media (max-width: 480px) {
  .hub-account__info { display: none; }
}

/* ---- Responsive: collapse to a single column, drop the brand panel ---- */
@media (max-width: 720px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; }
  .auth-brand { display: none; }
  .auth-panel { padding: 32px 24px; }
}
