:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background: #efefef;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #2874d0; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1180px, calc(100% - 24px)); margin: 0 auto; }

.site-header {
  background: #e6e6e6;
  border-bottom: 1px solid #d6d6d6;
  margin-bottom: 24px;
}
.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { font-size: clamp(30px, 5vw, 48px); font-weight: 700; color: #3d3d3d; }
.header-inner nav { display: flex; gap: 16px; align-items: center; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 30px;
}
.filters {
  background: white;
  padding: 12px;
  box-shadow: 0 3px 16px rgba(0,0,0,.10);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.filters input { flex: 1; min-width: 190px; }
input, select, textarea, button {
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 9px 10px;
  background: white;
}
button, .button {
  cursor: pointer;
  border: 0;
  background: #2874d0;
  color: white;
  border-radius: 5px;
  padding: 9px 13px;
}
.year-heading { margin: 24px 0 10px; color: #444; }
.card, .side-card, .form-card {
  background: white;
  box-shadow: 0 3px 16px rgba(0,0,0,.10);
}
.card {
  padding: 16px;
  margin-bottom: 14px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #666;
  font-size: 14px;
}
.card h3 { margin: 9px 0; font-size: 17px; font-weight: 600; }
.card p { margin-bottom: 0; color: #555; }
.tag {
  display: inline-block;
  padding: 3px 7px;
  background: #f1f4f8;
  border-radius: 999px;
  color: #555;
  font-size: 12px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  font-size: 14px;
}
.actions form { margin: 0; }
.link-danger {
  padding: 0;
  border: 0;
  background: none;
  color: #b33;
}
.side-card { padding: 15px; margin-bottom: 18px; }
.side-card h3 { margin-top: 0; }
.stat { font-size: 20px; font-weight: 600; margin: 8px 0; }
.archive-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.form-card { max-width: 700px; margin: 30px auto; padding: 22px; }
.form-card.narrow { max-width: 420px; }
.edit-form { display: grid; gap: 14px; }
.edit-form label { display: grid; gap: 6px; font-weight: 600; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.flash { padding: 10px 12px; margin-bottom: 14px; border-radius: 5px; }
.flash.ok { background: #e9f7ed; }
.flash.error { background: #fdecec; }
.empty { padding: 30px; background: white; text-align: center; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  aside { order: -1; }
  .header-inner { min-height: 76px; }
}
