/* ============================================
   EG4NET v2 — Components
   Card, bottoni, badge, toast, modal, form, empty state
   ============================================ */

/* --- Card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-fast);
}
.card:hover {
  border-color: var(--border-medium);
}
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Mini card (hero stats) */
.mini-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mini-card .mini-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.mini-card strong {
  font-size: 1.2rem;
  font-weight: 600;
}

.clickable-card {
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  transition: all var(--transition-fast);
}
.clickable-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}

/* --- Bottoni --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-on-accent);
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 16px var(--accent-primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
  background: var(--sidebar-hover-bg);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--sidebar-hover-bg);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
}
.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-xs { padding: 5px 10px; font-size: 0.85rem; border-radius: var(--radius-sm); }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.icon-btn:hover {
  background: var(--sidebar-hover-bg);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.badge-neutral {
  background: rgba(100,116,139,0.12);
  color: var(--text-muted);
  border: 1px solid rgba(100,116,139,0.2);
}

/* --- Badge stato cliccabile (Preventive WIND3) --- */
.w3-stato-edit {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  border-radius: 50px;
  transition: filter .15s ease;
}
.w3-stato-edit:hover { filter: brightness(1.08); }
.w3-stato-caret {
  font-size: 0.6rem;
  opacity: 0.6;
  margin-left: 1px;
}
.w3-stato-menu {
  position: fixed;
  z-index: 9999;
  min-width: 150px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(100,116,139,0.25));
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.w3-stato-opt {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text, inherit);
  cursor: pointer;
}
.w3-stato-opt:hover { background: rgba(100,116,139,0.14); }
.w3-stato-opt.active {
  background: var(--color-info-bg);
  color: var(--color-info);
}

/* --- Toast (accent bar laterale stile C) --- */
.toast-container {
  position: fixed;
  top: calc(var(--topbar-height) + 12px);
  right: 16px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--glass-shadow);
  animation: toast-in 300ms ease forwards;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}
