/* --- LAYOUT GENERALE --- */
body {
  font-family: Arial, sans-serif;
  background-color: #f0f2f5;
  margin: 0;
  padding: 0;
}

.ContainerUser {
  width: 90%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  margin: 0 auto;
  box-sizing: border-box;
}

.ProfileSection,
.AuthSection {
  background-color: white;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 30px;
  box-sizing: border-box;
}

.AuthSection {
  max-width: 450px;
}

/* --- TABS --- */
.tabs-nav {
  display: flex;
  border-bottom: 2px solid #eee;
  margin: 20px 0;
  gap: 10px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  font-weight: bold;
  color: #7f8c8d;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: 0.3s;
}

.tab-btn:hover {
  color: #3498db;
}

.tab-btn.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --- CHECKPOINT PROGRESSI --- */
.checkpoint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.arg-name {
  font-weight: 500;
  flex: 2;
  font-size: 0.95em;
}

.level-label {
  flex: 1;
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
}

.custom-progress-bar.small-bar {
  display: flex;
  flex: 1;
  max-width: 120px;
  height: 10px;
  background-color: #eee;
  border-radius: 5px;
  overflow: hidden;
  gap: 2px;
}

.segment {
  flex: 1;
  background-color: #ddd;
  transition: 0.3s;
}

.segment-orange { background-color: #e67e22; }
.segment-yellow { background-color: #f1c40f; }
.segment-green { background-color: #2ecc71; }

.text-orange { color: #e67e22 !important; }
.text-yellow { color: #f1c40f !important; }
.text-green { color: #2ecc71 !important; }
.text-gray { color: #7f8c8d !important; }

/* --- GESTIONE PASSWORD CON OCCHIO --- */
.pwd-container {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

.pwd-container input {
  margin-bottom: 0;
  padding-right: 40px; /* Lascia spazio per l'icona */
}

.pwd-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2em;
  user-select: none;
  opacity: 0.7;
}

.pwd-icon:hover {
  opacity: 1;
}

/* --- COMPONENTI UI (INPUT, BADGE, ACCORDION) --- */
.badge {
  background: #3498db;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  text-transform: uppercase;
}

input, select {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.corso-accordion,
.macro-accordion {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #eee;
}

summary {
  cursor: pointer;
  font-weight: bold;
}

/* --- PULSANTI (SENZA BORDI, TESTO BIANCO FORZATO) --- */
.btn {
  display: inline-block;
  color: #ffffff !important;
  padding: 10px 15px;
  border: none !important;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
  font-size: 1em;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary { background-color: #3498db !important; }  /* Blu */
.btn-success { background-color: #2ecc71 !important; }  /* Verde */
.btn-danger { background-color: #e74c3c !important; }   /* Rosso */
.btn-warning { background-color: #e67e22 !important; }  /* Arancio */
.btn-secondary { background-color: #7f8c8d !important; } /* Grigio */

.btn-block { width: 100%; display: block; margin-bottom: 10px; box-sizing: border-box; }
.btn-sm { padding: 6px 12px; font-size: 0.85em; }

/* --- TABELLE GESTIONE --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.data-table th {
  background: #f4f4f4;
  color: #333;
  font-weight: bold;
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ccc;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.data-table tr:hover { background-color: #f9f9f9; }

.table-empty {
  text-align: center;
  padding: 15px;
  color: #888;
}

/* --- CLASSI DI UTILITA' (SOSTITUISCONO GLI STYLE INLINE) --- */
.d-none { display: none !important; }
.text-center { text-align: center; }
.text-bold { font-weight: bold; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.w-100 { width: 100%; }

.flex-row { display: flex; align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }

.m-0 { margin: 0; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mr-5 { margin-right: 5px; }

/* --- MESSAGGI DI ERRORE/SUCCESSO --- */
.msg-error {
  color: white;
  background-color: #e74c3c;
  font-weight: bold;
  padding: 10px;
  border-radius: 4px;
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.msg-success {
  color: white;
  background-color: #2ecc71;
  font-weight: bold;
  padding: 10px;
  border-radius: 4px;
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
  box-sizing: border-box;
}

/* Lista Corsi Docente */
.course-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.course-list-item:hover { 
  background-color: #f5f5f5; 
  border-radius: 4px; 
}