:root {
  --bg: #0f1720;
  --panel: #17212b;
  --border: #263544;
  --text: #e6edf3;
  --muted: #8b9bab;
  --accent: #25d366;
  --accent-dark: #1da851;
  --danger: #e5534b;
}

* { box-sizing: border-box; }

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

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

.brand { font-weight: 600; }

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 14px;
}

nav a:hover, nav a.active { color: var(--text); }

.content { max-width: 900px; margin: 0 auto; padding: 24px; }

h1 { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 16px; margin: 0 0 8px; }

.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); }

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

input[type="text"], input[type="password"], select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}

button {
  background: var(--accent);
  color: #06210f;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

button:hover { background: var(--accent-dark); }

.inline-form { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.toggle-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.switch-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.chip-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip-remove { display: inline; margin: 0; }
.chip-remove button {
  background: transparent;
  color: var(--muted);
  padding: 0 4px;
  font-size: 15px;
}
.chip-remove button:hover { color: var(--danger); }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.table th { color: var(--muted); font-weight: 500; }
.snippet { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag {
  background: rgba(37, 211, 102, 0.15);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.ok { color: var(--accent); }
.fail { color: var(--danger); }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.filters a { margin-left: 12px; color: var(--muted); text-decoration: none; font-size: 13px; }
.filters a:first-child { margin-left: 0; }
.filters a.active, .filters a:hover { color: var(--text); }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.login-card h1 { margin: 0; font-size: 20px; }
.login-card button { margin-top: 8px; }

.qr-wrap { margin-top: 16px; }
.qr-wrap img { width: 220px; height: 220px; border-radius: 8px; background: #fff; padding: 8px; }

code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
}
