:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --border: #e2e2e6;
  --text: #1a1a1f;
  --muted: #6b6b76;
  --accent: #3f51ff;
  --accent-hover: #2f3fe0;
  --danger: #d1453a;
  --ok: #1c8a4a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
header nav a {
  margin-right: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
header nav a.active, header nav a:hover { color: var(--text); font-weight: 600; }
header .brand { font-weight: 700; }
header .right { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
main { max-width: 960px; margin: 32px auto; padding: 0 24px; }
h1 { font-size: 22px; margin-bottom: 4px; }
.subtitle { color: var(--muted); margin-bottom: 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 24px; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.badge.synced { background: #e4f7ec; color: var(--ok); }
.badge.pending { background: #fff4e0; color: #a86400; }
.badge.error { background: #fdeceb; color: var(--danger); }
.error-msg { background: #fdeceb; color: var(--danger); padding: 10px 14px; border-radius: 7px; margin-bottom: 16px; font-size: 14px; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 340px; }
.filter-bar { margin-bottom: 16px; }
code.token { background: #f1f1f4; padding: 3px 6px; border-radius: 5px; font-size: 12px; }
