
/* Navegación contextual y fichas documentales */
.module-tabs{overflow-y:auto;overscroll-behavior:contain}
.module-tab{position:relative;flex-shrink:0;transition:background .18s,transform .18s}
.module-tab:hover{transform:translateY(-2px)}
.module-tab.active::before{content:'';position:absolute;left:-5px;top:16px;bottom:16px;width:3px;background:var(--green2);border-radius:4px}
.nav-badge{position:absolute;right:2px;top:2px;min-width:17px;padding:2px 4px;border-radius:12px;font-size:9px;line-height:1.2;background:#c4dc78;color:#17332d;font-weight:800}
.module-panel.active{animation:panel-arrive .2s ease-out}
@keyframes panel-arrive{from{opacity:.4;transform:translateY(5px)}to{opacity:1;transform:none}}
.inventory-card{transition:border-color .2s,box-shadow .2s}
.inventory-card:hover,.inventory-card.selected{border-color:var(--green2);box-shadow:0 5px 18px #17332d16}
.inventory-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}
.inventory-card-footer small{font-size:10px;color:var(--muted)}
.inventory-locate,.dashboard-route-link{border:0;background:#edf4ef;color:var(--green);border-radius:8px;padding:8px;font-size:11px;font-weight:800;text-align:left}
.inventory-locate:hover,.dashboard-route-link:hover{background:#dcebe1}
.feature-actions{flex-wrap:wrap}
.inventory-media{width:100%;min-width:0}
.inventory-media h4{display:flex;justify-content:space-between;font-size:12px;margin:15px 0 8px}
.inventory-media h4 span{color:var(--muted)}
.inventory-gallery{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.inventory-gallery figure{margin:0;min-width:0}
.inventory-gallery img{display:block;width:100%;height:92px;object-fit:cover;border-radius:8px}
.inventory-gallery a:focus-visible{outline:3px solid var(--green2)}
.inventory-gallery figcaption{display:flex;justify-content:space-between;align-items:center;font-size:10px;padding:4px}
.inventory-gallery button{border:0;background:#fff2f0;color:var(--danger);min-width:28px;min-height:28px;border-radius:6px}
.media-upload{display:grid;gap:7px;padding:10px;margin-top:8px;border:1px dashed #a4c3b1;border-radius:9px;color:var(--green);font-size:11px;font-weight:750}
.media-upload input{max-width:100%;font-size:11px}
.media-download{display:block;text-decoration:none;font-size:11px;margin-bottom:8px}
.media-status{font-size:10px;line-height:1.5;color:var(--muted)}
[data-panel="affection"]>.layer-group-title{margin-top:22px}
[data-panel="dashboard"] .panel-copy{font-size:11px}
.dashboard-indices{display:grid;gap:9px;margin:16px 0}
.index-card{display:flex;gap:13px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}
.index-card h3{font-size:12px;margin:0 0 5px}
.index-card p{font-size:10px;color:var(--muted);line-height:1.4;margin:0}
.index-ring{width:65px;height:65px;flex:0 0 65px;display:grid;place-items:center;border-radius:50%;background:conic-gradient(var(--green2) calc(var(--progress)*1%),#e7eee8 0)}
.index-ring strong{display:grid;place-items:center;width:51px;height:51px;border-radius:50%;background:#fff;font-size:16px}
.sampling-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.sampling-stats article{padding:12px;background:#173f37;color:white;border-radius:12px}
.sampling-stats strong,.sampling-stats span{display:block}
.sampling-stats strong{font-size:24px;color:#d6e9a1}
.sampling-stats span{font-size:10px;line-height:1.4;margin-top:3px}
[data-panel="dashboard"] .dashboard-kpis span{font-size:10px}
[data-panel="dashboard"] .dashboard-kpis strong{font-size:24px}
[data-panel="dashboard"] .layer-group-title{font-size:12px;margin:24px 0 10px}
[data-panel="dashboard"] .coverage-item header{font-size:11px}
[data-panel="dashboard"] .coverage-item small{font-size:10px}
[data-panel="dashboard"] .route-progress-card header span{font-size:10px;white-space:normal}
[data-panel="dashboard"] .route-progress-card>div span{font-size:10px}
.stat-bar{padding:9px 0}
.stat-bar header{display:flex;justify-content:space-between;gap:10px;font-size:11px}
.stat-bar header span{line-height:1.5}
.progress-track i{animation:bar-arrive .5s ease-out;transform-origin:left}
@keyframes bar-arrive{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.weekly-bars{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:14px 10px;background:#fff;border:1px solid var(--line);border-radius:12px}
.weekly-bars article{text-align:center;min-width:0}
.weekly-bars article>div{height:75px;display:flex;align-items:flex-end;justify-content:center;margin:7px 0;background:#f3f6f2;border-radius:5px}
.weekly-bars i{display:block;width:65%;background:linear-gradient(0deg,#1f6556,#8dbf72);border-radius:5px 5px 0 0}
.weekly-bars span,.weekly-bars small{display:block;font-size:10px}
.weekly-bars small{font-size:8px;color:var(--muted);margin-top:4px}
.media-stats{padding:12px;border:1px solid var(--line);background:#edf4ef;border-radius:12px;font-size:11px;line-height:1.5}
.media-stats p{margin:5px 0;color:var(--muted)}
[data-panel="dashboard"] .activity-grid span{font-size:9px}
[data-panel="dashboard"] .requirement-note span{font-size:10px}
@media(min-width:981px){.workspace.dashboard-open{grid-template-columns:minmax(440px,44%) minmax(0,1fr)}}
@media(max-width:760px){
 .sidebar{width:min(410px,94vw);grid-template-columns:62px minmax(0,1fr)}
 .panel-scroll{padding:16px 12px 40px}
 .module-tab{min-height:60px}
 .module-tab span{font-size:7px;letter-spacing:0}
 .inventory-locate{min-height:40px}
 .feature-card{max-height:42%;bottom:auto}
 .map-stage.profile-collapsed .feature-card{bottom:auto}
 .sampling-stats strong{font-size:20px}
}
@media(prefers-reduced-motion:reduce){
 .module-panel.active,.progress-track i{animation:none}
 .module-tab,.inventory-card{transition:none}
}
/* Ruta visible/transparente y lectura inmediata de las barras del perfil */
.route-display-controls{padding:12px;margin:0 0 15px;background:#fff;border:1px solid var(--line);border-radius:12px}
.route-visibility{display:flex;align-items:center;gap:9px;font-size:12px;cursor:pointer}
.route-visibility input{width:18px;height:18px;accent-color:var(--green)}
.route-opacity{display:grid;grid-template-columns:1fr auto;gap:8px;margin:12px 0 7px;font-size:11px;color:var(--green)}
.route-opacity input{grid-column:1/-1;width:100%;margin:0;accent-color:var(--green);min-height:24px}
.route-opacity output{font-weight:800}
.route-display-controls>small{font-size:10px;color:var(--muted);line-height:1.5}
.profile-strip-tooltip{position:fixed;z-index:150;max-width:min(330px,calc(100vw - 24px));padding:10px 13px;border:1px solid #ffffff33;border-radius:10px;background:#153d35f5;color:#fff;box-shadow:0 8px 25px #102d2840;font-size:12px;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere;pointer-events:none}
.surface-segment,.classification-segment{cursor:help}
.surface-segment:hover,.classification-segment:hover,.surface-segment:focus-visible,.classification-segment:focus-visible{outline:2px solid #153d35;outline-offset:-2px;filter:brightness(1.15)}
.profile-panel.collapsed .profile-body{visibility:hidden;pointer-events:none}
.field-app-link{display:inline-flex;align-items:center;justify-content:center;min-height:38px;text-decoration:none;white-space:nowrap}
.field-live-box{margin:14px 0;padding:14px;background:#e8f2ee;border:1px solid #c7ddd3;border-radius:14px}
.field-live-box>strong{font-size:12px}.field-live-box p{font-size:11px;line-height:1.5;margin:8px 0}.field-live-box small{display:block;margin-top:9px;font-size:10px;line-height:1.5;color:var(--muted)}
.field-activity-route{width:100%;display:flex;gap:8px;justify-content:space-between;align-items:center;padding:10px;margin-top:6px;border:1px solid #c4dace;border-radius:9px;background:#fff;color:#173f37;font-size:10px;cursor:pointer}
.field-activity-route b{white-space:nowrap}

/* One shared discussion per map note; original text remains the first message. */
.note-chat-dialog{width:min(780px,calc(100vw - 24px));height:min(820px,90vh);height:min(820px,90dvh);max-height:90dvh;padding:0;overflow:hidden}
.note-chat-dialog[open]{display:flex;flex-direction:column}
.note-chat-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 22px;border-bottom:1px solid var(--line);background:#f1f6f1;flex:none}
.note-chat-header h2{font-size:20px;margin:0;overflow-wrap:anywhere}.note-chat-header .eyebrow{margin:0 0 6px}
.note-chat-header p:last-child{font-size:11px;color:var(--muted);margin:7px 0 0}.note-chat-header>button{flex:none;min-width:42px;min-height:42px}
.note-chat-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 20px;border-bottom:1px solid var(--line);flex:none}
.note-chat-toolbar label{display:flex;align-items:center;gap:8px;font-size:12px}.note-chat-toolbar select{padding:8px;font-size:12px;min-height:38px}
.note-chat-toolbar button{font-size:11px;min-height:38px}.note-chat-toolbar [hidden]{display:none!important}
.note-chat-connection{font-size:11px;line-height:1.4;color:var(--muted);padding:8px 20px;margin:0;background:#fff;flex:none}
.note-chat-messages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 20px;background:#edf2ed;display:flex;flex-direction:column;gap:12px}
.note-message{flex:none;max-width:88%;align-self:flex-start;padding:12px 15px;background:#fff;border:1px solid #dce6dd;border-radius:14px 14px 14px 3px;box-shadow:0 2px 6px #173d3508}
.note-message.mine{align-self:flex-end;background:#dfeee6;border-color:#bbd7c6;border-radius:14px 14px 3px 14px}
.note-message.initial{align-self:stretch;max-width:none;background:#fafbf5;border-left:4px solid #b7ca7b}
.note-message header{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap}
.note-message header strong{font-size:12px}.note-message header small,.note-message-origin{font-size:10px;color:#62736b}.note-message-origin{display:block;margin-top:8px}
.note-message p{margin:8px 0 0;font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.note-chat-dialog .note-chat-composer{padding:12px 20px 16px;flex:none;background:#fff;border-top:1px solid var(--line)}
.note-chat-composer>label{font-size:12px;font-weight:800;display:block;margin-bottom:6px}
.note-chat-composer textarea{width:100%;min-height:70px;max-height:160px;resize:vertical;font-size:16px;line-height:1.45}
.note-chat-composer>div{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.note-chat-composer small{font-size:10px;line-height:1.4;color:var(--muted)}.note-chat-composer button{min-height:44px;min-width:90px}.note-chat-composer .form-error{font-size:12px;line-height:1.4;margin:8px 0 0}
.note-chat-new{margin:6px auto;flex:none;font-size:12px}
#noteEditDialog{max-height:90vh;max-height:90dvh;overflow:auto}#noteEditDialog input,#noteEditDialog textarea{font-size:16px}
@media(max-width:760px){.note-chat-dialog{width:calc(100vw - 12px);max-width:none;height:94vh;height:94dvh;max-height:94dvh;border-radius:15px}.note-chat-header{padding:12px}.note-chat-header h2{font-size:17px}.note-chat-toolbar{padding:8px 12px;gap:6px}.note-chat-toolbar label{font-size:11px}.note-chat-messages{padding:12px;gap:10px}.note-message{max-width:94%;padding:10px 12px}.note-chat-dialog .note-chat-composer{padding:10px 12px max(12px,env(safe-area-inset-bottom))}.note-chat-composer small{display:none}.note-chat-composer textarea{min-height:60px;max-height:110px}.note-chat-connection{padding:6px 12px}}


