/* HomeEasy App Header v2.6 · Horizontal lockup + iPhone safe-area fix */
:root{
  --he-header-brand:#a6455a;
  --he-header-brand-dark:#823646;
  --he-header-gold:#c2a468;
  --he-header-gold-dark:#9a7e47;
  --he-header-bg:rgba(247,247,248,.95);
  --he-header-text:#2b272b;
  --he-header-muted:#8d858a;
  --he-header-line:rgba(60,60,67,.065);
  --he-header-ease:cubic-bezier(.2,.8,.2,1);
}

#homeeasy-app-header{
  position:sticky;
  top:0;
  z-index:4700;
  width:100%;
  background:var(--he-header-bg);
  border-bottom:1px solid var(--he-header-line);
  backdrop-filter:blur(22px) saturate(155%);
  -webkit-backdrop-filter:blur(22px) saturate(155%);
  box-shadow:0 1px 0 rgba(255,255,255,.8) inset;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI Variable","Segoe UI",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  font-synthesis:none;
}

#homeeasy-app-header::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:linear-gradient(90deg,transparent 0%,rgba(194,164,104,.22) 38%,rgba(166,69,90,.10) 50%,rgba(194,164,104,.22) 62%,transparent 100%);
  pointer-events:none;
}

#homeeasy-app-header .he-app-header-inner{
  position:relative;
  width:100%;
  min-height:76px;
  padding:calc(9px + env(safe-area-inset-top,0px)) 18px 9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

#homeeasy-app-header .he-app-header-left{
  min-width:110px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

#homeeasy-app-header .he-app-header-back{
  width:46px;
  height:46px;
  padding:0;
  border:1px solid rgba(60,60,67,.075);
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.97);
  color:var(--he-header-brand);
  box-shadow:0 7px 22px rgba(35,28,31,.08);
  cursor:pointer;
  outline:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .16s var(--he-header-ease),box-shadow .16s ease,background .16s ease;
}

#homeeasy-app-header .he-app-header-back svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2.1;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#homeeasy-app-header .he-app-header-back:active{transform:scale(.94)}

#homeeasy-app-header .he-app-header-brand{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  max-width:calc(100% - 300px);
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  white-space:nowrap;
  user-select:none;
}

#homeeasy-app-header .he-app-header-mark{
  width:22px;
  height:25px;
  display:grid;
  place-items:center;
  flex:0 0 22px;
}

#homeeasy-app-header .he-app-header-logo{
  width:22px;
  height:25px;
  object-fit:contain;
}

#homeeasy-app-header .he-app-header-wordmark{
  color:var(--he-header-brand);
  font-size:1rem;
  line-height:1;
  font-weight:690;
  letter-spacing:-.03em;
}

#homeeasy-app-header .he-app-header-divider{
  width:1px;
  height:18px;
  flex:0 0 1px;
  background:linear-gradient(180deg,rgba(194,164,104,.18),rgba(194,164,104,.85),rgba(194,164,104,.18));
}

#homeeasy-app-header .he-app-header-module{
  min-width:0;
  overflow:hidden;
  color:var(--he-header-text);
  font-size:.92rem;
  line-height:1;
  font-weight:610;
  letter-spacing:-.018em;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#homeeasy-app-header .he-app-header-actions{
  min-width:110px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

#homeeasy-app-header .he-app-header-actions:empty::before{
  content:"";
  display:block;
  width:44px;
  height:44px;
}

#homeeasy-app-header .he-app-header-actions button,
#homeeasy-app-header .he-app-header-actions a,
#homeeasy-app-header .he-app-header-actions [role="button"],
#homeeasy-app-header .he-app-header-actions .header-action-icon{
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  padding:0!important;
  border:1px solid rgba(60,60,67,.075)!important;
  border-radius:14px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(255,255,255,.96)!important;
  color:var(--he-header-brand)!important;
  box-shadow:0 6px 18px rgba(35,28,31,.055)!important;
  text-decoration:none!important;
  font-size:.92rem!important;
  line-height:1!important;
  cursor:pointer!important;
  transition:transform .16s var(--he-header-ease),box-shadow .16s ease,background .16s ease!important;
}

#homeeasy-app-header .he-app-header-actions svg{
  width:18px!important;
  height:18px!important;
  stroke:currentColor;
}

#homeeasy-app-header .he-app-header-actions .lock-wrap{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  gap:0!important;
}

#homeeasy-app-header .he-app-header-actions .lock-wrap>.header-round{
  width:44px!important;
  height:44px!important;
}

#homeeasy-app-header .he-app-header-actions .dirty-dot{
  position:absolute!important;
  right:-1px!important;
  top:-1px!important;
}

#homeeasy-app-header .he-app-header-actions .header-icons,
#homeeasy-app-header .he-app-header-actions .header-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}

#homeeasy-app-header .he-app-header-actions .save-status{
  width:auto!important;
  min-width:0!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 12px!important;
  border-radius:999px!important;
  background:#fffaf0!important;
  color:var(--he-header-gold-dark)!important;
  border-color:rgba(194,164,104,.22)!important;
  box-shadow:none!important;
  font-size:.68rem!important;
  font-weight:660!important;
}

