/* Recurrentes V2 — sistema orbital de decisiones */
.mv7-recurring-view {
  min-height: calc(100vh - var(--v2-topbar-height));
  padding: 30px clamp(22px, 3vw, 48px) 36px;
}

.mv7-recurring-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.mv7-recurring-heading h2 {
  margin: 5px 0 4px;
  font-size: clamp(34px, 3.2vw, 48px);
  font-weight: 470;
  letter-spacing: -0.055em;
}

.mv7-recurring-heading > div > p:last-child {
  margin: 0;
  color: var(--v2-muted);
  font-size: 12px;
}

.mv7-recurring-heading svg {
  width: 14px;
  height: 14px;
}

.mv7-orbit-system {
  position: relative;
  overflow: hidden;
  min-height: 720px;
}

.mv7-orbit-scroll {
  overflow: hidden;
  width: 100%;
}

.mv7-orbit-field {
  position: relative;
  min-width: 0;
  height: 570px;
  background:
    radial-gradient(circle at 40% 44%, rgba(85, 229, 188, 0.08), transparent 19%),
    radial-gradient(ellipse at 41% 44%, rgba(49, 126, 105, 0.06), transparent 50%);
  isolation: isolate;
}

.mv7-orbit-field::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 54px 54px;
  content: '';
  mask-image: radial-gradient(ellipse at 42% 48%, #000 20%, transparent 72%);
}

.mv7-orbit-track {
  position: absolute;
  z-index: -1;
  top: 45%;
  left: 40%;
  border: 1px solid var(--orbit-color);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  box-shadow: 0 0 15px color-mix(in srgb, var(--orbit-color) 10%, transparent);
  opacity: 0.78;
}

.mv7-orbit-track::before,
.mv7-orbit-track::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orbit-color);
  box-shadow: 0 0 10px var(--orbit-color);
  content: '';
}

.mv7-orbit-track::before {
  top: 14%;
  left: 15%;
}

.mv7-orbit-track::after {
  right: 10%;
  bottom: 18%;
}

.mv7-orbit-track > span {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  background: var(--v2-canvas);
  color: var(--orbit-color);
  font-size: var(--v2-text-xs);
  font-weight: 590;
  white-space: nowrap;
  transform: rotate(7deg);
}

.mv7-orbit-track > span::before {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: '';
}

.mv7-orbit-track-essential {
  --orbit-color: rgba(72, 234, 181, 0.82);
  width: 52%;
  height: 53%;
}

.mv7-orbit-track-essential > span {
  top: -28px;
  left: 39%;
}

.mv7-orbit-track-review {
  --orbit-color: rgba(241, 181, 87, 0.82);
  width: 72%;
  height: 72%;
}

.mv7-orbit-track-review > span {
  bottom: 7%;
  left: 18%;
}

.mv7-orbit-track-optional {
  --orbit-color: rgba(255, 107, 98, 0.78);
  width: 91%;
  height: 90%;
}

.mv7-orbit-track-optional > span {
  bottom: -13px;
  left: 38%;
}

.mv7-orbit-core {
  position: absolute;
  z-index: 2;
  top: 45%;
  left: 40%;
  display: grid;
  width: 218px;
  height: 218px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(196, 255, 234, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 35%, rgba(203, 255, 239, 0.22), transparent 24%),
    radial-gradient(circle at 50% 55%, rgba(26, 89, 70, 0.58), rgba(6, 13, 11, 0.91) 68%);
  box-shadow:
    inset 0 0 36px rgba(150, 255, 220, 0.16),
    0 0 32px rgba(94, 235, 188, 0.16),
    0 24px 60px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(20px);
}

.mv7-orbit-core::before,
.mv7-orbit-core::after {
  position: absolute;
  border-radius: 50%;
  content: '';
}

