/* ============================================================
   layout.css — SPU-LMS 2.0 BOLD
   Navbar dark impatto, sidebar con colori vividi, login cinematica.
   ============================================================ */

/* ─── APP SHELL ─── */
.app-shell {
  display: grid;
  grid-template-rows: 150px 1fr;
  grid-template-columns: 160px 1fr;
  grid-template-areas: "navbar navbar" "sidebar main";
  min-height: 100vh;
}

/* ─── NAVBAR ─── */
.navbar {
  grid-area: navbar;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0;
  z-index: var(--z-navbar);
  position: sticky; top: 0;
  box-shadow: 0 1px 0 rgba(201,168,76,0.3), 0 4px 20px rgba(0,0,0,0.18);
  animation: slideDown 0.35s both;
  overflow: hidden;
}
/* Fascia sinistra: piena al bordo, sfuma verso il centro */
.navbar > .navbar__brand {
  background: linear-gradient(90deg, var(--color-navy-dark) 0%, var(--color-navy) 55%, rgba(30,58,110,0) 100%);
  height: 100%;
  display: flex; align-items: center;
  padding-left: var(--space-6);
  justify-self: stretch;
}
/* Zona centrale bianca con logo colorato */
.navbar__center {
  background: #ffffff;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 40px;
  position: relative; z-index: 2;
}
/* Fascia destra: sfuma dal centro, piena al bordo */
.navbar > .navbar__right {
  background: linear-gradient(270deg, var(--color-navy-dark) 0%, var(--color-navy) 55%, rgba(30,58,110,0) 100%);
  height: 100%;
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-2);
  padding-right: var(--space-6);
  justify-self: stretch;
}

.navbar__brand {
  display: flex; align-items: center; gap: var(--space-1);
  text-decoration: none;
}
.navbar__logo {
  height: 130px; width: auto;
  transition: transform var(--transition-bounce);
}
.navbar__logo:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 16px rgba(201,168,76,0.6));
}
.navbar__title { display: none; }

.navbar__right { display: flex; align-items: center; gap: var(--space-2); }

.navbar__edition {
  font-size: 10px; font-weight: var(--font-weight-black);
  color: var(--color-gold);
  text-transform: uppercase; letter-spacing: var(--letter-spacing-widest);
  background: rgba(201,168,76,0.12);
  padding: 5px 12px; border-radius: var(--radius-full);
  border: 1px solid rgba(201,168,76,0.3);
}

.navbar__user-name {
  font-size: var(--font-size-sm); color: rgba(255,255,255,0.8);
  font-weight: var(--font-weight-medium);
}

.navbar__logout {
  font-size: 11px; font-weight: var(--font-weight-semibold);
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 6px 12px; cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.navbar__logout:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

/* ─── SIDEBAR ─── */
.sidebar {
  grid-area: sidebar;
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  padding: 10px 0;
  overflow-y: auto;
  position: sticky; top: 150px;
  height: calc(100vh - 60px);
  animation: slideInLeft 0.35s 0.05s both;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.sidebar__section { margin-bottom: var(--space-2); }

.sidebar__section-label {
  font-size: 10px; font-weight: var(--font-weight-black);
  text-transform: uppercase; letter-spacing: var(--letter-spacing-widest);
  color: var(--color-text-light);
  padding: 0 var(--space-6); margin-bottom: var(--space-3);
}

.sidebar__nav { display: flex; flex-direction: column; }

.sidebar__link {
  display: flex; align-items: center; gap: var(--space-1);
  padding: 7px 12px;
  font-size: var(--font-size-sm); font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-decoration: none; cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  margin: 1px var(--space-3);
  border-radius: var(--radius-md);
}
.sidebar__link:hover {
  background: var(--color-surface);
  color: var(--color-navy);
  text-decoration: none;
  border-left-color: transparent;
}
.sidebar__link--active {
  background: linear-gradient(90deg, rgba(30,58,110,0.08) 0%, rgba(30,58,110,0.04) 100%);
  color: var(--color-navy);
  border-left-color: var(--color-navy);
  font-weight: var(--font-weight-semibold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-left: 0;
}

.sidebar__link-icon {
  font-size: 16px; width: 20px; text-align: center; flex-shrink: 0;
  transition: transform var(--transition-spring);
}
.sidebar__link:hover .sidebar__link-icon,
.sidebar__link--active .sidebar__link-icon {
  transform: scale(1.2);
}
.sidebar__link--active .sidebar__link-icon { color: var(--color-navy); }

/* ─── MAIN ─── */
.main-content {
  grid-area: main;
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  background: var(--color-bg);
  animation: fadeIn 0.4s 0.1s both;
}
/* Faculty dashboard ha il proprio wrapper con padding interno */
.main-content[style*="padding:0"] { padding: 0 !important; }

.page-header {
  margin-bottom: var(--space-2);
  animation: fadeIn 0.4s 0.15s both;
}
.page-header__title {
  font-size: var(--font-size-2xl); font-weight: var(--font-weight-black);
  color: var(--color-navy-dark); letter-spacing: var(--letter-spacing-tight);
}
.page-header__subtitle {
  font-size: var(--font-size-sm); color: var(--color-text-muted); margin-top: 4px;
}

/* ─── GRID ─── */
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-1); }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-1); }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-1); }
.grid-cols-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-1); }

