/* Auth
 * Sign-in, invite-required and account pages.
 *
 * These are the first thing a new person sees, so they borrow the app's own
 * vocabulary rather than looking like a bolted-on login form: the same card
 * shape, the same sparkle ring, the same accent and type. Every colour resolves
 * through a token in tokens.css.
 */

.authwrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 18px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.authcard {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  padding: 34px 28px 30px;
  text-align: center;
}

.authmark {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: block;
}

.authtitle {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.authtagline {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.5;
}

/* Google's brand guidelines want their mark on a neutral surface with the
   wordmark legible, so this is a light button in both themes rather than a
   themed one. It is the one place the palette deliberately steps aside. */
.googlebtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #1f1f1f;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  transition: transform .15s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s;
}
.googlebtn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .28); }
.googlebtn:active { transform: scale(.985); }
.glogo { width: 18px; height: 18px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .googlebtn { transition: none; }
  .googlebtn:hover, .googlebtn:active { transform: none; }
}

.authnote {
  margin: 20px 0 0;
  font-size: 13.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.autherror {
  background: var(--neg-tint);
  color: var(--neg);
  border-radius: 12px;
  padding: 11px 14px;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
/* Hidden until signin.js fills in a message, so an unrecognised reason code
   leaves no empty box behind. */
.autherror:empty { display: none; }

.authfoot { margin-top: 0; }

/* ---------- invite form ---------- */

.inviteform {
  margin-top: 22px;
  text-align: left;
  display: grid;
  gap: 6px;
}

.invitefield {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  padding: 12px 14px;
  text-align: center;
  text-transform: uppercase;
}
.invitefield:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.invitefield::placeholder { letter-spacing: .06em; color: var(--ink-faint); text-transform: none; }

.invitehint {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.inviteform .navprimary { justify-self: end; }

/* ---------- account: session list ---------- */

.sessionlist { display: grid; gap: 10px; }

.sessionrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.sessionrow[data-current="true"] { border-color: var(--accent); }

.sessionmeta { flex: 1; min-width: 0; }
.sessiondevice {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sessionwhen { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.sessioncurrent {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sessionend {
  flex: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  font-size: 14px;
  cursor: pointer;
}
.sessionend:hover { color: var(--neg); border-color: var(--neg); }

.authactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .authcard { padding: 28px 20px 24px; }
  .authtitle { font-size: 22px; }
  .sessionrow { flex-wrap: wrap; }
  .authactions { flex-direction: column-reverse; align-items: stretch; }
}
