body {
  min-height: 100vh;
  /*display: flex;*/
  justify-content: center;
  align-items: center;
  background: #f5f6fa;
  font-family: sans-serif;
}

.login-card {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  margin-bottom: 25px;
  text-align: center;
}

.form-control:focus {
  box-shadow: none;
}

.input-group-text {
  background: #e9ecef;
}

.checkbox-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
/* --- Sidebar --- */
body { margin:0; font-family: sans-serif; background:#f5f6fa; }
.wrapper { display:flex; min-height:100vh; }

#sidebar {
  width: 260px;
  background:#212529;
  color:white;
  display:flex;
  flex-direction:column;
  position:fixed;
  top:0; left:0; height:100%; z-index:1050;
}

#sidebar .nav-link {
  color:#adb5bd;
  padding:10px 15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-align:left;
  cursor:pointer;
}

#sidebar .nav-link span { flex-grow:1; display:flex; align-items:center; }
#sidebar .nav-link > i:first-child, #sidebar .nav-link span > i { margin-right:10px; } /* spazio icona */
#sidebar .nav-link:hover { background:#343a40; color:white; }

ul.submenu {
  padding-left:20px;
  margin:0;
  list-style:none;
  display:flex; flex-direction:column;
  opacity:0;
  max-height:0;
  overflow:hidden;
  transition:max-height 0.3s ease, opacity 0.3s ease;
}

ul.submenu.show { opacity:1; max-height:500px; }

ul.submenu li a.nav-link { padding:5px 15px; font-size:0.95rem; }

.arrow-rotated { transform:rotate(90deg); transition: transform 0.3s ease; }

#sidebar-menu { flex-grow:1; overflow-y:auto; padding-bottom:10px; }

#sidebar-footer {
  padding:10px 15px;
  border-top:1px solid #343a40;
  display:flex;
  justify-content:space-around;
}

#content {
  flex-grow:1;
  margin-left:260px;
  padding:30px;
  width:100%;
  transition: margin-left .3s ease;
}

#overlay {
  display:none;
  position:fixed; top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.4);
  z-index:1040;
}

/* Mobile */
@media (max-width:768px){
  #sidebar { transform:translateX(-100%); transition: transform .3s ease; }
  #sidebar.show { transform:translateX(0); }
  #content { margin-left:0; padding:20px; }
  #overlay.show { display:block; }
}

/* Toast posizionamento */
#toastContainer { position: fixed; bottom: 20px; right: 20px; z-index: 1080; }

.required .form-label::after {
  content: " *";
  color: red;
}
textarea {
  resize: none;
}

.is-invalid .form-label,
.is-invalid .input-group {
  color: var(--bs-danger);
}

.is-invalid .form-control,
.is-invalid .select {
  border-color: var(--bs-danger);

  padding-right: calc(1.5em + .75rem);

  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");

  background-repeat: no-repeat;
  background-position: right calc(.375em + .1875rem) center;
  background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.is-invalid .form-control:focus,
.is-invalid .select:focus {
  border-color: var(--bs-danger);

  box-shadow:
    0 0 0 .25rem rgba(var(--bs-danger-rgb), .25);
}

.table .handle,
.table .subhandle {
  cursor: grab;
}

.table .handle:active,
.table .subhandle:active {
  cursor: grabbing;
}

body {
  padding-top: 70px;
}

#content {
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 2rem;
}


body {
  display: block !important;
  padding-top: 70px;
}

#content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding-top: 1rem;
  padding-bottom: 2rem;
}


body {
  padding-bottom: 76px;
}

.hal2-bottom-nav {
  z-index: 1030;
}

.hal2-bottom-link {
  min-height: 68px;
  padding: 8px 4px 6px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hal2-bottom-link i {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 5px;
}

.hal2-bottom-link span {
  font-size: 0.75rem;
  line-height: 1;
}

.hal2-bottom-link:hover,
.hal2-bottom-link:focus,
.hal2-bottom-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
