/* ════════════════════════════════════════════════════
   DASHBOARD — Apple-Inspired 3D Glass
   Target: 20-60 · Hebrew RTL · Premium
════════════════════════════════════════════════════ */

body.dashboard-page {
  background-color: #050508;
  background-image:
    linear-gradient(180deg, rgba(5, 5, 8, 0.32) 0%, rgba(5, 5, 8, 0.68) 55%, rgba(5, 5, 8, 0.88) 100%),
    url('/assets/dashboard-bg.webp');
  background-size: cover, cover;
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────── */
.dashboard-nav {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 100;
  height: 64px;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.dash-user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-3);
}

.dash-niche-badge {
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}

.dash-logout-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-3);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: 'Heebo', sans-serif;
}
.dash-logout-btn:hover {
  border-color: rgba(239,68,68,0.6);
  color: rgba(239,68,68,0.9);
  background: rgba(239, 68, 68, 0.06);
}

/* ── Main layout ──────────────────────────────────── */
.dashboard-main {
  max-width: 1680px;
  margin: 0 auto;
  padding: 88px 2rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ════════════════════════════════════════════════════
   HERO CARD — Apple 3D Glass
════════════════════════════════════════════════════ */

.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;

  /* H-05 fallback: solid surface when backdrop-filter unsupported */
  background: rgba(13, 11, 28, 0.85);

  /* Rim light: top edge bright like real glass */
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-top-color: rgba(255, 255, 255, 0.28);
  border-left-color: rgba(255, 255, 255, 0.15);

  /* Deep elevated shadow for 3D feel */
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.12) inset,        /* top inner rim glow */
    0 -1px 0 rgba(255, 255, 255, 0.04) inset,        /* bottom inner subtle */
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 70px 140px rgba(0, 0, 0, 0.75),                /* deep shadow */
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 6px 20px rgba(0, 0, 0, 0.35),
    0 0 0 0.5px rgba(255, 255, 255, 0.06);           /* hairline outline */

  /* Subtle 3D perspective on hover */
  transition: transform 0.5s cubic-bezier(.22, 1, .36, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* H-05 + M-04: progressive enhancement glass — only when backdrop-filter is supported */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .dash-hero {
    /* Apple glass: lighter translucent base */
    background: linear-gradient(
      158deg,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.08) 100%
    );
    /* Reduced from 80px → 32px (M-04 perf) and removed brightness(1.05) (text contrast) */
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    backdrop-filter: blur(32px) saturate(180%);
  }
}

/* H-05: extra-light blur on small screens to spare GPU on mobile */
@media (max-width: 600px) {
  .dash-hero {
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }
}

.dash-hero:hover {
  transform: perspective(1400px) rotateX(0.8deg) translateY(-3px);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.14) inset,
    0 90px 160px rgba(0, 0, 0, 0.8),
    0 32px 70px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

/* Glass inner light — top reflection like glass bevel */
.dash-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    transparent 100%
  );
  border-radius: 30px 30px 0 0;
  pointer-events: none;
  z-index: 0;
}

/* Glass specular: diagonal highlight (like light ray across glass) */
.dash-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 180%;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.055) 0%,
    rgba(255, 255, 255, 0.015) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  transform: skewX(-12deg);
}

/* Ambient color orbs — show through the glass */
.dash-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.dash-hero-orb-gold {
  top: -100px;
  right: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle,
    rgba(232, 160, 32, 0.28) 0%,
    rgba(232, 160, 32, 0.1) 45%,
    transparent 70%
  );
}
.dash-hero-orb-purple {
  bottom: -90px;
  left: -60px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle,
    rgba(120, 80, 255, 0.22) 0%,
    rgba(120, 80, 255, 0.07) 45%,
    transparent 70%
  );
}

/* ── Hero Upper: greeting + arc ───────────────────── */
.dash-hero-upper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem 2.5rem 2rem;
}

/* Greeting side */
.dash-hero-greeting {
  min-width: 0;
}

.dash-hero-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(232, 160, 32, 0.7);
  margin-bottom: 0.55rem;
}

