:root {
  --blue: #0b3d75;
  --blue-2: #125ca8;
  --gold: #d7a928;
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --border: #d9e2ef;
  --success-bg: #e9f8ef;
  --success-text: #166534;
  --error-bg: #fdecec;
  --error-text: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hero {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: white;
  padding: 56px 20px;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 16px;
}

h1 {
  font-size: 42px;
  margin: 0 0 12px;
}

.hero p {
  max-width: 700px;
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  opacity: 0.92;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 24px;
}

.section-title.left {
  text-align: left;
}

.section-title h2 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 28px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.grid-corsi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card,
.corso-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.corso-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.corso-card h3 {
  margin: 0;
  color: var(--blue);
}

.corso-meta {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.corso-desc {
  color: var(--text);
  line-height: 1.5;
}

.card {
  padding: 22px;
}

.form-card {
  max-width: 980px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 15px;
  background: white;
}

textarea {
  resize: vertical;
}

.privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text);
  margin: 10px 0 18px;
}

.privacy input {
  width: auto;
  margin-top: 3px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--gold);
  color: #111827;
}

.btn.secondary {
  background: white;
  color: var(--blue);
}

.btn.light {
  background: #eef3fa;
  color: var(--blue);
}

.btn.small {
  padding: 8px 12px;
  font-size: 13px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}

.loading,
.empty,
.muted {
  color: var(--muted);
}

.message {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.message.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.message.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-header h2 {
  color: var(--blue);
  margin: 0 0 6px;
}

.admin-header p {
  margin: 0;
  color: var(--muted);
}

.admin-login-row {
  display: flex;
  gap: 10px;
  max-width: 420px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-header h3 {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--blue);
  background: #f7faff;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef3fa;
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.status.wait {
  background: #fff8db;
  color: #854d0e;
}

footer {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 760px) {
  h1 {
    font-size: 32px;
  }

  .form-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-login-row,
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }
}

.field.full {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  margin: 0;
}

.checkbox-grid input {
  width: auto;
}

.checkbox-grid-larga {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.sub-box {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
}

.sub-box h3 {
  margin: 0 0 14px;
  color: var(--blue);
}

.firma-canvas {
  width: 100%;
  height: 180px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: #fff;
  touch-action: none;
  display: block;
}

.btn:disabled,
.btn.busy {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.iscrizioni-admin-card {
  margin-top: 28px;
  width: 100%;
}

.iscrizioni-admin-card .table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  background: #ffffff;
}

.iscrizioni-admin-card table {
  min-width: 1400px;
  width: 100%;
  border-collapse: collapse;
}

.iscrizioni-admin-card th,
.iscrizioni-admin-card td {
  white-space: nowrap;
  vertical-align: top;
}

.iscrizioni-admin-card td small {
  display: block;
  color: #667085;
  margin-top: 3px;
}

.iscrizioni-admin-card {
  margin-top: 28px;
  width: 100%;
}

.iscrizioni-admin-card .table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  background: #ffffff;
}

.iscrizioni-admin-card table {
  min-width: 1500px;
  width: 100%;
  border-collapse: collapse;
}

.iscrizioni-admin-card th,
.iscrizioni-admin-card td {
  white-space: nowrap;
  vertical-align: top;
}

.iscrizioni-admin-card {
  margin-top: 28px;
  width: 100%;
}

.iscrizioni-admin-card .table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e0ec;
  border-radius: 14px;
  background: #ffffff;
}

.iscrizioni-admin-card table {
  min-width: 1500px;
  width: 100%;
  border-collapse: collapse;
}

.iscrizioni-admin-card th,
.iscrizioni-admin-card td {
  white-space: nowrap;
  vertical-align: top;
}

.azioni-report {
  min-width: 260px;
}

.azioni-report .btn {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  text-align: center;
}

.riga-ammissibile {
  background: #e8f7ed;
}

.riga-ammissibile td:first-child {
  border-left: 5px solid #2e7d32;
}

.riga-ammissibile:hover {
  background: #dff3e6;
}

.iscrizioni-admin-card table th:first-child,
.iscrizioni-admin-card table td:first-child {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 2;
}

.iscrizioni-admin-card table th:first-child {
  z-index: 3;
}

.riga-ammissibile td:first-child {
  background: #e8f7ed;
}

.azioni-header {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn.danger {
  background: #b42318;
  color: #ffffff;
  border-color: #b42318;
}

.btn.danger:hover {
  background: #912018;
  border-color: #912018;
}

.btn.is-working,
button.is-working {
  opacity: 0.75;
  cursor: wait !important;
  pointer-events: none;
  position: relative;
}

.btn.is-working::before,
button.is-working::before {
  content: "⏳ ";
}




#registrazioneDocenteBox:not(.hidden) {
  display: block !important;
  visibility: visible !important;
}

/* =========================================================
   RESTYLING HOME E SEZIONI - VERSIONE ISTITUZIONALE
========================================================= */

:root {
  --sgs-blue: #0b3d78;
  --sgs-blue-2: #115aa3;
  --sgs-light: #f4f7fb;
  --sgs-border: #dce5f0;
  --sgs-text: #172033;
  --sgs-muted: #637083;
  --sgs-card: #ffffff;
  --sgs-shadow: 0 18px 45px rgba(18, 38, 63, 0.10);
}

body {
  background:
    radial-gradient(circle at top left, rgba(17, 90, 163, 0.12), transparent 28rem),
    linear-gradient(180deg, #f7faff 0%, #eef3f8 100%);
  color: var(--sgs-text);
}

.container,
main {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.home-hero {
  margin: 24px auto 26px;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(11, 61, 120, 0.98), rgba(17, 90, 163, 0.92)),
    linear-gradient(135deg, #0b3d78, #115aa3);
  color: #fff;
  box-shadow: var(--sgs-shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 22px;
  overflow: hidden;
  position: relative;
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  background: rgba(255,255,255,0.10);
  border-radius: 50%;
}

.home-hero-content,
.home-hero-panel {
  position: relative;
  z-index: 1;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.home-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  background: #fff;
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.78);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.home-subtitle {
  margin: 14px 0 0;
  max-width: 740px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.home-hero-actions .btn {
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}

.home-hero-panel {
  display: grid;
  gap: 12px;
}

.hero-stat {
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(6px);
}

.hero-stat span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-stat strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.hero-stat small {
  color: rgba(255,255,255,0.80);
  line-height: 1.35;
}

.card {
  border: 1px solid var(--sgs-border);
  border-radius: 22px;
  background: var(--sgs-card);
  box-shadow: 0 10px 30px rgba(18, 38, 63, 0.07);
}

.card.soft {
  background: #fbfdff;
  border-style: solid;
}

.card-header {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.card-header h3,
.card-header h4 {
  color: var(--sgs-blue);
  letter-spacing: -0.02em;
}

.section {
  margin-top: 22px;
}

.section > h2,
.section-title {
  color: var(--sgs-blue);
  letter-spacing: -0.02em;
}

.btn {
  border-radius: 12px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--sgs-blue);
  border-color: var(--sgs-blue);
}

.btn.secondary {
  background: #17324d;
  border-color: #17324d;
  color: #fff;
}

.btn.light {
  background: #fff;
  color: var(--sgs-blue);
  border: 1px solid var(--sgs-border);
}

.btn.danger {
  background: #b42318;
  border-color: #b42318;
}

.table-wrap {
  border: 1px solid var(--sgs-border);
  border-radius: 18px;
  overflow: auto;
  background: #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  background: #f0f5fb;
  color: #17324d;
  font-weight: 800;
  border-bottom: 1px solid var(--sgs-border);
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

tbody tr:hover {
  background: #f4f8fd;
}

.field label {
  font-weight: 700;
  color: #213149;
  margin-bottom: 6px;
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid #cfd9e6;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sgs-blue-2);
  box-shadow: 0 0 0 3px rgba(17, 90, 163, 0.12);
  outline: none;
}

.message {
  border-radius: 14px;
}

.muted {
  color: var(--sgs-muted);
}

/* Migliora blocchi corsi pubblici se presenti */
#listaCorsiPubblici,
#corsiPubblici,
#corsiDisponibili {
  display: grid;
  gap: 16px;
}

.course-card,
.corso-card {
  border-radius: 22px;
  border: 1px solid var(--sgs-border);
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 38, 63, 0.08);
  padding: 20px;
}

/* Area admin e docenti più leggibili */
#adminSection .card,
#docentiSection .card {
  margin-bottom: 18px;
}

#adminSection .card-header,
#docentiSection .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-brand {
    align-items: flex-start;
  }

  .home-logo {
    width: 84px;
    height: 84px;
  }

  .home-hero-actions {
    flex-direction: column;
  }

  .home-hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .home-brand {
    flex-direction: column;
  }

  .home-hero h1 {
    font-size: 30px;
  }

  .home-subtitle {
    font-size: 15px;
  }
}

/* =========================================================
   CORREZIONE RESTYLING - HOME CHIARA E ISTITUZIONALE
========================================================= */

body {
  background: #f4f7fb !important;
}

/* Hero non più blu pieno */
.home-hero {
  background: #ffffff !important;
  color: #172033 !important;
  border: 1px solid #dce5f0 !important;
  box-shadow: 0 12px 34px rgba(18, 38, 63, 0.08) !important;
}

.home-hero::after {
  background: rgba(17, 90, 163, 0.06) !important;
}

.home-brand {
  align-items: center;
}

.home-logo {
  background: #ffffff !important;
  border: 1px solid #dce5f0 !important;
  box-shadow: 0 8px 22px rgba(18, 38, 63, 0.10) !important;
}

.eyebrow {
  color: #0b3d78 !important;
}

.home-hero h1 {
  color: #0b3d78 !important;
}

.home-subtitle {
  color: #4f5f73 !important;
}

/* Pannello laterale chiaro */
.home-hero-panel {
  background: #f8fbff;
  border: 1px solid #dce5f0;
  border-radius: 22px;
  padding: 14px;
}

.hero-stat {
  background: #ffffff !important;
  color: #172033 !important;
  border: 1px solid #dce5f0 !important;
  box-shadow: none !important;
}

.hero-stat span {
  background: #eaf2fb !important;
  color: #0b3d78 !important;
}

.hero-stat strong {
  color: #0b3d78 !important;
}

.hero-stat small {
  color: #637083 !important;
}

/* Pulsanti più equilibrati */
.home-hero-actions .btn.primary {
  background: #0b3d78 !important;
  border-color: #0b3d78 !important;
  color: #ffffff !important;
}

.home-hero-actions .btn.light,
.home-hero-actions .btn.secondary {
  background: #ffffff !important;
  color: #0b3d78 !important;
  border: 1px solid #b8cce2 !important;
}

.home-hero-actions .btn.light:hover,
.home-hero-actions .btn.secondary:hover {
  background: #eef5fc !important;
}

/* Card sempre bianche e pulite */
.card,
.card.soft,
.course-card,
.corso-card {
  background: #ffffff !important;
  border: 1px solid #dce5f0 !important;
  box-shadow: 0 8px 24px rgba(18, 38, 63, 0.06) !important;
}

/* Header delle card meno pesanti */
.card-header {
  background: transparent !important;
  border-bottom: 1px solid #edf2f7 !important;
}

.card-header h3,
.card-header h4,
.section > h2,
.section-title {
  color: #0b3d78 !important;
}

