/**
 * HubIONOS Student Frontend V2
 *
 * This file is the visual source of truth for the rebuilt student shell and
 * “I miei corsi” screen. Legacy class names that still appear in markup are
 * kept as JavaScript/API hooks only; the v2 DOM is styled by the jf-* classes.
 */

:root {
  color-scheme: light;
  --jf-v2-coral: #fa6863;
  --jf-v2-coral-deep: #dc514c;
  --jf-v2-purple: #834791;
  --jf-v2-blue: #2151a1;
  --jf-v2-ink: #181928;
  --jf-v2-muted: rgba(24, 25, 40, 0.62);
  --jf-v2-soft: #f4f5f8;
  --jf-v2-soft-2: #eaebf0;
  --jf-v2-border: #e3e4eb;
  --jf-v2-white: #fffaf8;
  --jf-v2-green: #4db956;
  --jf-v2-telegram: #27a7e7;
  --jf-v2-drive: #34a853;
  --jf-v2-radius-lg: 28px;
  --jf-v2-radius-md: 24px;
  --jf-v2-radius-sm: 16px;
  --jf-v2-shadow: 0 20px 60px -25px rgba(18, 19, 44, 0.3);
  --jf-v2-shadow-strong: 0 32px 80px -28px rgba(18, 19, 44, 0.45);
  --jf-v2-page-gradient: #f4f5f8;
  --jf-v2-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body.jf-v2-body {
  min-height: 100vh;
  background: var(--jf-v2-page-gradient);
  color: var(--jf-v2-ink);
  font-family: var(--jf-v2-font);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
}

body.jf-v2-body * {
  box-sizing: border-box;
}

body.jf-v2-body a {
  color: inherit;
}

body.jf-v2-body button,
body.jf-v2-body input {
  font: inherit;
}

.nascondi { display: none; }
.mostra { display: block; }

.jf-hub-v2-shell {
  width: min(100%, 1600px);
  height: calc(100vh - 48px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 20px;
  padding: 0 24px;
}

.jf-left-rail,
.jf-main-panel,
.jf-right-rail {
  min-width: 0;
}

.jf-left-rail,
.jf-right-rail {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.48) transparent;
}

.jf-left-rail::-webkit-scrollbar,
.jf-right-rail::-webkit-scrollbar,
.jf-center-content::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.jf-left-rail::-webkit-scrollbar-track,
.jf-right-rail::-webkit-scrollbar-track,
.jf-center-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.jf-left-rail::-webkit-scrollbar-thumb,
.jf-right-rail::-webkit-scrollbar-thumb,
.jf-center-content::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: rgba(255, 255, 255, 0.44);
}

.jf-left-rail::-webkit-scrollbar-thumb {
  background-color: rgba(250, 104, 99, 0.28);
}

.jf-center-content::-webkit-scrollbar-thumb {
  background-color: rgba(24, 25, 40, 0.24);
}

.jf-left-rail::-webkit-scrollbar-corner,
.jf-right-rail::-webkit-scrollbar-corner,
.jf-center-content::-webkit-scrollbar-corner {
  background: transparent;
}

.jf-left-rail > *,
.jf-right-rail > * {
  flex-shrink: 0;
}

.jf-left-rail::after,
.jf-right-rail::after {
  content: "";
  position: sticky;
  bottom: -1px;
  z-index: 4;
  flex: 0 0 0;
  height: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  margin: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.jf-left-rail.jf-rail--has-more::after,
.jf-right-rail.jf-rail--has-more::after {
  flex-basis: 22px;
  height: 22px;
  opacity: 1;
  transform: translateY(0);
  animation: jfV2RailGlow 3.8s ease-in-out infinite;
}

.jf-left-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--jf-v2-radius-lg);
  background: #fff;
  color: var(--jf-v2-ink);
  box-shadow: var(--jf-v2-shadow);
}

.jf-left-rail.jf-rail--has-more::after {
  margin: -22px 0 -22px;
  border-radius: 0 0 var(--jf-v2-radius-lg) var(--jf-v2-radius-lg);
  background:
    radial-gradient(112px 18px at 12% 100%, rgba(250, 104, 99, 0.36), rgba(250, 104, 99, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 250, 248, 0.18) 100%);
  box-shadow: inset 0 -1px 0 rgba(250, 104, 99, 0.16);
}

.jf-main-panel {
  height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--jf-v2-border);
  border-radius: var(--jf-v2-radius-lg);
  background: #fff;
  box-shadow: var(--jf-v2-shadow);
}

.jf-center-content {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: clamp(26px, 3vw, 44px);
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 25, 40, 0.18) transparent;
}

.jf-right-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 8px;
  padding-bottom: 18px;
}

.jf-right-rail.jf-rail--has-more::after {
  margin: -22px 0 0;
  border-radius: 0 0 var(--jf-v2-radius-lg) var(--jf-v2-radius-lg);
  background:
    radial-gradient(130px 20px at 10% 100%, rgba(250, 104, 99, 0.34), rgba(250, 104, 99, 0) 72%),
    linear-gradient(180deg, rgba(131, 71, 145, 0) 0%, rgba(131, 71, 145, 0.06) 100%);
}

@media (min-width: 1321px) {
  body.jf-v2-body .chat-fab {
    right: max(384px, calc(50vw - 416px));
    bottom: 32px;
  }
}

@media (min-width: 1121px) and (max-width: 1320px) {
  body.jf-v2-body .chat-fab {
    right: 344px;
    bottom: 28px;
  }
}

.jf-mobile-topbar,
.jf-mobile-content-compat {
  display: none;
}

/* Login ------------------------------------------------------------------ */

body.jf-login-body {
  min-height: 100vh;
  overflow: auto;
}

.jf-login-page {
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(20px, 4vw, 44px) 0;
}

.jf-login-card,
.jf-login-side-card {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--jf-v2-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  color: var(--jf-v2-ink);
  box-shadow: var(--jf-v2-shadow-strong);
}

.jf-login-card {
  padding: clamp(26px, 3vw, 38px);
}

.jf-login-brand img {
  display: block;
  width: 188px;
  height: auto;
}

.jf-login-copy {
  margin-top: 34px;
}

.jf-login-title {
  margin: 0;
  font-size: clamp(44px, 5vw, 60px);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: -0.06em;
}

.jf-login-title span {
  color: var(--jf-v2-coral);
}

.jf-login-intro {
  max-width: 390px;
  margin: 18px 0 0;
  color: var(--jf-v2-muted);
  font-size: 16px;
}

.jf-login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.jf-login-field label {
  display: block;
  margin: 0 0 8px;
  color: rgba(24, 25, 40, 0.64);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jf-login-field input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 18px;
  background: var(--jf-v2-soft);
  color: var(--jf-v2-ink);
  padding: 0 17px;
  outline: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.jf-login-field input:focus {
  background: #fff;
  border-color: rgba(250, 104, 99, 0.44);
  box-shadow: 0 0 0 4px rgba(250, 104, 99, 0.12);
}

.jf-password-wrap {
  position: relative;
}

.jf-password-wrap input {
  padding-right: 62px;
}

.jf-password-wrap .reveal {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--jf-v2-ink);
}

