* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #1a1f2c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: #1a1f2c;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-weight: 600; letter-spacing: 0.3px; }
.topbar .nav { display: flex; gap: 16px; align-items: center; }
.topbar .nav a, .topbar .nav .user { color: #cbd1de; text-decoration: none; font-size: 14px; }
.topbar .nav a:hover { color: #fff; }
.topbar form.inline { display: inline; margin: 0; }
.topbar button.link {
  background: none; border: none; color: #cbd1de; cursor: pointer;
  font: inherit; padding: 0;
}
.topbar button.link:hover { color: #fff; }

.container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}
.card {
  background: #fff;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.card.narrow { max-width: 420px; margin: 48px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
h1 { margin-top: 0; }
h2 { margin-top: 0; font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; padding: 0; list-style: none; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.stack input {
  padding: 8px 10px;
  border: 1px solid #cbd1de;
  border-radius: 6px;
  font: inherit;
}
button.primary {
  background: #2c5cff;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}
button.primary:hover { background: #2347c7; }
.alert { padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.alert.error { background: #fde7e7; color: #8a1c1c; border: 1px solid #f4baba; }
.muted { color: #6b7185; font-size: 14px; }
.ok { color: #137333; font-weight: 600; }
.bad { color: #b3261e; font-weight: 600; }
.foot {
  text-align: center;
  padding: 16px;
  color: #8a90a3;
  font-size: 12px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filters input, .filters select {
  padding: 8px 10px;
  border: 1px solid #cbd1de;
  border-radius: 6px;
  font: inherit;
  min-width: 160px;
  background: #fff;
}
button.link {
  background: none; border: none; color: #2c5cff; cursor: pointer;
  font: inherit; padding: 0; text-decoration: none;
}
button.link:hover { text-decoration: underline; }
form.inline { display: inline; margin: 0; }
table.data {
  width: 100%;
  background: #fff;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
table.data th, table.data td {
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #eef0f6;
}
table.data thead th {
  background: #f6f7fb;
  font-weight: 600;
  color: #1a1f2c;
}
table.data tbody tr:hover { background: #fafbff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data a { color: #2c5cff; text-decoration: none; }
table.data a:hover { text-decoration: underline; }
