/* 🎨 CORSIAMO ACADEMY – BACKOFFICE 4.0 STYLE.CSS (Navbar allineata e hamburger +20%) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&display=swap');

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background: #0f0b14;
  color: #fff;
  overflow-x: hidden;
}

/* ===== NAVBAR UNIFICATA (logo leggermente più a sinistra e hamburger +20%) ===== */
nav {
  background: rgba(15, 11, 20, 0.95);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 88px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 50px 0 40px; /* logo più a sinistra */
  box-sizing: border-box;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav img {
  width: 62px;
  height: auto;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 5px;
  object-fit: contain;
}

.links {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-top: 5px;
}

.links a {
  color: #FFD84D;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.links a:hover {
  color: #fff;
}

.logout-btn {
  background: linear-gradient(90deg, #FFD84D, #FFC107);
  color: #0f0b14;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 12px rgba(255, 216, 77, 0.4);
}

.logout-btn:hover {
  transform: scale(1.08);
  background: #FFE46D;
  box-shadow: 0 0 20px rgba(255, 216, 77, 0.7);
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 36px; /* aumentato del 20% */
  height: 25px; /* proporzionato */
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 5px;
}

.hamburger span {
  background: #FFD84D;
  height: 3.5px;
  width: 100%;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== SIDEBAR MOBILE ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 250px;
  height: 100%;
  background: rgba(15,11,20,0.98);
  backdrop-filter: blur(8px);
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  padding: 80px 20px;
  gap: 20px;
  transition: left 0.3s ease;
  z-index: 999;
  visibility: hidden;
}

.sidebar.active {
  left: 0;
  visibility: visible;
}

.sidebar a {
  color: #FFD84D;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.sidebar a:hover { color: #fff; }

.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== MENU RESPONSIVE ===== */
@media (max-width: 1024px) {
  .links { display: none !important; }
  .hamburger { display: flex !important; }
}

/* ===== STRUTTURA GENERALE ===== */
main {
  padding: 145px 20px 60px;
  text-align: center;
}

h1 {
  font-size: 1.8rem;
  color: #FFD84D;
  margin-bottom: 10px;
}

p {
  color: #ddd;
  font-weight: 400;
}

/* ===== TABLE STYLE ===== */
table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 80%;
  max-width: 900px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

th, td {
  padding: 14px 18px;
  text-align: left;
}

th {
  background: rgba(255,255,255,0.08);
  color: #FFD84D;
  font-weight: 700;
}

tr:nth-child(even) {
  background: rgba(255,255,255,0.03);
}

/* ===== BUTTONS ===== */
.btn-small {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.btn-small:hover {
  transform: scale(1.05);
}

.btn-view {
  background: #FFD84D;
  color: #0f0b14;
  font-weight: 700;
}

.btn-chat {
  background: linear-gradient(90deg,#D13F73,#843A94);
  color: #fff;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

/* ===== ADD USER BUTTON ===== */
.add-user-btn {
  background: #FFD84D;
  color: #0f0b14;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 5px;
  margin-bottom: 25px;
}

.add-user-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255,216,77,0.5);
}

/* ===== SEARCH BOX ===== */
.search-box {
  max-width: 400px;
  margin: 35px auto 25px;
}

.search-box input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: #1a0f22;
  border-radius: 15px;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 15px rgba(255,216,77,0.2);
}

.modal-content input, .modal-content select {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-family: 'Outfit', sans-serif;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
  color: #bbb;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 700px) {
  nav { padding: 10px 28px 0 25px; height: 76px; }
  nav img { width: 56px; margin-top: 4px; }
  .hamburger { width: 34px; height: 23px; } /* +20% mobile */
  table, thead, tbody, th, td, tr { display: block; width: 100%; }
  table { margin-top: 0 !important; width: 95%; }
  tr {
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px;
  }
  th { display: none; }
  td { border: none; padding: 8px 0; }
  #userBody tr:first-child { margin-top: 0 !important; }
}
/* === MODALE AGGIUNTA STUDENTE – RESTYLING CORSIAMO === */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 11, 20, 0.85);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(180deg, #1a1220 0%, #0f0b14 100%);
  border: 1px solid rgba(255, 216, 77, 0.2);
  box-shadow: 0 0 25px rgba(209, 63, 115, 0.3);
  border-radius: 18px;
  padding: 35px 45px;
  width: 420px;
  max-width: 90%;
  color: #fff;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.modal-content h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #FFD84D;
  margin-bottom: 25px;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}

.modal-content input {
  width: 92%;
  padding: 12px 15px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: all 0.3s ease;
}

.modal-content input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.modal-content input:focus {
  border-color: #FFD84D;
  box-shadow: 0 0 10px rgba(255, 216, 77, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.modal-content button {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* 🔹 Pulsante “Salva” */
#saveUserBtn {
  background: linear-gradient(90deg, #D13F73, #843A94);
  color: #fff;
  border: none;
  margin-top: 5px;
  letter-spacing: 0.3px;
}

#saveUserBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(209, 63, 115, 0.5);
}

/* 🔹 Pulsante “Chiudi” */
#closeModal {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  margin-top: 10px;
}

#closeModal:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFD84D;
}

/* 🔹 Animazione d’ingresso */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 600px) {
  .modal-content {
    width: 80%;
    padding: 25px 25px;
    border-radius: 14px;
  }

  .modal-content h2 {
    font-size: 1.25rem;
    margin-bottom: 18px;
  }

  .modal-content input {
    padding: 11px 12px;
    font-size: 0.95rem;
  }

  .modal-content button {
    font-size: 0.95rem;
    padding: 11px;
  }

  #saveUserBtn {
    background: linear-gradient(90deg, #D13F73, #843A94);
  }
}

/* === RESPONSIVE TABLET === */
@media (min-width: 601px) and (max-width: 1024px) {
  .modal-content {
    width: 80%;
    padding: 30px 35px;
  }
}
