/* PocketPOS V7.45 — Header unificado para las 5 pestañas principales. */
.pp-unified-header{
  position:relative;
  overflow:visible!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.pp-unified-header .pp-header-brand,
.pp-unified-header>.brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
}
.pp-header-copy{min-width:0;display:flex;flex-direction:column;justify-content:center}
.pp-header-store{
  display:block;
  min-width:0;
  color:#f8fafc;
  font-size:18px;
  font-weight:950;
  line-height:1.05;
  letter-spacing:-.025em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pp-header-mode{
  margin-top:3px;
  color:#94a3b8;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pp-header-logo{
  width:40px;
  height:40px;
  min-width:40px;
  display:grid;
  place-items:center;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:22px;
  line-height:1;
}
.pp-header-mobile-menu{position:relative;margin-left:auto;flex:0 0 auto;z-index:510}
.pp-header-menu-btn{
  width:48px;
  height:48px;
  min-width:48px;
  min-height:48px;
  padding:0!important;
  display:grid;
  place-items:center;
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:15px!important;
  background:#172033!important;
  color:#f8fafc!important;
  font-size:25px!important;
  font-weight:950!important;
  line-height:1!important;
  box-shadow:0 12px 28px rgba(0,0,0,.2);
}
.pp-header-menu-btn:active{transform:scale(.97)}
.pp-header-menu-panel{
  position:absolute;
  top:56px;
  right:0;
  width:min(290px,calc(100vw - 34px));
  padding:10px;
  display:none;
  gap:7px;
  background:#111a2b;
  border:1px solid rgba(148,163,184,.24);
  border-radius:18px;
  box-shadow:0 24px 70px rgba(0,0,0,.5);
  z-index:520;
}
.pp-header-menu-panel.open{display:grid}
.pp-header-menu-title{
  padding:4px 7px 7px;
  color:#94a3b8;
  font-size:10px;
  font-weight:950;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.pp-header-menu-panel a,
.pp-header-menu-panel button{
  width:100%;
  min-height:44px;
  padding:0 13px!important;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  text-align:left;
  gap:8px;
  color:#f8fafc!important;
  background:#1b263a!important;
  border:1px solid rgba(148,163,184,.14)!important;
  border-radius:13px!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
}
.pp-header-menu-panel a:hover,
.pp-header-menu-panel button:hover{background:#223149!important}
.pp-header-menu-panel .primary{background:#22c55e!important;border-color:#22c55e!important;color:#06130b!important}
.pp-header-menu-panel .danger{color:#fecaca!important;border-color:rgba(248,113,113,.24)!important}

/* El hamburger histórico de Venta/Inventario debe verse igual al genérico. */
.pp-unified-header .pos-hamburger-btn,
.pp-unified-header .pos-hamburger-btn-v49{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  min-height:48px!important;
  border-radius:15px!important;
}

@media(max-width:760px){
  .pp-unified-header{
    position:sticky!important;
    top:8px!important;
    z-index:500!important;
    min-height:66px!important;
    padding:9px 66px 9px 9px!important;
    border-radius:18px!important;
    flex-wrap:nowrap!important;
    margin-bottom:12px!important;
  }
  .pp-unified-header .pp-header-brand,
  .pp-unified-header>.brand{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:9px!important;
  }
  .pp-header-logo,
  .pp-unified-header>.icon,
  .pp-unified-header .brand>.logo{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    border:0!important;
    font-size:21px!important;
  }
  .pp-header-copy{max-width:calc(100vw - 138px)!important}
  .pp-header-store,
  .pp-unified-header #storeName,
  .pp-unified-header #storeMeta{
    display:block!important;
    max-width:calc(100vw - 145px)!important;
    margin:0!important;
    color:#f8fafc!important;
    font-size:17px!important;
    font-weight:950!important;
    line-height:1.05!important;
    letter-spacing:-.025em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .pp-header-mode{font-size:10.5px!important;max-width:calc(100vw - 145px)!important}
  .pp-header-mobile-menu{
    position:absolute!important;
    top:50%!important;
    right:9px!important;
    transform:translateY(-50%)!important;
    margin:0!important;
  }
  .pp-header-menu-btn,
  .pp-unified-header .pos-hamburger-btn,
  .pp-unified-header .pos-hamburger-btn-v49{
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    min-height:46px!important;
  }
  .pp-header-menu-panel{top:53px!important;right:0!important}

  /* Venta/Inventario ya manejan sus acciones dentro del hamburger. */
  .pp-unified-header>.actions{min-width:0!important}
}

@media(max-width:430px){
  .pp-unified-header{padding-right:62px!important}
  .pp-header-copy{max-width:calc(100vw - 126px)!important}
  .pp-header-store,
  .pp-unified-header #storeName,
  .pp-unified-header #storeMeta,
  .pp-header-mode{max-width:calc(100vw - 132px)!important}
}

@media print{
  .pp-header-mobile-menu{display:none!important}
}

/* Compatibilidad de los headers históricos de Venta/Inventario dentro del módulo común. */
@media(max-width:760px){
  .pp-unified-header #storeMode{
    max-width:calc(100vw - 145px)!important;
    font-size:0!important;
    line-height:1.25!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .pp-unified-header #storeMode::after{
    content:attr(data-mobile-label);
    display:block!important;
    overflow:hidden!important;
    color:#94a3b8!important;
    font-size:10.5px!important;
    line-height:1.25!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  .pp-unified-header>.actions{
    position:absolute!important;
    inset:0!important;
    margin:0!important;
    display:block!important;
    pointer-events:none!important;
  }
  .pp-unified-header #onlineBadge,
  .pp-unified-header #roleBadge,
  .pp-unified-header #offlineStatusPill{display:none!important}
  .pp-unified-header #posHamburgerWrapV49,
  .pp-unified-header .pos-hamburger-wrap,
  .pp-unified-header .pos-hamburger-wrap-v49{
    position:absolute!important;
    top:50%!important;
    right:9px!important;
    transform:translateY(-50%)!important;
    margin:0!important;
    z-index:510!important;
    pointer-events:auto!important;
  }
}
