:root {
  color-scheme: dark;
  --page: #070908;
  --page-raised: #0a0d0b;
  --surface: #111512;
  --surface-soft: #151a16;
  --surface-raised: #1a201b;
  --surface-chart: #090c0a;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #f3f7f0;
  --muted: #a4ada5;
  --dim: #858f87;
  --green: #b6f36c;
  --green-strong: #8fdd3d;
  --green-soft: rgba(182, 243, 108, 0.1);
  --amber: #e8c978;
  --amber-soft: rgba(232, 201, 120, 0.09);
  --danger: #ff978b;
  --danger-soft: rgba(255, 143, 130, 0.09);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.1);
  --focus: #dcffad;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -10%, rgba(151, 215, 83, 0.11), transparent 34%),
    linear-gradient(180deg, var(--page-raised), var(--page) 38%, #080a09);
  font-size: 14px;
  line-height: 1.55;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  background: rgba(182, 243, 108, 0.28);
  color: var(--ink);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Ambient glow blobs matching PPKR Admin */
.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.065;
  pointer-events: none;
}

.ambient-one {
  top: 4rem;
  right: -18rem;
  background: var(--green);
}

.ambient-two {
  bottom: -10rem;
  left: -22rem;
  background: #6ea74b;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 0 clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 8, 0.88);
  backdrop-filter: blur(24px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(182, 243, 108, 0.38);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(182, 243, 108, 0.16), rgba(182, 243, 108, 0.025));
}

.brand-mark .brand-icon {
  width: 23px;
  height: 23px;
  color: var(--green);
  stroke-width: 2.15;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.brand-copy strong {
  font-size: 19px;
  letter-spacing: -0.045em;
}

.brand-copy small {
  color: var(--green);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.quick-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(3, 5, 4, 0.72);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.quick-search-trigger:hover {
  border-color: rgba(182, 243, 108, 0.45);
  color: var(--ink);
  background: rgba(9, 13, 10, 0.92);
}

.quick-search-trigger .icon {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
  font: 600 10px/1.2 var(--font-mono);
}

/* Segmented range-tabs (PPKR Admin signature selection) */
.range-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.24);
}

.range-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.range-tabs button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.range-tabs button.active,
.range-tabs button[aria-pressed="true"] {
  border-color: rgba(182, 243, 108, 0.46);
  color: #11170d;
  background: var(--green);
  box-shadow: 0 5px 18px rgba(143, 221, 61, 0.14);
}

.range-tabs button.active:hover,
.range-tabs button[aria-pressed="true"]:hover {
  color: #11170d;
  background: #c5f884;
}

/* Buttons */
.primary-button,
.secondary-button,
.row-action,
.text-button,
.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.primary-button {
  padding: 0 18px;
  border: 0;
  color: #10160d;
  background: linear-gradient(135deg, #c7fa88, var(--green-strong));
  box-shadow: 0 8px 28px rgba(143, 221, 61, 0.14);
  font-size: 12px;
  font-weight: 780;
}

.secondary-button,
.row-action {
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  color: #e0e6df;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 660;
}

.row-action {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
}

.text-button {
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.primary-button:hover,
.secondary-button:hover,
.row-action:hover,
.text-button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.secondary-button:hover,
.row-action:hover {
  border-color: rgba(182, 243, 108, 0.36);
}

.primary-button:disabled,
.secondary-button:disabled,
.row-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Workspace Layout (exact PPKR Admin chrome) */
.app-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px);
  padding: 20px 14px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(9, 12, 10, 0.8);
  scrollbar-color: rgba(182, 243, 108, 0.18) transparent;
  scrollbar-width: thin;
}

.learner-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.learner-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(182, 243, 108, 0.28);
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font: 800 11px/1 var(--font-mono);
}

.learner-meta {
  min-width: 0;
}

.learner-meta strong,
.learner-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learner-meta strong {
  font-size: 12px;
}

.learner-meta small {
  margin-top: 2px;
  color: var(--green);
  font: 700 9px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-track {
  height: 6px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-strong), var(--green));
  box-shadow: 0 0 12px rgba(182, 243, 108, 0.4);
  transition: width 240ms ease;
}

