#view-logistics{overflow:auto;padding:20px;min-height:0}.log-header,.log-day>header{display:flex;justify-content:space-between;align-items:center;gap:16px}.log-header h1{margin:0}.log-header p{margin:6px 0 18px}.log-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:0 0 18px}.log-stats>div,.log-day,.log-map-panel{border:1px solid #34363c;background:#16181c;border-radius:12px;padding:16px}.log-stats strong{display:block;font-size:27px}.log-stats span{font-size:12px;color:#b8bbc2}.log-layout{display:grid;grid-template-columns:minmax(320px,1fr) minmax(360px,1.15fr);gap:18px;align-items:start}.log-map-panel{position:sticky;top:0;min-width:0}#logMap{height:420px;border-radius:8px;background:#252a31;z-index:0}.log-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0}.log-toolbar label,.log-assignment{font-size:12px}.log-toolbar input:not([type=checkbox]){min-width:140px}.log-key.cast{color:#bd9bff}.log-key.crew{color:#75c7ff}.log-key.location{color:#ffba70}.log-key.point{color:#70ddb0}.log-pin{text-align:center;font-size:23px;line-height:28px;text-shadow:0 1px 3px #000;background:#18202b;border:2px solid white;border-radius:50%;box-shadow:0 2px 6px #0008}.log-pin.cast{color:#bd9bff}.log-pin.crew{color:#75c7ff}.log-pin.location{color:#ffba70;border-radius:5px}.log-pin.point{color:#70ddb0}.log-pin.approximate{border-style:dashed}.log-point,.log-person{display:flex;align-items:center;gap:10px;border-top:1px solid #34363c;padding:12px 0;flex-wrap:wrap}.log-person>div,.log-point>div{flex:1;min-width:130px}.log-point small,.log-person small,.log-vehicle small,.log-vehicle>span{display:block;color:#b8bbc2;margin-top:4px;overflow-wrap:anywhere}.log-point strong,.log-person strong{overflow-wrap:anywhere}.log-point .btn{font-size:11px}.log-day{margin-bottom:14px}.log-day h2{font-size:16px;margin:0}.log-vehicles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}.log-vehicle{padding:12px;border:1px solid #454950;border-radius:8px;background:#21242a}.log-vehicle .btn{margin:8px 5px 0 0}.log-warning,.log-error{color:#ffc37d!important;font-size:13px}.log-form{display:grid;gap:12px}.log-form label{display:grid;gap:5px;font-size:13px}.log-dialog{max-height:90vh;overflow:auto;max-width:540px;width:calc(100vw - 40px)}.log-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.log-empty{padding:24px;border:1px dashed #555;border-radius:10px}.log-transport{min-width:0}.log-map-panel details>summary{cursor:pointer;padding:8px 0}.log-assignment select{min-width:150px;max-width:220px}#crewTable .crew-address{min-width:230px}.log-map-panel .leaflet-popup-content{color:#17191d}.log-map-panel .leaflet-control-attribution{font-size:10px;color:#333}
@media(max-width:1100px){.log-layout{grid-template-columns:1fr}.log-map-panel{position:static}#logMap{height:340px}}
@media(max-width:600px){#view-logistics{padding:12px}.log-stats{grid-template-columns:1fr 1fr;gap:8px}.log-header{align-items:flex-start;flex-direction:column}.log-header h1{font-size:24px}.log-day,.log-map-panel{padding:12px}.log-assignment{flex:1;min-width:150px}.log-assignment select{width:100%;max-width:none}#logMap{height:300px}}
@media screen and (max-width:700px), screen and (max-height:500px) and (max-width:1279px){.roda-studio #crewTable tr[data-crew-id]>td:nth-child(7)::before{content:'Dirección'}.roda-studio #crewTable tr[data-crew-id]>td:nth-child(8)::before{content:'Notas'}.roda-studio #crewTable tr[data-crew-id]>td:nth-child(8){grid-column:1 / -1}}

.crew-map-link{display:block;margin-top:6px;font-size:11px;color:#a3d4ff}.crew-map-link[hidden]{display:none}

/* Keep Leaflet gestures and focus from scrolling the surrounding editor.
   clip also prevents off-screen marker focus from scrolling the tile viewport. */
#logMap{overflow:hidden;overflow:clip;overscroll-behavior:none;touch-action:none;}

/* Keep the map and filters in view while the transport roster scrolls. */
@media screen and (min-width:1101px){
  #view-logistics{display:flex;flex-direction:column;gap:12px;overflow:hidden;padding:16px;}
  .log-header,.log-stats{flex:none;}
  .log-header h1{font-size:24px;}
  .log-header p{margin:4px 0 0;font-size:12px;}
  .log-stats{gap:8px;margin:0;}
  .log-stats>div{display:flex;align-items:center;gap:10px;padding:8px 12px;}
  .log-stats strong{font-size:22px;}
  .log-stats span{font-size:11px;}
  .log-layout{flex:1;min-height:0;align-items:stretch;gap:14px;}
  .log-map-panel{position:relative;top:auto;display:flex;flex-direction:column;gap:8px;min-height:0;padding:12px;}
  .log-map-panel>.log-toolbar,.log-map-panel>.log-map-details{flex:none;margin:0;}
  .log-map-panel .log-toolbar .btn{font-size:11px;padding:7px 9px;min-height:32px;}
  .log-map-panel .log-toolbar label{font-size:11px;}
  #logMap{flex:1;height:auto;min-height:100px;}
  #logMapStatus{flex:none;margin:0;font-size:11px;line-height:1.4;}
  .log-map-details{position:relative;}
  .log-map-panel .log-map-details>summary{padding:4px 0;font-size:12px;}
  .log-map-details-body{position:absolute;bottom:calc(100% + 8px);left:0;right:0;max-height:min(300px,45dvh);overflow:auto;overscroll-behavior:contain;padding:12px;border:1px solid #454950;border-radius:8px;background:#16181c;box-shadow:0 4px 20px #0006;z-index:1000;}
  .log-map-details-body>p{margin-top:0;}
  .log-transport{display:flex;flex-direction:column;gap:12px;min-height:0;overflow:hidden;}
  .log-transport>.log-toolbar{flex:none;margin:0;}
  .log-transport>.log-toolbar>label:first-child{flex:1;min-width:140px;}
  #logSearch{width:100%;}
  #logDays{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:4px;}
  #logDays:focus-visible{outline:2px solid #aaa;outline-offset:-2px;border-radius:8px;}
  #logDays>.log-day:last-child{margin-bottom:0;}
}
@media screen and (min-width:1101px) and (max-height:650px){
  #view-logistics{gap:8px;padding:10px;}
  .log-header p{display:none;}
  .log-stats>div{padding:4px 10px;}
  .log-map-panel{gap:5px;padding:8px;}
  #logMap{min-height:70px;}
}
