/* ================================================================
   CUSTOM + MODIFICHE DASHBOARD v3
   Foglio di stile consolidato e riordinato.
   In caso di sovrapposizione prevalgono le dichiarazioni v3.
   ================================================================ */

/* ================================================================
   1. VARIABILI
   ================================================================ */
:root {
  --primary: hsla(179, 100%, 19%, 1);
  --primary-5: hsla(179, 100%, 19%, .05);
  --primary-10: hsla(179, 100%, 19%, .1);
  --primary-20: hsla(179, 100%, 19%, .2);
  --primary-30: hsla(179, 100%, 19%, .3);
  --primary-40: hsla(179, 100%, 19%, .4);
  --primary-50: hsla(179, 100%, 19%, .5);
  --primary-60: hsla(179, 100%, 19%, .6);
  --primary-70: hsla(179, 100%, 19%, .7);
  --primary-80: hsla(179, 100%, 19%, .8);
  --primary-90: hsla(179, 100%, 19%, .9);
  --primary-d-1: hsl(179, 100%, 16%);
  --primary-d-2: hsl(179, 100%, 13%);
  --primary-d-3: hsl(179, 100%, 9%);
  --primary-d-4: hsl(179, 100%, 6%);
  --primary-d-5: hsl(179, 100%, 3%);
  --primary-l-1: hsl(179, 92%, 33%);
  --primary-l-2: hsl(179, 84%, 47%);
  --primary-l-3: hsl(179, 76%, 61%);
  --primary-l-4: hsl(179, 68%, 75%);
  --primary-l-5: hsl(179, 60%, 89%);

  --secondary: hsla(180, 100%, 25%, 1);
  --secondary-5: hsla(180, 100%, 25%, .05);
  --secondary-10: hsla(180, 100%, 25%, .1);
  --secondary-20: hsla(180, 100%, 25%, .2);
  --secondary-30: hsla(180, 100%, 25%, .3);
  --secondary-40: hsla(180, 100%, 25%, .4);
  --secondary-50: hsla(180, 100%, 25%, .5);
  --secondary-60: hsla(180, 100%, 25%, .6);
  --secondary-70: hsla(180, 100%, 25%, .7);
  --secondary-80: hsla(180, 100%, 25%, .8);
  --secondary-90: hsla(180, 100%, 25%, .9);
  --secondary-d-1: hsl(180, 100%, 21%);
  --secondary-d-2: hsl(180, 100%, 16%);
  --secondary-d-3: hsl(180, 100%, 12%);
  --secondary-d-4: hsl(180, 100%, 8%);
  --secondary-d-5: hsl(180, 100%, 4%);
  --secondary-l-1: hsl(180, 92%, 38%);
  --secondary-l-2: hsl(180, 84%, 51%);
  --secondary-l-3: hsl(180, 76%, 64%);
  --secondary-l-4: hsl(180, 68%, 76%);
  --secondary-l-5: hsl(180, 60%, 89%);

  --tertiary: hsla(11, 88%, 64%, 1);
  --tertiary-5: hsla(11, 88%, 64%, .05);
  --tertiary-10: hsla(11, 88%, 64%, .1);
  --tertiary-20: hsla(11, 88%, 64%, .2);
  --tertiary-30: hsla(11, 88%, 64%, .3);
  --tertiary-40: hsla(11, 88%, 64%, .4);
  --tertiary-50: hsla(11, 88%, 64%, .5);
  --tertiary-60: hsla(11, 88%, 64%, .6);
  --tertiary-70: hsla(11, 88%, 64%, .7);
  --tertiary-80: hsla(11, 88%, 64%, .8);
  --tertiary-90: hsla(11, 88%, 64%, .9);
  --tertiary-d-1: hsl(11, 88%, 53%);
  --tertiary-d-2: hsl(11, 88%, 42%);
  --tertiary-d-3: hsl(11, 88%, 31%);
  --tertiary-d-4: hsl(11, 88%, 20%);
  --tertiary-d-5: hsl(11, 88%, 10%);
  --tertiary-l-1: hsl(11, 82%, 70%);
  --tertiary-l-2: hsl(11, 77%, 76%);
  --tertiary-l-3: hsl(11, 71%, 82%);
  --tertiary-l-4: hsl(11, 66%, 88%);
  --tertiary-l-5: hsl(11, 60%, 93%);

  --accent: hsla(40, 98%, 70%, 1);
  --accent-5: hsla(40, 98%, 70%, .05);
  --accent-10: hsla(40, 98%, 70%, .1);
  --accent-20: hsla(40, 98%, 70%, .2);
  --accent-30: hsla(40, 98%, 70%, .3);
  --accent-40: hsla(40, 98%, 70%, .4);
  --accent-50: hsla(40, 98%, 70%, .5);
  --accent-60: hsla(40, 98%, 70%, .6);
  --accent-70: hsla(40, 98%, 70%, .7);
  --accent-80: hsla(40, 98%, 70%, .8);
  --accent-90: hsla(40, 98%, 70%, .9);
  --accent-d-1: hsl(40, 98%, 58%);
  --accent-d-2: hsl(40, 98%, 46%);
  --accent-d-3: hsl(40, 98%, 34%);
  --accent-d-4: hsl(40, 98%, 22%);
  --accent-d-5: hsl(40, 98%, 10%);
  --accent-l-1: hsl(40, 90%, 75%);
  --accent-l-2: hsl(40, 83%, 80%);
  --accent-l-3: hsl(40, 75%, 84%);
  --accent-l-4: hsl(40, 68%, 89%);
  --accent-l-5: hsl(40, 60%, 94%);

  --light: hsl(0, 0%, 100%);
  --light-5: hsla(0, 0%, 100%, .05);
  --light-10: hsla(0, 0%, 100%, .1);
  --light-20: hsla(0, 0%, 100%, .2);
  --light-30: hsla(0, 0%, 100%, .3);
  --light-40: hsla(0, 0%, 100%, .4);
  --light-50: hsla(0, 0%, 100%, .5);
  --light-60: hsla(0, 0%, 100%, .6);
  --light-70: hsla(0, 0%, 100%, .7);
  --light-80: hsla(0, 0%, 100%, .8);
  --light-90: hsla(0, 0%, 100%, .9);
  --dark: hsla(0, 0%, 0%, 1);
  --dark-5: hsla(0, 0%, 0%, .05);
  --dark-10: hsla(0, 0%, 0%, .1);
  --dark-20: hsla(0, 0%, 0%, .2);
  --dark-30: hsla(0, 0%, 0%, .3);
  --dark-40: hsla(0, 0%, 0%, .4);
  --dark-50: hsla(0, 0%, 0%, .5);
  --dark-60: hsla(0, 0%, 0%, .6);
  --dark-70: hsla(0, 0%, 0%, .7);
  --dark-80: hsla(0, 0%, 0%, .8);
  --dark-90: hsla(0, 0%, 0%, .9);
  --success: hsl(136, 95%, 56%);
  --success-5: hsla(136, 95%, 56%, .05);
  --success-10: hsla(136, 95%, 56%, .1);
  --success-20: hsla(136, 95%, 56%, .2);
  --success-30: hsla(136, 95%, 56%, .3);
  --success-40: hsla(136, 95%, 56%, .4);
  --success-50: hsla(136, 95%, 56%, .5);
  --success-60: hsla(136, 95%, 56%, .6);
  --success-70: hsla(136, 95%, 56%, .7);
  --success-80: hsla(136, 95%, 56%, .8);
  --success-90: hsla(136, 95%, 56%, .9);
  --error: hsl(351, 95%, 56%);
  --error-5: hsla(351, 95%, 56%, .05);
  --error-10: hsla(351, 95%, 56%, .1);
  --error-20: hsla(351, 95%, 56%, .2);
  --error-30: hsla(351, 95%, 56%, .3);
  --error-40: hsla(351, 95%, 56%, .4);
  --error-50: hsla(351, 95%, 56%, .5);
  --error-60: hsla(351, 95%, 56%, .6);
  --error-70: hsla(351, 95%, 56%, .7);
  --error-80: hsla(351, 95%, 56%, .8);
  --error-90: hsla(351, 95%, 56%, .9);

  --bg-body: hsl(0, 0%, 100%);
  --bg-surface: hsl(0, 0%, 100%);
  --text-body: hsl(185, 20%, 26%);
  --text-title: hsl(179, 100%, 19%);
  --border-primary: hsla(180, 30%, 40%, .18);
  --shadow-primary: hsla(180, 60%, 15%, .12);
  --navy: #1f4e8c;
  --text-xs: clamp(.73rem, calc(-.01vw + .73rem), .72rem);
  --text-s: clamp(.87rem, calc(.04vw + .86rem), .9rem);
  --text-m: clamp(1.05rem, calc(.12vw + 1.02rem), 1.13rem);
  --text-l: clamp(1.26rem, calc(.22vw + 1.21rem), 1.41rem);
  --text-xl: clamp(1.51rem, calc(.37vw + 1.43rem), 1.76rem);
  --text-2xl: clamp(1.81rem, calc(.58vw + 1.69rem), 2.2rem);
  --text-3xl: clamp(2.17rem, calc(.85vw + 2rem), 2.75rem);
  --text-4xl: clamp(2.6rem, calc(1.23vw + 2.36rem), 3.43rem);
  --hero-title-size: var(--text-4xl);
  --post-title-size: var(--text-2xl);
  --pc-text-dark: #023334;
  --pc-title-green: hsl(180, 100%, 18%);
  --pc-radius: 24px;
  --pc-pad: 2.3rem;
  --pc-pad-left: 4.7rem;
  --pc-pad-left-wide: 6.5rem;
  --pc-content-h: 13.5rem;
  --grey-card: rgb(242, 242, 242);
  --upcoming-red: #e30613;
}