.toast-success::before { background: var(--color-success); }
.toast-error::before { background: var(--color-error); }
.toast-warning::before { background: var(--color-warning); }
.toast-info::before { background: var(--color-info); }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 1rem;
}
.toast-body { flex: 1; }
.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.toast-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}
.toast-close:hover { color: var(--text-primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Form --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* permette alle celle del grid di restringersi (no overflow mobile) */
}
.form-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-input,
.form-select,
.form-textarea {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
  min-width: 0;      /* no overflow del controllo dentro grid/flex */
  max-width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-input-focus);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 200ms ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: var(--glass-shadow);
  animation: modal-in 250ms ease;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title .modal-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.modal-title .modal-icon.danger {
  background: var(--color-error-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.modal-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.modal-body {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 24px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-close-btn { font-size: 1.2rem; }
.modal-close-x {
  position: sticky;
  top: 0;
  float: right;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  z-index: 10;
  margin: -8px -8px 0 0;
  transition: background 150ms, color 150ms;
}
.modal-close-x:hover {
  background: var(--color-error-bg, rgba(239,68,68,0.1));
  color: var(--color-error);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 16px;
  box-shadow: var(--glow-accent);
}
.empty-state h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 300px;
  margin-bottom: 20px;
}

/* --- Hero section (Home) --- */
.hero-section {
  margin-bottom: 24px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.clock-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  min-width: 140px;
}
.clock-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.clock-date {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 4px 0;
}
.clock-time {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

/* Section panel */
.panel {
  margin-bottom: 24px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-title {
  font-size: 1.2rem;
  font-weight: 600;
}
.panel-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Tabelle dati --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Colonne SOLO-mobile: nascoste su desktop, mostrate nella card mode (≤760px). */
.show-mobile { display: none; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.data-table th {
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
}

/* Testata fissa: la tabella con .table-sticky scorre internamente e mantiene
   visibile la riga di intestazione. Solo desktop (su mobile la tabella va in
   modalità card e la thead è nascosta). */
@media (min-width: 761px) {
  .table-wrap.table-sticky {
    max-height: calc(100dvh - var(--topbar-height) - 230px);
    overflow-y: auto;
  }
  .table-wrap.table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    /* Sfondo OPACO (le righe non devono trasparire): base opaca --bg-app + lo stesso
       strato translucido --bg-card sopra → identico alla card ma pieno. */
    background-color: var(--bg-app);
    background-image: linear-gradient(var(--bg-card), var(--bg-card));
  }
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.data-table tbody tr {
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
  background: var(--sidebar-hover-bg);
}
.data-table td strong {
  color: var(--text-primary);
}

/* Section head */
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Active segmented button */
.active-seg {
  background: var(--accent-primary) !important;
  color: var(--text-on-accent) !important;
  border-color: var(--accent-primary) !important;
}

/* Details/Summary */
details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  color: var(--text-primary);
  list-style: none;
}
details summary::before {
  content: '\25B8 ';
  color: var(--text-muted);
}
details[open] summary::before {
  content: '\25BE ';
}

/* Ruota reperibilità — card collassabile (caret dedicato, no marker globale) */
details.rep-ruota > summary { list-style: none; font-weight: 400; padding: 0; }
details.rep-ruota > summary::-webkit-details-marker { display: none; }
details.rep-ruota > summary::before { content: none; }
details.rep-ruota:not([open]) > summary { border-bottom: none !important; }
details.rep-ruota .rep-ruota-caret { transition: transform .15s ease; color: var(--text-muted); display: inline-block; }
details.rep-ruota[open] .rep-ruota-caret { transform: rotate(90deg); }

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
}

/* Fix dropdown/select menu colors for all themes */
.form-select option,
.form-input option,
select option {
  background: var(--bg-select-option, #0f1e38);
  color: var(--text-primary);
}
.form-select,
select.form-input {
  background-color: var(--bg-input);
  color: var(--text-primary);
  /* CRUCIALE per iOS: senza appearance:none le select usano il controllo nativo,
     che si dimensiona sull'opzione più lunga e IGNORA width/max-width → allarga la
     card e manda i form fuori schermo. Con appearance:none rispettano i vincoli. */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 40px;
  text-overflow: ellipsis;
}

/* ===================================================================
   FTTS Dashboard — Stats, Meta, Closed Tickets, Ticket Detail
   =================================================================== */

/* Stats bar orizzontale */
.ftts-stats-bar {
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}
.ftts-stat {
  flex: 1;
  min-width: 70px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ftts-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}
.ftts-stat strong {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Meta bar (filtro tecnico, reperibile, coordinatore) */
.ftts-meta-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 0;
}
.ftts-meta-item {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ftts-meta-item strong {
  color: var(--text-primary);
  font-size: 0.88rem;
}
.ftts-meta-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Closed Tickets Card List */
.closed-tk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.closed-tk-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.closed-tk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.closed-tk-head strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.closed-tk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.closed-tk-lbl {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 1px;
}
.closed-tk-activity {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 6px;
}

/* Ticket Detail (modal grid, come v1) */
.ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.ticket-detail-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ticket-detail-item .td-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.ticket-detail-item strong {
  word-break: break-word;
  color: var(--text-primary);
  font-size: 0.92rem;
}
.ticket-detail-item.td-full { grid-column: 1 / -1; }

/* Suspension notes section */
.td-notes-section {
  margin-top: 12px;
}
.td-notes-section .ticket-detail-item {
  border-left: 3px solid var(--color-warning);
}

/* Cabinet history section */
.td-history-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}
.td-history-table {
  margin-top: 8px;
  font-size: 0.82rem;
  overflow-x: auto;
}
.td-hist-header, .td-hist-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr 1.5fr 0.7fr;
  gap: 6px;
  align-items: center;
  padding: 5px 4px;
}
.td-hist-header {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.td-hist-row {
  border-bottom: 1px solid var(--border-subtle);
}
.td-hist-row:last-child { border-bottom: 0; }

/* Modal action buttons — multi-row wrap */
.td-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Extra button colors via utility classes */
.btn-info {
  background: var(--color-info, #3b82f6);
  color: #fff;
  border-color: var(--color-info, #3b82f6);
}
.btn-info:hover { opacity: 0.9; }
.btn-success {
  background: var(--color-success, #22c55e);
  color: #fff;
  border-color: var(--color-success, #22c55e);
}
.btn-success:hover { opacity: 0.9; }
.btn-warning {
  background: var(--color-warning, #f59e0b);
  color: #fff;
  border-color: var(--color-warning, #f59e0b);
}
.btn-warning:hover { opacity: 0.9; }

/* Form grid per modali edit/suspend */
.td-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0 0;
}
.td-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.td-form-field.td-form-full {
  grid-column: 1 / -1;
}
.td-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.td-form-grid .form-input {
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}
.td-form-grid textarea.form-input {
  resize: vertical;
  min-height: 60px;
}
.td-form-grid .modal-actions {
  grid-column: 1 / -1;
}

/* Magazzino */
.mag-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mag-filter-btns {
  display: flex;
  gap: 4px;
}
.mag-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}
.mag-group-details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.mag-group-details > summary {
  cursor: pointer;
  padding: 12px 14px;
  background: var(--bg-glass);
  list-style: none;
  min-height: 42px;
  display: flex;
  align-items: center;
  user-select: none;
}
.mag-group-details:not([open]) > summary {
  border-radius: var(--radius-md);
}
.mag-group-details > summary::-webkit-details-marker { display: none; }
.mag-group-details > summary::before {
  content: '\25B8 ';
  color: var(--text-muted);
  margin-right: 8px;
  font-size: 0.85rem;
}
.mag-group-details[open] > summary::before {
  content: '\25BE ';
}
.mag-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  gap: 8px;
}
.mag-table { font-size: 0.85rem; }
.mag-table td { padding: 6px 8px; }
.mag-actions-cell {
  display: flex;
  gap: 2px;
  white-space: nowrap;
}

/* ===================================================================
   MOBILE: max-width 760px (allineato a v1)
   Pattern: tabella -> card mode con data-label (come v1 mobile-card-table)
   =================================================================== */
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Section head: stack verticale */
  .section-head {
    flex-direction: column;
    gap: 6px;
  }
  .section-head h2 { font-size: 1.25rem; }
  .section-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  /* Azioni allineate a destra su mobile (es. Giornaliera: + Attività / Aggiorna) */
  .section-actions.section-actions-right {
    justify-content: flex-end;
  }
  /* Header che resta su UNA riga anche su mobile (Giornaliera: settimana a sx, tasti a dx) */
  .section-head.section-head-inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .section-head.section-head-inline > div:first-child {
    min-width: 0;
    flex-shrink: 1;
    flex-wrap: nowrap;
    gap: 4px;
  }
  /* Lascia restringere il badge settimana (ha min-width:120px inline) per stare in riga */
  .section-head.section-head-inline > div:first-child .badge {
    min-width: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .section-head.section-head-inline .section-actions {
    width: auto;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
  .section-head.section-head-inline .section-actions .btn {
    padding: 6px 9px;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .section-actions .btn {
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  /* Card padding ridotto */
  .card { padding: 12px; }

  /* Stats grid generico */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mini-card {
    padding: 10px 12px;
    gap: 2px;
  }
  .mini-card .mini-label { font-size: 0.68rem; }
  .mini-card strong { font-size: 1rem; }

  /* ---- FTTS Stats: griglia 3 col per numeri, full-width per settimana ---- */
  .ftts-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 8px 0 6px;
  }
  .ftts-stat {
    padding: 10px;
    gap: 2px;
    min-width: 0;
  }
  .ftts-stat-label { font-size: 0.62rem; }
  .ftts-stat strong { font-size: 1.15rem; }
  /* Settimana occupa tutta la riga */
  .ftts-stat.ftts-stat-wide {
    grid-column: 1 / -1;
  }

  /* Meta bar compatta */
  .ftts-meta-bar {
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 0;
  }
  .ftts-meta-item { font-size: 0.8rem; }
  .ftts-meta-item strong { font-size: 0.8rem; }
  .ftts-meta-item .form-select {
    font-size: 0.82rem;
    padding: 6px 8px;
  }

  /* "Clicca una riga" hint hidden */
  .card > div > small.muted { display: none; }

  /* ===== TABELLA -> CARD MODE (pattern v1 mobile-card-table) ===== */
  .table-wrap.v2-card-table { overflow: visible; }

  .table-wrap.v2-card-table table,
  .table-wrap.v2-card-table thead,
  .table-wrap.v2-card-table tbody,
  .table-wrap.v2-card-table tr,
  .table-wrap.v2-card-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .table-wrap.v2-card-table table {
    border-collapse: separate;
    border-spacing: 0;
  }
  .table-wrap.v2-card-table thead { display: none; }
  .table-wrap.v2-card-table tbody {
    display: grid;
    gap: 10px;
  }
  .table-wrap.v2-card-table tr {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    padding: 10px;
    cursor: pointer;
  }
  .table-wrap.v2-card-table td {
    border: 0;
    padding: 7px 4px;
    display: grid;
    grid-template-columns: minmax(80px, 35%) 1fr;
    gap: 8px;
    align-items: center;
    overflow-wrap: anywhere;
  }
  .table-wrap.v2-card-table td + td {
    border-top: 1px solid var(--border-subtle);
  }
  /* Label dalla header (iniettata via JS data-label) */
  .table-wrap.v2-card-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  /* Nascondi colonne taggate hide-mobile nella card mode */
  .table-wrap.v2-card-table td.hide-mobile,
  .table-wrap.v2-card-table td.hide-mobile-sm { display: none !important; }
  /* Colonne SOLO-mobile (es. Zona mostrata sotto Tipo guasto): visibili come riga card */
  .table-wrap.v2-card-table td.show-mobile { display: grid !important; }

  /* Select tecnico full-width nella card */
  .table-wrap.v2-card-table .form-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* ===== MODAL MOBILE ===== */
  .modal-backdrop {
    padding: 8px;
    align-items: stretch;
  }
  .modal-backdrop .modal {
    max-width: 100%;
    margin: 0;
    padding: 16px;
    max-height: 100dvh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
  }
  .modal-body { font-size: 0.88rem; }
  .modal-actions {
    flex-direction: column;
    gap: 6px;
  }
  .modal-actions .btn {
    width: 100%;
  }

  /* Ticket detail grid mobile: 1 colonna (niente overflow su valori lunghi) */
  .ticket-detail-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .ticket-detail-item { padding: 10px 12px; min-width: 0; }

  /* Action buttons wrap on mobile */
  .td-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .td-modal-actions .btn:last-child {
    grid-column: 1 / -1;
  }

  /* History items compact */
  .td-history-item {
    font-size: 0.78rem;
    gap: 4px;
  }

  /* Form grid single column on mobile */
  .td-form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* History table compact on mobile */
  .td-hist-header .hide-mobile,
  .td-hist-row .hide-mobile { display: none !important; }
  .td-hist-header, .td-hist-row {
    grid-template-columns: 1fr 1fr 0.8fr 0.8fr 0.6fr;
    font-size: 0.75rem;
    gap: 3px;
  }

  /* Magazzino toolbar stack */
  .mag-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .mag-filter-btns { justify-content: flex-start; }
  .mag-table { font-size: 0.78rem; }
  .mag-actions-cell { gap: 0; }

  /* Closed tickets list mobile */
  .closed-tk-list { max-height: 70vh; }
  .closed-tk-card { padding: 10px 12px; }
  .closed-tk-grid { gap: 3px 10px; font-size: 0.78rem; }
  .closed-tk-head strong { font-size: 0.82rem; }
  .closed-tk-activity { font-size: 0.76rem; }
}

/* ============================================
   Giornaliera Week Table (v2)
   ============================================ */
.g-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}
.g-week-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 700px;
  font-size: 0.85rem;
}
.g-week-table th,
.g-week-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  vertical-align: top;
}
.g-week-table th:last-child,
.g-week-table td:last-child { border-right: none; }
.g-week-table tbody tr:last-child td { border-bottom: none; }
.g-week-table th {
  background: var(--bg-glass);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
}
.g-week-table th span { display: block; font-size: 0.82rem; text-transform: uppercase; }
.g-week-table th small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.g-week-table td { color: var(--text-secondary); }
.g-week-table .is-today { background: rgba(59, 130, 246, 0.06); }
.g-tech-cell {
  white-space: nowrap;
  min-width: 120px;
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Giornaliera — layout mobile a schede (una per tecnico, giorni in verticale) */
.g-mobile { display: none; }
.g-mcard {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}
.g-mcard-head {
  background: var(--bg-glass);
  font-weight: 700;
  color: var(--text-primary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.g-mday {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.g-mday:last-child { border-bottom: none; }
.g-mday.is-today { background: rgba(59, 130, 246, 0.06); }
.g-mday-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-accent);
  text-transform: uppercase;
}
.g-mday-label small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.g-mday-body { min-width: 0; font-size: 0.82rem; color: var(--text-secondary); }
.g-manage .g-task-clickable, .g-mday-body .g-task-clickable { cursor: pointer; }

@media (max-width: 768px) {
  .g-table-wrap { display: none; }
  .g-mobile { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
}

/* Grouped tasks in cells */
.g-task-groups { display: flex; flex-direction: column; gap: 6px; }
.g-task-groups.compact { gap: 4px; }
.g-client-group {
  border-left: 3px solid var(--accent-primary);
  padding-left: 8px;
  border-radius: 2px;
}
.g-task-client {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-accent);
  margin-bottom: 2px;
}
.g-task-items {
  list-style: disc;
  padding-left: 16px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.g-task-items li { margin-bottom: 1px; }
.g-task-items li::marker { color: var(--text-muted); }
.g-muted-cell { color: var(--text-muted); opacity: 0.6; }

/* Tone classes for special statuses */
.g-client-group.is-ferie { border-left-color: var(--color-success); background: var(--color-success-bg); padding: 4px 8px; border-radius: var(--radius-sm); }
.g-task-client.is-ferie { color: var(--color-success); }
.g-task-items li.is-ferie { color: var(--color-success); }

.g-client-group.is-malattia { border-left-color: var(--color-error); background: var(--color-error-bg); padding: 4px 8px; border-radius: var(--radius-sm); }
.g-task-client.is-malattia { color: var(--color-error); }
.g-task-items li.is-malattia { color: var(--color-error); }

.g-client-group.is-manutenzione-mezzo { border-left-color: var(--color-warning); background: var(--color-warning-bg); padding: 4px 8px; border-radius: var(--radius-sm); }
.g-task-client.is-manutenzione-mezzo { color: var(--color-warning); }
.g-task-items li.is-manutenzione-mezzo { color: var(--color-warning); }

/* Client brand colors */
.g-client-group.is-wind3 { border-left-color: #f97316; }
.g-task-client.is-wind3 { color: #f97316; }
.g-client-group.is-inwit { border-left-color: #22d3ee; }
.g-task-client.is-inwit { color: #22d3ee; }
.g-client-group.is-ftts { border-left-color: #a78bfa; }
.g-task-client.is-ftts { color: #a78bfa; }
.g-client-group.is-tim { border-left-color: #3b82f6; }
.g-task-client.is-tim { color: #3b82f6; }
.g-client-group.is-vodafone { border-left-color: #ef4444; }
.g-task-client.is-vodafone { color: #ef4444; }

@media (max-width: 768px) {
  .g-week-table { min-width: 600px; font-size: 0.78rem; }
  .g-week-table th, .g-week-table td { padding: 6px 6px; }
  .g-tech-cell { min-width: 90px; }
}

/* ============================================
   Report Switch Cards (toggle SI/NO)
   ============================================ */
.report-switch-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
}
.report-switch-card > span { font-weight: 700; color: var(--text-primary); }
.report-switch-card input[type="checkbox"] {
  width: 54px !important; height: 30px !important;
  min-width: 54px !important; min-height: 30px !important;
  padding: 0 !important; margin: 0; cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.2);
  -webkit-appearance: none; appearance: none;
  position: relative; transition: var(--transition-fast);
}
.report-switch-card input[type="checkbox"]::after {
  content: ''; position: absolute;
  width: 22px; height: 22px; border-radius: 50%;
  top: 3px; left: 4px;
  background: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform .16s ease;
}
.report-switch-card input[type="checkbox"]:checked {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(14,165,233,.9), rgba(34,197,94,.9));
}
.report-switch-card input[type="checkbox"]:checked::after { transform: translateX(23px); }
.report-switch-card strong {
  min-width: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 5px 10px;
  background: rgba(148,163,184,0.1); border: 1px solid var(--border-subtle);
  color: var(--text-muted); font-size: 0; line-height: 1;
}
.report-switch-card strong::before { content: "NO"; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.report-switch-card input[type="checkbox"]:checked + strong {
  color: var(--color-success); background: var(--color-success-bg); border-color: rgba(34,197,94,0.3);
}
.report-switch-card input[type="checkbox"]:checked + strong::before { content: "SI"; }

/* Report email select dropdown */
/* La select email a tutta larghezza (riga propria) e CAPPATA: su iOS le select
   native prendono la larghezza dell'opzione più lunga e allargano l'intera card
   (→ la .form-grid sopra va a 2 colonne tagliate). flex-basis:100% + max-width la
   forzano dentro il contenitore. */
.report-email-select { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; }


/* Form su mobile: SEMPRE 1 colonna (anche se un figlio prova ad allargare la card)
   + la card del form non può generare scroll orizzontale di pagina. Così i form
   (Report Correttiva, INWIT SPI-CUI, ecc.) restano contenuti come gli altri tool. */
form.card { overflow-x: hidden; max-width: 100%; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr !important; }
}

/* ============================================
   File Search Results (Ricerca File Accesso)
   ============================================ */
.doc-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.doc-result-item:last-child { border-bottom: none; }
.doc-result-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.doc-result-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .doc-result-item { flex-direction: column; align-items: flex-start; }
  .doc-result-actions { width: 100%; }
  .doc-result-actions .btn { flex: 1; }
}

/* ===== Notification Drawer (right slide-in) ===== */
.notif-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 199;
  transition: background var(--transition-normal);
  pointer-events: none;
}
.notif-drawer-overlay.open {
  background: var(--bg-overlay);
  pointer-events: auto;
}

.notif-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 360px; max-width: 92vw;
  height: 100vh;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-medium);
  box-shadow: -8px 0 32px rgba(0,0,0,.25);
  z-index: 200;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}
.notif-drawer.open {
  transform: translateX(0);
}

.notif-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.notif-drawer-header h3 {
  margin: 0; font-size: 1.05rem; font-weight: 700;
  color: var(--text-primary);
}

.notif-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 12px 14px;
}

.notif-drawer-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.notif-item {
  display: flex; align-items: flex-start; gap: 0;
  padding: 0;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  margin-bottom: 4px;
  position: relative;
}
.notif-item-main {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; padding-right: 32px;
  flex: 1; min-width: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
}
.notif-item:hover { background: var(--bg-card-hover); }
.notif-item.notif-read { opacity: .5; }
.notif-delete-btn {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text-muted);
  font-size: .75rem; border-radius: 50%; cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s;
}
.notif-item:hover .notif-delete-btn { opacity: 1; }
.notif-delete-btn:hover { background: rgba(239,68,68,.15); color: var(--color-error); }

.notif-icon { font-size: 1.05rem; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: .88rem; color: var(--text-primary); }
.notif-msg { font-size: .8rem; color: var(--text-secondary); margin-top: 2px; line-height: 1.35; }
.notif-date { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* Mobile: sempre visibile il pulsante elimina */
@media (max-width: 767px) {
  .notif-delete-btn { opacity: .6; }
}

/* ===== Giornaliera clickable tasks ===== */
.g-task-clickable {
  cursor: pointer;
  border-radius: 3px;
  transition: background var(--transition-fast);
}
.g-task-clickable:hover {
  background: rgba(59, 130, 246, 0.12);
  text-decoration: underline;
}

/* Drag & Drop */
.g-task-clickable[draggable] {
  cursor: grab;
}
.g-task-clickable[draggable]:active {
  cursor: grabbing;
}
.g-dragging {
  opacity: 0.4;
  outline: 2px dashed var(--accent-primary);
  outline-offset: 1px;
}
td.g-cell-drop.g-drag-over {
  background: var(--accent-primary-glow) !important;
  outline: 2px dashed var(--accent-primary);
  outline-offset: -2px;
  transition: background 150ms ease;
}
/* Cella cliccabile per aggiungere (solo chi gestisce la giornaliera) */
.g-week-table.g-manage td.g-cell-drop { cursor: pointer; }

/* ===== Breadcrumbs ===== */
.breadcrumb-bar {
  display: none; /* percorso pagine nascosto su richiesta utente */
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 2px;
}
.breadcrumb-link {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.breadcrumb-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}
.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}
.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Sidebar Badge ===== */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-error);
  border-radius: 10px;
  margin-left: auto;
}

/* ===== Push Notifications Banner ===== */
.push-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  width: calc(100% - 32px);
  max-width: 480px;
  animation: slideUp 0.3s ease;
}
.push-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur));
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Home Today Panel ===== */
.home-today-panel .card-glass {
  max-height: 260px;
  overflow-y: auto;
}

/* ===== Nav item badge alignment ===== */
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Page Transition Animation ===== */
#content {
  animation: viewFadeIn 0.25s ease-out;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Skeleton Loading ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-glass) 25%, var(--border-subtle) 50%, var(--bg-glass) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-md);
}
.skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 50%; }
.skeleton-card { height: 120px; margin-bottom: 16px; }
.skeleton-row { height: 42px; margin-bottom: 4px; }
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Responsive Tables (mobile card layout) ===== */
@media (max-width: 767px) {
  .data-table-responsive thead { display: none; }
  .data-table-responsive tbody tr {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
  }
  .data-table-responsive tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.88rem;
  }
  .data-table-responsive tbody td:last-child { border-bottom: none; }
  .data-table-responsive tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 12px;
  }
}

