/* =========================================
   1. VARIABLES & ROOT
   ========================================= */
:root {
  /* raggio unico per card, bottoni, link, campi, menu, modali, avvisi: cambiando questo valore cambia tutto il portale.
     Fanno eccezione i cerchi (50%) e le barre sottili (progress, stepper). */
  --radius: 16px;
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius);
  --bs-border-radius-lg: var(--radius);
  --bs-border-radius-xl: var(--radius);
  --bs-border-radius-xxl: var(--radius);
  --bs-border-radius-2xl: var(--radius);
  --bs-border-radius-pill: var(--radius);
  /* palette VeryCall dal sito verycall.it: bianco #ffffff, azzurro #eaf3ff, blu scuro #1a2433 (testo) e #2d3a56 (pulsanti) */
  --ink: #0d141a;
  --brand: #2d3a56;
  --brand-hover: #44547a;
  --brand-dark: #1a2433;
  --brand-deep: #1a2433;
  --brand-soft: #eaf3ff;
  --accent: #44547a;
  --accent-soft: #e3ebf7;
  --page-bg: #eaf3ff;
  --line: #d3deee;
  --font-body:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-title:
    "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  --bs-body-font-family: var(--font-body);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 45, 58, 86;
  --bs-link-hover-color: var(--brand-dark);
  --bs-link-hover-color-rgb: 26, 36, 51;
  --bs-body-bg: var(--page-bg);
  --bs-body-color: #1a2433;
  --bs-focus-ring-color: rgba(45, 58, 86, 0.25);
  --text-dark: #2c3e50;
  --text-muted: #5b6672;
  --danger-color: #dc3545;
  --success-color: #198754;
  --excel-color: #107c41;
  /* alert */
  --bg-alert-full-msg: #f1f1f1;
  --color-alert-full-msg: #aaa9a9;
  --bg-alert-success: #00a20f;
  --color-alert-high-contrast-success: #ffffff;
  --bg-alert-error: #db0000;
  --color-alert-high-contrast-error: #ffffff;
  --bg-alert-warning: #e0942a;
  --color-alert-high-contrast-warning: #ffffff;
}

/*************************************
INIZIO TOAST CUSTOM
**************************************/
.toast {
  position: fixed;
  top: 20px;
  right: 5px;
  z-index: 99999999999;
}

/* =========================================================================
   TOAST DEL PORTALE (showToastCustom in main.js)
   ========================================================================= */

.app-toast {
  --toast-color: #f59e0b;
  --toast-soft: rgba(245, 158, 11, 0.14);

  position: fixed;
  top: 1.25rem;
  left: 50%;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: min(440px, calc(100vw - 2rem));
  padding: 0.95rem 1rem 1.05rem 0.95rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: var(--radius);
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 24px 48px -14px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translate(-50%, -14px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.app-toast-success {
  --toast-color: var(--success-color);
  --toast-soft: rgba(25, 135, 84, 0.12);
}

.app-toast-error {
  --toast-color: #dc3545;
  --toast-soft: rgba(220, 53, 69, 0.1);
}

.app-toast-icon {
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--toast-color);
  background: var(--toast-soft);
  border-radius: 50%;
}

.app-toast-text {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-dark);
  overflow-wrap: anywhere;
}

.app-toast-close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #94a3b8;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.app-toast-close:hover,
.app-toast-close:focus-visible {
  color: var(--text-dark);
  background: #f1f5f9;
  outline: none;
}

/* barra che si esaurisce nel tempo di visualizzazione del toast */
.app-toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--toast-color);
  transform-origin: left center;
  animation: appToastProgress var(--toast-duration, 4500ms) linear forwards;
}

@keyframes appToastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* sotto la navbar fissa su schermi piccoli */
@media (max-width: 575.98px) {
  .app-toast {
    top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-toast {
    transition: none;
  }

  .app-toast-progress {
    animation: none;
  }
}

/* =========================================
   LAYOUT GENERALE
   ========================================= */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
  font-size: 0.95rem;
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.modal-title,
.app-card-title {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--brand-dark);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--brand-hover);
  box-shadow: 0 0 0 0.25rem rgba(45, 58, 86, 0.18);
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* =========================================
   INTESTAZIONE E NAVIGAZIONE
   ========================================= */
