/* HV429 · sistema de controles premium para Promociones + Cupones privados.
   Hereda el layout validado de HV428 y centraliza tamaños, estados y navegación. */
#admin-popup .hv428-shell{display:grid;gap:18px;color:#30375f}
#admin-popup .hv428-shell[hidden],#admin-popup [data-v80-section="private"][hidden]{display:none!important}
#admin-popup .hv428-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:21px 23px;border-radius:22px;border:1px solid #e1e6cf;background:#f8faf2}
#admin-popup .hv428-head small{color:#829638;font-size:11px;letter-spacing:.1em;font-weight:850;text-transform:uppercase}
#admin-popup .hv428-head h3{font-size:clamp(1.2rem,2vw,1.65rem);margin:5px 0;color:#313965}
#admin-popup .hv428-head p{margin:0;color:#747f8b;font-size:.86rem;max-width:660px;line-height:1.55}
#admin-popup .hv428-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #d9dfdf;background:#fff;color:#333b67;border-radius:12px;padding:8px 14px;min-height:38px;font-size:.82rem;font-weight:670;line-height:1.25;letter-spacing:-.005em;cursor:pointer;box-shadow:none;white-space:nowrap;transition:background-color .18s ease,border-color .18s ease,transform .18s ease}
#admin-popup .hv428-button.primary{background:#303765;color:white;border-color:#303765}
#admin-popup .hv428-button:not(:disabled):hover{background:#f6f8ef;border-color:#bac699}
#admin-popup .hv428-button.primary:not(:disabled):hover{background:#404879;border-color:#404879}
#admin-popup .hv428-button:not(:disabled):active{transform:translateY(1px)}
#admin-popup .hv428-button:focus-visible{outline:2px solid #a2b536;outline-offset:3px}
#admin-popup .hv428-button:disabled{opacity:.5;cursor:not-allowed}
#admin-popup .hv428-card{border:1px solid #e2e7d7;border-radius:22px;background:white;padding:21px 23px;box-shadow:0 5px 22px #252f4905}
#admin-popup .hv428-card h4{font-size:1.07rem;margin:0 0 7px;color:#323a66}
#admin-popup .hv428-note{color:#6e7789;font-size:.78rem;line-height:1.55;margin:0}
#admin-popup .hv428-list{display:grid;gap:10px;margin-top:16px}
#admin-popup .hv428-row{border:1px solid #e8eadd;border-radius:16px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
#admin-popup .hv428-row strong{font-size:.93rem;color:#30365c;display:block}
#admin-popup .hv428-row small{color:#778091;font-size:.75rem;line-height:1.55;display:block;margin-top:5px}
#admin-popup .hv428-row code{font-size:.84rem;font-weight:800;color:#6c8121;background:#f1f5e6;border-radius:8px;padding:4px 9px;letter-spacing:.04em}
#admin-popup .hv428-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#admin-popup .hv428-form{display:grid;gap:18px}
#admin-popup .hv428-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 17px}
#admin-popup .hv428-form label{font-size:.77rem;font-weight:780;color:#343e68;display:grid;gap:6px;line-height:1.45}
#admin-popup .hv428-form input:not([type="checkbox"]),#admin-popup .hv428-form select,#admin-popup .hv428-form textarea{box-sizing:border-box;width:100%;border:1px solid #dce1d8;border-radius:12px;background:#fff;color:#303861;padding:10px 12px;min-height:43px;font-size:.85rem;font-weight:550}
#admin-popup .hv428-form textarea{min-height:72px;resize:vertical}
#admin-popup .hv428-form .wide{grid-column:1/-1}
#admin-popup .hv428-form .hv428-inline{display:flex;align-items:end;gap:7px}
#admin-popup .hv428-inline input{flex:1;min-width:0}
#admin-popup .hv428-checkbox{display:flex!important;align-items:center;flex-direction:row!important;gap:9px!important;font-size:.83rem!important}
#admin-popup .hv428-checkbox input{accent-color:#a4ba30;width:17px;height:17px}
#admin-popup .hv428-form details{border:1px solid #e3e6dd;border-radius:15px;padding:12px 15px}
#admin-popup .hv428-form details>summary{cursor:pointer;font-size:.85rem;font-weight:850;color:#343b67}
#admin-popup .hv428-form details .hv428-fields{margin-top:14px}
#admin-popup .hv428-help{padding:13px 15px;border-radius:14px;background:#f5f8e9;color:#697839;font-size:.78rem;line-height:1.55}
#admin-popup .hv428-feedback{font-size:.8rem;min-height:19px;color:#626e7a;font-weight:650}
#admin-popup .hv428-feedback.error{color:#ae3645}
#admin-popup .hv428-pill{display:inline-block;font-size:.72rem;font-weight:850;border-radius:999px;padding:4px 10px;background:#f0f1eb;color:#6c7178}
#admin-popup .hv428-pill.active{background:#eff5df;color:#657b1d}
@media(max-width:710px){#admin-popup .hv428-fields{grid-template-columns:minmax(0,1fr)}#admin-popup .hv428-head,#admin-popup .hv428-card{padding:16px}#admin-popup .hv428-button{min-height:38px;padding:8px 13px;font-size:.78rem}}
/* El editor de formularios usa display:grid; asegurar que el atributo hidden gobierne. */
#admin-popup .hv428-form[hidden],#admin-popup .hv428-form [hidden],
#admin-popup #hv428-tab[hidden],#admin-popup .v80-tabs #hv428-tab[hidden]{display:none!important}


/* HV429 · controles exclusivos del área de Promociones y Cupones privados. */
#admin-popup #admin-v80-shell .v80-tabs{
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  gap:7px!important;overflow-x:auto!important;overflow-y:hidden!important;
  padding:2px 1px 5px!important;scrollbar-width:none!important;
  overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
}
#admin-popup #admin-v80-shell .v80-tabs::-webkit-scrollbar{display:none}
#admin-popup #admin-v80-shell .v80-tabs button{
  flex:0 0 auto!important;min-width:0!important;min-height:39px!important;
  padding:9px 15px!important;border-radius:12px!important;
  border:1px solid #e1e5dd!important;background:#f3f5ef!important;
  color:#616b77!important;font-size:.77rem!important;font-weight:670!important;
  line-height:1.25!important;letter-spacing:-.008em!important;
  white-space:nowrap!important;word-break:normal!important;
  box-shadow:none!important;transition:background-color .18s ease,border-color .18s ease,color .18s ease;
}
#admin-popup #admin-v80-shell .v80-tabs button.active{
  background:#303765!important;border-color:#303765!important;color:#fff!important;
  box-shadow:0 2px 7px rgba(38,44,84,.09)!important;
}
#admin-popup #admin-v80-shell .v80-tabs button:not(.active):hover{
  border-color:#c8d2b8!important;background:#f9faef!important;color:#303765!important;
}
/* Refrescar, crear promociones, guardar, editar y acciones en módulos vecinos. */
#admin-popup #admin-v80-shell .button,
#admin-popup #admin-v80-shell .v80-item-actions button,
#admin-popup #admin-v80-shell .v80-queue-controls button,
#admin-popup #admin-v80-shell .v80-communications-actions button{
  min-height:38px!important;padding:8px 14px!important;border-radius:12px!important;
  font-size:.78rem!important;font-weight:670!important;line-height:1.25!important;
  letter-spacing:-.005em!important;box-shadow:none!important;
}
#admin-popup #admin-v80-shell .v80-x{width:35px!important;height:35px!important;min-height:35px!important;border-radius:11px!important;font-weight:600!important}
#admin-popup #admin-v80-shell button:focus-visible{outline:2px solid #a2b536!important;outline-offset:3px!important}
#admin-popup #admin-v80-shell button:disabled{opacity:.5;cursor:not-allowed!important}