/* Stagger children */
.grid-cols-2 > *:nth-child(1), .grid-cols-3 > *:nth-child(1), .grid-cols-4 > *:nth-child(1) { animation: fadeIn 0.4s 0.1s both; }
.grid-cols-2 > *:nth-child(2), .grid-cols-3 > *:nth-child(2), .grid-cols-4 > *:nth-child(2) { animation: fadeIn 0.4s 0.16s both; }
.grid-cols-2 > *:nth-child(3), .grid-cols-3 > *:nth-child(3), .grid-cols-4 > *:nth-child(3) { animation: fadeIn 0.4s 0.22s both; }
.grid-cols-4 > *:nth-child(4) { animation: fadeIn 0.4s 0.28s both; }

/* ─── LOGIN ─── */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 460px;
}

.login-left {
  background: var(--color-navy-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--space-16);
  position: relative; overflow: hidden;
}

/* Pattern geometrico sfondo */
.login-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Cerchio grande gold */
.login-left::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border: 1px solid rgba(201,168,76,0.08);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* NO borderPulse loop */
}

.login-left__content {
  position: relative; z-index: 1;
  text-align: center;
  animation: fadeIn 0.8s both;
}

.login-left__logo {
  width: 260px; height: auto;
  margin: 0 auto var(--space-10);
  animation: fadeIn 0.8s both;
  filter: drop-shadow(0 16px 40px rgba(201,168,76,0.5));
}

.login-left__tagline {
  font-size: var(--font-size-lg); font-weight: var(--font-weight-light);
  color: rgba(255,255,255,0.65);
  line-height: var(--line-height-loose);
  max-width: 360px; font-style: italic;
  animation: fadeIn 0.8s 0.3s both;
}

.login-left__edition {
  margin-top: var(--space-8);
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 10px; font-weight: var(--font-weight-black);
  color: var(--color-gold);
  text-transform: uppercase; letter-spacing: var(--letter-spacing-widest);
  background: rgba(201,168,76,0.08);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  border: 1px solid rgba(201,168,76,0.2);
  animation: fadeIn 0.8s 0.5s both;
}

.login-left__colors {
  display: flex; gap: var(--space-1); justify-content: center;
  margin-top: var(--space-6);
  animation: fadeIn 0.8s 0.7s both;
}

.login-left__color-dot {
  width: 10px; height: 10px; border-radius: 50%;
  animation: fadeIn 0.8s both;
}

.login-right {
  background: var(--color-white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--space-12) var(--space-10);
  box-shadow: -12px 0 48px rgba(0,0,0,0.15);
  animation: slideInRight 0.5s 0.15s both;
  position: relative;
}

/* Linea oro verticale sinistra del form */
.login-right::before {
  content: '';
  position: absolute; top: 20%; left: 0; bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--color-gold), transparent);
}

