:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0b1020;
  --muted:#5b647a;
  --accent:#1f6bff;
  --accent2:#00a878;
  --border:rgba(0,0,0,.10);
  --shadow: 0 10px 28px rgba(0,0,0,.10);
  --radius:18px;
  --max:1200px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg); color:var(--text); font-family:var(--font);}
a{color:var(--accent); text-decoration:none}
.container{max-width:var(--max); margin:0 auto; padding:22px 16px 70px;}
.nav{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:14px 16px; border:1px solid var(--border); border-radius:var(--radius);
  background:#fff; box-shadow: var(--shadow);
}
.brand{display:flex; align-items:center; gap:12px}
.brand img{height:34px; width:auto}
.brand .title b{display:block; letter-spacing:.2px}
.brand .title span{display:block; font-size:12px; color:var(--muted); margin-top:2px}
.navlinks{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.btn, button{
  border:1px solid var(--border); background:#fff;
  color:var(--text); padding:10px 12px; border-radius:14px;
  display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer;
}
.btn.primary, button.primary{
  border-color: var(--accent);
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  color:#fff;
}
.btn.danger, button.danger{ border-color: rgba(220,38,38,.35); background:rgba(220,38,38,.08); color:#991b1b; }
.btn:disabled, button:disabled{opacity:.55; cursor:not-allowed}
.card{
  border:1px solid var(--border); border-radius:var(--radius);
  background:#fff; box-shadow: var(--shadow); padding:16px;
}
.grid{display:grid; grid-template-columns: 1.1fr .9fr; gap:14px; margin-top:14px;}
@media (max-width: 980px){ .grid{grid-template-columns: 1fr;} }
h1{margin:14px 0 0; font-size:30px}
h2{margin:0 0 10px; font-size:18px}
.small{font-size:12px; color:var(--muted); line-height:1.5}
.field{display:flex; flex-direction:column; gap:6px; margin:10px 0}
label{font-size:12px; color:var(--muted)}
input, textarea, select{
  padding:11px 12px; border-radius:14px; border:1px solid var(--border);
  background:rgba(0,0,0,.04); color:var(--text);
}
textarea{min-height:92px; resize:vertical}
hr{border:none; border-top:1px solid rgba(0,0,0,.08); margin:14px 0}
.tablewrap{overflow:auto; border:1px solid var(--border); border-radius:16px}
table{width:100%; border-collapse:separate; border-spacing:0; min-width: 980px; background:#fff}
th, td{padding:10px 10px; border-bottom:1px solid rgba(0,0,0,.06); font-size:13px; vertical-align:top}
th{position:sticky; top:0; background:#fbfcff; text-align:left; color:#111827; z-index:2}
tr:hover td{background:rgba(31,107,255,.04)}
.code{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}
.pill{display:inline-block; padding:4px 8px; border-radius:999px; border:1px solid rgba(0,0,0,.10); background:rgba(0,0,0,.03); font-size:12px; color:var(--muted)}
.footer{margin-top:22px; color:var(--muted); font-size:12px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:10px 2px}
#toast{
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92); color: #111827; display:none;
  max-width: min(820px, calc(100% - 24px));
  box-shadow: 0 18px 40px rgba(0,0,0,.18); font-size: 13px;
}
#toast[data-kind="error"]{ border-color: rgba(220,38,38,.35); }
#toast[data-kind="ok"]{ border-color: rgba(0,168,120,.35); }
