.history-screen {
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 65px -25px #000b;
}
.capture-head-actions { display: flex; align-items: center; gap: 8px; }
.history-head-button {
  border-color: #ffffff70;
  background: #ffffff12;
  color: #fff;
  padding: 8px 12px;
  border-radius: 99px;
}
.history-entry {
  width: 100%;
  margin-top: 10px;
  border-color: var(--gold);
  background: #fffaf0;
  color: var(--wine-800);
}
.history-body { padding: 22px; }
.history-area-coverage{margin-bottom:14px;padding:14px;border:1px solid #d8c9b2;border-radius:14px;background:#fffaf1}.history-area-coverage header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.history-area-coverage small{color:var(--muted);font-weight:800}.history-area-coverage h2{margin:2px 0 0;color:var(--wine-800);font-size:1.05rem}.history-area-coverage header span{font-size:.78rem;color:var(--muted)}.history-area-coverage>div{display:flex;flex-wrap:wrap;gap:8px}.history-area-coverage button{padding:8px 11px;border-radius:99px;font-weight:800}.history-area-coverage button.covered{border-color:#6f956d;background:#e7f1e5;color:#31542f}.history-area-coverage button.missing{border-color:#c2923d;background:#fff1d3;color:#6b4811}
.history-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.history-summary div {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-top: 4px solid var(--gold);
  border-radius: 11px;
  padding: 12px;
  text-align: center;
}
.history-summary span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.history-summary b { font-size: 1.55rem; color: var(--wine-800); }
.history-controls { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-top: 13px; }
.history-custom-period { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.history-message { color: var(--muted); text-align: center; }
.history-list { display: grid; gap: 11px; }
.history-card {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  padding: 14px;
}
.history-card.attended { border-left-color: #597d57; }
.history-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.history-card h2 { font-size: 1rem; color: var(--wine-800); margin: 0; overflow-wrap: anywhere; }
.history-card-status {
  border-radius: 99px;
  background: #f1e3be;
  color: #5d4315;
  padding: 4px 9px;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.history-card.attended .history-card-status { background: #dfeadd; color: #31542f; }
.history-card p { margin: 8px 0 0; line-height: 1.4; }
.history-card-meta { color: var(--muted); font-size: .82rem; }
.history-card-action { margin-top: 11px; padding: 9px 12px; background: var(--wine-800); color: #fff; border-color: var(--wine-800); }
.attended-source-banner { margin: 14px 22px 0; padding: 12px 14px; border: 1px solid var(--gold); border-left: 5px solid var(--gold); border-radius: 10px; background: #fffaf0; color: var(--wine-800); }
.history-empty { background: #fff; border: 1px dashed #cdbfa7; border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); }
.history-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.history-pagination span { color: var(--muted); font-weight: 700; }
.history-pagination button:disabled { cursor: default; opacity: .45; }
.historical-update-body { max-width: 820px; margin: 0 auto; }
.historical-notice { padding: 1rem; border: 1px solid #b9975b; border-radius: 14px; background: #fffaf0; color: #4b3036; }
.historical-card { padding: 1rem; border: 1px solid #d8c8cc; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(56,25,34,.08); }
.historical-card h2 { margin-top: 0; color: var(--wine-800); }
.historical-card dl { display: grid; grid-template-columns: minmax(110px,.35fr) 1fr; gap: .45rem .8rem; padding: .8rem; background: #fbf7f4; border-radius: 12px; }
.historical-card dt { font-weight: 700; color: #6c4e57; }
.historical-card dd { margin: 0; overflow-wrap: anywhere; }
.historical-card form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.historical-card form .wide { grid-column: 1 / -1; }
.historical-check { display: flex !important; align-items: center; gap: .6rem; }
.historical-check input { width: auto; }
.historical-export { display: grid; gap: .45rem; padding: 1rem 0; }
@media (max-width: 600px) {
  .history-screen { width: 100%; border-radius: 0; box-shadow: none; }
  .capture-head-actions { flex-direction: column; align-items: flex-end; }
  .history-head-button, .status { font-size: .75rem; padding: 7px 9px; }
  .history-body { padding: 15px; }
  .history-controls { grid-template-columns: 1fr; }
  .history-controls .wide { grid-column: auto; }
  .history-custom-period { grid-template-columns: 1fr; }
  .history-card-head { display: block; }
  .history-card-status { display: inline-block; margin-top: 8px; }
  .historical-card form { grid-template-columns: 1fr; }
  .historical-card form .wide { grid-column: auto; }
  .historical-card dl { grid-template-columns: 1fr; }
}
.historical-activation{max-width:560px;margin:20px auto;padding:22px;border:1px solid #d8c9b2;border-radius:18px;background:#fffaf1;box-shadow:0 10px 28px #3f101518}.historical-activation h2{margin:0 0 8px;color:#691526}.historical-activation p{margin:0 0 16px;padding:12px;border-left:4px solid #a9853e;background:#fff;font-weight:700}.historical-activation form{display:grid;gap:12px}.historical-activation input{text-transform:uppercase;letter-spacing:.12em;font-weight:800;text-align:center}
