:root{
  --bg:#0b0f14;
  --panel:#101824;
  --panel2:#0e1520;
  --text:#e7eef8;
  --muted:#a7b3c7;
  --border:#1e2b3e;
  --accent:#6aa9ff;
  --good:#4ade80;
  --warn:#fbbf24;
  --bad:#fb7185;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

[data-theme="light"]{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel2:#f0f4ff;
  --text:#0b1220;
  --muted:#53627a;
  --border:#d9e2f2;
  --accent:#2563eb;
  --shadow: 0 12px 28px rgba(10,20,40,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.topbar{
  position:sticky; top:0; z-index:5;
  background:linear-gradient(180deg, var(--panel), rgba(0,0,0,0));
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(8px);
}
.topbar .inner{
  max-width:1200px; margin:0 auto;
  padding:14px 18px;
  display:flex; gap:12px; align-items:center; justify-content:space-between;
}
.brand{
  display:flex; gap:10px; align-items:center;
  font-weight:700; letter-spacing:.2px;
}
.pill{
  padding:6px 10px; border:1px solid var(--border);
  border-radius:999px; color:var(--muted); font-size:12px;
  background:rgba(255,255,255,.03);
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  cursor:pointer;
  box-shadow: var(--shadow);
}
.btn:hover{filter:brightness(1.05)}
.btn.primary{background:var(--accent); border-color:rgba(255,255,255,.15); color:white}
.btn.danger{background:rgba(251,113,133,.12); border-color:rgba(251,113,133,.35)}
.btn.ghost{background:transparent; box-shadow:none}

.container{max-width:1200px; margin:0 auto; padding:18px}
.grid{display:grid; gap:16px}
.grid.cols2{grid-template-columns:1fr 1fr}
@media(max-width:900px){.grid.cols2{grid-template-columns:1fr}}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}
.card h2, .card h3{margin:0 0 10px 0}
.muted{color:var(--muted)}
.row{display:flex; gap:12px; flex-wrap:wrap}
.field{display:flex; flex-direction:column; gap:6px; min-width:240px; flex:1}
input,select,textarea{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  outline:none;
}
textarea{min-height:90px; resize:vertical}
hr{border:0; border-top:1px solid var(--border); margin:14px 0}

.badge{font-size:12px; padding:4px 8px; border-radius:999px; border:1px solid var(--border); color:var(--muted)}
.kbd{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono"; font-size:12px; padding:2px 6px; border-radius:8px; border:1px solid var(--border); color:var(--muted)}
.table{width:100%; border-collapse:separate; border-spacing:0 10px}
.table th{color:var(--muted); font-size:12px; text-align:left; padding:0 10px}
.table td{
  background:var(--panel2);
  border:1px solid var(--border);
  padding:12px 10px;
}
.table tr td:first-child{border-radius:12px 0 0 12px}
.table tr td:last-child{border-radius:0 12px 12px 0}

.toast{
  position:fixed; bottom:16px; right:16px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  box-shadow:var(--shadow);
  display:none;
}
.toast.show{display:block}