/* ===== Uptime Badge ===== */
.uptime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.uptime-badge.good { background: rgba(34,197,94,.15); color: var(--color-success); }
.uptime-badge.warn { background: rgba(234,179,8,.15); color: var(--color-warning); }
.uptime-badge.bad  { background: rgba(239,68,68,.15); color: var(--color-error); }

/* ===== Changelog Modal ===== */
.changelog-item { padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.changelog-item:last-child { border-bottom: none; }
.changelog-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 6px;
}
.changelog-tag.fix { background: rgba(239,68,68,.15); color: var(--color-error); }
.changelog-tag.new { background: rgba(34,197,94,.15); color: var(--color-success); }
.changelog-tag.imp { background: rgba(59,130,246,.15); color: var(--color-info); }
.changelog-tag.sec { background: rgba(234,179,8,.15); color: var(--color-warning); }

/* ===== Notification pref toggle ===== */
.pref-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.pref-toggle:last-child { border-bottom: none; }
.pref-toggle label { font-size: 0.9rem; cursor: pointer; }
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-medium);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}
.toggle-switch.on { background: var(--color-success); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch.on::after { transform: translateX(20px); }

/* ===== SLA Badge ===== */
.sla-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.sla-badge.critical { background: rgba(239,68,68,.15); color: var(--color-error); }
.sla-badge.warning  { background: rgba(234,179,8,.15); color: var(--color-warning); }
.sla-badge.ok       { background: rgba(34,197,94,.15); color: var(--color-success); }

/* ===== Home Dashboard ===== */
.home-row1 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-bottom: 18px; }
.home-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-bottom: 18px; }
.home-row2.single { grid-template-columns: 1fr; }
.home-row3 { margin-bottom: 18px; }
.home-widget { padding: 22px; cursor: pointer; }
.home-panel { padding: 22px; display: flex; flex-direction: column; }
.home-widget-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.home-widget-head h3 { margin: 0; font-size: .95rem; }
.home-widget-head span { font-size: 1.2rem; }
.home-scroll-area { flex: 1; max-height: 340px; overflow-y: auto; }
.home-admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.home-admin-btn { cursor: pointer; padding: 18px 12px; text-align: center; transition: background .15s; }
.home-admin-btn:hover { background: var(--bg-hover); }
.home-admin-icon { font-size: 1.3rem; margin-bottom: 6px; }
.home-admin-label { font-size: .85rem; font-weight: 600; }