.learner-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font: 600 10px/1 var(--font-mono);
}

.side-nav {
  display: grid;
  gap: 4px;
}

.nav-group-label {
  margin: 12px 10px 4px;
  color: var(--dim);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.nav-item .icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
  color: var(--dim);
}

.nav-item b {
  font-size: 12px;
  font-weight: 660;
  flex: 1;
}

.nav-pill {
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.03);
  font: 700 10px/1.3 var(--font-mono);
}

.nav-item:hover {
  color: #e6ece5;
  background: rgba(255, 255, 255, 0.035);
}

.nav-item[aria-current="page"] {
  border-color: rgba(182, 243, 108, 0.32);
  color: var(--green);
  background: linear-gradient(90deg, rgba(182, 243, 108, 0.15), rgba(182, 243, 108, 0.055));
  box-shadow: inset 3px 0 0 var(--green);
}

.nav-item[aria-current="page"] .icon {
  color: var(--green);
}

.nav-item[aria-current="page"] .nav-pill {
  border-color: rgba(182, 243, 108, 0.35);
  color: var(--green);
  background: rgba(182, 243, 108, 0.12);
}

.sidebar-support {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sidebar-security {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin-bottom: 6px;
  padding: 0 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft), 0 0 13px rgba(182, 243, 108, 0.3);
}

.sidebar-security div {
  display: grid;
  gap: 2px;
}

.sidebar-security strong {
  font-size: 11px;
}

.sidebar-security small {
  color: var(--dim);
  font-size: 10px;
}

.sidebar-support>p {
  margin: 4px 8px;
  color: var(--dim);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-support a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.sidebar-support a:hover {
  color: var(--green);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2px;
}

/* Main Content Area */
.app-content {
  width: 100%;
  min-width: 0;
  max-width: 1440px;
  margin-inline: auto;
  padding: 24px clamp(18px, 3vw, 44px) 64px;
}

.view-section {
  animation: view-in 180ms ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.eyebrow,
.section-index {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.page-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Panels & Hero Banner */
.panel {
  min-width: 0;
  padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(22, 27, 23, 0.98), rgba(13, 16, 14, 0.97));
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
  gap: 22px;
  margin-bottom: 20px;
  padding: clamp(22px, 2.8vw, 32px);
  border: 1px solid rgba(182, 243, 108, 0.26);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8% 12%, rgba(182, 243, 108, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(22, 29, 23, 0.98), rgba(12, 16, 13, 0.98));
  box-shadow: var(--shadow);
}

.hero-main h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 610;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-main p.hero-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  align-self: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}

.hero-metric-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 12, 10, 0.92);
}

.hero-metric-cell span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-metric-cell strong {
  margin-top: 8px;
  color: var(--ink);
  font: 640 clamp(22px, 2.2vw, 30px)/1 var(--font-mono);
  letter-spacing: -0.04em;
}

.hero-metric-cell strong.accent {
  color: var(--green);
}

.hero-metric-cell small {
  margin-top: 6px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.4;
}

/* Status Chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip.positive {
  color: var(--green);
  border-color: rgba(182, 243, 108, 0.32);
  background: rgba(182, 243, 108, 0.08);
}

.status-chip.waiting {
  color: var(--amber);
  border-color: rgba(232, 201, 120, 0.34);
  background: var(--amber-soft);
}

.status-chip.negative {
  color: var(--danger);
  border-color: rgba(255, 143, 130, 0.34);
  background: var(--danger-soft);
}

.status-chip.info {
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.34);
  background: var(--cyan-soft);
}

/* Section Divider Heading */
.block-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 14px;
}

.block-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.block-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* 6 Distinct Areas Grid (Admin Portal Card style) */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(24, 29, 25, 0.98), rgba(13, 16, 14, 0.98));
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.portal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(182, 243, 108, 0.38);
  background: linear-gradient(145deg, rgba(27, 34, 27, 0.98), rgba(14, 18, 15, 0.98));
}

