/* ════════════════════════════════════════════════════════════════
 *  JARVIN MARINER GLOBAL OVERRIDE (v2 - chirurgico)
 *  Caricato in tutti i 48 template, attivo solo su body.theme-mariner.
 * ════════════════════════════════════════════════════════════════ */

/* —— RIDEFINISCO LE CSS VARIABLES verdi → blu —— */
body.theme-mariner {
  --green:        #3478c4 !important;
  --green-dim:    #1d3a5f !important;
  --green-light:  #e8f4ff !important;
  --green-bg:     rgba(29, 58, 95, 0.08) !important;
  --blue:         #1d3a5f !important;
  --cyan:         #3478c4 !important;
}

/* —— TAG <header> nativo: blu navy + testo bianco —— */
body.theme-mariner header {
  background: #1d3a5f !important;
  color: #ffffff !important;
  border-bottom-color: #2a64a8 !important;
}
body.theme-mariner header h1,
body.theme-mariner header h2,
body.theme-mariner header h3,
body.theme-mariner header p,
body.theme-mariner header span,
body.theme-mariner header .htitles h1,
body.theme-mariner header .htitles p { color: #ffffff !important; }
body.theme-mariner header .htitles p { color: rgba(255,255,255,0.78) !important; }
body.theme-mariner header .hicon { color: #1d3a5f !important; }

/* —— KPI numbers verdi mint → azzurro mint —— */
body.theme-mariner .kpi-num.g,
body.theme-mariner .stat-num.g,
body.theme-mariner .kpi-num.green { color: #a7d4f0 !important; }
body.theme-mariner .kpi-num.r,
body.theme-mariner .stat-num.r { color: #fca5a5 !important; }
body.theme-mariner .kpi-num.w { color: #ffffff !important; }
body.theme-mariner .kpi-num.b { color: #d1e7f8 !important; }

/* —— Verdi mint hardcoded (tono chiaro per testo su sfondo navy) —— */
body.theme-mariner [style*="#a7f3d0"],
body.theme-mariner [style*="#A7F3D0"] { color: #a7d4f0 !important; }
body.theme-mariner [style*="#d1fae5"],
body.theme-mariner [style*="#D1FAE5"] { color: #d1e7f8 !important; }
body.theme-mariner [style*="#86efac"],
body.theme-mariner [style*="#86EFAC"] { color: #86b4ef !important; }
body.theme-mariner [style*="#6ee7b7"],
body.theme-mariner [style*="#6EE7B7"] { color: #6eb1e7 !important; }

/* —— Verdi inline (hex) classici JARVIN —— */
body.theme-mariner [style*="#4d9442"]:not([style*="background"]) { color: #1d3a5f !important; }
body.theme-mariner [style*="#6dbf52"]:not([style*="background"]) { color: #3478c4 !important; }
body.theme-mariner [style*="#3e7e34"]:not([style*="background"]) { color: #154a85 !important; }

body.theme-mariner [style*="background:#4d9442"],
body.theme-mariner [style*="background: #4d9442"],
body.theme-mariner [style*="background-color:#4d9442"],
body.theme-mariner [style*="background-color: #4d9442"] {
  background: #1d3a5f !important;
  background-color: #1d3a5f !important;
}
body.theme-mariner [style*="background:#6dbf52"],
body.theme-mariner [style*="background: #6dbf52"] {
  background: #3478c4 !important;
}
body.theme-mariner [style*="background:#f0f7ee"],
body.theme-mariner [style*="background: #f0f7ee"] {
  background: #e8f4ff !important;
}

/* —— Classi comuni —— */
body.theme-mariner .text-success,
body.theme-mariner .text-green,
body.theme-mariner .green,
body.theme-mariner .verde { color: #1d3a5f !important; }

body.theme-mariner .bg-success,
body.theme-mariner .bg-green {
  background-color: #e8f4ff !important;
  color: #1d3a5f !important;
}

body.theme-mariner .btn-success,
body.theme-mariner .btn-green {
  background-color: #3478c4 !important;
  border-color: #2a64a8 !important;
  color: #ffffff !important;
}
body.theme-mariner .btn-success:hover,
body.theme-mariner .btn-green:hover { background-color: #2a64a8 !important; }

body.theme-mariner .border-success,
body.theme-mariner .border-green { border-color: #3478c4 !important; }

/* —— BADGE / PILL / STATUS —— */
body.theme-mariner .badge-success,
body.theme-mariner .badge-green,
body.theme-mariner .badge-completato,
body.theme-mariner .badge-completed,
body.theme-mariner .badge-ok,
body.theme-mariner .badge-dominio,
body.theme-mariner .badge-arpal,
body.theme-mariner .pill-green,
body.theme-mariner .tag-green,
body.theme-mariner .status-completato,
body.theme-mariner .status-completed,
body.theme-mariner .status-ok,
body.theme-mariner .status-done,
body.theme-mariner .status-up,
body.theme-mariner .status-online,
body.theme-mariner .label-success {
  background: #e8f4ff !important;
  color: #1d3a5f !important;
  border-color: #3478c4 !important;
}

/* —— DOTS / PALLINI verdi —— */
body.theme-mariner .dot-green,
body.theme-mariner .dot-ok,
body.theme-mariner .dot-success,
body.theme-mariner .dot-up,
body.theme-mariner .dot-online,
body.theme-mariner .led-green {
  background: #3478c4 !important;
  box-shadow: 0 0 6px #3478c4 !important;
}

/* —— PROGRESS / BAR —— */
body.theme-mariner .prog-fill,
body.theme-mariner .progress-bar-success,
body.theme-mariner .progress-green { background: #3478c4 !important; }

/* —— LINKS / INPUT FOCUS —— */
body.theme-mariner input:focus,
body.theme-mariner select:focus,
body.theme-mariner textarea:focus {
  border-color: #3478c4 !important;
  outline-color: #3478c4 !important;
}

body.theme-mariner input[type="checkbox"]:checked,
body.theme-mariner input[type="radio"]:checked,
body.theme-mariner input[type="checkbox"],
body.theme-mariner input[type="radio"] { accent-color: #3478c4 !important; }

/* —— TABLE HEADER —— */
body.theme-mariner table thead th,
body.theme-mariner .table-header,
body.theme-mariner .grid-header { background: #1d3a5f !important; color: #ffffff !important; }
