:root{
  --bg:#0d0d0d;
  --panel:#121212;
  --table:#1E1E2E;
  --text:#E0E0E0;
  --muted:#9aa0a6;
  --accent:#7B3FE4;
  --accent-strong:#6b2fe0;
  --success:#4ADE80;
  --danger:#F87171;
  --line:#242432;
}

html,body{ background:var(--bg); color:var(--text); }

.toolbar{
  display:flex; align-items:center; gap:.75rem;
  background:var(--panel); border:1px solid var(--line);
  padding:12px 14px; border-radius:12px; margin:16px 0;
}
.toolbar .spacer{ flex:1; }
#searchInput{
  background:#0f0f14; color:var(--text); border:1px solid var(--line);
  padding:10px 12px; border-radius:10px; min-width:260px;
}
#searchInput::placeholder{ color:var(--muted); }

table{
  width:100%; border-collapse:separate; border-spacing:0;
  background:var(--table); border:1px solid var(--line); border-radius:14px; overflow:hidden;
}
thead th{
  text-align:left; font-weight:600; color:var(--muted);
  background:#171723; padding:12px 14px; border-bottom:1px solid var(--line);
}
tbody td{ padding:12px 14px; border-top:1px solid var(--line); }
tbody tr:hover{ background:#171723; }

.badge{
  display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; font-size:.85rem;
}
.badge.active{ background:rgba(74,222,128,.12); color:var(--success); border:1px solid rgba(74,222,128,.3); }
.badge.inactive{ background:rgba(248,113,113,.12); color:var(--danger); border:1px solid rgba(248,113,113,.3); }

.btn{
  background:#161622; color:#fff; border:1px solid var(--line);
  padding:8px 12px; border-radius:10px; cursor:pointer;
}
.btn:hover{ border-color:var(--accent); box-shadow:0 0 0 2px rgba(123,63,228,.15) inset; }
.btn-primary{ background:var(--accent); border-color:var(--accent); }
.btn-primary:hover{ background:var(--accent-strong); }
.btn-ghost{ background:transparent; color:var(--text); }
.btn-xs{ padding:6px 10px; font-size:.9rem; border-radius:8px; }
.actions{ display:flex; gap:8px; }
/* ======================
   🧩 Modale Modifica Cliente
   ====================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}

.modal-card {
  background: var(--table);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 0 20px rgba(123, 63, 228, 0.3);
}

.modal-card h5 {
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
  display: flex; align-items: center;
}

.modal-card form label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

.modal-card form input {
  width: 100%;
  background: #0f0f14;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
}

.modal-card form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 4px var(--accent);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
/* ==========================
   💎 TABELLA CLIENTI PREMIUM
   ========================== */
.table-wrapper {
  background: #0d0d12;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(123, 63, 228, 0.15);
  border: 1px solid rgba(123, 63, 228, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: #e5e5e5;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
}

thead {
  background: linear-gradient(90deg, #7b3fe4 0%, #612ae8 100%);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

thead th {
  padding: 14px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tbody tr {
  transition: background 0.2s, transform 0.15s ease;
}

tbody tr:hover {
  background: rgba(123, 63, 228, 0.08);
  transform: scale(1.01);
}

tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

tbody td:first-child {
  color: #aaa;
  font-weight: 500;
  width: 60px;
}

tbody td:nth-child(2) {
  font-weight: 600;
  color: #fff;
}

tbody td:nth-child(3) {
  width: 120px;
}

tbody td:nth-child(5) {
  color: #aaa;
  font-size: 13px;
}

/* Stato badge */
.badge-active {
  background: rgba(0, 180, 100, 0.15);
  color: #00d46a;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.badge-inactive {
  background: rgba(255, 60, 60, 0.15);
  color: #ff6060;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

/* Pulsanti azioni */
.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions .btn-edit {
  background: #7b3fe4;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s ease;
}

.table-actions .btn-edit:hover {
  background: #9256ff;
  transform: translateY(-1px);
}

.table-actions .btn-toggle {
  background: #2a2a2a;
  color: #ff4b4b;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.table-actions .btn-toggle:hover {
  background: #3a0d0d;
  transform: translateY(-1px);
}
/* ==========================
   🔮 NAVBAR PREMIUM SPIDERNODE
   ========================== */
.topbar {
  background: linear-gradient(90deg, #0a0a0f 0%, #140a1e 50%, #1e102f 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(123, 63, 228, 0.25);
  padding: 14px 0;
  box-shadow: 0 0 15px rgba(123, 63, 228, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar .container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar .brand {
  display: flex;
  align-items: center;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.topbar .brand i {
  font-size: 22px;
  color: #7b3fe4;
  margin-right: 10px;
  filter: drop-shadow(0 0 5px #7b3fe4);
}

.topbar .brand span {
  font-weight: 700;
  color: #7b3fe4;
}

.btn-primary-grad {
  background: linear-gradient(90deg, #7b3fe4 0%, #9b5ef9 100%);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0 10px rgba(123, 63, 228, 0.3);
}

.btn-primary-grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(123, 63, 228, 0.5);
}
:root{
  --bg:#0d0d0d;
  --panel:#121212;
  --table:#1E1E2E;
  --text:#E0E0E0;
  --muted:#9aa0a6;
  --accent:#7B3FE4;
  --accent-strong:#6b2fe0;
  --success:#4ADE80;
  --danger:#F87171;
  --line:#242432;
}

html,body{ background:var(--bg); color:var(--text); }

.toolbar{
  display:flex; align-items:center; gap:.75rem;
  background:var(--panel); border:1px solid var(--line);
  padding:12px 14px; border-radius:12px; margin:16px 0;
}
.toolbar .spacer{ flex:1; }
#searchInput{
  background:#0f0f14; color:var(--text); border:1px solid var(--line);
  padding:10px 12px; border-radius:10px; min-width:260px;
}
#searchInput::placeholder{ color:var(--muted); }

table{
  width:100%; border-collapse:separate; border-spacing:0;
  background:var(--table); border:1px solid var(--line); border-radius:14px; overflow:hidden;
}
thead th{
  text-align:left; font-weight:600; color:var(--muted);
  background:#171723; padding:12px 14px; border-bottom:1px solid var(--line);
}
tbody td{ padding:12px 14px; border-top:1px solid var(--line); }
tbody tr:hover{ background:#171723; }

.badge{
  display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; font-size:.85rem;
}
.badge.active{ background:rgba(74,222,128,.12); color:var(--success); border:1px solid rgba(74,222,128,.3); }
.badge.inactive{ background:rgba(248,113,113,.12); color:var(--danger); border:1px solid rgba(248,113,113,.3); }

.btn{
  background:#161622; color:#fff; border:1px solid var(--line);
  padding:8px 12px; border-radius:10px; cursor:pointer;
}
.btn:hover{ border-color:var(--accent); box-shadow:0 0 0 2px rgba(123,63,228,.15) inset; }
.btn-primary{ background:var(--accent); border-color:var(--accent); }
.btn-primary:hover{ background:var(--accent-strong); }
.btn-ghost{ background:transparent; color:var(--text); }
.btn-xs{ padding:6px 10px; font-size:.9rem; border-radius:8px; }
.actions{ display:flex; gap:8px; }
/* 🔮 Toolbar Premium */
.toolbar {
  background: linear-gradient(145deg, #0b0b12, #121224);
  border: 1px solid rgba(135, 63, 255, 0.3);
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 0 10px rgba(130, 70, 255, 0.2);
}

/* 🔍 Ricerca */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #9b8fff;
  font-size: 1.2rem;
}

.search-input {
  width: 100%;
  background: rgba(30, 25, 45, 0.9);
  border: 1px solid rgba(150, 100, 255, 0.4);
  border-radius: 8px;
  padding: 10px 12px 10px 38px;
  color: #f2eaff;
  transition: 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #a871ff;
  box-shadow: 0 0 8px rgba(160, 90, 255, 0.5);
}

/* 🔁 Pulsante Aggiorna */
.btn-refresh {
  background: linear-gradient(145deg, #6b2eff, #9d63ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(160, 90, 255, 0.3);
  transition: 0.3s;
}

.btn-refresh:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(160, 90, 255, 0.5);
  background: linear-gradient(145deg, #7b3bff, #b37fff);
}
