/* ============================================================
   App Xade (xade.html) — rediseño
   Se carga DESPUÉS de styles.css y todo va acotado a
   body.xade-page, así que servicios.html, planes.html, etc.
   no se ven afectados. Usa los colores y fuentes de FoodXade.
   ============================================================ */

.xade-page {
  --xd-lav: #f5f3ff;
  --xd-icon-bg: #efebff;
  --xd-line: #e7e2f7;
  --xd-hand: "Caveat", "Segoe Script", cursive;
  --xd-grad: linear-gradient(
    100deg,
    var(--primary) 0%,
    var(--secondary) 55%,
    var(--accent) 100%
  );
}

/* ---------- Iconos de línea ---------- */
.xade-page .ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Botones de la página (no toca el menú) ---------- */
.xade-page main .btn-primary {
  background: var(--xd-grad);
  box-shadow: 0 14px 34px -8px rgba(62, 46, 183, 0.5);
}
.xade-page main .btn-primary:hover {
  box-shadow: 0 20px 40px -8px rgba(62, 46, 183, 0.55);
}

/* ============================================================
   HERO
   ============================================================ */
.xade-page .page-hero {
  background: linear-gradient(180deg, #f6f4ff 0%, #ffffff 100%);
  padding-top: calc(var(--header-h) + clamp(28px, 4vw, 56px));
  padding-bottom: clamp(20px, 3vw, 36px);
}

.xade-page .page-hero .blob {
  opacity: 0.55;
}
.xade-page .page-hero .blob-1 {
  width: 480px;
  height: 480px;
  top: -140px;
  right: 4%;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(194, 144, 211, 0.4),
    transparent 68%
  );
}
.xade-page .page-hero .blob-2 {
  width: 320px;
  height: 320px;
  top: 44%;
  bottom: auto;
  left: -80px;
  background: radial-gradient(
    circle at 60% 50%,
    rgba(120, 96, 220, 0.22),
    transparent 68%
  );
}
.xade-page .page-hero .blob-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  width: 420px;
  height: 420px;
  right: 10%;
  bottom: -60px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(160, 130, 235, 0.3),
    transparent 68%
  );
}

.xade-page .page-hero-inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(28px, 3.5vw, 56px);
  align-items: center;
}

.xade-page .page-hero .tag {
  margin-bottom: 22px;
  padding: 8px 20px;
  background: var(--xd-icon-bg);
  border-color: var(--xd-line);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}

.xade-page .page-hero h1 {
  font-size: clamp(2.3rem, 4.1vw, 3.3rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  max-width: none;
}
.xade-page .h1-line {
  display: block;
}

.xade-page .page-hero-sub {
  margin-top: 24px;
  max-width: 31em;
  font-size: 1.12rem;
  line-height: 1.6;
}

/* Lista de 4 características */
.hero-features {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}
.hero-features li {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hero-features strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.hero-features li > div > span {
  display: block;
  font-size: 0.98rem;
  color: var(--body-color);
  line-height: 1.4;
}

.xd-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--xd-icon-bg);
  border: 1px solid var(--xd-line);
  color: var(--primary);
}
.xd-ico .ic {
  width: 26px;
  height: 26px;
}

.xade-page .page-hero .hero-actions {
  margin-top: 36px;
}
.xade-page .page-hero .btn-primary {
  padding: 20px 40px;
  font-size: 1.12rem;
  gap: 16px;
}
.xade-page .page-hero .btn-primary svg {
  width: 20px;
  height: 20px;
}

/* ---------- Escenario con los mockups ---------- */
.xade-page .page-hero-visual {
  justify-content: flex-end;
  align-self: stretch;
}
@media (min-width: 1025px) {
  /* el portátil se sale por el borde derecho de la pantalla */
  .xade-page .page-hero-visual {
    margin-right: calc((min(1160px, 92vw) - 100vw) / 2);
  }
}

.xd-stage {
  container-type: inline-size;
  width: 100%;
}
.xd-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 110;
  font-size: 1cqw; /* 1em = 1% del ancho del escenario */
  line-height: 1.25;
  font-family: var(--font-body);
  color: var(--ink);
  user-select: none;
}
.xd-canvas *,
.xd-canvas *::before,
.xd-canvas *::after {
  box-sizing: border-box;
}
.xd-canvas .ic {
  width: 1.5em;
  height: 1.5em;
}

