/* Organizacija vremena, kompaktan obračun i alati za naziv/izvoz ture. */
.time-organization-section.matches-fuel-section {
  margin-top: 22px;
}

.unified-time-organization-header {
  border-color: #0878b9 !important;
  background: linear-gradient(135deg, #159bdc, #0879bd) !important;
  box-shadow: 0 9px 20px rgba(9, 115, 177, .16) !important;
}

.unified-time-organization-header .time-organization-toggle,
.unified-time-organization-header .time-organization-toggle strong {
  color: #fff !important;
}
.unified-time-organization-header .time-organization-toggle small { color: rgba(255,255,255,.82) !important; }
.unified-time-organization-header .time-organization-toggle b { color: #fff !important; }
.unified-time-organization-header #buildTransportTask {
  border-color: rgba(255,255,255,.7) !important;
  background: rgba(255,255,255,.16) !important;
  box-shadow: none !important;
}
.unified-time-organization-header #buildTransportTask:hover { background: rgba(255,255,255,.25) !important; }

.fuel-calculation-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.fuel-calculation-summary article {
  min-height: 78px !important;
  padding: 9px 10px !important;
}
.fuel-calculation-summary article small { display: none !important; }
.fuel-calculation-summary article strong { font-size: clamp(.9rem, 1.05vw, 1.12rem) !important; }
.fuel-calculation-summary article > span { font-size: .64rem !important; }
.fuel-calculation-note { display: none !important; }
.organized-schedule-heading { display: none !important; }

.transport-task-result-heading {
  align-items: center;
  gap: 14px;
}
.transport-task-result-heading > div:first-child { min-width: 0; flex: 1 1 auto; }
.tour-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tour-title-row h3 { min-width: 0; margin: 0 !important; overflow-wrap: anywhere; }
.tour-title-editor {
  flex: 1 1 180px;
  min-width: 0;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--accent, #0b8bd6);
  border-radius: 9px;
  color: var(--theme-text, var(--text));
  background: var(--theme-field, var(--panel));
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}
.tour-title-editor[hidden] { display: none !important; }
.tour-title-actions { display: inline-flex; align-items: center; gap: 6px; }
.tour-title-actions button {
  min-width: 38px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #8fc6e6;
  border-radius: 9px;
  color: #075f94;
  background: #eaf6fd;
  font: 850 .72rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.tour-title-actions button:hover { border-color: #0b8bd6; background: #dceff9; }

.tour-result-metrics {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, auto));
  gap: 8px;
}
.tour-result-metrics > span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--theme-border, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--theme-card, #fff) 89%, #dcedf8 11%);
}
.tour-result-metrics small { color: var(--theme-muted, var(--muted)); font-size: .63rem; font-weight: 900; text-transform: uppercase; }
.tour-result-metrics strong { font-size: 1.05rem !important; }

@media (max-width: 720px) {
  .fuel-calculation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
  .fuel-calculation-summary [data-fuel-metric="distance"] { order: 1; }
  .fuel-calculation-summary [data-fuel-metric="total-cost"] { order: 2; }
  .fuel-calculation-summary [data-fuel-metric="fuel"] { order: 3; }
  .fuel-calculation-summary [data-fuel-metric="fuel-cost"] { order: 4; }
  .fuel-calculation-summary [data-fuel-metric="adblue"] { order: 5; }
  .fuel-calculation-summary [data-fuel-metric="adblue-cost"] { order: 6; }
  .fuel-calculation-summary article { min-height: 72px !important; padding: 8px !important; }
  .fuel-calculation-summary article > span { overflow-wrap: anywhere; }
  .transport-task-result-heading { align-items: stretch; flex-direction: column; }
  .tour-result-metrics { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .time-organization-section.matches-fuel-section { margin-top: 16px; }
  .unified-time-organization-header { padding: 7px !important; }
  .tour-title-row { align-items: flex-start; }
  .tour-title-actions { width: 100%; }
  .tour-title-actions button { flex: 1 1 auto; }
  .fuel-calculation-summary article strong { font-size: .84rem !important; }
}
