* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f5f6f8;
  color: #1f2430;
  margin: 0;
  padding: 24px 12px;
}
.container { max-width: 1100px; margin: 0 auto; }
.container.narrow { max-width: 380px; margin-top: 60px; }
.topbar { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
h1 { font-size: 1.5rem; margin: 0 0 8px; }
h2 { font-size: 1.1rem; margin-top: 32px; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.notice { background: #dcfce7; color: #166534; padding: 10px 14px; border-radius: 8px; }
.error, ul.error { background: #fee2e2; color: #991b1b; padding: 10px 14px; border-radius: 8px; list-style: none; margin: 0; }
.grid-form, .filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.filter-form { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }
label { display: flex; flex-direction: column; font-size: 0.85rem; color: #4b5563; gap: 4px; }
.full { grid-column: 1 / -1; }
input {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
}
button {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
button:hover { background: #1d4ed8; }
.button-link {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  color: #2563eb;
  align-self: end;
}
.summary { margin: 14px 0; color: #374151; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; margin-top: 8px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; font-size: 0.9rem; }
th { background: #f3f4f6; }
.link-danger { background: none; color: #dc2626; border: none; cursor: pointer; padding: 0; font-size: 0.85rem; }
.link-danger:hover { text-decoration: underline; }