/* ---------- Portátil ---------- */
.xd-laptop {
  position: absolute;
  top: 0;
  left: 18em;
  width: 86em;
  filter: drop-shadow(0 2.4em 3.4em rgba(62, 46, 183, 0.22));
}
.xd-screen {
  display: grid;
  grid-template-columns: 18em minmax(0, 1fr);
  height: 76em;
  background: #fff;
  border: 0.8em solid #1a1640;
  border-bottom-width: 1.1em;
  border-radius: 2em 2em 0.5em 0.5em;
  overflow: hidden;
}
.xd-base {
  height: 2.3em;
  margin: 0 -3.4em;
  background: linear-gradient(#e9e6f2, #c7c2d8);
  border-radius: 0 0 3em 3em / 0 0 1.6em 1.6em;
}
.xd-base::before {
  content: "";
  display: block;
  width: 12em;
  height: 0.8em;
  margin: 0 auto;
  background: #b3aec7;
  border-radius: 0 0 1em 1em;
}

.xd-side {
  background: #fbfaff;
  border-right: 1px solid #eeeaf9;
  padding: 2.4em 1.3em;
}
.xd-brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding-left: 0.6em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.7em;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.xd-brand .xd-logo {
  width: 1em;
  height: 1em;
  color: var(--primary);
}
.xd-menu {
  display: grid;
  gap: 0.3em;
  margin-top: 2.6em;
}
.xd-menu li {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.75em 0.8em;
  border-radius: 0.8em;
  font-size: 1.4em;
  color: #4c4670;
  line-height: 1.2;
}
.xd-menu li .ic {
  width: 1.25em;
  height: 1.25em;
}
.xd-menu li.on {
  background: var(--xd-icon-bg);
  color: var(--primary);
  font-weight: 600;
}

.xd-main {
  min-width: 0;
  padding: 2.4em 2.4em 0;
  overflow: hidden;
}
.xd-hello {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 2.2em;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.xd-sub {
  margin-top: 0.4em;
  font-size: 1.25em;
  color: var(--muted);
}
.xd-kpis {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.4em;
  margin-top: 1.6em;
}
.xd-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
  padding: 1.6em;
  background: #fff;
  border: 1px solid #eeeaf9;
  border-radius: 1.4em;
  box-shadow: 0 0.8em 2em -1em rgba(62, 46, 183, 0.25);
}
.xd-donut {
  position: relative;
  width: 8.6em;
  height: 8.6em;
}
.xd-donut b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 2.3em;
  font-weight: 700;
}
.xd-kpi strong {
  font-size: 1.35em;
  font-weight: 700;
  margin-top: 0.3em;
}
.xd-kpi .up {
  font-size: 1.05em;
  color: #1c9a5c;
}
.xd-kpi-ico {
  display: grid;
  place-items: center;
  width: 4em;
  height: 4em;
  border-radius: 1em;
  background: var(--xd-icon-bg);
  color: var(--primary);
}
.xd-kpi-ico .ic {
  width: 2em;
  height: 2em;
}
.xd-num {
  font-family: var(--font-head);
  font-size: 3.2em;
  line-height: 1;
  font-weight: 700;
  margin-top: 0.2em;
}
.xd-kpi-lbl {
  font-size: 1.25em;
  color: var(--body-color);
}
.xd-chip {
  font-size: 1.05em;
  font-weight: 600;
  color: #1c9a5c;
  background: #e5f7ee;
  padding: 0.3em 0.9em;
  border-radius: 999px;
}

.xd-card {
  margin-top: 1.4em;
  padding: 1.5em 1.7em;
  background: #fff;
  border: 1px solid #eeeaf9;
  border-radius: 1.4em;
  box-shadow: 0 0.8em 2em -1em rgba(62, 46, 183, 0.2);
}
.xd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1em;
}
.xd-card-head strong {
  font-size: 1.4em;
  font-weight: 700;
}
.xd-select {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.8em;
  border: 1px solid #e7e2f7;
  border-radius: 0.7em;
  font-size: 1.1em;
  color: var(--body-color);
}
.xd-select .ic {
  width: 1.1em;
  height: 1.1em;
}