.portal-card.selected {
  border-color: rgba(182, 243, 108, 0.62);
  background:
    radial-gradient(circle at 12% 12%, rgba(182, 243, 108, 0.14), transparent 46%),
    linear-gradient(145deg, rgba(24, 33, 25, 0.98), rgba(13, 17, 14, 0.98));
  box-shadow: 0 0 0 1px rgba(182, 243, 108, 0.2), var(--shadow);
}

.portal-index {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--dim);
  font: 700 11px/1 var(--font-mono);
}

.portal-card.selected .portal-index {
  color: var(--green);
}

.portal-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border: 1px solid rgba(182, 243, 108, 0.24);
  border-radius: 11px;
  color: var(--green);
  background: var(--green-soft);
}

.portal-card strong {
  font-size: 16px;
  letter-spacing: -0.025em;
}

.portal-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.portal-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  color: #e3e9e1;
  font-size: 11.5px;
  font-weight: 700;
}

.portal-action span:last-child {
  color: var(--green);
}

/* 4 User Learning Paths Grid */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.path-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(22, 27, 23, 0.98), rgba(13, 16, 14, 0.97));
  transition: border-color 150ms ease, transform 150ms ease;
}

.path-card.active {
  border-color: rgba(182, 243, 108, 0.56);
  background:
    radial-gradient(circle at 90% 10%, rgba(182, 243, 108, 0.1), transparent 40%),
    linear-gradient(145deg, rgba(22, 30, 23, 0.98), rgba(12, 16, 13, 0.98));
}

.path-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.path-card h3 {
  margin: 6px 0 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.path-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.path-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #d4dcd3;
  font-size: 12.5px;
}

.path-bullets li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  flex: 0 0 5px;
  background: var(--green);
}

.path-goal {
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: rgba(182, 243, 108, 0.06);
  color: #dfe9d8;
  font-size: 12px;
}

.path-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Curriculum Modules & Lessons */
.curriculum-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.module-stack {
  display: grid;
  gap: 14px;
}

.module-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(22, 27, 23, 0.98), rgba(13, 16, 14, 0.97));
  overflow: hidden;
}

.module-card.featured {
  border-color: rgba(182, 243, 108, 0.34);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.module-header-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.module-num {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border: 1px solid rgba(182, 243, 108, 0.32);
  border-radius: 11px;
  color: var(--green);
  background: var(--green-soft);
  font: 800 13px/1 var(--font-mono);
}

.module-title-wrap h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.module-title-wrap p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.module-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lesson-list {
  display: grid;
}

.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 22px;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}

.lesson-row:first-child {
  border-top: 0;
}

.lesson-row:hover {
  background: rgba(182, 243, 108, 0.055);
}

.lesson-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lesson-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1.5px solid var(--line-strong);
  border-radius: 7px;
  color: transparent;
  background: rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 800;
}

.lesson-row.completed .lesson-check {
  border-color: var(--green);
  color: #10160d;
  background: var(--green);
}

.lesson-id-badge {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: rgba(182, 243, 108, 0.06);
  font: 700 11px/1.2 var(--font-mono);
  flex-shrink: 0;
}

.lesson-row-text {
  min-width: 0;
}

.lesson-row-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 640;
}

.lesson-row-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.lesson-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--dim);
  font: 600 11px/1 var(--font-mono);
}

/* Featured Master Video Banner (Module 04) */
.master-video-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(182, 243, 108, 0.34);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 10% 10%, rgba(182, 243, 108, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(22, 30, 23, 0.98), rgba(12, 16, 13, 0.98));
}

/* Lesson Detail Reader View */
.lesson-reader-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(182, 243, 108, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 15%, rgba(182, 243, 108, 0.13), transparent 45%),
    linear-gradient(155deg, #101612, #070908);
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.video-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder-inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 480px;
}

.play-orb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(182, 243, 108, 0.5);
  border-radius: 50%;
  color: #10160d;
  background: linear-gradient(135deg, #c7fa88, var(--green-strong));
  box-shadow: 0 0 32px rgba(182, 243, 108, 0.25);
}

.lesson-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.lesson-section-box {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 12, 10, 0.72);
}

.lesson-section-box h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
}

