#optibus-history { color: #1b3445; }
#optibus-history .oh-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
#optibus-history .oh-heading h1 { margin: 8px 0 10px; }
#optibus-history .oh-heading p { max-width: 770px; margin: 0; color: #687e90; line-height: 1.5; }
#optibus-history .oh-zone { flex-shrink: 0; padding: 10px 14px; border-radius: 12px; background: #eaf1f8; color: #45617b; font-size: 13px; font-weight: 700; }
#optibus-history .oh-controls { display: grid; grid-template-columns: minmax(230px, 1.3fr) minmax(230px, 1.3fr) minmax(150px, .8fr) minmax(150px, .8fr); gap: 16px; padding: 24px; border: 1px solid #dce6ef; border-radius: 18px; background: #fff; box-shadow: 0 5px 22px #183c5910; }
#optibus-history .oh-controls label { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #536b82; font-size: 13px; font-weight: 700; }
#optibus-history .oh-controls input { box-sizing: border-box; width: 100%; min-width: 0; height: 46px; margin: 0; padding: 10px 12px; border: 1px solid #cbd8e5; border-radius: 9px; background: #fff; color: #183448; font-size: 15px; font-family: inherit; }
#optibus-history .oh-controls input:focus-visible { outline: 3px solid #317abc30; outline-offset: 1px; border-color: #5181ae; }
#optibus-history .oh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; grid-column: 1 / -1; }
#optibus-history .oh-actions button { min-height: 44px; margin: 0; padding: 10px 17px; border: 1px solid #0c2c54; border-radius: 9px; background: #0c2c54; color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
#optibus-history .oh-actions .oh-secondary { border-color: #cfdae5; background: #f0f5fa; color: #193e61; }
#optibus-history .oh-actions button:disabled { opacity: .5; cursor: default; }
#optibus-history .oh-actions button:focus-visible, #optibus-history summary:focus-visible, #optibus-history .oh-table-wrap:focus-visible { outline: 3px solid #478ac766; outline-offset: 3px; }
#optibus-history .oh-filter-help { grid-column: 1 / -1; margin: 0; color: #788b9b; font-size: 12px; line-height: 1.5; }
#optibus-history .oh-source-note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 8px; padding: 13px 16px; border-radius: 11px; background: #eaf1f8; color: #556d83; }
#optibus-history .oh-source-note > span { flex-shrink: 0; font-size: 19px; }
#optibus-history .oh-source-note p { margin: 1px 0 0; font-size: 13px; line-height: 1.55; }
#optibus-history .oh-state { margin: 12px 0 20px; min-height: 20px; color: #687f8e; font-size: 14px; line-height: 1.5; }
#optibus-history .oh-state-error { color: #aa343b; }
#optibus-history .oh-state-success { color: #15705b; }
#optibus-history .oh-state-loading { color: #245b86; }
#optibus-history .oh-warnings { margin: 0 0 18px; padding: 14px 17px; border: 1px solid #edce82; border-radius: 11px; background: #fff7df; color: #76551a; font-size: 13px; line-height: 1.5; }
#optibus-history .oh-warnings strong { font-size: 13px; }
#optibus-history .oh-warnings ul { margin: 7px 0 0; padding-left: 20px; }
#optibus-history .oh-warnings li { padding: 2px 0; overflow-wrap: anywhere; }
#optibus-history .oh-summary { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 22px 24px; margin-bottom: 26px; border: 1px solid #dce6ef; border-radius: 15px; background: #fff; }
#optibus-history .oh-metrics { display: flex; gap: 32px; }
#optibus-history .oh-metrics > span { display: flex; flex-direction: column; gap: 4px; }
#optibus-history .oh-metrics small { color: #728593; font-size: 12px; }
#optibus-history .oh-metrics b { color: #0c2c54; font-size: 28px; line-height: 1.15; }
#optibus-history .oh-result-context { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: right; line-height: 1.4; }
#optibus-history .oh-result-context strong { font-size: 15px; overflow-wrap: anywhere; }
#optibus-history .oh-result-context span { color: #637c8d; font-size: 13px; }
#optibus-history .oh-result-context small { color: #81919e; font-size: 12px; }
#optibus-history .oh-results[aria-busy="true"] { opacity: .6; }
#optibus-history .oh-empty { padding: 28px; border: 1px dashed #c8d7e4; border-radius: 14px; background: #f7fafc; text-align: center; }
#optibus-history .oh-empty p { margin-bottom: 0; color: #748997; font-size: 14px; line-height: 1.5; }
#optibus-history .oh-day { margin-bottom: 28px; }
#optibus-history .oh-day-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 0 2px 12px; }
#optibus-history .oh-day-heading h2 { margin: 0; color: #0d2e56; font-size: 23px; }
#optibus-history .oh-day-heading > span { color: #798c9c; font-size: 13px; }
#optibus-history .oh-bus { overflow: hidden; margin: 10px 0; border: 1px solid #dbe5ee; border-radius: 13px; background: #fff; }
#optibus-history .oh-bus > summary { display: flex; list-style: none; align-items: center; gap: 24px; padding: 15px 20px; cursor: pointer; }
#optibus-history .oh-bus > summary::-webkit-details-marker { display: none; }
#optibus-history .oh-bus-identity { display: flex; flex-shrink: 0; flex-direction: column; gap: 3px; width: 105px; }
#optibus-history .oh-bus-identity small { color: #7990a0; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
#optibus-history .oh-bus-identity b { color: #0c2c54; font-size: 24px; }
#optibus-history .oh-bus-context { display: flex; flex: 1; min-width: 0; align-items: center; flex-wrap: wrap; gap: 9px 18px; font-size: 13px; }
#optibus-history .oh-bus-context > span { color: #5f788b; font-variant-numeric: tabular-nums; }
#optibus-history .oh-bus-context small { color: #788d9d; overflow-wrap: anywhere; font-size: 12px; }
#optibus-history .oh-bus > summary > i { margin-left: auto; color: #6b8191; font-style: normal; font-size: 21px; }
#optibus-history .oh-bus[open] > summary { background: #f2f6fa; border-bottom: 1px solid #dbe5ee; }
#optibus-history .oh-bus[open] > summary > i { transform: rotate(180deg); }
#optibus-history .oh-table-wrap { overflow-x: auto; }
#optibus-history .oh-table { border-collapse: collapse; width: 100%; table-layout: fixed; color: #29475a; font-size: 13px; }
#optibus-history .oh-table th { padding: 11px 18px; background: #f7f9fc; color: #637b90; font-weight: 700; font-size: 11px; text-align: left; white-space: nowrap; }
#optibus-history .oh-table th:nth-child(1) { width: 82px; }
#optibus-history .oh-table th:nth-child(3), #optibus-history .oh-table th:nth-child(4) { width: 140px; }
#optibus-history .oh-table th:nth-child(5) { width: 115px; }
#optibus-history .oh-table td { padding: 10px 18px; border-top: 1px solid #e1e9f0; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
#optibus-history .oh-table tbody tr:nth-child(even) { background: #f8fafc; }
#optibus-history .oh-table code { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #496679; font-size: 12px; }
#optibus-history .oh-route { display: inline-block; min-width: 27px; padding: 4px 7px; background: #e7eff7; border-radius: 6px; color: #163e63; text-align: center; font-weight: 700; }
#optibus-history .oh-table td.oh-time { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
#optibus-history .oh-time small { display: block; margin-top: 3px; color: #8395a1; font-size: 10px; font-weight: 400; }
@media (max-width: 1050px) {
  #optibus-history .oh-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #optibus-history .oh-heading { flex-direction: column; gap: 13px; }
  #optibus-history .oh-table th:nth-child(3), #optibus-history .oh-table th:nth-child(4) { width: 115px; }
  #optibus-history .oh-table th:nth-child(5) { width: 75px; }
  #optibus-history .oh-table th, #optibus-history .oh-table td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 650px) {
  #optibus-history .oh-controls { padding: 17px; gap: 13px; }
  #optibus-history .oh-controls input { height: 44px; padding: 8px; font-size: 14px; }
  #optibus-history .oh-controls label:nth-child(1), #optibus-history .oh-controls label:nth-child(2) { grid-column: 1 / -1; }
  #optibus-history .oh-actions button:first-child { width: 100%; }
  #optibus-history .oh-summary { align-items: flex-start; flex-direction: column; gap: 18px; padding: 18px; }
  #optibus-history .oh-result-context { text-align: left; }
  #optibus-history .oh-bus > summary { gap: 12px; padding: 13px 15px; }
  #optibus-history .oh-bus-identity { width: 82px; }
  #optibus-history .oh-bus-context { gap: 5px 12px; }
  #optibus-history .oh-bus-context small { flex-basis: 100%; }
  #optibus-history .oh-table-wrap { overflow: visible; }
  #optibus-history .oh-table { table-layout: auto; }
  #optibus-history .oh-table thead { display: none; }
  #optibus-history .oh-table tbody { display: block; }
  #optibus-history .oh-table tr { display: grid; grid-template-columns: 65px 1fr 1fr; gap: 9px 12px; padding: 12px 15px; border-top: 1px solid #dfe8ef; }
  #optibus-history .oh-table tr:first-child { border-top: 0; }
  #optibus-history .oh-table td { display: block; min-width: 0; padding: 0; border: 0; }
  #optibus-history .oh-table td::before { display: block; content: attr(data-label); margin-bottom: 4px; color: #8193a1; font-size: 10px; font-weight: 400; }
  #optibus-history .oh-table td:nth-child(2) { grid-column: 2 / -1; }
  #optibus-history .oh-table td:nth-child(3) { grid-column: 2; grid-row: 2; }
  #optibus-history .oh-table td:nth-child(4) { grid-column: 3; grid-row: 2; }
  #optibus-history .oh-table td:nth-child(5) { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; }
  #optibus-history .oh-table code { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
}