.mv7-orbit-core::before {
  inset: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mv7-orbit-core::after {
  top: 23px;
  right: 38px;
  width: 32px;
  height: 13px;
  background: rgba(220, 255, 244, 0.18);
  filter: blur(8px);
}

.mv7-orbit-core > i {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
}

.mv7-orbit-core > i::before,
.mv7-orbit-core > i::after {
  position: absolute;
  right: -15%;
  left: -15%;
  height: 42px;
  border: 1px solid rgba(133, 255, 217, 0.13);
  border-radius: 50%;
  content: '';
}

.mv7-orbit-core > i::before {
  top: 74px;
}

.mv7-orbit-core > i::after {
  top: 112px;
}

.mv7-orbit-core strong {
  z-index: 1;
  font-size: 19px;
  font-weight: 530;
  letter-spacing: -0.025em;
}

.mv7-orbit-core span {
  z-index: 1;
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--v2-text-xs);
}

.mv7-orbit-nodes {
  position: absolute;
  inset: 0 126px 0 0;
}

.mv7-recurring-node {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--v2-text);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    filter 180ms ease,
    transform 220ms ease;
}

.mv7-recurring-node:hover,
.mv7-recurring-node:focus-visible {
  z-index: 12;
  filter: brightness(1.2);
  outline: none;
  transform: translate(-50%, -50%) scale(1.04);
}

.mv7-recurring-node.is-selected {
  opacity: 0;
  pointer-events: none;
}

.mv7-recurring-node.is-paused {
  opacity: 0.42;
}

.mv7-recurring-node > span:first-child {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border: 1px solid var(--node-color);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 40% 30%,
      color-mix(in srgb, var(--node-color) 22%, transparent),
      transparent 42%
    ),
    rgba(9, 13, 12, 0.93);
  box-shadow:
    inset 0 0 15px color-mix(in srgb, var(--node-color) 13%, transparent),
    0 0 15px color-mix(in srgb, var(--node-color) 14%, transparent);
}

.mv7-recurring-node > span:first-child svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--node-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.mv7-recurring-node > span:last-child {
  display: grid;
  min-width: 105px;
  gap: 4px;
  text-align: left;
}

.mv7-recurring-node strong {
  font-size: var(--v2-text-xs);
  font-weight: 570;
}

.mv7-recurring-node small {
  color: rgba(255, 255, 255, 0.56);
  font-size: var(--v2-text-micro);
}

.mv7-recurring-node.is-essential {
  --node-color: #65ebbd;
}

.mv7-recurring-node.is-review {
  --node-color: #f3b557;
}

.mv7-recurring-node.is-optional {
  --node-color: #ff7469;
}

.mv7-orbit-analysis[hidden] {
  display: none;
}

.mv7-orbit-analysis {
  position: absolute;
  z-index: 11;
  top: 54%;
  right: 118px;
  display: grid;
  width: 58%;
  min-height: 145px;
  grid-template-columns: 150px minmax(260px, 1fr) 88px;
  align-items: center;
  gap: 10px;
  padding: 18px 15px 18px 0;
  border: 1px solid #58d6ff;
  border-left: 0;
  border-radius: 0 18px 18px 0;
  background:
    linear-gradient(90deg, rgba(23, 116, 144, 0.22), rgba(5, 12, 14, 0.91) 74%),
    rgba(6, 11, 12, 0.88);
  box-shadow:
    inset 0 0 28px rgba(88, 214, 255, 0.08),
    0 0 25px rgba(88, 214, 255, 0.16);
  backdrop-filter: blur(20px);
}

.mv7-recurring-analysis-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-25px);
}

.mv7-recurring-analysis-identity > span {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  place-items: center;
  border: 1px solid #58d6ff;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 130, 162, 0.48), rgba(4, 13, 16, 0.96) 72%);
  box-shadow:
    inset 0 0 22px rgba(88, 214, 255, 0.25),
    0 0 18px rgba(88, 214, 255, 0.28);
}