/* intestazione a tutta larghezza: logo a sinistra, utente a destra */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  flex-shrink: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px -20px rgba(13, 20, 26, 0.5);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0.5rem 0;
}

.app-brand img {
  display: block;
  height: calc(var(--header-h) - 18px);
  width: auto;
}

@media (max-width: 991.98px) {
  .app-header {
    padding: 0 0.75rem;
    gap: 0.4rem;
  }
}

.app-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  flex: 0 0 auto;
}

.app-avatar-sm {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.72rem;
}

/* =========================================
   CONTENUTO
   ========================================= */
.app-main {
  flex: 1 0 auto;
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.page-sub {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
}

.app-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px rgba(13, 20, 26, 0.05),
    0 8px 24px -12px rgba(13, 20, 26, 0.15);
  overflow: hidden;
}

.app-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.app-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.app-card-title i {
  color: var(--brand);
  margin-right: 0.4rem;
}

.app-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #f7fafd;
}

.app-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.app-toolbar .search-box {
  flex: 1 1 260px;
  max-width: 480px;
}

.toolbar-select {
  width: auto;
  min-width: 170px;
}

.search-box .input-group-text {
  background: #fff;
  border-right: 0;
  color: var(--text-muted);
}

.search-box .form-control {
  border-left: 0;
}

/* =========================================
   BOTTONI
   ========================================= */
.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #1f2b44;
  --bs-btn-hover-border-color: #1f2b44;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #141c29;
  --bs-btn-active-border-color: #141c29;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: 209, 98, 0;
  font-weight: 600;
  box-shadow: 0 4px 12px -4px rgba(45, 58, 86, 0.55);
}

.btn-icon {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  background: transparent;
  border: 0;
}

.btn-icon:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* =========================================
   TABELLE
   ========================================= */
.table-app {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table-app thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-dark);
  background: #f7fafd;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1.25rem;
  white-space: nowrap;
}

.table-app tbody td {
  padding: 0.8rem 1.25rem;
  border-color: #e8eef5;
}

.table-app tbody tr:hover td {
  background: #f7fafd;
}

.table-app .row-disabled td {
  color: #8d99a6;
}

.table-app .row-disabled .app-avatar {
  background: #b8c3cf;
}

.empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem 1rem !important;
}

.empty-row i {
  font-size: 2rem;
  color: #c5d1de;
}

.pagination {
  --bs-pagination-color: var(--brand-dark);
  --bs-pagination-hover-color: var(--brand);
  --bs-pagination-hover-bg: var(--brand-soft);
  --bs-pagination-active-bg: var(--brand);
  --bs-pagination-active-border-color: var(--brand);
  --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(45, 58, 86, 0.2);
  --bs-pagination-border-radius: 10px;
}

/* =========================================
   BADGE
   ========================================= */
.badge {
  font-weight: 600;
}

.badge-soft {
  padding: 0.38em 0.7em;
  border-radius: 999px;
}

.badge-green {
  color: #146c43;
  background: #d7f0e2;
}

.badge-red {
  color: #b02a37;
  background: #fadcdf;
}

.badge-amber {
  color: #9a5b00;
  background: #ffe9c2;
}

.badge-gray {
  color: #4f5a66;
  background: #e7ecf2;
}

.badge-profilo-admin {
  color: #fff;
  background: var(--brand-dark);
}

