/* ============================
   ROOT
============================ */

:root {
  --bg-primary: #0e1016;
  --bg-secondary: #151925;
  --bg-tertiary: #1c2230;
  --text-primary: #f4f7fb;
  --text-secondary: #b8c1cf;
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-primary: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --shadow-primary: 0 20px 50px rgba(0, 0, 0, 0.28);
  --layout-width: 1180px;
  --radius-large: 22px;
  --radius-medium: 16px;
}

/* ============================
   BASE
============================ */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.12), transparent 32%),
    linear-gradient(180deg, #0d1016 0%, #10141b 100%);
  color: var(--text-primary);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.pageShell {
  min-height: 100vh;
  padding: 32px 0 48px;
}

.pageContainer {
  width: min(var(--layout-width), calc(100% - 32px));
  margin: 0 auto;
}

/* ============================
   TOPBAR
============================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(14, 16, 22, 0.84);
  border-bottom: 1px solid var(--border-color);
}

.topbarInner {
  width: min(var(--layout-width), calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.topbarLeft {
  display: flex;
  justify-content: flex-start;
}

.topbarCenter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.topbarRight {
  display: flex;
  justify-content: flex-end;
}

.topbarBack,
.topbarLink {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.topbarBack:hover,
.topbarLink:hover,
.topbarLink.isActive {
  color: var(--text-primary);
}

.topbarLogo {
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.loginButton,
.buttonPrimary,
.buttonGhost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.loginButton:hover,
.buttonPrimary:hover,
.buttonGhost:hover {
  transform: translateY(-1px);
}

.loginButton,
.buttonPrimary {
  background: var(--accent-primary);
  color: white;
}

.buttonGhost {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
}

/* ============================
   TYPOGRAPHY
============================ */

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 12px;
}

h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.sectionEyebrow {
  margin: 0 0 12px;
  color: #c4b5fd;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================
   LANDING
============================ */

.heroSection {
  padding-top: 24px;
}

.heroCard,
.infoCard,
.legalCard,
.authCard,
.dashboardSidebarCard,
.dashboardPanel,
.dashboardStatCard {
  background: rgba(21, 25, 37, 0.88);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-primary);
}

.heroCard {
  padding: 36px;
}

.heroTitle {
  max-width: 880px;
}

.heroText {
  max-width: 780px;
}

.heroActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.sectionBlock {
  padding-top: 28px;
}

.sectionIntro {
  margin-bottom: 20px;
}

/* ============================
   CARDS
============================ */

.cardGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.infoCard {
  overflow: hidden;
}

.infoCardMedia {
  min-height: 180px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(255, 255, 255, 0.02)),
    var(--bg-tertiary);
  color: white;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.infoCardBody {
  padding: 22px;
}

/* ============================
   LEGAL
============================ */

.legalSection {
  padding-top: 24px;
}

.legalCard {
  padding: 32px;
}

.legalContent h1,
.legalContent h2,
.legalContent h3,
.legalContent h4 {
  color: var(--text-primary);
}

.legalContent p,
.legalContent li {
  color: var(--text-secondary);
}

.legalContent ul,
.legalContent ol {
  padding-left: 22px;
}

/* ============================
   AUTH
============================ */

.authSection {
  padding-top: 24px;
  display: flex;
  justify-content: center;
}

.authCard {
  width: min(100%, 560px);
  padding: 32px;
}

.authForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.fieldGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fieldGroup span {
  font-weight: 600;
  color: var(--text-primary);
}

.fieldGroup input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-medium);
  border: 1px solid var(--border-color);
  background: #0f141d;
  color: var(--text-primary);
  outline: none;
}

.fieldGroup input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.fullWidth {
  width: 100%;
}

/* ============================
   DASHBOARD
============================ */

.dashboardSection {
  padding-top: 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.dashboardSidebarCard,
.dashboardPanel {
  padding: 24px;
}

.dashboardNav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboardNav a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.dashboardNav a:hover {
  color: var(--text-primary);
}

.dashboardContent {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboardStatsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.dashboardStatCard {
  padding: 22px;
}

.statLabel {
  display: block;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.statValue {
  font-size: 1.4rem;
  color: var(--text-primary);
}

/* ============================
   RESPONSIVE
============================ */

@media (max-width: 980px) {
  .topbarInner {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 14px 0;
  }

  .topbarLeft,
  .topbarCenter,
  .topbarRight {
    justify-content: center;
    flex-wrap: wrap;
  }

  .dashboardSection {
    grid-template-columns: 1fr;
  }

  .dashboardStatsGrid,
  .cardGrid {
    grid-template-columns: 1fr;
  }
}
