/* =========================================================
   01) ROOT / BASE
   INIZIO
========================================================= */
:root {
  --bg: #eaf4fb;
  --sidebar-bg: #123d63;
  --sidebar-bg-2: #0f5f93;
  --card: #ffffff;
  --text: #f8fbff;
  --text-dark: #102033;
  --muted: #5f7894;
  --border: #bdd7ea;
  --primary: #0f88c8;
  --primary-soft: #dff3ff;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --shadow: 0 14px 34px rgba(15, 70, 110, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #dff2ff 0%, #eef8ff 45%, #ffffff 100%);
  color: var(--text-dark);
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.menu-item,
.menu-toggle-group,
.btn,
.row-btn,
.quick-btn,
.info-card,
.icon-btn {
  transition: all 0.2s ease;
}

input,
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPop {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInBlur {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }
}
/* =========================================================
   01) ROOT / BASE
   FINE
========================================================= */


/* =========================================================
   01B) SFONDO APP
   INIZIO
========================================================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../assets/bg.jpg") center/cover no-repeat;
  filter: blur(5px) saturate(1.05);
  opacity: 0.34;
  transform: scale(1.03);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(222, 240, 252, 0.70);
  z-index: -1;
}
/* =========================================================
   01B) SFONDO APP
   FINE
========================================================= */


/* =========================================================
   02) LAYOUT GENERALE
   INIZIO
========================================================= */
.app-layout {
  min-height: 100vh;
  display: flex;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
}

.content-area {
  padding: 22px;
  position: relative;
  z-index: 1;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeSlideUp 0.28s ease;
}
/* =========================================================
   02) LAYOUT GENERALE
   FINE
========================================================= */


/* =========================================================
   03) SIDEBAR
   INIZIO
========================================================= */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, rgba(13, 67, 108, 0.96), rgba(14, 101, 150, 0.94));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 10px 0 34px rgba(8, 47, 73, 0.20);
}

.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.logo-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.logo-box h1 {
  margin: 0;
  font-size: 20px;
}

