/**
 * Layout ACSI — elimina la “riga” del contenitore app-wrapper
 * e lascia padding tra contenuto e footerbar.
 * NON altera il grid Bootstrap (email, calendario, ecc. restano a colonne).
 */

html,
body {
  min-height: 100%;
  background-color: var(--bodybg-color) !important;
}

.app-wrapper,
.app-wrapper.default,
.app-wrapper.gold,
.app-wrapper.warm,
.app-wrapper.happy,
.app-wrapper.nature,
.app-wrapper.cold,
.app-wrapper.hot {
  min-height: 100vh !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: none !important;
  background-color: var(--bodybg-color) !important;
  background-image: none !important;
}

.app-wrapper > .app-content,
.app-wrapper .app-content {
  min-height: 100vh !important;
  height: auto !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: none !important;
  overflow-x: hidden;
  overflow-y: visible;
  background-color: var(--bodybg-color) !important;
  /* spazio sopra la footerbar fissa */
  padding-bottom: 4.75rem !important;
}

/* Solo spazio sotto: non toccare width/display delle row Bootstrap */
.app-wrapper .app-content > main,
.app-wrapper .app-content main {
  padding-bottom: 1.25rem !important;
}

div > footer,
div > footer.z-1 {
  box-shadow: none !important;
  border-top: 1px solid rgba(var(--secondary), 0.08) !important;
}

/**
 * Fill verticale SOLO dove esplicitamente richiesto
 * (es. Dashboard → Prossimi Eventi con .acsi-fill-row / .acsi-fill-card)
 */
.app-wrapper .app-content main:has(.acsi-fill-row) {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 65px - 4.75rem);
}

.app-wrapper .app-content main:has(.acsi-fill-row) > .container-fluid {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.acsi-fill-row {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.acsi-fill-row > .col-12 {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.acsi-fill-row > .col-12 > .row.h-100 {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.acsi-fill-row > .col-12 > .row.h-100 > .col-12.d-flex {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.acsi-fill-card {
  flex: 1 1 auto !important;
  width: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.acsi-fill-card > .card-body {
  flex: 1 1 auto !important;
}