.jf-login-submit {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--jf-v2-coral);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 16px 36px -20px rgba(250, 104, 99, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.jf-login-submit:hover,
.jf-login-submit:focus-visible {
  background: var(--jf-v2-coral-deep);
  transform: translateY(-1px);
  outline: none;
}

.jf-login-submit[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.jf-login-help,
.jf-login-legacy a {
  width: fit-content;
  color: var(--jf-v2-ink);
  font-weight: 750;
  text-decoration: none;
}

.jf-login-help:hover,
.jf-login-legacy a:hover {
  color: var(--jf-v2-coral-deep);
}

.jf-login-alert {
  padding: 14px 16px;
  border: 1px solid rgba(250, 104, 99, 0.28);
  border-radius: 16px;
  background: rgba(250, 104, 99, 0.08);
  color: var(--jf-v2-ink);
}

.jf-login-legacy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  color: var(--jf-v2-muted);
  font-size: 14px;
}

.jf-login-legacy span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.jf-login-side {
  display: grid;
  gap: 18px;
}

.jf-login-side-card {
  padding: 24px;
}

.jf-login-side-card--hero {
  min-height: 240px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.96)),
    url('../img/rebrand/course-graphic.jpg') center/cover;
}

.jf-login-side-card h2 {
  max-width: 460px;
  margin: 8px 0 0;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: -0.055em;
}

.jf-login-mini-progress {
  width: min(100%, 360px);
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 25, 40, 0.12);
}

.jf-login-mini-progress span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: var(--jf-v2-coral);
}

.jf-login-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.jf-login-side-grid .jf-login-side-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--jf-v2-shadow);
}

.jf-login-side-grid i {
  color: var(--jf-v2-coral);
  font-size: 24px;
}

.jf-login-side-grid span {
  font-weight: 780;
}

.jf-brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

.jf-brand-mark img {
  display: block;
  width: 158px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
}

.jf-rail-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jf-rail-label,
.jf-page-kicker,
.jf-card-kicker {
  margin: 0;
  color: rgba(24, 25, 40, 0.74);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.jf-left-rail .jf-rail-label {
  color: rgba(24, 25, 40, 0.72);
}

.jf-current-course {
  position: relative;
  overflow: hidden;
  padding: 18px 14px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: rgba(24, 25, 40, 0.035);
  transition: background 180ms ease, border-color 180ms ease;
}

.jf-current-course::before {
  content: "";
  position: absolute;
  inset: auto -28px -42px -28px;
  height: 92px;
  pointer-events: none;
  background: radial-gradient(circle at 18% 100%, rgba(250, 104, 99, 0.28), rgba(250, 104, 99, 0) 66%);
  opacity: 0.58;
}

.jf-current-course[data-state="dashboard"] {
  border-color: rgba(24, 25, 40, 0.06);
}

.jf-current-course[data-state="course"] {
  border-color: rgba(250, 104, 99, 0.18);
  background: rgba(250, 104, 99, 0.08);
}

.jf-current-course[data-state="search"] {
  border-color: rgba(131, 71, 145, 0.16);
  background: rgba(131, 71, 145, 0.07);
}

.jf-current-course > * {
  position: relative;
  z-index: 1;
}

.jf-current-course-title {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.jf-current-course-meta {
  margin: 8px 0 0;
  color: var(--jf-v2-muted);
  font-size: 13px;
}

.jf-nav-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jf-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--jf-v2-ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.jf-nav-item i {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: rgba(24, 25, 40, 0.72);
  font-size: 14px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.jf-nav-text {
  min-width: 0;
  flex: 1 1 auto;
}

.jf-nav-status {
  flex: 0 0 auto;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(24, 25, 40, 0.06);
  color: rgba(24, 25, 40, 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.jf-nav-item.meetcompanyclass {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 11px;
  row-gap: 4px;
  align-items: center;
  min-height: 58px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.jf-nav-item.meetcompanyclass i {
  grid-row: 1 / span 2;
}

.jf-nav-item.meetcompanyclass .jf-nav-text {
  grid-column: 2;
  line-height: 1.1;
}

.jf-nav-item.meetcompanyclass .jf-nav-status {
  grid-column: 2;
  justify-self: start;
  max-width: 132px;
  margin-top: 1px;
  padding: 4px 8px;
  line-height: 1;
}

.jf-nav-item.menusel .jf-nav-status {
  background: rgba(255, 255, 255, 0.76);
  color: var(--jf-v2-coral-deep);
}

.jf-nav-item:hover,
.jf-nav-item:focus-visible {
  color: var(--jf-v2-ink);
  background: rgba(24, 25, 40, 0.045);
  outline: none;
  transform: translateY(-1px);
}

.jf-nav-item:hover i,
.jf-nav-item:focus-visible i {
  background: rgba(24, 25, 40, 0.07);
}

.jf-nav-item.menusel {
  color: var(--jf-v2-ink);
  border-color: rgba(250, 104, 99, 0.18);
  background: linear-gradient(90deg, rgba(250, 104, 99, 0.16), rgba(250, 104, 99, 0.06));
  box-shadow: inset 3px 0 0 var(--jf-v2-coral);
}

.jf-nav-item.menusel i {
  background: var(--jf-v2-coral);
  color: #fff;
  transform: translateX(1px);
}

.jf-nav-item.grigetto {
  color: var(--jf-v2-ink);
}

.jf-search-wrap {
  position: relative;
}

.jf-search-wrap i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(24, 25, 40, 0.45);
  font-size: 13px;
  pointer-events: none;
}

#searchfield {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 999px;
  background: #f1f1f2;
  color: var(--jf-v2-ink);
  outline: none;
}

#searchfield::placeholder {
  color: rgba(24, 25, 40, 0.48);
}

#searchfield:focus {
  border-color: rgba(24, 25, 40, 0.22);
  background: #fff;
}

.jf-rail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.jf-rail-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 13px 15px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 18px;
  background: #fff;
  color: var(--jf-v2-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.jf-rail-button:hover,
.jf-rail-button:focus-visible {
  color: var(--jf-v2-ink);
  text-decoration: none;
  background: var(--jf-v2-soft);
  outline: none;
  transform: translateY(-1px);
}

.jf-rail-button--light {
  background: #fff;
  color: var(--jf-v2-ink);
}

.jf-rail-button--light:hover,
.jf-rail-button--light:focus-visible {
  color: var(--jf-v2-ink);
  background: #fff;
  box-shadow: 0 18px 38px -26px rgba(0, 0, 0, 0.55);
}

.jf-combacia-button {
  background: #00ce7c;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.jf-combacia-button:hover,
.jf-combacia-button:focus-visible {
  background: #00b56f;
}

.jf-combacia-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--jf-v2-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

#combacia-notif-badge {
  display: none;
}

#combacia-notif-badge.combacia-stack__badge--visible {
  display: inline-flex;
}

.jf-profile-card,
.jf-quick-card,
.jf-calendar-card,
.jf-frequency-card {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--jf-v2-radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--jf-v2-shadow);
  color: var(--jf-v2-ink);
}

.jf-profile-card {
  padding: 20px;
}

.jf-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.jf-profile-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.jf-notification-trigger,
.jf-notification-icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(24, 25, 40, 0.12);
  border-radius: 50%;
  background: #fff;
  color: var(--jf-v2-ink);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.jf-notification-trigger:hover,
.jf-notification-trigger:focus-visible,
.jf-notification-icon-button:hover,
.jf-notification-icon-button:focus-visible {
  border-color: var(--jf-v2-coral);
  background: rgba(200, 69, 31, 0.08);
  color: var(--jf-v2-coral);
  outline: none;
}

.jf-notification-trigger:active,
.jf-notification-icon-button:active {
  transform: scale(0.96);
}

.jf-notification-trigger > i,
.jf-notification-icon-button > i {
  font-size: 18px;
}

.jf-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--jf-v2-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.jf-notification-badge[hidden] {
  display: none;
}

.jf-nav-badge {
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--jf-v2-coral-deep);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.jf-notification-drawer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.jf-notification-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.jf-notification-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 25, 40, 0.42);
  opacity: 0;
  transition: opacity 180ms ease;
}

