.mg-print-hero {
  margin-bottom: 1.5rem;
}

.mg-print-hero .mg-card {
  overflow: hidden;
}

.mg-print-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mg-print-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.95rem;
}

.mg-print-badge i {
  opacity: 0.9;
}

.mg-print-hero-note {
  font-size: 0.96rem;
  margin-top: 1rem;
}

.mg-cost-landing-card .card-body {
  padding: 1.4rem;
}

.mg-cost-landing-head {
  margin-bottom: 1.25rem;
}

.mg-cost-landing-head .mg-section-title {
  margin-bottom: 0.35rem;
}

.mg-cost-landing-help {
  font-size: 0.95rem;
}

.mg-mini-feature {
  height: 100%;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mg-mini-feature i {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.mg-mini-feature h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.mg-mini-feature p {
  margin-bottom: 0;
  color: var(--bs-secondary-color, #9aa4b2);
  font-size: 0.93rem;
}

.mg-info-card {
  border-radius: 20px;
}

.mg-bottom-cta .btn {
  min-width: 220px;
}

@media (max-width: 991.98px) {
  .mg-cost-landing-card .card-body {
    padding: 1.2rem;
  }
}

@media (max-width: 767.98px) {
  .mg-print-badges {
    flex-direction: column;
    gap: 0.6rem;
  }

  .mg-print-badge {
    width: 100%;
    justify-content: flex-start;
  }

  .mg-cost-landing-card .card-body {
    padding: 1rem;
  }

  .mg-bottom-cta .btn {
    min-width: 100%;
  }
}

#costManualWrap .btn-group {
  display: flex;
  width: 100%;
}

#costManualWrap .btn-group .btn {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
}

#costManualWrap .btn-group .btn i {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.95;
}

#costManualWrap .btn-group .btn span {
  display: inline-block;
  line-height: 1.2;
}

/* Estado base del botón Color */
#costManualColor + label.btn {
  position: relative;
  overflow: hidden;
}

/* Cuando Color está seleccionado */
#costManualColor:checked + label.btn {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff9f1c 35%, #2ec4b6 68%, #3a86ff 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 10px 24px rgba(58, 134, 255, 0.18);
}

/* Ícono del botón color activo */
#costManualColor:checked + label.btn i {
  color: #fff !important;
  opacity: 1;
}

/* Hover suave cuando todavía no está seleccionado */
#costManualColor + label.btn:hover {
  border-color: rgba(255, 159, 28, 0.7);
}

/* Opcional: un brillo muy sutil */
#costManualColor:checked + label.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  pointer-events: none;
}

/* =========================================================
   RESULTADO MANUAL · UX comercial
   ========================================================= */

#costResult {
  scroll-margin-top: 110px;
}

