/* Auth + launchpad — matches Business P&L brand tokens */

:root {
  --font-sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --bg: #f4f5f7;
  --bg-soft: #eef0f3;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-quiet: #9ca3af;
  --border: #e5e7eb;
  --accent: #1b3a57;
  --accent-hover: #142b41;
  --accent-light: #eef3f8;
  --danger: #9b3b32;
  --danger-bg: #faf5f4;
  --ok: #1b3a57;
  --ok-bg: #eef3f8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 36px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body.auth-body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
}

a { color: inherit; }

.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}

.auth-top--launchpad {
  padding: 0.85rem 1.35rem;
}

.auth-top--with-back {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.auth-top--with-back .auth-brand {
  justify-self: center;
}

.auth-top__spacer { min-width: 1px; }

.auth-back {
  justify-self: start;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.auth-back:hover { text-decoration: underline; }

.auth-top__nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.auth-top__nav a,
.auth-top__nav button {
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.auth-top__nav a:hover,
.auth-top__nav button:hover {
  color: var(--accent);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.auth-brand--compact {
  gap: 0.55rem;
}

.auth-brand--compact .auth-brand__mark {
  width: 1.9rem;
  height: 1.9rem;
}

.auth-brand--compact .auth-brand__name {
  font-size: 1.05rem;
}

.auth-brand__mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.45rem;
}

.auth-brand__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.auth-brand__tag {
  display: block;
  font-size: 0.68rem;
  color: var(--text-quiet);
  font-weight: 500;
}

.required-asterisk {
  color: #c0392b;
  margin-left: 0.2rem;
  font-weight: 600;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 2.5rem;
}

.auth-card {
  width: min(100%, 26.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.85rem 1.6rem 1.7rem;
}

.auth-card--wide {
  width: min(100%, 40rem);
}

.auth-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-quiet);
  margin-bottom: 0.55rem;
}

.auth-card__title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

.auth-card__lede {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.35rem;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-field {
  display: grid;
  gap: 0.35rem;
}

.auth-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  color: var(--text);
}

.auth-field input:focus {
  outline: 2px solid rgba(27, 58, 87, 0.22);
  border-color: var(--accent);
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.auth-check input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.auth-check a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-check a:hover { text-decoration: underline; }

.auth-check--inline {
  align-items: center;
  margin: 0;
}

.auth-check--inline input {
  margin-top: 0;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-inline-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.auth-inline-link:hover { text-decoration: underline; }

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.auth-btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(27, 58, 87, 0.18), 0 6px 16px rgba(27, 58, 87, 0.14);
  width: 100%;
}

.auth-btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.auth-btn--primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.auth-btn--ghost:hover {
  background: var(--bg-soft);
}

.auth-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.auth-foot a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-alert {
  display: none;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.auth-alert.is-visible { display: block; }

.auth-alert--error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #efd6d2;
}

.auth-alert--ok {
  background: var(--ok-bg);
  color: var(--accent);
  border: 1px solid #d7e0ea;
}

.auth-setup {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.auth-setup code {
  font-size: 0.82rem;
  background: #fff;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Launchpad */
.lp-home {
  width: min(100% - 2rem, 42rem);
  margin: 0 auto;
  padding: 1.85rem 0 2.5rem;
}

.lp-home__welcome {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.6vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.lp-home__lede {
  color: var(--text-muted);
  margin-bottom: 1.35rem;
  max-width: 34rem;
  font-size: 0.98rem;
}

.lp-home__empty-lead {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 550;
  margin-bottom: 0.85rem;
}

.lp-home__actions {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.65rem;
}

.lp-home__action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
  padding: 0.95rem 1.15rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  font: inherit;
}

.lp-home__action--btn {
  cursor: pointer;
}

.lp-home__action:hover {
  border-color: #d7e0ea;
  box-shadow: var(--shadow-md);
}

.lp-home__action--primary {
  border-color: #c5d2e0;
  box-shadow: var(--shadow-md);
  background: #fff;
}

.lp-home__action--emphasis {
  border-color: rgba(27, 58, 87, 0.35);
  box-shadow: 0 8px 24px rgba(27, 58, 87, 0.08);
}

.lp-home__action--emphasis strong {
  color: var(--accent);
}

.lp-home__action--secondary {
  opacity: 0.96;
}

.lp-home__action strong {
  font-size: 1.02rem;
}

.lp-home__action span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.lp-recent {
  margin-bottom: 1.5rem;
  min-height: 8.5rem;
}

.lp-recent__head {
  margin-bottom: 0.7rem;
}

.lp-recent__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.lp-recent__list {
  display: grid;
  gap: 0.55rem;
}

.lp-recent__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lp-recent__info {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.lp-recent__info strong {
  font-size: 0.95rem;
}

.lp-recent__info span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lp-recent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  flex-shrink: 0;
}

.lp-recent__actions button {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.lp-recent__actions button:hover {
  text-decoration: underline;
}

.lp-recent__placeholder {
  min-height: 5.5rem;
  padding: 1.15rem 1.1rem;
  border: 1px dashed #d7dde5;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
}

.lp-recent__empty-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.lp-recent__empty-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 32rem;
  line-height: 1.45;
}

.lp-home__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.lp-home__secondary a,
.lp-home__secondary button {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.lp-home__secondary a:hover,
.lp-home__secondary button:hover {
  text-decoration: underline;
}

.account-meta {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.account-meta div {
  display: grid;
  gap: 0.15rem;
}

.account-meta dt {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-quiet);
}

.account-meta dd {
  font-size: 1rem;
  color: var(--text);
}

@media (max-width: 640px) {
  .lp-recent__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-top--with-back {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.65rem;
  }

  .auth-top--with-back .auth-brand {
    justify-self: start;
  }

  .auth-top__nav {
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .auth-brand__tag { display: none; }
  .auth-card { padding: 1.5rem 1.2rem; }
}