.jf-notification-drawer.is-open .jf-notification-backdrop {
  opacity: 1;
}

.jf-notification-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(24, 25, 40, 0.12);
  background: #fff;
  color: var(--jf-v2-ink);
  box-shadow: -24px 0 70px -38px rgba(24, 25, 40, 0.7);
  transform: translateX(100%);
  transition: transform 220ms ease;
  outline: none;
}

.jf-notification-drawer.is-open .jf-notification-panel {
  transform: translateX(0);
}

.jf-notification-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--jf-v2-border);
}

.jf-notification-header h2 {
  margin: 3px 0 0;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: 0;
}

.jf-notification-toolbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--jf-v2-border);
  background: var(--jf-v2-soft);
}

.jf-notification-toolbar > span {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--jf-v2-muted);
  font-size: 12px;
  font-weight: 600;
}

.jf-notification-toolbar button {
  max-width: 158px;
  flex: 0 1 auto;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--jf-v2-coral);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
  cursor: pointer;
}

.jf-notification-toolbar button:disabled {
  color: rgba(24, 25, 40, 0.36);
  cursor: default;
}

.jf-notification-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.jf-notification-item {
  position: relative;
  width: 100%;
  min-height: 108px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 13px;
  padding: 20px 22px;
  border: 0;
  border-bottom: 1px solid var(--jf-v2-border);
  background: #fff;
  color: var(--jf-v2-ink);
  text-align: left;
  cursor: pointer;
}

.jf-notification-item.is-unread {
  background: rgba(200, 69, 31, 0.055);
}

.jf-notification-item.is-unread::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--jf-v2-coral);
}

.jf-notification-item:hover,
.jf-notification-item:focus-visible {
  background: rgba(24, 25, 40, 0.045);
  outline: none;
}

.jf-notification-item__icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(200, 69, 31, 0.1);
  color: var(--jf-v2-coral);
  font-size: 17px;
}

.jf-notification-item--lesson .jf-notification-item__icon {
  background: rgba(29, 112, 78, 0.1);
  color: #1d704e;
}

.jf-notification-item--rate .jf-notification-item__icon {
  background: rgba(177, 111, 18, 0.12);
  color: #8a580b;
}

.jf-notification-item__copy {
  min-width: 0;
}

.jf-notification-item__copy strong,
.jf-notification-item__copy span,
.jf-notification-item__copy time {
  display: block;
}