.xd-plot {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  grid-template-rows: 10em auto;
  column-gap: 0.8em;
}
.xd-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 1em;
  color: var(--muted);
  text-align: right;
  line-height: 1;
}
.xd-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  justify-items: center;
  border-bottom: 1px solid #eeeaf9;
  background: repeating-linear-gradient(
    to bottom,
    #f1eefb 0,
    #f1eefb 1px,
    transparent 1px,
    transparent 2.5em
  );
}
.xd-bars i {
  display: block;
  width: 2.4em;
  height: var(--h);
  border-radius: 0.5em 0.5em 0 0;
  background: linear-gradient(#d3c8f7 0 40%, #8c72e2 40% 100%);
}
.xd-xaxis {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 0.7em;
  text-align: center;
  font-size: 1.05em;
  color: var(--muted);
}

.xd-thead {
  display: grid;
  grid-template-columns: 11.5em 1fr;
  padding-bottom: 0.7em;
  border-bottom: 1px solid #eeeaf9;
  font-size: 1.05em;
  color: var(--muted);
}
.xd-alerts li {
  display: grid;
  grid-template-columns: 11.5em 3.2em 1fr;
  align-items: center;
  padding: 0.75em 0;
  font-size: 1.1em;
  color: #3c3760;
  border-bottom: 1px solid #f3f0fb;
}
.xd-alerts li:last-child {
  border-bottom: 0;
}
.xd-alerts time {
  color: var(--body-color);
}
.xd-alerts .al {
  display: grid;
  place-items: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
}
.xd-alerts .al .ic {
  width: 1.2em;
  height: 1.2em;
}
.al--red {
  background: #fde8e9;
  color: var(--red);
}
.al--amber {
  background: #fdf3d9;
  color: #d99a0b;
}
.al--blue {
  background: #e3edff;
  color: #3b78e7;
}
.al--green {
  background: #e2f6ec;
  color: #1c9a5c;
}

/* ---------- Móvil ---------- */
.xd-phone {
  position: absolute;
  left: 0;
  top: 42em;
  width: 36em;
  aspect-ratio: 9 / 18.4;
  transform-origin: 0 0;
  transform: scale(0.9);
  padding: 0.9em;
  background: #15122e;
  border-radius: 5.4em;
  box-shadow:
    0 0 0 0.25em #3a3660 inset,
    0 3.6em 6em -1.4em rgba(30, 20, 90, 0.5),
    0 1em 2.4em rgba(30, 20, 90, 0.25);
  animation: xd-float 7s ease-in-out infinite;
}
@keyframes xd-float {
  0%,
  100% {
    transform: translateY(0) scale(0.9);
  }
  50% {
    transform: translateY(-1.2em) scale(0.9);
  }
}
.xd-phone-screen {
  position: relative;
  height: 100%;
  padding: 0.9em 2.2em 0;
  background: #fff;
  border-radius: 4.6em;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xd-notch {
  position: absolute;
  top: 1em;
  left: 50%;
  width: 11em;
  height: 3em;
  transform: translateX(-50%);
  background: #15122e;
  border-radius: 2em;
}
.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8em 1em 0;
  font-size: 1.4em;
  font-weight: 700;
  height: 3.2em;
}
.ph-batt {
  width: 1.8em;
  height: 0.8em;
  border-radius: 0.25em;
  background: var(--ink);
}
.ph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.4em;
}
.ph-logo {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.3em;
  letter-spacing: -0.03em;
}
.ph-logo svg {
  width: 1em;
  height: 1em;
  color: var(--primary);
}
.ph-actions {
  display: flex;
  align-items: center;
  gap: 1em;
}
.ph-bell {
  position: relative;
  color: var(--primary);
}
.ph-bell .ic {
  width: 2.1em;
  height: 2.1em;
}
.ph-bell i {
  position: absolute;
  top: -0.1em;
  right: -0.1em;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  background: var(--red);
  border: 0.2em solid #fff;
}
.ph-avatar {
  display: grid;
  place-items: center;
  width: 2.9em;
  height: 2.9em;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.15em;
  font-weight: 600;
}
.ph-select {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5em;
  margin-top: 1.4em;
  padding: 0.7em 1.2em;
  border: 1px solid #e7e2f7;
  border-radius: 0.9em;
  background: #f8f7fc;
  font-size: 1.35em;
  color: var(--body-color);
}
.ph-select .ic {
  width: 1em;
  height: 1em;
}
.ph-title {
  margin-top: 1.7em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.9em;
  letter-spacing: -0.02em;
}
.ph-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.9em;
  padding: 0.3em;
  border-radius: 1.2em;
  background: var(--xd-icon-bg);
  font-size: 1.4em;
  text-align: center;
  color: var(--primary);
}
.ph-tabs span {
  padding: 0.5em 0;
  border-radius: 1em;
}
.ph-tabs .on {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.ph-card {
  margin-top: 1.2em;
  padding: 1.3em 1.4em 1em;
  border: 1px solid #eeeaf9;
  border-radius: 1.4em;
}
.ph-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ph-card-top strong {
  font-size: 1.35em;
}
.ph-ok {
  font-size: 1.1em;
  font-weight: 600;
  color: #1c9a5c;
  background: #e5f7ee;
  padding: 0.25em 0.7em;
  border-radius: 999px;
}
.ph-temp {
  margin-top: 0.5em;
  font-family: var(--font-head);
  font-size: 3.5em;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ph-meta {
  font-size: 1.15em;
  color: var(--muted);
}
.ph-line {
  width: 100%;
  height: 4.6em;
  margin-top: 0.6em;
}
.ph-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.95em;
  color: var(--muted);
}
.ph-btn {
  margin-top: 1.1em;
  padding: 1em 0;
  border-radius: 1.3em;
  background: var(--xd-grad);
  color: #fff;
  text-align: center;
  font-size: 1.45em;
  font-weight: 600;
}
.ph-tasks-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.3em;
  font-size: 1.35em;
}
.ph-tasks-head span {
  font-size: 0.85em;
  color: var(--primary);
}
.ph-tasks {
  margin-top: 0.4em;
}
.ph-tasks li {
  display: flex;
  align-items: center;
  gap: 0.9em;
  padding: 0.6em 0;
  border-bottom: 1px solid #f3f0fb;
}
.ph-tasks li:last-child {
  border-bottom: 0;
}
.ph-tasks i {
  flex: none;
  width: 1.7em;
  height: 1.7em;
  border: 0.16em solid var(--primary);
  border-radius: 0.45em;
  opacity: 0.75;
}
.ph-tasks div {
  flex: 1;
  min-width: 0;
}
.ph-tasks strong {
  display: block;
  font-size: 1.2em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-tasks span {
  font-size: 1em;
  color: var(--muted);
}
.ph-tasks .ic {
  width: 1.4em;
  height: 1.4em;
  color: var(--muted);
}
.ph-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  margin: auto -2.2em 0;
  padding: 0.9em 1.2em 1.7em;
  border-top: 1px solid #eeeaf9;
  background: #fff;
}
.ph-nav span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  font-size: 1em;
  color: var(--muted);
}
.ph-nav .ic {
  width: 2em;
  height: 2em;
}
.ph-nav .on {
  color: var(--primary);
}
.ph-nav .ph-plus {
  width: 4.4em;
  height: 4.4em;
  margin: -2.6em auto 0;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0.8em 1.6em -0.4em rgba(62, 46, 183, 0.6);
}
.ph-nav .ph-plus .ic {
  width: 2.2em;
  height: 2.2em;
}