@media (max-width: 760px) {
  .home-row1 { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
  .home-row2 { grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
  .home-widget, .home-panel { padding: 14px; }
  .home-widget-head h3 { font-size: .85rem; }
  .home-scroll-area { max-height: 240px; }
  .home-admin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .home-admin-btn { padding: 14px 10px; }
  .home-admin-icon { font-size: 1.1rem; margin-bottom: 4px; }
  .home-admin-label { font-size: .78rem; }
}

@media (max-width: 400px) {
  .home-row1 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .home-widget, .home-panel { padding: 12px; }
}

/* ===== Settings page (redesign) ===== */
.settings-profile {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 20px;
}
.settings-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: var(--text-on-accent);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: var(--glow-accent);
}
.settings-profile-info { flex: 1; min-width: 0; }
.settings-profile-name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.settings-profile-sub { font-size: .85rem; color: var(--text-secondary); margin-top: 3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.settings-role-badge {
  padding: 2px 9px; border-radius: 999px;
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
  background: var(--color-info-bg); color: var(--text-accent);
}
.settings-profile-meta { text-align: right; display: flex; flex-direction: column; gap: 1px; }
.settings-profile-meta .muted { font-size: .72rem; }
.settings-profile-meta strong { font-size: .9rem; color: var(--text-primary); }

/* Larghezza massima della pagina (evita card enormi su schermi larghi), centrata */
.settings-page { max-width: 1080px; margin-left: auto; margin-right: auto; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 16px; align-items: stretch; margin-bottom: 24px; }
.settings-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 18px 20px;
  display: flex; flex-direction: column; transition: border-color var(--transition-fast);
}
.settings-card:hover { border-color: var(--border-medium); }
.settings-card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.settings-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: var(--color-info-bg); color: var(--text-accent);
}
.settings-card-head h3 { margin: 0; font-size: .98rem; font-weight: 600; color: var(--text-primary); }
.settings-card-head p { margin: 3px 0 0; font-size: .8rem; color: var(--text-secondary); line-height: 1.35; }
.settings-card-body { display: flex; flex-direction: column; gap: 10px; }
.settings-btn-row { display: flex; gap: 8px; }
.settings-btn-row .btn { flex: 1; }
.settings-form-actions { display: flex; gap: 8px; justify-content: flex-end; }

