.history-page { font-size: 14px; line-height: 1.5; }
.history-page main { max-width: 1112px; margin-inline: auto; padding: 35px 0 60px; }
.history-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.history-page .history-heading h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.9px; margin: 0 0 3px; max-width: none; }
.history-heading p { color: var(--home-muted); margin: 0; font-size: 15px; }
.history-notice { color: var(--home-ink); background: #EAF1FB; border-radius: 6px; padding: 9px 12px; }
.history-new { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--home-navy); border-radius: 6px; color: #F7F5F0; background: var(--home-navy); font-weight: 600; white-space: nowrap; }
.history-new:hover { background: #20314B; }
.history-new .dashboard-icon { width: 16px; height: 16px; }
.history-search { display: flex; gap: 12px; margin: 24px 0 14px; align-items: center; }
.history-searchbox { flex: 1; min-width: 0; position: relative; }
.history-searchbox svg { position: absolute; left: 12px; top: 11px; color: var(--home-muted); pointer-events: none; }
.history-search input[type=search] { display: block; width: 100%; min-width: 0; font: inherit; border: 1px solid #D8DCE3; border-radius: 6px; padding: 9px 12px 9px 38px; background: white; color: var(--home-ink); }
.history-search-submit { font: inherit; border: 1px solid #D8DCE3; border-radius: 6px; color: var(--home-ink); background: #EAF1FB; padding: 8px 13px; cursor: pointer; }
.history-list { background: #FFF; border: 1px solid #D8DCE3; border-radius: 7px; overflow: hidden; }
.history-tabs { display: flex; align-items: center; gap: 6px; background: #FFF; border-bottom: 1px solid #D8DCE3; padding: 11px 18px; flex-wrap: wrap; }
.history-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; color: var(--home-muted); background: transparent; border: 1px solid transparent; border-radius: 6px; }
.history-tabs a[aria-current] { background: #EAF1FB; border-color: #D8DCE3; color: var(--home-ink); font-weight: 600; box-shadow: 0 1px 2px #20242B10; }
.history-counter { display: inline-block; padding: 0 7px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #E2E6EC; color: var(--home-muted); }
.history-item { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 20px; }
.history-item + .history-item { border-top: 1px solid #D8DCE3; }
.history-item:hover { background: #F8F9FB; }
.history-state { display: grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; color: #216447; font: bold 10px/1 Arial, sans-serif; align-self: start; margin-top: 5px; }
.history-state.active { color: var(--home-blue); }
.history-details { min-width: 0; }
.history-details form, .history-actions form { margin: 0; }
.history-details h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.history-page .history-role { display: block; text-align: left; border: 0; padding: 0; background: none; color: var(--home-ink); font: inherit; font-weight: 600; overflow-wrap: anywhere; }
.history-role:hover { color: var(--home-blue); text-decoration: underline; }
.history-meta { font-size: 12px; color: var(--home-muted); margin: 4px 0 0; }
.history-actions { display: flex; align-items: center; gap: 20px; }
.history-score { font: 12px/1.5 ui-monospace, monospace; color: var(--home-muted); white-space: nowrap; background: #EAF1FB; border: 1px solid #D8DCE3; border-radius: 12px; padding: 2px 7px; }
.history-score-state { font-family: inherit; white-space: normal; max-width: 150px; border: 0; padding: 0; background: none; }
.history-page .history-feedback { color: var(--home-blue); border: 0; background: none; padding: 4px 0; white-space: nowrap; font-size: 14px; }
.history-feedback:hover { text-decoration: underline; }
.history-page .history-delete { color: #A13C38; border: 0; background: none; padding: 4px 0; font: inherit; }
.history-delete:hover { text-decoration: underline; }
.history-confirmation { max-width: 560px; padding: clamp(16px, 4vw, 24px); }
.history-confirmation p { margin: 12px 0 0; color: var(--home-muted); overflow-wrap: anywhere; }
.history-confirmation-target strong { color: var(--home-ink); }
.history-confirmation-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.history-confirmation-actions .dashboard-button { width: auto; white-space: normal; }
.history-confirmation-actions form { margin: 0; max-width: 100%; }
.history-confirmation-actions .history-delete-confirm { color: #A13C38; border-color: currentColor; }
.history-confirmation-actions .history-delete-confirm:hover { background: #FAECEA; }
.history-empty { text-align: center; padding: 35px 20px; color: var(--home-muted); }
.history-empty h2 { font-size: 18px; color: var(--home-ink); margin: 0 0 8px; }
.history-empty p { margin: 0 0 8px; }
.history-empty a { color: var(--home-blue); text-decoration: underline; }
.history-count { margin: 14px 0 0; color: var(--home-muted); font-size: 12px; }
.history-page :is(input, button):focus-visible { outline: 3px solid #6E9BFF; outline-offset: 3px; }
.history-search-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dashboard-section-head > a { color: #2458DA; font-size: 14px; font-weight: 600; }
@media (max-width: 740px) {
  .history-page main { padding-top: 22px; }
  .history-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .history-tabs { padding: 8px; gap: 0; }
  .history-tabs a { padding: 4px 5px; gap: 3px; font-size: 12px; }
  .history-counter { padding-inline: 5px; font-size: 11px; }
  .history-item { grid-template-columns: 17px minmax(0, 1fr); padding: 13px; gap: 6px 12px; }
  .history-actions { grid-column: 2; flex-wrap: wrap; gap: 10px; }
  .history-score-state { max-width: none; }
}