/* ================================================================
   2. BASE, LAYOUT E NAVIGAZIONE
   ================================================================ */
h1, h2, h3, h4, h5, h6 { font-family: 'Nunito Sans', sans-serif; color: var(--primary); }
a, body, span, text { font-family: 'Nunito', sans-serif; }
a { color: var(--secondary); transition: all .2s ease-in-out;}
a:hover { color: var(--secondary-l-1);  }
hr { border-top: 1px solid var(--secondary-20); }

body, .app-container { background-color: #fff !important; }
.app-container { overflow: hidden; position: relative; isolation: isolate; }
.app-content, .app-content .content-wrapper { background: transparent !important; }
.app-content .page-description { padding: 10px 0 40px; margin-bottom: 0; }
.page-description { position: relative; border-bottom: 0 !important; }
.page-description h3 { color: var(--pc-text-dark) !important; font-weight: 800; letter-spacing: -.01em; }
.page-description::after { content: ""; display: block; width: 56px; height: 6px; margin-top: 14px; border-radius: 3px; background: var(--tertiary); }
.page-description.page-description-tabbed::after {display:none}
.page-description.page-description-tabbed .nav-link {color:var(--secondary); transition: all .2s ease-in-out;}
.page-description.page-description-tabbed .nav-link.active {color:var(--primary);}
.page-description.page-description-tabbed .nav-link:hover {color:var(--secondary-l-1);}
.prenotazione-page-description::after {display:none}
#writing-assistance-page .page-description::after {display:none}

.page-description .page-description-content {  display: flex;  flex-direction: column;  align-items: flex-start;  gap: 14px;}
.page-description .page-description-content h3 { margin: 0; }
.credits-pills {  display: flex;  flex-wrap: wrap;  align-items: center;  gap: 8px;}
/* Mese / settimana / giorno: pillola grigia, numero verde */
.credits-pill {  display: inline-flex;  align-items: center;  gap: 5px;  padding: .4rem .9rem;  border-radius: 999px;
  border: 1px solid rgb(210, 210, 210);  background: rgb(242, 242, 242);  color: var(--pc-text-dark, #023334);
  font-size: .9rem;  line-height: 1.2;
}
.credits-pill strong { color: var(--secondary); font-weight: 800; }
/* Crediti disponibili: pillola verde, numero arancione */
.credits-pill--main {
  gap: 6px;  padding: .45rem 1rem;  border-color: var(--secondary);  background: var(--secondary);
  color: #fff;  font-weight: 700;
}
.credits-pill--main strong { color: var(--accent); font-size: 1rem; }
.credits-pills .btn-group a:first-child {margin-right:2px; }

.page-description .credits-details > div > span strong { color: var(--secondary); font-weight: 800; }



.pace .pace-progress {background: var(--secondary); height:3px; }

.app-container::before {
    content: "";  position: fixed;   z-index: -1;
    pointer-events: none;  border-radius: 50%;  width: 450px;
    height: 450px;  max-width: none;  max-height: none;  top: -270px;
    right: -145px;  background: var(--accent);
}
.app-container::after { content: none; display: none; }
.app-sidebar::before, .app-sidebar::after { content: none !important; display: none !important; }

#BritishLogo { max-width: 20vw; height: 100%; }
.logo-text { color: var(--primary) !important;}
.app-sidebar { border-right: 1px solid var(--secondary-10); }
.app-sidebar .logo.logo-sm a {
  font-family: 'Nunito', sans-serif !important;  font-weight: 600 !important; color: var(--secondary) !important;
  letter-spacing: 0;}
.app-sidebar .logo.logo-sm a span {
  color: var(--primary) !important;  font-weight: 600 !important;}

.app-menu > ul > li > a { color: var(--text-body) !important; border-radius: 10px; }
.app-menu > ul > li > a > i { margin-left: -8px; color: var(--secondary) !important; }
.app-menu > ul > li ul li a { font-size: var(--text-m); }

.app-menu > ul > li > a:hover { color: var(--primary) !important; background: var(--secondary-10) !important; }
.app-menu > ul > li.active-page > a, .app-menu > ul > li > a.active { color: #fff !important; background: var(--secondary) !important; }
.app-menu > ul > li.active-page > a > i { color: #fff !important; }
/* ========== Stefano
.app-menu > ul > li.sidebar-title { color: var(--tertiary) !important; font-weight: 700; letter-spacing: .12em; }
   ================================================================ */

/* Titoli di sezione (LEARNING AREA, MY AREA, UTILITY AREA) in mini-box arancio, testo verde scuro */
.app-sidebar .app-menu .accordion-menu li.sidebar-title {
    display: block;
    width: fit-content;
    margin: 24px 0 6px 30px;
    padding: 4px 10px;
    background: rgb(255, 204, 102);
    color: #023334 !important;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.app-sidebar .app-menu .accordion-menu li.menu-group-title {
  margin: 3px 15px 0;
  padding: 10px 10px 4px 20px;
  cursor: default;
  pointer-events: none;
}
.app-sidebar .app-menu .accordion-menu li.menu-group-title .menu-group-label {
  white-space: nowrap;
  font-size: 14.87px;
  line-height: 20px;
  font-weight: 600;
  color: inherit;
}
.app-sidebar .app-menu .accordion-menu li.menu-group-title .menu-group-label {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 14.87px;
  line-height: 20px;
  font-weight: 600;
  color: inherit;
}

/* Sottovoci: rientrate, leggermente più piccole, cliccabili */
.app-sidebar .app-menu .accordion-menu li.menu-sub > a {
    margin: 1px 15px 1px 15px;
    padding: 7px 12px 7px 44px;
    font-size: 13.5px;
    line-height: 20px;
}
.app-sidebar .app-menu .accordion-menu li.menu-sub > a .material-icons {
    font-size: 20px;
    line-height: 20px;
    margin-right: 10px;
}
/* spazio prima di My Course© PRO */
.app-sidebar .app-menu .accordion-menu li.menu-sub + li:not(.menu-sub) {
    margin-top: 4px;
}
.stat-card .card-footer{
  background: var(--accent) !important;
  border: 0 !important;
}
.stat-card .card-header{
  background: var(--accent) !important;
  border: 0 !important;
}
.bg-accent { background-color: var(--accent) !important; }
/* ================================================================
   3. HEADER E MENU
   ================================================================ */
.app-header a * { transition: all .2s ease-in-out; }
.app-header::before { display: none !important; }
.app-header .navbar { background: transparent !important; box-shadow: none !important; transition: background-color .2s, box-shadow .2s; }
.app-header.scrolled .navbar { background: #fff !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .08) !important; }
.app-header .nav-link i { color: var(--secondary) !important; }
.app-header .nav-link:hover i { color: var(--primary) !important; }
.app-header .indicatore-notifica { transform: translate(-100%, -50%) !important; }
.app-header .notifications-dropdown { width: 300px; max-width: 350px; }
.app-header #profileDropDown, .app-header #profileDropDown span, .app-header #profileDropDown i { color: var(--pc-title-green) !important; }
.app-header #profileDropDown span { font-family: 'Nunito Sans', sans-serif !important; font-size: 1.1rem; font-weight: 800 !important; }
.navbar .dropdown-menu-end { right: -10px; }
.dropdown-menu { border: 0; border-radius: 12px; box-shadow: 0 10px 30px var(--shadow-primary); }
.dropdown-item:hover { color: var(--primary); background: var(--secondary-10); }

/* ================================================================
   4. COMPONENTI GENERALI
   ================================================================ */
.card { border: 0 !important; border-radius: 14px !important; overflow: hidden; box-shadow: 0 6px 22px var(--shadow-primary) !important; }
.card-mylab, .card-tools{ box-shadow: 0 6px 22px var(--primary) !important;}
.card .card-header, .card .card-title { color: var(--primary); }
.btn-primary { color: var(--primary) !important; font-weight: 700; border-color: var(--accent) !important; border-radius: 10px !important; background: var(--accent) !important; }
.btn-primary:hover, .btn-primary:focus { border-color: var(--accent-d-1) !important; background: var(--accent-d-1) !important; }
.btn-secondary { color: #fff !important; border-color: var(--secondary) !important; background: var(--secondary) !important; }
.btn-secondary:hover { border-color: var(--primary) !important; background: var(--primary) !important; }
.btn-outline-secondary { color: var(--secondary) !important; border-color: var(--secondary) !important; }
.btn-outline-secondary:hover { color: #fff !important; background: var(--secondary) !important; }
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { color: #fff !important; background: var(--primary) !important; }
.form-control:focus { border-color: var(--secondary) !important; box-shadow: 0 0 0 3px var(--secondary-20) !important; }
.progress { border-radius: 10px; background: var(--secondary-10) !important; }
.progress-bar { font-size: 1.2em; background-color: var(--secondary-60); }
.badge.badge-info, .badge-style-light.badge-info { color: var(--secondary) !important; background: var(--secondary-10) !important; }
.badge.badge-primary { background: var(--secondary) !important; }
.badge.badge-warning { color: var(--primary) !important; background: var(--accent-30) !important; }
.bg-danger, .badge.bg-danger { background-color: var(--tertiary) !important; }
.text-primary { color: var(--primary) !important; }
.text-info, .text-success { color: var(--secondary) !important; }
.text-warning { color: hsl(36, 90%, 45%) !important; }
.text-danger { color: var(--tertiary) !important; }

/* ================================================================
   5. DASHBOARD — STRUTTURA E CARD PRODOTTI (v3)
   ================================================================ */
#dashboard-prodotti { row-gap: 1.75rem; }
#dashboard-prodotti .col-xl-8 > .row { row-gap: 1.75rem; }
#dashboard-prodotti .col-xl-8 > .row + .row { margin-top: 1.75rem !important; }
#dashboard-prodotti .prod-card { min-height: 18.5rem; margin-bottom: 0; border: 0 !important; border-radius: var(--pc-radius) !important; overflow: hidden; box-shadow: none !important; }
#dashboard-prodotti .prod-card .card-body { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 2rem; overflow: hidden; background-image: none !important; }
#dashboard-prodotti .prod-card .card-body::before { content: ""; position: absolute; right: -70px; bottom: -110px; width: 280px; height: 280px; pointer-events: none; border-radius: 50%; }
#dashboard-prodotti .prod-card--accent .card-body { background-color: var(--accent) !important; }
#dashboard-prodotti .prod-card--accent .card-body::before { background: hsla(40, 70%, 52%, .35) !important; }
#dashboard-prodotti .prod-card--green .card-body { background-color: var(--secondary) !important; }
#dashboard-prodotti .prod-card--green .card-body::before { background: hsla(0, 0%, 100%, .1) !important; }
#dashboard-prodotti .prod-card--curve { border-radius: 150px var(--pc-radius) var(--pc-radius) var(--pc-radius) !important; }
#dashboard-prodotti .prod-card__content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .5rem; height: auto }
#dashboard-prodotti .prod-card .card-title { margin: 0; font-family: 'Nunito Sans', sans-serif; font-size: clamp(1.15rem, 1.7vw, 1.65rem); font-weight: 800; line-height: 1.3; text-transform: uppercase; }
#dashboard-prodotti .prod-card .card-title span { font: inherit !important; color: inherit !important; letter-spacing: inherit; }
#dashboard-prodotti .prod-card__desc { margin: 0 0 .5rem; font-size: 1.2rem; line-height: 1.4; }
#dashboard-prodotti .prod-card--accent .card-title { color: var(--pc-title-green) !important; }
#dashboard-prodotti .prod-card--accent .prod-card__desc { color: var(--pc-text-dark) !important; }
#dashboard-prodotti .prod-card--green .card-title, #dashboard-prodotti .prod-card--green .prod-card__desc { color: #fff !important; }
#dashboard-prodotti .prod-card__actions { display: flex; align-items: center; gap: 1rem; margin-top: auto; }
#dashboard-prodotti .prod-card__actions .btn { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1.25rem .5rem 1.6rem; font-size: 1rem; font-weight: 800; letter-spacing: .03em; }
#dashboard-prodotti .prod-card__actions .btn i { color: inherit !important; }
#dashboard-prodotti .prod-card--accent .prod-card__actions .btn { color: #fff !important; border-color: var(--secondary) !important; background: var(--secondary) !important; }
#dashboard-prodotti .prod-card--accent .prod-card__actions .btn:hover, #dashboard-prodotti .prod-card--accent .prod-card__actions .btn:focus { border-color: var(--secondary-d-1) !important; background: var(--secondary-d-1) !important; }
#dashboard-prodotti .prod-card--green .prod-card__actions .btn, #dashboard-prodotti .prod-card--photo .prod-card__actions .btn { color: var(--pc-text-dark) !important; border-color: var(--accent) !important; background: var(--accent) !important; }
#dashboard-prodotti .prod-card--green .prod-card__actions .btn:hover, #dashboard-prodotti .prod-card--green .prod-card__actions .btn:focus, #dashboard-prodotti .prod-card--photo .prod-card__actions .btn:hover, #dashboard-prodotti .prod-card--photo .prod-card__actions .btn:focus { border-color: var(--accent-d-1) !important; background: var(--accent-d-1) !important; }
#dashboard-prodotti .prod-card__icon { margin-left:auto; display: flex; align-items: center; justify-content: center; width: 4.4rem; height: 4.4rem; background: #fff !important; }
#dashboard-prodotti .prod-card__icon i { font-size: 2rem; color: var(--pc-text-dark) !important; }
#dashboard-prodotti .prod-card--photo { height: 100%; }
#dashboard-prodotti .prod-card--photo .card-body { background: linear-gradient(to top, hsla(181, 92%, 10%, .94) 0%, hsla(180, 100%, 13%, .78) 28%, hsla(180, 100%, 16%, .35) 46%, hsla(180, 100%, 20%, 0) 60%), url(../images/AI-trainer.jpg) 50% 30% / cover no-repeat !important; }
#dashboard-prodotti .prod-card--photo .card-body::before { display: none; }
#dashboard-prodotti .prod-card--photo .card-title { color: var(--accent) !important; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
#dashboard-prodotti .prod-card--photo .prod-card__desc { color: #fff !important; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }

/* ================================================================
   6. DASHBOARD — SEZIONE CENTRALE (v3)
   ================================================================ */
#dashboard-alert { row-gap: 1.5rem; }
#dashboard-alert .alert.upcoming { position: relative; padding:2rem; overflow: hidden; color: var(--pc-text-dark) !important; border: 0 !important; border-radius: var(--pc-radius) 220px var(--pc-radius) var(--pc-radius) !important; background: var(--accent) !important; box-shadow: none !important; }
#dashboard-alert .alert.upcoming > * { position: relative; z-index: 1; }
#dashboard-alert .alert.upcoming .card-title { color: var(--pc-text-dark) !important; }
#dashboard-alert .alert.upcoming h5.card-title:first-child { display: inline-block; align-self: flex-start; padding: .3rem .75rem; margin-bottom: .6rem; color: #fff !important; font-weight: 800 !important; letter-spacing: .08em; background: var(--upcoming-red) !important; border-radius: 6px; }
#dashboard-alert .alert.upcoming .btn-primary { color: #fff !important; border-color: var(--secondary) !important; background: var(--secondary) !important; }
#dashboard-alert .alert.upcoming .btn-primary:hover, #dashboard-alert .alert.upcoming .btn-primary:focus { border-color: var(--secondary-d-1) !important; background: var(--secondary-d-1) !important; }
#dashboard-alert .alert.upcoming .btn-primary i { color: inherit !important; }
.level-card { border: 0 !important; border-radius: var(--pc-radius) !important; background: var(--secondary) !important; box-shadow: none !important; }
.level-card .card-body { background: transparent !important; }
#dashboard-alert .level-card { flex: 1 1 auto; }
.level-card, .level-card span, .level-card .text-m { color: #fff !important; }
.level-card .level-card__badge { width: 4.4rem; min-width: 4.4rem; height: 4.4rem; margin-right: 1.25rem; background: #fff !important; border-radius: 50%; }
.level-card .level-card__badge h3 { margin: 0; color: var(--pc-text-dark) !important; font-weight: 800; }
.level-card .level-card__title { font-weight: 800 !important; letter-spacing: .03em; text-transform: uppercase; }
.teachers-card, .booking-report-card { overflow: hidden; }
.teachers-card { border-radius: var(--pc-radius) !important; }
.teachers-card .card-header, .booking-report-card .card-header { padding-top: 1.25rem; padding-bottom: 1.25rem; border-bottom: 0 !important; background: var(--secondary) !important; }
.teachers-card .card-header .card-title, .booking-report-card .card-header .card-title { color: #fff !important; font-weight: 800; }
.teachers-card .card-header .badge { color: var(--secondary) !important; background: #fff !important; }
.stat-card { border: 0 !important; background: var(--accent) !important; box-shadow: none !important; }
.stat-card .card-body { background: transparent !important; }
.stat-card .widget-stats-title, .stat-card .widget-stats-amount { color: var(--pc-title-green) !important; font-weight: 800; text-shadow: none; }
.stat-card .widget-stats-icon, .stat-card .widget-stats-indicator { color: #fff !important; background: var(--secondary) !important; }
.stat-card .widget-stats-icon { border-radius: 50%; }
.stat-card .widget-stats-indicator { border-radius: 8px; }
.stat-card .widget-stats-icon i, .stat-card .widget-stats-indicator i { color: #fff !important; }
.credits-row { row-gap: 1.5rem; }
.credits-row > [class*="col-"] > .card { margin-bottom: 0; }
.grey-card { overflow: hidden; border: 1px solid rgb(210, 210, 210) !important; background: #fff !important; box-shadow: none !important; }
.grey-card .card-header { border-bottom: 1px solid rgb(210, 210, 210) !important; background-color: var(--grey-card) !important; }
.grey-card .card-body, .grey-card .list-group, .grey-card .list-group-item { background-color: #fff !important; }
.grey-card .list-group-item { border-color: rgb(225, 225, 225) !important; }
.grey-card .card-header .card-title, .grey-card .list-group-item, .grey-card .list-group-item .card-title, .grey-card .dashboard-riepilogo-profilo, .grey-card .dashboard-riepilogo-profilo span, .grey-card .widget-list-item-description-title { color: var(--pc-text-dark) !important; }
.grey-card .rata-scaduta a { display: block; color: inherit; text-decoration: none; }

/* Fabio 24-11-26 */
.green-card { overflow: hidden; border: 1px solid rgb(210, 210, 210) !important; background: #fff !important; box-shadow: none !important; }
.green-card .card-header { border-bottom: 1px solid rgb(210, 210, 210) !important; background-color: var(--secondary) !important; color: #fff !important;}
/* il titolo e' un h5.card-title con colore proprio (.card .card-title): il bianco dell'header non arriva per ereditarieta' */
.green-card .card-header .card-title { color: #fff !important; font-weight: 800; }
.green-card .card-body { background-color: #fff !important; }

/* Voce Logout del menu laterale (li.nav-logout, View.class): staccata dalle altre e con sfondo, e' un'azione diversa */
.app-menu > ul > li.nav-logout { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--secondary-30); }
.app-menu > ul > li.nav-logout > a { color: var(--upcoming-red) !important; background: rgba(227, 6, 19, .08) !important; }
.app-menu > ul > li.nav-logout > a > i { color: var(--upcoming-red) !important; }
.app-menu > ul > li.nav-logout > a:hover { background: rgba(227, 6, 19, .15) !important; }

/* Mobile: main.css da' alla sidebar height:100vh, che nei browser mobili e' piu' alta dello schermo
   visibile (barre del browser): il fondo del menu (Logout) finiva sotto la barra in basso */
@media (max-width: 1199px) {
  .app-sidebar { height: 100vh; height: 100dvh; }
  .app-sidebar .app-menu .accordion-menu { padding-bottom: calc(3rem + env(safe-area-inset-bottom)) !important; }
}


/* ================================================================
   7. WIDGET, TABELLE, POPOVER E DOCENTI
   ================================================================ */
#dashboard-widgets .card { margin-bottom: 0; }
.widget-stats .widget-stats-icon, .widget-stats-icon-primary, .widget-stats-icon-info, .widget-stats-icon-success, .widget-list .widget-list-item-icon, .widget-list-item-icon {border-radius: 50% !important; }
.widget-stats-icon-warning, .widget-stats-icon-danger { color: var(--tertiary) !important; background: var(--tertiary-10) !important; border-radius: 50% !important; }
.widget-list .widget-list-content .widget-list-item .widget-list-item-description .widget-list-item-description-progress .progress { height: 20px; }
.educentre-popover { max-width: 100%; border: 0; }
.educentre-popover.rata-scaduta-popover .popover-body { background: var(--tertiary-l-5); border-radius: 5px; }
.educentre-popover.rata-scaduta-popover .popover-arrow::after, .educentre-popover.rata-scaduta-popover .popover-arrow::before { border-top-color: var(--tertiary-l-5) !important; }
.popover-interaction.rata-scaduta:hover { cursor: pointer; background: var(--secondary-5); }
.table thead th { color: var(--primary) !important; border-bottom: 2px solid var(--accent) !important; }
.table td { border-color: var(--secondary-10) !important; }
.table tbody tr:hover td { background: var(--secondary-5); }
.nextbookedlessons-table img { width: 35px; height: 35px; border-radius: 16.5px; }
.nextbookedlessons-table td, .nextbookedlessons-table th { vertical-align: middle; }
.nextbookedlessons-table td:nth-child(4) { max-width: 250px; overflow: hidden !important; white-space: nowrap; text-overflow: ellipsis; }
.nextbookedlessons-table th:nth-child(3), .nextbookedlessons-table td:nth-child(3) { text-align: center; }
.nextbookedlessons-table tr th:last-child, .nextbookedlessons-table tr td:last-child, #corrections-table tr th:last-child, #corrections-table tr td:last-child { text-align: right; }
#mylab-table th, #mylab-table td { width: 20%; }
.credits-details { max-width: 50%; }
.nav-item.nav-logout { border-left: 1px solid var(--secondary-30); }
.modal .accordion-header:hover * { color: var(--secondary-l-1); }
.offcanvas .logo { padding-left: 10px; }
.offcanvas-header { height: 45px; }
.teacher-detail span { line-height: 1.4; word-break: break-all; }
.teacher-topic span { position: relative; display: inline-block; padding-right: .5em; margin-right: .5em; word-wrap: break-word; border-right: 1px solid var(--secondary-30); }
.teacher-topic span:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.teacher-card .card-body, .teacher-detail-wrap { height: 100%; }
.teacher-card .btn-group .btn:first-child { margin-right: 2px; }

.teacher-detail span.teacher-name { margin-bottom: 5px; line-height: 1.2; } /* nome nella pagina di prenotazione (Book.class) */
/* nome del docente a tutta riga sopra la foto (teachers.php) */
.teacher-card .teacher-name { display: block; width: 100%; margin-bottom: 12px; line-height: 1.2; }
/* Da 577px in su (foto accanto ai dati) testi piu' piccoli: nome text-l, mail text-s.
   Sotto i 576px restano le classi del markup (text-xl / text-l), con la foto a tutta larghezza. */
@media (min-width: 577px) {
  .teacher-card .teacher-name { font-size: var(--text-l); }
  .teacher-card .teacher-email { font-size: var(--text-s); }
}
.teacher-profile.teacher-avatar { width: 100%; min-width: 100px; max-width: 100px; height: 100%; }
.teacher-profile.teacher-avatar img { width: 100%; height: auto; object-fit: cover; object-position: center; }
.video-wrap { max-height: 60vh; aspect-ratio: 16 / 9; }

#teachers-page .card-footer { border-top: 1px solid var(--primary-l-5); }
#teachers-page .btn-group .btn-outline-secondary:hover, #teacher-page .btn-group .btn-outline-secondary:hover { color: var(--light); border-color: var(--secondary-d-2); background-color: var(--secondary-d-2); }
#teacher-page table, .teacher-page table { margin-bottom: 0; }
#teacher-page table i, .teacher-page table i { display: block; }
#teacherModal .modal-dialog { max-width: 80%; }
#teacherModal .modal-content { background: #f4f7fb; }
#teacherModal .modal-dialog .nav-link { color: var(--secondary) !important; }
#teacherModal .modal-dialog .nav-link.active { color: var(--primary) !important; }
#teacherModal .modal-dialog .nav-link:hover { color: var(--secondary-l-1) !important; }


/* ================================================================
   8. CORREZIONI
   ================================================================ */
#correzione .note-editing-area, #correzione .note-toolbar { position: relative; pointer-events: none; }
#correzione .note-editing-area::before, #correzione .note-toolbar::before { content: ''; position: absolute; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
#correzione .note-editing-area::before { background: rgba(255, 255, 255, 0); }
#correzione .note-toolbar::before { background: rgba(255, 255, 255, .75); }
#correzione .note-editing-area b { color: red; }
#corrections-table tbody tr { height: 44px; }
#corrections-table tr td:first-child { max-width: 200px; overflow: hidden !important; white-space: nowrap; text-overflow: ellipsis; }
.writing-assistance-active { font-weight: bold; }
.writing-assistance-active td { background-color: var(--secondary-5); }
.cal-card .table td.no-lessons { padding: 5px !important; color: #888; line-height: 1.2; }

/* ================================================================
   9. GRIGLIA E RESPONSIVE
   ================================================================ */
.masonry-grid { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; margin-right: calc(var(--bs-gutter-x) / -2); margin-left: calc(var(--bs-gutter-x) / -2); }
.masonry-grid .grid-sizer, .masonry-grid .grid-item { width: 33.333333%; padding-right: calc(var(--bs-gutter-x) / 2); padding-left: calc(var(--bs-gutter-x) / 2); }
.masonry-grid .grid-item { margin-bottom: var(--bs-gutter-y); }
.grid-item { margin-bottom: 1.5rem; }
#dashboard hr.my-4 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

@media (min-width: 768px) {
  /*.app-header .navbar > .container-fluid > .d-flex > .navbar-nav { display: grid; grid-template-columns: auto auto; column-gap: 1rem; row-gap: 0; align-items: center; justify-items: start; }
  .app-header .navbar > .container-fluid > .d-flex > .navbar-nav > li.dropdown { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .app-header .navbar > .container-fluid > .d-flex > .navbar-nav > li.dropdown > .nav-link { padding-top: 0; padding-bottom: 0; }*/
}
@media (min-width: 1200px) {
  #dashboard-widgets > .grid-item { padding-bottom: 3rem; margin-bottom: 0; }
}
@media (max-width: 1199.98px) {
  #dashboard .row .grid-item { margin-bottom: 1.5rem; }
  #dashboard-prodotti .prod-card--photo { min-height: 30rem; }
  #dashboard-prodotti .prod-card .card-title { font-size: clamp(1.15rem, 4vw, 1.65rem); }
}
@media (max-width: 991.98px) {
  .masonry-grid .grid-sizer, .masonry-grid .grid-item { width: 50%; }
}
@media (max-width: 575.98px) {
  :root { --pc-pad-left: 1.75rem; --pc-pad-left-wide: 3.5rem; }
  .masonry-grid .grid-sizer, .masonry-grid .grid-item { width: 100%; }
  .app-container::before { width: 360px; height: 300px; top: -150px; right: -180px; }
}
@media (min-width: 576px) {
  /*#dashboard .page-description { padding-bottom: 93px !important; }*/
}

/* ================================================================
   10. REGOLE DI PIATTAFORMA (non presenti nella consegna grafica)
   ================================================================ */
.span_errore {
    color: #d6494b !important;
    font-weight:bold;
}
.span_correzione {
    color: #279566 !important;
    font-weight:bold;
}
.span_commento {
    color: #3583ca !important;
    font-weight:bold;
}
.span_evidenzia {
    color: black;
    background-color: yellow;
    font-weight:bold;
}
.card-body .widget-info-action {
    margin: 20px 0 10px;
    display: inline-block;
}

/* ── PWA Install Banner ───────────────────────────────────────────────────── */
#pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-primary);
    box-shadow: 0 -4px 16px var(--shadow-primary);
    padding: 10px 16px;
    animation: pwa-slide-up 0.3s ease-out;
}

@keyframes pwa-slide-up {
    from {
        transform: translateY(100%);
    }
    to   {
        transform: translateY(0);
    }
}

.pwa-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-banner-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.pwa-banner-text strong {
    display: block;
    font-size: var(--text-s);
    color: var(--text-title);
}

.pwa-banner-text small {
    color: var(--text-body);
    font-size: var(--text-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pwa-install-btn {
    flex-shrink: 0;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: var(--text-s);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#pwa-install-btn:hover {
    background: var(--secondary-d-1);
}

#pwa-dismiss-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-body);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

#pwa-dismiss-btn:hover {
    opacity: 1;
}

#pwa-install-instructions {
    display: none;
    max-width: 600px;
    margin: 8px auto 0;
    padding: 8px 12px;
    background: var(--primary-5);
    border-radius: 6px;
    font-size: var(--text-xs);
    color: var(--text-body);
    line-height: 1.6;
}

#pwa-install-instructions strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text-title);
}

.pwa-step {
    display: block;
}

/* Su iOS nasconde il suggerimento Android e viceversa */
@supports (-webkit-touch-callout: none) {
    .pwa-step.android {
        display: none;
    }
}
@supports not (-webkit-touch-callout: none) {
    .pwa-step.ios {
        display: none;
    }
}

.Trisposta {
    cursor: pointer;
}




/* Card prodotto non attivo per lo studente 
#dashboard-prodotti .prod-card--off { opacity: .45; filter: grayscale(1); }
*/
/* Card prodotto non compresa nell'abbonamento: aspetto disabilitato */
#dashboard-prodotti .prod-card.prod-card--off {
  opacity: 1;
  filter: none;
  border: 1px solid hsl(210, 10%, 88%) !important;
  cursor: not-allowed;
}
#dashboard-prodotti .prod-card.prod-card--off .card-body {
  background: hsl(210, 12%, 95%) !important;
}
#dashboard-prodotti .prod-card.prod-card--off .card-body::before {
  display: block;
  background: hsla(210, 10%, 50%, .06) !important;
}
#dashboard-prodotti .prod-card.prod-card--off .card-title {
  color: hsl(210, 8%, 60%) !important;
  text-shadow: none;
}
#dashboard-prodotti .prod-card.prod-card--off .prod-card__desc {
  color: hsl(210, 8%, 66%) !important;
  text-shadow: none;
}
#dashboard-prodotti .prod-card.prod-card--off .prod-card__icon {
  background: hsl(210, 12%, 90%) !important;
}
#dashboard-prodotti .prod-card.prod-card--off .prod-card__icon i {
  color: hsl(210, 8%, 68%) !important;
}

/* ================================================================
   11. MY PROGRESS (pagina progress e schede)
   ================================================================ */
#progress-page .tab-content { padding: 0 calc(var(--bs-gutter-x) * .5); }
.pg-bar { height: 8px; background: var(--secondary-10); border-radius: 4px; overflow: hidden; }
.pg-bar > span { display: block; height: 100%; background: var(--secondary); border-radius: 4px; }
.pg-bar-thin { height: 4px; }
.pg-bar-label { width: 70px; flex-shrink: 0; }
.pg-bar-value { width: 32px; text-align: right; flex-shrink: 0; }
.pg-badge { background: var(--secondary-10); color: var(--pc-text-dark); border: 1px solid var(--secondary-20); }
.pg-table th, .pg-table td { font-size: .86rem; vertical-align: middle; }
/* Sessioni AI Trainer: bordo e punteggio colorati per fascia */
.pg-session { border-left: 4px solid var(--secondary-30) !important; }
.pg-session-good { border-left-color: var(--secondary) !important; }
.pg-session-fair { border-left-color: var(--accent) !important; }
.pg-session-poor { border-left-color: var(--tertiary) !important; }
.pg-score-good { background: var(--secondary) !important; color: #fff; }
.pg-score-fair { background: var(--accent) !important; color: var(--pc-text-dark); }
.pg-score-poor { background: var(--tertiary) !important; color: #fff; }
.pg-score-muted { background: var(--secondary-10) !important; color: var(--pc-text-dark); }
.pg-fill-good { background: var(--secondary) !important; }
.pg-fill-fair { background: var(--accent) !important; }
.pg-fill-poor { background: var(--tertiary) !important; }
.pg-fill-muted { background: var(--secondary-30) !important; }

/* ================================================================
   12. MY COURSE (i-learn): livelli come card
   ================================================================ */
.ilearn-level { border: 1px solid rgb(210, 210, 210) !important; border-radius: var(--pc-radius) !important; background: #fff !important; color: var(--pc-text-dark) !important; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.ilearn-level:hover, .ilearn-level:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .08) !important; }
.ilearn-level .card-body { padding: 1.75rem; }
.ilearn-level__badge { display: flex; align-items: center; justify-content: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--secondary); color: #fff; font-family: 'Nunito Sans', sans-serif; font-weight: 800; font-size: 1.25rem; }
.ilearn-level__title { margin-top: .5rem; font-family: 'Nunito Sans', sans-serif; font-weight: 800; font-size: 1.2rem; text-transform: uppercase; color: var(--pc-title-green); }
.ilearn-level__product { color: var(--pc-text-dark); }
.ilearn-level--mine { border-color: var(--accent) !important; background: var(--accent) !important; }
.ilearn-level--mine .ilearn-level__badge { background: #fff; color: var(--pc-text-dark); }
.ilearn-level__mine { background: var(--secondary); color: #fff; }