.badge-profilo-user {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

/* =========================================
   DASHBOARD
   ========================================= */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  box-shadow:
    0 1px 2px rgba(13, 20, 26, 0.05),
    0 8px 24px -14px rgba(13, 20, 26, 0.18);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

a.stat-card:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -12px rgba(13, 20, 26, 0.3);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-orange .stat-icon {
  color: var(--brand);
  background: #eaf3ff;
}
.stat-brown .stat-icon {
  color: #2d3a56;
  background: #dde5f2;
}
.stat-amber .stat-icon {
  color: #b07400;
  background: #ffefc9;
}
.stat-green .stat-icon {
  color: #1d8a55;
  background: #d9f2e5;
}

.stat-body {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.quick-list {
  padding: 0.5rem;
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  color: var(--brand-dark);
  font-weight: 600;
}

.quick-item:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.quick-item > i:first-child {
  color: var(--brand);
  font-size: 1.15rem;
}

/* =========================================
   LOGIN
   ========================================= */
.login-wrap {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 1rem 3rem;
  background: radial-gradient(900px 300px at 50% 0, #e6edf5 0, transparent 70%);
}

.login-brand {
  display: block;
}

.login-brand img {
  display: block;
  height: 104px;
  width: auto;
}

@media (max-width: 575.98px) {
  .login-brand img {
    height: 84px;
  }
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.1rem 2rem 2rem;
  box-shadow:
    0 2px 6px rgba(13, 20, 26, 0.06),
    0 28px 50px -22px rgba(13, 20, 26, 0.35);
}

.login-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brand);
  background: var(--brand-soft);
}

/* =========================================
   MODALI
   ========================================= */
.modal-content {
  border: 0;
  box-shadow: 0 30px 70px -20px rgba(13, 20, 26, 0.45);
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-title {
  color: var(--brand-dark);
  font-weight: 700;
}

.modal-footer {
  border-top: 1px solid var(--line);
}

.modal-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.modal-icon-warning {
  color: #b07400;
  background: #ffefc9;
}

.session-countdown {
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-dark);
}

/* =========================================
   FOOTER
   ========================================= */
.app-footer {
  flex-shrink: 0;
  padding: 1rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  background: #f7fafd;
}

/* superfici bianche: campi, dropdown e modali non ereditano lo sfondo beige della pagina */
.app-card,
.login-card,
.modal,
.dropdown-menu,
.pagination {
  --bs-body-bg: #fff;
}

/* =========================================
   MENU A TENDINA (colori del brand al posto del blu di bootstrap)
   ========================================= */
.dropdown-menu {
  --bs-dropdown-border-color: var(--line);
  --bs-dropdown-link-color: var(--brand-dark);
  --bs-dropdown-link-hover-color: var(--brand);
  --bs-dropdown-link-hover-bg: var(--brand-soft);
  --bs-dropdown-link-active-color: #fff;
  --bs-dropdown-link-active-bg: var(--brand);
  --bs-dropdown-header-color: var(--text-muted);
  --bs-dropdown-padding-y: 0.4rem;
  padding: 0.4rem;
}

.dropdown-menu .dropdown-item {
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  font-weight: 500;
}

.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:focus-visible {
  color: var(--brand);
  background: var(--brand-soft);
  outline: none;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
  color: #fff;
  background: var(--brand);
}

/* =========================================
   ELENCHI CON FILTRI (clienti e simili)
   ========================================= */
.th-sort {
  cursor: pointer;
  user-select: none;
}

.th-sort:hover,
.th-sort.sorted {
  color: var(--brand);
}

.sort-icon {
  font-size: 0.7rem;
  opacity: 0.35;
  margin-left: 0.15rem;
}

.th-sort.sorted .sort-icon {
  opacity: 1;
}

.table-app thead .filter-row th {
  padding: 0.45rem 0.6rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  text-transform: none;
}

.table-app thead .filter-row th:first-child {
  padding-left: 1.25rem;
}

.filter-row .form-control {
  min-width: 90px;
  background: #f7fafd;
  font-weight: 400;
}

.filter-row .form-control:focus {
  background: #fff;
}

.piva-alert {
  margin-top: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #9a5b00;
  background: #fff3d6;
  border-radius: 10px;
}

.piva-alert a {
  font-weight: 600;
}

.btn-icon-danger:hover {
  color: #b02a37;
  background: #fadcdf;
}

.modal-icon-danger {
  color: #b02a37;
  background: #fadcdf;
}

/* tabelle con molte colonne */
.table-compact thead th,
.table-compact tbody td {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

.table-compact thead .filter-row th {
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}

.table-compact thead th:first-child,
.table-compact tbody td:first-child {
  padding-left: 1.25rem;
}

.table-compact thead th:last-child,
.table-compact tbody td:last-child {
  padding-right: 1.25rem;
}

.table-compact .filter-row .form-control {
  min-width: 0;
}

/* =========================================
   CONTRATTI
   ========================================= */
.toolbar-date {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toolbar-date .input-group {
  flex: 0 0 auto;
  width: auto;
  flex-wrap: nowrap;
}

.toolbar-date .form-control {
  width: 9.5rem;
  min-width: 0;
  flex: 0 0 auto;
}

.toolbar-date .input-group-text {
  background: #fff;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cell-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.filter-chip-bar {
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #f7fafd;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.4rem 0.3rem 0.8rem;
  font-size: 0.88rem;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
}

.filter-chip a {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brand-dark);
}

.filter-chip a:hover {
  background: #fff;
  color: var(--brand);
}

.state-box {
  height: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafd;
}

/* scelta cliente */
.client-search {
  position: relative;
}

.client-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow-y: auto;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px -12px rgba(13, 20, 26, 0.35);
}

.client-result {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: var(--brand-dark);
}

.client-result small {
  color: var(--text-muted);
}

.client-result:hover,
.client-result:focus {
  background: var(--brand-soft);
  outline: none;
}

.client-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.client-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  color: var(--brand-dark);
}

