/* Lkw-Touren */
#view-truckroutes { --tr-line: var(--border-subtle, #3a3a3a); --tr-muted: var(--text-muted, #bfbfbf); --tr-soft: var(--bg-elevated, #262626); --tr-ok: #7fd3a4; --tr-warn: #f5b862; --tr-bad: #ff8a8a; }
#view-truckroutes [hidden] { display: none !important; }
.tr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tr-head h2 { margin: 2px 0 6px; }
.tr-head p { margin: 0; color: var(--tr-muted); font-size: 13px; max-width: 720px; line-height: 1.55; }
.tr-datebar { display: flex; gap: 6px; align-items: center; }
.tr-datebar input[type=date] { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 10px; }
.tr-day { margin: 10px 0 10px; font-weight: 600; text-transform: capitalize; color: var(--text-main, #fff); }
.btn.tr-icon { padding-left: 11px; padding-right: 11px; }
.tr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; border-bottom: 1px solid var(--tr-line); padding-bottom: 10px; }
.tr-tabs button { background: var(--tr-soft); border: 1px solid var(--tr-line); color: var(--text-main, #fff); border-radius: 99px; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.tr-tabs button i { margin-right: 4px; color: var(--tr-muted); }
.tr-tabs button.is-active { background: var(--accent-soft); border-color: var(--accent); }
.tr-tabs button.is-active i { color: var(--text-main, #fff); }
.tr-tabs button:focus-visible, .tr-stop a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tr-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tr-summary > div { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-summary span { font-size: 11px; color: var(--tr-muted); text-transform: uppercase; letter-spacing: .06em; }
.tr-summary b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tr-summary input[type=time] { font: inherit; font-size: 16px; font-weight: 600; padding: 2px 6px; border-radius: 8px; width: 100%; max-width: 150px; box-sizing: border-box; }
.tr-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tr-warn { list-style: none; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.tr-warn li + li { margin-top: 4px; }
.tr-warn i { margin-right: 6px; }
.tr-warn.is-critical { background: rgba(255, 90, 90, .12); border: 1px solid rgba(255, 90, 90, .45); }
.tr-warn.is-critical i { color: var(--tr-bad); }
.tr-warn.is-warn { background: rgba(245, 184, 98, .1); border: 1px solid rgba(245, 184, 98, .4); }
.tr-warn.is-warn i { color: var(--tr-warn); }
.tr-warn.is-info { background: var(--tr-soft); border: 1px solid var(--tr-line); color: var(--tr-muted); }
.tr-empty { text-align: center; padding: 40px 16px; color: var(--tr-muted); border: 1px dashed var(--tr-line); border-radius: 14px; }
.tr-empty i { font-size: 28px; margin-bottom: 8px; }
.tr-empty p { margin: 4px 0; }
.tr-empty-s { color: var(--tr-muted); }
.tr-timeline { position: relative; }
.tr-leg { margin: 0 0 0 86px; padding: 6px 0 6px 22px; border-left: 2px dashed var(--tr-line); font-size: 12px; color: var(--tr-muted); }
.tr-leg i { margin-right: 6px; }
.tr-stop { display: grid; grid-template-columns: 70px 32px minmax(0, 1fr); gap: 0 10px; align-items: start; background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 14px; padding: 12px 14px; margin: 0; }
.tr-stop.is-done { opacity: .6; }
.tr-stop.is-critical { border-color: rgba(255, 90, 90, .6); }
.tr-stop.is-facility { border-left: 4px solid #4fb38a; }
.tr-stop.is-site { border-left: 4px solid var(--accent); }
.tr-stop.is-lunch, .tr-stop.is-start, .tr-stop.is-depot { background: transparent; }
.tr-time { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tr-time small { display: block; font-weight: 500; font-size: 12px; color: var(--tr-muted); }
.tr-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elevated-soft, #2e2e2e); border: 1px solid var(--tr-line); }
.is-site .tr-dot { background: var(--accent-soft); border-color: var(--accent); }
.is-facility .tr-dot { background: rgba(79, 179, 138, .2); border-color: #4fb38a; }
.tr-body h4 { margin: 4px 0 6px; font-size: 15px; line-height: 1.35; }
.tr-body p { margin: 0 0 6px; }
.tr-addr { font-size: 13px; color: var(--text-main, #fff); line-height: 1.45; overflow-wrap: anywhere; }
.tr-sub { font-size: 12.5px; color: var(--tr-muted); }
.tr-sub i, .tr-meta i, .tr-note i { margin-right: 5px; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--tr-muted); margin-bottom: 6px; }
.tr-meta a, .tr-src a, .tr-where a { color: var(--text-main, #fff); text-decoration: underline; text-underline-offset: 2px; }
.tr-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--tr-line); color: var(--text-main, #fff); font-size: 12px; }
.tr-note { font-size: 12.5px; background: rgba(255, 255, 255, .04); border-radius: 8px; padding: 6px 9px; }
.tr-note.is-driver { border-left: 3px solid #4fb38a; }
.tr-warn-inline { color: var(--tr-warn); }
.tr-kind { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; vertical-align: 1px; background: rgba(255, 255, 255, .08); }
.tr-kind.k-delivery { background: rgba(105, 201, 255, .18); color: #9fdcff; }
.tr-kind.k-collection { background: rgba(245, 184, 98, .18); color: #ffd39a; }
.tr-kind.k-exchange { background: rgba(127, 211, 164, .18); color: #a9e8c4; }
.tr-donetag { color: var(--tr-ok); font-weight: 500; font-size: 12px; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tr-actions .btn { font-size: 13px; }
.tr-toolbar a.btn, .tr-actions a.btn { text-decoration: none; }
.tr-why { margin-top: 4px; font-size: 12.5px; }
.tr-why summary { cursor: pointer; color: var(--tr-muted); }
.tr-why ul { list-style: none; margin: 6px 0 0; padding: 0; }
.tr-why li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 8px; border-radius: 8px; }
.tr-why li.is-chosen { background: rgba(79, 179, 138, .14); }
.tr-why li.is-closed { color: var(--tr-muted); text-decoration: line-through; }
.tr-why em { color: var(--tr-ok); font-style: normal; font-weight: 600; }
.tr-h3 { font-size: 15px; margin: 22px 0 10px; }
.tr-outside { display: flex; flex-direction: column; gap: 6px; }
.tr-out { background: var(--tr-soft); border: 1px dashed var(--tr-line); border-radius: 10px; padding: 8px 12px; font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tr-out small { color: var(--tr-muted); }
.tr-facgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.tr-fac { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 14px; padding: 14px; scroll-margin-top: 80px; }
.tr-fac.is-off { opacity: .75; border-style: dashed; }
.tr-fac header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tr-fac h4 { margin: 0 0 6px; font-size: 15px; }
.tr-fac h5 { margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--tr-muted); }
.tr-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tr-badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--tr-line); white-space: nowrap; }
.tr-badge.is-ok { color: var(--tr-ok); border-color: rgba(127, 211, 164, .5); }
.tr-badge.is-warn { color: var(--tr-warn); border-color: rgba(245, 184, 98, .5); }
.tr-badge.is-bad { color: var(--tr-bad); border-color: rgba(255, 138, 138, .5); }
.tr-open { color: var(--tr-ok); }
.tr-closed { color: var(--tr-bad); }
.tr-acc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tr-acc li { display: flex; flex-direction: column; gap: 2px; }
.tr-acc small { color: var(--tr-muted); font-size: 11.5px; padding-left: 4px; }
.tr-notes { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--tr-muted); line-height: 1.5; }
.tr-src { font-size: 11.5px; color: var(--tr-muted); margin: 8px 0 0; }
.tr-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-rules li { display: flex; gap: 10px; background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.tr-rules i { color: var(--accent); margin-top: 3px; width: 16px; text-align: center; }
.tr-wheres { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tr-where { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 12px; }
.tr-where-cat { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.tr-where-cat i { color: var(--accent); width: 20px; text-align: center; }
.tr-where-cat div { display: flex; flex-direction: column; }
.tr-where-cat small, .tr-where small { color: var(--tr-muted); font-size: 11.5px; }
.tr-where ol { margin: 0; padding-left: 20px; font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.tr-where li { line-height: 1.35; }
.tr-where li small { display: block; }
.tr-where li.is-first a { font-weight: 700; }
.tr-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tr-book { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 12px; font-size: 13px; }
.tr-book header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tr-book p { margin: 0 0 5px; }
.tr-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f6f4a; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.tr-toast.is-bad { background: #8a2d2d; }
#tr-dialog { border: 0; border-radius: 14px; padding: 22px; width: min(720px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; background: #1d1d22; color: #f2f2f4; box-shadow: 0 24px 80px rgba(0, 0, 0, .6); }
#tr-dialog::backdrop { background: rgba(0, 0, 0, .55); }
#tr-dialog h2 { margin: 0; font-size: 19px; }
.tr-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.tr-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #b8b8bd; margin-bottom: 10px; }
.tr-grid label small { color: #8f8f96; }
.tr-grid input, .tr-grid select, .tr-grid textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; }
.tr-wide { grid-column: 1 / -1; }
.tr-form-err { color: #ff8a8a; font-size: 13px; min-height: 1em; }
.tr-dlg-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.tr-del { color: #ff8a8a; }
@media (max-width: 900px) { .tr-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tr-head { flex-direction: column; }
  .tr-datebar { width: 100%; }
  .tr-datebar input[type=date] { flex: 1; min-width: 0; }
  .tr-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-stop { grid-template-columns: 54px minmax(0, 1fr); padding: 12px; }
  .tr-dot { display: none; }
  .tr-time { font-size: 15px; }
  .tr-leg { margin-left: 26px; }
  .tr-actions .btn { flex: 1 1 auto; justify-content: center; }
  .tr-facgrid, .tr-wheres, .tr-books { grid-template-columns: 1fr; }
  .tr-grid { grid-template-columns: 1fr; }
}
/* Containerbestand */
.tr-chip.is-cont { border-color: rgba(105, 201, 255, .45); }
.tr-csizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 6px; }
.tr-csize { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--tr-muted); }
.tr-csize b { font-size: 18px; color: var(--text-main, #fff); }
.tr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--tr-line); border-radius: 12px; }
.tr-avail, .tr-ctable { border-collapse: collapse; width: 100%; font-size: 13px; }
.tr-avail th, .tr-avail td, .tr-ctable th, .tr-ctable td { padding: 7px 9px; border-bottom: 1px solid var(--tr-line); text-align: center; white-space: nowrap; }
.tr-avail thead th { font-size: 11px; color: var(--tr-muted); font-weight: 500; text-transform: capitalize; }
.tr-avail tbody th, .tr-ctable th { text-align: left; }
.tr-ctable td:nth-child(4) { text-align: left; white-space: normal; color: var(--tr-muted); }
.tr-avail td { font-variant-numeric: tabular-nums; font-weight: 600; }
.tr-avail td.is-zero { color: var(--tr-warn); background: rgba(245, 184, 98, .08); }
.tr-avail td.is-neg { color: #fff; background: rgba(255, 90, 90, .35); }
.tr-onsite { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tr-on { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 12px; }
.tr-on.is-over { border-color: rgba(255, 138, 138, .6); }
.tr-on header { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.tr-on header b { font-size: 16px; }
.tr-badge.cs-yard { color: var(--tr-ok); border-color: rgba(127, 211, 164, .5); }
.tr-badge.cs-site { color: #9fdcff; border-color: rgba(105, 201, 255, .5); }
.tr-badge.cs-repair { color: var(--tr-warn); border-color: rgba(245, 184, 98, .5); }
.tr-badge.cs-retired { color: var(--tr-muted); }
.tr-cadd-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tr-cadd-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--tr-muted); }
.tr-cadd-row input, .tr-cadd-row select { font: inherit; font-size: 15px; padding: 7px 9px; border-radius: 9px; width: 110px; }
#tr-dialog label[hidden] { display: none; }
@media (max-width: 640px) { .tr-onsite { grid-template-columns: 1fr; } .tr-csizes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tr-on a, .tr-sub a { color: var(--text-main, #fff); text-decoration: underline; text-underline-offset: 2px; }
.tr-actions .tr-badge { align-self: center; }
/* Entsorgung, Fotos, Push-Hinweis */
.tr-push { margin: -4px 0 10px; font-size: 12.5px; color: var(--tr-ok); }
.tr-push i { margin-right: 5px; }
.tr-disp { margin-top: 2px; }
.tr-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.tr-thumb { position: relative; display: inline-block; }
.tr-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 9px; border: 1px solid var(--tr-line); display: block; }
.tr-thumb-del { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--tr-line); background: #2a2a2e; color: #fff; font-size: 15px; line-height: 20px; cursor: pointer; padding: 0; }
.tr-thumb-del:focus-visible { outline: 2px solid var(--accent); }
#tr-dialog .tr-check { flex-direction: row; align-items: center; gap: 10px; color: #f2f2f4; font-size: 14px; }
#tr-dialog .tr-check input { width: 20px; height: 20px; }
#tr-dialog input[type=file] { font-size: 14px; }
.tr-monthbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; text-transform: capitalize; }
.tr-dcards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.tr-dcards > div { background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.tr-dcards b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tr-dcards span { font-size: 11.5px; color: var(--tr-muted); }
.tr-dcards .is-warn b { color: var(--tr-warn); }
.tr-dcards .is-bad b { color: var(--tr-bad); }
.tr-dtable { border-collapse: collapse; width: 100%; font-size: 13px; }
.tr-dtable th, .tr-dtable td { padding: 8px 9px; border-bottom: 1px solid var(--tr-line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-dtable thead th { font-size: 11px; color: var(--tr-muted); font-weight: 500; }
.tr-dtable th[scope=row], .tr-dtable td:nth-child(1), .tr-dtable td:nth-child(3), .tr-dtable td:last-child, .tr-dtable thead th:nth-child(-n+3), .tr-dtable thead th:last-child { text-align: left; }
.tr-dtable th[scope=row] { font-weight: 600; white-space: normal; min-width: 170px; }
.tr-dtable th[scope=row] small { display: block; font-weight: 400; color: var(--tr-muted); }
.tr-byfac { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
@media (max-width: 900px) { .tr-dcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tr-dcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tr-badge.cs-ordered { color: #c9b6ff; border-color: rgba(201, 182, 255, .5); border-style: dashed; }
.tr-csize .tr-muted { color: #c9b6ff; }
.tr-cadd-row select#tr-cadd-status { width: auto; }

/* General transport: paired pickup/destination and vehicle changes. */
.tr-stop.is-pickup { border-left: 4px solid #399aaf; }
.tr-stop.is-vehicle { background: transparent; border-style: dashed; }
.tr-kind.k-material { background: #dceef4; color: #164b61; }
.tr-kind.k-passenger { background: #ece4fa; color: #563684; }
.tr-section-title { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; padding-top: 12px; border-top: 1px solid #444; font-size: 15px; }
.tr-section-title span { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #dceef4; color: #164b61; font-size: 12px; }
#tr-dialog { box-sizing: border-box; }
#tr-dialog .tr-grid { min-width: 0; }
#tr-dialog .tr-grid > * { min-width: 0; }
#tr-dialog [hidden] { display: none !important; }

/* Everyday planning: one trip per row, optional operational details. */
#view-truckroutes .btn { box-shadow: none; text-shadow: none; }
.tr-simple-toolbar { align-items: center; margin: 18px 0 14px; }
.tr-day-count { margin-right: auto; color: var(--tr-muted); font-size: 13px; }
.tr-trips { display: grid; gap: 10px; }
.tr-trip { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; padding: 18px; border: 1px solid var(--tr-line); border-radius: 10px; background: var(--tr-soft); }
.tr-trip.is-done { border-left: 3px solid var(--tr-ok); }
.tr-trip-time { padding-top: 2px; }
.tr-trip-time button, .tr-trip-time b { background: none; border: 0; padding: 0; font: inherit; font-size: 19px; font-weight: 700; color: var(--text-main, #fff); font-variant-numeric: tabular-nums; }
.tr-trip-time button { cursor: pointer; text-decoration: underline; text-decoration-color: var(--tr-line); text-underline-offset: 5px; min-height: 32px; }
.tr-trip-time small { display: block; margin-top: 4px; color: var(--tr-muted); font-size: 11px; }
.tr-trip-main { min-width: 0; }
.tr-trip-main h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.tr-trip-meta { margin: 0 0 7px; color: var(--tr-muted); font-size: 12px; overflow-wrap: anywhere; }
.tr-trip-path { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tr-trip-path > span { color: var(--tr-muted); margin: 0 4px; }
.tr-trip-note { margin: 7px 0; padding-left: 9px; border-left: 2px solid var(--tr-line); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tr-trip-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 7px; }
.tr-inline-link { color: var(--text-main, #fff); font-size: 12px; text-underline-offset: 3px; padding: 5px 0; }
.tr-trip-actions { display: flex; gap: 6px; align-items: flex-start; align-content: flex-start; flex-wrap: wrap; max-width: 260px; }
.tr-trip-actions .btn { font-size: 12px; min-height: 38px; }
.tr-order { display: flex; gap: 4px; }
.tr-order .btn { padding: 7px 11px; }
.tr-trip-details { margin-top: 7px; font-size: 12px; }
.tr-trip-details > summary { color: var(--tr-muted); cursor: pointer; width: fit-content; padding: 5px 0; }
.tr-trip-details[open] > summary { margin-bottom: 8px; }
.tr-day-notes, .tr-route-details { margin: 12px 0; }
.tr-day-notes > summary, .tr-route-details > summary { cursor: pointer; padding: 12px 0; font-size: 13px; color: var(--tr-muted); }
.tr-day-notes > summary { color: var(--tr-warn); }
.tr-route-details { border-top: 1px solid var(--tr-line); margin-top: 20px; }
.tr-route-details .tr-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tr-tabs { align-items: center; }
.tr-more-nav { position: relative; font-size: 13px; }
.tr-more-nav > summary { padding: 9px 14px; cursor: pointer; color: var(--tr-muted); }
.tr-more-nav > div { position: absolute; top: 100%; left: 0; z-index: 8; min-width: 220px; padding: 8px; background: var(--tr-soft); border: 1px solid var(--tr-line); border-radius: 10px; box-shadow: 0 8px 24px #0004; display: grid; gap: 4px; }
.tr-more-nav button { text-align: left; border-radius: 6px; }
#tr-dialog:has(#tr-form) { width: min(640px, calc(100vw - 24px)); padding: 20px 22px 0; }
#tr-form .tr-grid { gap: 2px 16px; }
#tr-form .tr-grid input, #tr-form .tr-grid select { min-height: 40px; }
#tr-form .tr-grid label { margin-bottom: 12px; }
#tr-form .tr-pickup-choice { margin: 0 0 12px; }
.tr-editor-more { border-top: 1px solid #414147; }
.tr-editor-more > summary { padding: 12px 0; cursor: pointer; font-size: 13px; color: #c2c2c8; }
.tr-editor-more > .tr-grid { padding-top: 4px; }
#tr-form .tr-form-err:empty { display: none; }
#tr-form .tr-savebar { position: sticky; bottom: 0; margin: 0 -22px; padding: 14px 22px; background: #1d1d22; border-top: 1px solid #414147; justify-content: flex-end; z-index: 2; }
#tr-form .tr-savebar .btn { min-height: 42px; min-width: 110px; }
.tr-trip button:focus-visible, .tr-trip a:focus-visible, .tr-more-nav summary:focus-visible, .tr-editor-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1050px) {
  .tr-trip { grid-template-columns: 58px minmax(0, 1fr); gap: 10px 14px; }
  .tr-trip-actions { grid-column: 2; max-width: none; }
}
@media (max-width: 640px) {
  .tr-trip { padding: 14px 12px; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
  .tr-trip-time button, .tr-trip-time b { font-size: 16px; }
  .tr-trip-actions { grid-column: 1 / -1; flex-wrap: nowrap; }
  .tr-trip-actions > .btn { flex: 1; }
  .tr-trip-actions .btn { min-height: 42px; }
  .tr-route-details .tr-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-more-nav > div { left: auto; right: 0; min-width: 200px; }
  #tr-dialog:has(#tr-form) { max-height: calc(100dvh - 20px); padding-top: 16px; }
  #tr-form .tr-grid { grid-template-columns: 1fr 1fr; }
  #tr-form .tr-grid [data-kind-only="material"] { grid-column: 1 / -1; }
  #tr-form .tr-grid label:has(select[name="vehicleType"]) { grid-column: 1 / -1; }
  #tr-form .tr-grid input, #tr-form .tr-grid select, #tr-form .tr-grid textarea { font-size: 16px; }
  #tr-form .tr-grid label { font-size: 12px; }
  #tr-form .tr-savebar { padding-top: 10px; padding-bottom: 10px; }
}

/* Site selection and trips awaiting a precise map point. */
.tr-place-hint { display: block; margin-top: 5px; color: #9edcc5; font-size: 12px; overflow-wrap: anywhere; }
.tr-place-hint:empty { display: none; }
.tr-place-help { margin: -3px 0 12px; color: #c2c2c8; font-size: 12px; line-height: 1.4; }
.tr-map-pending { color: var(--tr-warn, #ffd48a); font-size: 12px; line-height: 1.5; margin: 8px 0; }
.tr-map-pending button { background: none; color: inherit; border: 0; padding: 3px 0; font: inherit; text-decoration: underline; cursor: pointer; }
