/* Layout of the authentication flows and of the two console placeholders (#59, #60, #61).
   Published at /auth.css — `landing/` is rsynced to the site root.

   Only layout lives here. The colour tokens stay inline in every page, as the convention
   requires (there is still no shared theme.css): a page must render on its own palette even if
   this sheet fails to load, and `landing-auth.test.mjs` checks the block is present in all
   twenty-one of them. Everything below reads those tokens and defines none. */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4.5rem) 1.25rem;
}

/* Gradient border on a dark card, the funnel's `.legal-box` treatment reduced to one panel. */
.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(34, 27, 53, .85), rgba(34, 27, 53, .98)) padding-box,
    var(--border-grad) border-box;
  border-radius: var(--radius-card);
  box-shadow: 0 0 30px var(--glow-soft);
  padding: clamp(1.8rem, 4vw, 2.6rem);
}

.auth-card h1 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.auth-lede {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.6rem;
}

.auth-card a { color: var(--accent-light); text-decoration: none; }
.auth-card a:hover { text-decoration: underline; }

/* ── FORM ── */
.form-field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.1rem; }
.form-field label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-lavender);
}
.form-field input {
  width: 100%;
  padding: 0.95rem 1.1rem;
  font: inherit;
  color: var(--text);
  background: rgba(14, 14, 20, .55);
  border: 1px solid var(--border-idle);
  border-radius: var(--radius-input);
  transition: border-color .2s, box-shadow .2s;
}
.form-field input::placeholder { color: var(--text-faint); }
.form-field input:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 20px var(--glow);
}
.field-hint { font-size: 0.85rem; color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.95rem 1.5rem;
  border: none;
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: box-shadow .2s, filter .2s, opacity .2s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, #A98CFF 0%, #7C5BFC 58%, #6644DC 100%);
  color: #fff;
  box-shadow: 0 0 22px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 34px var(--glow); filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border-muted);
  padding: calc(0.95rem - 2px) 1.5rem;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--accent-light); }

/* ── GOOGLE (#38) ── */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  background: #fff;
  color: #0B0D0F;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: opacity .2s, box-shadow .2s;
}
.google-btn:hover { opacity: .94; box-shadow: 0 0 24px var(--glow-soft); }
.or-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-weight: 300;
  font-size: 0.9rem;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--divider);
  border-radius: 2px;
}

/* ── MESSAGES ── */
.alert {
  display: none;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}
.alert.visible { display: block; }
.alert-error { background: rgba(248, 113, 113, .10); border: 1px solid rgba(248, 113, 113, .35); color: #fca5a5; }
.alert-info { background: rgba(124, 91, 252, .08); border: 1px solid rgba(124, 91, 252, .25); color: var(--accent-light); }
.alert-success { background: rgba(74, 222, 128, .08); border: 1px solid rgba(74, 222, 128, .28); color: var(--success); }

.auth-links { margin-top: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; text-align: center; }
.auth-links, .auth-links a { font-size: 0.95rem; }
.auth-links p { color: var(--text-muted); }

/* `.choice-list` / `.choice` dressed the sign-in chooser (#60) until #301 removed it: a successful
   sign-in now lands on an application instead of asking which one. No markup carries these classes
   any more, so the rules went with the screen. */

/* Hidden until the script decides which panel this reader should see. Kept as a class rather
   than an inline style so nothing has to be rewritten to reveal a panel. */
.hidden { display: none !important; }

/* ── THE ACCOUNT FLOW (#62, #63, #64, #65) ──
   The four managed sections need more room than the 440px sign-in card, and a list that a screen
   reader can walk. Everything below still defines no colour of its own. */
.account-card { max-width: 640px; }

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 0.8rem;
}
.account-tab {
  font: inherit;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.account-tab:hover { color: var(--text); border-color: var(--border-idle); }
.account-tab.is-current {
  color: var(--text);
  background: rgba(124, 91, 252, .12);
  border-color: var(--accent);
}

.account-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.section-lede { color: var(--text-muted); font-weight: 300; font-size: 0.95rem; margin-bottom: 1.3rem; }

/* ── SESSIONS (#65) ── */
.session-list, .invoice-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.2rem; }
.session, .invoice {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.2rem;
  background: rgba(14, 14, 20, .55);
  border: 1px solid var(--border-idle);
  border-radius: var(--radius-input);
}
/* The session doing the reading is marked, so nobody closes it by accident looking for one they
   do not recognise. */
.session-current { border-color: var(--accent); box-shadow: 0 0 18px var(--glow-soft); }
.session strong, .invoice span { font-family: var(--font-heading); font-size: 1rem; }
.session span { color: var(--text-muted); font-size: 0.85rem; font-weight: 300; }

.btn-inline {
  align-self: flex-start;
  font: inherit;
  font-size: 0.9rem;
  color: var(--accent-light);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.btn-inline:hover { color: var(--text); }

/* ── BILLING (#62) ── */
.billing-state {
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  border-radius: var(--radius-input);
  background: rgba(124, 91, 252, .08);
  border: 1px solid rgba(124, 91, 252, .25);
  color: var(--text);
  font-size: 0.95rem;
}
.invoice { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.invoice span { color: var(--text-muted); font-weight: 300; font-size: 0.9rem; }
