:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --line: #dddddd;
  --line-strong: #111111;
}

* { box-sizing: border-box; }

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

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

.brand {
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
}

.admin-link {
  color: var(--fg);
  text-decoration: none;
  margin-left: 16px;
  opacity: 0.7;
  border-bottom: 1px solid transparent;
}
.admin-link:hover { opacity: 1; border-bottom-color: var(--fg); }

.search-form input,
.filter-form input,
.filter-form select {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  padding: 7px 10px;
  font-family: inherit;
}

.search-form button,
.filter-form button,
button,
.button {
  background: var(--fg);
  border: 1px solid var(--fg);
  color: var(--bg);
  padding: 7px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.search-form button:hover,
.filter-form button:hover,
button:hover,
.button:hover {
  background: var(--bg);
  color: var(--fg);
}

main { padding: 32px 24px; max-width: 900px; margin: 0 auto; }

h1, h2 {
  color: var(--fg);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 8px;
  font-weight: 700;
}

.grid { display: flex; gap: 16px; margin: 16px 0; }
.card {
  border: 1px solid var(--line-strong);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
}
.card .label { font-size: 0.8em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.card .value { font-size: 1.7em; font-weight: 700; }

table { width: 100%; border-collapse: collapse; margin-top: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
th { color: var(--fg); border-bottom: 2px solid var(--line-strong); font-weight: 700; }
tr:hover td { background: #f5f5f5; }

a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }

.filter-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }

.error { color: #b00020; }
.meta { color: var(--muted); }
.pager { margin-top: 14px; display: flex; gap: 16px; }
footer { text-align: center; padding: 24px; color: var(--muted); font-size: 0.8em; border-top: 1px solid var(--line); }

.login-box {
  max-width: 320px;
  margin: 15vh auto 0;
  text-align: center;
}
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.login-box input { text-align: center; }