/* ---------- Anotación manuscrita ---------- */
.xd-note {
  position: absolute;
  left: 41em;
  top: 90em;
  display: flex;
  align-items: flex-start;
  gap: 1.2em;
  color: var(--primary);
  transform: rotate(-7deg);
  transform-origin: left top;
}
.xd-note span {
  font-family: var(--xd-hand);
  font-weight: 600;
  font-size: 5.2em;
  line-height: 0.95;
}
.xd-note-arrow {
  flex: none;
  width: 6.4em;
  height: 7.4em;
  margin-top: -4.6em;
}

/* ============================================================
   BLOQUE «DISPONIBLE EN TODOS TUS DISPOSITIVOS»
   ============================================================ */
.xd-devices {
  padding: clamp(8px, 1.5vw, 16px) 0 clamp(8px, 1.5vw, 20px);
  background: #fff;
}
.xd-devices-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(200px, 300px);
  align-items: center;
  gap: clamp(24px, 3.5vw, 48px);
  padding: clamp(24px, 3vw, 34px) clamp(24px, 3.5vw, 46px);
  background: rgba(245, 243, 255, 0.6);
  border: 1px solid var(--xd-line);
  border-radius: 28px;
}
.xd-devices-label {
  margin-bottom: 22px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}
.xd-devices-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.xd-devices-list li {
  display: flex;
  align-items: center;
  gap: 16px;
}
.xd-devices-list .ic {
  width: 46px;
  height: 46px;
  stroke-width: 1.6;
  color: var(--primary);
}
.xd-devices-list strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.xd-devices-list li span {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--body-color);
}
.xd-devices-sep {
  align-self: stretch;
  background: var(--xd-line);
}
.xd-devices-note {
  font-family: var(--xd-hand);
  font-weight: 600;
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
  line-height: 1.05;
  color: var(--primary);
  transform: rotate(-4deg);
}
.xd-devices-note svg {
  width: 72%;
  height: 14px;
  margin-top: 8px;
  margin-left: 10%;
}

