:root {
  --bg: #050816;
  --bg-elevated: #070b1f;
  --bg-card: #0b1027;
  --bg-soft: #0f172a;
  --border-subtle: rgba(148, 163, 184, 0.3);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.1);
  --accent-strong: #0ea5e9;
  --accent-warm: #f97316;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --danger: #f97373;
  --radius-lg: 18px;
  --radius-md: 999px;
  --radius-sm: 10px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --shadow-subtle: 0 0 0 1px rgba(148, 163, 184, 0.2);
  --shadow-focus: 0 0 0 1px rgba(56, 189, 248, 0.8), 0 0 0 10px rgba(56, 189, 248, 0.06);
  --transition-fast: 150ms ease-out;
  --transition-med: 200ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 80%, #020617 100%);
  background-color: #020617;
}

body {
  min-height: 100vh;
}

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 55%),
    linear-gradient(145deg, #020617, #020617 40%, #020617 100%);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 10px;
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0%, #f97316 0, #f97316 28%, #38bdf8 85%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  color: #0b1020;
  box-shadow: 0 12px 28px rgba(8, 47, 73, 0.7);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.logo-subtitle {
  font-size: 0.74rem;
  color: var(--text-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast), transform 80ms ease-out;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-0.5px);
}

.nav-link.is-active {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.65), rgba(8, 47, 73, 0.85));
  color: #0b1020;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(8, 47, 73, 0.8), 0 10px 22px rgba(15, 23, 42, 0.9);
}

.header-account {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 7px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition-med), color var(--transition-med), border-color var(--transition-med),
    box-shadow var(--transition-med), transform 80ms ease-out;
}

.btn.primary {
  background: radial-gradient(circle at top left, #38bdf8, #0ea5e9);
  color: #0b1020;
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 14px 30px rgba(8, 47, 73, 0.8);
}

.btn.primary:hover {
  background: radial-gradient(circle at top left, #0ea5e9, #38bdf8);
  transform: translateY(-1px);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.55);
}

.btn.secondary:hover {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.9);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.6);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(56, 189, 248, 0.9);
}

.btn.subtle {
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-soft);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn.subtle:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.75);
}

.btn.danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.55);
}

.btn.danger:hover {
  background: rgba(248, 113, 113, 0.08);
}

.btn.link {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding-inline: 0;
}

.btn.link:hover {
  text-decoration: underline;
}

.site-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-hidden {
  display: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.section-header h1 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.section-header h2 {
  margin: 0 0 4px;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 10px;
}

.hero-phases {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phase-pill {
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 9px 11px;
}

.phase-pill h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.streak-card {
  border-radius: 16px;
  padding: 12px 12px 10px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.26), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.75);
  box-shadow: 0 18px 38px rgba(8, 47, 73, 0.9);
}

.streak-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.streak-value {
  font-size: 0.98rem;
  font-weight: 600;
}

.streak-value span {
  font-size: 1.2rem;
}

.muted {
  margin: 4px 0 6px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.streak-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
}

.streak-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
}

.overall-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.78rem;
}

.overall-progress span:last-child {
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 64, 175, 0.9);
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9, #a855f7);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6), 0 10px 25px rgba(56, 189, 248, 0.5);
  transition: width 300ms ease-out;
}

.curriculum-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.curriculum-item {
  border-radius: 16px;
  padding: 12px 12px 11px;
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.26), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(51, 65, 85, 0.85);
}

.curriculum-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.curriculum-header h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.curriculum-header p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pill-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.75);
  font-size: 0.76rem;
  cursor: pointer;
  user-select: none;
}

.pill-checkbox input {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  appearance: none;
  background: transparent;
  display: inline-block;
  position: relative;
}

.pill-checkbox input:checked {
  border-color: rgba(56, 189, 248, 0.9);
  background: radial-gradient(circle at 30% 0%, #38bdf8, #0ea5e9);
}

.pill-checkbox input:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: #0b1020;
}

.curriculum-item[data-completed='true'] {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.8), 0 12px 26px rgba(8, 47, 73, 0.95);
}

.curriculum-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.curriculum-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
}

.curriculum-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.curriculum-description {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.curriculum-focus {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text);
}

.curriculum-focus .label {
  margin-right: 4px;
}

.curriculum-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.skill-pill {
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 6px 11px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-soft);
  cursor: pointer;
  transition: background var(--transition-med), color var(--transition-med), border-color var(--transition-med),
    box-shadow var(--transition-med), transform 80ms ease-out;
}

.skill-pill:hover {
  border-color: rgba(56, 189, 248, 0.7);
  color: var(--text);
  transform: translateY(-1px);
}

.skill-pill.is-active {
  background: radial-gradient(circle at 15% 0, #38bdf8, #0ea5e9);
  color: #020617;
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.75), 0 14px 28px rgba(8, 47, 73, 0.95);
}

.checkin-form {
  border-radius: 16px;
  padding: 12px 12px 11px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(51, 65, 85, 0.9);
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--text-soft);
  font-weight: 500;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
select,
textarea {
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.98);
  padding: 7px 9px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-soft);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(56, 189, 248, 0.95);
  box-shadow: var(--shadow-focus);
  background: rgba(15, 23, 42, 0.98);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.recent-checkins h3 {
  font-size: 0.94rem;
  margin: 0 0 6px;
}

.empty-state {
  border-radius: 14px;
  padding: 10px 11px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px dashed rgba(55, 65, 81, 0.9);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.checkins-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkin-row {
  border-radius: 14px;
  padding: 9px 10px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(51, 65, 85, 0.95);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.checkin-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.8rem;
}

.checkin-meta {
  display: flex;
  gap: 10px;
  color: var(--text-soft);
}

.checkin-date {
  font-weight: 500;
  color: var(--text);
}

.checkin-notes {
  color: var(--text-muted);
}

.checkin-focus-pill {
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.7);
  color: #e0f2fe;
  font-size: 0.74rem;
  padding: 3px 8px;
  align-self: flex-start;
}

.site-footer {
  margin-top: 2px;
}

.footer-card {
  border-radius: 18px;
  padding: 14px 14px 13px;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.26), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(51, 65, 85, 0.95);
  box-shadow: var(--shadow-soft);
}

.footer-header h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.footer-header p {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Auth modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 1));
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  padding: 16px 16px 14px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 0 12px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-header p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.modal-close:hover {
  background: rgba(15, 23, 42, 0.85);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.modal-footer button {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
}

.header-account-status {
  font-size: 0.76rem;
  color: var(--text-soft);
  margin-right: 4px;
}

@media (max-width: 900px) {
  .app-shell {
    padding-inline: 14px;
  }

  .site-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .header-account {
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .section-card {
    padding: 16px 14px 17px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header {
    position: static;
  }
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-account {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .curriculum-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .checkin-row {
    flex-direction: column;
  }

  .header-account-status {
    display: none;
  }

  body {
    font-size: 0.92rem;
  }
}

