:root{
  --bg:#0f111a;
  --panel:#1a1d2b;
  --panel2:#151827;
  --border:#2a2f45;
  --text:#e6e6e6;
  --muted:#a9b1d6;
  --accent:#0078D4; /* Win10 vibe */
  --danger:#d43939;
  --ok:#23a55a;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius:10px;
  --radius-sm:6px;
  --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--font);
}
.topbar{
  height:56px; display:flex; align-items:center; padding:0 16px;
  background:linear-gradient(180deg, #14182a, #101428);
  border-bottom:1px solid var(--border);
}
.container{ max-width:1200px; margin:18px auto; padding:0 16px; }
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.card-header{
  padding:14px 16px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
}
.card-body{ padding:16px; }

.btn{
  border:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  padding:10px 12px; border-radius:var(--radius-sm);
  cursor:pointer;
}
.btn:hover{ border-color:#3b4265 }
.btn-primary{ background:var(--accent); border-color:transparent; }
.btn-danger{ background:var(--danger); border-color:transparent; }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.input, select, textarea{
  width:100%; padding:10px 10px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:#0f1322; color:var(--text);
  outline:none;
}
.input:focus, select:focus, textarea:focus{ border-color:var(--accent); }

.table{
  width:100%; border-collapse:separate; border-spacing:0;
}
.table th, .table td{
  padding:10px; border-bottom:1px solid var(--border);
}
.table th{ color:var(--muted); font-weight:600; text-align:left; }

.badge{
  padding:4px 8px; border-radius:999px; font-size:12px;
  border:1px solid var(--border);
}
.badge-ok{ border-color:rgba(35,165,90,.6); color:#bff3d2; }
.badge-off{ border-color:rgba(212,57,57,.6); color:#ffd0d0; }

/* Modal */
.modal-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.55);
  display:none; align-items:center; justify-content:center;
  backdrop-filter: blur(2px);
  padding:16px;
}
.modal{
  width:min(720px, 100%);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.modal-header, .modal-footer{
  padding:14px 16px; display:flex; align-items:center; justify-content:space-between;
}
.modal-header{ border-bottom:1px solid var(--border); }
.modal-footer{ border-top:1px solid var(--border); justify-content:flex-end; gap:10px; }
.modal-body{ padding:16px; }
.modal-title{ font-size:16px; font-weight:600; }
.icon-btn{
  background:transparent; border:1px solid var(--border);
  width:34px; height:34px; border-radius:10px; color:var(--text);
  cursor:pointer;
}
.icon-btn:hover{ border-color:#3b4265 }

.grid{ display:grid; gap:12px; }
.grid-2{ grid-template-columns:1fr 1fr; }
@media (max-width: 760px){ .grid-2{ grid-template-columns:1fr; } }

.toast{
  position:fixed; right:16px; bottom:16px;
  background:var(--panel); border:1px solid var(--border);
  padding:12px 14px; border-radius:var(--radius);
  box-shadow:var(--shadow);
  display:none;
}