/* ============================================================
   SECCIONES DE DETALLE
   ============================================================ */
.xade-page .detail-block {
  padding-block: clamp(56px, 7vw, 92px);
}
.xade-page .detail-block--alt {
  background: var(--xd-lav);
}
.xade-page .detail-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
}
.xade-page .detail-kicker {
  letter-spacing: 0.12em;
}
.xade-page .detail-main h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.xade-page .detail-lead {
  max-width: 34em;
}
.xade-page .detail-side {
  position: static;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

/* Puntos → tarjetas con icono */
.xd-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.xd-points li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--xd-line);
  border-radius: 18px;
  font-weight: 500;
  font-size: 0.97rem;
  line-height: 1.35;
  color: var(--ink);
}
.xd-points li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.xd-points .xd-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.xd-points .xd-ico .ic {
  width: 22px;
  height: 22px;
}

/* Tarjetas laterales */
.xade-page .side-card {
  padding: 28px 26px;
  border-color: var(--xd-line);
  border-radius: 24px;
}
.xade-page .side-card--soft {
  background: #fff;
  box-shadow: var(--shadow-md);
}
.xade-page .side-card .btn-block {
  margin-top: 6px;
}

/* ---------- Mini-mockups de cada sección ---------- */
.xd-viz {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--xd-line);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
}
.xd-viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.xd-viz-title {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}
.xd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--xd-icon-bg);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.xd-pill--ok {
  background: #e5f7ee;
  color: #1c9a5c;
}
.xd-pill--warn {
  background: #fdf3d9;
  color: #b88208;
}
.xd-pill--live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22b26a;
  box-shadow: 0 0 0 3px rgba(34, 178, 106, 0.2);
}
.xd-pill--live {
  background: #e5f7ee;
  color: #1c9a5c;
}

/* Control en tiempo real */
.xd-live {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}
.xd-ring {
  position: relative;
  width: 132px;
  height: 132px;
}
.xd-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 14px;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
}
.xd-ring span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}
.xd-stats li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #f0edf9;
  color: var(--body-color);
}
.xd-stats li:last-child {
  border-bottom: 0;
}
.xd-stats b {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--ink);
}

/* Trazabilidad */
.xd-chain li {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
}
.xd-chain li:last-child {
  padding-bottom: 0;
}
.xd-chain li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 2px;
  border-left: 2px dashed #d4cbf3;
}
.xd-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--xd-icon-bg);
  color: var(--primary);
}
.xd-dot .ic {
  width: 18px;
  height: 18px;
}
.xd-chain b,
.xd-notifs b,
.xd-files b {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.xd-chain small,
.xd-notifs small,
.xd-files small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Alertas */
.xd-notifs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.xd-notifs li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #f0edf9;
  border-radius: 16px;
  background: #fcfbff;
}
.n-amber .xd-dot {
  background: #fdf3d9;
  color: #d99a0b;
}
.n-blue .xd-dot {
  background: #e3edff;
  color: #3b78e7;
}
.n-red .xd-dot {
  background: #fde8e9;
  color: var(--red);
}
.n-violet .xd-dot {
  background: #ede7ff;
  color: var(--primary);
}