.mv7-recurring-analysis-identity svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #74e2ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.mv7-recurring-analysis-identity > div {
  display: grid;
  gap: 6px;
}

.mv7-recurring-analysis-identity strong {
  font-size: 14px;
  font-weight: 530;
}

.mv7-recurring-analysis-identity div span {
  color: #72e3ff;
  font-size: var(--v2-text-xs);
}

.mv7-orbit-analysis dl {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.mv7-orbit-analysis dl > div {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding-inline: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
}

.mv7-orbit-analysis dt {
  color: var(--v2-muted);
  font-size: var(--v2-text-micro);
}

.mv7-orbit-analysis dd {
  overflow: hidden;
  margin: 0;
  color: var(--v2-text);
  font-size: var(--v2-text-micro);
  font-weight: 550;
  text-overflow: ellipsis;
}

.mv7-recurring-analysis-actions {
  display: grid;
  gap: 9px;
}

.mv7-recurring-analysis-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: var(--v2-text-micro);
}

.mv7-recurring-impact {
  position: absolute;
  z-index: 5;
  top: 56px;
  right: 11px;
  bottom: 72px;
  display: grid;
  width: 82px;
  align-content: start;
  gap: 6px;
  padding-left: 17px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.mv7-recurring-impact > span {
  max-width: 76px;
  color: var(--v2-muted);
  font-size: var(--v2-text-micro);
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.mv7-recurring-impact > strong {
  margin-top: 4px;
  color: #4de4b2;
  font-size: var(--v2-text-xs);
  font-weight: 560;
}

.mv7-recurring-impact > small {
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--v2-text-micro);
}

.mv7-recurring-impact-gauge {
  position: absolute;
  top: 110px;
  bottom: 0;
  left: 26px;
  width: 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: linear-gradient(
    to top,
    rgba(255, 107, 98, 0.75),
    rgba(243, 181, 87, 0.55) 45%,
    rgba(50, 230, 161, 0.65)
  );
}

.mv7-recurring-impact-gauge::after {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 4, 0.7);
  content: '';
}

.mv7-recurring-impact-gauge i {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 100%;
  background: linear-gradient(to top, #ff6b62, #f3b557 48%, #32e6a1);
  transition: height 450ms ease;
}

.mv7-recurring-impact-gauge i::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #dffbef;
  box-shadow: 0 0 11px #65efbd;
  content: '';
  transform: translate(-50%, -50%);
}

.mv7-recurring-alert {
  position: absolute;
  right: 116px;
  bottom: 32px;
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 107, 98, 0.48);
  border-radius: 18px;
  background: rgba(36, 13, 11, 0.48);
  color: #ff857b;
  font-size: var(--v2-text-micro);
}

.mv7-recurring-alert svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.mv7-vampire-alert[hidden] {
  display: none;
}

.mv7-vampire-alert {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--v2-amber) 40%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--v2-amber) 10%, rgba(10, 12, 11, 0.6));
}

.mv7-vampire-alert-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--v2-amber);
  font-size: 12px;
  font-weight: 560;
}

.mv7-vampire-alert-head svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.mv7-vampire-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mv7-vampire-chip {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid color-mix(in srgb, var(--v2-amber) 45%, transparent);
  border-radius: 999px;
  background: rgba(10, 12, 11, 0.7);
  color: var(--v2-text);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.mv7-vampire-chip:hover,
.mv7-vampire-chip:focus-visible {
  border-color: var(--v2-amber);
  background: color-mix(in srgb, var(--v2-amber) 16%, rgba(10, 12, 11, 0.7));
}

.mv7-vampire-chip svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--v2-amber);
  stroke-width: 2;
}

.mv7-vampire-chip span:last-child {
  color: var(--v2-amber);
}