.settings-section-label {
  font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .7px;
  color: var(--text-muted); margin: 4px 2px 12px;
}
.settings-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; margin-bottom: 24px; }
.settings-tiles-app { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); max-width: 540px; }
.settings-tile {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 20px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px;
  transition: border-color var(--transition-fast);
}
.settings-tile:hover { border-color: var(--border-medium); }
.settings-tile .settings-icon { width: 48px; height: 48px; font-size: 1.35rem; }
.settings-tile-title { font-size: .92rem; font-weight: 600; color: var(--text-primary); }
.settings-tile-desc { font-size: .78rem; color: var(--text-secondary); line-height: 1.35; flex: 1; }
.settings-tile .btn { width: 100%; margin-top: 2px; }
.settings-tile.tile-danger .settings-icon { background: var(--color-error-bg); color: var(--color-error); }
.settings-tile.tile-android .settings-icon { background: rgba(61,220,132,.14); color: #3ddc84; }
.settings-tile.tile-ios .settings-icon { background: rgba(150,150,160,.16); color: var(--text-primary); }

/* Theme swatches */
.theme-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-swatch {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  background: var(--bg-input); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); cursor: pointer; position: relative;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  text-align: left; font: inherit; color: var(--text-primary);
}
.theme-swatch:hover { border-color: var(--border-medium); background: var(--bg-card-hover); }
.theme-swatch.active { border-color: var(--accent-primary); box-shadow: 0 0 0 1px var(--accent-primary); }
.theme-swatch.active::after {
  content: '\2713'; position: absolute; top: 6px; right: 9px;
  color: var(--accent-primary); font-weight: 700; font-size: .78rem;
}
.theme-swatch-preview { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; border: 1px solid rgba(255,255,255,.12); }
.theme-swatch-label { display: flex; flex-direction: column; font-size: .85rem; font-weight: 500; line-height: 1.2; }
.theme-swatch-label small { font-size: .68rem; font-weight: 400; color: var(--text-muted); margin-top: 1px; }