.jf-notification-item__copy strong {
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.jf-notification-item__copy span {
  margin-top: 4px;
  color: var(--jf-v2-muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.jf-notification-item__copy time {
  margin-top: 8px;
  color: rgba(24, 25, 40, 0.56);
  font-size: 11px;
  font-weight: 600;
}

.jf-notification-item__arrow {
  align-self: center;
  color: rgba(24, 25, 40, 0.42);
  font-size: 12px;
}

.jf-notification-empty,
.jf-notification-error {
  min-height: 300px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  color: var(--jf-v2-muted);
  text-align: center;
}

.jf-notification-empty[hidden],
.jf-notification-error[hidden] {
  display: none;
}

.jf-notification-empty > i {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--jf-v2-soft);
  color: var(--jf-v2-coral);
  font-size: 22px;
}

.jf-notification-empty strong,
.jf-notification-error strong {
  color: var(--jf-v2-ink);
  font-size: 16px;
}

.jf-notification-empty span,
.jf-notification-error span {
  max-width: 280px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
}

body.jf-notification-drawer-open {
  overflow: hidden;
}

.propic {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 999px;
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.45);
}

.nomeutente {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.jf-profile-subtitle {
  margin: 4px 0 0;
  color: var(--jf-v2-muted);
  font-size: 13px;
}

.jf-quick-card,
.jf-calendar-card,
.jf-frequency-card {
  padding: 18px;
}

.jf-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.jf-card-subtitle {
  margin: 4px 0 0;
  color: var(--jf-v2-muted);
  font-size: 13px;
}

.jf-quick-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.jf-quick-empty {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed rgba(24, 25, 40, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(24, 25, 40, 0.72);
}

.jf-quick-empty.nascondi { display: none; }
.jf-quick-empty.mostra { display: flex; }

.jf-quick-empty i {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(250, 104, 99, 0.12);
  color: var(--jf-v2-coral-deep);
}

.jf-quick-empty strong,
.jf-quick-empty span {
  display: block;
}

.jf-quick-empty strong {
  color: var(--jf-v2-ink);
  font-size: 15px;
  line-height: 1.2;
}

.jf-quick-empty span {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.jf-quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 18px;
  background: var(--jf-v2-soft);
  color: var(--jf-v2-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.1;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.jf-quick-link.mostra { display: flex; }
.jf-quick-link.nascondi { display: none; }

.jf-quick-link:hover,
.jf-quick-link:focus-visible {
  color: var(--jf-v2-ink);
  text-decoration: none;
  border-color: rgba(24, 25, 40, 0.16);
  box-shadow: 0 18px 36px -28px rgba(18, 19, 44, 0.45);
  outline: none;
  transform: translateY(-1px);
}

.jf-quick-link i,
.jf-quick-link img {
  flex: 0 0 auto;
}

.jf-quick-link img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.jf-quick-link--zoom i { color: #0b5cff; font-size: 25px; }
.jf-quick-link--zoom img {
  width: 52px;
  height: 18px;
}
.jf-quick-link--telegram i { color: var(--jf-v2-telegram); font-size: 28px; }
.jf-quick-link--drive i { color: var(--jf-v2-drive); font-size: 28px; }
.jf-quick-link--calendar {
  background: linear-gradient(135deg, rgba(44, 196, 123, 0.13), rgba(64, 128, 255, 0.12));
  border-color: rgba(44, 196, 123, 0.22);
}
.jf-quick-link--calendar i { color: #2c7df0; font-size: 26px; }

.jf-calendar-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(44, 196, 123, 0.22);
  border-radius: 16px;
  background: rgba(44, 196, 123, 0.08);
  color: rgba(24, 25, 40, 0.74);
  font-size: 12px;
  line-height: 1.35;
}

.jf-calendar-privacy.nascondi { display: none; }
.jf-calendar-privacy.mostra { display: flex; }

.jf-calendar-privacy i {
  flex: 0 0 auto;
  margin-top: 2px;
  color: #1f9d64;
}

.jf-calendar-sync-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--jf-z-toast, 9999);
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 28px 70px -36px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.jf-calendar-sync-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.jf-calendar-sync-toast--success { background: linear-gradient(135deg, #1f9d64, #2c7df0); }
.jf-calendar-sync-toast--error { background: linear-gradient(135deg, #d64545, #fa6863); }

.jf-calendar-sync-toast strong,
.jf-calendar-sync-toast span {
  display: block;
}

.jf-calendar-sync-toast strong {
  font-size: 14px;
  font-weight: 800;
}

.jf-calendar-sync-toast span {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.92;
}

.jf-frequency-card#visFreq {
  margin-top: 14px;
}

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

.jf-frequency-item {
  min-height: 72px;
  padding: 12px;
  border-radius: 16px;
  background: var(--jf-v2-soft);
}

.jf-frequency-item--has-warning {
  border: 1px solid rgba(44, 125, 240, 0.2);
  background: linear-gradient(135deg, rgba(44, 125, 240, 0.1), rgba(44, 196, 123, 0.08));
}

.jf-frequency-item span {
  display: block;
  color: var(--jf-v2-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jf-frequency-item strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
}

.jf-module-schedule-info {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(44, 125, 240, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(24, 25, 40, 0.78);
}

.jf-module-schedule-info.nascondi { display: none; }
.jf-module-schedule-info.mostra { display: block; }

.jf-module-schedule-info__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.jf-module-schedule-info__head i {
  margin-top: 2px;
  color: #2c7df0;
}

.jf-module-schedule-info__head strong,
.jf-module-schedule-info__head span {
  display: block;
}

.jf-module-schedule-info__head strong {
  color: var(--jf-v2-ink);
  font-size: 13px;
  font-weight: 850;
}

.jf-module-schedule-info__head span,
.jf-module-schedule-info__current,
.jf-module-schedule-info__row small {
  font-size: 12px;
  line-height: 1.35;
}

.jf-module-schedule-info__current {
  margin: 10px 0 0;
}

.jf-module-schedule-info__button {
  width: 100%;
  margin-top: 11px;
  padding: 9px 12px;
  border: 1px solid rgba(44, 125, 240, 0.24);
  border-radius: 12px;
  background: #fff;
  color: #245fc8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.jf-module-schedule-info__button:hover,
.jf-module-schedule-info__button:focus {
  border-color: rgba(44, 125, 240, 0.42);
  background: rgba(44, 125, 240, 0.08);
  color: #174ba8;
  outline: none;
}

.jf-module-schedule-info__list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.jf-module-schedule-info__list--inline-hidden {
  display: none;
}

.jf-module-schedule-info__list--modal {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.jf-module-schedule-info__row {
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(24, 25, 40, 0.04);
}

.jf-module-schedule-info__row.is-active {
  background: rgba(44, 196, 123, 0.12);
  box-shadow: inset 3px 0 0 #2cc47b;
}

.jf-module-schedule-info__row span,
.jf-module-schedule-info__row small {
  display: block;
}

.jf-module-schedule-info__row span {
  color: var(--jf-v2-ink);
  font-size: 12px;
  font-weight: 800;
}

.jf-module-schedule-info__row small {
  margin-top: 3px;
  color: rgba(24, 25, 40, 0.64);
}

.jf-module-schedule-modal {
  z-index: 20040;
}

.modal-backdrop.jf-module-schedule-backdrop.show {
  z-index: 20030;
}

.jf-module-schedule-modal .modal-dialog {
  max-width: min(620px, calc(100vw - 24px));
}

.jf-module-schedule-modal .modal-content {
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 20px;
  box-shadow: 0 26px 70px rgba(24, 25, 40, 0.22);
  overflow: hidden;
}

.jf-module-schedule-modal .modal-header,
.jf-module-schedule-modal .modal-footer {
  border: 0;
  padding: 20px 22px;
}

.jf-module-schedule-modal .modal-header {
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(44, 125, 240, 0.1), rgba(44, 196, 123, 0.08));
}

.jf-module-schedule-modal .modal-body {
  padding: 20px 22px 6px;
}

.jf-module-schedule-modal__eyebrow {
  margin: 0 0 4px;
  color: rgba(24, 25, 40, 0.58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jf-module-schedule-modal .modal-title {
  color: var(--jf-v2-ink);
  font-size: 20px;
  font-weight: 860;
  line-height: 1.15;
}

.jf-module-schedule-modal__intro {
  margin: 0;
  color: rgba(24, 25, 40, 0.68);
  font-size: 14px;
  line-height: 1.45;
}

.jf-module-schedule-modal .jf-module-schedule-info__current {
  color: rgba(24, 25, 40, 0.72);
  font-size: 13px;
}

.jf-module-schedule-modal .jf-module-schedule-info__row {
  padding: 11px 12px;
  border: 1px solid rgba(24, 25, 40, 0.06);
  background: rgba(24, 25, 40, 0.035);
}

.jf-module-schedule-modal .jf-module-schedule-info__row span {
  font-size: 13px;
}

.jf-module-schedule-modal .jf-module-schedule-info__row small {
  font-size: 12px;
}

.jf-module-schedule-modal__close {
  padding: 9px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--jf-v2-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#containermio {
  margin-top: 14px;
  font-size: 13px;
}

#containermio,
#containermio .calendar {
  width: 100%;
}

/* Settings page ----------------------------------------------------------- */

.jf-settings-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--jf-v2-ink);
}

.jf-settings-header {
  max-width: 720px;
}

.jf-settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1.18fr);
  gap: 18px;
}

.jf-settings-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--jf-v2-radius-md);
  background: #fff;
  box-shadow: var(--jf-v2-shadow);
}

.jf-settings-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.jf-settings-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(250, 104, 99, 0.12);
  color: var(--jf-v2-coral-deep);
  font-size: 18px;
}

.jf-settings-profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.jf-settings-avatar.propic {
  width: 86px;
  height: 86px;
}

.jf-settings-fields {
  display: grid;
  gap: 14px;
}

.jf-settings-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.jf-settings-field > span {
  color: rgba(24, 25, 40, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jf-settings-field small {
  color: var(--jf-v2-muted);
  font-size: 12px;
  line-height: 1.35;
}

.jf-settings-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(24, 25, 40, 0.12);
  border-radius: 16px;
  background: var(--jf-v2-soft);
  color: var(--jf-v2-ink);
  font-size: 15px;
  outline: none;
}

.jf-settings-field input:focus-visible {
  border-color: rgba(250, 104, 99, 0.56);
  box-shadow: 0 0 0 4px rgba(250, 104, 99, 0.14);
}

.jf-settings-field input:disabled {
  color: rgba(24, 25, 40, 0.6);
  cursor: not-allowed;
}

.jf-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.jf-settings-rate-email {
  grid-column: 1 / -1;
}

.jf-settings-email-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: center;
}

.jf-settings-email-safety {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(35, 108, 61, 0.18);
  border-radius: 8px;
  background: #f1f8f3;
  color: #315f3f;
  font-size: 12.5px;
  line-height: 1.5;
}

.jf-settings-email-safety i {
  margin-top: 2px;
}

.jf-settings-email-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.jf-settings-email-mode {
  position: relative;
  min-width: 0;
  display: block;
  cursor: pointer;
}

.jf-settings-email-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jf-settings-email-mode > span {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--jf-v2-border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.jf-settings-email-mode strong {
  color: var(--jf-v2-text);
  font-size: 14px;
  line-height: 1.35;
}

.jf-settings-email-mode small {
  color: var(--jf-v2-muted);
  font-size: 12px;
  line-height: 1.45;
}

.jf-settings-email-mode input:checked + span {
  border-color: #247344;
  background: #f1faf5;
  box-shadow: 0 0 0 2px rgba(36, 115, 68, 0.14);
}

.jf-settings-email-mode--live input:checked + span {
  border-color: #c8451f;
  background: #fff4ef;
  box-shadow: 0 0 0 2px rgba(200, 69, 31, 0.14);
}

.jf-settings-email-mode input:focus-visible + span {
  outline: 3px solid rgba(200, 69, 31, 0.28);
  outline-offset: 3px;
}

.jf-settings-email-mode.is-disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.jf-settings-email-live-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #efb7a6;
  border-radius: 8px;
  background: #fff4ef;
  color: #7f321c;
}

.jf-settings-email-live-confirm[hidden] {
  display: none;
}

.jf-settings-email-live-confirm > i {
  margin-top: 3px;
}

.jf-settings-email-live-confirm label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.5;
}

.jf-settings-email-live-confirm input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.jf-settings-switch {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 8px;
  background: var(--jf-v2-soft);
  cursor: pointer;
}

.jf-settings-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jf-settings-switch-track {
  position: relative;
  width: 48px;
  height: 26px;
  display: block;
  border-radius: 999px;
  background: #b7bcc5;
  transition: background-color 160ms ease;
}

.jf-settings-switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 25, 40, 0.22);
  transition: transform 160ms ease;
}

.jf-settings-switch input:checked + .jf-settings-switch-track {
  background: #247344;
}

.jf-settings-switch input:checked + .jf-settings-switch-track span {
  transform: translateX(22px);
}

.jf-settings-switch input:focus-visible + .jf-settings-switch-track {
  outline: 3px solid rgba(200, 69, 31, 0.28);
  outline-offset: 3px;
}

.jf-settings-switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.66;
}

.jf-settings-switch-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.jf-settings-switch-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

.jf-settings-switch-copy small {
  color: var(--jf-v2-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.jf-settings-email-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--jf-v2-border);
}

.jf-settings-email-status {
  margin: 0;
  color: var(--jf-v2-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.jf-settings-email-status.is-on {
  color: #247344;
}

.jf-settings-email-status.is-live {
  color: #a43c1f;
  font-weight: 700;
}

.jf-settings-email-recipients {
  margin: 4px 0 0;
  color: var(--jf-v2-muted);
  font-size: 11.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.jf-settings-email-footer .jf-pill-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.jf-settings-email-status.is-warning {
  color: #8a580b;
}

.jf-settings-email-status.is-error {
  color: #9b351f;
}

@media (max-width: 760px) {
  .jf-settings-email-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .jf-settings-email-modes {
    grid-template-columns: 1fr;
  }

  .jf-settings-email-mode > span {
    min-height: 0;
  }

  .jf-settings-email-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .jf-settings-email-footer .jf-pill-button {
    width: 100%;
    justify-content: center;
  }
}

/* Courses page ------------------------------------------------------------ */

.jf-courses-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--jf-v2-ink);
}

.jf-page-header {
  max-width: 760px;
}

.jf-page-kicker {
  margin-bottom: 10px;
}

.jf-page-title {
  margin: 0;
  font-size: clamp(42px, 5vw, 60px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.jf-page-title-dot {
  color: var(--jf-v2-coral);
}

.jf-page-intro {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--jf-v2-muted);
  font-size: 15px;
}

.jf-featured-course {
  position: relative;
  min-height: 184px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--jf-v2-radius-md);
  background: var(--jf-v2-soft);
  box-shadow: none;
  cursor: pointer;
  isolation: auto;
}

.jf-course-card-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 12, 24, 0.06) 0%, rgba(11, 12, 24, 0.22) 44%, rgba(11, 12, 24, 0.76) 100%);
}