.logo-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.close-sidebar,
.menu-toggle {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.close-sidebar:hover,
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.close-sidebar {
  display: none;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.menu-item.active {
  background: linear-gradient(90deg, #1ea7e1, #0f88c8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 136, 200, 0.28);
}

.menu-toggle-group {
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
}

.menu-toggle-group:hover {
  background: rgba(255, 255, 255, 0.06);
}

.submenu {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  margin-left: 12px;
}

.submenu.open {
  display: flex;
  animation: fadeSlideUp 0.2s ease;
}

.menu-item.sub {
  font-size: 14px;
  padding: 12px 14px;
}
/* =========================================================
   03) SIDEBAR
   FINE
========================================================= */


/* =========================================================
   04) TOPBAR
   INIZIO
========================================================= */
.topbar {
  position: relative;
  z-index: 5000;
  overflow: visible;
  background: rgba(241, 248, 253, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(177, 210, 230, 0.9);
  box-shadow: 0 5px 18px rgba(15, 70, 110, 0.08);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left h2 {
  margin: 0;
  font-size: 24px;
}

.topbar-left p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 6000;
  overflow: visible;
}
/* =========================================================
   04) TOPBAR
   FINE
========================================================= */


/* =========================================================
   05) CARD / HERO / INFO
   INIZIO
========================================================= */
.hero-card,
.section-card,
.info-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: fadeSlideUp 0.28s ease;
}

.hero-card {
  margin-bottom: 22px;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-card h3,
.section-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hero-card p,
.section-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.info-card {
  cursor: pointer;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.info-card span {
  font-size: 28px;
  display: inline-block;
  margin-bottom: 10px;
}

.info-card h4 {
  margin: 0 0 8px;
  font-size: 20px;
}

.info-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}
/* =========================================================
   05) CARD / HERO / INFO
   FINE
========================================================= */


/* =========================================================
   06) FORM GENERALI
   INIZIO
========================================================= */
.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.inline-time {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* =========================================================
   06) FORM GENERALI
   FINE
========================================================= */


/* =========================================================
   07) BOTTONI GENERALI
   INIZIO
========================================================= */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(180deg, #22b4e8, #0f88c8);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 136, 200, 0.24);
}

.btn.primary:hover {
  background: linear-gradient(180deg, #18a8dc, #0879b5);
}

.btn.dark {
  background: #315a78;
  color: white;
}

.btn.dark:hover {
  background: #244761;
}

.btn.danger {
  background: #dc2626;
  color: white;
}

.btn.danger:hover {
  background: #b91c1c;
}

.btn.small {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn.soft {
  background: #eef2ff;
  color: #3730a3;
}

.btn.soft:hover {
  filter: brightness(0.98);
}
/* =========================================================
   07) BOTTONI GENERALI
   FINE
========================================================= */


/* =========================================================
   08) BOX / OUTPUT / TOTALI
   INIZIO
========================================================= */
.output-box {
  margin-top: 16px;
  min-height: 180px;
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  line-height: 1.5;
}

.total-box {
  margin-top: 18px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px;
  font-size: 20px;
  font-weight: 800;
}

.operator-card {
  margin-top: 18px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.operator-header {
  margin-bottom: 10px;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.month-box {
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  white-space: nowrap;
}
/* =========================================================
   08) BOX / OUTPUT / TOTALI
   FINE
========================================================= */


/* =========================================================
   09) SPESA SOLIDALE
   INIZIO
========================================================= */
.spesa-toolbar {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spesa-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.spesa-actions-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.spesa-actions-top .btn {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.stat-box {
  background: rgba(241, 245, 249, 0.85);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  border: 1px solid #e2e8f0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.spesa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1300px;
}

.spesa-table th,
.spesa-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.spesa-table th {
  background: rgba(248, 250, 252, 0.9);
  color: #334155;
  position: sticky;
  top: 0;
  z-index: 1;
}

.spesa-table tr:hover td {
  background: rgba(248, 250, 252, 0.75);
}

.badge-yes,
.badge-no,
.badge-emergenza {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-yes {
  background: #dcfce7;
  color: #166534;
}

.badge-no {
  background: #fee2e2;
  color: #991b1b;
}

.badge-emergenza {
  background: #fef3c7;
  color: #92400e;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.row-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.row-btn:hover {
  transform: translateY(-1px);
}

.row-btn.edit {
  background: #dbeafe;
  color: #1d4ed8;
}

.row-btn.delete {
  background: #fee2e2;
  color: #b91c1c;
}
/* =========================================================
   09) SPESA SOLIDALE
   FINE
========================================================= */


/* =========================================================
   10) MODAL GENERALI
   INIZIO
========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(40, 75, 105, 0.35);
  backdrop-filter: blur(14px) brightness(0.95);
  -webkit-backdrop-filter: blur(14px) brightness(0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999999;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeInBlur 0.22s ease;
}

.modal-card {
  width: min(900px, 100%);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #bdd7ea;
  color: #102033;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 70, 110, 0.22);
  animation: softPop 0.22s ease;
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.icon-btn {
  border: none;
  background: #e6f5ff;
  color: #0d4268;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(90deg);
}
/* =========================================================
   10) MODAL GENERALI
   FINE
========================================================= */


/* =========================================================
   11) CONSEGNE
   INIZIO
========================================================= */
.consegne-wrap,
.consegne-list-card {
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.consegna-form-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 251, 255, 0.85) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#consegnaTesto {
  min-height: 120px;
  resize: vertical;
}

.consegna-meta-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
}

.consegne-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.consegne-subtext {
  margin: 6px 0 0;
  color: #64748b;
}

.consegne-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.consegne-tools input {
  min-width: 220px;
}

.consegne-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.consegna-card {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.consegna-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.consegna-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.consegna-head-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.consegna-operatore {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.consegna-info-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.consegna-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.88);
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.consegna-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.consegna-note {
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  line-height: 1.6;
  color: #1e293b;
  white-space: pre-wrap;
}

.consegna-empty {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  text-align: center;
  color: #64748b;
  background: rgba(248, 250, 252, 0.75);
}
/* =========================================================
   11) CONSEGNE
   FINE
========================================================= */


/* =========================================================
   12) HOME DASHBOARD
   INIZIO
========================================================= */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.dash-box {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.dash-box:hover {
  transform: translateY(-2px);
}

.dash-box span {
  display: block;
  font-size: 22px;
  margin-top: 6px;
}

.dash-box small {
  color: #64748b;
  font-weight: 600;
}

.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.quick-btn {
  flex: 1;
  min-width: 140px;
  border: none;
  background: #1e293b;
  color: white;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}

.quick-btn:hover {
  background: #0f172a;
  transform: translateY(-1px);
}
/* =========================================================
   12) HOME DASHBOARD
   FINE
========================================================= */


/* =========================================================
   13) NUMERI MISERICORDIE
   INIZIO
========================================================= */
.numeri-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.numeri-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.num-tab {
  border: none;
  background: rgba(226, 232, 240, 0.92);
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.num-tab:hover {
  transform: translateY(-1px);
}

.num-tab.active {
  background: #1e293b;
  color: white;
}

.numeri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.numero-card {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.numero-card:hover {
  transform: translateY(-2px);
}

.numero-card h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.numero-comune {
  color: #64748b;
  margin-bottom: 12px;
  font-size: 14px;
}

.numero-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.numero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid #e2e8f0;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
}

.numero-pill:hover {
  transform: translateX(3px);
}

.numero-azioni {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.numero-note {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
}
/* =========================================================
   13) NUMERI MISERICORDIE
   FINE
========================================================= */


/* =========================================================
   14) CHECKLIST
   INIZIO
========================================================= */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 14px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: 48px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.check-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.check-item input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.check-item span {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.checklist-date {
  margin-top: 8px;
  font-weight: 700;
  color: #64748b;
  font-size: 14px;
}

.checklist-archivio {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.checklist-record {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.checklist-record-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.checklist-record-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-record-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.checklist-record-meta {
  color: #64748b;
  font-size: 14px;
}

.checklist-record-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: none;
}

.checklist-details.open {
  display: block;
  animation: fadeSlideUp 0.2s ease;
}

.checklist-detail-list {
  display: grid;
  gap: 8px;
}

.checklist-detail-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.checklist-progress-box {
  margin-top: 14px;
  background: rgba(248, 250, 252, 0.85);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 12px;
}

.checklist-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin-bottom: 10px;
  color: #0f172a;
}

.checklist-progress-bar {
  width: 100%;
  height: 16px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.checklist-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 999px;
  transition: width 0.25s ease;
}
/* =========================================================
   14) CHECKLIST
   FINE
========================================================= */


/* =========================================================
   15) PRESIDI
   INIZIO
========================================================= */
.presidi-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.presidi-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.presidi-toolbar input,
.presidi-toolbar select {
  flex: 1;
  min-width: 220px;
}

.presidi-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.presidi-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.presidi-table,
.presidi-table td,
.table-wrap,
.row-actions {
  position: relative;
}

.presidi-table th,
.presidi-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.presidi-table th {
  background: rgba(248, 250, 252, 0.9);
  color: #334155;
  position: sticky;
  top: 0;
  z-index: 1;
}

.presidi-table tr:hover td {
  background: rgba(248, 250, 252, 0.75);
}

.badge-presidio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-presidio.ok {
  background: #dcfce7;
  color: #166534;
}

.badge-presidio.low {
  background: #fef3c7;
  color: #92400e;
}

.badge-presidio.zero {
  background: #fee2e2;
  color: #991b1b;
}
/* =========================================================
   15) PRESIDI
   FINE
========================================================= */


/* =========================================================
   16) MODAL GESTIONE PRESIDI
   INIZIO
========================================================= */
.modal-presidi-card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: hidden;
}

.presidi-settings-top {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 18px;
}

.presidi-settings-top input,
.presidi-settings-top select {
  width: 100%;
  min-width: 0;
}

.presidi-settings-top .btn {
  width: auto;
  white-space: nowrap;
}

.tipi-presidi-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tipo-presidio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid #e2e8f0;
  font-weight: 700;
}

.tipo-presidio-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.tipo-presidio-item span {
  color: #0f172a;
  word-break: break-word;
}
/* =========================================================
   16) MODAL GESTIONE PRESIDI
   FINE
========================================================= */


/* =========================================================
   17) CONFIGURAZIONE TIPI PRESIDI
   INIZIO
========================================================= */
.presidi-config-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.presidi-config-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.presidi-config-form input {
  flex: 1;
  min-width: 260px;
}
/* =========================================================
   17) CONFIGURAZIONE TIPI PRESIDI
   FINE
========================================================= */


/* =========================================================
   18) MODAL SEZIONI PRESIDI / CATEGORIE
   INIZIO
========================================================= */
.modal-section-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.55);
  border: 1px solid rgba(203, 213, 225, 0.9);
  flex-shrink: 0;
}

.modal-section-head {
  margin-bottom: 14px;
}

.modal-section-head h4 {
  margin: 0 0 6px;
  font-size: 19px;
  color: #0f172a;
}

.modal-section-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.tipi-presidi-list,
.presidi-config-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}

.tipi-presidi-list::-webkit-scrollbar,
.presidi-config-list::-webkit-scrollbar {
  width: 8px;
}

.tipi-presidi-list::-webkit-scrollbar-track,
.presidi-config-list::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.6);
  border-radius: 999px;
}

.tipi-presidi-list::-webkit-scrollbar-thumb,
.presidi-config-list::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.7);
  border-radius: 999px;
}

.tipo-presidio-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tipo-presidio-item-title {
  font-weight: 700;
  color: #0f172a;
}

.tipo-presidio-item-sub {
  font-size: 13px;
  color: #64748b;
}
/* =========================================================
   18) MODAL SEZIONI PRESIDI / CATEGORIE
   FINE
========================================================= */


/* =========================================================
   19) USER MENU / DROPDOWN
   INIZIO
========================================================= */
.user-menu-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(241, 245, 249, 0.96);
  border: 1px solid #94a3b8;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  color: #111827;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.user-chip:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.user-chip .arrow {
  font-size: 12px;
  transition: transform 0.18s ease;
}

.user-chip.open .arrow {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 99999;
  overflow: hidden;
  animation: fadeSlideUp 0.18s ease;
}

.user-dropdown.open {
  display: flex;
}

.user-dropdown .dropdown-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.user-dropdown .dropdown-btn:hover {
  transform: translateY(-1px);
}

.user-dropdown .dropdown-btn.change {
  background: #e0f2fe;
  color: #075985;
}

.user-dropdown .dropdown-btn.change:hover {
  background: #bae6fd;
}

.user-dropdown .dropdown-btn.logout {
  background: #fee2e2;
  color: #b91c1c;
}

.user-dropdown .dropdown-btn.logout:hover {
  background: #fecaca;
}
/* =========================================================
   19) USER MENU / DROPDOWN
   FINE
========================================================= */


/* =========================================================
   20) PAGINATION
   INIZIO
========================================================= */
.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.page-btn {
  border: none;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.page-btn.active {
  background: #1e293b;
  color: #fff;
}
/* =========================================================
   20) PAGINATION
   FINE
========================================================= */


/* =========================================================
   21) AFFITTI PRESIDI
   INIZIO
========================================================= */
.durata-inline {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.badge-affitto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-affitto.attivo {
  background: #dcfce7;
  color: #166534;
}

.badge-affitto.scadenza {
  background: #fef3c7;
  color: #92400e;
}

.badge-affitto.scaduto {
  background: #fee2e2;
  color: #991b1b;
}

.badge-affitto.restituito {
  background: #dbeafe;
  color: #1d4ed8;
}
/* =========================================================
   21) AFFITTI PRESIDI
   FINE
========================================================= */


/* =========================================================
   22) ACCOUNT OPERATORI BASE
   INIZIO
========================================================= */
.operator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.operator-row strong {
  color: #0f172a;
}

.operator-row small {
  color: #64748b;
}
/* =========================================================
   22) ACCOUNT OPERATORI BASE
   FINE
========================================================= */


/* =========================================================
   23) ACCOUNT OPERATORI / PERMESSI
   FIXATO LAYOUT SX / DX
========================================================= */

#accountOperatoreBackdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 20px 20px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.55);
  z-index: 5000;
}

#accountOperatoreBackdrop.open {
  display: flex;
  animation: fadeInBlur 0.22s ease;
}

#accountOperatoreBackdrop .modal-card {
  width: min(1280px, 96vw);
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  margin: 0 auto;
  position: relative;
}

#accountOperatoreBackdrop .modal-card::-webkit-scrollbar {
  width: 10px;
}

#accountOperatoreBackdrop .modal-card::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}

#accountOperatoreBackdrop .modal-card::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px;
}

#accountOperatoreBackdrop .modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 6px;
}

