/* Grupo HP V12.10.11 — layout crítico. Cargado último para impedir regresiones visuales. */
html,body,#app{min-height:100%;}
body{overflow-x:hidden;}

/* LOGIN — composición fija y predecible */
.hp-login-v11{min-height:100vh!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:96px 32px 48px!important;background:#f7f9fb!important;position:relative!important;overflow:hidden!important;}
.hp-login-v11 .login-brandline{position:absolute!important;left:44px!important;top:30px!important;display:flex!important;align-items:center!important;gap:14px!important;z-index:5!important;}
.hp-login-v11 .login-brandline img{width:58px!important;height:38px!important;object-fit:contain!important;}
.hp-login-v11 .login-brandline strong{font-size:14px!important;color:#0b2f4e!important;}
.hp-login-stage-v11{width:min(1080px,94vw)!important;display:grid!important;grid-template-columns:minmax(0,1fr) 420px!important;gap:70px!important;align-items:center!important;position:relative!important;z-index:2!important;}
.hp-login-visual{min-width:0!important;height:610px!important;display:grid!important;grid-template-columns:230px minmax(0,1fr)!important;gap:42px!important;align-items:center!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;}
.hp-login-visual img{display:block!important;width:210px!important;height:560px!important;max-width:210px!important;max-height:560px!important;object-fit:contain!important;opacity:.26!important;filter:none!important;margin:0!important;}
.hp-login-visual>div{max-width:380px!important;}
.hp-login-visual span,.hp-login-kicker{display:block!important;font-size:10px!important;font-weight:850!important;letter-spacing:.18em!important;color:#6e86a0!important;}
.hp-login-visual h2{font-size:48px!important;line-height:1.02!important;letter-spacing:-.045em!important;color:#0a2f4f!important;margin:16px 0!important;}
.hp-login-visual p{font-size:16px!important;line-height:1.55!important;color:#6a7d90!important;max-width:320px!important;margin:0!important;}
.hp-login-card-v11{width:420px!important;max-width:100%!important;padding:38px 40px 34px!important;border-radius:24px!important;border:1px solid #e3e9ef!important;background:#fff!important;box-shadow:0 22px 60px rgba(13,47,79,.11)!important;backdrop-filter:none!important;}
.hp-login-card-v11 .login-center-logo{width:74px!important;height:50px!important;object-fit:contain!important;margin:0 0 14px!important;}
.hp-login-card-v11 h1{font-size:28px!important;letter-spacing:-.035em!important;margin:5px 0 7px!important;color:#0a2f4f!important;}
.hp-login-card-v11>p{font-size:13px!important;color:#75879a!important;margin:0 0 25px!important;}
.hp-login-card-v11 label{font-size:11px!important;font-weight:800!important;color:#435c73!important;margin:14px 0 7px!important;}
.hp-login-card-v11 .field{height:52px!important;border-radius:12px!important;background:#fff!important;border:1px solid #dbe4ec!important;font-size:15px!important;}
.hp-login-card-v11 .minimal-submit{height:52px!important;border-radius:12px!important;margin-top:22px!important;font-size:15px!important;}
.hp-login-card-v11 small{display:block!important;text-align:center!important;color:#8998a7!important;font-size:10px!important;margin-top:18px!important;}

/* SELECTOR CENTRAL — mapa decorativo, nunca define la altura */
.hp-gateway-v11{min-height:100vh!important;background:#f7f9fb!important;}
.hp-gateway-v11>header{height:72px!important;padding:0 44px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;background:#fff!important;border-bottom:1px solid #e8edf2!important;}
.hp-gateway-v11 .gateway-main{width:min(1120px,calc(100% - 64px))!important;margin:0 auto!important;padding:54px 0 34px!important;}
.hp-gateway-hero{height:250px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 240px!important;gap:36px!important;align-items:center!important;margin-bottom:26px!important;overflow:hidden!important;position:relative!important;}
.hp-gateway-v11 .gateway-copy{margin:0!important;max-width:650px!important;}
.hp-gateway-v11 .gateway-copy>span{font-size:10px!important;font-weight:850!important;letter-spacing:.17em!important;color:#6f88a0!important;}
.hp-gateway-v11 .gateway-copy h1{font-size:48px!important;line-height:1.02!important;letter-spacing:-.045em!important;color:#092f50!important;margin:13px 0 13px!important;}
.hp-gateway-v11 .gateway-copy p{font-size:15px!important;line-height:1.5!important;color:#6b7d90!important;max-width:600px!important;}
.hp-gateway-map{height:250px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;}
.hp-gateway-map img{display:block!important;width:102px!important;height:238px!important;max-width:102px!important;max-height:238px!important;object-fit:contain!important;opacity:.22!important;filter:none!important;margin:0!important;}
.hp-gateway-v11 .minimal-modules-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;margin:0!important;max-width:none!important;}
.hp-gateway-v11 .minimal-module-card{min-height:178px!important;padding:20px 22px!important;border-radius:16px!important;border:1px solid #e0e7ee!important;background:#fff!important;box-shadow:none!important;text-align:left!important;}
.hp-gateway-v11 .minimal-module-card:hover{border-color:#b8cad9!important;box-shadow:0 10px 28px rgba(20,51,78,.06)!important;transform:translateY(-1px)!important;}
.hp-gateway-v11 .module-no{font-size:9px!important;color:#1b69a4!important;}
.hp-gateway-v11 .module-symbol{width:40px!important;height:40px!important;margin:14px 0 10px!important;border-radius:11px!important;}
.hp-gateway-v11 .minimal-module-card strong{font-size:18px!important;line-height:1.15!important;}
.hp-gateway-v11 .minimal-module-card p{font-size:11px!important;line-height:1.45!important;margin:6px 0 8px!important;color:#62778b!important;}
.hp-gateway-v11 .module-open{font-size:11px!important;padding-top:11px!important;}
.hp-gateway-footer{text-align:center!important;font-size:9px!important;color:#9aa7b4!important;margin-top:22px!important;}

/* FINANCIERO — layout estable */
body .app-shell{display:grid!important;grid-template-columns:210px minmax(0,1fr)!important;width:100%!important;min-height:100vh!important;}
body .sidebar{position:sticky!important;top:0!important;height:100vh!important;width:210px!important;min-width:210px!important;overflow-y:auto!important;}
body .workspace{min-width:0!important;width:auto!important;overflow-x:hidden!important;}
body .topbar{height:62px!important;padding:0 18px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;}
body .top-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:9px!important;min-width:0!important;}
body .global-search{width:min(330px,28vw)!important;min-width:210px!important;}
body .content{width:min(1320px,calc(100% - 44px))!important;max-width:1320px!important;margin:0 auto!important;padding:28px 0 58px!important;box-sizing:border-box!important;}
.back-modules{width:100%!important;border:1px solid #dbe4ec!important;background:#fff!important;color:#174f7b!important;border-radius:10px!important;padding:9px 10px!important;font-size:10px!important;font-weight:800!important;margin-bottom:9px!important;cursor:pointer!important;}
.back-modules:hover{background:#f4f8fb!important;}
.back-modules-top{white-space:nowrap!important;}

body .executive-hero{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:20px!important;margin-bottom:18px!important;}
body .executive-hero h1{font-size:30px!important;line-height:1.05!important;letter-spacing:-.035em!important;}
body .exec-kpis{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;margin-bottom:22px!important;}
body .exec-kpis .metric{min-height:104px!important;padding:17px 18px!important;border-radius:15px!important;box-shadow:none!important;}

/* Alertas como lista ejecutiva compacta */
body .exec-alert-panel{margin:0 0 20px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;}
body .exec-alert-head{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;margin-bottom:9px!important;}
body .exec-alert-list{display:flex!important;flex-direction:column!important;gap:6px!important;width:100%!important;}
body .exec-alert-card{width:100%!important;min-height:0!important;height:auto!important;display:grid!important;grid-template-columns:9px minmax(0,1fr) auto!important;grid-template-rows:auto!important;align-items:center!important;gap:10px!important;padding:10px 12px!important;border:1px solid #e0e7ee!important;border-radius:11px!important;background:#fff!important;box-shadow:none!important;text-align:left!important;color:#18344e!important;overflow:hidden!important;}
body .exec-alert-card>div{min-width:0!important;display:grid!important;grid-template-columns:minmax(180px,1.35fr) minmax(150px,.9fr) minmax(140px,.75fr)!important;gap:12px!important;align-items:center!important;}
body .exec-alert-card strong{font-size:11px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;}
body .exec-alert-card small{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;color:#708295!important;}
body .exec-alert-card em{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;font-style:normal!important;color:#9a6509!important;}
body .exec-alert-card b{grid-column:auto!important;font-size:11px!important;white-space:nowrap!important;justify-self:end!important;color:#0d3a61!important;}
body .exec-alert-card .traffic{width:7px!important;height:7px!important;margin:0!important;}

body .exec-project-panel{border-radius:15px!important;overflow:hidden!important;box-shadow:none!important;}
body .exec-panel-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:14px 16px!important;}
body .exec-panel-head .toolbar{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;}
body .segmented{display:inline-flex!important;align-items:center!important;gap:2px!important;padding:3px!important;border:0!important;background:#eef3f7!important;border-radius:10px!important;}
body .segmented button{border:0!important;background:transparent!important;padding:7px 9px!important;min-height:30px!important;border-radius:8px!important;font-size:10px!important;}
body .segmented button.active{background:#fff!important;color:#07588f!important;box-shadow:0 1px 5px rgba(20,50,75,.08)!important;}
body .exec-project-table{width:100%!important;min-width:900px!important;border-collapse:collapse!important;}
body .exec-project-table th{font-size:8px!important;letter-spacing:.1em!important;padding:9px 10px!important;}
body .exec-project-table td{font-size:10px!important;padding:10px!important;}

/* Mandantes: vista simple por defecto y tabla limpia */
body .contract-portfolio-kpis{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin-bottom:14px!important;}
body .contract-portfolio-panel{border-radius:15px!important;box-shadow:none!important;overflow:hidden!important;}
body .contract-portfolio-panel>.panel-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;padding:14px 16px!important;}
body .contract-portfolio-panel .toolbar{display:flex!important;gap:7px!important;align-items:center!important;flex-wrap:wrap!important;}
body .contract-portfolio-panel .toolbar .search{width:300px!important;min-width:220px!important;}
body .contract-portfolio-panel .table-wrap{overflow:auto!important;}
body .contract-portfolio-panel .table{min-width:850px!important;width:100%!important;}
body .contract-portfolio-panel .table th{font-size:8px!important;padding:9px 11px!important;}
body .contract-portfolio-panel .table td{font-size:10px!important;padding:10px 11px!important;}
body .contract-portfolio-panel .table tr:hover td{background:#fafcfd!important;}

@media(max-width:1100px){
  .hp-login-stage-v11{grid-template-columns:1fr 390px!important;gap:36px!important;}
  .hp-login-visual{grid-template-columns:160px minmax(0,1fr)!important;gap:24px!important;}
  .hp-login-visual img{width:150px!important;height:470px!important;}
  .hp-login-visual h2{font-size:38px!important;}
  body .exec-alert-card>div{grid-template-columns:minmax(170px,1fr) minmax(130px,.8fr)!important;}
  body .exec-alert-card em{display:none!important;}
  body .contract-portfolio-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:900px){
  .hp-login-stage-v11{grid-template-columns:1fr!important;width:min(500px,92vw)!important;}
  .hp-login-visual{display:none!important;}
  .hp-login-card-v11{width:100%!important;}
  .hp-gateway-hero{grid-template-columns:1fr 110px!important;height:210px!important;}
  .hp-gateway-map{height:190px!important;}
  .hp-gateway-map img{width:72px!important;height:180px!important;}
  .hp-gateway-v11 .gateway-copy h1{font-size:38px!important;}
  body .app-shell{grid-template-columns:1fr!important;}
  body .sidebar{position:fixed!important;left:-230px!important;width:210px!important;z-index:1000!important;}
  body .sidebar.open{left:0!important;}
  body .content{width:calc(100% - 28px)!important;}
  body .exec-kpis{grid-template-columns:1fr!important;}
  body .exec-alert-card>div{grid-template-columns:1fr!important;gap:2px!important;}
  body .exec-alert-card small,body .exec-alert-card em{display:none!important;}
  body .contract-portfolio-panel>.panel-head{align-items:flex-start!important;flex-direction:column!important;}
}
@media(max-width:620px){
  .hp-login-v11{padding:78px 16px 28px!important;}
  .hp-login-v11 .login-brandline{left:18px!important;top:20px!important;}
  .hp-login-card-v11{padding:30px 24px!important;border-radius:18px!important;}
  .hp-gateway-v11>header{padding:0 18px!important;}
  .hp-gateway-v11 .gateway-main{width:calc(100% - 28px)!important;padding-top:30px!important;}
  .hp-gateway-hero{height:auto!important;grid-template-columns:1fr!important;margin-bottom:20px!important;}
  .hp-gateway-map{display:none!important;}
  .hp-gateway-v11 .minimal-modules-grid{grid-template-columns:1fr!important;}
  .hp-gateway-v11 .gateway-copy h1{font-size:34px!important;}
  body .global-search{display:none!important;}
  .back-modules-top{display:none!important;}
  body .contract-portfolio-kpis{grid-template-columns:1fr!important;}
}