.lesson-section-box p {
  margin: 0;
  color: #d2dad1;
  font-size: 13.5px;
  line-height: 1.65;
}

.lesson-section-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #d2dad1;
  font-size: 13px;
}

.warning-callout {
  padding: 14px 16px;
  border: 1px solid rgba(255, 143, 130, 0.34);
  border-left: 3px solid var(--danger);
  border-radius: 10px;
  background: var(--danger-soft);
  color: #ffd6d1;
  font-size: 13px;
}

.warning-callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--danger);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tip-callout {
  padding: 14px 16px;
  border: 1px solid rgba(232, 201, 120, 0.34);
  border-left: 3px solid var(--amber);
  border-radius: 10px;
  background: var(--amber-soft);
  color: #f3e4bc;
  font-size: 13px;
}

.tip-callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Interactive Knowledge Check Quiz */
.quiz-box {
  padding: 18px;
  border: 1px solid rgba(182, 243, 108, 0.25);
  border-radius: 14px;
  background: rgba(182, 243, 108, 0.04);
}

.quiz-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(7, 10, 8, 0.85);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.quiz-option:hover {
  border-color: rgba(182, 243, 108, 0.5);
}

.quiz-option.correct {
  border-color: var(--green);
  background: rgba(182, 243, 108, 0.14);
  color: var(--green);
}

.quiz-option.wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

/* Tables (Admin Operations Table) */
.responsive-table {
  width: 100%;
  overflow-x: auto;
  scrollbar-color: rgba(182, 243, 108, 0.28) transparent;
  scrollbar-width: thin;
}

.operations-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.operations-table th {
  padding: 0 12px 12px;
  color: #aeb7af;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.operations-table td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  color: #dfe6dd;
  font-size: 12.5px;
  vertical-align: top;
}

.operations-table code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(182, 243, 108, 0.08);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* Trading Rules & Interactive Risk Calculator */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  margin-bottom: 18px;
}

.rule-cell {
  padding: 18px;
  background: rgba(9, 12, 10, 0.94);
}

.rule-cell span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rule-cell strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font: 700 22px/1.1 var(--font-mono);
}

.rule-cell p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.field-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-group label {
  color: #d8ded7;
  font-size: 11.5px;
  font-weight: 680;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--ink);
  background: rgba(3, 5, 4, 0.78);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  padding: 12px 13px;
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(182, 243, 108, 0.62);
  box-shadow: 0 0 0 3px rgba(182, 243, 108, 0.08);
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(182, 243, 108, 0.24);
  border-radius: 12px;
  background: var(--line);
}

.calc-result-cell {
  padding: 15px;
  background: rgba(9, 12, 10, 0.94);
}

.calc-result-cell span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calc-result-cell strong {
  display: block;
  margin-top: 8px;
  font: 700 20px/1.1 var(--font-mono);
}

.calc-result-cell strong.positive {
  color: var(--green);
}

.calc-result-cell strong.warning {
  color: var(--amber);
}

/* Scenario Cards Grid */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 20, 16, 0.86);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.scenario-card:hover {
  transform: translateY(-2px);
  border-color: rgba(182, 243, 108, 0.42);
}

.scenario-card h4 {
  margin: 0;
  font-size: 15px;
}

.scenario-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Help Center / FAQ */
.help-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.help-search-bar input {
  min-height: 48px;
  font-size: 14px;
}

.chip-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: 680;
  cursor: pointer;
  transition: all 140ms ease;
}

.filter-chip:hover {
  color: var(--ink);
  border-color: rgba(182, 243, 108, 0.4);
}

.filter-chip.active {
  color: #11170d;
  border-color: var(--green);
  background: var(--green);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(14, 18, 15, 0.9);
  overflow: hidden;
  transition: border-color 140ms ease;
}

.faq-item.open {
  border-color: rgba(182, 243, 108, 0.36);
}

.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.faq-trigger strong {
  font-size: 14px;
  font-weight: 640;
}

.faq-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
  color: #d3dbd2;
  font-size: 13px;
  line-height: 1.65;
}

.faq-body p {
  margin: 12px 0 0;
}