.dash-hero-name {
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 1.6rem;
  /* Subtle depth */
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

/* Stats — horizontal strip */
.dash-hero-stats {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.dash-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  padding: 0 1.4rem 0 0;
  flex-shrink: 0;
}

[dir="rtl"] .dash-hero-stat {
  align-items: flex-end;
  padding: 0 0 0 1.4rem;
}

.dash-hero-stat:last-of-type {
  padding: 0;
}

.dash-hero-stat-val {
  font-size: 1.55rem;
  font-weight: 900;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, #FAD261 0%, #E8A020 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.dash-hero-stat-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3); /* WCAG AA — was rgba(240,240,255,0.42) */
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dash-hero-stat-sep {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  margin: 0 1.4rem;
}

/* Progress arc */
.dash-hero-arc {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
}

.dash-hero-arc svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 18px rgba(232, 160, 32, 0.25));
}

/* ── Divider ─────────────────────────────────────── */
.dash-hero-divider {
  position: relative;
  z-index: 1;
  height: 1px;
  margin: 0 2.5rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(232, 160, 32, 0.15) 50%,
    rgba(255, 255, 255, 0.06) 75%,
    transparent 100%
  );
}

/* ── Hero lesson row ─────────────────────────────── */
.dash-hero-lesson {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 2.5rem 2rem;
  flex-wrap: nowrap;
}

.dash-hero-lesson-info {
  min-width: 0;
  flex: 1;
}

.dash-hero-lesson-eyebrow {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: rgba(232, 160, 32, 0.6);
  margin-bottom: 0.45rem;
}

.dash-hero-lesson-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-hero-lesson-meta {
  font-size: 0.76rem;
  color: var(--text-3); /* WCAG AA — was rgba(240,240,255,0.38) */
  font-weight: 500;
}

/* ── CTA Button ──────────────────────────────────── */
.dash-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #E8A020 0%, #F5C840 100%);
  color: #0a0810;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 0.78rem 1.6rem;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  font-family: 'Heebo', sans-serif;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow:
    0 4px 20px rgba(232, 160, 32, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset;
}
.dash-next-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.1);
  box-shadow:
    0 8px 28px rgba(232, 160, 32, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset;
}
.dash-next-btn svg {
  transition: transform 0.15s ease;
}
.dash-next-btn:hover svg {
  transform: translateX(-3px);
}

/* ── Access Banner ───────────────────────────────── */
/* Banner is shown ONLY to free users (and to paying users when their
   subscription is about to expire). The dashboard.html JS toggles the
   `hidden` attribute; this rule guarantees `hidden` always wins over
   `display:flex` regardless of cascade order or app-mode overrides. */
.dash-access-banner[hidden] { display: none !important; }
.dash-access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: rgba(232, 160, 32, 0.05);
  border: 1px solid rgba(232, 160, 32, 0.18);
  border-radius: 16px;
  padding: 1.1rem 1.5rem;
}
.dash-banner-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 0.2rem;
}
.dash-banner-text p {
  font-size: 0.8rem;
  color: var(--text-3);
  margin: 0;
}
.dash-banner-cta {
  font-size: 0.82rem;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  white-space: nowrap;
}

/* ── Lessons section ─────────────────────────────── */
.dash-lessons-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.lesson-card.completed {
  border-color: rgba(52, 211, 153, 0.22);
}
.lesson-card.completed:hover {
  border-color: rgba(52, 211, 153, 0.38);
}

/* ── Lock overlay ─────────────────────────────────── */
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.72);
  backdrop-filter: blur(4px);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
}
.lock-icon { font-size: 1.6rem; }
.lock-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(240, 240, 255, 0.55);
}

/* ── Upgrade gate ────────────────────────────────── */
.upgrade-gate {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(232, 160, 32, 0.04);
  border: 1px dashed rgba(232, 160, 32, 0.22);
  border-radius: 20px;
  margin-top: 0.5rem;
}
.upgrade-gate-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.upgrade-gate-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}
.upgrade-gate-sub {
  font-size: 0.86rem;
  color: var(--text-3);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.upgrade-gate-cta { display: inline-flex; }

/* ── Lock toast ──────────────────────────────────── */
.lock-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 12, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-1);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
  opacity: 0;
  white-space: nowrap;
}
.lock-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.lock-toast-icon { font-size: 1.1rem; }
.lock-toast-close {
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  margin-right: 0.25rem;
  line-height: 1;
}

/* ════════════════════════════════════════════════════
   LESSON CARDS — upgraded UX
════════════════════════════════════════════════════ */

