:root {
  --primary: #1c415c;
  --primary-light: #2e6e99;
  --primary-dark: #14446f;
  --accent: #e9f2f8;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #f9b91f;
  --white: #ffffff;
  --black: #000000;
  --gray-light: #f0f0f0;
  --gray: #e0e0e0;
  --gray-dark: #444444;
}
html,body{
	font-family:Verdana, sans-serif;
	font-size:15px;
	line-height:1.5
}
html{overflow-x:hidden}
h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}
body {
    background-color: var(--white);
    margin: 0;
	height: 100%;
}
.hidden {
  display: none !important;
}
.imgbanner {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 90%;       /* Ridimensiona l'immagine fino al 90% della larghezza */
    width: 600px;         /* Larghezza massima di default */
    height: auto;         /* Mantieni proporzioni */
    border-radius: 16px;  /* opzionale: bordi arrotondati */
}

.banner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Intestazioni */
.intestazione {
    background-color: var(--primary);
    border: 0;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    color: var(--white);
    font-size: 1.2em;
    line-height: 1.2em;
    font-variant: small-caps;
}

.intestEASY {
    border: 0;
    width: 95%;
    text-align: center;
    color: #000;
    font-size: 1.2em;
    line-height: 1.2em;
    font-variant: small-caps;
}

/* Titoli e slide */
.titolo {
    background-color: var(--white);
    border: 0;
    font-size: 1.5em;
    color: var(--danger);
}

.smallTGray {font-size: 0.7em; color:#5d5c5c;}
.smallTGreen {font-size: 0.7em; color:#107b15;}
.smallTRed {font-size: 0.7em; color:#ff0000;}
.label-small { font-size: 0.85em; display:block; margin-bottom:2px; font-weight:bold; }

.mySlides {
    display: none;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Liste immagini */
ul.images {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: center;
    justify-content: center;
}
ul.images li {
    margin-left: 5px;
}

/* Box e layout */
.box {
    border: 5px solid #000;
    width: 45%;
    height: 20%;
}

/* Footer */
.piedi {
    background-color: var(--primary);
    position: absolute;
    bottom: 3px;
    border: 0;
    border-radius: 10px;
    width: 99%;
    height: 58px;
    line-height: 50px;
    text-align: center;
    color: #000;
    font-size: 1.2em;
    font-variant: small-caps;
}

/* Login unificato */
.login-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 10px auto;
    position: relative;
}

.TitLogIn {
	border-radius: 100px;
	background-color: var(--primary);
	color: var(--white);
	padding: 15px;
	margin-bottom: 20px;
	font-weight: 600;
	font-size: 1.3rem;
}

.login-container input.form-control {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.toggle-password:hover {
    color: #333;
}
/* Contenitore della barra */
#password-strength {
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background-color: #e0e0e0;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

/* Barra interna dinamica */
#password-strength::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: 6px;
  transition: width 0.4s ease, background-color 0.4s ease;
}

/* === Livelli di forza === */

/* 0: troppo corta / vuota */
#password-strength[data-strength="0"]::after {
  width: 10%;
  background-color: #ccc;
}

/* 1: debole */
#password-strength[data-strength="1"]::after {
  width: 25%;
  background-color: #ff4d4d;
}

/* 2: media */
#password-strength[data-strength="2"]::after {
  width: 50%;
  background-color: #ffb84d;
}

/* 3: buona */
#password-strength[data-strength="3"]::after {
  width: 75%;
  background-color: #4da6ff;
}

/* 4: forte */
#password-strength[data-strength="4"]::after {
  width: 100%;
  background-color: #4caf50;
}

/* Etichetta testo (es. “Debole”, “Buona”...) */
.password-strength-label {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  transition: color 0.3s ease;
}

/* Colore del testo in base alla forza */
#password-strength[data-strength="1"] + .password-strength-label { color: #ff4d4d; }
#password-strength[data-strength="2"] + .password-strength-label { color: #ff9800; }
#password-strength[data-strength="3"] + .password-strength-label { color: #2196f3; }
#password-strength[data-strength="4"] + .password-strength-label { color: #4caf50; }

