
/* HOMI Theme v5 — CSS mirato ai tuoi selettori reali
   - Nessuna modifica HTML/variabili
   - Scope: body.theme-homi
   - Target: DataTables su table#ticket + sidebar con .lista-anagrafiche
*/
.toolbar img{
  filter: invert(1) !important;
}
/* ===== Base ===== */
.theme-homi, .theme-homi *{ font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
.theme-homi{ background:#f5f7fb; color:#1f2330; }
.theme-homi h2{ font-weight:700; letter-spacing:.2px; }

/* ===== Sidebar (colonna sinistra già esistente) ===== */
.theme-homi .col-xl-2.toolbar.desktop{
  background:linear-gradient(180deg,#1b74ff 0%, #0f54b4 100%) !important;
  color:#fff !important; min-height:100vh; padding:18px 12px !important;
  box-shadow:0 10px 28px rgba(17,24,39,.10);
}
.theme-homi .col-xl-2.toolbar.desktop p{ color:#fff !important; margin:0 0 14px 12px !important; font-weight:700; }

/* Lista "Anagrafiche" e simili */
.theme-homi .lista-anagrafiche{ list-style:none !important; margin:0 !important; padding:0 !important; }
.theme-homi .lista-anagrafiche li{
  display:flex !important; align-items:center !important; gap:10px !important;
  padding:8px 10px !important; margin:6px 6px !important; border-radius:12px !important; color:#eaf3ff !important;
  transition:background .15s ease;
}
.theme-homi .lista-anagrafiche li:hover{ background:rgba(255,255,255,.14); }
.theme-homi .lista-anagrafiche img.incona-anagrafiche{
  width:16px !important; height:16px !important; display:inline-block !important; vertical-align:middle !important;
  margin-right:2px !important; opacity:.95 !important;
}
.theme-homi .lista-anagrafiche span{ display:inline-flex !important; align-items:center !important; }

/* ===== Card che incornicia la tabella ===== */
.theme-homi #ticket-container{
  background:#fff !important; border:1px solid #e6ebf2 !important; border-radius:18px !important;
  box-shadow:0 10px 28px rgba(17,24,39,.10) !important; padding:14px !important;
}
.theme-homi #ticket-container > h4{ font-size:20px; font-weight:700; margin:0 0 10px 0; }

/* ===== DataTables — table#ticket ===== */
.theme-homi table#ticket{ border-collapse:separate !important; border-spacing:0 !important; width:100% !important; }
.theme-homi table#ticket thead th{
  background:#eef3fb !important; color:#475069 !important; font-weight:600 !important;
  border-bottom:1px solid #e6ebf2 !important; vertical-align:middle !important; padding:12px 10px !important;
}
/* Supporta classi di ordinamento */
.theme-homi table#ticket thead th.sorting,
.theme-homi table#ticket thead th.sorting_asc,
.theme-homi table#ticket thead th.sorting_desc{ background:#eef3fb !important; }

.theme-homi table#ticket tbody td{
  border-bottom:1px solid #e6ebf2 !important; vertical-align:middle !important; padding:12px 10px !important;
}
.theme-homi table#ticket tbody tr:hover{ background:#f8fbff !important; }

/* Colori celle testuali (non tocco i valori) */
.theme-homi table#ticket td .text-danger{ color:#e23a3a !important; }
.theme-homi table#ticket td .text-success{ color:#179a5b !important; }

/* ===== Controlli DataTables ===== */
.theme-homi .dataTables_wrapper .dataTables_length select{
  border:1px solid #e6ebf2 !important; border-radius:10px !important; padding:4px 8px !important; background:#fff !important;
}
.theme-homi .dataTables_wrapper .dataTables_filter{ text-align:right !important; }
.theme-homi .dataTables_wrapper .dataTables_filter input{
  border:1px solid #e6ebf2 !important; border-radius:10px !important; padding:6px 10px !important; width:220px !important; background:#fff !important;
}
.theme-homi .dataTables_wrapper .dataTables_info{ color:#6b7280 !important; }

/* Bottoni export (Bfrtip) */
.theme-homi .dt-buttons .dt-button{
  border:1px solid #e6ebf2 !important; background:#fff !important; border-radius:10px !important;
  padding:6px 10px !important; margin:0 2px !important; box-shadow:0 4px 12px rgba(17,24,39,.06) !important;
}
.theme-homi .dt-buttons .dt-button:hover{ background:#f7f9fc !important; }

/* Paginazione */
.theme-homi .dataTables_wrapper .dataTables_paginate .paginate_button{
  border:1px solid #e6ebf2 !important; border-radius:10px !important; padding:4px 10px !important;
  background:#fff !important; margin:0 2px !important;
}
.theme-homi .dataTables_wrapper .dataTables_paginate .paginate_button.current{
  background:#1b74ff !important; color:#fff !important; border-color:#1b74ff !important;
}

/* ===== Pulsanti principali ===== */
.theme-homi .btn.btn-primary, .theme-homi button.btn.btn-primary{
  background:#1b74ff !important; border:none !important; border-radius:12px !important;
  box-shadow:0 10px 28px rgba(17,24,39,.10) !important;
}

/* ===== FILTRI (Tutti / Aperti / Chiusi / Nuovi / Cancellati) ===== */
/* Niente pallini, layout a bottone */
.theme-homi .lista-toolbar{ list-style:none !important; padding:0 !important; margin:0 !important; }
.theme-homi .lista-toolbar li{ margin:6px 6px !important; padding:0 !important; }
.theme-homi .lista-toolbar .datat{
  display:block !important;
  padding:8px 12px !important;
  border-radius:12px !important;
  font-weight:600 !important;
  color:#eaf3ff !important;
  background:transparent !important;
  cursor:pointer !important;
  transition:background .15s ease, color .15s ease, transform .05s ease !important;
  user-select:none !important;
}

/* Default hover (come gli altri elementi della sidebar) */
.theme-homi .lista-toolbar .datat:hover{
  background:rgba(255,255,255,.14) !important;
}

/* Stato “selezionato”: supporta .active / .selected / .is-active */
.theme-homi .lista-toolbar .datat.active,
.theme-homi .lista-toolbar .datat.selected,
.theme-homi .lista-toolbar .datat.is-active{
  transform: translateY(-1px);
  background:rgba(255,255,255,.22) !important;
}

/* Colori personalizzati per hover + selezionato per ID specifici */
/* Aperti → verde */
.theme-homi #aperti:hover,
.theme-homi #aperti.active,
.theme-homi #aperti.selected,
.theme-homi #aperti.is-active{
  background:#e9fff3 !important;       /* verde chiaro */
  color:#0b8a44 !important;
}

/* Chiusi → rosso */
.theme-homi #chiusi:hover,
.theme-homi #chiusi.active,
.theme-homi #chiusi.selected,
.theme-homi #chiusi.is-active{
  background:#ffe9e9 !important;       /* rosso chiaro */
  color:#b81212 !important;
}

/* Nuovi → giallo */
.theme-homi #nuovi:hover,
.theme-homi #nuovi.active,
.theme-homi #nuovi.selected,
.theme-homi #nuovi.is-active{
  background:#fff6d6 !important;       /* giallo chiaro */
  color:#9f6a00 !important;
}