/* Toggle switch + row */
.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: var(--bg-input); border: 1px solid var(--border-medium);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.switch-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: var(--text-secondary); border-radius: 50%;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.switch input:checked + .switch-slider { background: var(--color-success-bg); border-color: var(--color-success); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); background: var(--color-success); }
.switch input:disabled + .switch-slider { opacity: .5; cursor: not-allowed; }

/* Gestione File Accesso (admin): blocchi + progress bar */
.fa-admin-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fa-admin-btns { display: flex; gap: 6px; }
.fa-state { font-size: .85rem; }
.fa-bar { height: 8px; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.fa-bar-fill { display: block; height: 100%; width: 0; background: var(--accent-primary); transition: width .25s ease; }
.fa-bar-text { font-size: .78rem; }

/* Editor permessi (Gestione Utenti): gruppi + voci con descrizione */
.perm-editor { display: flex; flex-direction: column; gap: 12px; }
.perm-group { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-glass); padding: 10px 12px; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.perm-group-title { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-accent); }
.perm-group-toggle { font-size: 0.72rem; padding: 2px 8px; }
.perm-group-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 6px 14px; }
.perm-item { display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem; cursor: pointer; padding: 4px 2px; }
.perm-item input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.perm-item-text { display: flex; flex-direction: column; min-width: 0; }
.perm-item-text strong { font-weight: 600; color: var(--text-primary); }
.perm-item-text small { color: var(--text-muted); font-size: 0.72rem; line-height: 1.25; }

