/* CargoExpanse Manager – Garáže: kompaktní karty, až pět vozidel v řadě */
.garage-site-details summary{
  border-bottom:1px solid #dce5f1;
  min-height:50px;
  background:#f4f7fc;
}
.garage-site-body{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  padding:14px;
  background:#f7f9fd;
}
.garage-vehicle-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#fff;
  border:1px solid #d7e1ee;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 3px 12px rgba(20,46,83,.06);
  transition:border-color .18s ease,box-shadow .18s ease;
}
.garage-vehicle-card:hover{
  border-color:#91b0e8;
  box-shadow:0 7px 19px rgba(30,71,131,.11);
}
.garage-vehicle-visual{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  width:100%;
  min-width:0;
  height:156px;
  padding:34px 9px 10px;
  background:linear-gradient(180deg,#f6faff 0%,#edf4fc 100%);
  border-bottom:1px solid #dce6f5;
  overflow:hidden;
}
.garage-vehicle-visual>img{
  display:block;
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center center;
  flex:0 1 auto;
  filter:none;
}
.garage-vehicle-index{
  position:absolute;
  z-index:2;
  top:10px;
  left:11px;
  font:700 9px var(--mono);
  letter-spacing:.08em;
  color:#526b91;
}
.garage-vehicle-status{position:absolute;z-index:2;top:8px;right:8px}
.garage-vehicle-status .badge{
  display:inline-block;
  padding:4px 6px;
  border:1px solid rgba(34,79,141,.09);
  font-size:9px;
  font-weight:750;
  border-radius:5px;
}
.garage-vehicle-placeholder{display:grid;place-items:center;color:#9ab0d0}
.garage-vehicle-placeholder .icon{width:52px;height:52px}
.garage-vehicle-content{padding:12px 11px 8px;flex:1;min-width:0}
.garage-vehicle-type{
  display:block;
  color:#657a98;
  font-size:9px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.garage-vehicle-content h3{
  margin:4px 0 10px;
  font:750 21px/1.07 var(--head);
  text-transform:uppercase;
  overflow-wrap:anywhere;
}
.garage-vehicle-name{
  font:inherit;
  text-transform:inherit;
  border:0;
  padding:0;
  background:none;
  text-align:left;
  color:#132b4b;
  cursor:pointer;
  overflow-wrap:anywhere;
}
.garage-vehicle-name:hover{
  color:#164eea;
  text-decoration:underline;
  text-underline-offset:3px;
}
.garage-vehicle-location{
  display:grid;
  gap:3px;
  padding:8px;
  background:#f3f7fd;
  border:1px solid #e5edf8;
  border-radius:6px;
  min-height:0;
}
.garage-vehicle-location small{
  font:700 8px var(--mono);
  letter-spacing:.04em;
  color:#7083a0;
}
.garage-vehicle-location strong{
  font-size:11px;
  line-height:1.4;
  color:#162e4e;
  overflow-wrap:anywhere;
}
.garage-vehicle-metrics{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:7px;
  margin-top:10px;
}
.garage-vehicle-metrics>div{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:4px 8px;
  flex-wrap:wrap;
  min-width:0;
  padding:0;
  border:0;
}
.garage-vehicle-metrics>div>span:first-child{
  display:block;
  color:#7b899c;
  font-size:10px;
}
.garage-vehicle-metrics strong{
  display:block;
  margin:0;
  color:#142d4b;
  font:750 15px/1.15 var(--head);
  overflow-wrap:anywhere;
  text-align:right;
}
.garage-vehicle-meter{
  display:block;
  flex-basis:100%;
  width:100%;
  height:4px;
  margin:0;
  overflow:hidden;
  border-radius:5px;
  background:#e7edf5;
}
.garage-vehicle-meter i{
  display:block;
  height:100%;
  border-radius:5px;
  background:linear-gradient(90deg,#2861cc,#68a4f3);
}
.garage-vehicle-meter.is-low i{background:linear-gradient(90deg,#c16336,#e4a74b)}
.garage-vehicle-actions{
  display:flex;
  align-items:stretch;
  gap:6px;
  flex-wrap:wrap;
  padding:9px 11px 11px;
  border-top:1px solid #edf2f8;
}
.garage-vehicle-actions .btn{
  flex:1 1 0;
  min-width:0;
  min-height:33px;
  padding:6px 5px;
  font-size:10px;
  line-height:1.2;
  border-radius:6px;
  white-space:normal;
}
.garage-vehicle-empty{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  padding:26px 18px;
  border:1px dashed #c1d0e6;
  border-radius:10px;
  background:#fff;
}
.garage-vehicle-empty>.icon{width:34px;height:34px;color:#6590d0}
.garage-vehicle-empty>div{flex:1;min-width:200px}
.garage-vehicle-empty strong{color:#17385e;font-size:14px}
.garage-vehicle-empty p{font-size:12px;margin-top:4px;color:#6b7e98}
@media(max-width:1600px){
  .garage-site-body{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1280px){
  .garage-site-body{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:930px){
  .garage-site-body{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .garage-site-body{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}
  .garage-vehicle-visual{height:170px}
  .garage-vehicle-content{padding:13px 12px 9px}
  .garage-vehicle-actions{padding:10px 12px 13px}
}
@media(prefers-reduced-motion:reduce){
  .garage-vehicle-card{transition:none}
}

/* Vozový park: stejná kompaktní galerie jako přiřazená vozidla v garážích. */
.fleet-card-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:stretch}
.fleet-vehicle-home{display:flex;gap:6px;align-items:center;margin-top:9px;font-size:10px;color:#60738f;min-width:0;overflow-wrap:anywhere}
.fleet-vehicle-home .icon{width:14px;height:14px;flex:none;color:#3967af}
.fleet-vehicle-home strong{color:#172f50}
.fleet-card-empty{grid-column:1/-1;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:25px;background:#fff;border:1px dashed #c6d4e8;border-radius:9px;color:#50698e}
.fleet-card-empty>.icon{width:30px;height:30px}
.fleet-card-empty p{font-size:12px}
.fleet-card-empty .btn{margin-left:auto}
@media(max-width:1600px){.fleet-card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1280px){.fleet-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:930px){.fleet-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.fleet-card-grid{grid-template-columns:minmax(0,1fr)}.fleet-card-empty .btn{margin-left:0}}


/* Aktuálně řídící zaměstnanec ve flotile, načtený ze skutečné přepravy/přejezdu. */
.fleet-vehicle-driver{display:flex;align-items:center;gap:6px;margin-top:7px;min-width:0;font-size:10px;line-height:1.4;color:#647792;overflow-wrap:anywhere}
.fleet-vehicle-driver .icon{width:14px;height:14px;flex:none;color:#3967af}
.fleet-vehicle-driver strong{font-weight:700;color:#536680}
.fleet-vehicle-driver.has-driver{color:#425d7f}
.fleet-vehicle-driver-link{display:inline;padding:0;border:0;background:transparent;color:#174b9e;font:inherit;font-weight:700;text-align:left;cursor:pointer;overflow-wrap:anywhere}
.fleet-vehicle-driver-link:hover{text-decoration:underline;text-underline-offset:2px}
.fleet-vehicle-driver-link:focus-visible{outline:2px solid #295db7;outline-offset:2px;border-radius:2px}

/* Trvale spojená souprava ve vozovém parku – dvě techniky, jedna karta. */
.fleet-card-grid .garage-vehicle-card--coupled{border-color:#a9c9e9;box-shadow:0 4px 16px rgba(32,84,155,.09)}
.fleet-card-grid .garage-vehicle-card--coupled .garage-vehicle-visual{background:linear-gradient(165deg,#f4f9ff,#e7f1fc)}
.fleet-coupled-gallery{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:3px;align-items:center;width:100%;height:100%;min-width:0}
.fleet-coupled-gallery img{display:block;width:100%;height:100%;max-width:100%;object-fit:contain}
.fleet-coupled-gallery>span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#255dc2;color:#fff;font-size:15px;font-weight:800}
.fleet-coupled-label{display:inline-block;margin:-5px 0 9px;padding:4px 6px;border:1px solid #d4e4f7;background:#eff6ff;color:#2c6099;font-size:10px;font-weight:700}
.fleet-coupled-trailer-health{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:9px;padding:7px 8px;border:1px solid #dfe9f5;background:#f5f9fd;color:#5f7692;font-size:10px}
.fleet-coupled-trailer-health strong{color:#19385c;font-size:12px}
#dialog .fleet-assembly-panel{display:grid;gap:11px;margin:12px 0;padding:14px;border:1px solid #bed4ee;border-left:3px solid #2e67c3;background:#f3f8ff;min-width:0}
#dialog .fleet-assembly-panel>h3{display:flex;align-items:center;gap:7px;margin:0;font-size:17px;color:#153d70}
#dialog .fleet-assembly-panel>h3 .icon{width:19px;height:19px;color:#255fd0}
#dialog .fleet-assembly-hint{font-size:12px;line-height:1.5;color:#496684;margin:0}
#dialog .fleet-assembly-choices{display:grid;gap:7px}
#dialog .fleet-assembly-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;background:white;border:1px solid #d7e3f2;min-width:0}
#dialog .fleet-assembly-choice>div{display:flex;flex-direction:column;gap:4px;min-width:0}
#dialog .fleet-assembly-choice strong{font-size:12px;color:#193b60}
#dialog .fleet-assembly-choice small{font-size:11px;color:#5f7791;line-height:1.4}
#dialog .fleet-assembly-choice .btn{flex:0 0 auto;font-size:11px;min-height:33px}
#dialog .fleet-assembly-overview{display:grid;gap:10px}
#dialog .fleet-assembly-parts{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:8px;align-items:center;min-width:0}
#dialog .fleet-assembly-parts figure{margin:0;min-width:0;border:1px solid #d6e4f3;background:#fff;padding:8px}
#dialog .fleet-assembly-parts .vehicle-art{display:flex;align-items:center;justify-content:center;min-height:85px;height:110px;max-height:110px;overflow:hidden}
#dialog .fleet-assembly-parts .vehicle-art img{width:100%;max-width:100%;height:100%;max-height:106px;object-fit:contain}
#dialog .fleet-assembly-parts figcaption{display:flex;flex-direction:column;gap:3px;margin-top:6px}
#dialog .fleet-assembly-parts figcaption small{font-size:10px;color:#7387a1}
#dialog .fleet-assembly-parts figcaption strong{font-size:12px;line-height:1.4;color:#234c80}
#dialog .fleet-assembly-plus{display:grid;place-items:center;color:#fff;background:#215cc3;border-radius:50%;height:24px;width:24px;font-weight:800}
#dialog .fleet-assembly-overview>.btn{justify-self:start;font-size:12px}
#dialog .fleet-assembly-overview>.btn:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:640px){
  #dialog .fleet-assembly-panel{padding:11px}
  #dialog .fleet-assembly-parts{grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);gap:4px}
  #dialog .fleet-assembly-parts .vehicle-art{height:80px;min-height:65px}
  #dialog .fleet-assembly-parts figcaption strong{font-size:11px}
  #dialog .fleet-assembly-plus{height:18px;width:18px;font-size:12px}
  #dialog .fleet-assembly-choice{flex-wrap:wrap}
}
