:root {
  --bg: #0b1016;
  --bg2: #121820;
  --card: #161e28;
  --line: #243040;
  --text: #e8eef6;
  --muted: #8b9bb0;
  --accent: #3dd6c6;
  --accent2: #7aa2ff;
  --danger: #ff6b7a;
  --warn: #f5c16c;
  --ok: #5ee0a8;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 16px;
  --font: "Segoe UI", "PT Root UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
a { color: var(--accent); text-decoration: none; }
body.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.side {
  background: linear-gradient(180deg, #101820, #0d141e);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, #7af0e0, #2aa89c);
  box-shadow: 0 0 24px rgba(61,214,198,.35);
}
.brand b { display: block; font-size: 15px; }
.brand span { color: var(--muted); font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); padding: 10px 12px; border-radius: 10px; font-size: 14px;
}
.nav a:hover, .nav a.active { background: #1b2633; color: var(--text); }
.nav .sp { flex: 1; }
.main { padding: 28px 32px 60px; max-width: 1200px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; gap: 16px; }
h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1.2fr .8fr; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.stat { font-size: 22px; font-weight: 700; }
.muted { color: var(--muted); font-size: 12px; }
.bar { height: 8px; background: #0d131c; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line);
}
.ok { color: var(--ok); }
.bad { color: var(--danger); }
.warn { color: var(--warn); }
.btn, button, input[type=submit] {
  background: #223042; color: var(--text); border: 1px solid #2e4258;
  border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit; font-size: 13px;
}
.btn.primary, .primary { background: linear-gradient(180deg, #3dd6c6, #2bb3a6); color: #06221f; border: 0; font-weight: 700; }
.btn.danger { background: #3a1b22; border-color: #5a2430; color: #ffb3bc; }
.btn:hover { filter: brightness(1.08); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
input, select, textarea {
  background: #0e151d; color: var(--text); border: 1px solid #2a3b4e;
  border-radius: 10px; padding: 9px 10px; font: inherit; min-width: 140px;
}
textarea { width: 100%; min-height: 180px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
pre.log {
  background: #0a1016; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; overflow: auto; max-height: 420px; font-size: 12px; color: #c6d4e5;
}
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(900px 400px at 20% 10%, rgba(61,214,198,.12), transparent),
    radial-gradient(700px 400px at 90% 90%, rgba(122,162,255,.12), transparent),
    var(--bg);
}
.login {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.login h1 { font-size: 22px; margin-bottom: 6px; }
.login form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.login input { min-width: 0; }
.err { color: var(--danger); font-size: 13px; }
.okmsg { color: var(--ok); font-size: 13px; }
.copy { font-size: 12px; color: var(--muted); }
.mailcard { background: #0e171f; border: 1px dashed #2b4258; border-radius: 12px; padding: 12px; font-size: 13px; }
@media (max-width: 980px) {
  body.app { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; }
  .g4, .g2, .g3 { grid-template-columns: 1fr; }
  .main { padding: 18px 14px 40px; }
}