.login-form-wrap { width: 100%; max-width: 340px; }

.login-form-wrap__heading {
  font-size: var(--font-size-2xl); font-weight: var(--font-weight-black);
  color: var(--color-navy-dark); margin-bottom: var(--space-2);
  letter-spacing: var(--letter-spacing-tight);
}
.login-form-wrap__sub {
  font-size: var(--font-size-sm); color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.login-form { display: flex; flex-direction: column; gap: var(--space-1); }

.login-footer {
  margin-top: auto; padding-top: var(--space-8);
  text-align: center; font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 140px 1fr; }
  .main-content { padding: var(--space-2); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 60px 1fr; grid-template-areas: "navbar" "main"; }
  .sidebar { display: none; position: fixed; top: 60px; left: 0; bottom: 0; width: 260px; z-index: var(--z-dropdown); box-shadow: var(--shadow-xl); }
  .sidebar--open { display: block; }
  .main-content { padding: var(--space-2); }
  .login-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-left { padding: var(--space-2) var(--space-6); min-height: 200px; }
  .login-left__logo { width: 140px; margin-bottom: var(--space-2); }
  .login-left__tagline { display: none; }
  .login-right { padding: var(--space-2) var(--space-5); justify-content: flex-start; }
  .grid-cols-2,.grid-cols-3,.grid-cols-4 { grid-template-columns: 1fr; }
  .toast-container { bottom: var(--space-4); right: var(--space-4); left: var(--space-4); max-width: 100%; width: auto; }
}


/* ═══════════════════════════════════════════════════
   MOBILE NAVIGATION v2.0 — SPU-LMS nuovo layout
   Layout: navbar logo+ham | hero con avatar | griglia 2×2 settimane colorate
   ═══════════════════════════════════════════════════ */

/* ── Animazioni ── */
@keyframes spu-fadeUp   { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes spu-scaleIn  { from { opacity:0; transform:scale(0.93); } to { opacity:1; transform:scale(1); } }
@keyframes spu-slideDown{ from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@keyframes spu-pulse    { 0%,100%{ box-shadow:0 0 0 0 rgba(30,58,110,0.4); } 60%{ box-shadow:0 0 0 7px rgba(30,58,110,0); } }
@keyframes spu-dot-blink{ 0%,100%{ opacity:1; } 50%{ opacity:0.3; } }

/* ── HAMBURGER BUTTON (navbar desktop e mobile) ── */
#btn-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s;
}
#btn-hamburger:active { background: rgba(255,255,255,0.2); }
#btn-hamburger span {
  display: block;
  width: 16px;
  height: 1.8px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: all 0.25s;
  transform-origin: center;
}

/* ── BOTTOM NAV BAR ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: var(--z-navbar);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.09);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav__inner {
  display: flex;
  align-items: stretch;
  height: 62px;
}

/* Tab standard */
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.bottom-nav__item:active { background: var(--color-surface); }

/* Indicatore attivo — linea in cima */
.bottom-nav__item--active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2.5px;
  background: var(--color-navy);
  border-radius: 0 0 3px 3px;
}

.bottom-nav__icon {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--color-text-light);
  transition: color 0.15s, transform 0.2s;
}
.bottom-nav__item--active .bottom-nav__icon {
  color: var(--color-navy);
  transform: scale(1.12);
}

.bottom-nav__label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  transition: color 0.15s;
}
.bottom-nav__item--active .bottom-nav__label { color: var(--color-navy); }

/* Badge contatore */
.bottom-nav__badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 17px);
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-size: 7px;
  font-weight: 900;
  min-width: 13px;
  height: 13px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

/* ── TAB LPP CENTRALE — raised bubble ── */
.bottom-nav__item--lpp {
  flex: 0 0 64px;
  position: relative;
  top: -10px;
}
.bottom-nav__item--lpp .bottom-nav__lpp-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(30,58,110,0.40);
  margin-bottom: 2px;
  transition: transform 0.2s;
}
.bottom-nav__item--lpp:active .bottom-nav__lpp-bubble { transform: scale(0.92); }
.bottom-nav__item--lpp .bottom-nav__icon { color: var(--color-gold); font-size: 1.25rem; }
.bottom-nav__item--lpp .bottom-nav__label { color: var(--color-navy); font-weight: 800; }
.bottom-nav__item--lpp.bottom-nav__item--active .bottom-nav__lpp-bubble { background: var(--color-gold); }
.bottom-nav__item--lpp.bottom-nav__item--active .bottom-nav__icon { color: var(--color-navy-dark); }