.mv7-recurring-simulator {
  display: grid;
  min-height: 126px;
  grid-template-columns: minmax(240px, 0.8fr) 1px minmax(170px, 0.55fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: rgba(10, 13, 12, 0.75);
}

.mv7-recurring-simulator > i {
  width: 1px;
  height: 62px;
  background: rgba(255, 255, 255, 0.12);
}

.mv7-recurring-simulator-action {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mv7-recurring-pause-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border: 1px solid rgba(50, 230, 161, 0.4);
  border-radius: 50%;
  background: rgba(50, 230, 161, 0.08);
  color: #65e9bd;
  font-size: 21px;
}

.mv7-recurring-simulator-action > div,
.mv7-recurring-saving {
  display: grid;
  gap: 5px;
}

.mv7-recurring-simulator-action strong {
  font-size: 13px;
  font-weight: 530;
}

.mv7-recurring-simulator-action small,
.mv7-recurring-saving span,
.mv7-recurring-saving small {
  color: var(--v2-muted);
  font-size: var(--v2-text-micro);
}

.mv7-recurring-saving strong {
  color: #4de4b2;
  font-size: 19px;
  font-weight: 540;
}

.mv7-recurring-projection {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.mv7-recurring-projection > span {
  color: var(--v2-muted);
  font-size: var(--v2-text-micro);
}

.mv7-recurring-projection > i {
  height: 1px;
  background: linear-gradient(90deg, #4de4b2, rgba(77, 228, 178, 0.2));
}

.mv7-recurring-projection b,
.mv7-recurring-projection em {
  font-size: var(--v2-text-xs);
  font-style: normal;
  font-weight: 520;
}

.mv7-recurring-projection b {
  color: rgba(255, 255, 255, 0.58);
}

.mv7-recurring-projection em {
  justify-self: end;
  color: #4de4b2;
}

.mv7-recurring-dialog footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

@media (max-width: 1100px) and (min-width: 769px) {
  .mv7-orbit-scroll {
    overflow-x: auto;
  }

  .mv7-orbit-field {
    min-width: 900px;
  }

  .mv7-orbit-analysis {
    width: 62%;
    grid-template-columns: 145px minmax(250px, 1fr) 88px;
  }

  .mv7-orbit-analysis dl > div {
    padding-inline: 7px;
  }
}

@media (max-width: 768px) {
  .mv7-recurring-view {
    min-height: 0;
    padding: 21px 14px calc(42px + env(safe-area-inset-bottom));
  }

  .mv7-recurring-heading {
    align-items: center;
    margin-bottom: 17px;
  }

  .mv7-recurring-heading h2 {
    font-size: 28px;
  }

  .mv7-recurring-heading > div > p:last-child {
    max-width: 245px;
    font-size: var(--v2-text-xs);
  }

  .mv7-recurring-heading .mv7-primary-button {
    width: 40px;
    min-width: 40px;
    padding: 0;
    font-size: 0;
  }

  .mv7-recurring-heading .mv7-primary-button svg {
    width: 15px;
    height: 15px;
  }

  .mv7-orbit-system {
    min-height: 0;
  }

  .mv7-orbit-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--v2-line);
    border-radius: 13px 13px 0 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 228, 178, 0.35) transparent;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mv7-orbit-field {
    min-width: 1060px;
    height: 620px;
  }

  .mv7-orbit-analysis {
    top: 55%;
    width: 58%;
    grid-template-columns: 170px minmax(290px, 1fr) 100px;
  }

  .mv7-recurring-impact {
    right: 10px;
  }

  .mv7-recurring-simulator {
    min-height: 210px;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    padding: 17px 14px;
    border-radius: 0 0 13px 13px;
  }

  .mv7-recurring-simulator > i {
    display: none;
  }

  .mv7-recurring-simulator-action {
    grid-column: 1 / -1;
  }

  .mv7-recurring-projection {
    grid-column: 1 / -1;
  }

  .mv7-recurring-dialog footer {
    grid-template-columns: auto 1fr auto;
  }

  .mv7-recurring-dialog footer > span {
    display: none;
  }
}

