/* Disparo Fascinare - UI escura e elegante */
:root{
  --bg:#181818;
  --bg-2:#111111;
  --card:#222222;
  --card-2:#292929;
  --text:#f5f5f5;
  --muted:#b5b5bd;
  --border:#36363d;
  --accent:#B13363;
  --accent-2:#d45f8f;
  --danger:#ef4444;
  --ok:#22c55e;
  --shadow: 0 18px 40px rgba(0,0,0,.32);
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background:
    radial-gradient(circle at top right, rgba(177,51,99,.14), transparent 22%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color:var(--text);
}

a{color:var(--accent-2); text-decoration:none}
a:hover{text-decoration:underline}

.header{
  position:sticky; top:0; z-index:50;
  background:rgba(24,24,24,.92);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  gap:12px;
}
.brand{
  display:flex; align-items:center; gap:10px;
}
.logo{
  height:42px;
  width:auto;
  max-width:180px;
  display:block;
  object-fit:contain;
}
.badge{
  width:36px; height:36px; border-radius:12px;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  display:inline-flex; align-items:center; justify-content:center;
  color:white; font-weight:800; box-shadow:0 8px 20px rgba(177,51,99,.28);
}
.brand h1{
  font-size:16px; margin:0; letter-spacing:.2px;
}
.brand small{display:block; color:var(--muted); font-size:12px; margin-top:2px}

.userbar{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end;
}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border:1px solid var(--border);
  border-radius:999px; background:var(--card-2);
  font-size:12px; color:var(--muted);
}
.pill b{color:var(--text); font-weight:700}
.btn{
  border:1px solid var(--border);
  background:var(--card-2);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
  transition:.2s ease;
}
.btn:hover{box-shadow:0 8px 18px rgba(0,0,0,.18); border-color:rgba(177,51,99,.45)}
.btn.primary{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  border:none; color:white;
}
.btn.primary:hover{filter:brightness(1.06)}
.btn.danger{
  background:var(--danger);
  border:none; color:white;
}
.btn.ghost{
  background:transparent;
}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}

.layout{
  max-width:1200px; margin:18px auto;
  padding:0 16px 30px;
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:16px;
}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:static}
}

.sidebar{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:12px;
  position:sticky; top:84px; align-self:start;
}
.nav{
  display:flex; flex-direction:column; gap:6px;
}
.nav a{
  padding:10px 10px;
  border-radius:12px;
  color:var(--text);
  border:1px solid transparent;
}
.nav a:hover{background:rgba(255,255,255,.03); border-color:var(--border); text-decoration:none}
.nav a.active{
  background:rgba(177,51,99,.14);
  border-color:rgba(177,51,99,.30);
}
.nav small{
  display:block;
  color:var(--muted);
  margin:10px 10px 6px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.main{
  min-height:60vh;
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}
.card + .card{margin-top:14px}

.h2{margin:0 0 6px; font-size:18px}
.p{margin:0; color:var(--muted); line-height:1.5}
.hr{height:1px; background:var(--border); margin:14px 0}

.grid{
  display:grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
}
.stat{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:rgba(255,255,255,.02);
}
.stat .k{color:var(--muted); font-size:12px}
.stat .v{font-size:22px; font-weight:800; margin-top:6px}

.form{
  display:grid; grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 980px){
  .form{grid-template-columns:1fr}
}
.field label{
  display:block; font-size:12px; color:var(--muted); margin:0 0 6px;
}
.field input, .field select, .field textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#151515;
  color:var(--text);
  outline:none;
  font-size:14px;
}
.field input::placeholder, .field textarea::placeholder{color:#8d8d96}
.field textarea{min-height:120px; resize:vertical}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color:rgba(177,51,99,.5);
  box-shadow:0 0 0 4px rgba(177,51,99,.12);
}
.actions{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin-top:10px;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:14px;
}
.table th, .table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  font-size:13px;
}
.table th{
  text-align:left;
  color:var(--muted);
  background:rgba(255,255,255,.03);
  font-weight:700;
}
.table tr:last-child td{border-bottom:none}
.muted{color:var(--muted)}
.tag{
  display:inline-flex; align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background:var(--card-2);
}
.tag.ok{border-color:rgba(34,197,94,.28); background:rgba(34,197,94,.12); color:#86efac}
.tag.bad{border-color:rgba(239,68,68,.28); background:rgba(239,68,68,.12); color:#fca5a5}
.tag.warn{border-color:rgba(245,158,11,.28); background:rgba(245,158,11,.12); color:#fdba74}

.hidden{display:none !important}

.toastwrap{
  position:fixed;
  right:16px; bottom:16px;
  display:flex; flex-direction:column; gap:10px;
  z-index:100;
}
.toast{
  background:var(--card);
  border:1px solid var(--border);
  border-left:6px solid var(--accent);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:12px 12px;
  min-width:260px;
}
.toast .t{font-weight:800; margin:0 0 4px; font-size:13px}
.toast .m{margin:0; color:var(--muted); font-size:13px; line-height:1.35}
.toast.ok{border-left-color:var(--ok)}
.toast.bad{border-left-color:var(--danger)}
