:root{
  --bg:#0f172a;
  --panel:#111827;
  --card:#1f2933;
  --border:#374151;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --primary:#38bdf8;
  --success:#22c55e;
  --danger:#ef4444;
  --warning:#f59e0b;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,#0b1220,#0f172a);
  color:var(--text);
}

a{
   color: #38bdf8;
   text-decoration: none;
}

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

.container{
  max-width:1100px;
  margin:40px auto;
  padding:0 20px;
}

header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:32px;
}

header h1{
  font-size:22px;
  margin:0;
  font-weight:600;
}

nav a{
  margin-left:16px;
  font-size:14px;
  color:var(--muted);
}
nav a:hover{color:#fff}

.card{
  background:linear-gradient(180deg,#1f2933,#111827);
  border:1px solid var(--border);
  border-radius:14px;
  padding:24px;
  margin-bottom:24px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

h2{
  margin:0 0 20px;
  font-size:20px;
  font-weight:600;
}

h3{
  margin:0 0 12px;
  font-size:16px;
  font-weight:500;
}

form{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:20px;
}

input,select,button{
  background:#020617;
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius:10px;
  font-size:14px;
}

input::placeholder{color:var(--muted)}

input:focus,select:focus{
  outline:none;
  border-color:var(--primary);
}

button{
  cursor:pointer;
  background:linear-gradient(180deg,#38bdf8,#0ea5e9);
  color:#020617;
  font-weight:600;
  border:none;
  padding:10px 18px;
}

button:hover{filter:brightness(1.1)}

button.danger{
  background:linear-gradient(180deg,#f87171,#ef4444);
  color:#fff;
}

button.secondary{
  background:#020617;
  color:var(--text);
  border:1px solid var(--border);
}

fieldset{
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  margin-bottom:20px;
}

legend{
  padding:0 8px;
  color:var(--muted);
  font-size:13px;
}

label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
}

table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius:12px;
}

thead{
  background:#020617;
}

th,td{
  padding:12px;
  text-align:left;
  border-bottom:1px solid var(--border);
  font-size:14px;
}

th{
  color:var(--muted);
  font-weight:500;
}

tr:hover td{
  background:rgba(56,189,248,.05);
}

.badge{
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}

.badge.on{
  background:rgba(34,197,94,.15);
  color:var(--success);
}

.badge.off{
  background:rgba(239,68,68,.15);
  color:var(--danger);
}

.actions{
  display:flex;
  gap:6px;
}

footer{
  margin-top:40px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
}

.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.login-card{
  width:100%;
  max-width:380px;
  padding:32px;
  border-radius:18px;
  background:linear-gradient(180deg,#1f2933,#020617);
  border:1px solid var(--border);
  box-shadow:0 20px 50px rgba(0,0,0,.5);
}

.login-card h1{
  text-align:center;
  margin-bottom:24px;
}

.login-card form{
  flex-direction:column;
}