.client-chip-text small {
  color: var(--text-muted);
}

/* allegati */
.allegati-box {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafd;
}

.allegati-head {
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.allegati-head i {
  color: var(--brand);
}

.allegati-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.allegati-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.25rem;
  border-bottom: 1px solid #e6edf4;
}

.allegati-list li:last-child {
  border-bottom: 0;
}

.allegati-vuoto {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.allegato-icona {
  font-size: 1.4rem;
  color: var(--brand);
}

.allegato-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
}

.allegato-info a,
.allegato-info > span {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.allegato-azioni,
.allegato-conferma {
  white-space: nowrap;
}

.dropzone {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 2px dashed #c5d1de;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.dropzone:hover,
.dropzone.drag {
  border-color: var(--brand-hover);
  background: var(--brand-soft);
}

.dropzone > i {
  font-size: 1.8rem;
  color: var(--brand);
}

@media (max-width: 767.98px) {
  .toolbar-select {
    width: 100%;
  }

  .toolbar-date {
    width: 100%;
  }

  .toolbar-date .input-group {
    flex: 1 1 100%;
  }

  .toolbar-date .form-control {
    flex: 1 1 0;
    width: auto;
  }
}

.client-result-vuoto {
  padding: 0.6rem 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.filter-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* modali: intestazione e piè di pagina fissi, scorre solo il corpo (modal-dialog-scrollable; il form sta dentro il modal-body) */
.modal-dialog-scrollable .modal-body {
  overscroll-behavior: contain;
}

/* =========================================
   STORICO / REGISTRO ATTIVITA'
   ========================================= */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.25rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line);
}

.tl-item {
  position: relative;
  display: flex;
  gap: 0.9rem;
  padding: 0.55rem 0;
}

.tl-dot {
  position: relative;
  z-index: 1;
  flex: 0 0 1.9rem;
  width: 1.9rem;
  height: 1.9rem;
  margin-left: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.log-c .tl-dot {
  color: #146c43;
  background: #d7f0e2;
}
.log-u .tl-dot {
  color: #9a5b00;
  background: #ffe9c2;
}
.log-d .tl-dot {
  color: #b02a37;
  background: #fadcdf;
}
.log-l .tl-dot {
  color: #4f5a66;
  background: #e7ecf2;
}
.tl-ko .tl-dot {
  color: #fff;
  background: #b02a37;
}

.tl-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 0.4rem;
}

.tl-head {
  color: var(--brand-dark);
}

.tl-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.tl-meta i {
  margin-right: 0.15rem;
}

.tl-sep {
  margin: 0 0.35rem;
}

.tl-cambi {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.75rem;
  background: #f7fafd;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.86rem;
}

.tl-cambi li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.12rem 0;
}

.tl-campo {
  min-width: 8.5rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.tl-da {
  color: #9a4b52;
  text-decoration: line-through;
  text-decoration-color: rgba(176, 42, 55, 0.35);
  overflow-wrap: anywhere;
}

.tl-a {
  color: #146c43;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.tl-vuoto {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 400;
}

.tl-cambi i {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tl-snap {
  margin-top: 0.4rem;
  font-size: 0.86rem;
}

.tl-snap summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
}

.tl-snap dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1rem;
  margin: 0.4rem 0 0;
  padding: 0.6rem 0.8rem;
  background: #f7fafd;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tl-snap dt {
  color: var(--brand-dark);
  font-weight: 600;
}

.tl-snap dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.log-riga-d td {
  background: #fff8f8;
}

.btn-nuovo-prodotto {
  height: calc(3.5rem + 2px);
  white-space: nowrap;
}