#accountOperatoreBackdrop .modal-top h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

#accountOperatoreBackdrop .icon-btn {
  flex-shrink: 0;
}

/* LAYOUT A 2 COLONNE */
.account-layout-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.account-left-panel,
.account-right-panel {
  min-width: 0;
}

.account-side-card {
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid #dbe3ee;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
}

.account-side-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.account-side-card p {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.5;
  font-size: 14px;
}

.account-right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#accountOperatoreBackdrop .form-grid {
  margin-top: 10px;
}

#accountOperatoreBackdrop .field label {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 4px;
}

#accountOperatoreBackdrop input,
#accountOperatoreBackdrop select {
  width: 100%;
  min-width: 0;
  height: 52px;
  border-radius: 16px;
  border: 1px solid #dbe3ee;
  background: rgba(248, 250, 252, 0.96);
  padding: 0 16px;
  font-size: 15px;
  color: #0f172a;
}

#accountOperatoreBackdrop input:focus,
#accountOperatoreBackdrop select:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.15);
}

#accountOperatoreBackdrop .actions-row {
  margin-top: 18px;
  gap: 12px;
}

#accountOperatoreBackdrop .actions-row .btn {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

/* LISTA OPERATORI A SINISTRA */
#listaOperatori {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 4px;
}

#listaOperatori::-webkit-scrollbar {
  width: 8px;
}

#listaOperatori::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}

#listaOperatori::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px;
}

#accountOperatoreBackdrop .operator-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbe3ee;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  margin-bottom: 0;
}

#accountOperatoreBackdrop .operator-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

#accountOperatoreBackdrop .operator-row strong {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

#accountOperatoreBackdrop .operator-row small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

#accountOperatoreBackdrop .operator-row > div:last-child {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#accountOperatoreBackdrop .operator-row .btn {
  flex: 1;
  min-width: 110px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

/* BOX PERMESSI A DESTRA */
#permessiOperatoreBox {
  margin-top: 6px !important;
  padding: 22px !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, rgba(248,250,252,0.96), rgba(241,245,249,0.94)) !important;
  border: 1px solid #dbe3ee !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

#permessiOperatoreBox > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

#permessiOperatoreBox h3 {
  margin: 0;
  font-size: 24px !important;
  font-weight: 800;
  color: #0f172a;
}

#permessiEditorSubtitle {
  margin-top: 6px !important;
  font-size: 14px !important;
  color: #64748b !important;
  line-height: 1.4;
}

#permessiOperatoreBox strong {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  color: #0f172a;
}

#permessiOperatoreBox .btn {
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

#permessiSezioniGrid,
#permessiAzioniGrid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 12px;
}

#permessiSezioniGrid label,
#permessiAzioniGrid label {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  min-height: 62px;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  border: 1px solid #dbe3ee !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.18s ease;
}

#permessiSezioniGrid label:hover,
#permessiAzioniGrid label:hover {
  transform: translateY(-2px);
  border-color: #94a3b8 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

#permessiSezioniGrid label span,
#permessiAzioniGrid label span {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  word-break: break-word;
}

#permessiSezioniGrid input[type="checkbox"],
#permessiAzioniGrid input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 8px;
  border: 2px solid #94a3b8;
  background: #fff;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  margin: 0;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

#permessiSezioniGrid input[type="checkbox"]::after,
#permessiAzioniGrid input[type="checkbox"]::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  transform: scale(0);
  transition: transform 0.15s ease;
}

#permessiSezioniGrid input[type="checkbox"]:checked,
#permessiAzioniGrid input[type="checkbox"]:checked {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

#permessiSezioniGrid input[type="checkbox"]:checked::after,
#permessiAzioniGrid input[type="checkbox"]:checked::after {
  transform: scale(1);
}
/* =========================================================
   23) ACCOUNT OPERATORI / PERMESSI
   FINE
========================================================= */


/* =========================================================
   24) RESPONSIVE
   INIZIO
========================================================= */
@media (max-width: 900px) {
  .cards-grid,
  .form-grid.two-cols,
  .presidi-form-grid,
  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.25s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .close-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .spesa-actions-top {
    justify-content: flex-start;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .presidi-table,
  .spesa-table {
    min-width: 900px;
  }

  #permessiSezioniGrid,
  #permessiAzioniGrid {
    grid-template-columns: 1fr !important;
  }

  .account-layout-grid {
    grid-template-columns: 1fr;
  }

  .account-side-card {
    position: static;
  }

  #listaOperatori {
    max-height: unset;
  }
}