/* Category color map via data-cat */
.lesson-card[data-cat="prompting"]  { --card-accent: #E8A020; }
.lesson-card[data-cat="code"]       { --card-accent: #EC4899; }
.lesson-card[data-cat="tools"]      { --card-accent: #F59E0B; }
.lesson-card[data-cat="agents"]     { --card-accent: #10B981; }
.lesson-card[data-cat="automation"] { --card-accent: #3B82F6; }
.lesson-card[data-cat="social"]     { --card-accent: #EF4444; }
.lesson-card[data-cat="marketing"]  { --card-accent: #00C4B3; }
.lesson-card[data-cat="video"]      { --card-accent: #F97316; }
.lesson-card[data-cat="advanced"]   { --card-accent: #06B6D4; }
.lesson-card[data-cat="projects"]   { --card-accent: #E8A020; }
.lesson-card[data-cat="api"]        { --card-accent: #F472B6; }

/* Base card override */
body.dashboard-page .lesson-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-inline-end: 3px solid var(--card-accent, rgba(255,255,255,0.15)); /* H-04 logical */
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
              background 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

/* Hover glow matching category color */
body.dashboard-page .lesson-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
  border-color: color-mix(in srgb, var(--card-accent, #E8A020) 40%, rgba(255,255,255,0.1));
  border-right-color: var(--card-accent, #E8A020);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.45),
    0 0 24px color-mix(in srgb, var(--card-accent, #E8A020) 18%, transparent);
}

/* Completed state */
body.dashboard-page .lesson-card.completed {
  border-right-color: #34D399;
  background: rgba(52,211,153,0.04);
}
body.dashboard-page .lesson-card.completed:hover {
  box-shadow:
    0 16px 48px rgba(0,0,0,0.45),
    0 0 22px rgba(52,211,153,0.18);
  border-color: rgba(52,211,153,0.25);
  border-right-color: #34D399;
}

/* ── Card internals ────────────────────────────── */
.lc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.lc-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  background: color-mix(in srgb, var(--cat-color, #E8A020) 15%, transparent);
  color: var(--cat-color, #E8A020);
  border: 1px solid color-mix(in srgb, var(--cat-color, #E8A020) 25%, transparent);
}

.lc-done-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(52,211,153,0.15);
  color: #34D399;
  border: 1px solid rgba(52,211,153,0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.lc-duration {
  font-size: 0.72rem;
  color: var(--text-3); /* WCAG AA — was 0.38 */
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.lc-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  line-height: 1.35;
  letter-spacing: -0.01em;
  flex: none;
}

.lc-desc {
  font-size: 0.76rem;
  color: var(--text-3); /* WCAG AA — was 0.42 */
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer: level badge + duration + CTA */
.lc-footer {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.lc-footer-dur {
  margin-right: auto;
}
[dir="rtl"] .lc-footer-dur {
  margin-right: unset;
  margin-left: auto;
}

/* CTA arrow — hidden until hover */
.lc-cta {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--card-accent, #E8A020);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  margin-right: auto;
  white-space: nowrap;
}
[dir="rtl"] .lc-cta {
  margin-right: unset;
  margin-left: auto;
  transform: translateX(-6px);
}
body.dashboard-page .lesson-card:hover .lc-cta {
  opacity: 1;
  transform: translateX(0);
}

/* ── Grid — 4 columns ─────────────────────────────── */
body.dashboard-page .lessons-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: start;
}

/* ── Search bar ──────────────────────────────────── */
body.dashboard-page .search-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 0.78rem 1.2rem;
  font-size: 0.9rem;
  color: rgba(240,240,255,0.9);
  width: 100%;
  font-family: 'Heebo', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
body.dashboard-page .search-input::placeholder {
  color: var(--text-3); /* WCAG AA — was 0.28 */
}
body.dashboard-page .search-input:focus {
  outline: none;
  border-color: rgba(232,160,32,0.45);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.1);
}

/* ── Filter tabs ──────────────────────────────────── */
body.dashboard-page .filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.5rem 0 0.25rem;
}

body.dashboard-page .filter-btn {
  border-radius: 999px;
  padding: 0.38rem 1rem;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: rgba(240,240,255,0.48);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Heebo', sans-serif;
  white-space: nowrap;
}
body.dashboard-page .filter-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(240,240,255,0.82);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
body.dashboard-page .filter-btn.active {
  background: linear-gradient(135deg,
    rgba(232,160,32,0.22) 0%,
    rgba(232,160,32,0.10) 100%);
  border-color: rgba(232,160,32,0.55);
  color: #FAD261;
  box-shadow: 0 0 14px rgba(232,160,32,0.22),
              0 2px 8px rgba(0,0,0,0.3);
}

/* ── Card entrance animation ─────────────────────── */
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
body.dashboard-page .lesson-card {
  animation: cardSlideIn 0.38s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: calc(var(--card-idx, 0) * 0.045s);
}

/* Top accent glow line on hover */
body.dashboard-page .lesson-card::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1.5px;
  border-radius: 999px;
  background: var(--card-accent, #E8A020);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
body.dashboard-page .lesson-card:hover::before { opacity: 0.65; }
body.dashboard-page .lesson-card.completed::before { opacity: 0.35; background: #34D399; }

/* ── Section header ───────────────────────────────── */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.2rem 0;
}
.dash-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3); /* WCAG AA — was 0.30 */
  margin: 0;
}
.dash-section-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3); /* WCAG AA — was 0.28 */
  background: rgba(255,255,255,0.05);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.07);
}

/* ── Filter tab count badge ───────────────────────── */
.ft-count {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: var(--text-3); /* WCAG AA — was 0.38 */
  margin-right: 0.15rem;
  vertical-align: middle;
  transition: background 0.18s, color 0.18s;
}
[dir="rtl"] .ft-count { margin-right: unset; margin-left: 0.15rem; }
.filter-btn.active .ft-count {
  background: rgba(232,160,32,0.22);
  color: #FAD261;
}

/* ── Lock overlay upgrade ─────────────────────────── */
body.dashboard-page .lock-overlay {
  background: rgba(5,5,8,0.78);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}
body.dashboard-page .lock-icon  { font-size: 1.5rem; }
body.dashboard-page .lock-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3); /* WCAG AA — was 0.45 */
}
body.dashboard-page .lock-cta {
  font-size: 0.72rem;
  font-weight: 800;
  color: #E8A020;
  margin-top: 0.15rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
body.dashboard-page .lesson-card:hover .lock-cta {
  opacity: 1;
  transform: translateY(0);
}

/* ── Category section headers ─────────────────────── */
.lc-cat-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.6rem 0 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.1rem;
}
.lc-cat-header:first-child { padding-top: 0.25rem; }

.lc-cat-header-bullet {
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: var(--cat-color, #E8A020);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--cat-color, #E8A020);
}

.lc-cat-header-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(240,240,255,0.72);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex: 1;
}

.lc-cat-header-count {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-color, #E8A020) 15%, transparent);
  color: var(--cat-color, #E8A020);
  border: 1px solid color-mix(in srgb, var(--cat-color, #E8A020) 28%, transparent);
}

/* ── Responsive additions ─────────────────────────── */
/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  body.dashboard-page .lessons-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  body.dashboard-page .lessons-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .dashboard-main { padding: 76px 1rem 4rem; gap: 1rem; }

  .dash-hero-upper {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem 1.5rem;
    gap: 1.5rem;
  }
  .dash-hero-arc { width: 100px; height: 100px; margin: 0 auto; }
  .dash-hero-name { font-size: 2rem; margin-bottom: 1.25rem; }
  .dash-hero-divider { margin: 0 1.5rem; }
  .dash-hero-lesson { padding: 1.25rem 1.5rem 1.5rem; flex-wrap: wrap; }
  .dash-next-btn { width: 100%; justify-content: center; }

  .dash-hero-stat-val { font-size: 1.3rem; }
  .dash-hero-stat { padding: 0 1rem 0 0; }
  [dir="rtl"] .dash-hero-stat { padding: 0 0 0 1rem; }
  .dash-hero-stat-sep { margin: 0 1rem; }
}

@media (max-width: 480px) {
  body.dashboard-page .lessons-grid { grid-template-columns: 1fr; }
}

/* ── Mobile: iOS Safari background-attachment:fixed fix ─────────────────── */
@media (max-width: 768px) {
  body.dashboard-page {
    /* Remove background from body — handled by body::after pseudo-element in visual-upgrade.css */
    background-image: linear-gradient(180deg, rgba(5,5,8,0.32) 0%, rgba(5,5,8,0.68) 55%, rgba(5,5,8,0.88) 100%);
    background-attachment: scroll;
    background-size: cover;
    background-position: center top;
  }
}

/* ── Dashboard nav mobile — clean cramped overlap ─────────── */
@media (max-width: 860px) {
  .dashboard-nav {
    padding: 0 0.85rem;
    gap: 0.5rem;
  }
  .dashboard-nav .nav-logo {
    font-size: 0.85rem;
    max-width: calc(100vw - 140px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }
  .dashboard-nav .nav-logo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Hide non-essential user-menu items on mobile */
  .dashboard-nav .dash-user-menu {
    gap: 0.35rem !important;
    flex-shrink: 0;
  }
  .dashboard-nav .dash-user-menu [data-lang-menu-slot],
  .dashboard-nav .dash-user-menu #adminNavBtn,
  .dashboard-nav .dash-user-menu .dash-user-name,
  .dashboard-nav .dash-user-menu #dashNicheBadge,
  .dashboard-nav .dash-user-menu #logoutBtn,
  .dashboard-nav .dash-user-menu #theme-toggle-header {
    display: none !important;
  }
  .dashboard-nav .dash-user-menu .nav-toggle {
    display: flex !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  /* Show user-menu items inside open hamburger dropdown */
  .dashboard-nav.mobile-open .dash-user-menu {
    position: fixed;
    top: var(--nav-h, 60px);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(5,5,8,0.98);
    backdrop-filter: blur(20px);
    padding: 0.75rem 1rem 1.25rem;
    gap: 0.5rem !important;
    z-index: 99;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .dashboard-nav.mobile-open .dash-user-menu [data-lang-menu-slot],
  .dashboard-nav.mobile-open .dash-user-menu #adminNavBtn,
  .dashboard-nav.mobile-open .dash-user-menu .dash-user-name,
  .dashboard-nav.mobile-open .dash-user-menu #logoutBtn,
  .dashboard-nav.mobile-open .dash-user-menu #theme-toggle-header {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
  }
}

/* Floating theme toggle (the round orb in screenshot) — move out of content */
.theme-toggle-floating,
.theme-fab,
#theme-toggle-fab,
.floating-theme-toggle {
  bottom: calc(env(safe-area-inset-bottom, 0) + 14px) !important;
  left: 12px !important;
  right: auto !important;
  width: 40px !important;
  height: 40px !important;
  opacity: 0.85;
  z-index: 50 !important;
}

@media (max-width: 640px) {
  .theme-toggle-floating,
  .theme-fab,
  #theme-toggle-fab,
  .floating-theme-toggle {
    width: 38px !important;
    height: 38px !important;
    bottom: calc(env(safe-area-inset-bottom, 0) + 70px) !important;
  }
}


/* ════════════════════════════════════════════════════════════════════
   Skeleton screen — instant paint while data loads
   ════════════════════════════════════════════════════════════════════ */
.dash-skeleton {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg, #050508);
  padding: 1.5rem 1rem;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: dashSkelFade 250ms ease-in;
}
.dash-skeleton.is-hiding {
  opacity: 0;
  transition: opacity 200ms ease-out;
}
@keyframes dashSkelFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dash-skel-hero {
  background: linear-gradient(180deg, rgba(232,160,32,0.06), transparent);
  border: 1px solid rgba(232,160,32,0.12);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.dash-skel-line {
  height: 14px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(232,160,32,0.12) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: dashSkelShimmer 1.4s ease-in-out infinite;
}
.dash-skel-line--lg { height: 28px; width: 60%; }
.dash-skel-line--md { width: 80%; }
.dash-skel-line--sm { width: 40%; }
.dash-skel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.dash-skel-card {
  height: 130px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(232,160,32,0.08) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  animation: dashSkelShimmer 1.4s ease-in-out infinite;
}
.dash-skel-card:nth-child(2) { animation-delay: 0.15s; }
.dash-skel-card:nth-child(3) { animation-delay: 0.30s; }
.dash-skel-card:nth-child(4) { animation-delay: 0.45s; }
@keyframes dashSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-skel-line, .dash-skel-card { animation: none; }
}

/* ============================================================
   H-02 + H-03 + M-01 — Hebrew typography guard
   ============================================================ */
html[lang^="he"] :where(h1, h2, h3, .hero-title, .dash-hero-name, .pricing-title) {
  letter-spacing: -0.01em;
  line-height: max(1.18, 1em);
}
html[lang^="he"] :where(.dash-hero-stat-lbl, .dash-hero-time, .lc-cat-badge, .lc-duration) {
  font-size: max(0.78rem, 1em);
}
