:root {
    --q-color-primary: var(--brand-color);
    --q-color-accent: #2A6ED9;
    --text-color: rgba(0, 0, 0, .87);
    --muted-color: #667b9a;
    --line-color: #e2e8f2;
}

body.body--light { min-height: 100vh; background: var(--bg-brand-color); color: var(--text-color); }
.site-header .q-toolbar { gap: 16px; min-height: 64px; padding: 0 24px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; width: 150px; height: 35.5px; object-fit: contain; }
.search { width: 330px; margin-left: auto; }
.search-field, .page-search-field { width: 100%; }
.search-field .q-field__control { height: 40px; min-height: 40px; padding: 0 4px 0 14px; border-radius: 8px; background: rgba(255, 255, 255, .14); color: white; }
.search-field .q-field__control::before, .search-field .q-field__control::after { display: none; }
.search-field .q-field__native { color: white; font-size: 15px; }
.search-field .q-field__native::placeholder { color: rgba(255, 255, 255, .72); opacity: 1; }
.search-button { color: white; }
.search-button .material-icons { font-size: 22px; }
.language-form { position: relative; align-self: stretch; margin: 0; }
.language-toggle { height: 100%; color: white; font-size: 15px; font-weight: 700; }
.language-list { position: absolute; z-index: 1000; top: 100%; right: 0; min-width: 90px; margin: 0; padding: 8px 0; list-style: none; color: var(--text-color); }
.language-list[hidden] { display: none; }
.language-option { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.language-option:hover { background: rgba(0, 0, 0, .04); }

.page { max-width: 1136px; margin: 32px auto; padding: 0 16px; }
.card { padding: 28px 32px; margin-bottom: 20px; border-radius: 10px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
.summary-top, .section-heading { display: flex; justify-content: space-between; gap: 16px; }
.eyebrow, .section-heading > span, .event time, .event-meta, .details dt { color: var(--muted-color); }
.eyebrow { font-size: 14px; }
.eyebrow-label { text-transform: uppercase; letter-spacing: .02em; }
.eyebrow strong { color: var(--text-color); font-weight: 700; }
.separator { padding: 0 6px; }
.summary h1 { margin: 6px 0 4px; color: var(--brand-color); font-size: 36px; font-weight: 700; line-height: 1.2; }
.summary h1.delivered { color: var(--q-color-positive, #21BA45); }
.latest { margin: 0; font-size: 17px; color: var(--text-color); }
.other-shipments { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 8px 12px; border: 1px solid #bce8f1; border-radius: 4px; background: #d9edf7; color: #31708f; font-size: 14px; line-height: 20px; }
.other-shipments .material-icons { flex: 0 0 auto; font-size: 19px; line-height: 20px; color: var(--q-color-primary); }

.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.action-button { border: 1px solid transparent; border-radius: 6px; font-size: 15px; font-weight: 600; letter-spacing: normal; }
.action-button .q-btn__wrapper { min-height: 42px; padding: 0 20px; }
.button-pod { background: var(--q-color-accent); color: white; }
.button-pod:hover { color: white; }
.map-toggle { background: white; color: var(--text-color); border: 1px solid #d5dbe5; }
.map-toggle[aria-pressed="true"] { border-color: var(--q-color-accent); color: var(--q-color-accent); }
.pod-menu { position: relative; }
.pod-list { position: absolute; z-index: 1000; top: 100%; right: 0; min-width: 280px; max-width: min(420px, 90vw); margin: 4px 0 0; padding: 8px 0; list-style: none; }
.pod-list[hidden] { display: none; }
.pod-list a { color: var(--brand-color); overflow-wrap: anywhere; }
.pod-list a:hover { background: rgba(0, 0, 0, .04); }

.tracking-map { height: 300px; margin-top: 24px; border-radius: 8px; overflow: hidden; }
.tracking-map[hidden] { display: none; }
.tracking-map .custom-tooltip-container { background: rgba(200, 50, 50, .7); color: white; font-size: 12px; font-weight: 600; border: 0; border-radius: 4px; padding: 6px 10px; box-shadow: none; min-width: 190px; max-width: 240px; white-space: normal; }
.tracking-map .leaflet-tooltip-right.custom-tooltip-container::before { border-right-color: rgba(200, 50, 50, .7); }
.tracking-map .custom-tooltip { display: grid; gap: 8px; }
.tracking-map .custom-tooltip span { font-weight: 400; }

.progress { list-style: none; display: flex; justify-content: space-between; margin: 32px 0 0; padding: 0; text-align: center; }
.progress li { position: relative; z-index: 0; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.progress li + li::before { content: ""; position: absolute; top: 13px; right: calc(50% + 14px); width: calc(100% - 28px); height: 3px; border-radius: 2px; background: #dce4f2; }
.progress li.complete + li.complete::before { background: var(--q-color-positive, #21BA45); }
.progress-dot { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 28px; height: 28px; border: 2px solid #c9d3e3; border-radius: 50%; background: white; color: white; }
.progress-dot .material-icons { font-size: 18px; font-weight: 700; }
.progress li.complete .progress-dot { border-color: var(--q-color-positive, #21BA45); background: var(--q-color-positive, #21BA45); }
.event-dot.event-delivered { background: var(--q-color-positive, #21BA45); }
.progress li.pending .progress-label, .progress-date { color: var(--muted-color); }
.progress-date { font-size: 13px; font-weight: 400; }

.section-heading { align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line-color); }
.section-heading > span { font-size: 14px; }
.section-heading h2, .details h2 { margin: 0; color: var(--text-color); font-size: 20px; font-weight: 700; line-height: 28px; }
.events { list-style: none; padding: 0; margin: 0; }
.event { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 18px 4px; border-bottom: 1px solid var(--line-color); }
.event:last-child { border-bottom: 0; }
.event-dot { width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--q-color-accent); }
.event-copy h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; line-height: 22px; }
.event-copy p { margin: 0; font-size: 15px; line-height: 22px; }
.event-copy .event-meta { margin-top: 4px; font-size: 14px; }
.event time { font-size: 14px; line-height: 22px; white-space: nowrap; }
.events:not(.expanded) .extra-event, .events:not(.expanded) .grouped-scan, .events.expanded .event-group { display: none; }
.show-all { display: flex; width: 100%; margin-top: 12px; border: 1px solid #d5dbe5; border-radius: 8px; background: white; color: var(--q-color-accent); font-size: 15px; font-weight: 600; letter-spacing: normal; }
.show-all .q-btn__wrapper { min-height: 46px; }

.details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 16px 0 0; }
.details dl > div { padding-top: 12px; border-top: 1px solid var(--line-color); }
.details dd { margin: 4px 0 0; }
.empty-state { padding: 48px 24px; text-align: center; }
.empty-state h1 { margin: 0 0 12px; color: var(--text-color); font-size: 24px; font-weight: 700; line-height: 30px; }
.empty-state p, .no-events { color: var(--muted-color); }
.empty-search { max-width: 580px; margin: 24px auto 0; text-align: left; }
.empty-search label { display: block; margin-bottom: 8px; font-weight: 500; }
.empty-search-row { display: flex; gap: 8px; }
.page-search-field { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
    .site-header .q-toolbar { flex-wrap: wrap; padding: 8px 12px; }
    .brand img { width: 125px; height: 30px; }
    .search { order: 3; width: 100%; }
    .language-form { margin-left: auto; }
    .page { margin: 16px auto; padding: 0 8px; }
    .card { padding: 16px; }
    .summary-top, .section-heading { flex-direction: column; }
    .section-heading { align-items: flex-start; gap: 4px; }
    .summary h1 { font-size: 30px; }
    .latest { font-size: 15px; }
    .progress { gap: 4px; }
    .progress li { min-width: 0; gap: 6px; font-size: 12px; line-height: 1.25; }
    .progress li + li::before { top: 11px; right: calc(50% + 12px); width: calc(100% + 4px - 24px); }
    .progress-dot { width: 24px; height: 24px; }
    .progress-dot .material-icons { font-size: 16px; }
    .progress-date { font-size: 11px; }
    .pod-list { left: 0; right: auto; min-width: 0; width: max-content; max-width: calc(100vw - 48px); }
    .event { grid-template-columns: 12px minmax(0, 1fr); gap: 4px 14px; }
    .event time { grid-column: 2; }
    .details dl { grid-template-columns: 1fr; }
    .empty-search-row { flex-direction: column; }
}
