/* CUSPIDE-UX-G038 — product headers, stage buttons, Mi Equipo, focus */

.g038-product-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  text-align: left;
}
.g038-product-header__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.g038-product-header__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 210, 255, 0.12);
  color: #00d2ff;
  font-size: 1.4rem;
}
.g038-product-header__text h2 {
  margin: 0;
  font-weight: 600;
  font-size: 1.35rem;
}
.g038-product-header__cat {
  margin: 4px 0 0;
  color: #9aa3bc;
  font-size: 0.82rem;
}

.g038-stage-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 16px;
}
.g038-stage-btn {
  min-width: 44px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: #c8cad8;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.g038-stage-btn.is-current {
  border-color: rgba(240, 210, 127, 0.55);
}
.g038-stage-btn.is-active {
  background: rgba(0, 210, 255, 0.18);
  border-color: #00d2ff;
  color: #fff;
}
/* GATE 10 — etapas futuras no desbloqueadas */
.g038-stage-btn.is-locked,
.g038-stage-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.55);
  pointer-events: none;
}

.g038-embed-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  border-radius: 12px;
  background: #050714;
}

/* G045-R2/R3: SuperApix — one selector inside embed; no shell E1–E17 strip. */
#tab-superapix [data-g038-stage-buttons] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
/*
 * G045-R3 resume: eliminate nested scroll — iframe grows to content height via
 * G045_R3_EMBED_HEIGHT handshake. Page (.main-wrapper) owns the only vertical scroll.
 * Override global .g038-embed-frame { min-height: 70vh } which forced a tall scrollport.
 */
#tab-superapix {
  overflow: visible;
}
#tab-superapix [data-g038-r2-gated-content] {
  overflow: visible;
  max-height: none;
}
#tab-superapix .g038-embed-frame {
  display: block;
  width: 100%;
  min-height: 240px;
  height: auto;
  max-height: none;
  overflow: hidden !important;
  border: 0;
}
#tab-superapix.g045-r3-embed-ready .g038-embed-frame {
  /* height set inline by JS from child content */
}

/* Apix13 ejecutivo: iframe a viewport, sin scroll anidado tipo documento */
#tab-apix13 [data-g038-stage-buttons] {
  display: none !important;
}
#tab-apix13 .g038-embed-frame,
#tab-apix13.apix13-exec-embed-ready .g038-embed-frame {
  display: block;
  width: 100%;
  min-height: 28rem;
  height: calc(100vh - 7.5rem);
  max-height: none;
  overflow: hidden !important;
  border: 0;
  border-radius: 12px;
  background: #050714;
}

.g038-position-focus {
  outline: 2px solid #f0d27f !important;
  box-shadow: 0 0 0 4px rgba(240, 210, 127, 0.25) !important;
  z-index: 2;
}

.g038-me-section {
  margin: 0 0 28px;
  text-align: left;
}
.g038-me-section h3 {
  margin: 0 0 8px;
  color: #f0d27f;
  font-size: 1.05rem;
}
.g038-me-total {
  color: #9aa3bc;
  margin: 0 0 12px;
}
.g038-me-direct-list,
.g038-me-stage ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.g038-me-direct-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.g038-me-alias {
  color: #00d2ff;
  font-weight: 600;
}
.g038-me-own {
  color: #9aa3bc;
  font-size: 0.88rem;
}
.g038-me-prog {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.g038-me-prog h4 {
  margin: 0 0 8px;
  color: #c8cad8;
}
.g038-me-stage-label {
  margin: 8px 0 6px;
  color: #f0d27f;
  font-size: 0.85rem;
}
.g038-me-fdcg-btn {
  width: 100%;
  text-align: left;
  margin: 0 0 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.08);
  color: #e8eefc;
  cursor: pointer;
}
.g038-me-fdcg-btn:hover {
  background: rgba(0, 210, 255, 0.16);
}

/* Hide legacy Mi Flota nav if residual */
#cc-nav-mi-flota {
  display: none !important;
}

/* G038-R2 activation modal */
.g038-r2-modal[hidden] {
  display: none !important;
}
.g038-r2-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.g038-r2-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
}
.g038-r2-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  padding: 28px 24px;
  border-radius: 14px;
  background: #0b1224;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}
