/* V8.7 · Hotel Layout Pro · AUSAPE
   Corrección global de encabezados para evitar columnas estrechas y títulos partidos.
   Mantiene tema blanco corporativo y refuerza Control Hotelero Fórum. */
:root{
  --v87-blue:#009fda;
  --v87-blue-dark:#004b73;
  --v87-ink:#07324a;
  --v87-muted:#5f7487;
  --v87-line:#cfe8f6;
  --v87-soft:#f4fbff;
  --v87-card:#ffffff;
  --v87-shadow:0 18px 42px rgba(0,89,130,.10);
}

body.v87-ready .main,
body.v87-ready main{
  overflow-x:hidden!important;
}

/* Encabezados de módulo: nunca más columnas microscópicas */
body.v87-ready .section-title{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px 20px!important;
  width:100%!important;
  min-width:0!important;
  margin-bottom:18px!important;
  padding:0!important;
}
body.v87-ready .section-title>div:first-child{
  flex:1 1 520px!important;
  min-width:min(100%,420px)!important;
  max-width:100%!important;
}
body.v87-ready .section-title>.actions,
body.v87-ready .section-title .actions{
  flex:1 1 560px!important;
  min-width:min(100%,320px)!important;
  max-width:100%!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  justify-content:flex-end!important;
  align-items:center!important;
}
body.v87-ready .section-title h3,
body.v87-ready .section-title h2,
body.v87-ready .section-title p{
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  white-space:normal!important;
  max-width:100%!important;
}
body.v87-ready .section-title h3{
  line-height:1.08!important;
  letter-spacing:-.035em!important;
}
body.v87-ready .section-title p{
  line-height:1.48!important;
  color:var(--v87-muted)!important;
}

/* Botones de acciones: responsive, legibles, sin desbordes */
body.v87-ready .actions .btn,
body.v87-ready .actions label.btn,
body.v87-ready .section-title .btn{
  white-space:nowrap!important;
  flex:0 0 auto!important;
  min-height:42px!important;
  line-height:1.1!important;
  max-width:100%!important;
}

@media(max-width:1300px){
  body.v87-ready .section-title>.actions,
  body.v87-ready .section-title .actions{
    justify-content:flex-start!important;
  }
}
@media(max-width:760px){
  body.v87-ready .section-title>div:first-child,
  body.v87-ready .section-title>.actions,
  body.v87-ready .section-title .actions{
    flex:1 1 100%!important;
    min-width:100%!important;
  }
  body.v87-ready .actions .btn,
  body.v87-ready .actions label.btn,
  body.v87-ready .section-title .btn{
    flex:1 1 100%!important;
    width:100%!important;
    justify-content:center!important;
  }
}

/* Control Hotelero Fórum: cabecera pro, limpia e intuitiva */
body.v87-ready #hotel .section-title{
  background:linear-gradient(135deg,#ffffff 0%,#f6fcff 100%)!important;
  border:1px solid var(--v87-line)!important;
  border-radius:28px!important;
  padding:22px!important;
  box-shadow:var(--v87-shadow)!important;
  position:relative!important;
  overflow:hidden!important;
}
body.v87-ready #hotel .section-title::after{
  content:"";
  position:absolute;
  right:-70px;
  top:-90px;
  width:230px;
  height:230px;
  border-radius:999px;
  background:radial-gradient(circle,rgba(0,159,218,.20),transparent 68%);
  pointer-events:none;
}
body.v87-ready #hotel .section-title>div:first-child,
body.v87-ready #hotel .section-title>.actions{position:relative;z-index:1;}
body.v87-ready #hotel .section-title h3{
  font-size:clamp(30px,3.1vw,46px)!important;
  color:var(--v87-ink)!important;
  margin:0 0 8px!important;
  max-width:760px!important;
}
body.v87-ready #hotel .section-title p{
  font-size:15px!important;
  font-weight:700!important;
  max-width:850px!important;
}
body.v87-ready #hotel .section-title .actions{
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(207,232,246,.80)!important;
  border-radius:22px!important;
  padding:12px!important;
  box-shadow:0 12px 28px rgba(0,89,130,.07)!important;
}
body.v87-ready #hotel .section-title .btn,
body.v87-ready #hotel .section-title label.btn{
  border-radius:16px!important;
  box-shadow:none!important;
}

/* Panel operativo de agencia/hotel */
.v87-hotel-command{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr 1fr;
  gap:14px;
  margin:0 0 18px;
}
.v87-hotel-command .v87-step{
  background:linear-gradient(135deg,#fff,#f7fcff);
  border:1px solid var(--v87-line);
  border-radius:24px;
  padding:16px 16px 14px;
  box-shadow:0 14px 34px rgba(0,89,130,.08);
  position:relative;
  overflow:hidden;
  min-height:132px;
}
.v87-hotel-command .v87-step::before{
  content:attr(data-step);
  position:absolute;
  right:14px;
  top:10px;
  font-size:44px;
  line-height:1;
  font-weight:950;
  color:rgba(0,159,218,.10);
}
.v87-hotel-command .v87-step b{display:block;color:var(--v87-ink);font-size:16px;margin:0 0 6px;position:relative;z-index:1;}
.v87-hotel-command .v87-step span{display:block;color:var(--v87-muted);font-size:13px;line-height:1.4;font-weight:650;position:relative;z-index:1;}
.v87-hotel-command .v87-step .mini-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;position:relative;z-index:1;}
.v87-hotel-command .v87-step button{min-height:34px!important;border-radius:12px!important;padding:8px 11px!important;font-size:12px!important;}
.v87-hotel-command .v87-step.primary-step{background:linear-gradient(135deg,#eaf8ff,#ffffff);border-color:#a9ddf4;}

/* KPI y paneles hoteleros con más aire */
body.v87-ready #hotel .grid.kpis{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;}
body.v87-ready #hotel .grid.two{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr))!important;}
body.v87-ready #hotel .card{min-width:0!important;}
body.v87-ready #hotel .tablewrap{max-width:100%!important;overflow:auto!important;border-radius:22px!important;}
body.v87-ready #hotel table{min-width:980px!important;}
body.v87-ready #hotel .filters{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:10px!important;}
body.v87-ready #hotel .filters>*{min-width:0!important;width:100%!important;}
body.v87-ready #hotel .table-head{gap:12px!important;flex-wrap:wrap!important;}

@media(max-width:1180px){
  .v87-hotel-command{grid-template-columns:1fr 1fr;}
}
@media(max-width:720px){
  .v87-hotel-command{grid-template-columns:1fr;}
  body.v87-ready #hotel .section-title{padding:18px!important;border-radius:22px!important;}
  body.v87-ready #hotel .section-title h3{font-size:30px!important;}
}

/* Modo seguro para todos los módulos: lo ancho se desplaza, no rompe */
body.v87-ready .tablewrap,
body.v87-ready .matrix-scroll,
body.v87-ready .forum-matrix-wrap,
body.v87-ready .calendar-shell,
body.v87-ready .preview-shell{
  max-width:100%!important;
  overflow:auto!important;
}
body.v87-ready .card,
body.v87-ready .module-card,
body.v87-ready .panel,
body.v87-ready .forum-flex-card{
  min-width:0!important;
}

/* Animación ligera y segura */
body.v87-ready .section.active,
body.v87-ready .section:not(.hidden){
  animation:v87ModuleIn .22s ease-out both;
}
@keyframes v87ModuleIn{
  from{opacity:.68;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

@media (prefers-reduced-motion: reduce){
  body.v87-ready *{animation:none!important;transition:none!important;}
}
