
/* Reset globale per eliminare margini e ripristinare font sans-serif */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background-color: #f5f5f5;
}

.header{
  background: linear-gradient(135deg, #FF7F00, #FF6B35);
  color: white;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: relative;
  z-index: 100;
}

.logo{
  font-size: 1.8rem;
  font-weight: bold;
}

.container{
  display: flex;
  min-height: calc(100vh - 70px);
  margin: 0;
  padding: 0;
}

.sidebar{
  background: #FF7F00;
  width: 200px;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.main-content{
  flex: 1;
  padding: 30px;
  background-color: #f5f5f5;
  overflow-y: auto;
}

.dashboard-body{
  display: flex;
}

.login-body{
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF7F00, #FF6B35);
}

.dashboard-body{
  overflow-x: hidden;
}

#sidebar .logo{
  width: 120px;
  margin-bottom: 30px;
}

#sidebar ul li a:hover,
#sidebar ul li a.active{
  background-color: rgba(255, 255, 255, 0.2);
}

.modal{
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content{
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 90vw;
  max-width: 1600px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#modal-attivita .modal-content{
  width: 92vw;
  max-width: 1600px;
}

.modal-content.modal-small{
  width: 90%;
  max-width: 400px;
}

.modal-content h3{
  margin-top: 0;
  color: #FF7F00;
  margin-bottom: 15px;
}

.modal-content form input[type="text"]{
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.modal-content form button,
.modal-content form input[type="submit"]{
  background-color: #FF7F00;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-top: 10px;
  border-radius: 4px;
  cursor: pointer;
}

.modal-content form button:hover,
.modal-content form input[type="submit"]:hover{
  background-color: #cc6600;
}

.logout{
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 0.9em;
  color: #444;
}

.logout a{
  color: #FF7F00;
  text-decoration: none;
  margin-left: 10px;
}

.logout a:hover{
  text-decoration: underline;
}

.login-container{
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.5s ease-in;
}

.login-container .logo-container{
  margin-bottom: 25px;
}

.login-container .logo{
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.login-container h2{
  margin: 0 0 8px 0;
  color: #FF7F00;
  font-size: 26px;
  font-weight: 600;
}

.login-container p{
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1.4;
}

.login-container form{
  text-align: left;
}

.login-container label{
  display: block;
  margin-top: 18px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
  font-size: 14px;
}

.login-container input[type="text"],
.login-container input[type="password"]{
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: #fafafa;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus{
  outline: none;
  border-color: #FF7F00;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}

.login-container input[type="submit"]{
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #FF7F00, #FF6B35);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  margin-top: 25px;
  cursor: pointer;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 127, 0, 0.2);
}

.login-container input[type="submit"]:hover{
  background: linear-gradient(135deg, #e66f00, #e55a2b);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.4);
}

.login-container input[type="submit"]:active{
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 127, 0, 0.3);
}

.error{
  background-color: #fee2e2;
  color: #dc2626;
  padding: 12px 15px;
  border-radius: 8px;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  border: 1px solid #fecaca;
  font-weight: 500;
}

.alert-danger{
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.status-ok{
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

.debug-section{
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
  font-size: 0.9rem;
  border: 1px solid #dee2e6;
}

.form-label{
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control{
  border-radius: 8px;
  border: 2px solid #e9ecef;
  padding: 14px 16px;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-control:focus{
  outline: none;
  border-color: #FF7F00;
  box-shadow: 0 0 0 0.2rem rgba(255, 127, 0, 0.25);
}

.brand{
  color: #FF7F00;
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.system-info{
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  margin-top: 1rem;
}

.system-info a{
  color: #FF7F00;
  text-decoration: none;
}

.system-info a:hover{
  text-decoration: underline;
}

.dashboard-sidebar{
  width: 250px;
  min-width: 200px;
  max-width: 400px;
  background: linear-gradient(180deg, #FF7F00, #FF6B35);
  color: white;
  padding: 20px 0;
  height: 100vh;
  position: fixed;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  resize: horizontal;
  overflow: hidden;
  transition: width 0.3s ease;
}

.dashboard-sidebar.collapsed{
  width: 60px !important;
  min-width: 60px;
}

.dashboard-sidebar.collapsed h2{
  display: none;
}

.dashboard-sidebar.collapsed ul li{
  padding: 15px 10px;
  text-align: center;
  font-size: 20px;
}

.dashboard-sidebar.collapsed ul li span.text{
  display: none;
}

.dashboard-sidebar h2{
  margin: 0 0 40px 0;
  font-size: 24px;
  text-align: center;
  padding: 0 20px;
  color: white;
  font-weight: 700;
}

.dashboard-sidebar ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-sidebar ul li{
  margin: 0;
  cursor: pointer;
  padding: 15px 25px;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.dashboard-sidebar ul li:hover{
  background-color: rgba(255,255,255,0.15);
  border-left-color: white;
}

.dashboard-sidebar ul li.active{
  background-color: rgba(255,255,255,0.25);
  font-weight: 600;
  border-left-color: white;
}

.dashboard-main{
  flex-grow: 1;
  padding: 30px 40px;
  margin-left: 250px;
  transition: margin-left 0.3s ease;
  width: calc(100% - 250px);
  max-width: none;
  box-sizing: border-box;
}

.dashboard-main.sidebar-collapsed{
  margin-left: 60px;
  min-height: 100vh;
  background-color: #fafafa;
  width: calc(100% - 250px);
  box-sizing: border-box;
}

.dashboard-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #FF7F00;
}

.dashboard-title{
  font-size: 28px;
  color: #FF7F00;
  font-weight: 600;
  margin: 0;
}

.user-info{
  text-align: right;
  color: #666;
}

.user-name{
  font-weight: 600;
  color: #333;
}

.data-table{
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  table-layout: fixed;
}

.data-table th, 
.data-table td{
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
  word-wrap: break-word;
  overflow: hidden;
}

.data-table th{
  background: linear-gradient(135deg, #FF7F00, #FF6B35);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:last-child td{
  border-bottom: none;
}

.data-table tr:hover{
  background-color: #fff8f0;
}

.add-btn{
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.add-btn:hover{
  background: linear-gradient(135deg, #218838, #1ea885);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.action-link{
  color: #FF7F00;
  text-decoration: none;
  margin-right: 15px;
  font-weight: 500;
}

.action-link:hover{
  text-decoration: underline;
}

.delete-link{
  color: #dc3545;
  text-decoration: none;
  font-weight: 500;
}

.delete-link:hover{
  text-decoration: underline;
}

.status-badge, .priority-badge{
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.user-info .last-access{
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  font-weight: normal;
}

.message{
  background-color: #d4edda;
  color: #155724;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
  font-weight: 500;
}

.error-message{
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
  font-weight: 500;
}

.modal{
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content{
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  margin: auto;
  animation: modalFadeIn 0.3s ease-out;
}

.modal-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #FF7F00;
}

.modal-header h3{
  margin: 0;
  color: #FF7F00;
  font-size: 20px;
}

.close-modal{
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover{
  color: #FF7F00;
}

.form-row{
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: end;
}

.form-group[style*="flex: 2"]{
  flex: 2 !important;
}

.form-group[style*="flex: 0.5"]{
  flex: 0.5 !important;
  min-width: 80px;
}

.form-group{
  flex: 1;
}

.form-group label{
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea{
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  min-height: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  outline: none;
  border-color: #FF7F00;
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}

.form-group input.required{
  border-left: 4px solid #FF7F00;
}

.form-group input.required:focus{
  border-left: 4px solid #FF7F00;
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder{
  color: #999;
  font-style: italic;
}

@media (min-width: 1400px){.modal-content{
    max-width: 1200px;
  }

.form-row{
    gap: 20px;
  }}

@media (min-width: 769px) and (max-width: 1024px){.modal-content{
    max-width: 90%;
  }

.form-row{
    gap: 12px;
  }}

.modal-footer{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.btn{
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.5;
}

.btn.btn-main{
  background: #FF7F00;
  color: white;
  padding: 12px 20px;
  font-size: 0.95rem;
  margin-right: 15px;
}

.btn.btn-main:hover{
  background: #e66f00;
  transform: translateY(-1px);
}

.btn.btn-grid{
  font-size: 12px;
  padding: 4px 8px;
  margin: 0 4px;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

a.btn.btn-grid.btn-grid-edit,
button.btn.btn-grid.btn-grid-edit{
  background: #007bff;
  color: white;
}

a.btn.btn-grid.btn-grid-edit:hover,
button.btn.btn-grid.btn-grid-edit:hover{
  background: #0056b3;
}

a.btn.btn-grid.btn-grid-delete,
button.btn.btn-grid.btn-grid-delete{
  background: #dc3545;
  color: white;
}

a.btn.btn-grid.btn-grid-delete:hover,
button.btn.btn-grid.btn-grid-delete:hover{
  background: #c82333;
}

a.btn.btn-grid.btn-grid-toggle,
button.btn.btn-grid.btn-grid-toggle{
  background: #28a745;
  color: white;
}

a.btn.btn-grid.btn-grid-toggle:hover,
button.btn.btn-grid.btn-grid-toggle:hover{
  background: #218838;
}

.btn-primary{
  background: #FF7F00;
  color: white;
}

.btn-primary:hover{
  background: #e66f00;
  transform: translateY(-1px);
}

.btn-secondary{
  background: #6c757d;
  color: white;
}

.btn-secondary:hover{
  background: #5a6268;
}

.required-note{
  font-size: 12px;
  color: #FF7F00;
  margin-bottom: 20px;
  font-style: italic;
}

@media (max-width: 1200px){.dashboard-main{
    padding: 20px;
  }

.data-table th, 
  .data-table td{
    padding: 8px 6px;
    font-size: 13px;
  }

.modal-content{
    max-width: 90%;
    padding: 25px;
  }

.form-row{
    gap: 12px;
  }}

@media (max-width: 1100px){.modal-content{
    max-width: 95%;
    padding: 25px;
  }}

@media (max-width: 900px){.modal-content{
    max-width: 98%;
    padding: 20px;
  }}

@media (max-width: 650px){.form-row{
    flex-direction: column;
  }

.modal-content{
    padding: 15px;
  }}

@media (max-width: 768px){.dashboard-sidebar{
    width: 200px;
  }

.dashboard-main{
    margin-left: 200px;
    width: calc(100% - 200px);
    padding: 15px;
  }

.form-row{
    flex-direction: column;
  }

.modal{
    padding: 10px;
  }

.modal-content{
    width: 100%;
    max-width: none;
    padding: 20px;
    max-height: 95vh;
  }

.modal-header h3{
    font-size: 18px;
  }

.close-modal{
    font-size: 20px;
    width: 25px;
    height: 25px;
  }}

@media (max-width: 480px){.dashboard-sidebar{
    width: 60px;
    padding: 10px 5px;
  }

.dashboard-sidebar h2{
    font-size: 14px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
  }

.dashboard-sidebar ul li{
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 12px;
    padding: 8px 5px;
  }

.dashboard-main{
    margin-left: 60px;
    width: calc(100% - 60px);
    padding: 10px;
  }

.modal-content{
    padding: 15px;
    border-radius: 8px;
  }

.form-group input,
  .form-group select,
  .form-group textarea{
    padding: 12px 14px;
    font-size: 16px; 
    min-height: 44px; 
  }

.form-group label{
    font-size: 14px;
    font-weight: 600;
  }

.btn{
    padding: 12px 16px;
    font-size: 16px;
  }}

.modal-wide{
  width: 92vw !important;
  max-width: 1600px !important;
}

.tabs-nav{
  display: flex;
  gap: 2px;
  margin-bottom: 25px;
  border-bottom: 3px solid #f1f1f1;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  padding: 5px;
}

.tab-btn{
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

.tab-btn:hover{
  background: rgba(255, 127, 0, 0.1);
  color: #FF7F00;
}

.tab-btn.active{
  background: linear-gradient(135deg, #FF7F00, #FF6B35);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 127, 0, 0.3);
}

.tab-content{
  display: none;
  animation: tabFadeIn 0.3s ease-in;
  min-height: 200px;
  padding: 20px 0;
}

.tab-content.active{
  display: block;
}

.info-box{
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid #FF7F00;
  padding: 15px 20px;
  border-radius: 6px;
  margin-top: 15px;
}

.info-box h4{
  margin: 0 0 10px 0;
  color: #FF7F00;
  font-size: 14px;
}

.info-box ul{
  margin: 0;
  padding-left: 15px;
  font-size: 13px;
  color: #555;
}

.info-box li{
  margin-bottom: 5px;
}

@media (max-width: 768px){.tabs-nav{
    flex-direction: column;
    gap: 1px;
  }

.tab-btn{
    border-radius: 6px;
    text-align: left;
    padding: 10px 15px;
  }

.modal-wide{
    max-width: 95% !important;
  }

.tab-content{
    padding: 15px 0;
    min-height: 150px;
  }}

@media (max-width: 480px){.tabs-nav{
    padding: 3px;
  }

.tab-btn{
    font-size: 12px;
    padding: 8px 12px;
  }

.info-box{
    padding: 12px 15px;
  }

.info-box h4{
    font-size: 13px;
  }

.info-box ul{
    font-size: 12px;
  }}

#sidebar .logo{
  width: 120px;
  margin-bottom: 30px;
}

.btn-primary{
  background-color: #007bff;
  color: #ffffff;
  border: 1px solid #0069d9;
}

.btn-primary:hover{
  background-color: #0069d9;
}

.form-actions{
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.form-section{
  margin-bottom: 25px;
  width: 100%;
}

.section-header{
  background-color: #f5f5f5;
  padding: 10px;
  border-left: 4px solid #FF7F00;
  margin-bottom: 15px;
  width: 100%;
}

.section-header h3{
  margin: 0;
  font-weight: 600;
}

.form-group{
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
}

.error-message{
  padding: 10px; 
  background-color: #f8d7da; 
  color: #721c24; 
  border: 1px solid #f5c6cb; 
  border-radius: 4px; 
  margin-bottom: 15px;
}

.btn-edit{
    background-color: #007bff;
    border: 1px solid #0069d9;
}

.btn-delete{
    background-color: #dc3545;
    border: 1px solid #c82333;
}

#spedizione-form .section-header{
  background-color: #f5f5f5;
  padding: 10px;
  border-left: 4px solid #FF7F00;
  margin-bottom: 15px;
  width: 100%;
}

.header{
                    background: linear-gradient(135deg, #FF7F00, #FF6B35);
                    color: white;
                    height: 70px;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 0 20px;
                    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
                }

.logo{
                    font-size: 1.8rem;
                    font-weight: bold;
                }

.user-info{
                    text-align: right;
                    font-size: 0.9rem;
                }

.user-info .username{
                    font-weight: bold;
                    margin-bottom: 2px;
                }

.logout-btn{
                    background: rgba(255,255,255,0.2);
                    color: white;
                    text-decoration: none;
                    padding: 5px 15px;
                    border-radius: 15px;
                    font-size: 0.85rem;
                    margin-top: 5px;
                    display: inline-block;
                    transition: background 0.3s;
                }

.logout-btn:hover{
                    background: rgba(255,255,255,0.3);
                    color: white;
                }

.container{
                    display: flex;
                    min-height: calc(100vh - 70px);
                }

.sidebar{
                    background: #FF7F00;
                    width: 200px;
                    padding: 0;
                }

.nav-menu{
                    list-style: none;
                }

.nav-item{
                    border-bottom: 1px solid rgba(255,255,255,0.1);
                }

.nav-item a{
                    display: block;
                    color: white;
                    text-decoration: none;
                    padding: 15px 20px;
                    transition: background 0.3s;
                    font-size: 0.95rem;
                    font-weight: 500;
                }

.nav-item a:hover, .nav-item.active a{
                    background: rgba(255,255,255,0.15);
                }

.nav-item.active a{
                    background: rgba(255,255,255,0.2);
                    border-left: 4px solid white;
                }

.nav-icon{
                    margin-right: 8px;
                    width: 16px;
                    display: inline-block;
                }

.main-content{
                    flex: 1;
                    padding: 30px;
                }

.page-title{
                    font-size: 2rem;
                    color: #333;
                    margin-bottom: 30px;
                    padding-bottom: 10px;
                    border-bottom: 3px solid #FF7F00;
                }

.action-buttons{
                    margin-bottom: 30px;
                }

.content-section{
                    background: white;
                    border-radius: 8px;
                    padding: 25px;
                    margin-bottom: 30px;
                    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
                }

.section-title{
                    color: #FF7F00;
                    font-size: 1.3rem;
                    font-weight: 600;
                    margin-bottom: 20px;
                    display: flex;
                    align-items: center;
                }

.section-icon{
                    margin-right: 10px;
                }

.table{
                    width: 100%;
                    border-collapse: collapse;
                    font-size: 0.9rem;
                }

.table thead th{
                    background: #FF7F00;
                    color: white;
                    font-weight: 600;
                    padding: 12px 10px;
                    text-align: left;
                    border: none;
                    font-size: 0.85rem;
                    text-transform: uppercase;
                    letter-spacing: 0.5px;
                }

.table tbody td{
                    padding: 12px 10px;
                    border-bottom: 1px solid #eee;
                    color: #333;
                }

.table tbody tr:hover{
                    background: #f8f9fa;
                }

.badge{
                    padding: 4px 8px;
                    border-radius: 12px;
                    font-size: 0.75rem;
                    font-weight: 600;
                    text-transform: uppercase;
                    letter-spacing: 0.3px;
                }

@media (max-width: 768px){.container{
                        flex-direction: column;
                    }

.sidebar{
                        width: 100%;
                        height: auto;
                    }

.nav-menu{
                        display: flex;
                        overflow-x: auto;
                    }

.nav-item{
                        border-bottom: none;
                        border-right: 1px solid rgba(255,255,255,0.1);
                        flex-shrink: 0;
                    }

.main-content{
                        padding: 20px;
                    }

.page-title{
                        font-size: 1.5rem;
                    }

.action-buttons{
                        text-align: center;
                    }

.btn{
                        display: block;
                        margin: 10px 0;
                        text-align: center;
                    }

.table{
                        font-size: 0.8rem;
                    }

.table thead th,
                    .table tbody td{
                        padding: 8px 6px;
                    }}

.content-section{
                    animation: fadeInUp 0.6s ease-out;
                }

.table tbody tr{
                    transition: background 0.3s ease;
                }

.empty-state{
                    text-align: center;
                    color: #666;
                    padding: 40px 20px;
                    font-style: italic;
                }

.message{
                    padding: 12px 20px;
                    border-radius: 6px;
                    margin-bottom: 20px;
                    font-weight: 500;
                }

.message.success{
                    background: #d4edda;
                    color: #155724;
                    border: 1px solid #c3e6cb;
                }

.message.error{
                    background: #f8d7da;
                    color: #721c24;
                    border: 1px solid #f5c6cb;
                }

.btn-sm{
                    padding: 4px 8px;
                    font-size: 12px;
                    border-radius: 4px;
                    text-decoration: none;
                    display: inline-block;
                    transition: all 0.3s;
                }

.btn-sm:hover{
                    transform: translateY(-1px);
                    text-decoration: none;
                }

.modal{
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(0, 0, 0, 0.5);
                    display: none;
                    justify-content: center;
                    align-items: center;
                    z-index: 1000;
                }

.modal-content{
                    background: white;
                    border-radius: 8px;
                    max-width: 600px;
                    width: 90%;
                    max-height: 90vh;
                    overflow-y: auto;
                }

.modal-header{
                    padding: 20px;
                    border-bottom: 1px solid #ddd;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                }

.modal-header h3{
                    margin: 0;
                    color: #333;
                }

.close-modal{
                    background: none;
                    border: none;
                    font-size: 24px;
                    cursor: pointer;
                    color: #999;
                    padding: 0;
                    width: 30px;
                    height: 30px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }

.close-modal:hover{
                    color: #333;
                }

.modal form{
                    padding: 20px;
                }

.form-row{
                    display: grid;
                    grid-template-columns: 1fr 1fr;
                    gap: 15px;
                    margin-bottom: 15px;
                }

.form-group{
                    margin-bottom: 15px;
                }

.form-group label{
                    display: block;
                    margin-bottom: 5px;
                    font-weight: 500;
                    color: #333;
                }

.form-group input,
                .form-group select,
                .form-group textarea{
                    width: 100%;
                    padding: 8px 12px;
                    border: 1px solid #ddd;
                    border-radius: 4px;
                    font-size: 14px;
                    box-sizing: border-box;
                }

.form-group input:focus,
                .form-group select:focus,
                .form-group textarea:focus{
                    outline: none;
                    border-color: #FF7F00;
                    box-shadow: 0 0 0 2px rgba(255, 127, 0, 0.2);
                }

.form-actions{
                    display: flex;
                    gap: 10px;
                    justify-content: flex-end;
                    margin-top: 20px;
                    padding-top: 20px;
                    border-top: 1px solid #ddd;
                }

.btn-primary{
                    background: #FF7F00;
                    color: white;
                }

.btn-primary:hover{
                    background: #FF6B35;
                }

.btn-secondary{
                    background: #6c757d;
                    color: white;
                }

.btn-secondary:hover{
                    background: #5a6268;
                }

.modal-utente{
                    max-width: 800px;
                    width: 95%;
                }

.modal-header-nuovo{
                    background: #FF7F00;
                    color: white;
                    padding: 15px 20px;
                    border-radius: 8px 8px 0 0;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    border-bottom: none;
                }

.modal-title{
                    font-size: 1.3rem;
                    font-weight: 600;
                    margin: 0;
                }

.close-modal-x{
                    background: none;
                    border: none;
                    color: white;
                    font-size: 18px;
                    cursor: pointer;
                    padding: 5px 8px;
                    border-radius: 4px;
                    transition: background 0.3s;
                }

.close-modal-x:hover{
                    background: rgba(255,255,255,0.2);
                }

.modal-subtitle{
                    color: #FF7F00;
                    font-size: 0.9rem;
                    padding: 15px 20px 0;
                    margin: 0;
                }

.form-nuovo-utente{
                    padding: 20px;
                }

.form-group-nuovo{
                    margin-bottom: 20px;
                }

.label-icon{
                    display: flex;
                    align-items: center;
                    font-weight: 600;
                    color: #333;
                    margin-bottom: 8px;
                    font-size: 0.95rem;
                }

.label-icon .icon{
                    margin-right: 8px;
                    font-size: 1rem;
                }

.input-nuovo{
                    width: 100%;
                    padding: 12px 15px;
                    border: 2px solid #e9ecef;
                    border-radius: 6px;
                    font-size: 0.95rem;
                    transition: all 0.3s;
                    box-sizing: border-box;
                }

.input-nuovo:focus{
                    outline: none;
                    border-color: #FF7F00;
                    box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
                }

.input-nuovo::placeholder{
                    color: #999;
                    font-style: italic;
                }

.help-text{
                    font-size: 0.8rem;
                    color: #666;
                    margin-top: 5px;
                    font-style: italic;
                }

.tipo-utente-section{
                    margin: 25px 0;
                }

.tipo-utente-box{
                    background: #f8f9fa;
                    border: 1px solid #dee2e6;
                    border-radius: 6px;
                    padding: 15px;
                    margin-top: 8px;
                }

.tipo-header{
                    display: flex;
                    align-items: center;
                    font-weight: 600;
                    color: #333;
                    margin-bottom: 8px;
                }

.tipo-header .icon{
                    margin-right: 8px;
                }

.tipo-description{
                    color: #666;
                    font-size: 0.9rem;
                    line-height: 1.4;
                }

.checkbox-section{
                    margin: 25px 0;
                }

.checkbox-label{
                    display: flex;
                    align-items: flex-start;
                    cursor: pointer;
                    font-weight: 500;
                    color: #333;
                }

.checkbox-nuovo{
                    margin-right: 10px;
                    margin-top: 2px;
                    transform: scale(1.2);
                    accent-color: #FF7F00;
                }

.checkbox-text{
                    font-size: 0.95rem;
                }

.info-box{
                    background: #e8f4fd;
                    border: 1px solid #b8daff;
                    border-radius: 6px;
                    padding: 15px;
                    margin: 25px 0;
                }

.info-header{
                    display: flex;
                    align-items: center;
                    font-weight: 600;
                    color: #004085;
                    margin-bottom: 10px;
                }

.info-header .icon{
                    margin-right: 8px;
                }

.info-list{
                    margin: 0;
                    padding-left: 0;
                    list-style: none;
                }

.info-list li{
                    color: #004085;
                    margin-bottom: 8px;
                    padding-left: 20px;
                    position: relative;
                    font-size: 0.9rem;
                    line-height: 1.4;
                }

.info-list li::before{
                    content: "•";
                    color: #FF7F00;
                    font-weight: bold;
                    position: absolute;
                    left: 0;
                }

.form-actions-nuovo{
                    display: flex;
                    gap: 15px;
                    justify-content: flex-end;
                    margin-top: 30px;
                    padding-top: 20px;
                    border-top: 1px solid #dee2e6;
                }

.btn-annulla,
                .btn-crea{
                    display: flex;
                    align-items: center;
                    padding: 12px 20px;
                    border: none;
                    border-radius: 6px;
                    font-size: 0.95rem;
                    font-weight: 600;
                    cursor: pointer;
                    text-decoration: none;
                    transition: all 0.3s;
                }

.btn-annulla{
                    background: #FF7F00;
                    color: white;
                }

.btn-annulla:hover{
                    background: #FF6B35;
                    transform: translateY(-1px);
                }

.btn-crea{
                    background: #FF7F00;
                    color: white;
                }

.btn-crea:hover{
                    background: #FF6B35;
                    transform: translateY(-1px);
                }

.btn-annulla .icon,
                .btn-crea .icon{
                    margin-right: 6px;
                }

@media (max-width: 768px){.form-row{
                        grid-template-columns: 1fr;
                    }

.modal-content{
                        width: 95%;
                        margin: 10px;
                    }

.form-actions{
                        flex-direction: column;
                    }

.form-actions-nuovo{
                        flex-direction: column;
                        gap: 10px;
                    }

.btn-annulla,
                    .btn-crea{
                        width: 100%;
                        justify-content: center;
                    }

.modal-utente{
                        width: 98%;
                        margin: 1%;
                    }}

.error-header{
                    color: #FF7F00;
                    font-size: 2rem;
                    margin-bottom: 20px;
                    text-align: center;
                }

.error{ 
                    background: #ffebee; 
                    color: #c62828; 
                    padding: 20px; 
                    border-radius: 4px; 
                    border-left: 4px solid #f44336;
                    margin-bottom: 20px;
                }

.btn{
                    background: #FF7F00;
                    color: white;
                    text-decoration: none;
                    padding: 12px 24px;
                    border-radius: 6px;
                    display: inline-block;
                    margin: 10px 5px;
                }

.btn:hover{
                    background: #FF6B35;
                    color: white;
                }

a.email-link{
    color: #FF7F00;
    text-decoration: none;
    transition: color 0.2s;
}

a.email-link:hover{
    color: #FF6B35;
    text-decoration: underline;
}

.text-primary{
    color: #FF7F00;
}

.text-muted{
    color: #999;
}

/* Filtri Ricerca - Collapsible */
.filters-collapsible {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.filters-summary {
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: #f8f9fa;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.filters-summary::-webkit-details-marker {
    display: none;
}

.filters-summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.3s;
    color: #FF7F00;
    font-size: 0.9rem;
}

.filters-collapsible[open] .filters-summary::before {
    transform: rotate(90deg);
}

.filters-summary:hover {
    background: #e9ecef;
}

.filters-form {
    padding: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-row-single {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 15px;
}

.filter-field {
    display: flex;
    flex-direction: column;
}

.filter-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.filter-field input[type="text"],
.filter-field input[type="date"],
.filter-field select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.filter-field input[type="text"]:focus,
.filter-field input[type="date"]:focus,
.filter-field select:focus {
    outline: none;
    border-color: #FF7F00;
}

.filter-field select {
    background-color: white;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Ordinamento tabella */
.sortable-header {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.sortable-header:hover {
    color: #FF7F00;
}

.sort-icon {
    font-size: 0.8rem;
    color: #FF7F00;
}

/* Paginazione */
.pagination {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .filter-row-double {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    .pagination-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination-info {
        order: -1;
        padding: 0 0 10px 0;
    }
}