/* Cancellati → grigio chiaro */
.theme-homi #cancellati:hover,
.theme-homi #cancellati.active,
.theme-homi #cancellati.selected,
.theme-homi #cancellati.is-active{
  background:#eef1f5 !important;
  color:#475069 !important;
}

/* “Tutti” mantiene lo stile neutro delle Anagrafiche */
.theme-homi #tutti:hover,
.theme-homi #tutti.active,
.theme-homi #tutti.selected,
.theme-homi #tutti.is-active{
  background:rgba(255,255,255,.14) !important;
  color:#ffffff !important;
}

/* ===== RECENTI / PREFERITI — stile bottone neutro ===== */

.theme-homi .lista-toolbar .recenti,
.theme-homi .lista-toolbar .preferiti,
.theme-homi .lista-toolbar .messaggi {  /* se vuoi uniformare anche i messaggi */
  display:block !important;
  padding:8px 12px !important;
  border-radius:12px !important;
  font-weight:600 !important;
  color:#eaf3ff !important;
  background:transparent !important;
  cursor:pointer !important;
  transition:background .15s ease, color .15s ease, transform .05s ease !important;
  user-select:none !important;
}

/* Hover neutro */
.theme-homi .lista-toolbar .recenti:hover,
.theme-homi .lista-toolbar .preferiti:hover,
.theme-homi .lista-toolbar .messaggi:hover {
  background:rgba(255,255,255,.14) !important;
}

/* Stato attivo / selezionato */
.theme-homi .lista-toolbar .recenti.active,
.theme-homi .lista-toolbar .recenti.is-active,
.theme-homi .lista-toolbar .preferiti.active,
.theme-homi .lista-toolbar .preferiti.is-active,
.theme-homi .lista-toolbar .messaggi.active,
.theme-homi .lista-toolbar .messaggi.is-active {
  background:rgba(255,255,255,.22) !important;
  color:#ffffff !important;
  transform:translateY(-1px);
}

