body {
  background: #0f172a;
  color: #e2e8f0;
  font-family: "Inter", system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
}
.container {
  background: #1e293b;
  padding: 2rem 2.2rem;
  border-radius: 16px;
  
  /* 🔹 IMPOSTAZIONE PER IL LOGIN (Piccolo) */
  width: 95%;
  max-width: 450px; /* Ridotto drasticamente per il login */
  
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  
  /* Aggiungi una transizione fluida per l'effetto di allargamento */
}
.container.container-wide {
  max-width: 1400px; /* Larghezza per la tabella */
}

/* 2. Aggiungi la classe per il layout affiancato */
.layout-flex {
  display: flex;
  flex-direction: row; /* Affianca gli elementi */
  gap: 2rem;           /* Spazio tra tabella e form */
  align-items: flex-start; /* Allinea in alto */
  width: 100%;
}

/* 3. Stile specifico per il Form quando è affiancato */
#segnalazioneForm {
  flex: 0 0 350px; /* Larghezza fissa per il form (350px) */
  min-width: 300px;
}

/* 4. La tabella deve occupare tutto lo spazio rimanente */
.tabellaSegnalazioni {
  flex: 1; /* Prende tutto lo spazio a sinistra */
  width: 100%;
  border-collapse: collapse;
  /* margin-top: 1rem; <-- Riduci o rimuovi se necessario */
  background: #334155;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.85rem;
  align-self: flex-start; /* Evita che si stiri in altezza se il form è lungo */
}

/* 5. (Opzionale) Responsive: su schermi piccoli torna uno sotto l'altro */
@media (max-width: 900px) {
  .layout-flex {
    flex-direction: column-reverse; /* Form sopra o tabella sopra? column normale mette tabella sopra */
    flex-direction: column; 
  }
  
  #segnalazioneForm {
    width: 100%;
    flex: none;
  }
}

h2 {
  text-align: center;
  margin-bottom: 1.2rem;
  font-size: 1.3rem;
  color: #f8fafc;
  font-weight: 600;
}


.tabellaSegnalazioni th,
.tabellaSegnalazioni td {
  padding: 8px 10px;
  text-align: left;
}

.tabellaSegnalazioni th {
  background: #475569;
  color: #f1f5f9;
  font-weight: 600;
}

.tabellaSegnalazioni tr:nth-child(even) {
  background: #3b4252;
}

.tabellaSegnalazioni tr:hover {
  background: #4b5563;
}

/* 🔹 Form */
label {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

input,
textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  background: #334155;
  color: #f1f5f9;
  padding: 0.5rem 0.6rem;
  border: 1px solid #475569;
  border-radius: 8px;
  margin-top: 0.3rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #60a5fa;
  background: #3b495f;
}

textarea {
  resize: none;
  height: 200px;
}

/* 🔹 Pulsante */
button {
  display: block;
  margin: 1rem auto 0 auto; /* top auto bottom auto = centrato */
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem; /* più largo ma non full width */
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  width: auto; /* ✅ non prendere tutta la larghezza */
}


button:hover {
  background: #1d4ed8;
  transform: scale(1.02);
}

.error {
  color: #f87171;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
}

.hidden {
  display: none;
}

/* 🔹 Messaggio di successo */
#successMessage {
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #bbf7d0;
  margin-top: 1rem;
}

#userInput {
  margin-bottom: 0.6rem;
}

/* 🔹 Select (uguale stile a input e textarea) */
select {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  background: #334155;
  color: #f1f5f9;
  padding: 0.5rem 0.6rem;
  border: 1px solid #475569;
  border-radius: 8px;
  margin-top: 0.3rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none; /* rimuove lo stile nativo */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23f1f5f9' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 16px;
}

select:focus {
  outline: none;
  border-color: #60a5fa;
  background: #3b495f;
}