.client-result.prodotto-nuovo {
  margin-top: 0.2rem;
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  color: var(--brand);
}

/* =========================================
   LAYOUT CON MENU LATERALE
   ========================================= */
:root {
  --sb-w: 248px;
  --sb-w-collapsed: 74px;
  --header-h: 64px;
}

@media (max-width: 991.98px) {
  :root {
    --header-h: 56px;
  }
}

.app-shell {
  flex: 1 0 auto;
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.app-sidebar {
  position: sticky;
  top: var(--header-h);
  flex: 0 0 var(--sb-w);
  width: var(--sb-w);
  height: calc(100vh - var(--header-h));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 0.75rem 1.5rem;
  background: #fff;
  border-right: 1px solid var(--line);
  transition:
    width 0.2s ease,
    flex-basis 0.2s ease,
    transform 0.25s ease;
  z-index: 1040;
}

.app-content {
  flex: 1 1 0;
  min-width: 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.app-content .app-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.app-content .app-footer > .container-xl {
  max-width: none;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

/* voci del menu */
.sb-section {
  margin: 1.1rem 0.75rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d99a6;
  white-space: nowrap;
}

.sb-section:first-child {
  margin-top: 0.25rem;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.62rem 0.8rem;
  margin-bottom: 0.15rem;
  color: #1a2433;
  font-weight: 500;
  border-radius: 12px;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}

.sb-link > i:first-child {
  flex: 0 0 1.25rem;
  font-size: 1.1rem;
  text-align: center;
  color: #6e7b88;
  transition: color 0.15s;
}

.sb-link:hover {
  color: var(--brand-dark);
  background: #eef3f9;
}

.sb-link:hover > i:first-child {
  color: var(--brand);
}

.sb-link.active {
  color: var(--brand-dark);
  font-weight: 600;
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.sb-link.active > i:first-child {
  color: var(--brand);
}

.sb-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-caret {
  font-size: 0.75rem;
  color: #8d99a6;
  transition: transform 0.2s;
}

.sb-group-toggle[aria-expanded="true"] .sb-caret {
  transform: rotate(180deg);
}

/* niente margin verticali: dentro un .collapse in animazione fanno "rimbalzare" l'altezza; si usa il padding del contenitore */
.app-sidebar .collapse,
.app-sidebar .collapsing {
  overflow: hidden;
}

.app-sidebar .collapsing {
  transition-duration: 0.2s;
}

.sb-sub {
  margin: 0 0 0 1.35rem;
  padding: 0.1rem 0 0.4rem 0.6rem;
  border-left: 2px solid var(--line);
}

.sb-sub .sb-link {
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.sb-sub .sb-link > i:first-child {
  font-size: 0.95rem;
}

.sb-toggle {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--brand-dark);
  border-radius: 10px;
}

.sb-toggle:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.app-user-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  padding: 0.3rem 0.5rem;
  color: var(--brand-dark);
  font-weight: 500;
}

.app-user-btn:hover,
.app-user-btn:focus,
.app-user-btn.show {
  color: var(--brand);
  background: var(--brand-soft);
}

.sb-backdrop {
  display: none;
}

/* menu richiuso (solo icone): solo schermi grandi */
@media (min-width: 992px) {
  html.sb-collapsed .app-sidebar {
    flex-basis: var(--sb-w-collapsed);
    width: var(--sb-w-collapsed);
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  html.sb-collapsed .sb-label,
  html.sb-collapsed .sb-caret {
    display: none;
  }

  html.sb-collapsed .sb-section {
    height: 1px;
    margin: 0.8rem 0.5rem;
    padding: 0;
    overflow: hidden;
    background: var(--line);
    font-size: 0;
  }

  html.sb-collapsed .sb-link {
    justify-content: center;
    padding: 0.7rem 0;
  }

  html.sb-collapsed .sb-link.active {
    box-shadow: none;
  }

  html.sb-collapsed .sb-sub,
  html.sb-collapsed .app-sidebar .collapse {
    display: none !important;
  }
}

/* tablet e telefono: il menu esce da sinistra sopra il contenuto */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    height: 100dvh;
    width: 270px;
    flex-basis: 270px;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(13, 20, 26, 0.25);
  }

  html.sb-open .app-sidebar {
    transform: none;
  }

  html.sb-open .sb-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(13, 20, 26, 0.4);
  }

  .app-content .app-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* scelta delle colonne (tabella.js): pannello laterale da destra */
.col-offcanvas {
  --bs-offcanvas-width: 340px;
  --bs-offcanvas-bg: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -20px rgba(13, 20, 26, 0.35);
}

.col-offcanvas .offcanvas-header {
  border-bottom: 1px solid var(--line);
}

.col-offcanvas .offcanvas-title {
  color: var(--brand-dark);
  font-weight: 700;
}

.offcanvas-footer {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  background: #f7fafd;
}

/* selezione rapida (tutte / nessuna / predefinite) in cima al pannello: stessi pulsanti piccoli del resto dell'applicativo */
.col-chooser-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.col-chooser-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.col-chooser-item:hover {
  background: var(--brand-soft);
}

.col-chooser-item.fissa {
  color: var(--text-muted);
  cursor: default;
}

.col-chooser-item .bi-lock-fill {
  margin-left: auto;
  font-size: 0.75rem;
}

/* telefono: i campi a meno di 16px fanno ingrandire la pagina quando li tocchi (iOS), spostando poi menu e tendine */
@media (max-width: 767.98px) {
  .form-control,
  .form-select,
  .form-control-sm,
  .form-select-sm {
    font-size: 16px;
  }
}

/* righe per pagina (menu al posto della tendina nativa) */
.per-page .dropdown-menu {
  min-width: 8rem;
}

/* titolo e pulsante di chiusura del menu: solo dove il menu esce da sinistra (tablet e telefono) */
.sb-head {
  display: none;
}

@media (max-width: 991.98px) {
  .sb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -0.25rem -0.25rem 0.5rem;
    padding: 0 0.25rem 0.6rem 0.8rem;
    border-bottom: 1px solid var(--line);
  }

  .sb-head-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-dark);
  }

  .sb-close {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--brand-dark);
    border-radius: 10px;
  }

  .sb-close:hover,
  .sb-close:focus {
    color: var(--brand);
    background: var(--brand-soft);
  }
}