@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .consegna-head,
  .checklist-record-top,
  .consegna-actions,
  .checklist-record-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .consegne-tools {
    width: 100%;
  }

  .consegne-tools input {
    width: 100%;
    min-width: unset;
  }

  .modal-card {
    padding: 16px;
    border-radius: 18px;
  }

  .modal-top {
    align-items: flex-start;
  }

  .presidi-toolbar {
    flex-direction: column;
  }

  .presidi-toolbar input,
  .presidi-toolbar select {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .section-head,
  .tipo-presidio-item,
  .presidi-config-form,
  .numeri-topbar {
    flex-direction: column;
  }

  .tipo-presidio-item {
    align-items: flex-start;
  }

  .presidi-settings-top {
    grid-template-columns: 1fr;
  }

  .presidi-settings-top .btn {
    width: 100%;
  }

  .tipi-presidi-list,
  .presidi-config-list {
    max-height: 220px;
  }

  .durata-inline {
    grid-template-columns: 1fr;
  }

  .section-head-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  #accountOperatoreBackdrop {
    padding: 60px 12px 12px;
  }

  #accountOperatoreBackdrop .modal-card {
    width: 100%;
    max-height: calc(100vh - 72px);
    padding: 16px;
    border-radius: 18px;
  }

  #accountOperatoreBackdrop .modal-top {
    align-items: flex-start;
  }

  #accountOperatoreBackdrop .modal-top h3 {
    font-size: 21px;
  }

  #accountOperatoreBackdrop .form-grid.two-cols {
    grid-template-columns: 1fr;
  }

  #accountOperatoreBackdrop .operator-row > div:last-child {
    width: 100%;
  }

  #accountOperatoreBackdrop .operator-row .btn {
    width: 100%;
  }

  #permessiOperatoreBox > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #permessiOperatoreBox .btn {
    width: 100%;
  }

  #permessiSezioniGrid label,
  #permessiAzioniGrid label {
    min-height: 58px;
    padding: 12px 14px !important;
  }

  #permessiSezioniGrid label span,
  #permessiAzioniGrid label span {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .topbar,
  .content-area {
    padding: 14px;
  }

  .hero-card,
  .section-card,
  .info-card {
    padding: 18px;
    border-radius: 18px;
  }

  .hero-card h3,
  .section-card h3 {
    font-size: 22px;
  }

  .topbar-left h2 {
    font-size: 20px;
  }

  .user-chip {
    display: none;
  }

  .actions-row {
    flex-direction: column;
  }

  .btn,
  .quick-btn {
    width: 100%;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    flex-direction: column;
  }

  .check-item {
    padding: 10px;
    min-height: auto;
  }

  .check-item span {
    font-size: 13px;
  }

  .checklist-progress-top {
    font-size: 14px;
  }

  .numero-card,
  .consegna-card,
  .checklist-record {
    padding: 14px;
  }

  .presidi-stats,
  .spesa-stats {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-box {
    width: 100%;
    border-radius: 14px;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    padding: 14px;
  }

  .modal-section-box {
    padding: 14px;
    border-radius: 16px;
  }

  .tipo-presidio-item {
    padding: 12px;
  }

  .tipo-presidio-item .btn {
    width: 100%;
  }

  .operator-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .operator-row .btn {
    width: 100%;
  }
}
/* =========================================================
   24) RESPONSIVE
   FINE
========================================================= */


/* =========================================================
   25) STAMPA
   INIZIO
========================================================= */

/* =========================================================
   24B) MOBILE FIX FINALE
   Sidebar scrollabile, modali e layout ottimizzati per telefono
========================================================= */
html,
body {
  min-height: 100%;
}

.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.85) rgba(15, 23, 42, 0.35);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.85);
  border-radius: 999px;
}

.table-wrap {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-layout {
    display: block;
    min-height: 100dvh;
  }

  .main-wrapper {
    min-height: 100dvh;
    width: 100%;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: min(86vw, 320px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 14px 120px !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .sidebar.open {
    left: 0 !important;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.42);
  }

  .sidebar-top {
    position: sticky;
    top: -16px;
    z-index: 2;
    padding: 8px 0 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.88));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .menu {
    gap: 8px;
    padding-bottom: 80px;
  }

  .menu-item,
  .menu-toggle-group {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .submenu {
    margin-left: 8px;
    padding-bottom: 4px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 8000;
    padding: 12px 14px;
  }

  .topbar-left {
    min-width: 0;
  }

  .topbar-left h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .topbar-left p {
    display: none;
  }

  .topbar-right {
    flex-shrink: 0;
  }

  .content-area {
    padding: 14px;
  }

  .section-card,
  .hero-card,
  .info-card {
    border-radius: 18px;
    padding: 16px;
  }

  .section-head,
  .consegne-toolbar,
  .numeri-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .section-head-actions,
  .spesa-actions-top,
  .quick-actions,
  .actions-row {
    width: 100%;
  }

  .section-head-actions .btn,
  .spesa-actions-top .btn,
  .quick-actions .quick-btn {
    width: 100%;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .modal-backdrop {
    align-items: flex-start !important;
    justify-content: center !important;
    overflow-y: auto !important;
    padding: 16px 10px !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-card {
    width: 100% !important;
    max-width: 560px !important;
    max-height: none !important;
    margin: 12px 0 32px !important;
    overflow: visible !important;
  }
}

@media (max-width: 700px) {
  body::before {
    filter: blur(5px);
    transform: scale(1.03);
  }

  body::after {
    background: rgba(15, 23, 42, 0.82);
  }

  .logo-box h1 {
    font-size: 18px;
    line-height: 1.12;
  }

  .logo-box p {
    font-size: 12px;
  }

  .logo-icon {
    width: 46px;
    height: 46px;
  }

  .dashboard-stats,
  .cards-grid,
  .form-grid.two-cols,
  .presidi-form-grid,
  .checklist-grid,
  #permessiSezioniGrid,
  #permessiAzioniGrid {
    grid-template-columns: 1fr !important;
  }

  .user-chip {
    display: inline-flex !important;
    max-width: 132px;
    padding: 9px 11px;
    font-size: 13px;
    overflow: hidden;
  }

  .user-chip span:not(.arrow) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-dropdown {
    position: fixed;
    top: 64px;
    right: 10px;
    left: 10px;
    min-width: 0;
    width: auto;
    z-index: 100000;
  }

  .topbar {
    gap: 10px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  .btn,
  .quick-btn,
  .row-btn {
    min-height: 44px;
  }

  .spesa-stats,
  .presidi-stats {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .stat-box,
  .month-box {
    width: 100%;
    border-radius: 14px;
    white-space: normal;
  }

  #accountOperatoreBackdrop {
    padding: 12px 10px !important;
    z-index: 100000 !important;
  }

  #accountOperatoreBackdrop .modal-card {
    max-height: none !important;
    width: 100% !important;
    padding: 14px !important;
    margin: 0 0 28px !important;
    overflow: visible !important;
  }

  .account-layout-grid {
    display: block !important;
  }

  .account-side-card {
    position: static !important;
    margin-bottom: 16px;
  }

  #listaOperatori {
    max-height: none !important;
    overflow: visible !important;
  }

  #accountOperatoreBackdrop .operator-row,
  .operator-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #accountOperatoreBackdrop .operator-row > div:last-child,
  .operator-row > div:last-child {
    width: 100%;
  }

  #accountOperatoreBackdrop .operator-row .btn,
  .operator-row .btn {
    width: 100%;
  }

  #permessiOperatoreBox {
    padding: 14px !important;
  }

  #permessiOperatoreBox > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #permessiOperatoreBox .btn {
    width: 100%;
  }

  .durata-inline,
  .inline-time {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .sidebar {
    width: 90vw !important;
  }

  .topbar-left h2 {
    font-size: 18px;
  }

  .content-area {
    padding: 10px;
  }

  .section-card,
  .hero-card,
  .info-card {
    padding: 14px;
    border-radius: 16px;
  }

  .hero-card h3,
  .section-card h3 {
    font-size: 20px;
  }

  .modal-card {
    padding: 12px !important;
    border-radius: 16px !important;
  }
}

