:root{
  --lam-bg:#020d0b;
  --lam-bg-soft:#061813;
  --lam-surface:rgba(4,31,25,.82);
  --lam-surface-strong:rgba(3,24,20,.94);
  --lam-surface-soft:rgba(13,54,44,.58);
  --lam-line:rgba(128,224,181,.24);
  --lam-line-strong:rgba(91,239,161,.5);
  --lam-text:#f2fff7;
  --lam-muted:#b4d1c4;
  --lam-green:#45ef9b;
  --lam-green-2:#9cf270;
  --lam-cyan:#66d8f5;
  --lam-blue:#58aef6;
  --lam-amber:#f1ba42;
  --lam-orange:#f48a43;
  --lam-red:#f26152;
  --lam-violet:#b891ff;
  --lam-radius-xs:10px;
  --lam-radius-sm:14px;
  --lam-radius:20px;
  --lam-radius-lg:28px;
  --lam-shadow:0 24px 70px rgba(0,0,0,.38);
  --lam-shadow-soft:0 12px 34px rgba(0,0,0,.24);
  --lam-font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}

html{color-scheme:dark}
body.lam-premium-active{
  margin:0;
  min-width:0;
  min-height:100vh;
  min-height:100dvh;
  background:
    radial-gradient(circle at 14% 8%,rgba(24,135,92,.16),transparent 34rem),
    radial-gradient(circle at 86% 16%,rgba(34,113,123,.12),transparent 34rem),
    var(--lam-bg);
  color:var(--lam-text);
  font-family:var(--lam-font);
}

body.lam-premium-active > .lam-hub-return,
body.lam-premium-active main > .card:first-of-type > a[href*="index.html"]{
  display:none!important;
}
.lam-shell-home{display:none!important}
.lam-global-hub-return{
  position:fixed!important;
  left:auto!important;
  right:max(14px,env(safe-area-inset-right));
  top:max(104px,10.2dvh);
  z-index:2147481900;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:108px;
  min-height:42px;
  padding:0 15px;
  border:1px solid rgba(105,242,174,.56);
  border-radius:999px;
  background:rgba(2,31,24,.94);
  box-shadow:0 12px 32px rgba(0,0,0,.34),inset 0 0 18px rgba(72,239,159,.08);
  color:#f3fff8!important;
  font:850 12px/1 var(--lam-font,Inter,system-ui,sans-serif);
  text-decoration:none!important;
  backdrop-filter:blur(13px);
}
.lam-global-hub-return span{color:#69efad;font-size:17px;line-height:1}
.lam-global-hub-return:hover,.lam-global-hub-return:focus-visible{border-color:#77ffb6;background:rgba(18,103,73,.96);box-shadow:0 0 0 3px rgba(70,239,157,.14),0 14px 34px rgba(0,0,0,.38);outline:0}
body.lam-premium-active *{box-sizing:border-box}
body.lam-premium-active img,body.lam-premium-active svg{max-width:100%}

.lam-global-shell{
  position:relative;
  z-index:2147482000;
  width:100%;
  min-width:0;
  padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));
  border-bottom:1px solid var(--lam-line);
  background:linear-gradient(180deg,rgba(1,15,12,.97),rgba(2,20,16,.92));
  box-shadow:0 12px 40px rgba(0,0,0,.2);
}
.lam-shell-row{
  width:min(1760px,100%);
  min-width:0;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(210px,1.1fr) minmax(190px,.72fr) minmax(360px,1.45fr) minmax(280px,1.2fr);
  align-items:center;
  gap:10px;
}
.lam-shell-brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--lam-text);
  text-decoration:none;
}
.lam-shell-brand img{
  width:48px;
  height:48px;
  flex:0 0 48px;
  object-fit:contain;
  border-radius:50%;
  filter:drop-shadow(0 8px 16px rgba(0,0,0,.32));
}
.lam-shell-brand-copy{min-width:0;display:grid;line-height:1.05}
.lam-shell-brand-copy strong{font-size:clamp(19px,1.7vw,28px);letter-spacing:.035em;color:var(--lam-green)}
.lam-shell-brand-copy span{margin-top:3px;font-size:11px;font-weight:750;color:var(--lam-text);white-space:normal}
.lam-shell-brand-copy small{margin-top:3px;font-size:9px;color:var(--lam-muted)}

