/* Shared Forge member workspace shell */

:root {
  --dash-bg: #f7f7f5;
  --dash-panel: #ffffff;
  --dash-sidebar: #fafafa;
  --dash-border: #e5e5e2;
  --dash-border-strong: #d7d8d5;
  --dash-ink: #142020;
  --dash-muted: #6d7474;
  --dash-faint: #9a9f9f;
  --dash-purple: #824182;
  --dash-purple-soft: #f3eaf3;
  --dash-green: #24704f;
  --dash-page-title-size: 32px;
  --dash-section-title-size: 20px;
  --dash-card-title-size: 16px;
  --dash-body-size: 16px;
  --dash-small-size: 12px;
  --dash-sidebar-stage-transition: 220ms;
}

html { scroll-behavior: smooth; }

body.dashboard-body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--dash-bg);
  color: var(--dash-ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.dashboard-body > .pt-navbar {
  position: sticky;
  top: 0;
  z-index: 90;
}

.dashboard-body *,
.dashboard-body *::before,
.dashboard-body *::after { box-sizing: border-box; }

.dashboard-body a:focus-visible,
.dashboard-body button:focus-visible,
.dashboard-body summary:focus-visible,
.dashboard-body input:focus-visible,
.dashboard-body textarea:focus-visible,
.dashboard-body select:focus-visible {
  outline: 2px solid var(--dash-purple);
  outline-offset: 2px;
}

body.dashboard-body h1,
body.dashboard-body h2,
body.dashboard-body h3,
body.dashboard-body h4,
body.dashboard-body h5,
body.dashboard-body h6 {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}

.dashboard-shell { min-height: calc(100vh - 64px); }

.dashboard-sidebar {
  position: fixed;
  inset: 64px auto 0 0;
  z-index: 50;
  display: flex;
  width: 300px;
  flex-direction: column;
  border-right: 1px solid var(--dash-border);
  background: var(--dash-sidebar);
}

.dashboard-sidebar__header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 16px;
}

.dashboard-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.dashboard-brand__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  box-shadow: 0 2px 7px rgba(76, 35, 76, .18);
}

.dashboard-brand strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }

.dashboard-sidebar__close,
.dashboard-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--dash-muted);
  cursor: pointer;
}

.dashboard-nav {
  flex: 1;
  overflow-y: auto;
  padding: 11px 10px 18px;
  scrollbar-width: thin;
}

.dashboard-nav__group + .dashboard-nav__group { margin-top: 21px; }

.dashboard-nav__item {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 10px;
  color: #616868;
  font-size: 14px;
  font-weight: 540;
  transition: background 120ms ease, color 120ms ease;
}