.jf-featured-course:hover,
.jf-course-card-v2:hover {
  transform: translateY(-2px);
}

.jf-featured-content {
  width: 100%;
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px 30px;
  color: var(--jf-v2-ink);
}

.jf-featured-eyebrow,
.jf-course-category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jf-featured-eyebrow {
  background: transparent;
  color: var(--jf-v2-coral);
  padding: 0;
  min-height: auto;
}

.jf-featured-kickers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.jf-course-notification-count {
  min-width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--jf-v2-coral-deep);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(24, 25, 40, 0.62);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.jf-course-card-v2 > .jf-course-notification-count {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.jf-course-card-v2.has-course-notifications .jf-course-category {
  max-width: calc(100% - 92px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jf-featured-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 2.3vw, 34px);
  font-weight: 780;
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.jf-featured-meta {
  margin: 10px 0 0;
  color: var(--jf-v2-muted);
  font-size: 14px;
}

.jf-course-state {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 999px;
  background: rgba(24, 25, 40, 0.045);
  color: rgba(24, 25, 40, 0.7);
  line-height: 1;
}

.jf-course-state span {
  color: var(--jf-v2-ink);
  font-size: 12px;
  font-weight: 800;
}

.jf-course-state small {
  color: rgba(24, 25, 40, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.jf-course-state--available {
  border-color: rgba(250, 104, 99, 0.18);
  background: rgba(250, 104, 99, 0.1);
}

.jf-course-state--complete {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.1);
}

.jf-course-state--upcoming {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.12);
}

.jf-featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.jf-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(250, 104, 99, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--jf-v2-coral-deep);
  font-size: 14px;
  font-weight: 750;
}

.ai-open-workspace {
  min-height: 44px;
}

.jf-pill-button--primary {
  border-color: rgba(24, 25, 40, 0.94);
  background: var(--jf-v2-ink);
  color: #fffaf8;
  box-shadow: 0 16px 32px -20px rgba(24, 25, 40, 0.72), 0 0 0 5px rgba(250, 104, 99, 0.14);
}

.jf-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jf-course-list-section {
  padding: 26px 30px 30px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--jf-v2-radius-md);
  background: var(--jf-v2-soft);
}