@media print {
  @page {
    size: landscape;
    margin: 10mm;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  body::before,
  body::after {
    display: none !important;
  }

  .sidebar,
  .topbar,
  .menu-toggle,
  .close-sidebar,
  .spesa-actions-top,
  .spesa-toolbar input,
  .row-actions,
  .btn,
  .icon-btn,
  .consegne-toolbar,
  .actions-row,
  .no-print {
    display: none !important;
  }

  .app-layout,
  .main-wrapper,
  .content-area {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
  }

  .page {
    display: none !important;
  }

  .page.active,
  #spesasolidale {
    display: block !important;
  }

  .section-card,
  .table-wrap,
  .modal-card,
  .hero-card,
  .info-card,
  .dash-box,
  .numero-card,
  .consegna-card,
  .checklist-record,
  .checklist-progress-box,
  .operator-card,
  .total-box {
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .section-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 16px !important;
  }

  .month-box,
  .stat-box {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
  }

  .spesa-stats {
    margin: 12px 0 16px 0 !important;
    gap: 8px !important;
  }

  .table-wrap {
    overflow: visible !important;
  }

  .spesa-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
  }

  .spesa-table th,
  .spesa-table td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
    font-size: 12px !important;
    color: #000 !important;
    background: #fff !important;
  }

  .spesa-table th {
    position: static !important;
  }

  .badge-yes,
  .badge-no,
  .badge-emergenza {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    min-width: auto !important;
    padding: 4px 8px !important;
  }
}
/* =========================================================
   25) STAMPA
   FINE
========================================================= */

/* =========================================================
   26) PRESA SERVIZI - DEFINITIVO PULITO
========================================================= */

#presaServizi.page.active {
  display: grid !important;
  grid-template-columns: minmax(560px, 1fr) 700px !important;
  gap: 22px !important;
  align-items: start !important;
}

#presaServizi > .section-card,
#presaServizi .presa-servizi-shell {
  grid-column: 1 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 16px !important;
}

#presaServizi .section-head {
  margin-bottom: 10px !important;
}

#presaServizi .section-head h2,
#presaServizi .section-head h3 {
  font-size: 22px !important;
  margin: 0 0 4px !important;
}

#presaServizi .section-head p {
  font-size: 13px !important;
  margin: 0 !important;
}

#presaServizi .section-head-actions .btn,
#presaServizi .actions-row .btn {
  padding: 8px 12px !important;
  min-height: 34px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

#presaServizi .presa-servizi-form {
  max-height: calc(100vh - 105px) !important;
  overflow-y: auto !important;
  padding-right: 8px !important;
}

#presaServizi .presa-servizi-form::-webkit-scrollbar {
  width: 8px !important;
}

#presaServizi .presa-servizi-form::-webkit-scrollbar-track {
  background: rgba(15, 70, 110, 0.14) !important;
  border-radius: 999px !important;
}

#presaServizi .presa-servizi-form::-webkit-scrollbar-thumb {
  background: rgba(15, 136, 200, 0.55) !important;
  border-radius: 999px !important;
}

#presaServizi .form-grid {
  gap: 8px 12px !important;
  margin-top: 10px !important;
}

#presaServizi .form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#presaServizi .field {
  gap: 3px !important;
}

#presaServizi .field label {
  font-size: 12px !important;
  line-height: 1.1 !important;
}

#presaServizi input,
#presaServizi select {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}

#presaServizi textarea {
  min-height: 54px !important;
  height: 54px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  resize: vertical !important;
}

#presaServizi textarea[data-fs-field="motivo"],
#presaServizi textarea[data-fs-field="percorso"] {
  min-height: 58px !important;
  height: 58px !important;
}

#presaServizi .fs-radio-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-top: 2px !important;
}

#presaServizi .fs-radio-row label {
  min-height: 30px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

#presaServizi .fs-radio-row input {
  width: auto !important;
  height: auto !important;
  min-height: auto !important;
}

#presaServizi > .foglio-servizio-wrap,
#presaServizi .foglio-servizio-wrap {
  grid-column: 2 !important;
  grid-row: 1 !important;
  position: sticky !important;
  top: 92px !important;
  height: calc(100vh - 120px) !important;
  overflow: auto !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

#presaServizi .foglio-servizio-wrap::after {
  content: "" !important;
  display: block !important;
  min-height: 940px !important;
}

#presaServizi #foglioServizioStampabile,
#presaServizi .foglio-servizio {
  width: 794px !important;
  min-width: 794px !important;
  min-height: 1123px !important;
  margin: 0 auto !important;
  padding: 28px 28px 26px !important;
  background: #f7f7f3 !important;
  color: #222 !important;
  border: 2px solid #6b6b6b !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  transform: scale(0.84) !important;
  transform-origin: top center !important;
}

#presaServizi #foglioServizioStampabile *,
#presaServizi .foglio-servizio * {
  box-sizing: border-box !important;
  color: #222 !important;
  letter-spacing: 0 !important;
}

#presaServizi .fs-header {
  display: grid !important;
  grid-template-columns: 105px 1fr 105px !important;
  align-items: center !important;
  min-height: 92px !important;
  gap: 12px !important;
}

#presaServizi .fs-logo-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#presaServizi .fs-logo-left img {
  width: 88px !important;
  max-height: 88px !important;
  object-fit: contain !important;
  filter: grayscale(1) contrast(1.1) !important;
}

#presaServizi .fs-logo-right img {
  width: 92px !important;
  max-height: 92px !important;
  object-fit: contain !important;
  filter: grayscale(1) contrast(1.08) !important;
}

#presaServizi .fs-title {
  text-align: center !important;
}

#presaServizi .fs-title h2 {
  max-width: 520px !important;
  margin: 0 auto 6px !important;
  font-size: 25px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#presaServizi .fs-title p {
  margin: 4px 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

#presaServizi .fs-separator {
  height: 4px !important;
  background: #6f7777 !important;
  margin: 12px 0 10px !important;
  box-shadow: none !important;
}

#presaServizi .fs-center {
  text-align: center !important;
  min-height: 132px !important;
  padding: 0 0 4px !important;
}

#presaServizi .fs-center h3 {
  margin: 8px 0 10px !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#presaServizi .fs-center p {
  margin: 0 0 18px !important;
  font-size: 16px !important;
}

#presaServizi .fs-center h4 {
  margin: 0 0 24px !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#presaServizi .fs-center small {
  font-size: 12px !important;
  font-weight: 700 !important;
}

#presaServizi .fs-write,
#presaServizi .fs-line-value,
#presaServizi .fs-long-value,
#presaServizi .fs-small-value,
#presaServizi .fs-route-value,
#presaServizi .fs-equipaggio span {
  display: inline-block !important;
  border-bottom: 1.5px solid #777 !important;
  min-height: 22px !important;
  outline: none !important;
  padding: 2px 6px !important;
  font-weight: 700 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  background: transparent !important;
  box-shadow: none !important;
}

#presaServizi .fs-date-write {
  width: 150px !important;
}

#presaServizi .fs-centralinista-write {
  width: 340px !important;
  min-height: 35px !important;
}

#presaServizi .fs-top-grid {
  display: grid !important;
  grid-template-columns: 1.35fr 1.05fr 0.85fr 1.15fr !important;
  gap: 8px !important;
  margin-top: 8px !important;
}

#presaServizi .fs-person-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 8px !important;
}

#presaServizi .fs-bottom-grid {
  display: grid !important;
  grid-template-columns: 1.95fr 0.95fr !important;
  gap: 16px !important;
  margin-top: 12px !important;
}