.dashboard-nav__item + .dashboard-nav__item { margin-top: 2px; }
.dashboard-nav__item > i { width: 18px; flex: 0 0 auto; color: #858b8b; font-size: 16px; text-align: center; }
.dashboard-nav__item:hover { background: #f0f0ee; color: var(--dash-ink); }
.dashboard-nav__item.is-active { background: var(--dash-purple-soft); color: #643464; font-weight: 650; }
.dashboard-nav__item.is-active > i { color: var(--dash-purple); }
.dashboard-nav__badge { margin-left: auto; border: 1px solid #dfcbe0; border-radius: 999px; background: #faf4fa; padding: 1px 6px; color: var(--dash-purple); font-size: 12px; font-weight: 700; text-transform: uppercase; }

.dashboard-nav--resource-library .dashboard-nav__group + .dashboard-nav__group { margin-top: 18px; }
.dashboard-nav--resource-library .dashboard-nav__item { color: var(--dash-ink); font-size: 14px; }
.dashboard-nav--resource-library .dashboard-nav__item.is-active { color: #643464; }
.sidebar-resource-library { position: relative; }
.sidebar-resource-stage { border-top: 1px solid #e5e6e3; }
.sidebar-resource-stage:last-child { border-bottom: 1px solid #e5e6e3; }
.sidebar-resource-stage > summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 52px;
  align-items: center;
  gap: 9px;
  padding: 6px 7px 6px 0;
  color: var(--dash-ink);
  cursor: pointer;
  list-style: none;
}
.sidebar-resource-stage > summary::-webkit-details-marker { display: none; }
.sidebar-resource-stage > summary:hover { color: #000; }
.sidebar-resource-stage > summary > span:first-child {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8dad7;
  border-radius: 50%;
  background: var(--dash-sidebar);
  color: #252a28;
  font-size: 10px;
  font-weight: 750;
}
.sidebar-resource-stage > summary strong,
.sidebar-resource-stage > summary small { display: block; }
.sidebar-resource-stage > summary strong { color: #111; font-size: 13px; font-weight: 720; }
.sidebar-resource-stage > summary small { margin-top: 1px; overflow: hidden; color: #4f5653; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-resource-stage > summary > i { color: #555c59; font-size: 10px; transition: transform var(--dash-sidebar-stage-transition) ease; }
.sidebar-resource-stage[open] > summary > i { transform: rotate(180deg); }
.sidebar-resource-stage.is-closing > summary > i { transform: rotate(0deg); }
.sidebar-resource-stage.is-flashing > summary { border-radius: 8px; background: var(--dash-purple-soft); animation: sidebar-stage-flash 2.4s ease-out forwards; }
@keyframes sidebar-stage-flash {
  0%, 70% { background: var(--dash-purple-soft); }
  100% { background: transparent; }
}
.sidebar-resource-stage__items {
  display: grid;
  grid-template-rows: 1fr;
  position: relative;
  margin: 0 0 9px 14px;
  padding-left: 14px;
  transition: grid-template-rows var(--dash-sidebar-stage-transition) ease, margin-bottom var(--dash-sidebar-stage-transition) ease;
}
.sidebar-resource-stage:not([open]) > .sidebar-resource-stage__items { display: none; }
.sidebar-resource-stage.is-opening > .sidebar-resource-stage__items,
.sidebar-resource-stage.is-closing > .sidebar-resource-stage__items {
  grid-template-rows: 0fr;
  margin-bottom: 0;
}
.sidebar-resource-stage__items-inner { min-height: 0; overflow: hidden; }
.sidebar-resource-stage__items::before { position: absolute; inset: 0 auto 0 0; width: 1px; background: #dedfdb; content: ""; }
.sidebar-resource-stage__items-inner > p { margin: 9px 8px 4px; color: #4f5653; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-resource-link {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  padding: 6px 7px;
  color: #171b19;
  font-size: 11.5px;
  font-weight: 540;
  line-height: 1.4;
}
.sidebar-resource-link:hover { background: #f0f0ee; color: var(--dash-ink); }
.sidebar-resource-link.is-active { background: var(--dash-purple-soft); color: #633663; font-weight: 680; }
.sidebar-resource-link > i:first-child { width: 17px; color: #505754; font-size: 11px; text-align: center; }
.sidebar-resource-link.is-active > i:first-child { color: var(--dash-purple); }
.sidebar-resource-link > i:last-child { color: #555c59; font-size: 9px; }
.sidebar-resource-link > small { color: #505754; font-size: 9px; white-space: nowrap; }
.sidebar-resource-link.is-disabled { color: #858b88; cursor: default; }
.sidebar-resource-link.is-disabled:hover { background: transparent; color: #858b88; }
.sidebar-resource-link.is-disabled > i:first-child { color: #9a9f9c; }
.sidebar-resource-link__status {
  border: 1px solid #dddeda;
  border-radius: 999px;
  background: #f3f3f1;
  padding: 1px 6px;
  color: #6f7572 !important;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: .02em;
}
.sidebar-resource-link--lesson > i:first-child { display: inline-flex; width: 15px; height: 15px; align-items: center; justify-content: center; border: 1px solid #d8dad7; border-radius: 50%; color: var(--dash-purple); font-size: 5px; }
.sidebar-resource-link.is-locked,
.dashboard-nav__item.is-locked { color: #777d7a; }
.sidebar-resource-link.is-locked:hover,
.dashboard-nav__item.is-locked:hover { background: #f5f1f5; color: #663866; }
.sidebar-resource-link.is-locked > i:last-child { color: #9a779a; font-size: 9px; }
.dashboard-nav__lock { width: auto !important; margin-left: auto; color: #9a779a !important; font-size: 10px !important; }

.dashboard-sidebar__footer { border-top: 1px solid var(--dash-border); padding: 10px; }

.dashboard-sign-in { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--dash-border); border-radius: 8px; background: #fff; color: #555d5d; font-size: 12px; font-weight: 650; }
.dashboard-unlock { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; margin-bottom: 5px; border-radius: 8px; background: var(--dash-purple); color: #fff; font-size: 12px; font-weight: 700; }
.dashboard-unlock:hover { background: #6f356f; color: #fff; }

.dashboard-main { min-width: 0; min-height: calc(100vh - 64px); margin-left: 300px; }

.dashboard-main > .dashboard-menu-button {
  margin: 14px 14px 0;
  gap: 7px;
  border: 1px solid var(--dash-border-strong);
  border-radius: 8px;
  background: var(--dash-panel);
  padding: 7px 10px;
  color: var(--dash-ink);
  font-size: 12px;
  font-weight: 650;
}

.dashboard-flashes { padding: 14px 28px 0; }
.dashboard-flash { max-width: 1160px; margin: 0 auto; border: 1px solid #ead8a7; border-radius: 9px; background: #fff9e7; padding: 10px 13px; color: #796126; font-size: 13px; }
.dashboard-flash--success { border-color: #cce5d3; background: #f1faf4; color: #326c45; }

.dashboard-content { min-width: 0; }
.dashboard-tool-course-help {
  display: flex;
  width: min(1120px, calc(100% - 48px));
  align-items: center;
  gap: 11px;
  margin: 20px auto 0;
  border: 1px solid #d7bdd8;
  border-radius: 9px;
  background: #f7f1f7;
  padding: 11px 14px;
  color: #171b19;
}
.dashboard-tool-course-help > span { display: inline-flex; width: 29px; height: 29px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 50%; background: #824182; color: #fff; font-size: 9px; }
.dashboard-tool-course-help p { margin: 0; font-size: 12px; }
.dashboard-tool-course-help strong { color: #111; }
.dashboard-tool-course-help a { color: #713771; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.dashboard-tool-course-help small { margin-left: 4px; color: #525955; font-size: 10px; }

/* Shared page-heading rhythm. Pages may customize content, not the shell. */
.dashboard-page-header {
  margin: 0 0 28px;
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--dash-border);
  border-radius: 0;
  color: var(--dash-ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.dashboard-page-header::before,
.dashboard-page-header::after { display: none; }
.dashboard-page-header h1 { margin: 0; font-size: var(--dash-page-title-size); line-height: 1.15; letter-spacing: -.035em; }
.dashboard-page-header > p,
.dashboard-page-header > div > p { max-width: 720px; margin: 10px 0 0; color: var(--dash-muted); font-size: var(--dash-body-size); line-height: 1.65; }

.dashboard-preview-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--dash-border-strong);
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px;
  color: var(--dash-ink);
  transition: border-color 120ms ease, background 120ms ease;
}
.dashboard-preview-gate:hover { border-color: #ceb9cf; background: #fcf9fc; color: var(--dash-purple); }
.dashboard-preview-gate__icon { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; background: #f1f1ee; color: #737978; font-size: 12px; }
.dashboard-preview-gate strong { font-size: 13px; font-weight: 700; }
.dashboard-preview-gate__arrow { color: var(--dash-purple); font-size: 13px; }

.dashboard-overlay { display: none; }

@media (max-width: 780px) {
  body.dashboard-body.is-dashboard-open { overflow: hidden; }
  .dashboard-sidebar { width: min(310px, 90vw); box-shadow: 22px 0 50px rgba(18, 20, 20, .15); transform: translateX(-105%); transition: transform 180ms ease; }
  .is-dashboard-open .dashboard-sidebar { transform: translateX(0); }
  .dashboard-overlay { position: fixed; inset: 64px 0 0; z-index: 40; background: rgba(20, 26, 26, .34); }
  .is-dashboard-open .dashboard-overlay { display: block; }
  .dashboard-sidebar__close,
  .dashboard-menu-button { display: inline-flex; }
  .dashboard-sidebar__close { width: 34px; height: 34px; border-radius: 8px; }
  .dashboard-main { margin-left: 0; }
  .dashboard-menu-button:hover,
  .dashboard-sidebar__close:hover { background: #efefed; }
  .dashboard-tool-course-help { width: calc(100% - 28px); align-items: flex-start; margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .sidebar-resource-stage.is-flashing > summary { animation: none; }
}