/* ── WEEK CARDS — 4 colori tematici ── */
.week-card-colored {
  border-radius: 16px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  transition: transform 0.18s, opacity 0.18s;
}
.week-card-colored:active { transform: scale(0.96); }
.week-card-colored::after {
  content: '';
  position: absolute;
  right: -16px; bottom: -16px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

/* W1 — verde mediterraneo */
.week-card-colored--w1 { background: linear-gradient(135deg, #1a6e4e 0%, #0f4a33 100%); }
/* W2 — blu navy (live) */
.week-card-colored--w2 { background: linear-gradient(135deg, #1e3a6e 0%, #0f2044 100%); box-shadow: 0 4px 20px rgba(30,58,110,0.35); }
/* W3 — viola geopolitica */
.week-card-colored--w3 { background: linear-gradient(135deg, #5b2d8e 0%, #3d1d6e 100%); opacity: 0.72; }
/* W4 — oro ONU */
.week-card-colored--w4 { background: linear-gradient(135deg, #7a5c1e 0%, #5a400d 100%); opacity: 0.72; }

.week-card-colored__num {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 5px;
}
.week-card-colored__title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
  position: relative; z-index: 1;
}
.week-card-colored__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 7px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative; z-index: 1;
}
.week-badge--done  { background: rgba(255,255,255,0.18); color: #fff; }
.week-badge--live  { background: rgba(255,255,255,0.95); color: #1e3a6e; animation: spu-pulse 2s infinite; }
.week-badge--soon  { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.65); }
.week-badge__dot   { width: 5px; height: 5px; border-radius: 50%; background: #e74c3c; animation: spu-dot-blink 1.2s infinite; flex-shrink: 0; }

/* Griglia 2×2 per le settimane su mobile */
.weeks-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* ── PAGE HEADER — pagine interne ── */
.page-header-inner {
  background: var(--color-navy-dark);
  padding: 20px 16px 14px;
  animation: spu-slideDown 0.3s both;
}
.page-header-inner__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.page-header-inner__left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.page-header-inner__back {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}
.page-header-inner__title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.page-header-inner__sub {
  font-size: 9px;
  color: rgba(255,255,255,0.38);
  margin-top: 2px;
}
.page-header-inner__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex-shrink: 0;
}
.page-header-inner__logo {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
}
.page-header-inner__logo-text { line-height: 1.25; text-align: right; }
.page-header-inner__logo-name {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.01em;
}
.page-header-inner__logo-sub {
  font-size: 8px;
  font-weight: 600;
  color: rgba(201,168,76,0.82);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-header-inner__ham {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; cursor: pointer;
  transition: background 0.15s;
}
.page-header-inner__ham:active { background: rgba(255,255,255,0.2); }
.page-header-inner__ham span {
  display: block;
  width: 16px; height: 1.8px;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
}

/* Tab filtro nelle pagine interne */
.page-tabs {
  display: flex;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.page-tab {
  flex: 1;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  padding: 5px 0;
  border-radius: 8px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  transition: all 0.2s;
  background: none;
  border: none;
}
.page-tab--active { background: rgba(255,255,255,0.13); color: #fff; }

/* ── HERO CARD (dashboard) ── */
.hero-card-mobile {
  margin: 12px 12px 0;
  background: linear-gradient(135deg, #1e3a6e 0%, #0f2044 100%);
  border-radius: 20px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  animation: spu-scaleIn 0.4s 0.05s both;
}
.hero-card-mobile::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: rgba(201,168,76,0.07);
  border-radius: 50%;
}
.hero-card-mobile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; z-index: 1;
}
.hero-card-mobile__info { flex: 1; min-width: 0; }
.hero-card-mobile__greeting {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.hero-card-mobile__name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-top: 1px;
}
.hero-card-mobile__sub {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.hero-card-mobile__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8e44ad, #6c3483);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  border: 2.5px solid rgba(255,255,255,0.25);
  flex-shrink: 0; margin-left: 12px;
  cursor: pointer;
  animation: spu-pulse 2.5s 1s infinite;
  text-transform: uppercase;
}
.hero-card-mobile__stats {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  position: relative; z-index: 1;
}
.hero-card-mobile__stat {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.hero-card-mobile__stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
}
.hero-card-mobile__stat-label {
  font-size: 8px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}

/* ── STAGGER ANIMATIONS per sezioni ── */
.spu-anim-1 { animation: spu-fadeUp 0.35s 0.08s both; }
.spu-anim-2 { animation: spu-fadeUp 0.35s 0.14s both; }
.spu-anim-3 { animation: spu-fadeUp 0.35s 0.20s both; }
.spu-anim-4 { animation: spu-fadeUp 0.35s 0.26s both; }
.spu-anim-5 { animation: spu-fadeUp 0.35s 0.32s both; }

/* ── RESPONSIVE @media mobile ── */
@media (max-width: 768px) {
  /* Layout senza sidebar */
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 56px 1fr;
    grid-template-areas: "navbar" "main";
  }
  .sidebar { display: none !important; }

  /* Padding bottom per bottom-nav */
  .main-content {
    padding: 8px 10px calc(68px + env(safe-area-inset-bottom, 0px)) 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Griglia 1 colonna → settimane usano weeks-grid-2x2 separata */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 { grid-template-columns: 1fr; }

  /* Mostra bottom-nav e hamburger */
  .bottom-nav  { display: block; }
  #btn-hamburger { display: flex !important; }

  /* Navbar mobile: logo sx, hamburger dx */
  .navbar__edition   { display: none !important; }
  .navbar__user-name { display: none !important; }
  .navbar .avatar    { display: none !important; }
  .navbar__logout    { display: none !important; }
  .navbar__brand     { display: flex !important; }
  .navbar__logo      { height: 56px; }
  .navbar__title     { font-size: 10px; line-height: 1.2; max-width: 160px; }
  .navbar__right     { display: flex; align-items: center; gap: 6px; margin-left: auto; }

  /* Toast sopra bottom-nav */
  .toast-container {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    right: 12px; left: 12px;
    max-width: 100%; width: auto;
  }
  .page-header { margin-bottom: 6px; }
  .page-header__title { font-size: 1.4rem; }
}

@media (max-width: 380px) {
  .main-content { padding: 6px 8px calc(68px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav__inner { height: 56px; }
  .bottom-nav__label { font-size: 7.5px; }
}


/* ═══════════════════════════════════════════════════
   DESKTOP LAYOUT v2.0 — navbar pulita, sidebar compatta
   ═══════════════════════════════════════════════════ */

/* Navbar — no edition pill, solo logo + search + user */
.navbar__edition { display: none !important; }

/* Sidebar link — più compatta */
.sidebar__link-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

/* ── STAT CARDS — orizzontali compatte ── */
.stat-card-h {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-card-h__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card-h__body { flex: 1; min-width: 0; }
.stat-card-h__val {
  font-size: 18px; font-weight: 800;
  color: var(--color-navy-dark);
  letter-spacing: -0.02em; line-height: 1;
}
.stat-card-h__label {
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--color-text-light); margin-top: 3px;
}
.stat-card-h__delta {
  font-size: 9px; font-weight: 600;
  margin-top: 4px; display: inline-flex;
  align-items: center; gap: 2px;
  padding: 1px 6px; border-radius: 99px;
}
.delta-up { background: var(--color-success-bg); color: var(--color-success); }
.delta-neutral { background: rgba(30,58,110,0.08); color: var(--color-navy); }

/* ── COURSE PROGRESS ── */
.course-progress {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 10px 16px;
}
.course-progress__top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 8px;
}
.course-progress__label {
  font-size: 11.5px; font-weight: 700; color: var(--color-navy-dark);
}
.course-progress__meta {
  font-size: 10px; color: var(--color-text-light);
}
.course-progress__days {
  font-size: 9.5px; font-weight: 700;
  color: var(--color-navy);
  background: rgba(30,58,110,0.08);
  padding: 2px 8px; border-radius: 99px;
}
.course-progress__track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin-bottom: 6px;
}
.course-progress__seg {
  height: 6px; border-radius: 3px;
  background: var(--color-border-light);
  overflow: hidden; position: relative;
}
.course-progress__fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  border-radius: 3px;
}
.course-progress__labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.course-progress__week-lbl {
  display: flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 600;
  color: var(--color-text-light);
}
.course-progress__week-lbl--done  { color: var(--color-success); }
.course-progress__week-lbl--live  { color: var(--color-navy); font-weight: 700; }
.cp-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}

/* ── WEEK PROGRAMME BLOCKS — istituzionale ── */
.week-programme-block {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 12px;
}
.week-programme-block:last-child { margin-bottom: 0; }

/* Accent laterale colore settimana */
.wpb--w1 { border-left: 3px solid var(--color-success); }
.wpb--w2 { border-left: 3px solid var(--color-navy); }
.wpb--w3 { border-left: 3px solid var(--color-purple); }
.wpb--w4 { border-left: 3px solid var(--color-warning); }

.wpb__header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-white);
}
.wpb__header-left { display: flex; align-items: center; gap: 12px; }
.wpb__num {
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--color-text-light); white-space: nowrap;
}
.wpb__sep { width: 1px; height: 14px; background: var(--color-border); }
.wpb__title {
  font-size: 13px; font-weight: 700;
  color: var(--color-navy-dark); letter-spacing: -0.01em;
}
.wpb__status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.07em;
  white-space: nowrap;
}
.wpb__status--done { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(46,204,113,0.3); }
.wpb__status--live { background: var(--color-navy-dark); color: #fff; }
.wpb__status--soon { background: var(--color-surface); color: var(--color-text-light); border: 1px solid var(--color-border); }

/* Day header */
.wpb__day {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 18px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  border-top: 1px solid var(--color-border-light);
}
.wpb__day-name {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #374151; white-space: nowrap;
}
.wpb__day-date {
  font-size: 10px; color: var(--color-text-light); font-weight: 500;
}
.wpb__day-line { flex: 1; height: 1px; background: var(--color-border); }

/* Session row */
.wpb__sess {
  display: grid;
  grid-template-columns: 52px 1fr 170px 90px;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--color-bg);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.wpb__sess:last-child { border-bottom: none; }
.wpb__sess:hover { background: var(--color-surface); }

.wpb__time {
  font-size: 11px; font-weight: 700;
  color: var(--color-navy-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wpb__main { min-width: 0; }
.wpb__sess-title {
  font-size: 12px; font-weight: 600;
  color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wpb__sess-sub {
  font-size: 10px; color: var(--color-text-light); margin-top: 2px;
}
.wpb__fac { min-width: 0; }
.wpb__fac-name {
  font-size: 11px; font-weight: 600; color: #374151;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wpb__fac-uni {
  font-size: 9.5px; color: var(--color-text-light); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Session type badge */
.wpb__badge {
  font-size: 9px; font-weight: 700;
  padding: 4px 0; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-align: center; width: 90px; flex-shrink: 0;
  border: 1px solid transparent;
}
.wpb__badge--lecture   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.wpb__badge--lab       { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.wpb__badge--talk      { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.wpb__badge--cerimonia { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.wpb__badge--forum     { background: #fefce8; color: #a16207; border-color: #fef08a; }
.wpb__badge--online    { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.wpb__badge--soon      { background: var(--color-surface); color: var(--color-text-light); border-color: var(--color-border); }

.wpb__soon-msg {
  padding: 14px 18px;
  font-size: 11px; color: var(--color-text-light);
  font-style: italic;
}

/* Live dot */
.live-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ef4444; display: inline-block;
  animation: spu-dot-blink 1.2s infinite;
}
