:root{
  --bg:#0b1220;
  --card:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.12);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.70);
  --accent:#7c5cff;
  --danger:#ff4d6d;
  --ok:#2ee59d;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --radius-sm: 12px;
  --blur: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

*{box-sizing:border-box}
body{
  margin:0; min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(124,92,255,.35), transparent 55%),
    radial-gradient(900px 500px at 80% 30%, rgba(46,229,157,.18), transparent 60%),
    linear-gradient(180deg, #070b14, var(--bg));
}

.container{max-width:1400px;margin:0 auto;padding:28px}
.topbar{
  display:flex;justify-content:space-between;align-items:center;
  padding:16px 18px;border:1px solid var(--stroke);border-radius:var(--radius);
  background:var(--card);backdrop-filter: blur(var(--blur));
  box-shadow:var(--shadow);
}
.brand{display:flex;gap:10px;align-items:center;font-weight:700}
.badge{padding:6px 10px;border:1px solid var(--stroke);border-radius:999px;color:var(--muted);font-size:13px}
a{color:inherit;text-decoration:none}
.btn{
  display:inline-flex;gap:10px;align-items:center;justify-content:center;
  padding:10px 14px;border-radius:999px;border:1px solid var(--stroke);
  background:rgba(255,255,255,.05);
  cursor:pointer; color:var(--text);
}
.btn.primary{background:linear-gradient(135deg, rgba(124,92,255,.9), rgba(124,92,255,.55)); border-color:transparent}
.btn.danger{background:linear-gradient(135deg, rgba(255,77,109,.9), rgba(255,77,109,.55)); border-color:transparent}
.btn:active{transform:translateY(1px)}
.card{
  margin-top:18px;padding:18px;border:1px solid var(--stroke);
  border-radius:var(--radius); background:var(--card);
  backdrop-filter: blur(var(--blur));
  box-shadow:var(--shadow);
}
.h1{font-size:26px;margin:0 0 6px}
.muted{color:var(--muted)}
.grid{display:grid;grid-template-columns:1.3fr .7fr;gap:18px}
@media(max-width:920px){.grid{grid-template-columns:1fr}}

.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.table th{color:var(--muted);font-weight:600;text-align:left;padding:0 10px 6px}
.table td{
  padding:12px 10px;background:rgba(0,0,0,.18);
  border-top:1px solid var(--stroke);border-bottom:1px solid var(--stroke);
}
.table tr td:first-child{border-left:1px solid var(--stroke);border-top-left-radius:14px;border-bottom-left-radius:14px}
.table tr td:last-child{border-right:1px solid var(--stroke);border-top-right-radius:14px;border-bottom-right-radius:14px}

/* campi input e select */
input:not([type="checkbox"]):not([type="radio"]),
select{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.18);
  color:#fff;
  font-weight:700;
  -webkit-appearance:none;
  appearance:none;
}

/* opzioni menu */
select option{
  color:#000;
  background:#fff;
  font-weight:700;
}

/* focus (quando clicchi) */
select:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(124,92,255,.25);
}

.row{display:flex;gap:10px;align-items:center}
.row > .grow{flex:1}

input[type="checkbox"],
input[type="radio"]{
  width:auto;
  flex:0;
  cursor:pointer;
}
hr.sep{border:0;border-top:1px solid var(--stroke);margin:14px 0}

.notice{padding:10px 12px;border-radius:14px;border:1px solid var(--stroke);background:rgba(255,255,255,.04)}
.notice.ok{border-color:rgba(46,229,157,.35)}
.notice.err{border-color:rgba(255,77,109,.35)}

/* Modal */
.modal-backdrop{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;
  background:rgba(0,0,0,.55);backdrop-filter: blur(10px);z-index:1000;
}
.modal{
  width:min(520px, calc(100% - 26px));
  border:1px solid var(--stroke);border-radius:22px;
  background:rgba(20,26,44,.72);box-shadow:var(--shadow);
  padding:18px;
}
.modal h2{margin:0 0 8px}
.modal .actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
.modal-close{float:right}

input[type="checkbox"],
input[type="radio"]{
  width:auto;
  padding:0;
  appearance:auto;
  -webkit-appearance:auto;
  accent-color: var(--accent);
  cursor:pointer;
}