/* Tabelle più sobrie */
thead th {
  background: #f3f7fb !important;
  color: #17324d !important;
}

tbody tr:hover {
  background: #f7fbff !important;
}

/* Pulsanti generali: blu solo per azioni principali */
.btn.primary {
  background: #0b3d78 !important;
  border-color: #0b3d78 !important;
  color: #fff !important;
}

.btn.secondary,
.btn.light {
  background: #ffffff !important;
  color: #0b3d78 !important;
  border: 1px solid #b8cce2 !important;
}

.btn.secondary:hover,
.btn.light:hover {
  background: #eef5fc !important;
}

/* Pulsanti pericolosi restano rossi */
.btn.danger {
  background: #b42318 !important;
  border-color: #b42318 !important;
  color: #ffffff !important;
}

/* Box introduttivi più leggeri */
.section-intro-admin,
.section-intro-docenti {
  background: #f8fbff !important;
  border-left: 5px solid #0b3d78 !important;
}


/* =========================================================
   PULIZIA HOME - NASCONDE INTESTAZIONE VECCHIA DUPLICATA
========================================================= */

/*
  La nuova home usa .home-hero.
  Il vecchio blocco iniziale con titolo, descrizione e pulsanti viene nascosto
  per evitare duplicazioni nella pagina pubblica.
*/

body > header,
.main-header,
.app-header,
header.site-header {
  display: none !important;
}

/* Se il vecchio blocco non è un header ma una card iniziale, lo neutralizziamo solo se contiene la vecchia navigazione */
.legacy-home-header {
  display: none !important;
}


/* =========================================================
   HOME PRO - COLORI, OMBRE, MICRO-ANIMAZIONI
========================================================= */

:root {
  --pro-blue: #0b3d78;
  --pro-blue-bright: #1467b3;
  --pro-blue-soft: #eaf4ff;
  --pro-gold: #f2b84b;
  --pro-gold-soft: #fff6df;
  --pro-green: #1f9d6a;
  --pro-red: #b42318;
  --pro-ink: #172033;
  --pro-muted: #64748b;
}

/* sfondo meno anonimo */
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(20, 103, 179, 0.16), transparent 26rem),
    radial-gradient(circle at 92% 14%, rgba(242, 184, 75, 0.20), transparent 22rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 52%, #f7f9fc 100%) !important;
}

/* hero più istituzionale ma vivo */
.home-hero {
  border: 1px solid rgba(11, 61, 120, 0.18) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,252,255,0.94)),
    radial-gradient(circle at top right, rgba(242,184,75,0.24), transparent 18rem) !important;
  box-shadow:
    0 24px 60px rgba(11, 61, 120, 0.14),
    0 8px 22px rgba(18, 38, 63, 0.07) !important;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(20, 103, 179, 0.10);
  z-index: 0;
}

.home-hero::after {
  background: linear-gradient(135deg, rgba(20, 103, 179, 0.10), rgba(242,184,75,0.14)) !important;
}

/* logo più valorizzato */
.home-logo {
  width: 118px !important;
  height: 118px !important;
  border-radius: 26px !important;
  border: 1px solid rgba(11, 61, 120, 0.16) !important;
  box-shadow:
    0 18px 36px rgba(11, 61, 120, 0.16),
    inset 0 0 0 5px #ffffff !important;
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-logo:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow:
    0 24px 46px rgba(11, 61, 120, 0.20),
    inset 0 0 0 5px #ffffff !important;
}

/* titolo con linea colorata */
.home-hero h1 {
  position: relative;
  display: inline-block;
  color: var(--pro-blue) !important;
}

.home-hero h1::after {
  content: "";
  display: block;
  width: 82px;
  height: 5px;
  border-radius: 999px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--pro-blue-bright), var(--pro-gold));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pro-blue) !important;
  background: var(--pro-blue-soft);
  border: 1px solid rgba(20,103,179,.14);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px !important;
}

.eyebrow::before {
  content: "●";
  color: var(--pro-gold);
  font-size: 13px;
}

/* pulsanti più belli */
.home-hero-actions .btn,
.btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(18, 38, 63, 0.08);
}

.home-hero-actions .btn::after,
.btn.primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}

.home-hero-actions .btn:hover::after,
.btn.primary:hover::after {
  left: 140%;
}

.btn-icon {
  display: inline-block;
  margin-right: 6px;
  transform-origin: center;
  transition: transform .18s ease;
}

.btn:hover .btn-icon {
  transform: translateY(-1px) scale(1.12) rotate(-3deg);
}

.home-hero-actions .btn.primary {
  background: linear-gradient(135deg, var(--pro-blue), var(--pro-blue-bright)) !important;
  border: none !important;
  box-shadow: 0 12px 26px rgba(11, 61, 120, 0.24) !important;
}

.home-hero-actions .btn.light,
.home-hero-actions .btn.secondary {
  background: #ffffff !important;
  color: var(--pro-blue) !important;
  border: 1px solid rgba(20,103,179,.22) !important;
  box-shadow: 0 10px 24px rgba(11, 61, 120, 0.10) !important;
}

.home-hero-actions .btn.light:hover,
.home-hero-actions .btn.secondary:hover {
  background: var(--pro-blue-soft) !important;
  border-color: rgba(20,103,179,.36) !important;
}

/* pannello laterale più dinamico */
.home-hero-panel {
  background:
    linear-gradient(180deg, #ffffff, #f8fbff) !important;
  border: 1px solid rgba(11, 61, 120, 0.14) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.70);
}

.hero-stat {
  border-left: 5px solid var(--pro-blue-bright) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hero-stat:nth-child(2) {
  border-left-color: var(--pro-gold) !important;
}

.hero-stat:nth-child(3) {
  border-left-color: var(--pro-green) !important;
}

.hero-stat:hover {
  transform: translateX(3px);
  box-shadow: 0 10px 24px rgba(11, 61, 120, 0.10) !important;
}

/* riquadri più professionali */
.card,
.card.soft,
.course-card,
.corso-card {
  box-shadow:
    0 16px 38px rgba(18, 38, 63, 0.08),
    0 2px 6px rgba(18, 38, 63, 0.04) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover,
.course-card:hover,
.corso-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 48px rgba(18, 38, 63, 0.12),
    0 4px 10px rgba(18, 38, 63, 0.05) !important;
  border-color: rgba(20, 103, 179, 0.28) !important;
}

/* corsi aperti ancora più evidenti */
.corsi-aperti-evidenza {
  background:
    linear-gradient(180deg, #ffffff, #fbfdff) !important;
  border: 2px solid rgba(20,103,179,.35) !important;
  box-shadow:
    0 24px 58px rgba(11, 61, 120, 0.16),
    0 8px 18px rgba(18, 38, 63, 0.06) !important;
}

.corsi-aperti-evidenza::before {
  background: linear-gradient(135deg, var(--pro-blue), var(--pro-blue-bright)) !important;
  box-shadow: 0 12px 24px rgba(11, 61, 120, 0.26) !important;
}

.corsi-aperti-evidenza::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 18px;
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(242,184,75,.32), transparent 70%);
  border-radius: 50%;
}

/* badge e titoli */
.card-header h3,
.card-header h4,
.section-title,
.section > h2 {
  color: var(--pro-blue) !important;
}

.card-header h3::before,
.card-header h4::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 22px;
  border-radius: 999px;
  margin-right: 9px;
  vertical-align: -4px;
  background: linear-gradient(180deg, var(--pro-blue-bright), var(--pro-gold));
}

/* tabelle più moderne */
.table-wrap {
  box-shadow: 0 10px 24px rgba(18, 38, 63, 0.05);
}

thead th {
  background: linear-gradient(180deg, #f4f8fd, #eaf2fb) !important;
}

tbody tr {
  transition: background .14s ease;
}

/* campi più puliti */
input,
select,
textarea {
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
}

/* messaggi più visibili */
.message.warning {
  background: var(--pro-gold-soft) !important;
  border: 1px solid rgba(242,184,75,.45) !important;
  color: #6b4b00 !important;
}

.message.success {
  background: #eafaf3 !important;
  border: 1px solid rgba(31,157,106,.28) !important;
  color: #116044 !important;
}

.message.error {
  background: #fff0f0 !important;
  border: 1px solid rgba(180,35,24,.25) !important;
  color: #8a1c14 !important;
}

/* animazione leggera di ingresso */
.home-hero,
.corsi-aperti-evidenza,
.card {
  animation: fadeUpPro .35s ease both;
}

@keyframes fadeUpPro {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero,
  .corsi-aperti-evidenza,
  .card,
  .btn,
  .home-logo,
  .hero-stat {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* mobile */
@media (max-width: 700px) {
  .home-hero {
    border-radius: 22px !important;
  }

  .home-logo {
    width: 96px !important;
    height: 96px !important;
  }

  .home-hero h1::after {
    width: 60px;
  }
}

/* Avviso calendario docente */
.calendario-docente-avviso {
  background: #fff6df;
  border: 1px solid rgba(242, 184, 75, .45);
  color: #6b4b00;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0 16px 0;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(18, 38, 63, 0.06);
}

/* Attestati nel report iscritti */
.status.danger {
  background: #fff0f0;
  color: #9b1c1c;
  border: 1px solid rgba(180, 35, 24, .25);
}

.col-attestato-report {
  font-weight: 700;
  text-align: center;
}

.btn-rilascio-automatico-attestati {
  margin-left: 8px;
}

.btn-rilascio-attestato-singolo {
  margin-left: 6px;
}


/* Report iscritti - attestati */
.col-attestato-report {
  text-align: center;
  font-weight: 700;
}

.status.danger {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0f0;
  color: #9b1c1c;
  border: 1px solid rgba(180, 35, 24, .25);
  font-weight: 700;
}

.btn-rilascio-automatico-attestati-finale {
  margin-left: 8px;
}

.azioni-report-iscritti {
  min-width: 210px;
}

.azioni-report-iscritti .btn {
  margin: 2px;
  white-space: nowrap;
}

/* =========================================================
   REPORT ISCRITTI - AZIONI VERTICALI E ATTESTATI
========================================================= */

.report-attestati-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px 0;
  padding: 12px;
  border-radius: 14px;
  background: #eef6ff;
  border: 1px solid rgba(20, 103, 179, .18);
  box-shadow: 0 8px 18px rgba(18, 38, 63, 0.06);
}

.azioni-report-iscritti {
  min-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.azioni-report-iscritti .btn {
  width: 100%;
  margin: 0 !important;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
  padding: 7px 9px;
}

.col-attestato-report {
  text-align: center;
  font-weight: 700;
}

.status.danger {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0f0;
  color: #9b1c1c;
  border: 1px solid rgba(180, 35, 24, .25);
  font-weight: 700;
}
/* =========================================================
   UI_DOCENTI_CHIARA_V1
   Area docenti più guidata
========================================================= */

.teacher-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.teacher-flow.compact {
  margin: 10px 0 0;
}

.teacher-step {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.teacher-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 800;
  background: #eef4ff;
  color: #123a74;
  margin-bottom: 8px;
}

.teacher-step strong {
  display: block;
  font-size: 0.98rem;
  color: #0f172a;
}

.teacher-step small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  line-height: 1.35;
}

.admin-docenti-guida {
  border-left: 5px solid #123a74;
}

@media (max-width: 900px) {
  .teacher-flow {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 560px) {
  .teacher-flow {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   AREA_DOCENTE_REGISTRI_MODIFICABILI_CSS_V1
   Area docente - calendario e registri più chiari
========================================================= */

.docente-step-card {
  border-left: 5px solid #123a74;
}

.registro-edit-help {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef4ff;
  color: #123a74;
  font-size: 0.95rem;
  line-height: 1.4;
}

#registroDashboardPresenzeBox select {
  min-width: 210px;
}

#registriCorsoDashboardDocenteBox td .btn {
  white-space: nowrap;
}


/* =========================================================
   RIMUOVI_NOMINATIVO_REGISTRO_DOCENTE_CSS_V1
   Registro docente - rimozione nominativo
========================================================= */

#registroDashboardPresenzeBox td:last-child {
  white-space: nowrap;
}

#registroDashboardPresenzeBox .btn.danger.small {
  padding: 7px 10px;
}

.registro-edit-help strong {
  font-weight: 800;
}


/* =========================================================
   DELETE_REGISTRO_PRESENZE_DOCENTE_CSS_V1
   Area docente - elimina registro
========================================================= */

.btn-elimina-registro-docente {
  margin-left: 6px;
}

#registriCorsoDashboardDocenteBox td:last-child {
  white-space: nowrap;
}