.g038-r2-modal__panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 650;
  color: #f5f7ff;
}
.g038-r2-modal__product {
  margin: 0 0 20px;
  color: #9aa3bc;
  font-size: 0.92rem;
}
.g038-r2-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.g038-r2-btn {
  min-width: 96px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}
.g038-r2-btn--yes {
  background: #14b8a6;
  color: #041018;
}
.g038-r2-btn--no {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #e8eefc;
}

/* Matrix themes */
.g038-r2-matrix {
  margin: 16px 0 24px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.25));
}
.g038-r2-matrix__caption {
  margin: 0 0 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.g038-r2-layer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 12px;
}
.g038-r2-node {
  min-width: 64px;
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--g038-accent, #00d2ff);
  background: var(--g038-node-bg, rgba(0, 210, 255, 0.12));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.g038-r2-node.is-empty {
  opacity: 0.55;
}
.g038-r2-node.is-focus,
.g038-r2-node.g038-position-focus {
  outline: 2px solid #f0d27f;
  box-shadow: 0 0 0 3px rgba(240, 210, 127, 0.28);
}
.g038-r2-node__slot {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--g038-accent, #00d2ff);
}
.g038-r2-node__alias {
  font-size: 0.7rem;
  color: #c8cad8;
}
.g038-r2-layer--un .g038-r2-node {
  min-width: 48px;
  min-height: 42px;
}
.g038-theme-juni {
  border-color: rgba(52, 211, 153, 0.35);
  background: radial-gradient(circle at top, rgba(52, 211, 153, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(8, 28, 22, 0.9), rgba(5, 10, 18, 0.95));
}
.g038-theme-kizuna {
  border-color: rgba(244, 114, 182, 0.35);
  background: radial-gradient(circle at top, rgba(244, 114, 182, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(28, 10, 22, 0.9), rgba(5, 10, 18, 0.95));
}
.g038-theme-rei {
  border-color: rgba(251, 191, 36, 0.35);
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(28, 22, 8, 0.9), rgba(5, 10, 18, 0.95));
}
.g038-theme-velocitriad {
  border-color: rgba(96, 165, 250, 0.35);
  background: radial-gradient(circle at top, rgba(96, 165, 250, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(8, 16, 32, 0.9), rgba(5, 10, 18, 0.95));
}
.g038-theme-quantum6 {
  border-color: rgba(56, 189, 248, 0.4);
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(6, 22, 34, 0.92), rgba(5, 10, 18, 0.96));
}
.g038-q6-path {
  margin: 0 0 10px;
  text-align: center;
  color: #9ec9e8;
  font-size: 0.88rem;
}
.g038-q6-back {
  display: block;
  margin: 0 auto 12px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  cursor: pointer;
}
.g038-q6-slots {
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) {
  .g038-q6-slots {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }
}
button.g038-q6-slot {
  cursor: pointer;
  font: inherit;
  color: inherit;
}
button.g038-q6-slot:disabled {
  cursor: default;
}
.g038-r2-vt-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 14px;
  max-width: 420px;
  margin: 0 auto;
}
.g038-r2-vt-pillar {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
@media (max-width: 520px) {
  .g038-r2-vt-2x2 {
    grid-template-columns: 1fr;
    max-width: 240px;
  }
}
.g038-r2-rei-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.g038-r2-rei-pillar {
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 12px;
  padding: 8px;
}
.g038-r2-vt-finance {
  margin: 0 0 12px;
  color: #9aa3bc;
  font-size: 0.88rem;
}
.g038-r2-vt-ladder {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.g038-r2-vt-stage {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  background: rgba(96, 165, 250, 0.08);
  color: #c8cad8;
}
.g038-r2-vt-stage.is-active {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.18);
  color: #fff;
}
.g038-r2-empty {
  margin: 10px 0 0;
  color: #9aa3bc;
  font-size: 0.88rem;
  text-align: center;
}
.g038-r2-layer--root .g038-r2-node {
  min-width: 120px;
  border-width: 2px;
}
