:root {
  --bg: #050914;
  --surface: #0c1324;
  --surface-2: #111a2d;
  --surface-3: #151f34;
  --ink: #fff3d6;
  --muted: #aeb8c8;
  --line: rgba(255, 232, 178, 0.14);
  --navy: #050914;
  --deep: #091326;
  --blue: #7285aa;
  --gold: #f4c76a;
  --gold-2: #d8902f;
  --cream: #fff3d6;
  --cream-soft: rgba(255, 243, 214, 0.08);
  --amber-soft: rgba(244, 199, 106, 0.12);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% -8%, rgba(244, 199, 106, 0.16), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(216, 144, 47, 0.12), transparent 24%),
    linear-gradient(180deg, #07101f 0%, var(--bg) 58%, #03060d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 32% 0%, rgba(244, 199, 106, 0.18), transparent 30%),
    linear-gradient(180deg, #040813 0%, #091326 58%, #03060d 100%);
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 10;
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.26);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #150f04;
  background: linear-gradient(135deg, #a66f22, var(--gold) 58%, #fff0b7);
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(244, 199, 106, 0.22);
}

.brand strong, .profile-card strong { display: block; }
.brand small, .profile-card small, .side-card small { color: rgba(255, 243, 214, 0.66); }

.nav-list { display: grid; gap: 8px; }

.nav-item {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 13px;
  background: transparent;
  color: rgba(255, 243, 214, 0.72);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  font-weight: 750;
}

.nav-item:hover, .nav-item.active {
  border-color: rgba(244, 199, 106, 0.16);
  background: rgba(244, 199, 106, 0.1);
  color: #fff;
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(244, 199, 106, 0.1);
  font-weight: 900;
}

.side-card, .profile-card {
  border: 1px solid rgba(255, 232, 178, 0.14);
  border-radius: 20px;
  background: rgba(255, 243, 214, 0.06);
  backdrop-filter: blur(18px);
}

.side-card { margin-top: auto; padding: 16px; }
.mini-label {
  display: block;
  color: #ffe3a3;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.side-card strong {
  display: block;
  margin: 6px 0 12px;
  font-size: 1.8rem;
}

.side-progress, .progress {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 243, 214, 0.12);
}

.side-progress i, .progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-2), var(--gold), #fff0b7);
}

