:root {
  --bg: #070c13;
  --panel: #101824;
  --panel-2: #151f2e;
  --line: #243349;
  --text: #f7f9fc;
  --muted: #aab4c2;
  --accent: #8edfff;
  --accent-2: #64b8d4;
  --danger: #ff6b7d;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 10%, rgba(142, 223, 255, 0.14), transparent 34rem),
    linear-gradient(135deg, #05080e 0%, var(--bg) 54%, #0b111a 100%);
  color: var(--text);
  letter-spacing: 0;
}

button,
input,
a {
  font: inherit;
}

a {
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.loading-screen,
.auth-layout,
.dashboard {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.brand-mark {
  margin: 0 auto 18px;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(142, 223, 255, 0.55);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 900;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 500px);
  gap: clamp(36px, 8vw, 110px);
  min-height: 100vh;
  align-items: center;
  padding: 72px 0;
}

.auth-copy h1,
.topbar h1 {
  margin: 0;
  font-size: clamp(58px, 10vw, 118px);
  line-height: 0.9;
  text-transform: uppercase;
}

.auth-copy > p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-steps {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 20px;
  margin-top: 46px;
  max-width: 620px;
}

.auth-steps span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #06101a;
  font-weight: 900;
}

.auth-steps p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.auth-panel,
.program-card,
.metric-card,
.feature-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 24, 36, 0.84);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.auth-panel {
  padding: clamp(28px, 4vw, 46px);
}

.auth-panel h2,
.empty-state h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  text-transform: uppercase;
}

.muted,
.auth-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.auth-panel label {
  display: block;
  margin: 28px 0 8px;
  color: var(--text);
  font-weight: 800;
}

.auth-panel input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #080f18;
  color: var(--text);
  outline: none;
}

.auth-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(142, 223, 255, 0.12);
}

.auth-panel button,
.ghost-button {
  min-height: 54px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-panel button {
  width: 100%;
  margin-top: 22px;
  background: var(--accent);
  color: #06101a;
}

.auth-panel button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.notice,
.warning {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid rgba(142, 223, 255, 0.65);
  border-radius: 6px;
  background: rgba(142, 223, 255, 0.09);
  color: var(--text);
}

.warning {
  border-color: rgba(255, 107, 125, 0.7);
  background: rgba(255, 107, 125, 0.1);
}

.dashboard {
  padding: 44px 0 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.ghost-button {
  display: inline-grid;
  place-items: center;
  padding: 0 22px;
  background: transparent;
  color: var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr) minmax(220px, 0.7fr);
  gap: 18px;
}

.program-card,
.metric-card,
.feature-card,
.empty-state {
  padding: 28px;
}

.program-card h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.program-pill {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(142, 223, 255, 0.14);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.program-card p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.status-row span,
.metric-card span {
  color: var(--muted);
}

.status-row strong,
.metric-card strong {
  color: var(--accent);
}

.metric-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card small {
  color: var(--muted);
  line-height: 1.45;
}

.metric-card strong {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
}

.focus-panel,
.checkin-panel,
.week-card,
.foundation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 24, 36, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.focus-panel,
.checkin-panel {
  padding: clamp(26px, 4vw, 38px);
}

.focus-panel h2,
.checkin-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  text-transform: uppercase;
}

.focus-panel p,
.checkin-panel p,
.week-card p,
.foundation-card p {
  color: var(--muted);
  line-height: 1.55;
}

.progress-line {
  height: 10px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #070d15;
  border: 1px solid var(--line);
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.checkin-panel button {
  min-height: 52px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid rgba(142, 223, 255, 0.35);
  border-radius: 6px;
  background: rgba(142, 223, 255, 0.1);
  color: var(--accent);
  cursor: not-allowed;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading {
  margin: 58px 0 24px;
}

.compact-heading {
  margin-top: 44px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.week-grid,
.foundation-grid {
  display: grid;
  gap: 18px;
}

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

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

.week-card,
.foundation-card {
  padding: 24px;
}

.week-card span,
.foundation-card span {
  display: inline-grid;
  min-width: 48px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #06101a;
  font-weight: 900;
}

.week-card h3,
.foundation-card h3 {
  margin: 20px 0 10px;
  font-size: 28px;
}

.feature-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-card h3 {
  margin: 18px 0 12px;
  font-size: 26px;
}

.feature-card p,
.empty-state p {
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  margin-top: 40px;
  max-width: 780px;
}

code {
  color: var(--accent);
}

@media (max-width: 920px) {
  .auth-layout,
  .hero-grid,
  .feature-grid,
  .app-grid,
  .week-grid,
  .foundation-grid {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    align-items: start;
    padding: 42px 0;
  }

  .auth-copy h1,
  .topbar h1 {
    font-size: clamp(52px, 17vw, 82px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .ghost-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .loading-screen,
  .auth-layout,
  .dashboard {
    width: min(100% - 28px, 1180px);
  }

  .auth-copy > p:not(.eyebrow) {
    font-size: 19px;
  }

  .auth-panel,
  .program-card,
  .metric-card,
  .feature-card,
  .focus-panel,
  .checkin-panel,
  .week-card,
  .foundation-card,
  .empty-state {
    padding: 22px;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .metric-card {
    min-height: 150px;
  }

  .auth-steps {
    gap: 16px 14px;
  }

  .auth-steps span {
    width: 40px;
    height: 40px;
  }
}