/* Dispositivos */
.xd-devs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  padding: 10px 0 6px;
}
.xd-dev {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 3px solid #2a2358;
}
.xd-dev--pc {
  width: 150px;
  height: 104px;
  border-radius: 10px 10px 4px 4px;
}
.xd-dev--pc::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 54px;
  height: 8px;
  transform: translateX(-50%);
  background: #2a2358;
  border-radius: 0 0 6px 6px;
}
.xd-dev--tab {
  width: 96px;
  height: 128px;
  border-radius: 12px;
}
.xd-dev--ph {
  width: 62px;
  height: 118px;
  padding: 10px 8px;
  border-radius: 14px;
}
.xd-dev .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--xd-icon-bg);
}
.xd-dev .ln {
  height: 5px;
  border-radius: 3px;
  background: #ebe7f8;
}
.xd-dev .ln.s {
  width: 60%;
}
.xd-dev .ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 92%, #e7e2f7 0);
  -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px);
  mask: radial-gradient(circle, transparent 9px, #000 10px);
}
.xd-dev--ph .ring {
  width: 24px;
  height: 24px;
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 8px);
  mask: radial-gradient(circle, transparent 7px, #000 8px);
}
.xd-sync {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid #f0edf9;
  color: var(--body-color);
  font-size: 0.85rem;
}
.xd-sync .ic {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Documental */
.xd-files {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.xd-files li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #f0edf9;
  border-radius: 16px;
  background: #fcfbff;
}
.xd-files li > div {
  flex: 1;
  min-width: 0;
}
.xd-files b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xd-ft {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fde8e9;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.xd-ft--xls {
  background: #e2f6ec;
  color: #1c9a5c;
}

/* Indicadores */
.xd-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.xd-tiles div {
  padding: 12px;
  border: 1px solid #f0edf9;
  border-radius: 14px;
  background: #fcfbff;
}
.xd-tiles span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--muted);
}
.xd-tiles b {
  display: block;
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--ink);
}
.xd-tiles b.good {
  color: #1c9a5c;
}
.xd-spark {
  width: 100%;
  height: 96px;
  margin-top: 16px;
}

/* Directivos */
.xd-areas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.xd-areas li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  color: var(--body-color);
}
.xd-areas i {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #ece8f8;
}
.xd-areas i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.xd-areas .low i::after {
  background: linear-gradient(90deg, #f5b841, #f0a020);
}
.xd-areas b {
  text-align: right;
  font-family: var(--font-head);
  color: var(--ink);
}

/* Escalabilidad */
.xd-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 12px;
  height: 190px;
}
.xd-steps > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  height: 100%;
}
.xd-steps i {
  display: block;
  width: 100%;
  height: var(--h);
  border-radius: 12px 12px 6px 6px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  opacity: 0.9;
}
.xd-steps > div:nth-child(1) i {
  opacity: 0.4;
}
.xd-steps > div:nth-child(2) i {
  opacity: 0.6;
}
.xd-steps > div:nth-child(3) i {
  opacity: 0.8;
}
.xd-steps span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}

/* CTA final: mismo lenguaje visual */
.xade-page .cta-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #ece7fd 100%);
  border-color: var(--xd-line);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .xade-page .page-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .xade-page .page-hero h1 {
    font-size: clamp(2.4rem, 6.4vw, 3.2rem);
  }
  .xade-page .page-hero-visual {
    justify-content: center;
    margin-top: 0;
  }
  .xd-stage {
    max-width: 640px;
    margin-inline: auto;
  }
  .xade-page .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .xade-page .detail-side {
    max-width: 520px;
  }
  .xd-devices-card {
    grid-template-columns: 1fr;
  }
  .xd-devices-sep {
    height: 1px;
    width: 100%;
  }
  .xd-devices-note {
    transform: rotate(-3deg);
    width: fit-content;
  }
}

@media (max-width: 640px) {
  .xade-page .page-hero h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }
  .xade-page .page-hero .btn-primary {
    width: 100%;
    padding: 18px 28px;
  }
  .xd-devices-list {
    grid-template-columns: 1fr;
  }
  .xd-points {
    grid-template-columns: 1fr;
  }
  .xd-live {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .xd-devs {
    gap: 10px;
    transform: scale(0.86);
    transform-origin: center bottom;
  }
  .xd-stats {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xd-phone {
    animation: none;
  }
}