.profile-card {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #150f04;
  background: linear-gradient(135deg, var(--gold), #fff0b7);
  font-weight: 950;
}

.avatar.large { width: 92px; height: 92px; font-size: 1.35rem; }

.main { min-width: 0; padding: 18px 28px 42px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0 18px;
  background: rgba(5, 9, 20, 0.72);
  backdrop-filter: blur(18px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--gold);
  background: rgba(255, 243, 214, 0.06);
}

.search-wrap {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 243, 214, 0.06);
  box-shadow: var(--soft-shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.search-wrap span { color: var(--gold); font-weight: 900; }
.search-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}
.search-wrap input::placeholder { color: rgba(255, 243, 214, 0.48); }

.primary-button, .secondary-button, .ghost-button, .text-button, .request-list button {
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  padding: 0 18px;
  font-weight: 850;
  white-space: nowrap;
}

.primary-button {
  color: #150f04;
  background: linear-gradient(135deg, #a66f22, var(--gold) 58%, #fff0b7);
  box-shadow: 0 16px 34px rgba(244, 199, 106, 0.22);
}

.secondary-button {
  color: var(--cream);
  border: 1px solid rgba(255, 232, 178, 0.22);
  background: rgba(255, 243, 214, 0.08);
}

.secondary-button.light {
  color: var(--cream);
  border-color: var(--line);
  background: rgba(255, 243, 214, 0.07);
}

.ghost-button {
  color: var(--cream);
  background: rgba(244, 199, 106, 0.1);
}

.text-button {
  color: var(--gold);
  background: transparent;
  padding: 0 6px;
}

.view { display: none; }
.view.active { display: block; }

.hero-panel {
  min-height: 390px;
  border: 1px solid rgba(255, 232, 178, 0.12);
  border-radius: 30px;
  padding: clamp(24px, 4vw, 42px);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  gap: 28px;
  align-items: center;
  background:
    radial-gradient(circle at 78% 10%, rgba(244, 199, 106, 0.26), transparent 30%),
    radial-gradient(circle at 12% 100%, rgba(216, 144, 47, 0.18), transparent 34%),
    linear-gradient(135deg, #050914 0%, #0c1830 58%, #18213a 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-panel .eyebrow, .profile-hero .eyebrow { color: #ffe3a3; }

.hero-copy h1, .page-title h1, .profile-hero h1 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 820px;
  font-size: clamp(2.25rem, 4.2vw, 4.35rem);
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 243, 214, 0.76);
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero-actions, .profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.dashboard-preview {
  border: 1px solid rgba(255, 232, 178, 0.16);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 243, 214, 0.08);
  backdrop-filter: blur(18px);
}

.preview-header, .section-heading, .page-title, .course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-header strong {
  color: #150f04;
  border-radius: 999px;
  padding: 7px 10px;
  background: linear-gradient(135deg, var(--gold), #fff0b7);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.preview-grid article {
  min-height: 112px;
  border: 1px solid rgba(255, 232, 178, 0.1);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 243, 214, 0.07);
}

.preview-grid .wide { grid-column: 1 / -1; }
.preview-grid span { color: rgba(255, 243, 214, 0.68); }
.preview-grid strong { display: block; margin-top: 8px; font-size: 2rem; }

.yellow-card {
  color: #150f04;
  background: linear-gradient(135deg, var(--gold), #fff0b7) !important;
}
.yellow-card span { color: rgba(21, 15, 4, 0.72); }

.role-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0 30px;
}

.role-option, .panel, .metric, .course-card, .builder-steps, .course-builder {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 19, 36, 0.88);
  box-shadow: var(--soft-shadow);
}

.role-option { padding: 18px; text-align: left; color: var(--ink); }
.role-option strong, .role-option span { display: block; }
.role-option span { margin-top: 7px; color: var(--muted); }
.role-option.active {
  border-color: rgba(244, 199, 106, 0.34);
  box-shadow: inset 0 0 0 2px rgba(244, 199, 106, 0.1), var(--soft-shadow);
}

.section-heading, .page-title { margin: 20px 0 16px; }
.section-heading h2, .page-title h1, .panel h2, .course-builder h2 { margin: 0; color: var(--cream); }
.page-title h1 { font-size: clamp(2rem, 4vw, 3.2rem); }

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--gold);
  background: rgba(244, 199, 106, 0.09);
  font-size: 0.86rem;
  font-weight: 850;
}
.tag.yellow {
  color: #150f04;
  border-color: rgba(247, 201, 72, 0.3);
  background: linear-gradient(135deg, var(--gold), #fff0b7);
}

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

.course-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.course-cover {
  min-height: 138px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: #fff;
  background: var(--cover);
}

.course-cover span {
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(5, 9, 20, 0.38);
  font-size: 0.8rem;
  font-weight: 850;
}

.course-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #150f04;
  background: rgba(255, 240, 183, 0.92);
  font-weight: 950;
}

.course-body {
  padding: 17px;
  display: grid;
  gap: 11px;
  flex: 1;
}
.course-body h3 { margin: 0; color: var(--cream); font-size: 1.08rem; }
.course-body p { margin: 0; color: var(--muted); line-height: 1.5; }

.course-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.chip {
  border-radius: 999px;
  padding: 5px 9px;
  color: #d8e1f2;
  background: rgba(255, 243, 214, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
}
.chip.yellow {
  color: #150f04;
  background: linear-gradient(135deg, var(--gold), #fff0b7);
}

.course-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.course-footer strong {
  color: #150f04;
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--gold), #fff0b7);
}
.course-footer button {
  border: 0;
  border-radius: 999px;
  color: var(--cream);
  background: #1b2740;
  padding: 9px 13px;
  font-weight: 850;
}

.dashboard-grid, .studio-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.panel, .metric { padding: 18px; }
.compact-heading { margin-top: 0; }

.ranking-list, .creator-list, .learning-list, .request-list, .reviews, .certificate-list {
  display: grid;
  gap: 11px;
}
.ranking-item, .creator-item, .learning-item, .request-list article, .reviews article {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 243, 214, 0.055);
}
.ranking-item > strong { color: var(--gold); }
.ranking-item span, .creator-item span, .learning-item span, .request-list span, .reviews span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