.jf-course-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.jf-section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.jf-course-search {
  min-width: min(360px, 42%);
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 999px;
  background: #ececef;
  color: rgba(24, 25, 40, 0.52);
  font-size: 14px;
  cursor: text;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.jf-course-search:focus-within {
  border-color: rgba(250, 104, 99, 0.42);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(250, 104, 99, 0.12);
}

.jf-course-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--jf-v2-ink);
  font: inherit;
  font-weight: 700;
}

.jf-course-search input::placeholder {
  color: rgba(24, 25, 40, 0.48);
  font-weight: 650;
}

.jf-search-results-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.jf-search-results-list {
  display: grid;
  gap: 12px;
}

.jf-search-result {
  min-height: 98px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px -34px rgba(24, 25, 40, 0.42);
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, box-shadow 180ms ease;
}

.jf-search-result:hover,
.jf-search-result:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(250, 104, 99, 0.28);
  box-shadow: 0 24px 54px -36px rgba(24, 25, 40, 0.52);
  outline: none;
}

.jf-search-result-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(250, 104, 99, 0.11);
  color: var(--jf-v2-coral-deep);
  font-size: 20px;
}

.jf-search-result-copy h2 {
  margin: 3px 0 2px;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.jf-search-result-copy p:last-child {
  margin: 0;
  color: var(--jf-v2-muted);
  font-size: 14px;
}

.jf-search-result-date {
  color: rgba(24, 25, 40, 0.52);
  font-size: 12px;
  font-weight: 780;
  text-align: right;
  white-space: nowrap;
}

.jf-filter-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 999px;
  background: transparent;
  color: var(--jf-v2-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.jf-filter-chip.is-active {
  border-color: transparent;
  background: var(--jf-v2-coral);
  color: #fff;
}

.jf-filter-chip span {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(24, 25, 40, 0.08);
  color: rgba(24, 25, 40, 0.64);
  font-size: 12px;
  line-height: 1;
}

.jf-filter-chip.is-active span {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

/* Delight pass: bold creative, but task-first ----------------------------- */

@keyframes jfV2DelightSweep {
  from { transform: translateX(-120%) rotate(10deg); opacity: 0; }
  30% { opacity: 0.9; }
  to { transform: translateX(180%) rotate(10deg); opacity: 0; }
}

@keyframes jfV2ProgressGlow {
  0%, 100% { filter: saturate(1); box-shadow: none; }
  50% { filter: saturate(1.24); box-shadow: 0 0 22px rgba(250, 104, 99, 0.32); }
}

@keyframes jfV2RailGlow {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.22); }
}

.jf-featured-course,
.jf-course-card-v2,
.jf-pill-button,
.jf-filter-chip,
.jf-lesson-row .btnmio,
.ai-open-workspace {
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.jf-pill-button,
.ai-open-workspace {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.jf-pill-button::after,
.ai-open-workspace::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 52%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), transparent);
  transform: translateX(-120%) rotate(10deg);
  opacity: 0;
}

.jf-course-state--available span {
  animation: jfV2ProgressGlow 4.8s ease-in-out infinite;
}

