:root {
  --bg: #f5f6f8;
  --fg: #1a1d21;
  --muted: #6b7280;
  --accent: #2563eb;
  --border: #e2e5ea;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.45;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}
.brand { font-weight: 700; }
.topbar nav a { margin-left: 16px; color: var(--accent); text-decoration: none; }
.topbar nav a.muted { color: var(--muted); }
main { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
h1 { font-size: 22px; margin: 0 0 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; }
.actions { display: flex; gap: 8px; align-items: center; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; color: var(--muted); }
.pager a { color: var(--accent); text-decoration: none; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; max-width: 420px; margin: 60px auto; display: flex; flex-direction: column; gap: 12px;
}
.card h1 { margin: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
input, textarea {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; width: 100%;
}
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 9px 14px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn.ghost, button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.error { color: #b91c1c; background: #fef2f2; padding: 8px 12px; border-radius: 8px; }
.ok { color: #15803d; background: #f0fdf4; padding: 8px 12px; border-radius: 8px; }
.hint { color: var(--muted); font-size: 13px; }
.secret { word-break: break-all; }
.qr { width: 180px; height: 180px; margin: 4px 0; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { background: #fafbfc; font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; }
table.data td input { padding: 6px 8px; font-size: 14px; }
table.data tr:last-child td { border-bottom: 0; }
.row-form { display: grid; grid-template-columns: 2fr 2fr 2fr 1fr auto; gap: 8px; margin-bottom: 16px; }
.row-actions { white-space: nowrap; }
.empty { color: var(--muted); text-align: center; }
.auth { display: flex; min-height: 100vh; align-items: flex-start; justify-content: center; background: var(--bg); }