.faq-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Support Builder & Discord Map */
.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.topic-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.topic-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(5, 8, 6, 0.72);
  font-size: 12px;
  font-weight: 640;
  cursor: pointer;
  text-align: left;
  transition: all 140ms ease;
}

.topic-btn:hover {
  border-color: rgba(182, 243, 108, 0.4);
  color: var(--ink);
}

.topic-btn.selected {
  border-color: rgba(182, 243, 108, 0.65);
  color: var(--green);
  background: rgba(182, 243, 108, 0.12);
}

.code-preview {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #060807;
  color: #d9e6d5;
  font: 500 12px/1.6 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.discord-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.discord-col {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 12, 10, 0.9);
}

.discord-col h4 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.discord-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.discord-col li {
  color: #cfd8ce;
  font: 500 11.5px/1.4 var(--font-mono);
}

/* Search Command Modal */
.operation-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.78);
}

.operation-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(7px);
}

.search-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.search-modal-head input {
  border: 0;
  background: transparent;
  min-height: 40px;
  font-size: 14px;
}

.search-modal-head input:focus {
  box-shadow: none;
}

.search-results-list {
  max-height: 460px;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.search-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.search-hit:hover {
  border-color: rgba(182, 243, 108, 0.35);
  background: rgba(182, 243, 108, 0.07);
}

.search-hit small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}

/* Toast Region */
.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 15px;
  border: 1px solid rgba(182, 243, 108, 0.35);
  border-radius: 10px;
  color: #e9f3e2;
  background: rgba(24, 31, 25, 0.98);
  box-shadow: var(--shadow);
  font-size: 12px;
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Responsive Breakpoints (matching PPKR Admin) */
@media (max-width: 1180px) {

  .hero-card,
  .lesson-reader-grid,
  .calc-grid,
  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .areas-grid,
  .scenarios-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

.lang-short {
  display: none;
}

.mobile-footer {
  display: none;
}

@media (max-width: 900px) {
  .app-layout {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 68px;
    z-index: 30;
    display: block;
    width: 100%;
    height: auto;
    padding: 8px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 8, 0.96);
    backdrop-filter: blur(20px);
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .learner-card,
  .sidebar-support,
  .nav-group-label {
    display: none;
  }

  .side-nav {
    display: flex;
    width: max-content;
    gap: 5px;
  }

  .nav-item {
    min-height: 40px;
    padding-inline: 11px;
    flex-shrink: 0;
  }

  .nav-item[aria-current="page"] {
    box-shadow: inset 0 -3px 0 var(--green);
  }

  .paths-grid,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .quick-search-trigger .search-label,
  .quick-search-trigger .kbd-hint {
    display: none;
  }

  .app-content {
    padding: 18px 14px 36px;
  }

  .mobile-footer {
    display: grid;
    gap: 12px;
    padding: 16px 14px max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 8, 0.92);
  }

  .mobile-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .mobile-footer-links a {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
  }

  .mobile-footer-links a:hover {
    color: var(--green);
  }
}

