/* Desktop SAD Pd: left vertical module navigation, right route/day workspace. */
@media(min-width:801px){
 body.fc-sadpd-embedded .sadpd-root{max-width:none!important;width:100%!important;margin:0!important;padding:10px!important;display:block!important}
 body.fc-sadpd-embedded #sadpd-overview{max-width:none!important;width:100%!important;margin:0!important;display:grid!important;grid-template-columns:190px minmax(0,1fr);column-gap:10px;align-items:start}
 body.fc-sadpd-embedded #sadpd-overview[hidden]{display:none!important}
 body.fc-sadpd-embedded #sadpd-overview>h1,body.fc-sadpd-embedded #sadpd-sync-status,body.fc-sadpd-embedded #sadpd-summary{grid-column:1/-1}
 body.fc-sadpd-embedded .sadpd-desktop-actions{grid-column:1;grid-row:4;display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0;position:sticky;top:10px}
 body.fc-sadpd-embedded .sadpd-desktop-actions button{width:100%;text-align:left;min-height:39px;white-space:normal;padding:8px 10px}
 body.fc-sadpd-embedded #sadpd-list-panel{grid-column:2;grid-row:4;min-width:0;margin:0!important}
 body.fc-sadpd-embedded #sadpd-overview .sadpd-toolbar,body.fc-sadpd-embedded #sadpd-mobile-actions{display:none!important}
 body.fc-sadpd-embedded #sadpd-list-panel .sadpd-mobile-nav{margin-top:0!important}
}
@media(min-width:801px) and (max-width:1100px){body.fc-sadpd-embedded #sadpd-overview{grid-template-columns:160px minmax(0,1fr)}}
/* Keep Dni/Spoje/Zastávky/Mapa immediately above their own data panel.
   Grid items must be explicitly placed: auto-placement put tabs above the side menu. */
@media(min-width:801px){
 body.fc-sadpd-embedded #sadpd-overview{grid-template-rows:auto auto auto auto 1fr}
 body.fc-sadpd-embedded .sadpd-desktop-actions{grid-column:1!important;grid-row:4 / span 2!important;align-self:start}
 body.fc-sadpd-embedded #sadpd-overview>.sadpd-mobile-nav{grid-column:2!important;grid-row:4!important;width:100%!important;min-width:0!important;justify-self:stretch!important}
 body.fc-sadpd-embedded #sadpd-list-panel{grid-column:2!important;grid-row:5!important;min-width:0!important;width:100%!important;align-self:start}
 body.fc-sadpd-embedded .sadpd-mobile-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
/* Restore the original narrow, readable timetable column on desktop.
   Mobile stays full-width; desktop content is not stretched across the viewport. */
@media(min-width:801px){
 body.fc-sadpd-embedded #sadpd-overview{grid-template-columns:190px minmax(0,1fr)!important;column-gap:10px!important}
 body.fc-sadpd-embedded #sadpd-overview>.sadpd-mobile-nav,
 body.fc-sadpd-embedded #sadpd-list-panel{width:min(100%,592px)!important;max-width:592px!important;justify-self:start!important}
 body.fc-sadpd-embedded .sadpd-mobile-nav button{font-size:13px!important;padding:8px 3px!important}
 body.fc-sadpd-embedded .sadpd-duty-item{font-size:14px!important;padding:14px 10px!important;line-height:1.35!important}
 body.fc-sadpd-embedded .sadpd-compact-main{font-size:14px!important;gap:5px!important}
 body.fc-sadpd-embedded .sadpd-compact-main strong{font-size:19px!important}
 body.fc-sadpd-embedded .sadpd-compact-meta{font-size:13px!important;line-height:1.4!important}
 body.fc-sadpd-embedded .sadpd-compact-fpc{font-size:14px!important;line-height:1.4!important}
 body.fc-sadpd-embedded .sadpd-duty-list{display:flex!important;flex-direction:column!important;gap:0!important}
}
@media(min-width:801px) and (max-width:1100px){
 body.fc-sadpd-embedded #sadpd-overview{grid-template-columns:160px minmax(0,1fr)!important}
}
/* Center the 592px timetable in the available right-hand area. */
@media(min-width:801px){
 body.fc-sadpd-embedded #sadpd-overview>.sadpd-mobile-nav,
 body.fc-sadpd-embedded #sadpd-list-panel{justify-self:center!important}
}

@media(min-width:801px){
 body.fc-sadpd-embedded #sadpd-overview{grid-template-rows:auto auto auto auto auto 1fr!important}
 body.fc-sadpd-embedded #sadpd-work-checkin{grid-column:2!important;grid-row:4!important;width:min(100%,592px)!important;max-width:592px!important;justify-self:center!important}
 body.fc-sadpd-embedded #sadpd-overview>.sadpd-mobile-nav{grid-row:5!important}
 body.fc-sadpd-embedded #sadpd-list-panel{grid-row:6!important}
 body.fc-sadpd-embedded .sadpd-desktop-actions{grid-row:4 / span 3!important}
}