@media (hover: hover) {
  .jf-course-card-v2:hover,
  .jf-featured-course:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 22px 48px -34px rgba(24, 25, 40, 0.46);
  }

  .jf-pill-button:hover,
  .jf-filter-chip:hover,
  .jf-lesson-row .btnmio:hover,
  .ai-open-workspace:hover {
    transform: translateY(-2px);
  }

  .jf-pill-button:hover::after,
  .ai-open-workspace:hover::after {
    animation: jfV2DelightSweep 760ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.jf-pill-button:active,
.jf-filter-chip:active,
.jf-lesson-row .btnmio:active,
.ai-open-workspace:active {
  transform: translateY(1px) scale(0.985);
}

.jf-pill-button:focus-visible,
.jf-filter-chip:focus-visible,
.jf-lesson-row .btnmio:focus-visible,
.ai-open-workspace:focus-visible {
  outline: 3px solid rgba(250, 104, 99, 0.34);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px rgba(250, 104, 99, 0.36), 0 16px 34px -24px rgba(24, 25, 40, 0.42);
}

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

.jf-course-card-v2[hidden] {
  display: none;
}

.jf-course-card-v2 {
  --jf-card-media-h: 146px;
  --jf-card-body-h: 180px;
  position: relative;
  height: calc(var(--jf-card-media-h) + var(--jf-card-body-h));
  min-height: calc(var(--jf-card-media-h) + var(--jf-card-body-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 18px;
  background-color: #fff;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% var(--jf-card-media-h);
  color: var(--jf-v2-ink);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  isolation: isolate;
}

.jf-course-card-v2::before {
  display: none;
}

.jf-course-card-v2.is-bg-pending,
.jf-featured-course.is-bg-pending {
  background-image: linear-gradient(135deg, #e3e5ed, #ccd4e6);
}

.jf-course-card-body {
  flex: 0 0 var(--jf-card-body-h);
  height: var(--jf-card-body-h);
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 7px;
  overflow: hidden;
  padding: 18px 20px 18px;
  background: #fff;
  color: var(--jf-v2-ink);
}

.jf-course-card-v2 .jf-course-category {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  color: var(--jf-v2-ink);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  box-shadow: 0 12px 24px -20px rgba(18, 19, 44, 0.35);
}

.jf-course-card-title,
.tits {
  margin: 0;
  color: var(--jf-v2-ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.jf-course-card-title--long {
  -webkit-line-clamp: 4;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.06;
}

.jf-course-card-title--xl {
  -webkit-line-clamp: 4;
  font-size: clamp(14px, 1.08vw, 17px);
  line-height: 1.08;
}

.jf-course-card-meta {
  margin: 0;
  color: var(--jf-v2-muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jf-course-card-body .jf-course-state {
  align-self: end;
  margin-top: 0;
}

.jf-empty-state {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 36px;
  border: 1px dashed rgba(24, 25, 40, 0.14);
  border-radius: var(--jf-v2-radius-md);
  background: var(--jf-v2-soft);
  color: var(--jf-v2-muted);
  text-align: center;
}

.jf-course-filter-empty {
  margin-top: 18px;
  padding: 22px;
  border: 1px dashed rgba(24, 25, 40, 0.16);
  border-radius: 18px;
  background: #fff;
  color: var(--jf-v2-muted);
  text-align: center;
}

.jf-course-filter-empty strong,
.jf-course-filter-empty span {
  display: block;
}

.jf-course-filter-empty strong {
  color: var(--jf-v2-ink);
  font-size: 16px;
  font-weight: 780;
}

.jf-course-filter-empty span {
  margin-top: 6px;
  font-size: 14px;
}

.jf-empty-state--error {
  border-style: solid;
  border-color: rgba(250, 104, 99, 0.22);
  background: linear-gradient(180deg, #fff, rgba(255, 245, 244, 0.9));
}

@keyframes jfV2SkeletonPulse {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 0.96; }
}

.jf-page-skeleton {
  display: grid;
  gap: 24px;
  padding: clamp(18px, 3vw, 28px);
}

.jf-page-skeleton-header {
  display: grid;
  gap: 12px;
}

.jf-page-skeleton-header span,
.jf-page-skeleton-header strong,
.jf-page-skeleton-header p,
.jf-page-skeleton-card {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 229, 238, 0.62), rgba(246, 247, 251, 0.96), rgba(226, 229, 238, 0.62));
  animation: jfV2SkeletonPulse 1.35s ease-in-out infinite;
}

.jf-page-skeleton-header span { width: 86px; height: 12px; }
.jf-page-skeleton-header strong { width: min(520px, 78%); height: 42px; }
.jf-page-skeleton-header p { width: min(640px, 92%); height: 16px; }

.jf-page-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.jf-page-skeleton-card {
  height: 220px;
  border-radius: var(--jf-v2-radius-md);
}

/* Simple AJAX pages: certifications + Combacia --------------------------- */

.jf-simple-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.jf-cert-card {
  overflow: hidden;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--jf-v2-radius-md);
  background: var(--jf-v2-soft);
}

.jf-cert-preview {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid rgba(24, 25, 40, 0.08);
  background: #fff;
}

.jf-cert-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.jf-cert-content {
  padding: 20px;
}

.jf-cert-content h2 {
  margin: 8px 0 6px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.jf-cert-content p:not(.jf-card-kicker) {
  margin: 0 0 16px;
  color: var(--jf-v2-muted);
  font-size: 14px;
}

.jf-empty-state--certs {
  min-height: 420px;
}

.jf-combacia-hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--jf-v2-radius-md);
  background:
    radial-gradient(circle at 90% 10%, rgba(0, 206, 124, 0.16), transparent 30%),
    var(--jf-v2-soft);
}

.jf-combacia-mark {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 42px;
  background: #fff;
  box-shadow: var(--jf-v2-shadow);
}

.jf-combacia-mark svg {
  width: 92px;
  height: 92px;
}

.jf-combacia-hero h2 {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: clamp(34px, 4.1vw, 54px);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: -0.06em;
}

.jf-combacia-hero p:not(.jf-card-kicker) {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--jf-v2-muted);
  font-size: 16px;
}

.jf-combacia-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.jf-combacia-steps article {
  min-height: 178px;
  padding: 22px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 22px;
  background: #fff;
}

.jf-combacia-steps span {
  color: var(--jf-v2-coral);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.jf-combacia-steps h3 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 780;
}

.jf-combacia-steps p {
  margin: 0;
  color: var(--jf-v2-muted);
  font-size: 14px;
}

/* Course dashboard -------------------------------------------------------- */

.jf-course-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.jf-course-topbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: -8px;
}

.jf-course-back-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(24, 25, 40, 0.1);
  border-radius: 999px;
  background: #fff;
  color: rgba(24, 25, 40, 0.76);
  font-size: 13px;
  font-weight: 780;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px -22px rgba(24, 25, 40, 0.46);
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.jf-course-back-button i {
  font-size: 12px;
}

.jf-course-back-button:hover {
  transform: translateX(-2px);
  border-color: rgba(250, 104, 99, 0.3);
  color: var(--jf-v2-coral-deep);
  box-shadow: 0 16px 32px -22px rgba(250, 104, 99, 0.55);
}

.jf-course-back-button:focus-visible {
  outline: 3px solid rgba(250, 104, 99, 0.28);
  outline-offset: 3px;
}

.jf-course-page-header {
  max-width: 880px;
}

.jf-course-hero-card,
.jf-lessons-section {
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--jf-v2-radius-md);
  background: var(--jf-v2-soft);
  box-shadow: none;
}

.jf-card-header-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.jf-course-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: center;
  padding: 26px;
}

.jf-course-video-panel {
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(250, 104, 99, 0.14), transparent 32%),
    #0c1020;
  box-shadow: 0 22px 60px -38px rgba(18, 19, 44, 0.5);
}

.jf-course-video-panel .iframeyt,
.jf-lesson-detail .iframeyt {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  height: auto;
  border: 0;
}

.jf-course-hero-copy h2 {
  margin: 10px 0 10px;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: -0.055em;
}

.jf-course-hero-copy p:not(.jf-card-kicker) {
  margin: 0;
  color: var(--jf-v2-muted);
}

.jf-lesson-date {
  margin-top: 10px !important;
  font-size: 13px;
  font-weight: 700;
}

.jf-course-hero-actions,
.jf-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.jf-lessons-section {
  padding: 26px;
}

.jf-lesson-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.jf-lesson-module-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.jf-lesson-module {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 26px;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(250, 104, 99, 0.13), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 245, 248, 0.96));
  box-shadow: 0 20px 54px -42px rgba(24, 25, 40, 0.52);
}

.jf-module-toggle {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--jf-v2-ink);
  text-align: left;
  cursor: pointer;
}

.jf-module-toggle:hover,
.jf-module-toggle:focus-visible {
  background: rgba(250, 104, 99, 0.055);
  outline: none;
}

.jf-module-toggle:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(250, 104, 99, 0.24);
}

.jf-module-number {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--jf-v2-ink);
  color: #fffaf8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px -18px rgba(24, 25, 40, 0.74);
}

.jf-module-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.jf-module-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.02;
  font-weight: 820;
  letter-spacing: -0.045em;
  text-transform: capitalize;
}

.jf-module-copy small {
  color: var(--jf-v2-muted);
  font-size: 13px;
  font-weight: 720;
}

.jf-module-chevron {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(24, 25, 40, 0.06);
  color: rgba(24, 25, 40, 0.68);
  transition: transform 180ms ease, background 180ms ease;
}

.jf-module-toggle:not(.collapsed) .jf-module-chevron {
  transform: rotate(180deg);
  background: rgba(250, 104, 99, 0.14);
  color: var(--jf-v2-coral-deep);
}

.jf-module-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 16px;
}

.jf-module-body .jf-lesson-card {
  background: rgba(255, 255, 255, 0.86);
}

