body.bus-ride-open { overflow: hidden; }
.bus-ride-panel { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: auto; background: #fff; color: #1f2933; font-size: 15px; }
.bus-ride-panel .bus-header { position: sticky; top: 0; z-index: 3; min-width: 0; flex: 0 0 auto; background: #173f33; padding: 14px 20px; gap: 12px; flex-wrap: nowrap; }
body:not(.public-screen) .bus-ride-panel .bus-header { min-width: 0; }
.bus-header > div:first-child { min-width: 0; }
.bus-header h2 { font-size: 21px; margin: 0 0 4px; }
.bus-header p { overflow-wrap: anywhere; }
.bus-header .btn { background: #e7eeeb; color: #173f33; }
.bus-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bus-header .bus-actions { flex-shrink: 0; }
.bus-ride-panel .btn { min-height: 44px; padding: 10px 14px; }
.bus-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; flex: 0 0 44px; padding: 10px; border: 1px solid #cbd7d1; border-radius: 5px; background: #edf3f0; color: #174c38; font-size: 24px; font-weight: 700; }
.bus-icon svg { width: 21px; height: 21px; }
.bus-header .bus-icon { background: #ffffff14; color: #fff; border-color: #ffffff55; }
.bus-ride-panel button:hover:not(:disabled) { filter: brightness(.96); }
.bus-ride-panel :is(input, button):focus-visible { outline: 2px solid #2679ba; outline-offset: 2px; }
.bus-ride-panel button:disabled { opacity: .55; cursor: default; }
.bus-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 10px 20px; border-bottom: 1px solid #d9e2dc; background: #f4f7f5; }
.bus-toolbar > .bus-actions { margin-left: auto; }
.bus-status { padding: 8px 20px; background: #f0f7f3; color: #256342; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bus-status.pending { background: #fff5dc; color: #775313; }
.bus-status button { color: inherit; text-decoration: underline; padding: 5px; border-radius: 3px; background: transparent; }
.bus-content { padding: 18px 20px 24px; }
.bus-loading { margin: 40px auto; }
.bus-prices { max-width: 920px; margin: 0 auto; }
.bus-prices h3 { margin: 0 0 14px; font-size: 20px; }
.bus-prices table { width: 100%; table-layout: fixed; border: 1px solid #d9e2dc; border-collapse: collapse; }
.bus-prices th, .bus-prices td { padding: 10px 14px; overflow-wrap: anywhere; }
.bus-prices th:first-child { width: 58%; }
.bus-prices th:nth-child(2) { width: 14%; }
.bus-prices th:last-child { width: 28%; }
.bus-price-input { display: flex; gap: 8px; align-items: center; }
.bus-price-input input { width: 120px; max-width: calc(100% - 22px); min-width: 0; min-height: 44px; margin: 0; }
.bus-prices > .bus-actions { margin-top: 16px; }
.bus-table-scroll { width: 100%; overflow-x: auto; border: 1px solid #c9d6ce; }
.bus-table { width: 100%; min-width: 740px; table-layout: fixed; border-collapse: collapse; margin: 0; }
.bus-col-name { width: 26%; }
.bus-col-member { width: 15%; }
.bus-col-price { width: 12%; }
.bus-col-paid { width: 10%; }
.bus-col-tips { width: 37%; }
.bus-table th, .bus-table td { padding: 10px 12px; border-bottom: 1px solid #d9e2dc; vertical-align: middle; overflow-wrap: anywhere; }
.bus-table thead th { background: #eaf0ed; font-size: 13px; }
.bus-table .bus-boarding th { background: #dae8df; border-top: 1px solid #b9cabe; color: #184832; text-align: left; box-shadow: inset 4px 0 0 #23724e; }
.bus-boarding th span { float: right; font-weight: 400; font-size: 13px; }
.bus-person small { display: block; margin-top: 5px; color: #637266; font-size: 12px; line-height: 1.35; }
.bus-member-statuses { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.bus-person-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.bus-person-name strong { min-width: 0; overflow-wrap: anywhere; }
.bus-person-name .bus-icon { width: 32px; height: 32px; min-height: 32px; flex-basis: 32px; padding: 6px; }
.bus-person-name .bus-icon svg { width: 18px; height: 18px; }
.bus-member-status { display: inline-flex; max-width: 100%; padding: 1px 5px; border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 700; overflow-wrap: anywhere; }
.bus-member-status.child, .bus-member-status.committee { background: #e7f1fc; color: #1c609b; }
.bus-member-status.youth, .bus-member-status.free { background: #e4f3e9; color: #226b40; }
.bus-member-status.senior { background: #fde9e9; color: #a13030; }
.bus-member-status.disability { background: #fff0dc; color: #94530a; }
.bus-member-status.unknown { background: #eef1f4; color: #566472; }
.bus-person.bus-paid > td:first-child { box-shadow: inset 3px 0 0 #5a9677; }
.bus-money { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; font-weight: 700; }
.bus-price-total { display: block; line-height: 20px; }
.bus-ride-panel .bus-combi { display: flex; align-items: center; justify-content: center; width: 64px; max-width: 100%; min-height: 32px; margin-top: 2px; padding: 5px 6px; border: 1px solid #b9cabe; border-radius: 4px; background: #edf3f0; color: #174c38; font-size: 13px; font-weight: 700; line-height: 20px; cursor: pointer; }
.bus-free { color: #256342; }
.bus-paid-check { margin: 0; min-height: 44px; width: 44px; display: grid; place-items: center; cursor: pointer; }
.bus-paid-check input { appearance: auto; width: 28px; height: 28px; min-height: 0; margin: 0; padding: 0; accent-color: #18704d; cursor: pointer; }
.bus-tip-line { display: flex; align-items: center; gap: 8px; height: 54px; min-width: 0; }
.bus-tips { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; height: 54px; padding: 2px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #aabdb1 transparent; }
.bus-tips::-webkit-scrollbar { height: 6px; }
.bus-tips::-webkit-scrollbar-thumb { background: #aabdb1; border-radius: 3px; }
.bus-tips:focus-visible { outline: 2px solid #2679ba; outline-offset: 1px; }
.bus-tips:empty { display: none; }
.bus-tip { display: inline-flex; flex: 0 0 auto; background: #edf2f7; border: 1px solid #cbd6df; border-radius: 5px; align-items: stretch; white-space: nowrap; }
.bus-tip button { min-height: 40px; padding: 7px 9px; color: #24405a; background: transparent; font-weight: 700; }
.bus-tip button:last-child { border-left: 1px solid #cbd6df; font-size: 19px; padding: 5px 9px; }
.bus-tip.winner { background: #dff2e5; border-color: #4a9462; }
.bus-tip.winner button { color: #196039; }
.bus-tip-stake { display: inline-block; margin-left: 6px; color: #576b7a; font-size: 11px; font-weight: 400; vertical-align: middle; }
.bus-tip-stake.against { color: #a13030; font-weight: 700; }
.bus-current-stake .bus-tip-stake { font-size: 16px; }
.bus-tip-form { flex: 0 0 auto; margin: 0; }
.bus-tip-form .bus-score { flex-wrap: nowrap; }
.bus-score { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bus-score input { width: 48px; height: 44px; min-height: 44px; padding: 5px; margin: 0; text-align: center; border: 1px solid #bdcbd8; border-radius: 5px; background: #fff; font-size: 18px; font-variant-numeric: tabular-nums; }
.bus-score .editing { background: #dcecf8; color: #195685; }
.bus-result { border-bottom: 1px solid #cbd7cf; margin-bottom: 18px; padding: 0 0 18px; }
.bus-result h3 { margin: 0 0 12px; }
.bus-score-labels { display: flex; gap: 18px; margin: 0 0 4px; font-size: 12px; color: #596c61; }
.bus-score-labels span { width: 48px; text-align: center; }
.bus-result-count { margin: 14px 0 8px; font-weight: 700; }
.bus-winners { padding: 0; margin: 0; list-style: none; max-width: 600px; }
.bus-winners li { display: flex; align-items: baseline; gap: 14px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #dce9df; }
.bus-winners li span { flex-shrink: 0; color: #286743; }
.bus-winners li strong { min-width: 0; overflow-wrap: anywhere; }
.bus-footer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 24px; margin-top: 20px; padding: 16px 0 0; border-top: 2px solid #9fb6a8; font-size: 14px; }
.bus-footer .bus-total { font-size: 16px; }
.bus-conflict { margin: 12px 20px 0; padding: 12px 0; border-block: 1px solid #dbbd85; color: #714b12; }
.bus-conflict .bus-actions { margin-top: 10px; }
.bus-popup { position: fixed; inset: 0; z-index: 100; display: grid; align-items: start; justify-items: center; overflow: auto; padding: 24px 16px; background: #10271db3; color: #1f2933; }
.bus-popup-card { width: min(620px, 100%); min-width: 0; max-height: calc(100dvh - 48px); overflow: auto; padding: 22px; background: #fff; border: 1px solid #cbd7d1; border-radius: 8px; box-shadow: 0 12px 40px #0003; }
.bus-popup-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.bus-popup-heading > div { min-width: 0; }
.bus-popup-heading h2 { margin: 0 0 6px; font-size: 22px; }
.bus-popup-heading p { margin: 0; overflow-wrap: anywhere; }
.bus-popup .bus-score input { width: 72px; height: 56px; min-height: 56px; font-size: 26px; }
.bus-popup .bus-score-labels { gap: 22px; }
.bus-popup .bus-score-labels span { width: 72px; }
.bus-popup .bus-score .bus-icon { width: 56px; height: 56px; flex-basis: 56px; }
.bus-popup .btn { min-height: 48px; padding: 10px 18px; }
.bus-popup button:disabled { opacity: .55; cursor: default; }
.bus-popup :is(input,button):focus-visible { outline: 2px solid #2679ba; outline-offset: 2px; }
.bus-popup-error { color: #a12e2e; margin: 12px 0; overflow-wrap: anywhere; }
.bus-popup-error:empty { display: none; }
.bus-person-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bus-person-fields label { min-width: 0; }
.bus-person-fields input, .bus-person-fields select { min-width: 0; margin: 0; }
.bus-passenger-flags { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; }
.bus-passenger-flag { display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.bus-passenger-flag input { appearance: auto; width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; accent-color: #18704d; }
.bus-eval-status { font-size: 13px; color: #637266; margin: 12px 0 0; }
.bus-eval-status:empty { display: none; }
.bus-draft-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; margin-top: 18px; border-top: 1px solid #d9e2dc; font-size: 14px; }
.bus-tip-drafts { display: flex; flex-wrap: wrap; gap: 8px; max-height: 28dvh; overflow: auto; margin-top: 12px; padding: 2px; }
.bus-tip-drafts .bus-tip button { min-height: 44px; }
.bus-popup-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.bus-result-summary { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #d9e2dc; }
.bus-result-summary .bus-result-count { margin: 0; }
.bus-result-remainder { color: #637266; font-size: 13px; }
.bus-result-popup .bus-winners { margin-top: 12px; }
.bus-popup-card.bus-payment-popup { display: flex; flex-direction: column; width: min(720px, 100%); height: min(780px, calc(100dvh - 48px)); padding: 0; overflow: hidden; }
.bus-payment-popup .bus-popup-heading { flex-shrink: 0; align-items: center; margin: 0; padding: 14px 20px; border-bottom: 1px solid #d9e2dc; }
.bus-payment-popup .bus-popup-heading h2 { margin: 0; }
.bus-payment-popup form { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.bus-payment-top { flex: 0 0 auto; min-height: 0; overflow: auto; padding: 10px 20px; }
.bus-payer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.bus-payer-bar[hidden] { display: none; }
.bus-payer-bar > div { min-width: 0; }
.bus-payer-bar span { display: block; margin-bottom: 3px; font-size: 12px; color: #637266; }
.bus-payer-bar strong { display: block; overflow-wrap: anywhere; font-size: 16px; }
.bus-payer-bar .btn { flex-shrink: 0; }
.bus-payment-popup select, .bus-payment-popup input[type="search"] { width: 100%; min-width: 0; min-height: 48px; margin: 5px 0 4px; }
.bus-payment-search, .bus-payer-editor label { display: block; }
.bus-payer-editor { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; gap: 10px; margin-bottom: 4px; }
.bus-payer-editor[hidden] { display: none; }
.bus-payment-open-only { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 0; font-size: 13px; color: #43594b; cursor: pointer; }
.bus-payment-open-only input { appearance: auto; width: 19px; height: 19px; min-height: 0; padding: 0; margin: 0; accent-color: #18704d; }
.bus-payment-rows { flex: 1 1 0; min-height: 48px; overflow: auto; overscroll-behavior: contain; border-block: 1px solid #d9e2dc; }
.bus-payment-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 68px; padding: 12px 20px; margin: 0; border-bottom: 1px solid #e4ebe6; color: #243d30; cursor: pointer; }
.bus-payment-row[hidden] { display: none; }
.bus-payment-row.selected { background: #eaf5ee; box-shadow: inset 4px 0 0 #18704d; }
.bus-payment-row:hover { background: #f0f6f2; }
.bus-payment-row:has(input:disabled) { color: #637266; cursor: default; }
.bus-payment-row input { appearance: auto; width: 26px; height: 26px; min-height: 0; margin: 0; padding: 0; accent-color: #18704d; }
.bus-payment-row strong, .bus-payment-row small { display: block; overflow-wrap: anywhere; }
.bus-payment-row strong { font-size: 15px; line-height: 1.35; }
.bus-payment-row small { font-size: 12px; line-height: 1.5; color: #637266; margin-top: 4px; }
.bus-payment-row b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bus-payment-empty { margin: 0; padding: 32px 20px; color: #637266; text-align: center; }
.bus-payment-footer { flex: 0 0 auto; padding: 12px 20px 16px; background: #f5f8f6; border-top: 1px solid #b9cabe; }
.bus-payment-footer .bus-popup-error { max-height: 64px; overflow: auto; margin: 0 0 10px; }
.bus-payment-footer .bus-popup-error:empty { margin: 0; }
.bus-payment-chosen { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; margin-bottom: 6px; }
.bus-payment-chosen[hidden] { display: none; }
.bus-payment-chosen button { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 36px; padding: 5px 9px; border: 1px solid #c0d3c7; border-radius: 4px; background: #fff; color: #285039; font-size: 12px; white-space: nowrap; }
.bus-payment-chosen button span { font-size: 19px; }
.bus-payment-paybar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; }
.bus-payment-total { min-width: 0; }
.bus-payment-total strong { display: block; font-size: 24px; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bus-payment-total small { display: block; margin-bottom: 3px; font-size: 13px; color: #637266; }
.bus-payment-paybar .btn { min-width: 150px; min-height: 54px; font-size: 17px; }
.bus-payment-footer [data-bus-payment-reset] { margin-bottom: 12px; }
.bus-driver-slot { display: grid; grid-template-columns: 150px 150px minmax(0,1fr); align-items: center; gap: 16px; margin-top: 20px; padding: 14px 0; border-block: 1px solid #b9cabe; }
.bus-driver-slot h3 { margin: 0; font-size: 16px; }
.bus-driver-price > span { display: block; font-size: 12px; color: #637266; margin-bottom: 4px; }
.bus-driver-amount { padding: 8px 10px; min-height: 44px; background: #f0f4f2; color: #243d30; border: 1px solid #b9cabe; border-radius: 4px; font-size: 17px; font-weight: 700; }
.bus-driver-amount.paid { color: #23704d; }
.bus-credit { color: #8b5210 !important; }
@media (max-height: 500px) {
  .bus-payment-popup .bus-popup-heading { padding-block: 8px; }
  .bus-payment-top { padding-block: 8px; }
  .bus-payer-bar { margin-bottom: 4px; }
  .bus-payment-popup input[type="search"] { min-height: 42px; }
  .bus-payment-open-only { min-height: 24px; }
  .bus-payment-footer { padding-block: 8px; }
}
@media (max-height: 420px) {
  .bus-payment-top { max-height: calc(100dvh - 250px); }
}
@media (max-width: 600px) {
  .bus-person-fields { grid-template-columns: minmax(0, 1fr); }
  .bus-popup-card.bus-payment-popup { height: calc(100dvh - 20px); }
  .bus-payment-popup .bus-popup-heading, .bus-payment-top, .bus-payment-row, .bus-payment-footer { padding-inline: 14px; }
  .bus-payment-paybar .btn { min-width: 120px; }
  .bus-driver-slot { grid-template-columns: minmax(0,1fr) 120px; gap: 10px; }
  .bus-driver-slot > .bus-tip-line { grid-column: 1 / -1; }
  .bus-popup { padding: 10px; }
  .bus-popup-card { padding: 16px; max-height: calc(100dvh - 20px); }
  .bus-ride-panel .bus-header { padding: 10px 12px; align-items: flex-start; }
  .bus-header .bus-actions { gap: 4px; }
  .bus-header .bus-icon { width: 38px; flex-basis: 38px; padding: 8px; }
  .bus-header .btn { padding: 8px; }
  .bus-toolbar, .bus-status { padding-inline: 12px; }
  .bus-toolbar > .bus-actions { margin-left: 0; }
  .bus-content { padding: 12px; }
  .bus-prices th, .bus-prices td { padding: 9px 6px; font-size: 13px; }
  .bus-prices th:first-child { width: 50%; }
  .bus-prices th:nth-child(2) { width: 16%; }
  .bus-prices th:last-child { width: 34%; }
}