.mg-manual-result-card {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.mg-manual-result-top {
  margin-bottom: 1rem;
}

.mg-manual-result-title {
  margin: 0.45rem 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.mg-manual-result-text {
  margin: 0;
  color: var(--bs-secondary-color, #9aa4b2);
  font-size: 0.96rem;
}

.mg-manual-total-box {
  text-align: center;
  padding: 1.2rem 1rem;
  margin-bottom: 1rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(13, 110, 253, 0.18), rgba(13, 110, 253, 0.04)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(13, 110, 253, 0.16);
}

.mg-manual-total-kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color, #9aa4b2);
  margin-bottom: 0.35rem;
}

.mg-manual-total-amount {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.mg-manual-total-currency {
  font-size: 0.9rem;
  color: var(--bs-secondary-color, #9aa4b2);
}

.mg-manual-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.mg-manual-result-item {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.mg-manual-result-label {
  display: block;
  font-size: 0.82rem;
  color: var(--bs-secondary-color, #9aa4b2);
  margin-bottom: 0.2rem;
}

.mg-manual-result-note {
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--bs-secondary-color, #9aa4b2);
  text-align: center;
}

.mg-manual-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.mg-manual-actions .btn {
  min-height: 48px;
  border-radius: 14px;
}

@media (max-width: 767.98px) {
  .mg-manual-result-card {
    padding: 1rem;
  }

  .mg-manual-result-title {
    font-size: 1.18rem;
  }

  .mg-manual-result-grid {
    grid-template-columns: 1fr;
  }

  .mg-manual-actions {
    grid-template-columns: 1fr;
  }

  .mg-manual-total-box {
    padding: 1rem 0.9rem;
  }
}

.mg-manual-form-wrap {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.mg-manual-form-wrap .form-label {
  margin-bottom: 0.45rem;
}

.mg-manual-form-wrap .form-text {
  font-size: 0.88rem;
}

.mg-manual-form-wrap .btn-group .btn {
  min-height: 48px;
  border-radius: 12px !important;
}

.mg-manual-form-wrap .btn-group {
  gap: 0.5rem;
}

.mg-manual-form-wrap .btn-group > .btn,
.mg-manual-form-wrap .btn-group > label.btn {
  border-radius: 12px !important;
}

/* =========================================================
   UPLOAD · progreso visual
   ========================================================= */

.mg-upload-progress {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(13, 110, 253, 0.14);
  background: rgba(13, 110, 253, 0.05);
}

.mg-upload-progress .progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}

html.mg-theme-dark .mg-upload-progress {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

html.mg-theme-dark .mg-upload-progress .progress {
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   MODO MANUAL · más compacto
   ========================================================= */

.mg-manual-form-wrap .btn-group .btn {
  min-height: 42px;
  padding: 0.5rem 0.7rem;
  font-size: 0.92rem;
  gap: 0.35rem;
}

.mg-manual-form-wrap .btn-group .btn i {
  font-size: 0.86rem;
}

@media (max-width: 767.98px) {
  .mg-manual-form-wrap .btn-group {
    gap: 0.4rem;
  }

  .mg-manual-form-wrap .btn-group .btn {
    min-height: 40px;
    padding: 0.46rem 0.55rem;
    font-size: 0.86rem;
  }
}

/* =========================================================
   RESULTADO UPLOAD · card compacta por archivo
   ========================================================= */

.mg-cost-ticket--compact {
  padding: 1rem;
}

.mg-cost-item--compact {
  padding: 0.95rem;
  margin-bottom: 0.75rem;
  border-radius: 16px;
}

.mg-cost-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
}

.mg-cost-item-main {
  min-width: 0;
}

.mg-cost-item-side {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.mg-cost-item-total-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color, #6c757d);
}

.mg-cost-item-total {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
}

.mg-cost-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.5rem;
}

.mg-cost-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.mg-cost-mini-pill i {
  font-size: 0.78rem;
  opacity: 0.9;
}

.mg-cost-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.mg-cost-inline-btn {
  min-height: 34px;
  padding: 0.36rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.mg-cost-item-body {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.mg-cost-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.mg-cost-control-box {
  padding: 0.78rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
}

.mg-cost-control-label {
  margin-bottom: 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color, #6c757d);
}

.mg-cost-toggle--compact .btn {
  min-height: 34px;
  padding: 0.4rem 0.52rem;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
}

.mg-cost-toggle--compact .btn i {
  font-size: 0.78rem;
}

.mg-cost-copies-row--compact {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mg-cost-copies-row--compact button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.mg-cost-copies-row--compact .mg-cost-copies {
  width: 54px;
  height: 32px;
  padding: 0;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
  border-radius: 10px;
}

@media (min-width: 576px) {
  .mg-cost-controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .mg-cost-ticket--compact {
    padding: 0.95rem;
  }

  .mg-cost-item-head {
    grid-template-columns: 1fr;
  }

  .mg-cost-item-side {
    min-width: 0;
    align-items: stretch;
  }

  .mg-cost-item-actions {
    justify-content: space-between;
  }

  .mg-cost-inline-btn {
    flex: 1 1 0;
  }

  .mg-cost-total {
    text-align: left;
    min-width: 0;
    margin-top: 0.5rem;
  }

  .mg-cost-total-amount {
    font-size: 1.2rem;
  }
}

/* =========================================================
   DARK · compact result
   ========================================================= */

html.mg-theme-dark .mg-cost-mini-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

html.mg-theme-dark .mg-cost-item-body {
  border-top-color: rgba(255, 255, 255, 0.14);
}

html.mg-theme-dark .mg-cost-control-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

html.mg-theme-dark .mg-cost-control-label {
  color: rgba(255, 255, 255, 0.7);
}

/* Cards con referencia visual alternada */
.mg-cost-items .mg-cost-item--compact {
  position: relative;
  overflow: hidden;
}

.mg-cost-items .mg-cost-item--compact:nth-child(even)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.55);
}

.mg-cost-items .mg-cost-item--compact:nth-child(odd)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: rgba(255, 123, 0, 0.22);
}

html.mg-theme-dark .mg-cost-items .mg-cost-item--compact:nth-child(even)::before {
  background: rgba(90, 150, 255, 0.7);
}

html.mg-theme-dark .mg-cost-items .mg-cost-item--compact:nth-child(odd)::before {
  background: rgba(255, 140, 40, 0.38);
}

/* =========================================================
   HERO BADGES · toque premium sutil
   ========================================================= */

.mg-print-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.mg-print-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.05rem;
  border-radius: 18px;
  overflow: hidden;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  color: inherit;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 26px rgba(0,0,0,0.14);

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.mg-print-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  opacity: 0.9;
  pointer-events: none;
}

.mg-print-badge i {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;

  background: rgba(255,123,0,0.14);
  border: 1px solid rgba(255,123,0,0.22);
  color: #ff9c42;
  font-size: 1rem;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 6px 18px rgba(255,123,0,0.10);

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.mg-print-badge span {
  position: relative;
  z-index: 1;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 500;
}

/* Hover sutil */
.mg-print-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255,123,0,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 34px rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,123,0,0.06);
}

.mg-print-badge:hover i {
  transform: scale(1.06);
  background: rgba(255,123,0,0.18);
  border-color: rgba(255,123,0,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 8px 22px rgba(255,123,0,0.18);
}

/* Variante especial para WhatsApp */
.mg-print-badge:has(.fa-whatsapp) i {
  background: rgba(37,211,102,0.14);
  border-color: rgba(37,211,102,0.22);
  color: #4ee184;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 6px 18px rgba(37,211,102,0.10);
}

.mg-print-badge:has(.fa-whatsapp):hover {
  border-color: rgba(37,211,102,0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 16px 34px rgba(0,0,0,0.18),
    0 0 0 1px rgba(37,211,102,0.08);
}

.mg-print-badge:has(.fa-whatsapp):hover i {
  background: rgba(37,211,102,0.18);
  border-color: rgba(37,211,102,0.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 8px 22px rgba(37,211,102,0.18);
}

/* Mobile */
@media (max-width: 767.98px) {
  .mg-print-badges {
    flex-direction: column;
    gap: 0.7rem;
  }

  .mg-print-badge {
    width: 100%;
    justify-content: flex-start;
    padding: 0.82rem 0.9rem;
  }

  .mg-print-badge i {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 0.92rem;
  }

  .mg-print-badge span {
    font-size: 0.94rem;
  }
}

/* Desktop: volver a una sola línea */
@media (min-width: 992px) {
  .mg-print-badges {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr 1fr;
    gap: 0.85rem;
    align-items: stretch;
  }

  .mg-print-badge {
    width: 100%;
    min-width: 0;
  }

  .mg-print-badge span {
    font-size: 0.94rem;
  }
}

/* =========================================================
   HERO · Accordion mobile para badges
   ========================================================= */

.mg-print-acc {
  margin-top: 1rem;
}

.mg-print-acc .mg-acc__head {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.mg-print-acc .mg-acc__text {
  text-align: left;
}

.mg-print-acc-title {
  font-size: 0.98rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0;
}

.mg-print-acc .mg-acc__panel {
  border-top: 0;
}

.mg-print-acc-body {
  padding-top: 0.75rem;
}

.mg-print-badges-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.mg-print-badges-mobile .mg-print-badge {
  width: 100%;
  justify-content: flex-start;
  margin: 0;
}

/* Solo mobile */
@media (min-width: 768px) {
  .mg-print-acc {
    display: none !important;
  }
}

/* =========================================================
   HERO BADGES · desktop en una sola fila
   ========================================================= */
@media (min-width: 768px) {
  .mg-print-badges.d-none.d-md-flex {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr 1fr;
    gap: 0.85rem;
    align-items: stretch;
  }

  .mg-print-badges.d-none.d-md-flex .mg-print-badge {
    width: 100%;
    margin: 0;
    min-width: 0;
  }

  .mg-print-badges.d-none.d-md-flex .mg-print-badge span {
    font-size: 0.95rem;
  }
}

/* =========================================================
   MOBILE LIGHT · suavizar sombras del bloque beneficios
   ========================================================= */
@media (max-width: 767.98px) {

  html:not(.mg-theme-dark) .mg-print-acc .mg-acc__head {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  }

  html:not(.mg-theme-dark) .mg-print-acc .mg-acc__panel {
    box-shadow: none;
  }

  html:not(.mg-theme-dark) .mg-print-acc-body {
    padding-top: 0.55rem;
  }

  html:not(.mg-theme-dark) .mg-print-badges-mobile .mg-print-badge {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }
}