/* =========================================
   PIU' COLORE
   Stessa palette del sito (#2d3a56, #1a2433, #eaf3ff, #ffffff) con un blu di accento (#176be0, presente nel sito):
   intestazione blu, menu laterale scuro, tabelle e card con piu' contrasto.
   ========================================= */
:root {
  --accent-blue: #176be0;
  --nav-bg: #1a2433;
  --head-bg: #2d3a56;
}

/* --- intestazione blu con logo su tessera bianca --- */
.app-header {
  background: var(--head-bg);
  border-bottom: 0;
  box-shadow: 0 6px 18px -10px rgba(13, 20, 26, 0.6);
}

.app-brand img {
  box-sizing: border-box;
  height: calc(var(--header-h) - 16px);
  padding: 3px 12px;
  background: #fff;
  border-radius: 12px;
}

.app-header .sb-toggle {
  color: #fff;
}

.app-header .sb-toggle:hover,
.app-header .sb-toggle:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.app-header .app-user-btn {
  color: #fff;
}

.app-header .app-user-btn:hover,
.app-header .app-user-btn:focus,
.app-header .app-user-btn.show {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.app-header .app-avatar {
  color: var(--head-bg);
  background: #fff;
}

/* --- menu laterale scuro --- */
.app-sidebar {
  background: var(--nav-bg);
  border-right: 0;
}

.sb-section {
  color: #7f90b3;
}

.sb-link {
  color: #d3dcee;
}

.sb-link > i:first-child {
  color: #8fa0c4;
}

.sb-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sb-link:hover > i:first-child {
  color: #fff;
}

.sb-link.active {
  color: #fff;
  background: var(--head-bg);
  box-shadow: inset 3px 0 0 var(--accent-blue);
}

.sb-link.active > i:first-child {
  color: #fff;
}

.sb-caret {
  color: #8fa0c4;
}

.sb-sub {
  border-left-color: rgba(255, 255, 255, 0.14);
}

.sb-head {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.sb-head-title {
  color: #d3dcee;
}

.sb-close {
  color: #fff;
}

.sb-close:hover,
.sb-close:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 992px) {
  html.sb-collapsed .sb-section {
    background: rgba(255, 255, 255, 0.14);
  }
}

/* --- card e tabelle --- */
.app-card {
  border-top: 3px solid var(--head-bg);
}

.table-app thead th {
  color: var(--head-bg);
  background: #dfeafb;
  border-bottom-color: #c9dbf4;
}

.table-app thead .filter-row th {
  background: #f1f7ff;
}

.table-app tbody tr:hover td {
  background: #f1f7ff;
}

.th-sort:hover,
.th-sort.sorted {
  color: var(--accent-blue);
}

.app-card-foot,
.app-toolbar {
  background: #f7faff;
}

.app-card-head {
  background: #f7faff;
}

/* --- dashboard: tessere a tinta piena --- */
.stat-orange .stat-icon {
  color: #fff;
  background: var(--head-bg);
}

.stat-brown .stat-icon {
  color: #fff;
  background: var(--accent-blue);
}

.stat-amber .stat-icon {
  color: #fff;
  background: #f0a020;
}

.stat-green .stat-icon {
  color: #fff;
  background: #1f9d6b;
}

.stat-card {
  border-top: 3px solid var(--head-bg);
}

/* --- login: sfondo blu --- */
.page-login {
  background: linear-gradient(160deg, #2d3a56 0%, #1a2433 100%);
}

.page-login .login-wrap {
  background: none;
}

.page-login .login-brand img {
  box-sizing: border-box;
  height: 96px;
  padding: 8px 22px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.6);
}

.page-login .login-card {
  border: 0;
}

.page-login .app-footer {
  color: #9fb0d0;
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.14);
}