/* Verifica DB siti: filtri + card editabili */
.fa-verify-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fa-verify-filters input[type="search"] { flex: 1 1 220px; min-width: 0; }
.fa-verify-filters input, .fa-verify-filters select { padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-input); color: var(--text-primary); font-size: .85rem; }
.fa-sites-pagination { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: .8rem; }
.fa-site-card { border: 1px solid var(--border-subtle); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--bg-card, var(--bg-input)); }
.fa-site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.fa-site-head strong { font-size: .92rem; }
.fa-site-conf { flex-shrink: 0; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-input); border: 1px solid var(--border-subtle); }
.fa-site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px 10px; }
.fa-site-grid label { display: flex; flex-direction: column; gap: 3px; font-size: .72rem; color: var(--text-secondary); min-width: 0; }
.fa-site-grid label.wide { grid-column: span 2; }
.fa-site-grid label.full { grid-column: 1 / -1; }
.fa-site-grid input, .fa-site-grid select { padding: 7px 9px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-input); color: var(--text-primary); font-size: .85rem; min-width: 0; }
.fa-site-grid input[readonly] { opacity: .65; }
.fa-site-raw { margin-top: 10px; font-size: .78rem; }
.fa-site-raw summary { cursor: pointer; color: var(--text-secondary); }
.fa-site-raw pre { margin: 8px 0 0; padding: 10px; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: 8px; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: .76rem; }
.fa-site-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.fa-site-actions small { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-site-msg { font-size: .78rem; }
@media (max-width: 640px) { .fa-site-grid label.wide { grid-column: 1 / -1; } }

/* ===== STRAORDINARI GRID (spreadsheet popup) ===== */
.stra-grid-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -8px;
  padding: 0 8px;
}
.stra-grid {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: .78rem;
}
.stra-grid th, .stra-grid td {
  border: 1px solid rgba(255,255,255,.12);
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
[data-theme="light"] .stra-grid th,
[data-theme="light"] .stra-grid td {
  border-color: rgba(0,0,0,.12);
}
.stra-grid thead th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
  font-weight: 600;
  font-size: .72rem;
  color: var(--text-muted);
}
.stra-grid th.stra-name-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-card);
  text-align: left;
  min-width: 120px;
  max-width: 160px;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text-primary);
}
.stra-grid td.stra-name-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-card);
  text-align: left;
  font-weight: 500;
  font-size: .8rem;
}
.stra-grid td.stra-cell {
  cursor: pointer;
  min-width: 38px;
  transition: background 120ms;
  position: relative;
}
.stra-grid td.stra-cell:hover {
  background: var(--bg-tertiary, rgba(99,102,241,.08));
}
.stra-grid td.stra-cell.has-value {
  background: rgba(16,185,129,.1);
  color: var(--color-success);
  font-weight: 600;
}
.stra-grid td.stra-cell.has-value:hover {
  background: rgba(16,185,129,.18);
}
.stra-grid td.stra-total {
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-primary);
  min-width: 60px;
}
/* Inline cell edit */
.stra-grid td.stra-cell.editing {
  padding: 0;
  background: rgba(99,102,241,.15);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}