/* Messaggi di stato */
.error-message, .success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 90%;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    z-index: 1000;
    font-weight: bold;
    display: none;
}
.error-message { background-color: #f44336; color: white; }
.success-message { background-color: #4CAF50; color: white; }


/* Select style here */



select {

	background-color: #ffecae;
    border: thin solid transparent;
    border-radius: 4px;
    display: inline-block;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -moz-appearance: none;
}


/* arrows */

select.selcat {
  background-image:
    linear-gradient(45deg, transparent 50%, #FFFFFF 50%),
    linear-gradient(135deg, #FFFFFF 50%, transparent 50%),
    linear-gradient(to right, #1c415c, #1c415c);
  background-position:
    calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px),
    100% 0;
  background-size:
    5px 5px,
    5px 5px,
    2.5em 2.5em;
  background-repeat: no-repeat;
  font: inherit; 
  text-align: center;
  line-height: 1.5em;
  padding: 0.5em 3.5em 0.5em 1em;
  margin-top: 5px;
  -webkit-appearance: none;
}

select.selcat:focus {
  background-image:
    linear-gradient(45deg, #FFFFFF 50%, transparent 50%),
    linear-gradient(135deg, transparent 50%,#FFFFFF 50%),
    linear-gradient(to right, #1a3d79, #1a3d79);
  background-position:
    calc(100% - 15px) 1em,
    calc(100% - 20px) 1em,
    100% 0;
  background-size:
    5px 5px,
    5px 5px,
    2.5em 2.5em;
  background-repeat: no-repeat;
  border-color: grey;
  outline: 0;
}
.selcat option:hover{background-color: #1a3d79; color:#000000;}
.labelFieldAR{
    font-size: 1em;
    color: #d4272b;
    font-variant: small-caps;
    font-family: Arial, Helvetica, sans-serif;
    margin-left: 10px;
    margin-bottom: 5px;
}
.fldAR{
    background-color: #ffecae;
    border: 1px solid #ccc;
    height: calc(3rem + 2px);
    align-items: center;
	margin-top: 3px;
	font-size: 16px;
}
.field_readOnly{
    background-color: transparent;
    border:none;
    height: calc(2rem + 2px);
    align-items: center;
    margin-top: 4px;
    font-size: 16px;
}
.fldARMatch{
	font-size: 0.9em;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;

}
.flddata {
	font-size: 1.2em;
    color: #000;
    border: solid 1px #ccc;
    border-radius: 5px;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5em;
    margin-left: 15px;
    margin-bottom: 1%;
	text-align: center;
	width:110px;
}
.fldAR:read-only{
	border:none;
	background-color: #ffecae;
    border: none;
    max-width: 250px;
}
.fldAR::placeholder {
  color: #888;
  font-style: italic;
}
.select2-container--bootstrap4 .select2-selection {
  height: calc(3.5rem + 2px) !important; /* stessa altezza di input form-floating */
  padding: 0.375rem 0.75rem !important;
  border-radius: 0.375rem; /* bordi arrotondati coerenti */
  display: flex;
  align-items: center;
}
.select2-container--bootstrap4 .select2-selection--single {
  background-color: #ffecae;
  border: 1px solid #ccc;
  height: calc(3rem + 2px);
  display: flex !important;
  align-items: center;
}
/* colore solo del placeholder */
.select2-container--bootstrap4 .select2-selection__placeholder {
  color: #666 !important;
  background-color: #ffecae !important;
  font-style: italic;
  opacity: 0.9;
}
/* Etichetta flottante */
.form-floating .select2-selection__placeholder {
  color: #888;
  font-style: italic;
}

.select2-container--bootstrap4 .select2-selection__rendered[title="Comune di Nascita"],
.select2-container--bootstrap4 .select2-selection__placeholder {
  background-color: #ffecae !important;
  color: #555 !important;
  line-height: normal !important;
  padding-left: 0 !important;
  margin-top: 2px;
}
/* Sistema il cursore e la freccia di apertura */
.select2-container--bootstrap4 .select2-selection__arrow {
  height: 100% !important;
  display: flex;
  align-items: center;
}
/* Contenuto */
#contDiv {
    margin: 2rem auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 2rem;
	min-height: 300px;
}
 #contDivAR {
	margin: 2rem auto;
	background: var(--white);
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	padding: 2rem;
	min-height: 300px;
}
.buttonBar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}
.btnSave {
    background-color: #1c5d99;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btnSave:hover { background-color: #14446f; }

.btnCancel {
    background-color: #999;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btnCancel:hover { background-color: #777; }

.btnDel {
	background-color: var(--danger);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btnDel:hover { background-color: #b90f1f; }

.btnEdit {
	background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.btnEdit:hover { background-color: #b90f1f; }

.editContainer {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px 25px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.editContainer h2 {
    color: #1c5d99;
    text-align: center;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
}
.form-group input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}
#popupStoric {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;

  /* Queste due righe centrano orizzontalmente e verticalmente */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenitore del popup */
#popup-content-storic {
  position: relative;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 80%;
  max-height: 80%;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  overflow: auto;
  animation: fadeInScale 0.2s ease-in-out;
}

/* Bottone di chiusura */
#chiudiPopupStoric {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}
.checkmark {
  display: inline-block;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid #28a745; /* verde success */
  position: relative;
  animation: popIn 0.3s ease-out forwards;
  background: #e9fbee;
  box-shadow: 0 0 12px rgba(40, 167, 69, 0.4);
}

.checkmark::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 10px;
  width: 14px;
  height: 28px;
  border-right: 4px solid #28a745;
  border-bottom: 4px solid #28a745;
  transform: rotate(45deg);
  opacity: 0;
  animation: drawCheck 0.4s ease-out 0.3s forwards;
}