@media (max-width: 575.98px) {
  .page-login .login-brand img {
    height: 78px;
    padding: 6px 16px;
  }
}

/* link: blu di accento, cosi' si distinguono dal testo (sottolineati al passaggio del mouse) */
:root {
  --bs-link-color: var(--accent-blue);
  --bs-link-color-rgb: 23, 107, 224;
  --bs-link-hover-color: #0f4fa8;
  --bs-link-hover-color-rgb: 15, 79, 168;
}

.app-main
  a:not(.btn):not(.badge):not(.stat-card):not(.page-link):not(
    .dropdown-item
  ):not(.client-result):hover,
.app-footer a:hover {
  text-decoration: underline;
}

/* sezioni dei form lunghi (scheda prodotto) e riga di scelta si/no */
.form-section {
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.4rem;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--brand-dark);
  border-bottom: 1px solid var(--line);
}

.form-section:first-child {
  margin-top: 0;
}

.radio-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faff;
}

.radio-line-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 5.5rem;
}

/* =========================================
   MENU A TENDINA (Slim Select): stessa veste degli input Bootstrap
   ========================================= */
:root {
  --ss-primary-color: var(--brand-hover);
  --ss-border-color: var(--bs-border-color, #dee2e6);
  --ss-border-radius: var(--radius);
  --ss-font-color: var(--bs-body-color, #212529);
  --ss-focus-color: rgba(45, 58, 86, 0.18);
  --ss-highlight-color: #fff3b0;
  --ss-main-height: calc(1.5em + 0.75rem + 2px);
  --ss-option-height: 2.4rem;
  --ss-search-height: 2.4rem;
  --ss-spacing-l: 0.75rem;
  --ss-spacing-m: 0.6rem;
}

.ss-main {
  padding: 0 0.25rem 0 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  overflow: visible;
}

.ss-main:focus,
.ss-main.ss-open-below,
.ss-main.ss-open-above {
  border-color: var(--brand-hover);
  box-shadow: 0 0 0 0.25rem var(--ss-focus-color);
}

.ss-main .ss-values .ss-placeholder {
  color: var(--text-muted);
}

.ss-content {
  border-color: var(--line);
  border-radius: var(--radius);
  margin: 4px 0;
  box-shadow: 0 8px 24px rgba(26, 36, 51, 0.14);
  font-size: 0.95rem;
}

.ss-content .ss-search {
  padding: 0.5rem;
}

.ss-content .ss-search input {
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.95rem;
}

.ss-content .ss-list .ss-option:hover,
.ss-content .ss-list .ss-option.ss-highlighted {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.ss-content .ss-list .ss-option.ss-selected {
  background: var(--brand);
  color: #fff;
}

/* filtri nelle barre strumenti */
.toolbar-select + .ss-main,
.ss-main.toolbar-select {
  width: auto;
  min-width: 170px;
}

@media (max-width: 767.98px) {
  .ss-main.toolbar-select {
    width: 100%;
  }
}

/* dentro form-floating: l'etichetta resta in alto come per le select native */
.form-floating > .ss-main {
  min-height: calc(3.5rem + 2px);
  padding: 1.625rem 0.25rem 0.375rem 0.75rem;
  align-items: flex-end;
}

.form-floating > .ss-main .ss-values {
  align-self: flex-end;
}

@media (max-width: 767.98px) {
  .ss-main,
  .ss-content,
  .ss-content .ss-search input {
    font-size: 16px; /* niente zoom automatico su iOS */
  }
}

/* Slim Select copia le classi della select (form-select, toolbar-select) sul proprio contenitore: tolgo la freccia e il padding
   di Bootstrap, che si sommerebbero a quelli di Slim Select */
.ss-main.form-select,
.ss-content.form-select {
  background-image: none;
  padding-right: 0.25rem;
}

.ss-content.form-select {
  padding: 0;
  min-width: 0;
  width: auto;
}

.ss-content.toolbar-select {
  width: auto;
  min-width: 170px;
}

.form-floating > .ss-main.form-select {
  padding-right: 0.25rem;
  height: auto;
}

/* recupero password: link sotto il modulo e icone di esito */
.login-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-blue, var(--brand));
  text-decoration: none;
}

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

.login-icon-ok {
  color: #198754;
  background: #e6f4ec;
}

.login-icon-warn {
  color: #b7791f;
  background: #fdf3e0;
}

/* campo del codice di verifica (2FA): cifre grandi e spaziate */
.form-control-code {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-align: center;
  padding-top: 1.75rem;
}

.form-floating > .form-control-code ~ label {
  letter-spacing: normal;
  width: 100%;
  text-align: center;
}

.btn-link.login-link:disabled {
  color: var(--text-muted);
  opacity: 0.8;
}

/* link: stesso aspetto ovunque (anche i pulsanti-link): blu di accento, niente sottolineatura, sottolineati al passaggio del mouse */
.btn-link,
.login-link {
  --bs-btn-color: var(--accent-blue);
  --bs-btn-hover-color: #0f4fa8;
  --bs-btn-active-color: #0f4fa8;
  --bs-btn-disabled-color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
}

.btn-link:hover,
.btn-link:focus-visible,
.login-link:hover {
  text-decoration: underline;
}

.login-link {
  font-size: 0.9rem;
  color: var(--accent-blue);
}

.login-link:hover {
  color: #0f4fa8;
}

/* icone di azione nelle tabelle: un colore per tipo di azione (blu modifica, viola storico, giallo archivia, verde ripristina/attiva/nuovo, rosso elimina) */
.btn-icon.btn-edit {
  color: #176be0;
}

.btn-icon.btn-edit:hover {
  color: #0f4fa8;
  background: #e3eefd;
}

.btn-icon.btn-storico {
  color: #7a4fd1;
}

.btn-icon.btn-storico:hover {
  color: #5f3bb0;
  background: #efe8fb;
}

.btn-icon.btn-archive,
.btn-icon.btn-toggle[data-attivo="0"],
.btn-icon.btn-toggle[data-attiva="0"] {
  color: #c98a0a;
}

.btn-icon.btn-archive:hover,
.btn-icon.btn-toggle[data-attivo="0"]:hover,
.btn-icon.btn-toggle[data-attiva="0"]:hover {
  color: #9a6700;
  background: #fdf0d3;
}

.btn-icon.btn-archive[data-archivia="0"],
.btn-icon.btn-toggle[data-attivo="1"],
.btn-icon.btn-toggle[data-attiva="1"],
.btn-icon.btn-nuovo-contratto {
  color: #198754;
}

.btn-icon.btn-archive[data-archivia="0"]:hover,
.btn-icon.btn-toggle[data-attivo="1"]:hover,
.btn-icon.btn-toggle[data-attiva="1"]:hover,
.btn-icon.btn-nuovo-contratto:hover {
  color: #0f6b3f;
  background: #dff3e8;
}

.btn-icon.btn-icon-danger {
  color: #c0392b;
}

.btn-icon.btn-icon-danger:hover {
  color: #a02317;
  background: #fadcdf;
}