/* =========================================================
   AREA ADMIN v2 (ottobre 2026)
   Schede, elenco corsi, pagina "Gestisci questo corso"
========================================================= */

.adm {
  --adm-blue: #0b3d75;
  --adm-blue-soft: #eef4fc;
  --adm-line: #dde5f0;
  --adm-text-soft: #5b6779;
  --adm-green: #15803d;
  --adm-green-soft: #e8f6ee;
  --adm-amber: #a16207;
  --adm-amber-soft: #fdf5e1;
  --adm-red: #b42318;
  --adm-red-soft: #fdeceb;
  --adm-grey-soft: #f1f3f6;
  max-width: 1240px;
}

.adm .card { margin-bottom: 18px; }
.adm h3 { margin: 0 0 6px; }
.adm .muted { color: var(--adm-text-soft); }

/* Intestazione */
.adm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0b3d75, #125ca8);
  box-shadow: 0 12px 28px rgba(11, 61, 117, 0.18);
}

.adm-topbar-brand { display: flex; align-items: center; gap: 14px; }
.adm-logo { width: 48px; height: 48px; border-radius: 12px; background: #fff; object-fit: contain; padding: 4px; }
.adm-eyebrow { margin: 0; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.adm-topbar h2 { margin: 2px 0 0; font-size: 26px; color: #fff; }
.adm-topbar .btn.light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.35); }

/* Accesso */
.adm-login { max-width: 560px; }
.adm-login input { font-size: 17px; }

/* Schede */
.adm-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.adm-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--adm-line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.adm-tab:hover { border-color: #9db6d6; }
.adm-tab.active {
  border-color: var(--adm-blue);
  background: var(--adm-blue-soft);
  box-shadow: inset 0 -3px 0 var(--adm-blue);
}
.adm-tab-title { font-weight: 700; font-size: 16px; color: var(--adm-blue); }
.adm-tab-sub { font-size: 13px; color: var(--adm-text-soft); }

/* Percorso in 6 passi */
.adm-steps h3 { font-size: 17px; margin-bottom: 12px; }
.adm-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.adm-steps-list li {
  background: #fff;
  border: 1px solid var(--adm-line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-steps-list li span {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--adm-blue); color: #fff; font-weight: 700; font-size: 14px;
}
.adm-steps-list li strong { font-size: 15px; }
.adm-steps-list li small { color: var(--adm-text-soft); line-height: 1.35; }

/* Contatori */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.adm-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--adm-line);
  border-left-width: 5px;
  background: #fff;
  font: inherit; color: var(--text);
  cursor: pointer; text-align: left;
}
.adm-stat strong { font-size: 26px; line-height: 1; }
.adm-stat span { font-size: 13px; color: var(--adm-text-soft); }
.adm-stat-aperto { border-left-color: var(--adm-green); }
.adm-stat-bozza { border-left-color: #8a94a6; }
.adm-stat-chiuso { border-left-color: var(--adm-amber); }
.adm-stat-finito { border-left-color: #475467; }
.adm-stat- { border-left-color: var(--adm-blue); }
.adm-stat:hover { box-shadow: 0 6px 16px rgba(18,38,63,.08); }

/* Barra titolo + filtri */
.adm-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.adm-toolbar-title p { margin: 0; }
.adm-btn-big { font-size: 16px; padding: 12px 20px; }

.adm-filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr auto;
  gap: 12px;
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--adm-grey-soft);
}
.adm-filters .field { margin: 0; }

/* Etichette situazione */
.adm-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.adm-badge-aperto { background: var(--adm-green-soft); color: var(--adm-green); }
.adm-badge-bozza { background: var(--adm-grey-soft); color: #475467; }
.adm-badge-chiuso { background: var(--adm-amber-soft); color: var(--adm-amber); }
.adm-badge-finito { background: #e7e9ee; color: #344054; }
.adm-type { font-size: 13px; color: var(--adm-text-soft); }

/* Riquadri dell'elenco corsi: da svolgere, in corso, terminati (v1.37) */
.adm-fase { margin-top: 14px; padding: 14px; border: 1px solid var(--adm-line); border-top: 4px solid var(--adm-blue); border-radius: 14px; background: #f8fafc; }
.adm-fase:first-child { margin-top: 0; }
.adm-fase-incorso { border-top-color: var(--adm-green); }
.adm-fase-terminati { border-top-color: #475467; }
.adm-fase-titolo { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 18px; }
.adm-fase-numero { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--adm-line); font-size: 13px; text-align: center; }
.adm-fase-vuoto { margin: 0; color: var(--adm-text-soft); font-size: 14px; }

/* Schede corso nell'elenco */
.adm-course-list { display: flex; flex-direction: column; gap: 10px; }
.adm-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--adm-line);
  border-left: 5px solid #8a94a6;
  border-radius: 14px;
  background: #fff;
}
.adm-course-aperto { border-left-color: var(--adm-green); }
.adm-course-chiuso { border-left-color: var(--adm-amber); }
.adm-course-finito { border-left-color: #475467; opacity: .9; }
.adm-course-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-course h4 { margin: 6px 0 4px; font-size: 17px; }
.adm-course-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--adm-text-soft); }
.adm-course-meta b { color: var(--text); font-weight: 600; }
.adm-course-side .btn { white-space: nowrap; }

/* Pagina del singolo corso */
.adm-back { margin-bottom: 12px; }
.adm-course-head h3 { font-size: 22px; margin: 8px 0 12px; }
.adm-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0 0 14px;
}
.adm-facts div { min-width: 0; }
.adm-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-text-soft); }
.adm-facts dd { margin: 2px 0 0; font-weight: 600; }
.adm-situation {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--adm-grey-soft);
}
.adm-situation-aperto { background: var(--adm-green-soft); }
.adm-situation-chiuso { background: var(--adm-amber-soft); }
.adm-warn-text { color: var(--adm-red); font-weight: 600; }

.adm-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.adm-group {
  background: #fff;
  border: 1px solid var(--adm-line);
  border-radius: 16px;
  padding: 16px;
}
.adm-group h4 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--adm-blue);
}
.adm-group h4 span {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--adm-blue); color: #fff; font-size: 13px;
}
.adm-group-danger { border-color: #f3c5c1; background: #fffafa; }
.adm-group-danger h4 { color: var(--adm-red); }

.adm-action {
  display: grid;
  grid-template-columns: 230px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px dashed var(--adm-line);
}
.adm-action:first-of-type { border-top: 0; }
.adm-action .btn { width: 100%; text-align: center; }
.adm-action small { color: var(--adm-text-soft); line-height: 1.35; font-size: 13.5px; }
.adm-action-off small { font-style: italic; }
.adm-action .btn.is-current { outline: 3px solid #f2c94c; outline-offset: 1px; }

/* Strumenti aperti sotto la scheda (iscritti, calendario, registri) */
.adm-tool { border-top: 4px solid var(--adm-blue); }
.adm-tool-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-tool-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0;
}
.adm-tool-group {
  border: 1px solid var(--adm-line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfcfe;
}
.adm-tool-group h4 { margin: 0 0 6px; font-size: 15px; color: var(--adm-blue); }
.adm-tool-group .adm-action { grid-template-columns: 210px 1fr; }
.adm-tool-group .adm-action:has(.adm-num) { grid-template-columns: 24px 210px 1fr; }
.adm-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--adm-blue); color: #fff; font-size: 13px; font-weight: 700;
}
.adm-hint { font-weight: 400; font-size: 12.5px; color: var(--adm-amber); margin-left: 6px; }

.adm-legend {
  margin: 4px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--adm-blue-soft);
}
.adm-legend summary { cursor: pointer; font-weight: 600; color: var(--adm-blue); }
.adm-legend ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.55; }

.adm-count { margin: 0 0 10px; color: var(--adm-text-soft); }

/* Tabella iscritti */
.adm .iscrizioni-admin-card table.adm-iscritti-table { min-width: 1700px; }
.adm-persona strong, .adm-persona small { display: block; }
.adm-persona .adm-nota-correzione { color: var(--adm-blue); font-weight: 600; }
.adm-situazione-iscritto .adm-pill { display: block; margin-bottom: 4px; width: max-content; }
.adm-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.adm-pill.ok { background: var(--adm-green-soft); color: var(--adm-green); }
.adm-pill.warn { background: var(--adm-amber-soft); color: var(--adm-amber); }
.adm-pill.ko { background: var(--adm-red-soft); color: var(--adm-red); }
.adm-pill.neutral { background: var(--adm-grey-soft); color: #475467; }

.adm-row-group {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-bottom: 6px;
}
.adm-row-group > span {
  width: 82px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--adm-text-soft);
}
.adm-row-group .btn.small { padding: 5px 9px; font-size: 13px; }
.adm-row-annullata td { opacity: .55; }

