/* Leva il cursore | per scrittura fuori area */
body,
.container,
.card,
table,
th,
td,
.small,
.topbar {
  cursor: default;
  user-select: none;
}

input,
textarea {
  cursor: text;
  user-select: text;
}

select,
button,
a {
  cursor: pointer;
}

/* ----------------------- CSS SITO */
body {
  position: relative;
  font-family: Arial, sans-serif;
  background: #f5f7fa;
  margin: 0;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: #fff;
  padding: 20px;
  overflow: auto;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

h1, h2, h3 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

input, select, button {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

button {
  border: none;
  cursor: pointer;
}

.btn-red {
  background: #e74c3c;
  color: white;
}

.btn-green {
  background: #2ecc71;
  color: white;
}

.btn-blue {
  background: #3498db;
  color: white;
}

.btn-gray {
  background: #666;
  color: white;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.msg {
  margin-top: 12px;
  font-weight: bold;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.small {
  font-size: 14px;
  color: #666;
}

table {
  min-width: 1100px;
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table-wrap {
  overflow-x: auto;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

th {
  background: #f0f0f0;
}

@media (max-width: 700px) {
  .row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.color-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #ccc;
  display: inline-block;
}

/* Tasto Indietro (request_login.php e forgot_pin.php */
.back-container {
  display: flex;
  justify-content: flex-start; /* 👈 lo mette a sinistra */
}

.back-btn {
  width: auto !important;
  padding: 6px 10px;
  font-size: 13px;
  margin-bottom: 10px;
}

 /* ADMIN Pannello - Grafica ADD USER */
.user-edit-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-field {
  width: auto !important;
  min-width: 90px;
  max-width: 140px;
  margin-top: 0;
  padding: 8px 10px;
  font-size: 14px;
}

.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}


/* Admin Dropdown */

.quick-actions-details {
  margin-bottom: 20px;
}

.quick-actions-details summary {
  cursor: pointer;
  font-weight: bold;
  padding: 8px 12px;
  background: #f0f4f8;
  border: 1px solid #d5dce5;
  border-radius: 8px;
  width: fit-content;
}

.quick-actions-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* --------------*/ 

.danger-btn {
  background: #e74c3c;
  color: white;
}

td form {
  margin: 0;
}

td {
  vertical-align: middle;
}

.attivo-select {
  width: 90px !important;
  min-width: 90px;
  padding: 6px;
}

.pin-field {
  width: 100px !important;
  padding: 6px;
}

.compact-btn {
  width: auto !important;
  padding: 6px 10px;
}

/* --------------------------------  FOOTER -------------------------------------------- */
.site-footer {
  background: #ffffff;
  color: #333;
  padding: 30px 0 20px;
  margin-top: 40px;
  border-top: 1px solid #e5e7eb;
  width: 100%;
  box-sizing: border-box;
}

.footer-inner {
  max-width: 400px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 15px;
  justify-content: center;
  align-items: start;
}

.footer-block {
  width: 100%;
  text-align: center;
}

.footer-title {
  font-size: 15px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  color: #1f2937;
}

.footer-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.55;
}

.footer-text p {
  margin: 0 0 8px 0;
}

.footer-text a {
  color: #374151;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.footer-bottom {
  width: 100%;
  margin: 24px 0 0 0;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  border-top: 1px solid #f0f0f0;
  padding-top: 14px;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
/* -------------- RESPONSEVE ------------------ */

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* -------------- NEWS ------------------ */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-box {
  background: #fff;
  padding: 24px;
  border-radius: 14px;
  width: 320px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.popup-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}