#presaServizi .fs-panel,
#presaServizi .fs-notes-panel {
  border: 1.5px solid #6b6b6b !important;
  background: transparent !important;
  padding: 10px !important;
  text-align: center !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#presaServizi .fs-panel strong,
#presaServizi .fs-notes-panel strong {
  display: block !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  line-height: 1.12 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#presaServizi .fs-top-grid .fs-panel {
  min-height: 122px !important;
}

#presaServizi .fs-person-grid .fs-panel {
  min-height: 150px !important;
}

#presaServizi .fs-line-value {
  display: block !important;
  width: 100% !important;
  margin-top: 22px !important;
}

#presaServizi .fs-top-date {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  position: relative !important;
}

#presaServizi .fs-top-date .fs-line-value {
  display: block !important;
  width: 100% !important;
  min-height: 24px !important;
  height: 24px !important;
  margin-top: 36px !important;
  padding: 0 6px !important;
  line-height: 22px !important;
  text-align: center !important;
  border-bottom: 1.5px solid #777 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  cursor: text !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 30 !important;
}

#presaServizi .fs-top-date .fs-choice {
  margin-top: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  position: relative !important;
  z-index: 20 !important;
}

#presaServizi .fs-top-cost .fs-euro {
  margin-top: 35px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 17px !important;
  text-align: center !important;
}

#presaServizi .fs-top-cost .fs-line-value {
  text-align: center !important;
  flex: 0 1 120px !important;
  min-width: 120px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: 0 !important;
}

#presaServizi .fs-long-value {
  display: block !important;
  width: 100% !important;
  min-height: 35px !important;
  margin: 24px 0 14px !important;
  text-align: center !important;
}

#presaServizi .fs-person-grid .fs-panel .fs-line-value {
  text-align: center !important;
}

#presaServizi .fs-notes-panel {
  margin-top: 8px !important;
  min-height: 215px !important;
  padding: 8px 10px 10px !important;
  border: 1.5px solid #6b6b6b !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#presaServizi .fs-notes-value {
  display: block !important;
  width: 100% !important;
  min-height: 82px !important;
  margin: 18px 0 10px !important;
  padding: 0 6px !important;
  text-align: left !important;
  border: none !important;
  background-image:
    linear-gradient(to bottom, transparent 32px, #777 32px, #777 33.5px, transparent 33.5px),
    linear-gradient(to bottom, transparent 66px, #777 66px, #777 67.5px, transparent 67.5px) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 82px !important;
  line-height: 33px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#presaServizi .fs-notes-panel > strong:nth-of-type(2) {
  display: block !important;
  margin: 10px 0 12px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #222 !important;
  line-height: 1.2 !important;
}

#presaServizi .fs-route-row {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: end !important;
  gap: 10px !important;
  margin-top: 6px !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#presaServizi .fs-route-value {
  display: block !important;
  width: 100% !important;
  min-height: 31px !important;
  padding: 0 6px !important;
  text-align: left !important;
  border-bottom: 1.5px solid #777 !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 29px !important;
  overflow: hidden !important;
}

#presaServizi .fs-detail-grid {
  display: grid !important;
  grid-template-columns: 100px 220px 120px 115px 150px !important;
  gap: 7px !important;
  width: 100% !important;
  margin: 7px 0 10px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

#presaServizi .fs-detail-grid .fs-panel {
  min-width: 0 !important;
  height: 84px !important;
  min-height: 84px !important;
  padding: 5px 6px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center !important;
}

#presaServizi .fs-detail-grid .fs-panel strong {
  display: block !important;
  width: 100% !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#presaServizi .fs-detail-grid .fs-panel:nth-child(5) strong {
  font-size: 13.5px !important;
  line-height: 1.02 !important;
}

#presaServizi .fs-small-value {
  display: block !important;
  width: 100% !important;
  min-height: 20px !important;
  height: 20px !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding: 0 4px !important;
  border-bottom: 1.5px solid #777 !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 18px !important;
  text-align: center !important;
  overflow: hidden !important;
}

#presaServizi .fs-detail-grid .fs-choice,
#presaServizi .fs-sedia-choice {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  width: 100% !important;
  margin-top: 14px !important;
  margin-bottom: 0 !important;
}

#presaServizi .fs-detail-grid .fs-panel:nth-child(2) .fs-choice {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  font-size: 14.5px !important;
  gap: 3px !important;
  letter-spacing: -0.4px !important;
}

#presaServizi .fs-detail-grid .fs-panel:nth-child(3) .fs-choice,
#presaServizi .fs-detail-grid .fs-panel:nth-child(4) .fs-choice {
  margin-top: 18px !important;
}

#presaServizi .fs-detail-grid .fs-panel:nth-child(5) .fs-choice {
  margin-top: 12px !important;
  font-size: 14.5px !important;
  gap: 3px !important;
}

#presaServizi .fs-check,
#presaServizi .fs-big-check {
  display: inline-grid !important;
  place-items: center !important;
  border: 1.5px solid #555 !important;
  background: transparent !important;
  padding: 0 !important;
  color: #111 !important;
  font-family: Arial, sans-serif !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 20 !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
  box-shadow: none !important;
}

#presaServizi .fs-check {
  width: 18px !important;
  height: 18px !important;
  margin: 0 2px !important;
  font-size: 13px !important;
}

#presaServizi .fs-detail-grid .fs-check {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  margin: 0 1px !important;
}

#presaServizi .fs-big-check {
  width: 24px !important;
  height: 24px !important;
  margin: 0 2px !important;
  font-size: 15px !important;
}

#presaServizi .fs-check.checked::before,
#presaServizi .fs-big-check.checked::before {
  content: "X" !important;
  color: #000 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

#presaServizi .fs-equipaggio {
  min-height: 190px !important;
  text-align: left !important;
  padding: 10px 12px !important;
}

#presaServizi .fs-equipaggio h3,
#presaServizi .fs-mezzi h3 {
  text-align: center !important;
  margin: 0 0 12px !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

#presaServizi .fs-equipaggio p {
  margin: 11px 0 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: end !important;
  gap: 6px !important;
}

#presaServizi .fs-equipaggio span {
  flex: 1 !important;
  min-height: 22px !important;
}

#presaServizi .fs-bottom-line {
  border-bottom: 1px solid #777 !important;
  margin-top: 18px !important;
  box-shadow: none !important;
}

#presaServizi .fs-mezzi {
  min-height: 190px !important;
  padding: 10px 12px !important;
}

#presaServizi .fs-mezzi p {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 12px 0 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

.fs-editable-out {
  cursor: text !important;
  outline: none !important;
}

.fs-editable-out:focus {
  background: rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.18) !important;
}

@media (max-width: 1250px) {
  #presaServizi.page.active {
    display: block !important;
  }

  #presaServizi .presa-servizi-form {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  #presaServizi > .foglio-servizio-wrap,
  #presaServizi .foglio-servizio-wrap {
    position: static !important;
    height: auto !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    margin-top: 20px !important;
    padding: 20px 0 34px !important;
  }

  #presaServizi #foglioServizioStampabile,
  #presaServizi .foglio-servizio {
    transform: scale(1) !important;
  }

  #presaServizi .foglio-servizio-wrap::after {
    display: none !important;
  }
}

