/* Calm, centered mobile workspace. Form values keep their reading alignment. */
.territory-help{margin:10px 0 14px;color:var(--muted);line-height:1.6}
.territory-extra{margin:12px 0;padding:8px 0;border-bottom:1px solid var(--line)}
.territory-extra>summary{font-weight:650;font-size:14px;cursor:pointer}
.territory-dialog .territory-private{display:flex;align-items:center;gap:10px;line-height:1.5;padding:10px;border-radius:10px;background:var(--teal-light)}
.territory-private input{width:20px;height:20px;flex:none}
.territory-icon.acceso span{background:#fff4d8;border-color:#b77514;color:#704609}
.territory-access-symbol{margin-right:3px}
[data-territory-list]>.btn{display:flex;flex-direction:column;gap:4px;white-space:normal;line-height:1.4}
[data-territory-list] small{font-size:12px;font-weight:500}
.stop-access-section{margin:12px 0 16px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fbfd}
.stop-access-section>summary{font-weight:750;cursor:pointer;line-height:1.5}
.stop-access-section[open]>summary{margin-bottom:16px}
.stop-access-summary{display:flex;flex-direction:column;gap:5px;margin:10px 0;padding:12px 14px;border:1px solid #e5d5a5;border-radius:12px;background:#fffaeb;color:#604b24;overflow-wrap:anywhere;font-size:14px;line-height:1.5;text-align:center}
.stop-access-summary strong{font-weight:750}.stop-access-summary p{margin:0}
@media(max-width:760px){
 body:not(.route-driving-mode) .main-content{width:100%;max-width:620px;margin-inline:auto;padding:20px 14px 110px}
 .main-content h1,.main-content h2,.main-content h3{overflow-wrap:anywhere}
 body:not(.route-driving-mode) .map-command{gap:18px;margin-bottom:22px}
 .map-command-title,.page-head{flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px}
 .map-command-title h1,.page-head h1{font-size:28px;line-height:1.2}
 .map-command-title>span{font-size:14px;line-height:1.5}
 .main-content .notice{text-align:center;font-size:14px;line-height:1.6;padding:14px 16px;margin-bottom:18px}
 .map-command .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .map-command .metric{flex-direction:column;justify-content:center;text-align:center;align-items:center;gap:10px;padding:16px 10px;min-height:116px}
 .map-command .metric .number{font-size:28px}
 .map-command .metric .label{font-size:13px;margin-top:5px;white-space:normal;line-height:1.4}
 .map-command .metric-icon{width:36px;height:36px;border-radius:12px}
 .map-command .toolbar{width:100%;gap:14px;justify-content:center}
 .map-command .toolbar-left,.map-command .toolbar-right{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;justify-content:center}
 .map-command .toolbar-right select{grid-column:1/-1;width:100%;min-width:0;text-align:center}
 .map-command .map-route-actions .route-start-btn{grid-column:1/-1}
 .map-command .map-route-actions .btn:not(.route-start-btn){flex:initial}
 .map-command #newPointActions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
 .main-content .btn{justify-content:center;text-align:center;min-height:44px;font-size:14px;line-height:1.35;white-space:normal;padding:11px 12px;gap:6px}
 .main-content .toolbar-left,.main-content .toolbar-right,.main-content .filter-chips{justify-content:center}
 .main-content .card-head,.main-content .map-toolbar{flex-direction:column;align-items:center;text-align:center;justify-content:center;gap:14px;padding:20px 16px}
 body:not(.route-driving-mode) .map-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}
 body:not(.route-driving-mode) .map-tools>.btn:last-child:nth-child(odd){grid-column:1/-1}
 .card-body{text-align:center;padding-inline:16px}
 .card-body p{line-height:1.6}
 .map-foot{justify-content:center;gap:12px;padding:16px 12px}.map-hint{width:100%;margin:0;text-align:center}
 .map-command .map-status-filters{padding:14px!important}
 .map-status-filters summary,.work-maps-panel>summary,.territory-panel>summary{text-align:center;line-height:1.5;font-size:15px;list-style-position:inside}
 .map-status-filters>div{justify-content:center}
 .work-maps-panel,.territory-panel{margin:0 0 16px;padding:16px;border-radius:16px}
 .work-maps-panel[open]>summary,.territory-panel[open]>summary{margin-bottom:16px}
 .work-maps-panel small,.territory-panel small{display:block;line-height:1.5;text-align:center}
 .work-maps-panel .territory-actions,.territory-actions{justify-content:center;gap:10px;margin:14px 0}
 .territory-actions>.btn{flex:1 1 135px;max-width:100%;min-height:44px;font-size:14px}
 .territory-actions>label:not(.btn){display:grid;gap:8px;width:100%;text-align:center;font-size:14px}
 .territory-actions>.field,.territory-actions>.select{width:100%;min-width:0;flex-basis:100%}
 .territory-help{text-align:center;font-size:14px}
 .territory-extra>summary{text-align:center;list-style-position:inside;min-height:36px}
 [data-territory-list]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 [data-territory-list]>.btn{font-size:14px;padding:12px 8px;overflow-wrap:anywhere}
 [data-territory-list]>small{grid-column:1/-1}
 .work-map-row{justify-content:center;gap:10px;padding:14px 0;margin:0;border-top:1px solid var(--line)}
 .work-map-row>label{justify-content:center;flex:1 0 100%;font-size:14px;text-align:center;overflow-wrap:anywhere}
 .work-map-row>.btn{flex:1 1 110px}
 .map-workspace-side .map-quick-panels{grid-template-columns:minmax(0,1fr);gap:16px}
 .map-workspace-side .map-accordion-summary{position:relative;display:flex;justify-content:center;gap:12px;padding:18px 16px;min-height:80px}
 .map-workspace-side .map-accordion-heading{text-align:center;flex:0 1 auto}
 .map-workspace-side .map-accordion-heading strong{font-size:16px}
 .map-workspace-side .map-accordion-heading small{font-size:13px;line-height:1.5}
 .map-workspace-side .map-accordion-chevron{margin-left:0}
 .map-points-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
 .map-points-actions .btn{flex:1 1 130px}
 .map-filter-heading{text-align:center;font-size:14px;line-height:1.5;padding:10px}
 .stop-row{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;gap:8px;text-align:center;padding:16px 10px}
 .stop-row>.ico:last-child{display:none}.stop-row .stop-dot{justify-self:center}
 .stop-name{white-space:normal;font-size:15px;line-height:1.5}
 .stop-meta,.stop-prior{white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.5;margin-top:6px}
 .bulk-stop-row{gap:6px}.bulk-stop-row>input{width:22px;height:22px;flex-shrink:0}
 .jornada-card .card-head,.jornada-card .jornada-actions{justify-content:center}
 .soft-card{text-align:center}
 .premium-detail>summary{justify-content:center;text-align:center;font-size:16px;gap:10px}
 .premium-detail>summary .ico:last-child{margin-left:0}
 .premium-summary{gap:18px}
 .modal-overlay{padding:12px}
 .modal-window{margin-inline:auto;border-radius:20px;max-height:calc(100dvh - 24px)}
 .modal-head{position:relative;justify-content:center;text-align:center;min-height:68px;padding:18px 48px}
 .modal-head h2{font-size:20px}.modal-head .modal-close{position:absolute;right:12px;top:16px}
 .modal-foot{justify-content:center;display:flex;flex-wrap:wrap;gap:10px;padding:16px}
 .modal-foot>.btn{flex:1 1 130px;min-height:46px;font-size:14px;justify-content:center}
 .stop-sheet .modal-head{padding:18px 48px}.stop-sheet .modal-body{padding:16px}
 .stop-sheet .stop-form-compact{gap:22px}
 .stop-sheet h3{text-align:center;font-size:17px;margin:0 0 14px}
 .stop-sheet .toolbar{justify-content:center;gap:10px;margin-bottom:14px}
 .stop-sheet .toolbar h3{width:100%;text-align:center}
 .stop-sheet .form-field{gap:8px;margin-bottom:14px}
 .stop-sheet .form-field>label,.stop-sheet-location>label{font-size:14px}
 .stop-sheet .field,.stop-sheet .select,.stop-sheet .text-area{min-height:46px;padding:11px 12px;font-size:16px;text-align:left}
 .stop-sheet .text-area{min-height:84px}
 .stop-sheet .notification-row{padding:14px 10px;margin-bottom:14px}
 .stop-sheet .notification-row .row-line{grid-template-columns:28px minmax(0,1fr) 32px;gap:8px}
 .stop-sheet .row-line .notif-recipient{grid-column:1/-1;grid-row:2}
 .stop-sheet .status-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
 .stop-sheet .status-btn{min-height:44px;font-size:13px;padding:9px 6px}
 .stop-sheet-search{grid-template-columns:minmax(0,1fr);gap:8px}
 .stop-sheet-search .stop-search-btn{width:100%;min-height:44px;margin:0 0 12px}
 .stop-sheet-pin-actions,.stop-evidence-actions{justify-content:center;gap:10px}
 .stop-sheet-pin-actions>.btn,.stop-evidence-actions>.btn{flex:1 1 130px;min-height:44px}
 .point-palette{justify-content:center;gap:12px;padding:8px 0}
 .point-palette span{width:34px;height:34px}
 .stop-sheet-appearance,.stop-sheet-evidence{padding-top:18px}
 .stop-evidence-header{flex-direction:column;align-items:center;text-align:center;gap:4px;margin-bottom:14px}
 .territory-dialog{width:calc(100vw - 28px);max-width:520px;margin:auto;padding:22px 18px;border-radius:20px;max-height:calc(100dvh - 28px)}
 .territory-dialog h2{text-align:center;font-size:21px;margin-bottom:20px}
 .territory-dialog label{margin:16px 0;gap:8px;font-size:14px}
 .territory-dialog .field,.territory-dialog .select,.territory-dialog .text-area{font-size:16px;min-height:46px}
 .territory-dialog p{text-align:center;font-size:14px;line-height:1.6}
 .territory-dialog .territory-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:20px}
 .territory-dialog .territory-actions>.btn{min-height:44px;font-size:14px;white-space:normal}
 .territory-dialog .territory-actions>.primary{grid-column:1/-1}
 .stop-access-section{padding:14px;margin:0 0 18px}
 .stop-access-section>summary{text-align:center;list-style-position:inside}
}
@media(max-width:965px) and (max-height:500px) and (orientation:landscape){
 body:not(.route-driving-mode) .main-content{max-width:none;padding:10px 16px 82px}
 .map-toolbar,.map-tools,.toolbar-left,.toolbar-right{justify-content:center;gap:8px}
 .map-command .btn,.map-tools .btn{font-size:13px;min-height:36px;padding:7px 10px}
 .map-command-title h1{font-size:23px}
 .map-workspace-side .map-quick-panels{grid-template-columns:repeat(2,minmax(0,1fr))}
 .modal-head,.modal-foot{padding-block:10px}.modal-window{max-height:calc(100dvh - 12px)}
}
/* Keep the local reference form actions reachable without scrolling the whole dialog. */
.territory-dialog{overflow:hidden}
.territory-dialog form{display:flex;flex-direction:column;max-height:calc(90dvh - 40px);overflow:hidden}
.territory-dialog-fields{overflow:auto;min-height:0;padding-right:4px}
.territory-dialog .territory-actions{flex-shrink:0;margin-bottom:0;background:var(--paper,#fff)}
.territory-dialog [data-ref-error]:empty{display:none}
@media(max-width:760px){
 .topbar{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:12px;padding:16px 14px;text-align:center}
 .topbar .mobile-brand{display:flex;align-items:center;justify-content:center;width:100%}
 .topbar .official-brand-logo{width:160px;max-width:70%;height:auto;margin-inline:auto}
 .topbar .top-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin:0;width:100%;gap:8px}
 .topbar .account-session{width:100%;max-width:360px;margin:0;align-items:center;text-align:center}
 .topbar .account-session-copy,.topbar .account-session-actions{justify-content:center;text-align:center;align-items:center}
 .topbar .account-session-email{max-width:100%;overflow-wrap:anywhere}
 .topbar .today-pill{display:none}
 .topbar #quickImport,.topbar #quickBackup{display:none}
 .territory-dialog form{max-height:calc(100dvh - 72px)}
 .territory-dialog .territory-actions{margin-top:14px}
}
@media(max-width:965px) and (max-height:500px) and (orientation:landscape){
 .territory-dialog{padding:14px 18px;max-height:calc(100dvh - 16px)}
 .territory-dialog form{max-height:calc(100dvh - 44px)}
 .territory-dialog h2{text-align:center;font-size:20px}
 .territory-dialog .territory-actions{justify-content:center;gap:8px;margin:10px 0 0}
 .territory-dialog .territory-actions>.btn{min-height:36px;font-size:13px;padding:8px 12px}
}
@media(max-width:760px){
 .topbar .account-session{display:flex;flex-direction:column;gap:8px}
 .topbar .account-session-actions{display:flex;justify-content:center;flex-wrap:wrap;width:100%;gap:6px}
}
@media(max-width:760px){
 .topbar .account-session-copy{flex:0 0 auto;min-height:0}
}
/* Select and transfer delivery points independently from route planning. */
.bulk-selection-bar{position:sticky;top:8px;z-index:1180;padding:16px;margin:0 0 16px;border:1px solid #bcb2ef;border-radius:16px;background:#f7f5ff;box-shadow:0 6px 18px #14283f14;text-align:center}
.bulk-selection-bar>strong{display:block;color:var(--navy);font-size:16px}.bulk-selection-bar>p{margin:8px 0 14px;font-size:14px;line-height:1.5;color:var(--muted)}
.bulk-selection-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.bulk-stop-row.is-bulk-selected{background:#efedff;border-radius:12px;outline:2px solid #8b78dc;outline-offset:-2px}
.bulk-stop-row.is-bulk-selected .stop-row{background:transparent}
.pt-marker.bulk-selected{outline:4px solid #7862d7;outline-offset:5px;box-shadow:0 0 0 10px #fff9,0 4px 14px #14283f33}
.bulk-coincident-option{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:14px;margin:10px 0;cursor:pointer}
.bulk-coincident-option input{width:22px;height:22px;flex:none}.bulk-coincident-option small{display:block;margin-top:5px}
.bulk-move-intro{text-align:center;line-height:1.6}.bulk-move-list{margin-top:18px}.bulk-move-list>summary{cursor:pointer;font-weight:700}.bulk-move-list p{padding:8px 0;margin:0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
@media(max-width:760px){.bulk-selection-bar{top:6px;padding:14px}.bulk-selection-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bulk-selection-actions>.primary{grid-column:1/-1;grid-row:1}.bulk-selection-actions>.btn:last-child{grid-column:1/-1}.bulk-selection-bar>p{font-size:13px;margin:6px 0 10px}.bulk-selection-actions>.btn{min-height:42px;padding:9px 8px;font-size:13px}}
@media(max-height:500px) and (orientation:landscape){.bulk-selection-bar{position:static;padding:10px}.bulk-selection-bar>p{margin:4px 0 8px}.bulk-selection-actions .btn{min-height:34px;padding:6px 10px;font-size:13px}}
@media(max-width:760px){
 .bulk-selection-actions>.primary{grid-column:auto;grid-row:auto}
 .bulk-selection-actions>.btn:last-child{grid-column:auto}
}

/* Permanent territory and safe map administration. */
.territory-select{display:flex;align-items:center;gap:8px;min-width:0}.territory-select>button{flex:1;min-width:0;overflow-wrap:anywhere}.territory-select>input{width:20px;height:20px;flex:none}.territory-photos{display:flex;gap:10px;flex-wrap:wrap}.territory-photos img{display:block;width:96px;height:80px;object-fit:cover;border-radius:8px}.territory-icon.bloqueado span{background:#fff1f2;color:#9f1239}.territory-icon.observacion span{background:#fffbeb;color:#92400e}.notification-history{padding:10px 0;overflow-wrap:anywhere}.notification-history summary{cursor:pointer;font-weight:600}.notification-history p{border-left:2px solid #d4dcec;padding-left:10px}.work-map-row{flex-wrap:wrap;gap:6px}.work-map-row>label{flex:1 1 100%;overflow-wrap:anywhere}.territory-dialog label{min-width:0}.territory-dialog .territory-actions{justify-content:center;flex-wrap:wrap}.territory-dialog textarea{width:100%;box-sizing:border-box}.territory-panel [data-ref-results]{display:grid;gap:8px}.territory-panel [data-ref-results] button{white-space:normal;overflow-wrap:anywhere}
@media(max-width:760px){.map-command-title{text-align:center;align-items:center}.work-maps-panel>summary,.territory-panel>summary{text-align:center}.territory-primary-actions{justify-content:center}.work-map-row .btn{flex:1 1 auto}.territory-select{flex:1 1 100%}.map-toolbar .toolbar-right{justify-content:center;flex-wrap:wrap}.territory-dialog{max-width:calc(100vw - 24px);box-sizing:border-box}.territory-dialog .btn{min-height:40px}.notification-history{font-size:13px}}
@media(max-height:500px) and (orientation:landscape){.map-toolbar .btn,.territory-actions .btn,.work-map-row .btn{min-height:30px;padding:5px 8px;font-size:12px}.territory-panel,.work-maps-panel{margin-block:5px}.territory-dialog{max-height:92dvh}.territory-dialog .territory-actions .btn{min-height:30px;padding:5px 8px}}

.stop-dot.no_entregado,.legend-dot.no_entregado{background:#b45309}.stop-dot.rechazado,.legend-dot.rechazado{background:#be123c}.status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.status-btn{white-space:normal;min-width:0}
.territory-panel [data-territory-list]{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.territory-panel .territory-select{display:flex;flex-direction:row;align-items:center;text-align:left;gap:10px;width:100%;box-sizing:border-box}.territory-select>.btn{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:4px;white-space:normal;line-height:1.4;overflow-wrap:break-word}.territory-select strong{word-break:normal}
@media(max-width:760px){.map-command .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.map-command .metric{min-height:70px;padding:10px;display:flex;flex-direction:row;justify-content:center;gap:8px}.map-command .metric-icon{width:30px;height:30px;margin:0}.map-command .metric .number{font-size:23px}.map-command .metric .label{font-size:11px;line-height:1.3}.map-command .metric-link-arrow{display:none}.map-command .metrics{margin-block:12px}}
