:root {
  --bg: #0f1420;
  --panel: #171d2b;
  --panel-2: #1e263a;
  --border: #2a3348;
  --text: #e6e9f0;
  --text-dim: #9aa4bb;
  --accent: #5b8dee;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --red: #e74c3c;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.topbar .brand { font-weight: 700; font-size: 1.1rem; }
.topbar nav a { margin-left: 18px; color: var(--text-dim); font-size: 0.95rem; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

h1 { font-size: 1.5rem; margin-bottom: 4px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; color: var(--text); }
.subtitle { color: var(--text-dim); margin-bottom: 24px; font-size: 0.95rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.card h3 { margin-top: 0; font-size: 1rem; }

.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.flash.success { background: rgba(46,204,113,0.15); border: 1px solid var(--green); color: var(--green); }
.flash.error { background: rgba(231,76,60,0.15); border: 1px solid var(--red); color: #ff8a80; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 12px 0 4px;
}
label.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 0.9rem; margin: 8px 12px 8px 0; }
label.inline input { margin: 0; }

input[type=text], input[type=password], input[type=number], input[type=url], select {
  width: 100%;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }

.help {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  cursor: pointer;
  margin-top: 14px;
}
button:hover, .btn:hover { opacity: 0.9; text-decoration: none; }
button.secondary, .btn.secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
button.danger, .btn.danger { background: rgba(231,76,60,0.15); border: 1px solid var(--red); color: #ff8a80; }

.server-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.server-item:last-child { border-bottom: none; }
.server-actions a, .server-actions button { margin-left: 8px; font-size: 0.85rem; padding: 6px 12px; margin-top: 0; }

.badge {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.badge.ok { background: var(--green); }
.badge.warn { background: var(--yellow); }
.badge.critical { background: var(--red); }

.check-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0 6px 20px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.check-line .badge { margin-top: 5px; flex-shrink: 0; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 340px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.login-card h1 { text-align: center; margin-bottom: 24px; }

.test-result {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}
.test-result.show { display: block; }
.test-result .line { margin-bottom: 4px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 30px 0;
}

.timestamp { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 20px; }