label { color: var(--muted); font-size: 0.88rem; font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 243, 214, 0.06);
  color: var(--ink);
  padding: 11px 12px;
  margin-top: 7px;
  outline: 0;
}
select option { color: #0d1b34; background: #fff3d6; }
textarea { min-height: 116px; resize: vertical; }

.checkbox-filter {
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: rgba(255, 243, 214, 0.06);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.checkbox-filter input, .content-types input, .switch-row input { width: auto; margin: 0; }

.builder-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
}
.builder-steps { padding: 10px; display: grid; align-content: start; gap: 8px; }
.builder-step {
  border: 0;
  border-radius: 15px;
  background: transparent;
  padding: 12px;
  text-align: left;
  color: var(--muted);
  font-weight: 850;
}
.builder-step.active { color: var(--gold); background: rgba(244, 199, 106, 0.1); }
.course-builder { padding: 22px; }
.builder-pane { display: none; }
.builder-pane.active { display: grid; gap: 16px; }

.form-grid, .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.content-types, .switch-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.content-types label, .switch-row label {
  background: rgba(255, 243, 214, 0.07);
  border-radius: 16px;
  padding: 13px;
  color: var(--ink);
  display: flex;
  gap: 8px;
  align-items: center;
}

.score-preview, .publish-summary {
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 243, 214, 0.08), rgba(244, 199, 106, 0.13));
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 16px;
  align-items: center;
}
.score-preview strong, .publish-summary strong { display: block; font-size: 1.5rem; }
.score-preview span, .publish-summary span { color: var(--muted); }

.metrics-grid { margin: 18px 0; }
.metric { display: grid; gap: 8px; }
.metric span { color: var(--muted); }
.metric strong { color: var(--cream); font-size: 1.7rem; }
.learning-item { justify-content: space-between; }
.learning-item .progress { width: min(260px, 34vw); background: rgba(255, 243, 214, 0.1); }
.request-list article { justify-content: space-between; }
.request-list button {
  border: 1px solid var(--line);
  color: var(--cream);
  background: rgba(255, 243, 214, 0.07);
}

.bar-list { display: grid; gap: 18px; }
.bar-list div { display: grid; gap: 8px; color: var(--muted); }
.bar-list i {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--bar), rgba(255, 243, 214, 0.11) var(--bar));
}

.profile-hero {
  border: 1px solid rgba(255, 232, 178, 0.12);
  border-radius: 30px;
  color: #fff;
  padding: 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(247, 201, 72, 0.26), transparent 32%),
    linear-gradient(135deg, #050914, #14213c);
  box-shadow: var(--shadow);
}
.profile-main { display: flex; gap: 18px; align-items: center; max-width: 860px; }
.profile-main p:not(.eyebrow) { color: rgba(255, 243, 214, 0.74); line-height: 1.6; }

.skill-tags, .certificate-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span, .certificate-list span {
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 850;
}
.skill-tags span { background: rgba(255, 243, 214, 0.1); }
.certificate-list span { color: var(--gold); background: rgba(244, 199, 106, 0.1); }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  border-radius: 18px;
  padding: 13px 15px;
  color: var(--cream);
  background: #070d1a;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 20;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1120px) {
  .course-grid, .form-grid, .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(318px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 12px 14px 32px; }
  .topbar { grid-template-columns: auto 1fr; }
  .menu-button { display: block; }
  .topbar .ghost-button, .topbar .primary-button { display: none; }
  .role-panel, .dashboard-grid, .studio-board, .filters, .builder-layout, .content-types, .switch-row, .score-preview {
    grid-template-columns: 1fr;
  }
  .profile-hero, .profile-main, .section-heading, .page-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero-panel { min-height: auto; padding: 22px; }
  .hero-copy h1 { font-size: 2.15rem; }
  .course-grid, .metrics-grid, .preview-grid { grid-template-columns: 1fr; }
  .learning-item, .request-list article {
    align-items: flex-start;
    flex-direction: column;
  }
  .learning-item .progress { width: 100%; }
}