/* Botonera del formulario privado: altura constante, sin cápsulas gigantes. */
#admin-popup .hv428-actions{gap:7px}
#admin-popup .hv428-actions .hv428-button{min-height:35px;padding:7px 12px;font-size:.75rem}
#admin-popup .hv428-form .hv428-button{max-width:100%}
/* Acciones de recarga: contorneadas, discretas y sin ocupar todo el ancho. */
#admin-popup #admin-v80-shell #admin-v80-refresh{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  justify-self:start!important;align-self:center!important;
  width:max-content!important;max-width:100%!important;
  padding:8px 15px!important;min-height:38px!important;
  color:#303765!important;background:#fff!important;
  border:1px solid #dce2d6!important;border-radius:12px!important;
  box-shadow:none!important;font-size:.78rem!important;font-weight:670!important;
}
#admin-popup #admin-v80-shell #admin-v80-refresh:hover{background:#f6f8ef!important;border-color:#bfcba8!important}
/* Interruptor de permisos: carril fino, con superficie tactil utilizable. */
#admin-popup #admin-v80-shell .v80-admin-permission-switch-v10256121{
  min-width:44px!important;min-height:42px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
}
#admin-popup #admin-v80-shell .v80-admin-permission-switch-v10256121>span{
  width:42px!important;height:24px!important;
  background:#e0e3db;box-shadow:inset 0 0 0 1px #d1d6cc;
}
#admin-popup #admin-v80-shell .v80-admin-permission-switch-v10256121>span:after{
  width:18px!important;height:18px!important;left:3px!important;top:3px!important;
  box-shadow:0 1px 4px rgba(35,43,63,.13)!important;
}
#admin-popup #admin-v80-shell .v80-admin-permission-switch-v10256121>input:checked+span{background:#303765!important;box-shadow:none}
#admin-popup #admin-v80-shell .v80-admin-permission-switch-v10256121>input:checked+span:after{transform:translateX(18px)!important}
#admin-popup #admin-v80-shell .v80-admin-permission-switch-v10256121>input:focus-visible+span{outline:2px solid #a2b536;outline-offset:3px}