.jf-lesson-card {
  overflow: hidden;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.jf-lesson-card--from-search {
  border-color: rgba(250, 104, 99, 0.36) !important;
  box-shadow: 0 0 0 4px rgba(250, 104, 99, 0.12), 0 22px 52px -38px rgba(24, 25, 40, 0.5);
}

.jf-lesson-row {
  padding: 0;
  border: 0;
  background: transparent;
}

.jf-lesson-row .btnmio {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--jf-v2-ink);
  text-decoration: none;
}

.jf-lesson-status {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24, 25, 40, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--jf-v2-muted);
  font-size: 13px;
  font-weight: 800;
}

.jf-lesson-status.is-current {
  border-color: transparent;
  background: var(--jf-v2-coral);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(250, 104, 99, 0.9);
}

.jf-lesson-row-copy {
  min-width: 0;
}

.jf-lesson-row-copy b,
.jf-lesson-row-copy small {
  display: block;
}

.jf-lesson-row-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.jf-lesson-row-copy small {
  margin-top: 3px;
  color: var(--jf-v2-muted);
  font-size: 12px;
}

.jf-lesson-chevron {
  display: grid;
  place-items: center;
  color: var(--jf-v2-muted);
}

.jf-lesson-detail {
  padding: 0 18px 18px;
}

.jf-lesson-detail .iframeyt,
.jf-lesson-detail .jf-video-unavailable {
  overflow: hidden;
  border-radius: 18px;
}

.jf-lesson-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
}

.jf-lesson-detail-footer strong,
.jf-lesson-detail-footer span {
  display: block;
}

.jf-lesson-detail-footer span {
  color: var(--jf-v2-muted);
  font-size: 13px;
}

.jf-video-unavailable strong,
.jf-video-unavailable span {
  display: block;
}

.jf-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jf-ai-pending--muted {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--jf-v2-muted);
  font-size: 13px;
  font-weight: 760;
}

.jf-ai-pending--muted i {
  color: var(--jf-v2-coral);
}

/* Compatibility for not-yet-rebuilt AJAX content inside the v2 center panel. */
.jf-center-content .card {
  border-radius: 20px;
}

.iframeyt {
  width: 100%;
  min-height: 345px;
  border: 0;
  border-radius: 18px;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1320px) {
  .jf-hub-v2-shell {
    grid-template-columns: 260px minmax(0, 1fr) 310px;
    gap: 16px;
    padding: 0 18px;
  }

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

@media (max-width: 1120px) {
  body.jf-v2-body {
    overflow: auto;
  }

  .jf-hub-v2-shell {
    height: auto;
    min-height: calc(100vh - 48px);
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .jf-right-rail {
    grid-column: 2;
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jf-main-panel,
  .jf-left-rail {
    height: auto;
    min-height: calc(100vh - 48px);
  }

  .jf-course-hero-body {
    grid-template-columns: 1fr;
  }

  .jf-cert-grid,
  .jf-combacia-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.jf-v2-body {
    overflow: auto;
  }

  .jf-login-page {
    width: min(100% - 24px, 560px);
    min-height: 100vh;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 18px 0;
  }

  .jf-login-card {
    padding: 26px;
    border-radius: 24px;
  }

  .jf-login-copy {
    margin-top: 36px;
  }

  .jf-login-title {
    font-size: 46px;
  }

  .jf-login-side {
    display: none;
  }

  .jf-mobile-topbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px;
    border-bottom: 1px solid var(--jf-v2-border);
    background: #fff;
    box-shadow: 0 14px 34px -28px rgba(24, 25, 40, 0.4);
  }

  .jf-mobile-topbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 14px;
    border: 1px solid rgba(24, 25, 40, 0.08);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px -24px rgba(24, 25, 40, 0.34);
  }

  .jf-mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .jf-notification-trigger--mobile {
    background: #fff;
  }

  .jf-mobile-logo {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .jf-mobile-logo img {
    width: min(190px, calc(100vw - 150px));
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 14px rgba(24, 25, 40, 0.14));
  }

  .jf-mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid rgba(24, 25, 40, 0.12);
    border-radius: 999px;
    background: var(--jf-v2-soft);
    color: var(--jf-v2-ink);
    text-decoration: none;
    box-shadow: 0 10px 22px -19px rgba(24, 25, 40, 0.42);
  }

  #myLinks {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(24, 25, 40, 0.08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 42px -30px rgba(24, 25, 40, 0.38);
  }

  .jf-mobile-menu-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 13px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--jf-v2-ink);
    text-decoration: none;
    text-align: left;
    font-weight: 700;
  }

  .jf-mobile-menu-link:hover,
  .jf-mobile-menu-link:focus-visible {
    background: var(--jf-v2-soft);
    color: var(--jf-v2-ink);
    text-decoration: none;
    outline: none;
  }

  .jf-mobile-logo:focus-visible,
  .jf-mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(250, 104, 99, 0.34);
    outline-offset: 3px;
  }

  .jf-hub-v2-shell {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 12px;
  }

  .jf-left-rail {
    display: none;
  }

  .jf-right-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    position: static;
    height: auto;
    margin-top: 12px;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .jf-main-panel {
    height: auto;
    min-height: calc(100vh - 104px);
    border-radius: 24px;
  }

  .jf-center-content {
    height: auto;
    min-height: inherit;
    padding: 22px;
  }

  .jf-course-grid {
    grid-template-columns: 1fr;
  }

  .jf-search-result {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .jf-search-result-date {
    grid-column: 2;
    text-align: left;
  }

  .jf-page-skeleton-grid {
    grid-template-columns: 1fr;
  }

  .jf-page-skeleton-card {
    height: 180px;
  }

  .jf-course-list-header,
  .jf-lesson-detail-footer,
  .jf-featured-content {
    display: block;
  }

  .jf-course-search,
  .jf-featured-actions,
  .jf-course-hero-actions,
  .jf-lesson-actions {
    margin-top: 16px;
  }

  .jf-course-search {
    min-width: 0;
  }

  .jf-module-toggle {
    grid-template-columns: 1fr 34px;
    gap: 10px;
  }

  .jf-module-number {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .jf-module-copy strong {
    white-space: normal;
  }

  .jf-combacia-hero {
    grid-template-columns: 1fr;
  }

  .jf-settings-grid {
    grid-template-columns: 1fr;
  }

  .jf-settings-profile-row {
    align-items: flex-start;
  }

  .jf-featured-course,
  .jf-course-card-v2 {
    min-height: 250px;
  }

  .jf-course-card-v2 {
    height: 320px;
    background-size: 100% 152px;
  }

  .jf-notification-panel {
    width: min(390px, calc(100% - 18px));
  }

  .jf-notification-header {
    min-height: 88px;
    padding: 18px 20px;
  }

  .jf-notification-toolbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .jf-notification-item {
    padding: 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jf-notification-panel,
  .jf-notification-backdrop,
  .jf-notification-trigger,
  .jf-notification-icon-button {
    transition: none;
  }
}

@media (max-width: 540px) {
  .jf-page-title {
    font-size: 42px;
  }

  .jf-featured-actions {
    display: grid;
  }

  .jf-pill-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
