body {
    margin: 0;
    font-family: 'Trebuchet MS', 'Verdana', 'arial';
    font-size: 14px;
}

* {
    box-sizing: border-box;
}

.nav {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    overflow: hidden;
    background-color: #b0afb2;
    width: 100%;
    height: 4vw;
}

.nav a,
.nav p,
.nav img {
    color: #000;
    text-align: center;
    height: 4vw;
    padding: 1vw;
    text-decoration: none;
    font-size: 2vw;
    margin: 0;
    margin-right: auto;
}

.nav img, .nav div:has(img) {
    padding: 0;
    margin-right: auto;
    cursor: pointer;
}

.nav a:hover {
    background-color: #d6d6d6;
    transition: .1s;
}

.nav a.active {
    background-color: #0b4d9d;
    transition: .3s;
}

.nav a.active:hover {
    background-color: #1576ed;
    transition: .1s;
}

.nav input[type=text],
.nav input[type=password] {
    padding: 6px;
    margin-top: 8px;
    font-size: 17px;
    border: none;
    width: 120px;
}

.nav .login-container button {
    float: right;
    padding: 6px 10px;
    margin-top: 8px;
    margin-right: 16px;
    background-color: #1c87c9;
    color: white;
    font-size: 17px;
    border: none;
    cursor: pointer;
}

.nav .login-container button:hover {
    background-color: #0e002b;
}




/* Stile specifico per la pagina di conferma */
#confirmation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    background-color: #eaf6f6;
    /* Aggiungi uno sfondo leggero per differenziare */
}

#confirmation-container h1 {
    color: #2a7f7f;
    /* Colore coerente per la conferma */
    margin-bottom: 20px;
    font-size: 2.5em;
}

#confirmation-container p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.2em;
}

#confirmation-container button {
    background-color: #1576ed;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#confirmation-container button:hover {
    background-color: #0b4d9d;
}

/* Stile specifico per la pagina di errore */
#error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    background-color: #f8d7da;
    /* Sfondo rosato per indicare errore */
}

#error-container h1 {
    color: #721c24;
    /* Rosso scuro per titolo */
    margin-bottom: 20px;
    font-size: 2.5em;
}

#error-container p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.2em;
}

#error-container button {
    background-color: #1576ed;
    /* Rosso per errore */
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#error-container button:hover {
    background-color: #0b4d9d;
}





/* ----------------------  password toggle con occhio  ---------------------- */


.password-container {
    position: relative;
}

/* Stile per le Icone Toggle Password */
.toggle-password {
    position: absolute;
    top: 50%; /* verticale al centro del container */
    right: 0.75rem;  /* a 0.75rem dal bordo destro del container */
    transform: translateY(-50%); /* centra esattamente rispetto all’input */
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2em;
    transition: color 0.3s;
}

/* Cambio colore dell'icona al passaggio del mouse */
.toggle-password:hover {
    color: var(--primary-hover);
}


/* Opzionale: Aggiungere transizione per un effetto più fluido */
.toggle-password {
    transition: color 0.3s, transform 0.2s;
}


/* ---------------------- tabella user ------------------------------ */

/* Stile base della tabella */
#userTable {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  margin: 20px 0;
}

/* Celle e intestazioni */
#userTable th,
#userTable td {
  border: 1px solid #dddddd;
  padding: 8px;
  text-align: center;
}

/* Intestazioni */
#userTable th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #333;
}

/* Righe alternate */
#userTable tr:nth-child(even) {
  background-color: #fafafa;
}

/* Hover sulle righe */
#userTable tr:hover {
  background-color: #f1f1f1;
}

/* Pulsante DELETE */
#userTable input[type="button"] {
  background-color: #d9534f;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Hover sul pulsante */
#userTable input[type="button"]:hover {
  background-color: #c9302c;
}





@media screen and (max-width: 500px) {
    .nav {
        flex-direction: row;
        justify-content: space-evenly;
        overflow: hidden;
        background-color: #999999;
        width: 100%;
        height: 8vw;
    }

    .nav a,
    .nav p,
    .nav img {
        text-align: center;
        height: 8vw;
        padding: 2vw;
        text-decoration: none;
        font-size: 3.5vw;
    }

    .nav img {
        padding: 0;
    }
}

._404 {
    width: 80vmin;
    z-index: 9999;
    margin: auto;
    display: block;
}

img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    pointer-events: none;
}