/* =========================================================
   27) STAMPA SOLO FOGLIO SERVIZIO
   Nota: se la stampa viene generata da js/presa-servizi.js con iframe,
   le dimensioni finali sono gestite nel CSS inline della funzione stampa.
========================================================= */

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }

  body.print-foglio-servizio::before,
  body.print-foglio-servizio::after {
    display: none !important;
  }

  body.print-foglio-servizio * {
    visibility: hidden !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile,
  body.print-foglio-servizio #foglioServizioStampabile * {
    visibility: visible !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile {
    position: fixed !important;
    left: 50% !important;
    top: 4mm !important;
    width: 184mm !important;
    min-width: 184mm !important;
    max-width: 184mm !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 4mm !important;
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #555 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: translateX(-50%) scale(0.97) !important;
    transform-origin: top center !important;
    box-sizing: border-box !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
    page-break-inside: avoid !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile *,
  body.print-foglio-servizio #foglioServizioStampabile .fs-panel,
  body.print-foglio-servizio #foglioServizioStampabile .fs-notes-panel {
    color: #111 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-separator {
    background: #777 !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid {
    display: grid !important;
    grid-template-columns: 0.9fr 1.95fr 1.05fr 1fr 1.42fr !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 6px 0 8px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 82px !important;
    min-height: 82px !important;
    padding: 5px 4px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel strong {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(1) strong,
  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(2) strong {
    font-size: 11px !important;
    line-height: 1.04 !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(5) strong {
    font-size: 9.4px !important;
    line-height: 1.02 !important;
    letter-spacing: -0.3px !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-small-value {
    display: block !important;
    width: 100% !important;
    height: 17px !important;
    min-height: 17px !important;
    line-height: 15px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 0 2px !important;
    border-bottom: 1px solid #777 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-choice,
  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-sedia-choice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    width: 100% !important;
    font-size: 10.4px !important;
    gap: 2px !important;
    margin-top: 10px !important;
    line-height: 1 !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(2) .fs-choice {
    margin-top: auto !important;
    font-size: 9.7px !important;
    gap: 1px !important;
    letter-spacing: -0.45px !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(3) .fs-choice,
  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(4) .fs-choice {
    margin-top: 13px !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-panel:nth-child(5) .fs-choice {
    margin-top: 6px !important;
    font-size: 9.8px !important;
    gap: 1px !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid .fs-check {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    margin: 0 1px !important;
  }

  body.print-foglio-servizio #foglioServizioStampabile .fs-detail-grid br,
  body.print-foglio-servizio #foglioServizioStampabile .fs-sedia-choice br,
  body.print-foglio-servizio #foglioServizioStampabile .fs-vertical-choice br {
    display: initial !important;
  }

  body.print-foglio-servizio .sidebar,
  body.print-foglio-servizio .topbar,
  body.print-foglio-servizio .actions-row,
  body.print-foglio-servizio .section-head,
  body.print-foglio-servizio .presa-servizi-shell {
    display: none !important;
  }
}

/* =========================================================
   28) ARCHIVIO SERVIZI
========================================================= */

.archivio-servizi-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(189, 215, 234, 0.95);
  color: #102033;
  box-shadow: 0 14px 34px rgba(15, 70, 110, 0.12);
}

.archivio-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.archivio-stat {
  background: #eef8ff;
  border: 1px solid #bdd7ea;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 70, 110, 0.08);
}

.archivio-stat span {
  display: block;
  color: #5f7894;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.archivio-stat strong {
  display: block;
  color: #102033;
  font-size: 24px;
  font-weight: 900;
}

.archivio-toolbar {
  display: grid;
  grid-template-columns: 1fr 180px 200px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.archivio-table-wrap {
  max-height: calc(100vh - 360px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #bdd7ea;
  border-radius: 16px;
}

.archivio-servizi-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.archivio-servizi-table th,
.archivio-servizi-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #d7e8f3;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.archivio-servizi-table th {
  background: #dff3ff;
  color: #0d4268;
  position: sticky;
  top: 0;
  z-index: 1;
}

.archivio-servizi-table tr:hover td {
  background: #eaf7ff;
}

/* =========================================================
   29) NUMERI MISERICORDIE - EXTRA
========================================================= */

.numero-card.vicino-augusta {
  border: 2px solid #22c55e;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.9));
}

.numero-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  min-width: 0;
}

.numero-indirizzo,
.numero-note {
  color: #334155;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.numero-indirizzo {
  margin: 10px 0;
}

.numero-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.numero-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.numero-badge.vicino {
  background: #bbf7d0;
  color: #166534;
}

.numero-badge.verifica {
  background: #fef3c7;
  color: #92400e;
}

.numero-email {
  display: inline-flex;
  margin-top: 4px;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.numero-mancante {
  background: #fee2e2;
  color: #991b1b;
}

/* =========================================================
   30) SPESA SOLIDALE - TEMA CHIARO
========================================================= */

#spesasolidale.page.active,
#spesasolidale .section-card h3,
#spesasolidale .section-card p,
#spesasolidale .section-head h3,
#spesasolidale .section-head p {
  color: #102033 !important;
}

#spesasolidale .section-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid #bdd7ea !important;
  color: #102033 !important;
  box-shadow: 0 14px 34px rgba(15, 70, 110, 0.12) !important;
}

#spesasolidale input,
#spesasolidale select,
#spesasolidale textarea {
  background: #ffffff !important;
  color: #102033 !important;
  border: 1px solid #a9cce3 !important;
}

#spesasolidale input::placeholder {
  color: #7892a8 !important;
}

#spesasolidale .month-box,
#spesasolidale .stat-box,
#spesasolidale .stat-pill {
  background: #eef8ff !important;
  color: #123d63 !important;
  border: 1px solid #bdd7ea !important;
  box-shadow: none !important;
}

#spesasolidale .ss-filter-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  flex-wrap: wrap;
  margin: 14px 0 18px !important;
}

#spesasolidale .ss-filter-btn {
  background: #dff3ff !important;
  color: #0b6595 !important;
  border: 1px solid #bdd7ea !important;
  box-shadow: none !important;
  opacity: 1 !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  cursor: pointer;
  white-space: nowrap;
}

#spesasolidale .ss-filter-btn:hover {
  background: #c8eaff !important;
  color: #084f77 !important;
}

#spesasolidale .ss-filter-btn.active {
  background: linear-gradient(180deg, #22b4e8, #0f88c8) !important;
  border-color: #0f88c8 !important;
  color: #ffffff !important;
}

.table-wrap,
#spesasolidale .table-wrap {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid #bdd7ea !important;
  box-shadow: 0 12px 30px rgba(15, 70, 110, 0.10) !important;
}

#spesasolidale .table-wrap {
  width: 100%;
  max-height: calc(100vh - 260px) !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  position: relative !important;
  border-radius: 14px !important;
}

.spesa-table,
#spesasolidale .spesa-table,
#spesasolidale table {
  background: #ffffff !important;
  color: #102033 !important;
}

#spesasolidale .spesa-table,
#spesasolidale table {
  width: 100%;
  min-width: 1280px;
  border-collapse: collapse;
  table-layout: auto;
}

.spesa-table th,
#spesasolidale .spesa-table thead th,
#spesasolidale thead th {
  background: #dff3ff !important;
  color: #0d4268 !important;
  border-bottom: 1px solid #bdd7ea !important;
  box-shadow: 0 2px 0 rgba(189, 215, 234, 0.8) !important;
}

.spesa-table td,
#spesasolidale .spesa-table td,
#spesasolidale tbody td {
  color: #102033 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #d7e8f3 !important;
  font-weight: 700 !important;
}

