/* pages-data.css – Fahrten der Plattformen (orders), Status-Logs (statelogs), Berichte & Export (reports). Tokens only (theme.css). */

/* shared */
.dt-page .card-head h2 { display: flex; align-items: center; gap: 8px; }
.dt-tabs a { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- orders: filters ---------- */
.od-filters .od-more { display: contents; }
.od-more-btn { display: none; }
.od-chips { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.od-chiprow { align-items: center; }
.od-chiprow .chip { height: 30px; padding: 0 11px; }
.od-chiprow .chip .dot { width: 7px; height: 7px; }
.od-chiplbl { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; margin-right: 2px; }
.od-sq { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.od-note { margin-bottom: 14px; }
.od-filters .search-in { min-width: 270px; }
[data-mode="dark"] .od-map .leaflet-tile-pane, [data-mode="dark"] .od-mapcard .leaflet-tile-pane, [data-mode="dark"] .sl-map .leaflet-tile-pane { filter: brightness(.72) contrast(1.08) saturate(.85); }

/* sums strip */
.od-sums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.od-sum { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); min-width: 0; }
.od-sum span { font-size: var(--fs-xs); color: var(--text-3); font-weight: 550; }
.od-sum b { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.od-sum.hero { background: var(--primary-soft); border-color: transparent; } .od-sum.hero b { color: var(--primary); }

/* tables */
.od-list { overflow: hidden; }
.od-list .tbl tbody tr.click:focus-visible td { background: var(--primary-soft); outline: none; }
.od-trips .od-m, .od-trips th:first-child { display: none; }
.od-mrow { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.od-mmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .od-mmain b { font-weight: 650; }
.od-mpills { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.od-mamt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; font-variant-numeric: tabular-nums; } .od-mamt b { font-size: var(--fs-md); }
.od-st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.od-corr { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--info-bg); color: var(--info); }
.od-corr .icon { width: 12px; height: 12px; stroke: currentColor; }
.od-prices td, .od-prices th { white-space: nowrap; }
.od-prices td:first-child, .od-prices th:first-child, .rp-record td:first-child, .rp-record th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.od-prices th:first-child, .rp-record th:first-child { background: var(--surface-2); z-index: 2; }
.od-prices tfoot td:first-child, .rp-record tfoot td:first-child { background: var(--surface-2); }
.od-prices tbody tr:hover td:first-child, .rp-record tbody tr:hover td:first-child { background: var(--surface-2); }
.od-foot { margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.od-mapcard { margin-bottom: 14px; }
.od-mapcard .map { height: 340px; }

/* detail drawer */
.od-detail { display: flex; flex-direction: column; gap: 18px; }
.od-detail section h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.od-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.od-amount { text-align: right; display: flex; flex-direction: column; } .od-amount span { font-size: var(--fs-xs); color: var(--text-3); }
.od-amount b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; } .od-amount small { color: var(--text-3); font-size: var(--fs-xs); }
.od-two { gap: 22px; }
.od-tl { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 4px; }
.od-tl::before { content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.od-tl-it { position: relative; display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 8px; align-items: center; font-size: var(--fs-sm); }
.od-tl-it i { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--surface); justify-self: center; z-index: 1; }
.od-tl-it.off i { background: var(--border-strong); } .od-tl-it.off { color: var(--text-3); }
.od-tl-it span { color: var(--text-2); } .od-tl-it b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.od-tl-it small { grid-column: 2 / 4; color: var(--text-3); font-size: var(--fs-xs); margin-top: -2px; }
.od-price td { padding: 7px 12px; } .od-price tr.od-strong td { font-weight: 700; background: var(--surface-2); }
.od-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.od-extra div { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.od-extra small { display: block; color: var(--text-3); font-size: 11px; } .od-extra b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.od-map { height: 260px; margin-bottom: 12px; }
.od-stoplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.od-stoplist li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: flex-start; }
.od-stoplist li > i { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
.od-old { color: var(--text-3); text-decoration: line-through; }
.od-hash { font-size: 11.5px; word-break: break-all; }
.od-detail .alert { margin-bottom: 10px; }

/* ---------- state logs ---------- */
.sl-note { margin-bottom: 16px; }
.sl-state { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 45%, var(--text)); }
.sl-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.sl-util { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.sl-util span { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; } .sl-util i { display: block; height: 100%; background: #f59e0b; border-radius: 3px; }
.sl-util b { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.sl-time tbody tr.click:focus-visible td { background: var(--primary-soft); outline: none; }
.sl-tlhead .input { width: auto; min-width: 160px; height: 36px; font-size: var(--fs-sm); }
.sl-tl svg { display: block; border-radius: 6px; }
.sl-tl svg .bg { fill: var(--surface-3); } .sl-tl svg line.g { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; } .sl-tl svg line.g6 { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.sl-tl svg rect:not(.bg):hover { opacity: .8; }
.sl-hours { position: relative; height: 18px; margin-top: 4px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sl-hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; } .sl-hours span:first-child { transform: none; } .sl-hours span:last-child { transform: translateX(-100%); }
.sl-tlsum { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sl-tlsum div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sl-tlsum span { font-size: var(--fs-xs); color: var(--text-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-tlsum span i { width: 8px; height: 8px; border-radius: 2px; flex: none; } .sl-tlsum b { font-variant-numeric: tabular-nums; font-size: var(--fs-md); }
.legend i.sl-off { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.sl-mapnote, .rp-note { margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; } .sl-mapnote .icon, .rp-note .icon, .rp-foot .icon, .od-foot .icon { flex: none; margin-top: 1px; }
.map.sl-mapempty { height: auto; border: 0; background: none; }

/* ---------- reports ---------- */
.rp-grid { margin-bottom: var(--gap); align-items: start; }
.rp-chat { background: color-mix(in srgb, var(--primary) 7%, var(--surface-2)); border-radius: var(--radius); padding: 18px 14px; min-height: 200px;
  background-image: radial-gradient(color-mix(in srgb, var(--primary) 12%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.rp-bubble { max-width: 470px; background: var(--surface); border-radius: 14px 14px 14px 4px; padding: 10px 12px 6px; box-shadow: var(--shadow-sm); font-size: 14px; line-height: 1.5; transition: opacity .15s; }
.rp-from { font-size: 12.5px; font-weight: 650; color: var(--primary); margin-bottom: 2px; }
.rp-text { white-space: pre-wrap; overflow-wrap: anywhere; } .rp-text b { font-weight: 700; }
.rp-time { text-align: right; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.rp-actions { gap: 8px; } .rp-actions .btn { justify-content: flex-start; }
.rp-list { display: flex; flex-direction: column; padding: 6px; }
.rp-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.rp-item:hover { background: var(--surface-2); } .rp-item .icon { margin-top: 2px; stroke: var(--primary); flex: none; }
.rp-item b { font-size: var(--fs-sm); font-weight: 600; display: block; } .rp-item small { color: var(--text-3); font-size: var(--fs-xs); }
.rp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rp-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.rp-step .n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; }
.rp-step b { font-size: var(--fs-sm); } .rp-step p { margin: 4px 0 10px; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }
.rp-record td, .rp-record th { white-space: nowrap; }
.rp-foot { margin-top: 10px; line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; }
.rp-disclaimer { margin-bottom: var(--gap); }
.rp-def { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-def dt { font-weight: 650; font-size: var(--fs-sm); margin-top: 8px; } .rp-def dt:first-child { margin-top: 0; }
.rp-def dd { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }
.rp-kpis .card-head h2 { display: flex; align-items: center; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .od-sums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sl-tlsum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rp-steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .od-more-btn { display: inline-flex; }
  .od-filters .od-more { display: none; }
  .od-filters.open .od-more { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .od-filters.open .od-more .input { width: 100%; min-width: 0; }
  .od-chiprow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-right: -14px; padding-right: 14px; }
  .od-chiprow::-webkit-scrollbar { display: none; }
  .od-chiprow .chip { flex: none; }
  .od-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .od-sum.hero { grid-column: 1 / -1; }
  .od-sum b { font-size: var(--fs-md); }
  .od-trips thead { display: none; }
  .od-trips th, .od-trips td { display: none; }
  .od-trips td.od-m { display: table-cell; }
  .od-trips th, .od-trips td, .od-stops th, .od-stops td, .sl-list th, .sl-list td, .sl-time th, .sl-time td { padding: 9px 10px; }
  .od-extra { grid-template-columns: 1fr; }
  .od-amount { text-align: left; }
  .od-mapcard .map { height: 260px; }
  .sl-tlsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sl-hours span.odd { display: none; }
  .sl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .sl-kpis .kpi { padding: 12px; } .sl-kpis .kpi .val { font-size: 20px; }
  .sl-util { min-width: 90px; } .sl-util span { min-width: 30px; }
  .sl-tlhead .row { width: 100%; margin-left: 0; } .sl-tlhead .row > * { flex: 1; min-width: 0; }
  .rp-chat { padding: 12px 8px; }
  .rp-grid .card-head .right { margin-left: 0; }
}
