/* Панель сервера. Классы карточек/баров/таблиц — те же, что в admin.css витрины. */
:root {
  --bg:#f6f7f9; --surface:#fff; --surface-2:#eef0f4; --ink:#1b1f27; --muted:#6b7385; --line:#dde1e8;
  --primary:#2457d6; --primary-ink:#fff; --accent:#3d8bfd; --ok:#1e8e3e; --warn:#b26a00; --bad:#c0392b;
  --radius:12px; --radius-sm:8px; --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#12151b; --surface:#1a1e26; --surface-2:#232833; --ink:#e7eaf0; --muted:#8e97a8; --line:#2c3340;
          --primary:#6f9bff; --primary-ink:#0d1220; --accent:#4f8df7; --ok:#57c878; --warn:#e0a13a; --bad:#ff7a6b; }
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
h1 { font-size:1.5rem; margin:0; }
h3 { font-size:1rem; margin:0 0 12px; }
.muted { color:var(--muted); font-weight:400; font-size:.9rem; }
.wrap { max-width:1280px; margin:0 auto; padding:22px 18px 60px; }
.head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.tabs { display:flex; gap:6px; border-bottom:1px solid var(--line); margin-bottom:20px; overflow-x:auto; }
.tabs button { border:0; background:none; padding:11px 14px; font:inherit; font-weight:700; color:var(--muted); border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap; }
.tabs button.active { color:var(--primary); border-bottom-color:var(--primary); }

.btn { border:1px solid var(--line); background:var(--surface); color:var(--ink); padding:8px 14px; border-radius:var(--radius-sm); font:inherit; font-weight:600; cursor:pointer; }
.btn:hover { background:var(--surface-2); }
.btn-primary { background:var(--primary); border-color:var(--primary); color:var(--primary-ink); }
.btn-primary:hover { background:var(--primary); filter:brightness(1.08); }
input, select { padding:8px 10px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink); font:inherit; min-width:0; }

.login { max-width:340px; margin:12vh auto 0; padding:26px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); display:flex; flex-direction:column; gap:14px; }
.login label { display:flex; flex-direction:column; gap:6px; font-weight:600; font-size:.88rem; }
.err { color:var(--bad); margin:0; min-height:1.2em; font-size:.88rem; }

.editor { border:1px solid var(--line); border-radius:var(--radius); padding:16px; background:var(--surface); margin-bottom:16px; overflow-x:auto; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
.toolbar .grow { flex:1; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.grid2 > .editor { margin-bottom:0; }
@media (max-width:860px){ .grid2{grid-template-columns:1fr;} }

.stat-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:16px; }
.stat-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:14px; text-align:center; }
.stat-card .n { font-weight:700; font-size:1.7rem; color:var(--primary); line-height:1.1; }
.stat-card .n.bad { color:var(--bad); } .stat-card .n.warn { color:var(--warn); }
.stat-card .t { color:var(--muted); font-size:.8rem; margin-top:4px; }
.meter { background:var(--surface-2); border-radius:6px; height:8px; overflow:hidden; margin-top:10px; }
.meter i { display:block; height:100%; background:var(--accent); }
.meter i.warn { background:var(--warn); } .meter i.bad { background:var(--bad); }

.bar-row { display:grid; grid-template-columns:110px 1fr 90px; align-items:center; gap:10px; margin:3px 0; font-size:.8rem; }
.bar-key { color:var(--muted); white-space:nowrap; }
.bar { background:var(--surface-2); border-radius:6px; height:12px; overflow:hidden; }
.bar i { display:block; height:100%; background:var(--accent); }
.bar-val { text-align:right; font-weight:700; white-space:nowrap; }

table { width:100%; border-collapse:collapse; font-size:.86rem; }
th { text-align:left; color:var(--muted); font-weight:600; font-size:.76rem; text-transform:uppercase; letter-spacing:.04em; padding:6px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
tr:last-child td { border-bottom:0; }
td.num, th.num { text-align:right; white-space:nowrap; }
td.mono, .mono { font-family:var(--mono); font-size:.82rem; }
td.uri { max-width:420px; overflow-wrap:anywhere; }
td.ua { max-width:240px; color:var(--muted); font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
td.nowrap { white-space:nowrap; }
a.ip { color:var(--primary); text-decoration:none; cursor:pointer; font-family:var(--mono); font-size:.82rem; }
a.ip:hover { text-decoration:underline; }
.st { display:inline-block; min-width:38px; text-align:center; padding:1px 6px; border-radius:6px; font-weight:700; font-size:.78rem; background:var(--surface-2); }
.st.s2 { color:var(--ok); } .st.s3 { color:var(--muted); } .st.s4 { color:var(--warn); } .st.s5 { color:var(--bad); }
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--ok); margin-right:6px; }
.dot.off, .dot.bad { background:var(--bad); } .dot.warn { background:var(--warn); } .dot.idle { background:var(--line); }
.pill { display:inline-block; padding:2px 10px; border-radius:999px; font-size:.78rem; font-weight:700; margin-left:6px; vertical-align:middle; background:var(--surface-2); }
.pill.ok { color:var(--ok); } .pill.warn { color:var(--warn); } .pill.bad { color:var(--bad); }
td.bad { color:var(--bad); font-weight:700; }
.mt { margin-top:16px; }
h3.mt { margin-top:22px; }
details.hist { margin-top:12px; } details.hist summary { cursor:pointer; color:var(--primary); font-weight:600; font-size:.86rem; margin-bottom:8px; }
.logbox { margin:0; max-height:65vh; overflow:auto; font-family:var(--mono); font-size:.78rem; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.logbox .lerr { color:var(--bad); } .logbox .lwarn { color:var(--warn); }
.tag { display:inline-block; padding:1px 8px; border-radius:999px; background:var(--surface-2); font-size:.76rem; font-weight:600; margin-right:4px; }
.hint { color:var(--muted); font-size:.82rem; }
.center { text-align:center; margin-top:12px; }
