* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #f6f7f8;
}

header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 20px;
  background: #1a2a44;
  color: #fff;
  border-bottom: 3px solid #b31942;
}
header h1 { margin: 0; font-size: 20px; letter-spacing: 0.5px; }
.status { font-size: 12px; opacity: 0.75; }

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  padding: 16px;
  height: calc(100vh - 60px);
}

.filters {
  background: #fff;
  border: 1px solid #dcdfe3;
  border-radius: 6px;
  padding: 14px;
  overflow-y: auto;
}

.filters form { display: flex; flex-direction: column; gap: 10px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4a5060; }
.filters label span { font-weight: 600; }
.filters input, .filters select {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid #cfd3d9;
  border-radius: 4px;
  background: #fff;
}
.filters input:focus, .filters select:focus { outline: 2px solid #1a2a44; outline-offset: -2px; }
.filters .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.buttons { display: flex; gap: 8px; margin-top: 6px; }
.buttons button {
  flex: 1;
  padding: 8px;
  border: 1px solid #1a2a44;
  border-radius: 4px;
  background: #1a2a44;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.buttons button[type="reset"] { background: #fff; color: #1a2a44; }
.buttons button:hover { opacity: 0.9; }

main {
  background: #fff;
  border: 1px solid #dcdfe3;
  border-radius: 6px;
  padding: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #eaecef;
  margin-bottom: 8px;
}
.pager { display: flex; align-items: center; gap: 8px; }
.pager button {
  padding: 4px 10px;
  border: 1px solid #cfd3d9;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }

table {
  width: 100%;
  border-collapse: collapse;
  overflow-y: auto;
  display: block;
}
thead { background: #f6f7f8; position: sticky; top: 0; z-index: 1; }
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f2;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
th { font-weight: 600; color: #4a5060; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f0f4fa; }
td .title { font-weight: 600; color: #1a2a44; }
td .sub { font-size: 11px; color: #6a7080; margin-top: 2px; }

dialog {
  width: min(900px, 90vw);
  max-height: 85vh;
  padding: 0;
  border: 1px solid #dcdfe3;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
dialog::backdrop { background: rgba(0,0,0,0.4); }
.detail-inner { padding: 20px 24px 24px; overflow-y: auto; max-height: 85vh; }
.detail-inner .close {
  float: right;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6a7080;
}
.detail-inner h2 { margin: 0 0 4px; color: #1a2a44; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin: 12px 0; font-size: 13px; }
.detail-meta dt { font-weight: 600; color: #6a7080; }
.detail-meta dd { margin: 0; }
.detail-desc { margin-top: 16px; white-space: pre-wrap; line-height: 1.5; }
.detail-link {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 14px;
  background: #1a2a44;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}