.stra-inline-input {
  width: 100%;
  height: 100%;
  min-height: 28px;
  box-sizing: border-box;
  border: none;
  background: transparent;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  padding: 3px 2px;
  color: var(--color-success);
  outline: none;
  -moz-appearance: textfield;
}
.stra-inline-input::-webkit-inner-spin-button,
.stra-inline-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Saving indicator */
.stra-grid td.stra-cell.saving {
  opacity: .5;
  pointer-events: none;
}
.stra-grid td.stra-cell.save-ok {
  animation: stra-flash-ok 600ms ease;
}
.stra-grid td.stra-cell.save-err {
  animation: stra-flash-err 600ms ease;
}
@keyframes stra-flash-ok { 0%{background:rgba(16,185,129,.35)} 100%{background:transparent} }
@keyframes stra-flash-err { 0%{background:rgba(239,68,68,.35)} 100%{background:transparent} }
/* Edit bar (bottom of grid) */
.stra-edit-bar {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--color-primary);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .82rem;
  z-index: 5;
  animation: modal-in 120ms ease;
}
.stra-edit-bar .stra-bar-label {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.stra-edit-bar .stra-bar-label small {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Month tabs */
.stra-month-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 2px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.stra-month-tab {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 150ms;
}
.stra-month-tab:hover { background: var(--bg-secondary); }
.stra-month-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Tech detail inside grid popup */
.stra-tech-section {
  margin-top: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stra-tech-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  cursor: pointer;
  user-select: none;
}
.stra-tech-header:hover { background: var(--bg-tertiary, var(--bg-secondary)); }
.stra-tech-body { padding: 12px 14px; }

@media (max-width: 760px) {
  .stra-grid { font-size: .7rem; }
  .stra-grid td.stra-cell { min-width: 32px; }
  .stra-month-tab { padding: 5px 8px; font-size: .72rem; }
}

@media (max-width: 600px) {
  .settings-profile { flex-wrap: wrap; }
  .settings-profile-meta { text-align: left; flex-direction: row; gap: 6px; align-items: baseline; }
  .settings-tiles-app { max-width: 100%; }
}

/* ===== Tecnici/Straordinari grid: festività + ferie/permessi (v1.7.6m) ===== */
.stra-grid td.stra-holiday,
.stra-grid th.stra-holiday {
  background: rgba(220, 53, 69, 0.16) !important;
}
.stra-grid th.stra-holiday {
  background: rgba(220, 53, 69, 0.30) !important;
  color: #b02a37 !important;
}
.stra-hol-label {
  font-size: .5rem;
  line-height: 1;
  color: #b02a37;
  font-weight: 800;
  margin-top: 1px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.stra-grid .stra-extra,
.stra-grid .stra-extra-h {
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 8px;
  border-left: 1px solid var(--border-subtle, rgba(0,0,0,.12));
  background: rgba(0, 0, 0, 0.04);
}
.stra-grid .stra-ferie { color: var(--color-info, #0d6efd); }
.stra-grid .stra-permessi { color: var(--color-warning, #fd7e14); }

/* ===== Dashboard FTTS: filtro stato (Tutti/Aperti/Sospesi) — v1.7.6r ===== */
.ftts-stato-btn {
  background: transparent;
  border: none;
  padding: 5px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary, #888);
  cursor: pointer;
  transition: background .15s, color .15s;
  border-right: 1px solid var(--border-subtle, rgba(0,0,0,.12));
}
.ftts-stato-btn:last-child { border-right: none; }
.ftts-stato-btn:hover { background: var(--bg-secondary, rgba(0,0,0,.04)); }
.ftts-stato-btn.active {
  background: var(--color-primary, #6366f1);
  color: #fff;
}