/* ===== RECENTI / PREFERITI — stile bottone neutro ===== */
.theme-homi .lista-toolbar { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.theme-homi .lista-toolbar li.recenti.ticket,
.theme-homi .lista-toolbar li.preferiti.ticket {
  display: block !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  color: #eaf3ff !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: background .15s ease, transform .05s ease !important;
  user-select: none !important;
}
.theme-homi .lista-toolbar li.recenti.ticket:hover,
.theme-homi .lista-toolbar li.preferiti.ticket:hover {
  background: rgba(255,255,255,.14) !important;   /* hover neutro */
}
.theme-homi .lista-toolbar li.recenti.ticket.is-active,
.theme-homi .lista-toolbar li.preferiti.ticket.is-active {
  background: rgba(255,255,255,.22) !important;   /* selezionato neutro */
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ===== DETTAGLIO SEGNALAZIONE — card morbide + layout ===== */
.theme-homi .titolodettaglio,
.theme-homi .descrizione-ticket,
.theme-homi .containertextarea {
  background: #fff !important;
  border: 1px solid #e6ebf2 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 28px rgba(17,24,39,.10) !important;
  padding: 12px !important;
}

.theme-homi .titolodettaglio h3 { margin: 0; font-size: 18px; font-weight: 700; }
.theme-homi .labelticket { color: #6b7280; font-size: 12px; font-weight: 600; }

.theme-homi .containertextarea textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid #e6ebf2 !important;
  border-radius: 12px !important;
  padding: 10px !important;
  background: #fff !important;
}

/* Colonna laterale (card informazioni) se usi .col-xl-3 o .col-xl-4 */
.theme-homi .col-xl-3 > .card,
.theme-homi .col-xl-4 > .card,
.theme-homi .col-xl-3 > .detail-box,
.theme-homi .col-xl-4 > .detail-box {
  background: #fff !important;
  border: 1px solid #e6ebf2 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 28px rgba(17,24,39,.10) !important;
  padding: 12px !important;
}

/* Pulsanti principali nel dettaglio */
.theme-homi .btn.btn-primary {
  background: #1b74ff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 28px rgba(17,24,39,.10) !important;
}

/* Allegati / immagini modali: bordi soft */
.theme-homi #myModal img,
.theme-homi .allegato img {
  border-radius: 12px !important;
  box-shadow: 0 10px 28px rgba(17,24,39,.10) !important;
}

/* Divider soft */
.theme-homi hr { border-color: rgba(0,0,0,.08) !important; }

/* ===== Bottoni HOMI (scoped) ===== */
.theme-homi .btn,
.theme-homi button.btn,
.theme-homi a.btn {
  border: none !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .2px;
  box-shadow: 0 10px 28px rgba(17,24,39,.10) !important;
  transition: transform .05s ease, filter .15s ease, background-color .15s ease;
}
.theme-homi .btn:active { transform: translateY(1px); }
.theme-homi .btn:focus { outline: 0; box-shadow: 0 0 0 3px rgba(27,116,255,.2) !important; }

/* Varianti semantiche */
.theme-homi .btn-insert,
.theme-homi .btn-success,
.theme-homi .btn.btn-success {
  background: #17a673 !important;            /* verde */
  color: #fff !important;
}
.theme-homi .btn-insert:hover,
.theme-homi .btn-success:hover,
.theme-homi .btn.btn-success:hover {
  filter: brightness(0.95);
}

.theme-homi .btn-back,
.theme-homi .btn-primary,
.theme-homi .btn.btn-primary {
  background: #1b74ff !important;            /* blu */
  color: #fff !important;
}
.theme-homi .btn-back:hover,
.theme-homi .btn-primary:hover,
.theme-homi .btn.btn-primary:hover {
  filter: brightness(0.95);
}

.theme-homi .btn-danger,
.theme-homi .btn.btn-danger {
  background: #e74c3c !important;            /* rosso */
  color: #fff !important;
}
.theme-homi .btn-danger:hover,
.theme-homi .btn.btn-danger:hover { filter: brightness(0.95); }

/* Variante “ghost/secondario” per bottoni DataTables */
.theme-homi .dt-buttons .dt-button {
  border: 1px solid #e6ebf2 !important;
  background: #fff !important;
  color: #1f2330 !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  margin: 0 2px !important;
  box-shadow: 0 4px 12px rgba(17,24,39,.06) !important;
}
.theme-homi .dt-buttons .dt-button:hover { background: #f7f9fc !important; }

/* Chip del titolo nel dettaglio (opzionale) */
.theme-homi .chip-title {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  background: #fff; border: 1px solid #e6ebf2; box-shadow: 0 6px 18px rgba(17,24,39,.08);
  font-weight: 700;
}

