html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--focus-ring-color);
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Background holder for images */
.bg-holder {
  position: absolute;
  width: 100%;
  min-height: 100%;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  background-repeat: no-repeat;
  z-index: 0;
}

.bg-holder.overlay::before {
  position: absolute;
  content: "";
  background: var(--overlay-bg);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.bg-100 {
  background-color: var(--bg-light-alt);
}

/* Auth pages specific styles */
.position-relative {
  position: relative;
}

.z-index-1 {
  z-index: 1;
}

.link-light {
  color: var(--link-light-color);
}

.font-sans-serif {
  font-family: var(--font-family-display);
}

/* Syncfusion Grid: bottoni azione non devono evidenziare la cella */
.btn-grid-action {
  position: relative;
  z-index: 1;
}

/* Bootstrap Modal: z-index superiore a Syncfusion grid */
.modal-backdrop {
  z-index: 10000 !important;
}
.modal {
  z-index: 10001 !important;
}

/* Custom file input: hide native input and show localized wrapper */
.custom-file-wrapper {
  position: relative;
}
.custom-file-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.custom-file-wrapper .custom-file-display {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
}
.custom-file-wrapper .custom-file-btn {
  padding: 0.375rem 0.75rem;
  background: var(--file-input-btn-bg);
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 1rem;
}
.custom-file-wrapper .custom-file-text {
  padding: 0.375rem 0.75rem;
  color: var(--file-input-text-color);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Syncfusion Grid: responsive / mobile ───────────────────────── */
@media (max-width: 767.98px) {
  /* Abilita scroll orizzontale per griglie su mobile */
  .e-grid .e-gridcontent,
  .e-grid .e-gridheader {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Riduci padding celle */
  .e-grid .e-rowcell,
  .e-grid .e-headercell {
    padding: 6px 8px !important;
    font-size: 0.85rem;
  }
  /* Pager compatto */
  .e-grid .e-pager {
    font-size: 0.8rem;
  }
  .e-grid .e-pager .e-numericcontainer {
    gap: 2px;
  }
  /* Riduci altezza toolbar */
  .e-grid .e-toolbar {
    min-height: auto;
    padding: 4px;
  }
  /* Card body scroll per contenere la griglia */
  .card-body:has(.e-grid) {
    overflow-x: auto;
    padding: 0.5rem;
  }
}