/* Pulsanti di stato mancanti nello stile base */
.adm .btn.success { background: var(--adm-green); color: #fff; border-color: var(--adm-green); }
.adm .btn.success:hover { background: #116632; }
.adm .btn.danger { background: var(--adm-red); color: #fff; border-color: var(--adm-red); }

/* Docenti, ricerca, importazione, guida */
.adm-explain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.adm-explain div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 12px; background: var(--adm-grey-soft);
}
.adm-explain span { font-size: 13.5px; color: var(--adm-text-soft); }

.adm-search-row { display: flex; gap: 10px; margin: 12px 0 16px; flex-wrap: wrap; }
.adm-search-row input { flex: 1 1 280px; }

.adm-howto { margin: 6px 0 16px; padding-left: 22px; line-height: 1.6; }

.adm-guide h4 { margin: 22px 0 8px; color: var(--adm-blue); }
.adm-guide-table { width: 100%; border-collapse: collapse; }
.adm-guide-table td { padding: 9px 10px; border-top: 1px solid var(--adm-line); vertical-align: top; white-space: normal; }
.adm-guide-table td:first-child { width: 260px; }

/* Finestra crea/modifica corso */
.adm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  margin: 0 !important;
  padding: 24px 16px;
  border: 0;
  border-radius: 0;
  background: rgba(15, 30, 55, 0.55);
  overflow-y: auto;
  box-shadow: none;
  max-width: none;
}
.adm-modal.hidden { display: none; }
.adm-modal-inner {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 0 24px 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.adm-modal-header {
  position: sticky; top: -24px; z-index: 2;
  background: #fff;
  padding: 18px 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--adm-line);
  margin: 0;
}
.adm-modal-header h3 { margin: 0; font-size: 22px; }
.adm-modal-intro { margin: 12px 0 6px; }
body:has(#creaCorsoBox:not(.hidden)) { overflow: hidden; }
body:has(#modificaIscrizioneBox:not(.hidden)) { overflow: hidden; }
body:has(#richiestaDocumentiBox:not(.hidden)) { overflow: hidden; }
/* .card-header ha lo sfondo trasparente (!important): l'intestazione ferma delle finestre deve coprire i campi che scorrono */
.adm-modal .adm-modal-header { background: #fff !important; }

.adm-fieldset {
  border: 1px solid var(--adm-line);
  border-radius: 14px;
  padding: 14px 16px 6px;
  margin: 14px 0;
}
.adm-fieldset legend {
  display: flex; align-items: center; gap: 8px;
  padding: 0 6px;
  font-weight: 700; font-size: 16px; color: var(--adm-blue);
}
.adm-fieldset legend span {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--adm-blue); color: #fff; font-size: 13px;
}
.adm-fieldset legend small { font-weight: 400; color: var(--adm-text-soft); }
.adm-help { display: block; margin-top: 4px; font-size: 12.5px; color: var(--adm-text-soft); }
.adm-note {
  padding: 10px 12px; border-radius: 10px;
  background: var(--adm-blue-soft); font-size: 14px; line-height: 1.45;
}
.adm-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.adm-details { padding-bottom: 12px; }
.adm-details summary { cursor: pointer; font-weight: 600; color: var(--adm-text-soft); }
#docentiAssegnatiCorsoBox > .btn { margin: 4px 0 10px; }

.adm-modal-footer {
  position: sticky; bottom: -24px;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 0 20px;
  background: #fff;
  border-top: 1px solid var(--adm-line);
}
.adm-modal-footer .btn.primary { font-size: 16px; padding: 12px 26px; }
#esitoCorso:not(.hidden) { margin-bottom: 20px; }

/* Schermi stretti */
@media (max-width: 1000px) {
  .adm-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-steps-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-groups, .adm-tool-groups { grid-template-columns: 1fr; }
  .adm-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .adm-tabs, .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-steps-list { grid-template-columns: 1fr 1fr; }
  .adm-filters, .adm-facts, .adm-explain { grid-template-columns: 1fr; }
  .adm-course { flex-direction: column; align-items: stretch; }
  .adm-action,
  .adm-tool-group .adm-action,
  .adm-tool-group .adm-action:has(.adm-num) { grid-template-columns: 1fr; }
  .adm-num { display: none; }
  .adm-guide-table td:first-child { width: auto; }
}

/* Area admin a schermo intero */
body.adm-mode > header,
body.adm-mode > footer,
body.adm-mode main > *:not(#adminSection):not(datalist) {
  display: none !important;
}
body.adm-mode #adminSection { padding-top: 20px; }

.adm-row-actions { min-width: 560px; white-space: normal !important; }
.adm-row-group .btn { display: inline-block; width: auto; margin: 0; }

.adm .btn.adm-btn-danger-soft { color: #b42318; border-color: #f0b4ae; background: #fff; }
.adm .btn.adm-btn-danger-soft:hover { background: #fdeceb; }

@media (max-width: 640px) {
  .adm-tab-sub { display: none; }
  .adm-topbar h2 { font-size: 21px; }
}

.adm-help-list { margin: 0 0 10px; padding-left: 20px; line-height: 1.5; font-size: 14px; }
#testoBandoArbitroBox textarea { font-family: inherit; line-height: 1.5; }


/* =========================================================
   AREA DOCENTI v2 (ottobre 2026)
   Usa gli stessi stili "adm-" dell'area admin (classe .adm sulla sezione)
========================================================= */

/* Area docenti a schermo intero */
body.doc-mode > header,
body.doc-mode > footer,
body.doc-mode main > *:not(#docentiSection):not(datalist) {
  display: none !important;
}
body.doc-mode #docentiSection { padding-top: 20px; }

/* Prima dell'accesso: accesso a sinistra, "Come funziona" a destra */
.doc-access {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.doc-access .card { margin-bottom: 0; }
.doc-access .field { margin-bottom: 12px; }
.doc-access input { font-size: 16px; }

.doc-first-time {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: var(--adm-blue-soft);
}
.doc-first-time span { color: var(--adm-text-soft); font-size: 14px; }
.doc-first-time .btn { align-self: flex-start; margin-top: 4px; }
.doc-help-line { margin: 14px 0 0; font-size: 13.5px; color: var(--adm-text-soft); }

.doc-howto h3 { margin-bottom: 12px; }
.doc-howto-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.doc-howto-list li { display: flex; gap: 12px; align-items: flex-start; }
.doc-howto-list li > span {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--adm-blue); color: #fff; font-weight: 700;
}
.doc-howto-list strong { display: block; font-size: 15.5px; }
.doc-howto-list small { color: var(--adm-text-soft); line-height: 1.4; font-size: 14px; }

/* Dopo l'accesso */
.doc-welcome {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.doc-welcome h3 { font-size: 22px; margin: 0 0 4px; }
.doc-welcome p { margin: 0; }
.doc-list-title { margin: 0 0 12px; color: var(--adm-blue); font-size: 16px; }
.doc-past summary, .doc-ammessi summary { cursor: pointer; font-weight: 700; color: var(--adm-blue); }
.doc-past[open] summary, .doc-ammessi[open] summary { margin-bottom: 12px; }

.doc-todo { border-left: 5px solid var(--gold, #d7a928); }
.doc-todo h4 { margin: 0 0 8px; color: var(--adm-blue); font-size: 16px; }
.doc-todo ol { margin: 0; padding-left: 20px; line-height: 1.6; }

#docentiSection .docente-step-card { border-left: 5px solid var(--adm-blue); }
#docentiSection .docente-step-card > h4,
#docentiSection .docente-step-card .card-header h4 { font-size: 18px; color: var(--adm-blue); margin: 0 0 6px; }

.doc-steps-inline { margin: 8px 0 14px; padding-left: 22px; line-height: 1.6; }
#docentiSection .calendario-docente-avviso { display: none; }

/* Registro presenze */
.doc-registro { border: 2px solid var(--adm-blue); }
.doc-registro h4 { font-size: 18px; color: var(--adm-blue); margin: 0 0 6px; }
.doc-mark-all { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.doc-mark-all span { font-size: 14px; color: var(--adm-text-soft); }
.doc-save-bar { justify-content: flex-end; border-top: 1px solid var(--adm-line); padding-top: 12px; margin-top: 12px; }

#registroDashboardPresenzeBox select.presenza-corsista { min-width: 230px; font-weight: 600; }
#registroDashboardPresenzeBox select[data-stato="presente"] { background: var(--adm-green-soft); color: var(--adm-green); border-color: #a7dcb9; }
#registroDashboardPresenzeBox select[data-stato="assente"] { background: var(--adm-red-soft); color: var(--adm-red); border-color: #f0b4ae; }
#registroDashboardPresenzeBox select[data-stato="ritardo_meno_30"] { background: var(--adm-amber-soft); color: var(--adm-amber); border-color: #ecd28c; }

@media (max-width: 900px) {
  .doc-access { grid-template-columns: 1fr; }
}

#docentiSection .docente-step-card { border-left: 5px solid var(--adm-blue) !important; }
#docentiSection .doc-todo { border-left: 5px solid #d7a928 !important; }
#docentiSection .adm-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { #docentiSection .adm-facts { grid-template-columns: 1fr 1fr; } }


/* =========================================================
   PARTE PUBBLICA v2 (ottobre 2026)
   Home per chi si iscrive, schede corso, modulo di iscrizione
========================================================= */

/* Riprende colori ed etichette dell'area admin anche fuori dalla sezione .adm */
body {
  --adm-blue: #0b3d75;
  --adm-blue-soft: #eef4fc;
  --adm-line: #dde5f0;
  --adm-text-soft: #5b6779;
  --adm-green: #15803d;
  --adm-green-soft: #e8f6ee;
  --adm-amber: #a16207;
  --adm-amber-soft: #fdf5e1;
  --adm-red: #b42318;
  --adm-red-soft: #fdeceb;
  --adm-grey-soft: #f1f3f6;
}

.pub-btn-big { font-size: 16px !important; padding: 13px 22px !important; }

/* Home */
.pub-staff-links {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--adm-text-soft);
}
.pub-link {
  background: none;
  border: 0;
  padding: 0 2px;
  font: inherit;
  color: var(--adm-blue);
  text-decoration: underline;
  cursor: pointer;
}

.pub-steps h2 { margin: 0 0 12px; font-size: 20px; color: var(--adm-blue); }
.pub-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pub-steps li { display: flex; gap: 12px; align-items: flex-start; }
.pub-steps li > span {
  flex: 0 0 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--adm-blue); color: #fff; font-weight: 700;
}
.pub-steps strong { display: block; font-size: 15.5px; }
.pub-steps small { color: var(--adm-text-soft); line-height: 1.4; font-size: 14px; }

/* Schede dei corsi */
.pub-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.pub-course {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--adm-line);
  border-top: 5px solid var(--adm-green);
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 38, 63, 0.06);
}
.pub-course-chiuso { border-top-color: var(--adm-amber); }
.pub-course-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-course h3 { margin: 2px 0; font-size: 19px; line-height: 1.3; color: var(--text); }
.pub-course-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; }
.pub-course-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-text-soft); }
.pub-course-facts dd { margin: 2px 0 0; font-weight: 600; }
.pub-course-facts small { font-weight: 400; color: var(--adm-text-soft); }
.pub-course-closed { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--adm-amber-soft); color: var(--adm-amber); font-weight: 600; }
.pub-course-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.pub-course-actions .btn.primary { flex: 1 1 auto; font-size: 15.5px; }
.pub-empty {
  grid-column: 1 / -1;
  padding: 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed var(--adm-line);
  color: var(--adm-text-soft);
  text-align: center;
}

/* Modulo di iscrizione a schermo intero */
body.iscr-mode > header,
body.iscr-mode > footer,
body.iscr-mode main > *:not(#formIscrizioneSection):not(datalist) {
  display: none !important;
}
.pub-form-section { max-width: 920px; }
.pub-form-top { margin-bottom: 12px; }
.pub-form-card { padding: 26px 28px; }
.pub-form-head .eyebrow { margin: 0 0 4px; }
.pub-form-head h2 { margin: 0 0 8px; font-size: 26px; color: var(--adm-blue); }
.pub-form-course { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-form-course span {
  padding: 4px 10px; border-radius: 999px;
  background: var(--adm-blue-soft); color: var(--adm-blue); font-size: 13.5px; font-weight: 600;
}

.pub-before {
  margin: 18px 0 6px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--adm-amber-soft);
  border: 1px solid #f0dfae;
  line-height: 1.5;
}
.pub-before ul { margin: 6px 0; padding-left: 20px; }
.pub-before span { font-size: 14px; color: var(--adm-text-soft); }
.pub-req { color: var(--adm-red); font-weight: 700; }

.pub-fieldset { --adm-blue: #0b3d75; }
.pub-fieldset .sub-box { margin-top: 12px; }
.pub-fieldset .privacy { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; line-height: 1.45; }
.pub-fieldset .privacy input { margin-top: 3px; transform: scale(1.2); }
.pub-fieldset .firma-canvas { width: 100%; max-width: 560px; border: 2px dashed #9db6d6; border-radius: 12px; background: #fff; touch-action: none; }
.pub-confirm { font-weight: 600; }
.pub-submit-bar { justify-content: flex-end; margin-top: 14px; }
#formIscrizioneSection #esitoIscrizione:not(.hidden) { margin-top: 12px; font-weight: 600; }

.pub-success {
  text-align: center;
  padding: 26px 10px 10px;
}
.pub-success-icon {
  width: 64px; height: 64px; margin: 0 auto 10px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--adm-green); color: #fff; font-size: 34px; font-weight: 700;
}
.pub-success h3 { font-size: 24px; margin: 0 0 8px; color: var(--adm-green); }
.pub-success ul { text-align: left; max-width: 560px; margin: 14px auto 20px; line-height: 1.55; }

@media (max-width: 640px) {
  .pub-course-grid { grid-template-columns: 1fr; }
  .pub-course-facts { grid-template-columns: 1fr; }
  .pub-form-card { padding: 18px 14px; }
  .pub-form-head h2 { font-size: 21px; }
  .pub-submit-bar .btn { flex: 1 1 auto; }
}

/* Pagina "Gestisci la tua iscrizione" (link nell email di conferma) */
body.gest-mode > header,
body.gest-mode main > *:not(#gestisciIscrizioneSection):not(datalist) { display: none !important; }
.pub-cancel-box {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid #f3c5c1; background: #fffafa;
}
.pub-cancel-box strong { display: block; color: var(--adm-red); }
.pub-cancel-box span { font-size: 14px; color: var(--adm-text-soft); }
#gestisciIscrizioneSection .adm-btn-danger-soft { color: #b42318; border-color: #f0b4ae; background: #fff; }
#gestisciIscrizioneIntro { margin: 6px 0 0; }


/* =========================================================
   ACCESSIBILITÀ (ottobre 2026)
========================================================= */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #125ca8 !important;
  outline-offset: 2px;
}

input, select, textarea {
  font-size: 16px;
}

.adm-sottotitolo-campo { margin: 18px 0 4px; font-size: 15px; color: var(--adm-blue); }
#testoBandoArbitroBox .pub-link { margin-left: 4px; }

.pub-course-desc { margin: 0; color: var(--adm-text-soft); font-size: 14.5px; line-height: 1.45; white-space: pre-line; }
.adm-copy-note { margin: 8px 0 12px; padding: 12px 14px; border: 1px solid #f0c36d; border-left: 5px solid #e0a100; border-radius: 10px; background: #fff8e6; color: #5c4300; font-size: 14.5px; line-height: 1.5; }
.adm-copy-note ol { margin: 6px 0; padding-left: 22px; }

/* ---------- Utenti admin e permessi ---------- */
body.adm-no-corsi_dati [data-perm="corsi_dati"],
body.adm-no-corsi_pubblicazione [data-perm="corsi_pubblicazione"],
body.adm-no-corsi_elimina [data-perm="corsi_elimina"],
body.adm-no-iscritti_vedi [data-perm="iscritti_vedi"],
body.adm-no-iscritti_gestisci [data-perm="iscritti_gestisci"],
body.adm-no-attestati [data-perm="attestati"],
body.adm-no-lezioni [data-perm="lezioni"],
body.adm-no-docenti [data-perm="docenti"],
body.adm-no-importa [data-perm="importa"],
body.adm-no-iscritti [data-perm="iscritti"],
body.adm-no-selezione_iscritti [data-perm="selezione_iscritti"],
body.adm-no-principale [data-perm="principale"] { display: none !important; }

.adm-whoami { font-size: 13px; color: var(--adm-text-soft); margin-right: 8px; }
.adm-login-step { margin: 10px 0; }
.adm-login-step p { margin: 0 0 8px; line-height: 1.5; }
.adm-login-step .adm-num { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.adm-login-note { font-size: 13.5px; margin: 6px 0 14px; }
.adm-login-pin { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--adm-border, #e2e8f0); }
.adm-login-pin summary { cursor: pointer; font-weight: 600; color: var(--adm-blue); margin-bottom: 10px; }

.adm-user-form { margin: 14px 0 18px; padding: 16px; border: 1px solid var(--adm-border, #e2e8f0); border-radius: 12px; background: #f8fafc; }
.adm-user-form h4 { margin: 0 0 10px; color: var(--adm-blue); }
.adm-user-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.adm-perm-intro { margin: 12px 0 8px; font-size: 14.5px; }
.adm-perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.adm-perm { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--adm-border, #e2e8f0); border-radius: 10px; background: #fff; cursor: pointer; }
.adm-perm input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.adm-perm span { display: flex; flex-direction: column; gap: 2px; }
.adm-perm small { color: var(--adm-text-soft); font-size: 12.5px; line-height: 1.35; }
.adm-perm:has(input:checked) { border-color: var(--adm-blue); background: #eef4ff; }
.adm-user-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.adm-user-card { padding: 14px 16px; border: 1px solid var(--adm-border, #e2e8f0); border-radius: 12px; margin-top: 12px; }
.adm-user-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.adm-user-head > div { display: flex; flex-direction: column; gap: 2px; }
.adm-user-head small { color: var(--adm-text-soft); }
.pub-course-facts .pub-fact-wide { grid-column: 1 / -1; }

/* ---------- Calendario lezioni: inserimento da admin ---------- */
.adm-lezione-form { margin: 14px 0 18px; padding: 16px; border: 1px solid var(--adm-border, #e2e8f0); border-radius: 12px; background: #f8fafc; }
.adm-lezione-form.is-editing { border-color: #e0a100; background: #fff8e6; }
.adm-lezione-form h4 { margin: 0 0 4px; color: var(--adm-blue); }
.adm-lezione-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 12px; margin-top: 10px; }
.adm-lezione-grid .field:first-child, .adm-lezione-grid .field:nth-child(2), .adm-lezione-note { grid-column: span 2; }
.adm-lezione-azioni { white-space: nowrap; }
.adm-lezione-azioni .btn + .btn { margin-left: 6px; }
@media (max-width: 640px) {
  .adm-lezione-grid .field:first-child, .adm-lezione-grid .field:nth-child(2), .adm-lezione-note { grid-column: auto; }
}

.adm-docente-azioni { white-space: nowrap; }
.adm-docente-azioni .btn { margin: 2px 4px 2px 0; }

/* ---------- Password docenti ---------- */
.adm-password-box { margin-top: 0; }
.adm-password-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.adm-password-row .field { flex: 1 1 240px; margin: 0; }
.adm-password-row input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; }
.doc-forgot { margin-left: 12px; align-self: center; }
.doc-recupero-passo { margin: 14px 0; }
.doc-recupero-passo > p { margin: 0 0 8px; line-height: 1.5; }
.doc-recupero-passo .adm-num { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.adm-topbar .adm-whoami { color: rgba(255, 255, 255, .88); font-weight: 600; }

/* =========================================================
   PAGINA INIZIALE IN UNA SCHERMATA (ottobre 2026)
   Su computer occupa esattamente lo schermo: l'elenco dei corsi scorre al suo interno.
   Su telefono e schermi bassi torna lo scorrimento normale della pagina.
========================================================= */
body:not(.adm-mode):not(.doc-mode):not(.iscr-mode):not(.gest-mode) > footer { display: none; }

.home-app {
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1240px;
  margin: 0 auto;
}

.home-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0b3d78, #115aa3);
  color: #fff;
  box-shadow: 0 10px 30px rgba(11, 61, 120, .18);
}
.home-bar-brand { display: flex; align-items: center; gap: 14px; }
.home-bar-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; }
.home-bar-eyebrow { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.home-bar h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; color: #fff; }
.home-bar-staff { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.home-bar-staff span { opacity: .85; }
.home-staff-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff;
}
.home-staff-btn:hover, .home-staff-btn:focus-visible { background: rgba(255, 255, 255, .25); }

.home-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; }

.home-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 12px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--adm-line);
  box-shadow: 0 8px 24px rgba(15, 35, 70, .06);
}

.home-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.home-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.home-tab {
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--adm-line); background: var(--adm-blue-soft); color: var(--adm-blue);
  display: inline-flex; align-items: center; gap: 8px;
}
.home-tab.active { background: var(--adm-blue); border-color: var(--adm-blue); color: #fff; }
.home-tab-n {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 13px; text-align: center;
  background: #fff; color: var(--adm-blue);
}
.home-filter { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--adm-text-soft); }
.home-filter select { min-width: 190px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--adm-line); font: inherit; font-size: 14px; color: inherit; background: #fff; }

.home-intro { margin: 10px 0 10px; font-size: 14.5px; color: var(--adm-text-soft); }

.home-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 4px 2px 0;
  scrollbar-gutter: stable;
}
.home-list:focus-visible { outline: 2px solid var(--adm-blue); outline-offset: 2px; border-radius: 12px; }
.home-list-hint { margin: 8px 0 0; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--adm-blue); }

.home-course {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--adm-line);
  border-left: 5px solid var(--adm-green);
  background: #fbfcfe;
}
.home-course.is-chiuso { border-left-color: var(--adm-amber); }
.home-course-top { display: flex; gap: 8px; align-items: center; }
.home-course h3 { margin: 6px 0 2px; font-size: 17px; color: #0f1f36; }
.home-course-desc {
  margin: 0 0 6px; font-size: 14px; color: var(--adm-text-soft); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-course-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; font-weight: 600; color: #1d2b40; }
.home-course-facts span { display: block; font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--adm-text-soft); }
.home-course .pub-course-closed { margin: 6px 0 0; }
.home-course-actions { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.home-course-actions .btn { width: 100%; white-space: nowrap; }

.home-side {
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--adm-line);
  box-shadow: 0 8px 24px rgba(15, 35, 70, .06);
}
.home-side h2 { font-size: 18px; }
.home-side ol { gap: 14px; }
.home-side-help { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--adm-line); font-size: 13.5px; color: var(--adm-text-soft); }

/* Schermi stretti o bassi: la pagina torna a scorrere normalmente */
@media (max-width: 900px), (max-height: 600px) {
  .home-app { height: auto; padding: 12px; }
  .home-body { grid-template-columns: 1fr; }
  .home-list { overflow: visible; }
  .home-list-hint { display: none; }
}
@media (max-width: 640px) {
  .home-bar { padding: 12px 14px; }
  .home-bar h1 { font-size: 22px; }
  .home-bar-logo { width: 44px; height: 44px; }
  .home-tab { flex: 1 1 auto; justify-content: center; font-size: 14px; padding: 9px 10px; }
  .home-filter, .home-filter select { width: 100%; }
  .home-course { grid-template-columns: 1fr; }
  .home-course-actions { min-width: 0; }
}

/* Righe dei corsi più compatte: più corsi visibili senza scorrere */
.home-course { padding: 10px 14px; gap: 14px; }
.home-course-top { flex-wrap: wrap; row-gap: 4px; }
.home-course-top h3 { margin: 0 6px 0 0; font-size: 16.5px; }
.home-course-desc { -webkit-line-clamp: 1; margin: 3px 0 4px; font-size: 13.5px; }
.home-course-facts { gap: 2px 16px; font-size: 13.5px; }
.home-course-facts li { white-space: nowrap; }
.home-course-facts span { display: inline; margin-right: 5px; font-size: 11px; }
.home-course-actions { min-width: 170px; gap: 6px; }
.home-course-actions .btn { padding: 8px 12px; font-size: 14px; }
.home-toolbar { align-items: center; }
.home-filter { flex-direction: row; align-items: center; gap: 8px; }
.home-intro { margin: 8px 0; }
.home-app { animation: none; }
.home-body { grid-template-columns: minmax(0, 1fr) 260px; }
.home-course-facts { gap: 2px 12px; font-size: 13px; }
.home-course-facts { display: grid; grid-template-columns: repeat(3, max-content); gap: 2px 20px; }
@media (max-width: 1100px) { .home-course-facts { grid-template-columns: repeat(2, max-content); } }
@media (max-width: 640px) { .home-course-facts { grid-template-columns: 1fr; } .home-course-facts li { white-space: normal; } }
/* (ripetuto in fondo: deve valere dopo le regole sopra) */
@media (max-width: 900px), (max-height: 600px) {
  .home-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-bar-staff span { flex-basis: 100%; }
}
@media (max-width: 640px) { .home-course-desc { -webkit-line-clamp: 4; } }

/* ---------- Proposte di lezione da confermare ---------- */
.adm-proposte { margin: 14px 0 18px; padding: 14px 16px; border-radius: 12px; border: 1px solid #f0c36d; border-left: 5px solid #e0a100; background: #fff8e6; }
.adm-proposte h4 { margin: 0 0 4px; color: #7a5200; }
.adm-proposte table { background: #fff; }
.adm-proposte-vuote { display: flex; flex-direction: column; gap: 2px; border-color: var(--adm-line); border-left-color: var(--adm-line); background: #f8fafc; font-size: 14px; }
.adm-proposte-vuote span { color: var(--adm-text-soft); }
.adm-proposte-avviso { margin: 6px 0 0; display: inline-block; padding: 4px 10px; border-radius: 999px; background: #fff3d1; color: #7a5200; font-size: 13px; font-weight: 700; }
.adm-proposte small.adm-warn-text, .adm-motivo { display: block; font-size: 12.5px; margin-top: 2px; }
.adm-motivo { color: var(--adm-text-soft); }
.adm-pill.warn { background: #fff3d1; color: #7a5200; }
.adm-pill.ko { background: var(--adm-red-soft); color: var(--adm-red); }
.adm-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-user-form .adm-check { margin: 12px 0 0; font-weight: 500; }
.adm-user-form .adm-check input { width: 18px; height: 18px; flex: none; margin: 0; }

/* =========================================================
   REVISIONE 24/10/2026 – correzioni di stile
========================================================= */
/* Pulsanti "rossi tenui" (elimina, togli l'accesso, non accettare, ritira...): prima apparivano blu */
.btn.light.adm-btn-danger-soft,
.adm .btn.light.adm-btn-danger-soft,
#gestisciIscrizioneSection .btn.light.adm-btn-danger-soft {
  color: #b42318 !important;
  border-color: #f0b4ae !important;
  background: #fff !important;
}
.btn.light.adm-btn-danger-soft:hover { background: #fdeceb !important; }

/* Schede dell'area admin: tante colonne quante sono le schede visibili */
.adm-tabs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Griglie che su telefono uscivano dallo schermo */
.checkbox-grid-larga { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.adm-perm-list { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.adm-modal-footer { flex-wrap: wrap; }

/* Riga "docente + argomento" nel modulo corso */
.docente-corso-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) auto; gap: 10px; align-items: end; }
.docente-corso-row select { max-width: 100%; }
@media (max-width: 640px) {
  .docente-corso-row { grid-template-columns: 1fr; }
  .home-course-actions { min-width: 0; }
}

/* Anteprima importazione */
.adm-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }

/* I campi non "saltano" quando si selezionano */
input:focus, select:focus, textarea:focus { transform: none !important; }

/* Righe annullate leggibili */
.adm-row-annullata td { opacity: 1; color: #6b7280; background: #f8f9fb; }

/* Piè di pagina della pagina iniziale: chi gestisce il portale */
.home-footer { flex: none; margin: 0; text-align: center; font-size: 12.5px; line-height: 1.4; color: var(--adm-text-soft); }
.home-footer strong { font-weight: 600; color: #344054; }
.home-footer a, footer a { color: var(--adm-blue); }

/* Collegamenti alle pagine legali nel piè di pagina */
.home-footer a, footer a { white-space: nowrap; }

/* Regole del certificato medico per tipo di corso */
.adm-regole-cert { margin-bottom: 16px; }
.adm-regole-cert summary { cursor: pointer; }
.adm-regole-legenda { margin: 8px 0 12px; padding-left: 20px; font-size: 14px; color: var(--adm-text-soft); }
.adm-regole-righe { display: flex; flex-direction: column; gap: 8px; }
.adm-regola { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: #fff; }
.adm-regola span { font-weight: 600; }
.adm-regola select { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--adm-line); font: inherit; }
@media (max-width: 640px) { .adm-regola { grid-template-columns: 1fr; } }

/* Riquadro della firma: ben visibile, con la scritta "Firma qui" finché non si firma */
.firma-area { position: relative; max-width: 560px; }
.pub-fieldset .firma-area .firma-canvas { display: block; border: 2px dashed #4f74a8; background: #f5f9ff; min-height: 160px; }
.firma-segnaposto {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; color: #8aa3c4; pointer-events: none; letter-spacing: .02em;
}
.firma-area.firmata .firma-segnaposto { display: none; }

/* Avviso: corso riservato ai residenti in Toscana */
.avviso-residenza { padding: 10px 14px; border-radius: 10px; background: #fdecec; border: 1px solid #e3a5a5; color: #8a1f1f; font-weight: 700; font-size: 14px; }
.avviso-residenza.hidden { display: none; }

/* Ammissione di più corsisti insieme */
.adm-selezione-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid #cfe0f5; border-radius: 10px; background: #f5f9ff; }
.adm-selezione-conta { font-weight: 700; min-width: 190px; }
.adm-col-selezione { width: 36px; text-align: center; }
.adm-col-selezione input { width: 18px; height: 18px; cursor: pointer; }
.adm-iscritti-table tr.adm-row-selezionata td { background: #eef5ff; }

/* Elenco iscritti: alto al massimo quanto lo schermo, così la barra per scorrere a destra
   è sempre visibile (senza andare in fondo alla pagina) e le intestazioni restano ferme */
.iscrizioni-admin-card #listaIscrizioni.table-wrap { max-height: calc(100vh - 110px); overflow: auto; overscroll-behavior: contain; }
#listaIscrizioni .adm-count { position: sticky; left: 0; width: max-content; padding: 10px 12px 0; }
/* La barra "Ammetti i selezionati" resta sempre in alto nel riquadro, le intestazioni subito sotto */
#listaIscrizioni .adm-selezione-bar {
  position: sticky; top: 0; left: 0; z-index: 5;
  flex-wrap: nowrap; white-space: nowrap; height: 50px; box-sizing: border-box;
  width: max-content; max-width: calc(100vw - 80px); margin: 0; border-radius: 0 0 10px 0;
}
#listaIscrizioni .adm-selezione-bar small { overflow: hidden; text-overflow: ellipsis; }
/* Schermi stretti: i pulsanti della barra restano raggiungibili scorrendo la barra di lato */
#listaIscrizioni .adm-selezione-bar { overflow-x: auto; overflow-y: hidden; }
#listaIscrizioni table.adm-iscritti-table thead th { position: sticky; top: 50px; z-index: 3; background: #eef3fa; box-shadow: inset 0 -1px 0 #d8e0ec; }
#listaIscrizioni .adm-selezione-bar > .btn,
#listaIscrizioni .adm-selezione-bar > .adm-selezione-conta { flex-shrink: 0; }
#listaIscrizioni table.adm-iscritti-table thead th:first-child { z-index: 4; background: #eef3fa; }

/* Email agli ammessi */
.adm-email-ammessi { display: grid; gap: 10px; margin-top: 10px; padding: 14px; border: 1px solid #cfe0f5; border-radius: 10px; background: #f7faff; }
.adm-email-ammessi.hidden { display: none; }
.adm-email-ammessi textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border: 1px solid #c9d6e8; border-radius: 8px; resize: vertical; }
.adm-email-ammessi .adm-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.adm-email-prova, .adm-email-azioni { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-email-prova input { flex: 1 1 220px; min-width: 0; padding: 7px 10px; border: 1px solid #c9d6e8; border-radius: 8px; }
.adm-email-conteggio { margin: 0; }
.adm-email-avviso { color: #b42318; font-weight: 700; }
.adm-email-ammessi .adm-check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }

/* Area docente: cambio password */
.doc-welcome-azioni { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-avviso-password { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: #fff8e8; border: 1px solid #f0d394; color: #6b4a00; }
.doc-avviso-password.hidden { display: none; }
.doc-cambio-password { display: grid; gap: 10px; max-width: 460px; margin: 12px 0 18px; padding: 16px; border: 1px solid #cfe0f5; border-radius: 12px; background: #f7faff; }
.doc-cambio-password.hidden { display: none; }
.doc-cambio-password h4 { margin: 0; }
.doc-cambio-password .field input { width: 100%; box-sizing: border-box; }
.doc-mostra-password { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.doc-mostra-password input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.doc-cambio-password-azioni { display: flex; flex-wrap: wrap; gap: 8px; }

/* =========================================================
   AREA DOCENTI (nuova, v1.25)
========================================================= */
.dz { display: grid; gap: 16px; }
.dz .hidden { display: none !important; }
.dz-barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; padding: 14px 18px; background: #fff; border: 1px solid var(--adm-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.dz-chi { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dz-chi h3 { margin: 0; font-size: 20px; color: var(--adm-blue); }
.dz-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--adm-blue); color: #fff; font-weight: 700; letter-spacing: .5px; }
.dz-menu { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-menu-voce { border: 1px solid var(--adm-line); background: #fff; color: var(--adm-blue); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.dz-menu-voce:hover { background: var(--adm-blue-soft); }
.dz-menu-voce.attiva { background: var(--adm-blue); border-color: var(--adm-blue); color: #fff; }
.dz-menu-voce.dz-esci { color: var(--adm-red); }
.dz-menu-voce:focus-visible, .dz-passo:focus-visible, .dz-corso:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Cosa devi fare adesso */
.dz-cosa-fare { padding: 18px 20px; border-radius: 14px; background: #fffaf0; border: 2px solid #f3d28a; }
.dz-cosa-fare h4 { margin: 0 0 12px; font-size: 19px; color: #7a4b00; display: flex; align-items: center; gap: 8px; }
.dz-cosa-fare.tutto-ok { background: var(--adm-green-soft); border-color: #a7dcbb; }
.dz-cosa-fare.tutto-ok h4 { color: var(--adm-green); }
.dz-cosa-fare.tutto-ok p { margin: 0; }
.dz-contatore { background: #c2410c; color: #fff; border-radius: 999px; font-size: 13px; padding: 2px 9px; }
.dz-cose { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dz-cosa { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: #fff; border: 1px solid #f0dfb8; border-radius: 12px; padding: 12px 14px; }
.dz-cosa.oggi { border-color: var(--adm-blue); box-shadow: 0 0 0 2px var(--adm-blue-soft); }
.dz-cosa.ko { border-color: #f3b8b2; }
.dz-cosa small { display: block; color: var(--adm-text-soft); margin-top: 2px; }
.dz-cosa-icona { font-size: 24px; }
.dz-attese-titolo { margin: 14px 0 4px; font-weight: 600; color: #7a4b00; }
.dz-attese { margin: 8px 0 0; padding-left: 20px; color: #5b4a20; }

/* Schede dei corsi */
.dz-blocco-titolo { margin: 6px 0 0; font-size: 18px; color: var(--adm-blue); }
.dz-blocco-sotto { margin: 2px 0 10px; }
.dz-corsi { display: grid; gap: 12px; }
.dz-corso { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--adm-line); border-left: 6px solid var(--adm-blue); border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.dz-corso:hover { box-shadow: 0 6px 18px rgba(11, 61, 117, .12); transform: translateY(-1px); }
.dz-corso.concluso { border-left-color: #98a2b3; }
.dz-corso-info { flex: 1 1 420px; min-width: 0; }
.dz-corso h5 { margin: 2px 0 6px; font-size: 17px; color: #101828; }
.dz-occhiello { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--adm-text-soft); }
.dz-corso-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--adm-text-soft); font-size: 14px; }
.dz-corso-stati { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.dz-stato { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; flex-wrap: wrap; }
.dz-stato small { color: var(--adm-text-soft); }
.dz-stato-num { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--adm-blue-soft); color: var(--adm-blue); font-size: 12px; font-weight: 700; }
.dz-corso-apri { pointer-events: none; white-space: nowrap; }
.dz-conclusi summary { cursor: pointer; font-weight: 600; }
.dz-conclusi .dz-corsi { margin-top: 12px; }

/* Etichette di stato */
.dz-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dz-pill.ok { background: var(--adm-green-soft); color: var(--adm-green); }
.dz-pill.warn { background: #fff3d1; color: #7a5200; }
.dz-pill.ko { background: var(--adm-red-soft); color: var(--adm-red); }
.dz-pill.todo { background: #c2410c; color: #fff; }
.dz-pill.neutral { background: var(--adm-grey-soft); color: #475467; }

/* Pagina del corso */
.dz-indietro { justify-self: start; }
.dz-corso-testa h3 { margin: 2px 0 10px; color: var(--adm-blue); }
.dz-passi-guida { margin: 0; color: var(--adm-text-soft); }
.dz-passi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dz-passo { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 2px solid var(--adm-line); border-radius: 14px; padding: 12px 14px; font: inherit; cursor: pointer; color: inherit; }
.dz-passo:hover { border-color: #9db8dc; }
.dz-passo.attivo { border-color: var(--adm-blue); background: var(--adm-blue-soft); }
.dz-passo-num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--adm-blue-soft); color: var(--adm-blue); font-weight: 800; font-size: 17px; }
.dz-passo.attivo .dz-passo-num { background: var(--adm-blue); color: #fff; }
.dz-passo-testo { display: grid; gap: 4px; min-width: 0; }
.dz-passo-testo b { font-size: 16px; }
.dz-pannello { display: grid; gap: 14px; }
.dz-titolo-pannello { margin: 0; font-size: 19px; color: var(--adm-blue); }
.dz-sottotitolo { margin: 6px 0 0; font-size: 15px; }
.dz-istruzioni { background: var(--adm-blue-soft); border: 1px solid #cfe0f5; border-radius: 12px; padding: 12px 16px; color: #1d3557; }
.dz-istruzioni strong { display: block; margin-bottom: 4px; color: var(--adm-blue); }
.dz-istruzioni ol { margin: 4px 0 6px; padding-left: 20px; }
.dz-istruzioni li { margin: 3px 0; }
.dz-nota { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--adm-grey-soft); }

/* Esiti della lezione */
.dz-esito { border-radius: 12px; padding: 14px 16px; border: 1px solid; }
.dz-esito h5 { margin: 0 0 8px; font-size: 17px; }
.dz-esito p { margin: 8px 0 0; }
.dz-esito.ok { background: var(--adm-green-soft); border-color: #a7dcbb; }
.dz-esito.ok h5 { color: var(--adm-green); }
.dz-esito.warn { background: #fffaf0; border-color: #f3d28a; }
.dz-esito.warn h5 { color: #7a4b00; }
.dz-esito.ko { background: var(--adm-red-soft); border-color: #f3b8b2; }
.dz-esito.ko h5 { color: var(--adm-red); }
.dz-esito.neutral { background: var(--adm-grey-soft); border-color: var(--adm-line); }
.dz-lezioni { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dz-lezione { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; background: #fff; border-radius: 10px; padding: 10px 12px; }
.dz-lezione small { display: block; color: var(--adm-text-soft); }
.dz-lezione .dz-motivo { color: var(--adm-red); }
.dz-lezione-azioni, .dz-registro-azioni { display: flex; gap: 6px; flex-wrap: wrap; }
.dz-proposta { display: grid; gap: 10px; border: 2px solid var(--adm-blue); border-radius: 14px; padding: 16px; background: #fff; }
.dz-proposta h5 { margin: 0; font-size: 17px; color: var(--adm-blue); }
.dz-passi-form { margin: 0; padding-left: 20px; color: #344054; }
.dz-altra { border: 1px dashed #9db8dc; border-radius: 12px; padding: 10px 14px; }
.dz-altra summary, .dz-calendario summary { cursor: pointer; font-weight: 600; color: var(--adm-blue); }
.dz-altra .dz-proposta { margin-top: 10px; }
.dz-calendario { border: 1px solid var(--adm-line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.dz-calendario .table-wrap { margin-top: 10px; }
.dz-riga-mia td { background: #f3f8ff; }
.dz-esito-azione { margin: 0; }

/* Registro presenze */
.dz-registri { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dz-registro-riga { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--adm-line); border-radius: 12px; padding: 10px 14px; background: #fff; }
.dz-registro-riga small { display: block; color: var(--adm-text-soft); }
.dz-registro { display: grid; gap: 12px; border: 2px solid var(--adm-blue); border-radius: 14px; padding: 16px; background: #fff; }
.dz-registro h4 { margin: 0; color: var(--adm-blue); }
.dz-conteggio { margin-left: auto; color: var(--adm-text-soft); font-size: 14px; }
.dz-presenze { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dz-presenza { display: grid; grid-template-columns: 28px minmax(160px, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--adm-line); border-radius: 10px; }
.dz-presenza-num { color: var(--adm-text-soft); font-weight: 600; text-align: right; }
.dz-presenza-nome small { display: block; color: var(--adm-text-soft); }
.dz-scelta { display: inline-flex; border: 1px solid var(--adm-line); border-radius: 10px; overflow: hidden; }
.dz-scelta label { position: relative; cursor: pointer; margin: 0; }
.dz-scelta input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dz-scelta span { display: block; padding: 8px 12px; font-size: 14px; font-weight: 600; color: #475467; background: #fff; border-left: 1px solid var(--adm-line); }
.dz-scelta label:first-child span { border-left: 0; }
.dz-scelta input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; }
.dz-scelta-presente input:checked + span { background: var(--adm-green); color: #fff; }
.dz-scelta-assente input:checked + span { background: var(--adm-red); color: #fff; }
.dz-scelta-ritardo_meno_30 input:checked + span { background: #d97706; color: #fff; }
.dz-scelta input:disabled + span { cursor: default; }
.dz-togli { border: 0; background: none; color: var(--adm-red); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.dz-togli-nota { margin: 0; font-size: 13px; }

/* Account e guida */
.dz-account h3, .dz-guida h3 { margin-top: 0; color: var(--adm-blue); }
.dz [data-dz-vista-pannello="account"] { display: grid; gap: 16px; }
.dz .doc-cambio-password { max-width: 560px; margin: 0; }
.dz-faq { border-top: 1px solid var(--adm-line); padding: 10px 0; }
.dz-faq summary { cursor: pointer; font-weight: 600; }
.dz-faq p { margin: 8px 0 0; color: #344054; }
.dz-contatti { margin: 16px 0 0; font-weight: 600; }

@media (max-width: 760px) {
  .dz-barra { padding: 12px; }
  .dz-menu { width: 100%; }
  .dz-menu-voce { flex: 1 1 auto; padding: 8px 10px; font-size: 14px; }
  .dz-passi { grid-template-columns: 1fr; }
  .dz-cosa { grid-template-columns: auto 1fr; }
  .dz-cosa .btn { grid-column: 1 / -1; width: 100%; }
  .dz-corso-apri { width: 100%; text-align: center; }
  .dz-presenza { grid-template-columns: 24px 1fr; }
  .dz-scelta { grid-column: 1 / -1; width: 100%; }
  .dz-scelta label { flex: 1; text-align: center; }
  .dz-togli { grid-column: 1 / -1; justify-self: start; }
}

/* =========================================================
   HOME - CALENDARIO LEZIONI (v1.26)
========================================================= */
.cal { --c-istruttori: #1a73e8; --c-dirigenti: #0b8043; --c-scuola: #8e24aa; --c-arbitro: #e8710a;
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cal.hidden { display: none; }
.cal-c-istruttori { --c: var(--c-istruttori); }
.cal-c-dirigenti { --c: var(--c-dirigenti); }
.cal-c-scuola { --c: var(--c-scuola); }
.cal-c-arbitro { --c: var(--c-arbitro); }

.cal-barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-titolo { margin: 0 0 0 8px; font-size: 22px; font-weight: 500; color: #1f1f1f; }
.cal-btn { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 7px 14px; border-radius: 999px; border: 1px solid #c4c7c5; background: #fff; color: #1f1f1f; }
.cal-btn:hover { background: #f1f3f4; }
.cal-btn.attivo { background: #c2e7ff; border-color: #c2e7ff; color: #001d35; }
.cal-freccia { width: 36px; height: 36px; padding: 0; border: 0; font-size: 22px; line-height: 1; }
.cal-viste { display: inline-flex; gap: 4px; }
.cal-btn:focus-visible, .cal-evento:focus-visible, .cal-tipo:focus-visible { outline: 2px solid var(--adm-blue); outline-offset: 2px; }

.cal-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.cal-tipo { font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid #dadce0; background: #fff; color: #3c4043; }
.cal-tipo.spento { opacity: .45; text-decoration: line-through; }
.cal-tipo.spento .cal-pallino { background: transparent; border: 2px solid var(--c); }
.cal-legenda-nota { margin-left: auto; font-size: 13px; color: var(--adm-text-soft); }
.cal-pallino { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #1a73e8); box-sizing: border-box; }

.cal-corpo { flex: 1; min-height: 0; overflow: auto; }

/* Vista mese */
.cal-mese { height: 100%; min-height: 420px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto repeat(var(--cal-settimane), minmax(min-content, 1fr)); border-top: 1px solid #dadce0; border-left: 1px solid #dadce0; }
.cal-intestazione { padding: 6px 0; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #70757a; border-right: 1px solid #dadce0; border-bottom: 1px solid #dadce0; }
.cal-giorno { min-width: 0; min-height: 64px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: 4px 4px 6px; border-right: 1px solid #dadce0; border-bottom: 1px solid #dadce0; background: #fff; overflow: hidden; }
.cal-giorno.weekend { background: #fafbfc; }
.cal-giorno.fuori { background: #f8f9fa; }
.cal-giorno.fuori .cal-num { color: #b0b4b8; }
.cal-num { align-self: center; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 12.5px; font-weight: 600; color: #3c4043; margin-bottom: 2px; }
.cal-giorno.oggi .cal-num { background: #1a73e8; color: #fff; }

.cal-evento { font: inherit; display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 2px 6px; border: 0; border-radius: 6px; background: transparent; color: #3c4043; font-size: 12px; text-align: left; cursor: pointer; }
.cal-evento:hover { background: color-mix(in srgb, var(--c) 14%, #fff); }
.cal-ora { flex: 0 0 auto; font-weight: 600; color: #3c4043; }
.cal-evento-testo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Online / in presenza (v1.37) */
/* Colori neutri, diversi da quelli dei tipi di corso (blu, verde, viola, arancio) */
.cal-modo { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; border: 1px solid; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.cal-modo-online { background: #fff; border-color: #9aa0a6; border-style: dashed; color: #3c4043; }
.cal-modo-presenza { background: #3c4043; border-color: #3c4043; color: #fff; }
.cal-elenco-eventi .cal-modo { font-size: 12px; }
.cal-evento-tipo { font-weight: 700; color: #1f1f1f; }
/* Vista mese: orario e icona sulla prima riga, tipo di corso e titolo sulla seconda */
.cal-mese .cal-modo { padding: 0 4px; }
.cal-mese .cal-modo-testo { display: none; }
.cal-mese .cal-evento { flex-wrap: wrap; row-gap: 0; }
.cal-mese .cal-evento-testo { flex: 1 0 100%; padding-left: 15px; box-sizing: border-box; }
.cal-legenda-modi { display: inline-flex; gap: 6px; margin-left: 6px; padding-left: 12px; border-left: 1px solid #dadce0; }
.cal-legenda-modi .cal-modo { font-size: 12px; padding: 3px 9px; }
.cal-altre { font: inherit; font-size: 12px; font-weight: 600; text-align: left; padding: 2px 6px; border: 0; background: none; color: #3c4043; cursor: pointer; border-radius: 6px; }
.cal-altre:hover { background: #f1f3f4; }

/* Vista elenco */
.cal-elenco { display: grid; }
.cal-elenco-giorno { display: grid; grid-template-columns: 210px 1fr; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #ebedf0; }
.cal-elenco-data { font-weight: 600; color: #3c4043; }
.cal-elenco-giorno.oggi .cal-elenco-data { color: #1a73e8; }
.cal-elenco-data span { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #1a73e8; color: #fff; font-size: 12px; }
.cal-elenco-eventi { display: grid; gap: 4px; }
.cal-elenco-eventi .cal-evento { font-size: 14px; padding: 6px 8px; }
.cal-vuoto { margin: 30px 0; text-align: center; color: var(--adm-text-soft); }

/* Finestra di dettaglio */
.cal-dettaglio { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 18px 20px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.cal-dettaglio::backdrop { background: rgba(15, 23, 42, .35); }
.cal-dett-testa { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #5f6368; }
.cal-chiudi { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: #5f6368; }
.cal-chiudi:hover { background: #f1f3f4; }
.cal-dettaglio h3 { margin: 6px 0 12px; font-size: 20px; color: #1f1f1f; }
.cal-dett-dati { margin: 0 0 12px; display: grid; gap: 8px; }
.cal-dett-dati div { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
.cal-dett-dati dt { color: #5f6368; font-size: 14px; }
.cal-dett-dati dd { margin: 0; font-size: 14.5px; }
.cal-dett-nota { margin: 0 0 12px; font-size: 13px; color: var(--adm-text-soft); }
.cal-dettaglio .cal-elenco-eventi { margin-top: 10px; }

.home-tab-cal { background: #fff; }
.home-body.home-body-cal { grid-template-columns: minmax(0, 1fr); }
.home-body-cal .home-side { display: none; }

@media (max-width: 760px) {
  .cal-titolo { font-size: 18px; }
  .cal-mese { min-height: 0; grid-template-rows: auto repeat(var(--cal-settimane), minmax(64px, auto)); }
  .cal-giorno { padding: 2px; }
  .cal-mese .cal-evento { padding: 2px; font-size: 0; justify-content: center; }
  .cal-mese .cal-evento .cal-pallino { width: 8px; height: 8px; }
  /* Sul telefono, nella vista mese, resta solo l'icona accanto al pallino */
  .cal-mese .cal-evento { gap: 2px; }
  .cal-mese .cal-modo { padding: 0; border: 0; background: none; font-size: 10px; }
  .cal-mese .cal-evento-testo { display: none; }
  .cal-legenda-modi { margin-left: 0; padding-left: 0; border-left: 0; }
  .cal-elenco-giorno { grid-template-columns: 1fr; gap: 4px; }
  .cal-dett-dati div { grid-template-columns: 1fr; gap: 0; }
  .cal-corpo { overflow: visible; }
}

/* Home: logo Evolution Programme accanto al titolo */
.home-bar-evolution { height: 52px; width: auto; box-sizing: border-box; padding: 6px 12px; border-radius: 12px; background: #fff; }
@media (max-width: 760px) { .home-bar-evolution { height: 42px; padding: 4px 8px; } }

/* Lezioni online con Google Meet (admin, docenti) */
.adm-meet { display: grid; gap: 6px; margin: 12px 0; padding: 12px 16px; border-radius: 12px; border: 1px solid #cfe0f5; background: #f5f9ff; }
.adm-meet:empty { display: none; }
.adm-meet.adm-meet-ok { background: #ecf8f1; border-color: #a7dcbb; }
.adm-meet.adm-meet-da-collegare { background: #fffaf0; border-color: #f3d28a; }
.adm-meet.adm-meet-spento { background: #f4f5f7; border-color: #dde2e8; }
.adm-meet-bottoni { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-meet-cella { min-width: 170px; }
.adm-meet-cella .pub-link { display: inline-block; margin-top: 4px; font-size: 13px; }
.adm-meet-link { display: block; font-weight: 600; word-break: break-all; }
.adm-meet-azioni { display: flex; gap: 10px; }
.adm-meet-togli { color: var(--adm-red); }
.dz-online a { font-weight: 600; word-break: break-all; }

/* Email agli ammessi: copie per conoscenza */
.adm-email-copie { border: 1px solid #cfe0f5; border-radius: 10px; padding: 10px 14px; background: #fff; }
.adm-email-copie summary { cursor: pointer; font-weight: 600; color: var(--adm-blue); }
.adm-email-copie #listaCopieEmailAmmessi,
.adm-email-copie #listaCopieEmailIscritti { display: grid; gap: 10px; margin-top: 8px; max-height: 320px; overflow-y: auto; }
#boxEmailIscritti input[type="text"], #boxEmailIscritti select { width: 100%; box-sizing: border-box; font: inherit; padding: 9px 10px; border: 1px solid #c9d6e8; border-radius: 8px; background: #fff; }
.adm-email-copie-gruppo { display: grid; gap: 4px; }
.adm-email-copie-testa { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.adm-email-copie .adm-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 400; }
.adm-email-copie .adm-check input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }

/* Copia del calendario da un altro corso */
.adm-copia { margin: 12px 0; border: 1px dashed #9db8dc; border-radius: 12px; padding: 10px 14px; background: #fff; }
.adm-copia summary { cursor: pointer; font-weight: 600; color: var(--adm-blue); }
.adm-copia-corpo { display: grid; gap: 10px; margin-top: 10px; }
.adm-copia-corpo select { width: 100%; max-width: 640px; padding: 8px 10px; border: 1px solid var(--adm-line); border-radius: 8px; font: inherit; }
.adm-copia-modi { display: grid; gap: 6px; }
.adm-copia-modi label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.adm-copia-modi input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; }
.adm-copia-anteprima table td.ko { color: var(--adm-red); }
.adm-copia-anteprima table td.ok { color: var(--adm-green); }
.adm-copia-azioni { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Utenti admin: modifica nome ed email ---------- */
.adm-user-head > div.adm-user-head-azioni { flex-direction: row; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm-user-edit { margin-top: 12px; padding: 12px 14px; border: 1px solid #e0a100; border-radius: 10px; background: #fff8e6; }
.adm-user-edit .adm-perm-intro { margin-top: 0; }
.adm-user-edit-campi { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 6px; }
.adm-user-edit-campi label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }

/* =========================================================
   DOCUMENTI INCOMPLETI: finestra della segreteria, note nella tabella iscritti
   e riquadro nella pagina "Gestisci la tua iscrizione"
========================================================= */
.adm-modal-inner.adm-modal-stretto { max-width: 720px; }
.adm-richiesta-motivi { display: grid; gap: 8px; padding: 2px 0 10px; }
.adm-richiesta-motivi .adm-check { font-weight: 500; }
.adm-richiesta-motivi input[type="checkbox"],
.adm-richiesta-email input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; }
.adm-richiesta-email { margin: 6px 0 14px; font-weight: 500; flex-wrap: wrap; }
#richiestaDocumentiPrecedente { margin: 10px 0 0; }
#richiestaDocumentiNota { width: 100%; }

.adm-situazione-iscritto small { display: block; max-width: 220px; margin: 2px 0 4px; font-size: 12px; line-height: 1.35; }
.adm-situazione-iscritto .adm-nota-richiesta { color: #8a5a00; font-weight: 600; cursor: help; }
.adm-situazione-iscritto .adm-nota-richiesta.adm-nota-avviso { color: #b42318; }
.adm-situazione-iscritto .adm-nota-ricaricato { color: #1f7a3f; font-weight: 600; }

.pub-richiesta-documenti {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid #f0c36d;
  border-left: 6px solid #e0a100;
  border-radius: 12px;
  background: #fff8e6;
  color: #1f2937;
}
.pub-richiesta-documenti.hidden { display: none; }
.pub-richiesta-titolo { display: block; font-size: 17px; color: #7a4b00; }
.pub-richiesta-data { display: block; margin-top: 2px; font-size: 13px; color: #5b6779; }
.pub-richiesta-documenti ul { margin: 10px 0; padding-left: 22px; }
.pub-richiesta-documenti li { margin: 0 0 4px; }
.pub-richiesta-nota { margin: 10px 0; padding: 10px 12px; border: 1px solid #f3dca8; border-radius: 8px; background: #fff; }
.pub-richiesta-nota span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #7a4b00; }
.pub-richiesta-nota p { margin: 4px 0 0; overflow-wrap: anywhere; }
.pub-richiesta-form { display: grid; gap: 8px; margin-top: 14px; }
.pub-richiesta-form label { font-weight: 600; }
.pub-richiesta-form label small { font-weight: 400; color: #5b6779; }
.pub-richiesta-form input[type="file"] { max-width: 100%; }
.pub-richiesta-form .btn { justify-self: start; }
.pub-richiesta-info { margin: 10px 0 0; }
.pub-richiesta-documenti .message { margin-top: 12px; }

/* =========================================================
   ATTESTATI: data di rilascio del corso
========================================================= */
.adm-data-rilascio {
  display: grid;
  gap: 6px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--adm-line, #dbe3ee);
  border-radius: 10px;
  background: var(--adm-blue-soft, #eef4fb);
}
.adm-data-rilascio label { font-weight: 700; }
.adm-data-rilascio-campi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-data-rilascio-campi input[type="date"] { min-width: 170px; }
.adm-data-rilascio small { line-height: 1.4; }
