.app-pages {
  display: grid;
  gap: 14px;
}

.app-page {
  display: grid;
  gap: 14px;
}

.app-page.hidden {
  display: none;
}

.primary-nav {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-pill {
  border: none;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border-radius: 8px;
  padding: 8px 16px;
  width: auto;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.nav-pill:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.nav-pill.is-active {
  color: var(--ink);
  background: var(--accent-soft);
}

.header-user-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s;
}
.header-user-chip:hover { border-color: var(--line-strong); }

.shell-hero {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.shell-hero-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.shell-hero-copy p {
  margin: 0;
  color: #4a6483;
  line-height: 1.65;
}

.shell-hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.shell-hero-actions .ghost-btn {
  min-width: 0;
}

.shell-hero-side {
  display: grid;
  gap: 10px;
}

.shell-metric-card,
.shell-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
}

.shell-metric-card span,
.shell-eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
}

.shell-metric-card strong {
  display: block;
  font-size: 1.1rem;
  color: #123252;
}

.shell-metric-card p,
.shell-panel p,
.shell-body-copy {
  margin: 8px 0 0;
  color: #4d6684;
  line-height: 1.58;
}

.shell-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.shell-section-head h2,
.shell-panel h2,
.shell-panel h3 {
  margin: 0;
}

.shell-section-head p {
  margin: 8px 0 0;
  color: #58708f;
}

.shell-grid {
  display: grid;
  gap: 12px;
}

.shell-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shell-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-table-wrap {
  overflow-x: auto;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.pricing-table th,
.pricing-table td {
  border: 1px solid #d7e2ef;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.95rem;
}

.pricing-table th {
  background: linear-gradient(180deg, #eef5ff, #e5eefb);
  color: #163b65;
  font-family: "Space Grotesk", sans-serif;
}

.auth-page-form,
.auth-page-actions {
  display: grid;
  gap: 10px;
}

.auth-page-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-page-actions-single,
.shell-section-row {
  display: grid;
  gap: 10px;
}

.auth-page-actions-single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shell-section-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.shell-bullet-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #42607f;
  display: grid;
  gap: 8px;
}

.account-summary-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d3deec;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-kpi {
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fbfdff, #f3f8fe);
}

.account-kpi span {
  display: block;
  margin-bottom: 4px;
  color: #647d9b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.account-kpi strong {
  font-size: 1.18rem;
  color: #163b65;
}

.account-inline-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-ledger-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.account-ledger-item,
.account-ledger-empty {
  border: 1px solid #d3deec;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfdff, #f3f8fe);
}

.account-ledger-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.account-ledger-type {
  font-weight: 800;
  color: #173a63;
}

.account-ledger-points {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

.ledger-positive {
  color: #0f8a53;
}

.ledger-negative {
  color: #b42318;
}

.account-ledger-meta {
  margin-top: 6px;
  color: #5d7492;
  font-size: 0.86rem;
}

.contact-email-line {
  font-size: 1.08rem;
  font-weight: 800;
}

.legal-panel {
  padding: 24px;
}

.legal-panel p {
  line-height: 1.72;
}

@media (max-width: 1100px) {
  .shell-hero {
    grid-template-columns: 1fr;
  }

  .shell-grid-2,
  .shell-grid-3,
  .account-summary-grid,
  .auth-page-actions,
  .auth-page-actions-single,
  .shell-section-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .primary-nav {
    gap: 6px;
  }

  .nav-pill {
    width: calc(50% - 3px);
    justify-content: center;
  }

  .shell-hero,
  .shell-panel,
  .shell-metric-card {
    padding: 16px;
  }
}


/* ── Dark mode shell overrides ── */
[data-theme="dark"] .nav-pill,
[data-theme="dark"] .header-user-chip {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
[data-theme="dark"] .nav-pill:hover,
[data-theme="dark"] .nav-pill.is-active,
[data-theme="dark"] .header-user-chip:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

[data-theme="dark"] .shell-metric-card,
[data-theme="dark"] .shell-panel,
[data-theme="dark"] .account-summary-card,
[data-theme="dark"] .account-kpi,
[data-theme="dark"] .account-ledger-item,
[data-theme="dark"] .account-ledger-empty {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .shell-hero-copy p,
[data-theme="dark"] .shell-panel p,
[data-theme="dark"] .shell-body-copy,
[data-theme="dark"] .shell-section-head p,
[data-theme="dark"] .shell-bullet-list,
[data-theme="dark"] .account-ledger-meta,
[data-theme="dark"] .shell-metric-card span,
[data-theme="dark"] .shell-eyebrow {
  color: var(--muted);
}

[data-theme="dark"] .shell-metric-card strong,
[data-theme="dark"] .account-kpi strong,
[data-theme="dark"] .account-ledger-type,
[data-theme="dark"] .shell-section-head h2,
[data-theme="dark"] .shell-panel h3 {
  color: var(--ink);
}

[data-theme="dark"] .pricing-table th,
[data-theme="dark"] .pricing-table td {
  border-color: var(--line);
}

[data-theme="dark"] .pricing-table th {
  background: var(--surface-strong);
  color: var(--ink);
}