@media(max-width:650px){
  #admin-popup #admin-v80-shell .v80-tabs{gap:6px!important;padding:2px 0 5px!important}
  #admin-popup #admin-v80-shell .v80-tabs button{
    min-height:38px!important;padding:8px 12px!important;
    font-size:.75rem!important;border-radius:11px!important;
  }
  #admin-popup #admin-v80-shell .button,
  #admin-popup #admin-v80-shell .v80-item-actions button{
    min-height:37px!important;padding:8px 13px!important;font-size:.76rem!important;
  }
  #admin-popup .hv428-head{gap:12px}
  #admin-popup .hv428-head .hv428-button{align-self:flex-start;min-height:39px;padding:8px 14px}
  /* Barra inferior administrativa: carril desplazable, botones ligeros. */
  #admin-popup .admin-workspace-nav,
  #admin-popup #admin-dashboard>.admin-workspace-nav{
    left:10px!important;right:10px!important;
    padding:5px!important;gap:5px!important;
    border-radius:17px!important;
    background:rgba(250,251,247,.97)!important;
    border:1px solid rgba(47,53,104,.12)!important;
    box-shadow:0 -4px 18px rgba(31,36,74,.10)!important;
    overflow-x:auto!important;overflow-y:hidden!important;
    scroll-snap-type:none!important;white-space:nowrap!important;
  }
  #admin-popup .admin-workspace-nav>button,
  #admin-popup #admin-dashboard>.admin-workspace-nav>button{
    display:grid!important;grid-template-columns:auto auto auto!important;
    align-items:center!important;justify-content:center!important;gap:7px!important;
    flex:0 0 auto!important;width:auto!important;min-width:110px!important;
    min-height:43px!important;padding:8px 11px!important;
    border-radius:12px!important;text-align:center!important;
    box-shadow:none!important;
  }
  #admin-popup .admin-workspace-nav>button span,
  #admin-popup #admin-dashboard>.admin-workspace-nav>button span{width:auto!important;height:auto!important;font-size:1rem!important}
  #admin-popup .admin-workspace-nav>button strong,
  #admin-popup #admin-dashboard>.admin-workspace-nav>button strong{
    font-size:.74rem!important;font-weight:680!important;letter-spacing:-.005em!important;
    white-space:nowrap!important;
  }
  #admin-popup .admin-workspace-nav>button small,
  #admin-popup #admin-dashboard>.admin-workspace-nav>button small{
    min-width:21px!important;padding:3px 6px!important;border-radius:9px!important;
    font-size:.62rem!important;font-weight:700!important;
  }
  #admin-popup .admin-workspace-nav>button.active,
  #admin-popup #admin-dashboard>.admin-workspace-nav>button.active{
    background:#303765!important;color:#fff!important;
    box-shadow:0 2px 6px rgba(47,53,104,.11)!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #admin-popup #admin-v80-shell button{transition:none!important}
  #admin-popup .hv428-button{transition:none!important}
}