/* Prevent iOS Safari input auto-zoom on mobile tap */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px;
  }

  .operation-dialog {
    width: calc(100vw - 16px);
    max-height: 88dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .areas-grid,
  .scenarios-grid,
  .discord-grid,
  .topic-selector-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: 58px;
    gap: 6px;
    padding: 0 10px;
  }

  .sidebar {
    top: 58px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small,
  .open-app-btn,
  .open-app-label {
    display: none;
  }

  .topbar-controls {
    gap: 6px;
  }

  .quick-search-trigger {
    min-height: 36px;
    padding: 0 10px;
  }

  .lang-full {
    display: none;
  }

  .lang-short {
    display: inline;
  }

  .range-tabs {
    padding: 3px;
    gap: 3px;
  }

  .range-tabs button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 11px;
  }

  .topbar-auth-btn {
    min-height: 36px;
    padding: 0 11px;
    font-size: 11px;
  }

  .topbar-auth-btn .icon {
    display: none;
  }

  .session-chip {
    min-height: 34px;
    padding: 0 9px;
    font-size: 10px;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #topbar-signout-btn {
    min-height: 34px;
    padding: 0 9px;
  }

  .hero-card,
  .panel,
  .path-card,
  .portal-card {
    padding: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions button,
  .hero-actions a {
    width: 100%;
  }

  .hero-metric-cell,
  .calc-result-cell {
    padding: 12px;
  }

  .hero-metric-cell strong,
  .calc-result-cell strong {
    font-size: 18px;
  }

  .module-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .lesson-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 10px;
  }

  .lesson-row-meta {
    flex-wrap: wrap;
    width: 100%;
    padding-left: 36px;
  }

  .video-stage {
    min-height: 220px;
    padding: 14px;
  }

  .play-orb {
    width: 44px;
    height: 44px;
  }

  .preview-strip {
    padding: 14px;
  }

  .preview-strip .primary-button,
  .preview-strip .secondary-button {
    width: 100%;
  }

  .welcome-dialog-inner,
  .auth-dialog-form {
    padding: 18px 16px;
  }

  .welcome-footer,
  .dialog-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .welcome-footer > div,
  .dialog-actions > * {
    width: 100%;
  }

  .welcome-footer > div button,
  .dialog-actions button,
  .dialog-actions a {
    width: 100%;
    flex: 1;
  }
}

/* Account Auth, Free Preview & Dual Sync Styles (PPKR Admin matching) */
.topbar-user-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(182, 243, 108, 0.28);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(182, 243, 108, 0.08);
  font: 650 11px/1 var(--font-mono);
}

.session-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(182, 243, 108, 0.6);
}

.sync-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font: 700 9.5px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex: 0 0 6px;
}

.sync-dot.synced {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.preview-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(232, 201, 120, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 6% 50%, rgba(232, 201, 120, 0.09), transparent 36%),
    rgba(17, 21, 18, 0.94);
}

.preview-strip.synced-strip {
  border-color: rgba(182, 243, 108, 0.28);
  background:
    radial-gradient(circle at 6% 50%, rgba(182, 243, 108, 0.09), transparent 36%),
    rgba(17, 21, 18, 0.94);
}

.locked-gate-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 44px) 22px;
  border: 1px solid rgba(182, 243, 108, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(182, 243, 108, 0.12), transparent 52%),
    linear-gradient(155deg, rgba(20, 26, 21, 0.98), rgba(9, 12, 10, 0.98));
}

.locked-gate-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(182, 243, 108, 0.36);
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
}

.locked-gate-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.locked-gate-card p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.auth-dialog {
  width: min(490px, calc(100vw - 24px));
}

.auth-dialog-form {
  display: grid;
  gap: 15px;
  padding: clamp(20px, 3vw, 28px);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.dialog-copy {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.dialog-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 143, 130, 0.36);
  border-radius: var(--radius-sm);
  color: #ffc9c3;
  background: var(--danger-soft);
  font-size: 12px;
}

.security-note-box {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.security-note-box strong {
  display: block;
  font-size: 11.5px;
}

.security-note-box small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

.lesson-row.locked-row {
  opacity: 0.88;
}

.sidebar-tour-link {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 680;
  text-align: left;
  cursor: pointer;
}

.sidebar-tour-link:hover {
  background: rgba(182, 243, 108, 0.08);
}

/* First-Visit Onboarding Slide Modal */
.welcome-dialog {
  width: min(600px, calc(100vw - 24px));
  border-color: rgba(182, 243, 108, 0.34);
  background:
    radial-gradient(circle at 14% 0%, rgba(182, 243, 108, 0.14), transparent 44%),
    linear-gradient(155deg, #131915, #0a0d0b);
}

.welcome-dialog-inner {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3.2vw, 30px);
}

.welcome-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.welcome-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.welcome-dot {
  width: 24px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 160ms ease, width 160ms ease;
}

.welcome-dot.active {
  width: 38px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(182, 243, 108, 0.45);
}

.welcome-slide-body h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.welcome-slide-body>p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

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

.welcome-feature-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 8, 0.72);
}

.welcome-feature-card strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
}

.welcome-feature-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.welcome-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

@media (max-width: 560px) {
  .welcome-feature-grid {
    grid-template-columns: 1fr;
  }
}