.spesa-table tbody tr:nth-child(even) td,
#spesasolidale tbody tr:nth-child(even) td {
  background: #f5fbff !important;
}

.spesa-table tbody tr:hover td,
#spesasolidale tbody tr:hover td {
  background: #eaf7ff !important;
}

#spesasolidale .spesa-table th:nth-child(5),
#spesasolidale .spesa-table td:nth-child(5),
#spesasolidale .ss-phone {
  min-width: 145px !important;
  width: 145px !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  color: #102033 !important;
  font-weight: 800 !important;
}

#spesasolidale td:nth-child(11),
#spesasolidale th:nth-child(11) {
  min-width: 190px;
}

#spesasolidale td:nth-child(12),
#spesasolidale th:nth-child(12) {
  min-width: 220px;
}

#spesasolidale td:nth-child(13),
#spesasolidale th:nth-child(13) {
  min-width: 105px;
  text-align: center;
}

#spesasolidale td:nth-child(14),
#spesasolidale th:nth-child(14) {
  min-width: 130px;
}

#spesasolidale .ss-badge.ok,
#spesasolidale .badge-yes,
.badge-yes {
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
}

#spesasolidale .ss-badge.no,
#spesasolidale .badge-no,
.badge-no {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

#spesasolidale .ss-badge.warn,
#spesasolidale .badge-emergenza,
.badge-emergenza {
  background: #fff4d6 !important;
  color: #8a5a00 !important;
  border: 1px solid #fde68a !important;
}

#spesasolidale .row-btn.edit,
#spesasolidale .actions-cell .edit,
.row-btn.edit {
  background: #dff3ff !important;
  color: #0b6595 !important;
}

#spesasolidale .row-btn.delete,
#spesasolidale .actions-cell .delete,
.row-btn.delete {
  background: #ffe2e2 !important;
  color: #b91c1c !important;
}

.btn,
.row-btn {
  line-height: 1.1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.modal-card .btn.primary,
#spesasolidale .btn.primary {
  min-width: 96px !important;
  white-space: nowrap !important;
}

/* =========================================================
   31) RESPONSIVE EXTRA
========================================================= */

@media (max-width: 1000px) {
  .archivio-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archivio-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .numeri-grid {
    grid-template-columns: 1fr;
  }

  .numero-card-top {
    flex-direction: column;
  }

  .numero-badges {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .archivio-stats-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   PAGINE DIPENDENTI / VOLONTARI - CARD MIGLIORATE
========================================================= */

#dipendenti .section-card,
#volontari .section-card {
  padding: 28px !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.58) !important;
  border: 1px solid rgba(140, 190, 220, 0.45) !important;
  box-shadow: 0 18px 45px rgba(25, 82, 120, 0.10) !important;
}

#dipendenti .section-head,
#volontari .section-head {
  align-items: center !important;
  margin-bottom: 20px !important;
}

#dipendenti .section-head h3,
#volontari .section-head h3 {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #172b45 !important;
  margin-bottom: 8px !important;
}

#dipendenti .section-head p,
#volontari .section-head p {
  color: #5f748b !important;
  font-size: 15px !important;
}

#dipendenti .btn.primary,
#volontari .btn.primary {
  border-radius: 14px !important;
  padding: 13px 20px !important;
  font-weight: 900 !important;
  background: linear-gradient(180deg, #22b4e8, #0f88c8) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 22px rgba(15, 136, 200, 0.26) !important;
}

.dv-page-toolbar {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 14px !important;
  align-items: center !important;
  margin: 22px 0 24px !important;
}

.dv-page-toolbar input {
  width: 100% !important;
  height: 46px !important;
  border-radius: 16px !important;
  border: 1px solid #bfd7ea !important;
  background: rgba(255, 255, 255, 0.82) !important;
  padding: 0 16px !important;
  color: #18314d !important;
  font-weight: 700 !important;
  outline: none !important;
}

.dv-page-toolbar input:focus {
  border-color: #22aee8 !important;
  box-shadow: 0 0 0 4px rgba(34, 174, 232, 0.16) !important;
}

.dv-page-toolbar .stat-box {
  height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 999px !important;
  padding: 0 18px !important;
  background: #e6f6ff !important;
  border: 1px solid #bddff2 !important;
  color: #0c4f7a !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

/* GRIGLIA CARD */
.dv-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

/* CARD PERSONA */
.dv-person-card {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241,249,255,0.82)) !important;
  border: 1px solid rgba(150, 200, 230, 0.70) !important;
  border-radius: 22px !important;
  padding: 20px !important;
  box-shadow: 0 18px 38px rgba(25, 82, 120, 0.12) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
  min-height: 230px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.dv-person-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 6px !important;
  background: linear-gradient(180deg, #21b4e9, #0f88c8) !important;
}

#volontari .dv-person-card::before {
  background: linear-gradient(180deg, #35d07f, #16a34a) !important;
}

.dv-person-card:hover {
  transform: translateY(-3px) !important;
  border-color: #21b4e9 !important;
  box-shadow: 0 24px 50px rgba(25, 82, 120, 0.18) !important;
}

.dv-person-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 14px !important;
}

.dv-person-top h4 {
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
  color: #14263d !important;
  font-weight: 950 !important;
}

.dv-person-top p {
  margin: 8px 0 0 !important;
  color: #5e748b !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.dv-person-badge {
  border-radius: 999px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
}

.dv-person-badge.dipendente {
  background: #dff3ff !important;
  color: #075985 !important;
  border-color: #b7ddf2 !important;
}

.dv-person-badge.volontario {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #a7f3d0 !important;
}

.dv-person-info {
  display: grid !important;
  gap: 10px !important;
  color: #273a50 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.dv-person-info strong {
  color: #132b45 !important;
  font-weight: 950 !important;
}

.dv-attestati-box {
  background: rgba(225, 244, 255, 0.92) !important;
  border: 1px solid #bddff2 !important;
  color: #17324d !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  min-height: 52px !important;
  white-space: pre-wrap !important;
  line-height: 1.4 !important;
  font-weight: 800 !important;
}

#volontari .dv-attestati-box {
  background: rgba(220, 252, 231, 0.72) !important;
  border-color: #b7e8c7 !important;
}

/* BOTTONI CARD */
.dv-card-actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: auto !important;
  padding-top: 4px !important;
}

.dv-card-actions .row-btn {
  border: 0 !important;
  border-radius: 12px !important;
  padding: 9px 13px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

.dv-card-actions .row-btn.edit {
  background: #dff3ff !important;
  color: #0b6595 !important;
}

.dv-card-actions .row-btn.delete {
  background: #ffe4e6 !important;
  color: #dc2626 !important;
}

.dv-card-actions .row-btn:hover {
  filter: brightness(0.96) !important;
  transform: translateY(-1px) !important;
}

/* CARD VUOTA */
.dv-empty-card {
  grid-column: 1 / -1 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px dashed #9fc8df !important;
  border-radius: 20px !important;
  padding: 32px !important;
  text-align: center !important;
  color: #60758c !important;
  font-weight: 900 !important;
}

/* MOBILE */
@media (max-width: 800px) {
  .dv-page-toolbar {
    grid-template-columns: 1fr !important;
  }

  .dv-cards-grid {
    grid-template-columns: 1fr !important;
  }

  #dipendenti .section-head,
  #volontari .section-head {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #dipendenti .btn.primary,
  #volontari .btn.primary {
    width: 100% !important;
  }
}