/* ── Page hero — dark navy banner used across app pages ────────────
   Used on: dashboard, spot, diyvar, positions, revert, contact,
   settings, credits, teams/groups pages.
   ──────────────────────────────────────────────────────────────── */

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--varial-radius-lg, 0.75rem);
  /* Flat elevated navy panel — a touch lighter than the dark page so it lifts
     off it, and still a dark banner on the cream light theme. No gradient/dots. */
  background: #16233C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  color: var(--varial-white, #ffffff);
  margin-bottom: 1.5rem;
}

.page-hero-left {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
}

.page-hero-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--varial-amber, #F59E0B);
  margin: 0 0 0.5rem;
}

.page-hero .page-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--varial-white, #ffffff);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.page-hero-sub {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  max-width: 100ch;
  line-height: 1.55;
}

.page-hero-actions {
  position: relative;
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Sub-text line inside a stacked hero button (e.g. "Free credits on first signup").
   Structural helper — pairs with `btn btn-success flex-column align-items-start` on the
   guest sign-up CTA. Skin lives on the canonical btn-* family (item 3B.1 fold). */
.page-hero-btn-sub {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.82;
  margin-top: 0.15rem;
}

/* Responsive */
@media (max-width: 1199.98px) {
  .page-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .page-hero-actions {
    width: 100%;
  }

  .page-hero-actions .d-flex {
    flex-direction: column;
    align-items: stretch;
  }

  .page-hero-actions > .btn,
  .page-hero-actions > form > .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Guest sign-up CTA strip — used on dashboard, teams, credits ── */
.dashboard-guest-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-left: 4px solid var(--varial-primary, #2563EB);
  border-radius: var(--varial-radius, 0.375rem);
  flex-wrap: wrap;
}

.dashboard-guest-cta-left {
  min-width: 0;
}

.dashboard-guest-cta-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--varial-gray-800, #1C1917);
  margin: 0 0 0.25rem;
}

.dashboard-guest-cta-sub {
  font-size: 0.8125rem;
  color: var(--varial-gray-500, #6B6763);
  margin: 0;
}

.dashboard-guest-cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}

.dashboard-guest-cta .dashboard-guest-cta-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: var(--varial-primary, #2563EB);
  color: var(--varial-white, #ffffff);
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.dashboard-guest-cta .dashboard-guest-cta-btn-primary:hover {
  background: var(--varial-primary-dark, #1D4ED8);
  color: var(--varial-white, #ffffff);
  transform: translateY(-1px);
  text-decoration: none;
}

.dashboard-guest-cta .dashboard-guest-cta-btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--varial-primary, #2563EB);
  border: 1px solid var(--varial-primary, #2563EB);
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.dashboard-guest-cta .dashboard-guest-cta-btn-outline:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--varial-primary-dark, #1D4ED8);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ── App footer — shared across all app pages ────────────────── */
.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--varial-border, #E7E0CC);
}

.dashboard-footer-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  /* For guests this row also carries the compact newsletter form, pushing it
     past narrow (375px) viewports — wrap instead of forcing the page wider. */
  flex-wrap: wrap;
  min-width: 0;
}

.dashboard-footer-copy {
  font-size: 0.75rem;
  color: var(--varial-gray-400, #9A9690);
}

.dashboard-footer-legal {
  font-size: 0.75rem;
  color: var(--varial-gray-400, #9A9690);
  text-decoration: none;
  transition: color 0.15s;
}

.dashboard-footer-legal:hover {
  color: var(--varial-gray-600, #6B675F);
  text-decoration: none;
}

.dashboard-footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-footer-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--varial-primary, #2563EB);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s;
}

.dashboard-footer-link:hover {
  color: var(--varial-primary, #2563EB);
  text-decoration: none;
}

/* Slim guest-only newsletter sign-up, inline in the dashboard footer (#3731) —
   sits between the copyright and the Privacy/Terms links. Input + button are
   rendered as one joined control, matching the marketing footer's treatment. */
.dashboard-footer-signup-form {
  display: flex;
  align-items: center;
}

.dashboard-footer-signup-group {
  display: flex;
  border: 1px solid var(--varial-border, #E7E0CC);
  border-radius: 0.25rem;
  background: var(--varial-card-bg, #fff);
  transition: border-color 0.15s;
}

.dashboard-footer-signup-group:focus-within {
  border-color: var(--varial-primary, #2563EB);
}

.dashboard-footer-signup-input {
  width: 9rem;
  min-width: 0;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--varial-gray-600, #6B675F);
  background: none;
  border: none;
  border-radius: 0.25rem 0 0 0.25rem;
}

.dashboard-footer-signup-input:focus {
  outline: none;
}

.dashboard-footer-signup-btn {
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--varial-white, #fff);
  background: var(--varial-primary, #2563EB);
  border: none;
  border-radius: 0 0.1875rem 0.1875rem 0;
  cursor: pointer;
  transition: background 0.15s;
}

.dashboard-footer-signup-btn:hover {
  background: var(--varial-primary-dark, #1D4ED8);
}

.dashboard-footer-signup-thanks {
  font-size: 0.75rem;
  color: var(--varial-gray-400, #9A9690);
}

.dashboard-footer-signup-error {
  font-size: 0.6875rem;
  color: #dc2626;
}

/* ── Dark mode ────────────────────────────────────────────────────
   The hero navy (#16233C) sits very close to the dark page (#0F172A), so
   lift it a touch more and strengthen the hairline border for separation.
   The guest CTA's light-blue tints all but vanish on navy — repaint them
   with the lifted dark-mode primary so the strip stays visible. */
[data-bs-theme="dark"] .page-hero {
  background: #1C2840;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .dashboard-guest-cta {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.28);
  border-left-color: var(--varial-primary);
}

/* ── Light variant — lean, on-page header for landing pages ──────────
   The marketing/landing pages (dashboard, VAR, Positions, Spot, Revert,
   Contact) opt into this instead of the dark navy banner: no fill, no box,
   just an eyebrow + title + sub sitting on the page, separated by a hairline.
   Colours come from theme-flipping tokens, so it reads cleanly in light AND
   dark mode (the dark banner sat too close to the dark page bg — see above).
   CTAs stay in .page-hero-actions and keep the hero CTA skin. */
.page-hero.page-hero--light {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--varial-border, #E7E0CC);
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  padding: 0 0 1.25rem;
  margin-bottom: 1.75rem;
}

/* No eyebrow above the title on the light header, so pull the heading flush to
   the top of the content area (the base rule bottom-margins it). */
.page-hero--light .page-hero-title {
  margin-top: 0;
}

.page-hero--light .page-hero-title {
  color: var(--varial-gray-900, #131210);
  font-size: 1.625rem;
}

.page-hero--light .page-hero-sub {
  color: var(--varial-gray-500, #6B6763);
}

/* Keep it flat and hairline-only in dark mode too (override the dark banner
   fill above; the border token already flips to a dark-suitable value). */
[data-bs-theme="dark"] .page-hero.page-hero--light {
  background: transparent;
  border-bottom: 1px solid var(--varial-border, #334155);
}