.lam-shell-project{
  max-width:100%;
  overflow:hidden;
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-height:46px;
  padding:5px 10px;
  border:1px solid var(--lam-line);
  border-radius:14px;
  background:rgba(6,40,32,.7);
}
.lam-project-signal{width:9px;height:9px;border-radius:50%;background:var(--lam-green);box-shadow:0 0 13px rgba(69,239,155,.9)}
.lam-shell-project label{width:100%;max-width:100%;min-width:0;display:grid;gap:1px;overflow:hidden}
.lam-shell-project small{font-size:8px;letter-spacing:.11em;text-transform:uppercase;color:var(--lam-muted)}
.lam-shell-project select{
  width:100%;
  min-width:0;
  height:24px;
  padding:0 24px 0 0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--lam-text);
  font:800 12px/1 var(--lam-font);
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}
.lam-shell-project option{background:#06251d;color:#fff}

.lam-phase-nav{
  min-width:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  padding:4px;
  gap:4px;
  border:1px solid var(--lam-line);
  border-radius:16px;
  background:rgba(3,24,20,.7);
}
.lam-phase-nav a{
  min-width:0;
  min-height:42px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:7px;
  padding:6px 10px;
  border:1px solid transparent;
  border-radius:12px;
  color:var(--lam-muted);
  text-decoration:none;
  transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}
.lam-phase-nav a:hover,.lam-phase-nav a:focus-visible{color:#fff;border-color:var(--lam-line-strong);background:rgba(69,239,155,.1)}
.lam-phase-nav a[aria-current="page"]{color:#fff;border-color:rgba(90,245,168,.64);background:linear-gradient(145deg,rgba(24,142,94,.94),rgba(15,93,71,.9));box-shadow:0 0 22px rgba(69,239,155,.18)}
.lam-phase-nav .lam-phase-number{font-size:9px;color:var(--lam-green);font-weight:900}
.lam-phase-nav .lam-phase-label{min-width:0;font-size:12px;font-weight:900;white-space:nowrap;text-transform:uppercase}

.lam-shell-tools{min-width:0;display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap}
.lam-shell-pwa-slot{display:inline-flex;align-items:center}
.lam-shell-tools .lam-pwa-install-button{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0;
  padding:0 11px;
  border:1px solid rgba(90,245,168,.64);
  border-radius:12px;
  background:linear-gradient(145deg,rgba(24,142,94,.96),rgba(15,93,71,.94));
  color:#fff;
  font:900 10px/1 Inter,system-ui,sans-serif;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 0 22px rgba(69,239,155,.18);
}
.lam-shell-tools .lam-pwa-install-button::before{content:"↓";font-size:15px;line-height:1}
.lam-shell-tools .lam-pwa-install-button:hover,.lam-shell-tools .lam-pwa-install-button:focus-visible{border-color:#8ff5c1;background:linear-gradient(145deg,rgba(32,166,108,.98),rgba(18,112,82,.96))}
.lam-shell-tools>a,.lam-shell-user,.lam-shell-menu>summary{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 11px;
  border:1px solid var(--lam-line);
  border-radius:12px;
  background:rgba(7,35,29,.72);
  color:var(--lam-text);
  text-decoration:none;
  font-size:10px;
  font-weight:800;
}
.lam-shell-user{max-width:140px;color:#ffe6a6;border-color:rgba(241,186,66,.4);background:rgba(111,77,12,.32)}
.lam-shell-user span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lam-shell-tools>a:hover,.lam-shell-tools>a:focus-visible,.lam-shell-menu>summary:hover{border-color:var(--lam-line-strong);background:rgba(34,111,81,.62)}
.lam-shell-tools{position:relative;z-index:3;overflow:visible}
.lam-shell-menu{position:relative;z-index:5}
.lam-shell-menu>summary{list-style:none;cursor:pointer}
.lam-shell-menu>summary::-webkit-details-marker{display:none}
.lam-shell-menu-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:min(280px,calc(100vw - 28px));
  display:grid;
  gap:6px;
  padding:10px;
  border:1px solid var(--lam-line-strong);
  border-radius:14px;
  background:rgba(2,24,19,.98);
  box-shadow:var(--lam-shadow);
  z-index:20;
  max-height:min(520px,calc(100dvh - 118px));
  overflow:auto;
  isolation:isolate;
}
.lam-shell-menu-panel a{min-height:42px;display:flex;align-items:center;padding:0 12px;border-radius:10px;color:#fff;text-decoration:none;font-size:12px;font-weight:800}
.lam-shell-menu-panel a:hover{background:rgba(69,239,155,.12)}
.lam-shell-help-slot{min-width:0;display:inline-flex;align-items:center;position:relative;z-index:6;overflow:visible}
.lam-shell-help-slot .lam-help-launcher,.lam-shell-help-slot [data-lam-help-launcher]{position:static!important;inset:auto!important;transform:none!important;min-height:38px!important;margin:0!important;max-width:210px!important}

.lam-global-popover-layer{
  position:fixed!important;
  inset:0!important;
  z-index:2147483647!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  overflow:visible!important;
  pointer-events:none!important;
  isolation:isolate!important;
  contain:layout style!important;
}
.lam-global-popover-layer>*{pointer-events:auto!important}
.lam-popover-portaled{
  position:fixed!important;
  right:auto!important;
  bottom:auto!important;
  z-index:2147483647!important;
  margin:0!important;
  box-sizing:border-box!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  visibility:visible!important;
  opacity:1!important;
}

.lam-shell-context{
  width:min(1760px,100%);
  min-width:0;
  margin:8px auto 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:var(--lam-muted);
  font-size:10px;
}
.lam-shell-breadcrumb{min-width:0;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.lam-shell-breadcrumb a{color:var(--lam-muted);text-decoration:none}
.lam-shell-breadcrumb strong{color:var(--lam-text)}
.lam-shell-status{min-width:0;max-width:min(46vw,620px);display:flex;align-items:center;gap:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lam-shell-status i{flex:0 0 auto}
.lam-shell-status i{width:7px;height:7px;border-radius:50%;background:var(--lam-green);box-shadow:0 0 10px rgba(69,239,155,.8)}

body.lam-project-switching::after{
  content:"Cambiando de proyecto…";
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(1,14,11,.9);
  color:#fff;
  font:900 clamp(18px,3vw,32px)/1.2 var(--lam-font);
}

.lam-v2-panel{
  min-width:0;
  border:1px solid var(--lam-line);
  border-radius:var(--lam-radius);
  background:linear-gradient(145deg,rgba(4,39,31,.84),rgba(2,24,20,.78));
  box-shadow:var(--lam-shadow-soft);
  backdrop-filter:blur(13px);
}
.lam-v2-eyebrow{font-size:10px;font-weight:950;letter-spacing:.13em;text-transform:uppercase;color:var(--lam-green)}
.lam-v2-empty{padding:18px;border:1px dashed rgba(170,220,198,.28);border-radius:14px;color:var(--lam-muted);font-size:13px;line-height:1.45;background:rgba(0,0,0,.12)}
.lam-v2-button{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 16px;
  border:1px solid var(--lam-line-strong);
  border-radius:12px;
  background:linear-gradient(145deg,rgba(25,140,92,.94),rgba(13,94,68,.92));
  color:#fff;
  text-decoration:none;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.lam-v2-button.secondary{background:rgba(5,38,31,.78);border-color:var(--lam-line)}
.lam-v2-button:hover,.lam-v2-button:focus-visible{border-color:#a4f8c8;filter:brightness(1.08)}
.lam-v2-kpis{min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(136px,1fr));gap:8px}
.lam-v2-kpi{min-width:0;padding:12px;border:1px solid var(--lam-line);border-radius:14px;background:rgba(3,31,25,.74)}
.lam-v2-kpi span{display:block;margin-bottom:7px;color:var(--lam-muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.lam-v2-kpi strong{display:block;color:#fff;font-size:clamp(18px,2vw,29px);line-height:1.05;white-space:normal}
.lam-v2-kpi small{display:block;margin-top:4px;color:var(--lam-muted);font-size:9px}

/* HUB */
body.lam-hub-v2-ready>.shell>.topbar,
body.lam-hub-v2-ready>.shell>.cockpit,
body.lam-hub-v2-ready>.shell>.modules-title,
body.lam-hub-v2-ready>.shell>.lam-os-purpose,
body.lam-hub-v2-ready>.shell>.module-groups,
body.lam-hub-v2-ready>.shell>.lam-command-workspace,
body.lam-hub-v2-ready>.shell>.lam-module-navigator,
body.lam-hub-v2-ready>.shell>.advanced-card,
body.lam-hub-v2-ready>.shell>.footer{display:none!important}
body.lam-hub-v2-ready>.shell{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
.lam-hub-v2{
  position:relative;
  min-width:0;
  min-height:calc(100vh - 104px);
  min-height:calc(100dvh - 104px);
  isolation:isolate;
  padding:clamp(18px,3vw,44px) max(16px,calc((100vw - 1660px)/2));
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:clamp(18px,2.2vw,30px);
}
.lam-hub-map,.lam-hub-shade{position:absolute;inset:0;z-index:-3}
.lam-hub-map{background:#0a1e19}
.lam-hub-map .leaflet-control-container{display:none}
.lam-hub-shade{z-index:-2;background:linear-gradient(90deg,rgba(1,13,10,.9),rgba(1,17,14,.56) 52%,rgba(1,16,13,.82)),linear-gradient(180deg,rgba(2,15,12,.18),rgba(2,15,12,.82) 78%,#02100d)}
.lam-hub-hero{min-width:0;text-align:center;display:grid;gap:4px;justify-items:center}
.lam-hub-hero h1{margin:0;font-size:clamp(34px,5vw,72px);letter-spacing:.06em;line-height:.95;text-shadow:0 10px 35px rgba(0,0,0,.45)}
.lam-hub-hero p{margin:0;color:#c9eadb;font-size:clamp(13px,1.3vw,19px);font-weight:800}
.lam-hub-main{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,330px);gap:20px;align-items:center}
.lam-workflow{min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,2vw,24px);align-items:stretch}
.lam-workflow-card{
  position:relative;
  min-width:0;
  min-height:clamp(290px,36vh,430px);
  padding:clamp(20px,2.4vw,34px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  border:1px solid var(--phase-line,var(--lam-line-strong));
  border-radius:28px;
  background:linear-gradient(155deg,var(--phase-bg,rgba(4,56,39,.8)),rgba(2,22,19,.82));
  box-shadow:0 24px 70px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.08);
  color:#fff;
  text-decoration:none;
  overflow:clip;
  transition:transform .24s ease,border-color .24s ease,box-shadow .24s ease;
}
.lam-workflow-card::before{content:"";position:absolute;width:230px;height:230px;border-radius:50%;right:-70px;top:-80px;background:radial-gradient(circle,var(--phase-glow,rgba(69,239,155,.28)),transparent 70%)}
.lam-workflow-card:hover,.lam-workflow-card:focus-visible{transform:translateY(-5px);border-color:#c5ffe0;box-shadow:0 28px 78px rgba(0,0,0,.43),0 0 35px var(--phase-glow,rgba(69,239,155,.22))}
.lam-workflow-card.manage{--phase-bg:rgba(3,43,55,.84);--phase-line:rgba(86,179,240,.5);--phase-glow:rgba(86,179,240,.26)}
.lam-workflow-card.decide{--phase-bg:rgba(43,31,65,.82);--phase-line:rgba(190,142,255,.52);--phase-glow:rgba(190,142,255,.25)}
.lam-workflow-top{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--lam-green);font-weight:900}
.lam-workflow-card.manage .lam-workflow-top{color:var(--lam-cyan)}
.lam-workflow-card.decide .lam-workflow-top{color:#d8b9ff}
.lam-workflow-icon{width:86px;height:86px;display:grid;place-items:center;margin:20px auto;border:1px solid currentColor;border-radius:50%;font-size:39px;background:rgba(0,0,0,.2);box-shadow:0 0 30px currentColor}
.lam-workflow-card h2{margin:0;text-align:center;font-size:clamp(24px,2.2vw,36px);letter-spacing:.02em;white-space:nowrap}
.lam-workflow-card p{margin:8px 0 18px;text-align:center;color:#d0e7dc;font-size:13px;line-height:1.45}
.lam-workflow-action{min-height:48px;display:flex;align-items:center;justify-content:center;border:1px solid currentColor;border-radius:13px;background:rgba(0,0,0,.14);font-weight:900}
.lam-territory-panel{min-width:0;padding:20px;display:grid;gap:14px;align-self:stretch}
.lam-territory-panel h2{margin:0;font-size:clamp(21px,2vw,31px);overflow-wrap:anywhere}
.lam-territory-list{display:grid;gap:8px}
.lam-territory-stat{min-width:0;display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;align-items:center;padding:9px;border-radius:12px;background:rgba(0,0,0,.18)}
.lam-territory-stat i{width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--lam-line);border-radius:10px;color:var(--lam-green);font-style:normal;font-size:15px}
.lam-territory-stat span{display:block;color:var(--lam-muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.lam-territory-stat strong{display:block;margin-top:2px;font-size:14px;overflow-wrap:anywhere}
.lam-quick-dock{min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));border:1px solid var(--lam-line);border-radius:20px;background:rgba(2,24,20,.86);backdrop-filter:blur(14px);overflow:clip}
.lam-quick-dock a{min-width:0;min-height:92px;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;padding:14px;border-right:1px solid var(--lam-line);color:#fff;text-decoration:none}
.lam-quick-dock a:last-child{border-right:0}
.lam-quick-dock a:hover,.lam-quick-dock a:focus-visible{background:rgba(69,239,155,.09)}
.lam-quick-dock i{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--lam-line-strong);border-radius:11px;color:var(--lam-green);font-style:normal;font-weight:950}
.lam-quick-dock strong{display:block;font-size:13px;line-height:1.1}
.lam-quick-dock small{display:block;margin-top:4px;color:var(--lam-muted);font-size:10px;line-height:1.3}

/* Phase portals */
.lam-phase-page{--phase-accent:var(--lam-green);--phase-accent-soft:rgba(69,239,155,.16);min-width:0}
.lam-phase-page[data-lam-phase="gestionar"]{--phase-accent:var(--lam-cyan);--phase-accent-soft:rgba(86,179,240,.15)}
.lam-phase-page[data-lam-phase="decidir"]{--phase-accent:var(--lam-violet);--phase-accent-soft:rgba(184,145,255,.15)}
.lam-phase-main{width:min(1760px,100%);min-width:0;margin:0 auto;padding:clamp(16px,2.2vw,34px);display:grid;gap:16px}
.lam-phase-heading{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,1fr);gap:18px;align-items:end}
.lam-phase-title{min-width:0}
.lam-phase-title h1{margin:6px 0 0;font-size:clamp(34px,4.6vw,70px);line-height:.96;letter-spacing:-.025em;overflow-wrap:anywhere;word-break:normal;hyphens:auto}
.lam-phase-title h1 span{color:var(--phase-accent)}
.lam-phase-title p{margin:10px 0 0;color:var(--lam-muted);font-size:clamp(13px,1.35vw,18px)}
.lam-phase-heading .lam-v2-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
.lam-phase-workspace{min-width:0;display:grid;gap:12px;align-items:stretch}
.lam-phase-workspace.leer{grid-template-columns:minmax(320px,.78fr) minmax(520px,1.35fr)}
.lam-phase-workspace.gestionar{grid-template-columns:minmax(360px,.85fr) minmax(520px,1.3fr)}
.lam-phase-workspace.decidir{grid-template-columns:minmax(260px,.7fr) minmax(430px,1.2fr) minmax(270px,.75fr)}
.lam-phase-primary,.lam-phase-side,.lam-phase-map-panel{min-width:0;padding:16px}
.lam-phase-primary{display:grid;gap:12px;align-content:start}
.lam-phase-primary h2,.lam-phase-side h2{margin:0;font-size:clamp(22px,2vw,32px)}
.lam-phase-primary p,.lam-phase-side p{margin:0;color:var(--lam-muted);font-size:12px;line-height:1.5}
.lam-phase-feature{
  min-width:0;
  min-height:190px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 150px;
  gap:14px;
  align-items:center;
  padding:18px;
  border:1px solid color-mix(in srgb,var(--phase-accent) 48%,transparent);
  border-radius:18px;
  background:radial-gradient(circle at 90% 20%,var(--phase-accent-soft),transparent 55%),rgba(2,28,23,.62);
}
.lam-phase-feature-icon{width:130px;height:130px;display:grid;place-items:center;border:1px solid var(--phase-accent);border-radius:50%;color:var(--phase-accent);font-size:54px;box-shadow:0 0 34px var(--phase-accent-soft)}
.lam-module-clusters{min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lam-module-cluster{min-width:0;padding:12px;border:1px solid var(--lam-line);border-radius:14px;background:rgba(3,29,24,.68)}
.lam-module-cluster h3{margin:0 0 8px;color:var(--phase-accent);font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.lam-module-link{min-width:0;min-height:54px;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 0;border-top:1px solid rgba(137,219,183,.12);color:#fff;text-decoration:none}
.lam-module-link:first-of-type{border-top:0}
.lam-module-link i{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--lam-line);border-radius:10px;color:var(--phase-accent);font-style:normal;font-size:10px;font-weight:950}
.lam-module-link strong{display:block;font-size:12px;line-height:1.15}
.lam-module-link small{display:block;margin-top:2px;color:var(--lam-muted);font-size:9px;line-height:1.2}
.lam-module-state{max-width:84px;padding:4px 6px;border:1px solid var(--lam-line);border-radius:999px;color:var(--lam-muted);font-size:8px;text-align:center;white-space:normal}
.lam-module-state.ready{color:#a7ffd0;border-color:rgba(69,239,155,.46);background:rgba(28,128,85,.17)}
.lam-phase-map-panel{position:relative;min-height:clamp(410px,58vh,690px);overflow:clip}
.lam-phase-map{position:absolute;inset:0;z-index:0;background:#092019}
.lam-phase-map-shade{position:absolute;inset:0;z-index:350;pointer-events:none;background:linear-gradient(180deg,rgba(1,18,14,.08),rgba(1,15,12,.4))}
.lam-phase-map-caption{position:absolute;z-index:500;top:14px;left:14px;max-width:min(310px,calc(100% - 28px));padding:12px 14px;border:1px solid var(--lam-line);border-radius:14px;background:rgba(2,24,20,.9);box-shadow:var(--lam-shadow-soft)}
.lam-phase-map-caption span{display:block;color:var(--phase-accent);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.lam-phase-map-caption strong{display:block;margin-top:4px;font-size:16px;overflow-wrap:anywhere}
.lam-phase-map-caption small{display:block;margin-top:4px;color:var(--lam-muted);font-size:9px;line-height:1.35}
.lam-phase-map-action{position:absolute;z-index:500;right:14px;bottom:14px}
.lam-phase-map-panel .leaflet-control-zoom a{background:#07271f;color:#fff;border-color:rgba(69,239,155,.28)}
.lam-phase-map-panel .leaflet-control-attribution{background:rgba(2,20,16,.78);color:#b9d4c8;font-size:8px}
.lam-phase-map-panel .leaflet-control-attribution a{color:#8feeba}
.lam-phase-side{display:grid;gap:12px;align-content:start}
.lam-record-list{min-width:0;display:grid;gap:8px}
.lam-record-row{min-width:0;display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;padding:10px;border:1px solid var(--lam-line);border-radius:12px;background:rgba(3,29,24,.72)}
.lam-record-row>span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:var(--phase-accent);color:#041812;font-size:11px;font-weight:950}
.lam-record-row strong{display:block;font-size:12px;line-height:1.2;overflow-wrap:anywhere}
.lam-record-row small{display:block;margin-top:3px;color:var(--lam-muted);font-size:9px;line-height:1.3}
.lam-impact-strip{min-width:0;display:grid;grid-template-columns:minmax(180px,.7fr) repeat(4,minmax(120px,1fr));gap:8px;padding:10px}
.lam-impact-summary{padding:10px;display:grid;align-content:center}
.lam-impact-summary strong{font-size:17px}

@media (max-width:1280px){
  .lam-shell-row{grid-template-columns:minmax(190px,.9fr) minmax(170px,.7fr) minmax(330px,1.35fr) auto}
  .lam-shell-tools>a:not(.lam-shell-home),.lam-shell-user{display:none}
  .lam-phase-workspace.decidir{grid-template-columns:minmax(250px,.72fr) minmax(460px,1.28fr)}
  .lam-phase-workspace.decidir .lam-phase-side{grid-column:1/-1;grid-template-columns:minmax(220px,.55fr) minmax(0,1fr)}
  .lam-phase-workspace.decidir .lam-phase-side .lam-record-list{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:1020px){
  .lam-global-shell{padding-top:max(8px,env(safe-area-inset-top))}
  .lam-shell-row{grid-template-columns:minmax(180px,1fr) minmax(190px,1fr) auto}
  .lam-phase-nav{grid-column:1/-1;grid-row:2}
  .lam-shell-context{display:none}
  .lam-hub-v2{min-height:calc(100dvh - 138px);padding:20px 16px}
  .lam-hub-main{grid-template-columns:1fr}
  .lam-territory-panel{grid-template-columns:minmax(170px,.55fr) minmax(0,1fr);align-items:start}
  .lam-territory-panel .lam-v2-button{grid-column:1/-1}
  .lam-territory-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .lam-phase-heading{grid-template-columns:1fr}
  .lam-phase-workspace.leer,.lam-phase-workspace.gestionar,.lam-phase-workspace.decidir{grid-template-columns:1fr}
  .lam-phase-map-panel{grid-row:1;min-height:56vh}
  .lam-phase-workspace.decidir .lam-phase-side{grid-column:auto;grid-template-columns:1fr}
  .lam-phase-workspace.decidir .lam-phase-side .lam-record-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lam-impact-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
  .lam-impact-summary{grid-column:1/-1}
}

@media (max-width:720px){
  .lam-global-hub-return{top:70px;right:max(10px,env(safe-area-inset-right));min-width:86px;min-height:38px;padding:0 12px;font-size:11px}
  .lam-global-shell{padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))}
  .lam-shell-row{grid-template-columns:minmax(0,1fr) auto;gap:7px}
  .lam-shell-brand img{width:40px;height:40px;flex-basis:40px}
  .lam-shell-brand-copy strong{font-size:19px}
  .lam-shell-brand-copy span,.lam-shell-brand-copy small{display:none}
  .lam-shell-project{grid-column:1/-1;grid-row:2;min-height:42px}
  .lam-phase-nav{grid-column:1/-1;grid-row:3}
  .lam-phase-nav a{min-height:44px;grid-template-columns:1fr;justify-items:center;gap:1px;padding:4px}
  .lam-phase-nav .lam-phase-label{font-size:10px}
  .lam-shell-tools{grid-column:2;grid-row:1}
  .lam-shell-tools .lam-pwa-install-button{width:52px;min-width:52px;padding:0 6px;font-size:0}
  .lam-shell-tools .lam-pwa-install-button::before{content:"APP↓";font-size:10px;letter-spacing:.04em}
  .lam-shell-tools>.lam-shell-home{display:none}
  .lam-shell-menu>summary{width:42px;padding:0;font-size:0}
  .lam-shell-menu>summary::before{content:"☰";font-size:18px}
  .lam-shell-help-slot .lam-help-launcher,.lam-shell-help-slot [data-lam-help-launcher]{width:42px!important;max-width:42px!important;min-height:42px!important;padding:0!important}
  .lam-shell-help-slot .lam-help-label,.lam-shell-help-slot .lam-help-summary-state{display:none!important}
  .lam-hub-v2{min-height:calc(100dvh - 190px);padding:16px 12px;gap:14px}
  .lam-hub-main{align-items:start}
  .lam-workflow{grid-template-columns:1fr;gap:10px}
  .lam-workflow-card{min-height:150px;padding:16px;display:grid;grid-template-columns:58px minmax(0,1fr) 76px;grid-template-rows:auto auto;align-items:center;gap:6px 12px;border-radius:19px}
  .lam-workflow-top{grid-column:1;grid-row:1/-1;display:grid;justify-items:center}
  .lam-workflow-icon{width:54px;height:54px;margin:0;font-size:25px}
  .lam-workflow-card h2{grid-column:2;text-align:left;font-size:26px}
  .lam-workflow-card p{grid-column:2;margin:0;text-align:left;font-size:11px}
  .lam-workflow-action{grid-column:3;grid-row:1/-1;min-height:44px;font-size:11px}
  .lam-territory-panel{grid-template-columns:1fr;padding:15px}
  .lam-territory-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lam-territory-panel .lam-v2-button{grid-column:auto}
  .lam-quick-dock{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:16px}
  .lam-quick-dock a{min-height:72px;padding:10px;border-bottom:1px solid var(--lam-line)}
  .lam-phase-main{padding:14px 10px 22px}
  .lam-phase-title h1{font-size:clamp(34px,12vw,50px)}
  .lam-phase-heading .lam-v2-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lam-phase-map-panel{min-height:52vh;padding:0}
  .lam-phase-map-caption{top:10px;left:10px;max-width:calc(100% - 20px)}
  .lam-phase-map-action{right:10px;bottom:10px}
  .lam-phase-feature{grid-template-columns:1fr;min-height:0}
  .lam-phase-feature-icon{width:86px;height:86px;font-size:38px;grid-row:1;justify-self:center}
  .lam-module-clusters{grid-template-columns:1fr}
  .lam-phase-workspace.decidir .lam-phase-side .lam-record-list{grid-template-columns:1fr}
  .lam-impact-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lam-v2-kpi strong{font-size:20px}
}

@media (max-width:380px){
  .lam-territory-list{grid-template-columns:1fr}
  .lam-workflow-card{grid-template-columns:50px minmax(0,1fr);grid-template-rows:auto auto auto}
  .lam-workflow-top{grid-column:1;grid-row:1/3}
  .lam-workflow-card h2,.lam-workflow-card p{grid-column:2}
  .lam-workflow-action{grid-column:1/-1;grid-row:3}
  .lam-quick-dock{grid-template-columns:1fr}
  .lam-phase-heading .lam-v2-kpis,.lam-impact-strip{grid-template-columns:1fr}
}

@media (max-height:500px) and (orientation:landscape){
  .lam-global-shell{padding-block:5px}
  .lam-shell-row{grid-template-columns:minmax(140px,.8fr) minmax(160px,.8fr) minmax(300px,1.4fr) auto}
  .lam-shell-brand img{width:36px;height:36px;flex-basis:36px}
  .lam-shell-brand-copy span,.lam-shell-brand-copy small{display:none}
  .lam-shell-project{grid-column:auto;grid-row:auto;min-height:38px}
  .lam-phase-nav{grid-column:auto;grid-row:auto}
  .lam-phase-nav a{min-height:36px;grid-template-columns:auto 1fr}
  .lam-shell-tools{grid-column:auto;grid-row:auto}
  .lam-hub-v2{min-height:calc(100dvh - 60px)}
  .lam-phase-main{padding-block:10px}
  .lam-phase-heading{grid-template-columns:minmax(260px,.8fr) minmax(360px,1.2fr)}
  .lam-phase-title h1{font-size:28px;line-height:1;overflow-wrap:normal;hyphens:none}
  .lam-phase-map-panel{min-height:68vh}
}

@media (prefers-reduced-motion:reduce){
  .lam-workflow-card,.lam-phase-nav a,.lam-v2-button{transition:none!important}
}

/* LAM OS 1.1 shared form and readable map surfaces, 2026-10-02. */
body.lam-premium-active :is(.formGrid,.lamFieldGroupBody,.fieldgrid,.problemGrid){grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;align-items:stretch;gap:16px!important;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div),body.lam-premium-active :is(.fieldgrid,.problemGrid)>div{min-width:0;display:flex;flex-direction:column;align-self:stretch;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div)>label{line-height:1.4;overflow-wrap:anywhere;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div)>:is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){margin-top:auto;min-width:0;width:100%;box-sizing:border-box;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div)>:is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select:not([multiple])){min-height:48px;height:48px;line-height:1.35;padding:10px 12px;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div)>textarea{min-height:140px;resize:vertical;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div) :is(input,textarea)::placeholder{color:#a9c4b8;opacity:1;}
body.lam-premium-active :is(.formGrid>.field,.lamFieldGroupBody>.field,.fieldgrid>div,.problemGrid>div) select option{background:#0b2b22;color:#f2fff7;}
body.lam-premium-active :is(.leaflet-popup-content-wrapper,.leaflet-tooltip,.inventory-map-legend){background:#fff!important;color:#173c2c!important;color-scheme:light;--text:#173c2c;--muted:#3e6252;--lam-text:#173c2c;--lam-muted:#3e6252;}
body.lam-premium-active :is(.leaflet-popup-content,.leaflet-tooltip,.inventory-map-legend) :is(p,h2,h3,h4,label,strong,b,small,span,td,th){color:#173c2c!important;text-shadow:none;}
body.lam-premium-active :is(.leaflet-popup-content,.leaflet-tooltip,.inventory-map-legend) a{color:#075e3e!important;}
body.lam-premium-active .leaflet-popup-tip{background:#fff!important;}
@media(max-width:480px){body.lam-premium-active :is(.formGrid,.lamFieldGroupBody,.fieldgrid,.problemGrid){grid-template-columns:minmax(0,1fr)!important;}}

body.lam-premium-active :is(.fieldgrid,.problemGrid)>.span2{grid-column:1/-1;}

/* Keep module contents inside the actual sidebar, including SAA tab stacks. */
body.lam-premium-active .lam-module-sidepanel{grid-template-columns:minmax(0,1fr)!important;}
body.lam-premium-active .lam-module-sidepanel>*,body.lam-premium-active .lam-module-sidepanel :is(.tabStack,.tabPage,.cardBody){min-width:0;max-width:100%;box-sizing:border-box;}

/* Shared module identity: crop the existing territorial artwork to its map.
   No geometry, spacing, scrolling or control layout is changed. */
body.lam-premium-active > :is(main.app,.page,.shell) > header:is(.header,.top,.topbar,:not([class])),
body.lam-premium-active > header.bio-topbar{
  background:linear-gradient(90deg,rgba(1,23,18,.97),rgba(2,43,32,.91) 50%,rgba(2,30,24,.40)),url("../assets/visual-covers/lam-os-leer.png") right 42%/200% auto no-repeat!important;
  color:#f2fff7!important;
  box-shadow:inset 0 -2px 0 #3db784;
}
body.lam-premium-active > :is(main.app,.page,.shell) > header:is(.header,.top,.topbar,:not([class])) :is(h1,.brand-title),
body.lam-premium-active > header.bio-topbar .bio-brand strong{color:#f2fff7!important;text-shadow:0 2px 5px #00170e}
body.lam-premium-active > :is(main.app,.page,.shell) > header:is(.header,.top,.topbar,:not([class])) :is(p,.brand-sub),
body.lam-premium-active > header.bio-topbar small{color:#d8ede1!important}
@media(max-width:700px){
body.lam-premium-active > :is(main.app,.page,.shell) > header:is(.header,.top,.topbar,:not([class])),
body.lam-premium-active > header.bio-topbar{background:linear-gradient(100deg,rgba(1,28,21,.96),rgba(3,51,38,.75)),url("../assets/visual-covers/lam-os-leer.png") 85% 46%/600% auto no-repeat!important}
}
