/* Fluo plugin base overrides — allineati al modern design system */

body {
	/* allineato con il tema attivo via variabile CSS */
	background-color: var(--md-bg);
	/* resetta background-size per consentire al page-background.png inline di mostrarsi a dimensione naturale */
	background-size: auto;
}

.appmenu {
	left: 120px;
}

.jte-edit {
    border: 2.5px solid #62c462 !important;
    cursor: text;
}

.row-activity-clicked {
	background-color: rgba(113,191,69,0.15) !important;
}
.cost-cell {
	color: #c0392b !important;
}
.stimacost-cell {
	color: #8e44ad !important;
}

.manut-activity {
	color: #c0392b;
}

/* ---- Badge variants ---- */
.badge-light {
	color:            #1a2e1f;
	background-color: #dce8e0;
}
.badge-warning {
	color:            white;
	background-color: #e74c3c;
}
.badge-jobs {
	color:            #1a2e1f;
	background-color: #b5dfa5;
}
.badge-tickets {
	color:            white;
	background-color: #e74c3c;
}
.badge-events {
	color:            white;
	background-color: #d4a017;
}

/* ---- Filter row ---- */
.grid-filter {
	background-color: #f0f8f2 !important;
	width: 100%;
	border-radius: 4px;
}

/* ---- Closed execution row ---- */
.grid-exec-closed {
	background-color: rgba(167,195,162,0.5) !important;
}

/* ---- Mail / ticket box states ----
   I colori sono ricavati mescolando l'accento (verde/rosso) con la superficie
   corrente del tema (--md-surface): così le tinte restano leggibili sia su
   sfondi chiari (modern) che scuri (dark/minimal) senza bisogno di regole
   duplicate per ogni tema. Serve !important per vincere su '.well' (che il
   tema dark forza con !important). */
.mail-id {
	border:        2px solid var(--md-border, #d4e2d8);
	border-radius: 6px;
}
.ticket-mail-box-focus       { border: 2.5px solid #8aacab; border-radius: 6px; }
.ticket-mail-box-focus-save  { border: 2.5px solid #27ae60; border-radius: 6px; }
.ticket-mail-box-save        { background-color: color-mix(in srgb, var(--md-surface, #fff) 75%, #27ae60 25%) !important; }
.ticket-mail-box-focus-delete { border: 2.5px solid #e74c3c; border-radius: 6px; }
.ticket-mail-box-delete      { background-color: color-mix(in srgb, var(--md-surface, #fff) 75%, #e74c3c 25%) !important; }
.ticket-no-type              { background-color: color-mix(in srgb, var(--md-surface, #fff) 84%, #e74c3c 16%) !important; }

/* ---- Anteprima HTML email ----
   Il markup arriva con colori inline pensati per una pagina chiara (testo
   scuro su sfondo bianco): è contenuto non fidato che non si adatta ai temi.
   Lo trattiamo sempre come una "scheda chiara" indipendente dal tema attivo,
   sia per lo sfondo che per il colore di default dei tag privi di colore
   inline (i selettori #gmail-preview <tag> hanno specificità maggiore dei
   semplici <tag> usati dai temi, quindi vincono senza !important e senza
   sovrascrivere gli eventuali colori inline del messaggio). */
#gmail-preview {
	background: #ffffff !important;
	color:      #222222 !important;
}
#gmail-preview, #gmail-preview p, #gmail-preview div, #gmail-preview span,
#gmail-preview li, #gmail-preview td, #gmail-preview th, #gmail-preview label {
	color: #222222 !important;
}
#gmail-preview a { color: #1a73e8; }

/* ---- Scheda di Intervento (anteprima a destra in "Nuovo Job da Calendario") ----
   Simula il foglio stampato: sfondo bianco e testo scuro fissi, indipendenti dal
   tema attivo (come #gmail-preview), così l'anteprima resta coerente con il PDF
   generato. */
.scheda-intervento {
	background:    #ffffff !important;
	color:         #222222 !important;
	border:        1px solid var(--md-border, #d4e2d8);
	border-radius: 6px;
	padding:       12px;
	font-size:     12px;
	line-height:   1.4;
}
.scheda-intervento, .scheda-intervento p, .scheda-intervento div, .scheda-intervento span,
.scheda-intervento li, .scheda-intervento td, .scheda-intervento th, .scheda-intervento label {
	color: #222222 !important;
}
.scheda-header {
	display:         flex;
	justify-content: space-between;
	align-items:     center;
	margin-bottom:   10px;
}
.scheda-logo {
	min-width:     90px;
	min-height:    36px;
	display:       flex;
	align-items:   center;
	justify-content: center;
	font-size:     11px;
	font-weight:   bold;
	color:         #888888 !important;
	border:        1px dashed #cccccc;
	border-radius: 4px;
	padding:       4px 8px;
	text-align:    center;
}
.scheda-title {
	text-align:    center;
	font-weight:   bold;
	font-size:     15px;
	letter-spacing: 2px;
	margin:        6px 0 12px 0;
}
.scheda-table {
	display:               grid;
	grid-template-columns: repeat(4, 1fr);
	border:                1px solid #cccccc;
	margin-bottom:         10px;
}
.scheda-table .scheda-cell {
	border-right: 1px solid #cccccc;
	padding:      4px 6px;
}
.scheda-table .scheda-cell:last-child { border-right: none; }
.scheda-cell-label {
	font-size:     10px;
	color:         #888888 !important;
	text-transform: uppercase;
	margin-bottom: 2px;
}
.scheda-cell-stato {
	background-color: #fff3b0;
}
.scheda-row {
	margin-bottom: 8px;
}
.scheda-row .scheda-cell-label {
	display: inline;
	margin-right: 4px;
}
.scheda-box {
	display:       flex;
	border:        1px solid #cccccc;
	border-radius: 4px;
	margin-bottom: 8px;
	overflow:      hidden;
}
.scheda-box-label {
	min-width:     32px;
	display:       flex;
	align-items:   center;
	justify-content: center;
	writing-mode:  vertical-rl;
	text-orientation: mixed;
	font-weight:   bold;
	font-size:     11px;
	color:         #ffffff !important;
	padding:       6px 4px;
}
.scheda-box-intervento .scheda-box-label { background-color: #5bb85b; }
.scheda-box-extra      .scheda-box-label { background-color: #f0ad4e; }
.scheda-box-sospesi    .scheda-box-label { background-color: #d9534f; }
.scheda-box-content {
	flex:    1;
	padding: 6px 8px;
	min-height: 52px;
}
.scheda-footer {
	display:         flex;
	justify-content: space-between;
	border-top:      1px solid #cccccc;
	margin-top:      10px;
	padding-top:     8px;
}
.scheda-footer .scheda-cell-label { display: block; margin-bottom: 4px; }
.scheda-footer-static {
	margin-top:  10px;
	padding-top: 6px;
	border-top:  1px solid #eeeeee;
	font-size:   10px;
	color:       #888888 !important;
	text-align:  center;
}
.scheda-intervento [contenteditable="true"] {
	cursor: text;
	border-radius: 3px;
}
.scheda-intervento [contenteditable="true"]:hover,
.scheda-intervento [contenteditable="true"]:focus {
	outline: 1px dashed #5bb85b;
	background-color: rgba(91,184,91,0.08);
}