#homeeasy-app-header .he-app-header-actions .top-link{
  width:auto!important;
  min-width:44px!important;
  padding:0 14px!important;
  border-radius:14px!important;
  gap:7px!important;
}

#homeeasy-app-header .he-app-header-actions .top-link span{
  display:inline!important;
  font-size:.72rem!important;
  font-weight:650!important;
}

#homeeasy-app-header .he-app-header-actions .v31-new-search{
  width:auto!important;
  min-width:118px!important;
  height:42px!important;
  min-height:42px!important;
  padding:0 14px!important;
  border-radius:14px!important;
  font-size:.72rem!important;
  font-weight:650!important;
  white-space:nowrap!important;
}

.he-legacy-header-hidden{display:none!important}
.he-legacy-header-row-hidden{display:none!important}
body.he-app-header-active #homeeasy-global-back{display:none!important}
body.he-app-header-active .report-header{padding-top:0!important}

body.he-document-page #homeeasy-app-header{
  margin:-20px -10px 20px!important;
  width:calc(100% + 20px)!important;
}

@media(any-hover:hover) and (any-pointer:fine){
  #homeeasy-app-header .he-app-header-back:hover{
    transform:translateY(-1px)!important;
    background:#fff!important;
    box-shadow:0 10px 27px rgba(35,28,31,.11)!important;
  }
  #homeeasy-app-header .he-app-header-actions button:hover,
  #homeeasy-app-header .he-app-header-actions a:hover,
  #homeeasy-app-header .he-app-header-actions [role="button"]:hover{
    transform:translateY(-1px)!important;
    background:#fff!important;
    box-shadow:0 9px 22px rgba(35,28,31,.095)!important;
  }
}

@media(max-width:768px){
  body.he-document-page #homeeasy-app-header{
    margin:0!important;
    width:100%!important;
  }
}

@media(max-width:720px){
  /* iPhone/Safari: alinear el lockup con los botones dentro del safe-area */
  #homeeasy-app-header{
    background:#f7f7f8;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }

  #homeeasy-app-header .he-app-header-brand{
    top:calc(env(safe-area-inset-top,0px) + 30px);
    transform:translate(-50%,-50%);
    max-width:calc(100% - 150px);
  }

  #homeeasy-app-header .he-app-header-wordmark{
    font-size:.96rem;
    font-weight:700;
  }

  #homeeasy-app-header .he-app-header-module{
    max-width:118px;
    font-size:.82rem;
    font-weight:620;
  }

  #homeeasy-app-header .he-app-header-inner{
    min-height:70px;
    padding:calc(8px + env(safe-area-inset-top,0px)) 13px 8px;
  }

  #homeeasy-app-header .he-app-header-left,
  #homeeasy-app-header .he-app-header-actions{
    min-width:46px;
  }

  #homeeasy-app-header .he-app-header-back{
    width:44px;
    height:44px;
  }

  #homeeasy-app-header .he-app-header-brand{
    max-width:calc(100% - 160px);
    gap:7px;
  }

  #homeeasy-app-header .he-app-header-mark{
    width:19px;
    height:22px;
    flex-basis:19px;
  }

  #homeeasy-app-header .he-app-header-logo{
    width:19px;
    height:22px;
  }

  #homeeasy-app-header .he-app-header-wordmark{
    font-size:.88rem;
  }

  #homeeasy-app-header .he-app-header-divider{
    height:16px;
  }

  #homeeasy-app-header .he-app-header-module{
    max-width:128px;
    font-size:.78rem;
  }

  #homeeasy-app-header .he-app-header-actions{
    gap:6px;
  }

  #homeeasy-app-header .he-app-header-actions:empty::before{
    width:42px;
    height:42px;
  }

  #homeeasy-app-header .he-app-header-actions button,
  #homeeasy-app-header .he-app-header-actions a,
  #homeeasy-app-header .he-app-header-actions [role="button"],
  #homeeasy-app-header .he-app-header-actions .header-action-icon{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    border-radius:13px!important;
  }

  #homeeasy-app-header .he-app-header-actions .top-link{
    width:42px!important;
    padding:0!important;
  }

  #homeeasy-app-header .he-app-header-actions .top-link span{
    display:none!important;
  }
}

@media(max-width:560px){
  #homeeasy-app-header .he-app-header-actions .v31-new-search{
    min-width:0!important;
    width:auto!important;
    max-width:92px!important;
    padding:0 9px!important;
    font-size:.62rem!important;
  }
}

@media(max-width:430px){
  #homeeasy-app-header .he-app-header-brand{
    max-width:calc(100% - 150px);
    gap:6px;
  }
  #homeeasy-app-header .he-app-header-wordmark{
    font-size:.84rem;
  }
  #homeeasy-app-header .he-app-header-module{
    max-width:108px;
    font-size:.72rem;
  }
}

@media print{
  #homeeasy-app-header{display:none!important}
}
