/* Feature Tour — full-window Edge-style carousel (dashboard shell) */
.portal-feature-tour {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 24px;
  background: #0a0a0a;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #f1f5f9;
  line-height: 1.45;
}
.portal-feature-tour.open {
  display: flex;
  animation: portalFeatureTourFade 0.4s ease;
}
@keyframes portalFeatureTourFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.portal-feature-tour .pft-stage {
  position: relative;
  width: min(560px, calc(100vw - 72px));
  height: min(620px, calc(100vh - 160px));
  flex: 0 1 auto;
  perspective: 1400px;
}

.portal-feature-tour .pft-stack {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: #2a3140;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.35s ease;
}
.portal-feature-tour .pft-stack.left-2 { transform: translateX(-54px) rotate(-7deg) scale(0.92); opacity: 0.35; z-index: 1; }
.portal-feature-tour .pft-stack.left-1 { transform: translateX(-30px) rotate(-3.5deg) scale(0.96); opacity: 0.55; z-index: 2; }
.portal-feature-tour .pft-stack.right-1 { transform: translateX(30px) rotate(3.5deg) scale(0.96); opacity: 0.55; z-index: 2; }
.portal-feature-tour .pft-stack.right-2 { transform: translateX(54px) rotate(7deg) scale(0.92); opacity: 0.35; z-index: 1; }
.portal-feature-tour .pft-stage[data-edge="start"] .pft-stack.left-1,
.portal-feature-tour .pft-stage[data-edge="start"] .pft-stack.left-2 { opacity: 0; transform: translateX(0) scale(0.98); }
.portal-feature-tour .pft-stage[data-edge="end"] .pft-stack.right-1,
.portal-feature-tour .pft-stage[data-edge="end"] .pft-stack.right-2 { opacity: 0; transform: translateX(0) scale(0.98); }

.portal-feature-tour .pft-card {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #1b2333;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 80px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.35s ease;
}
.portal-feature-tour .pft-card.exit-left {
  transform: translateX(-40%) rotate(-6deg) scale(0.94);
  opacity: 0;
  pointer-events: none;
}
.portal-feature-tour .pft-card.exit-right {
  transform: translateX(40%) rotate(6deg) scale(0.94);
  opacity: 0;
  pointer-events: none;
}
.portal-feature-tour .pft-card.enter-from-right {
  animation: pftEnterRight 0.42s cubic-bezier(0.22, 0.9, 0.3, 1);
}
.portal-feature-tour .pft-card.enter-from-left {
  animation: pftEnterLeft 0.42s cubic-bezier(0.22, 0.9, 0.3, 1);
}
@keyframes pftEnterRight {
  from { transform: translateX(42%) rotate(7deg) scale(0.94); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes pftEnterLeft {
  from { transform: translateX(-42%) rotate(-7deg) scale(0.94); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.portal-feature-tour .pft-visual {
  flex: 1 1 auto;
  min-height: 0;
  background: linear-gradient(160deg, #dce6f4 0%, #eef3fa 45%, #d8e2f0 100%);
  padding: 18px 18px 10px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.portal-feature-tour .pft-announce {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px 20px;
  border-radius: 14px;
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #12203a 100%);
  border: 1px solid rgba(96, 205, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.portal-feature-tour .pft-announce-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fbbf24;
}
.portal-feature-tour .pft-announce-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 129, 247, 0.18);
  border: 1px solid rgba(96, 205, 255, 0.35);
  color: #60cdff;
}
.portal-feature-tour .pft-announce-icon .material-symbols-outlined {
  font-size: 36px;
  font-variation-settings: "FILL" 1;
}
.portal-feature-tour .pft-announce-name {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}
.portal-feature-tour .pft-announce-sub {
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.75);
  max-width: 16rem;
}
.portal-feature-tour .pft-visual-inner {
  flex: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #0b1220;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  display: flex;
  min-height: 0;
}

.portal-feature-tour .pft-rail {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-right: 1px solid #243247;
  background: #121c2d;
}
.portal-feature-tour .pft-rail-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  color: #f1f5f9;
}
.portal-feature-tour .pft-rail-btn.on {
  opacity: 1;
  background: rgba(47, 129, 247, 0.18);
  color: #2f81f7;
  box-shadow: inset 0 0 0 1px rgba(47, 129, 247, 0.4);
}
.portal-feature-tour .pft-mini-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0b1220;
}
.portal-feature-tour .pft-mini-hdr {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #243247;
  background: #121c2d;
  position: relative;
  z-index: 4;
  flex-shrink: 0;
}
.portal-feature-tour .pft-hdr-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.portal-feature-tour .pft-search {
  width: 40px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #243247;
  background: #182338;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.portal-feature-tour .pft-auth {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-feature-tour .pft-theme {
  height: 26px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid #243247;
  background: #182338;
  font-size: 10px;
  font-weight: 600;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
}
.portal-feature-tour .pft-mini-dash {
  padding: 10px;
  flex: 1;
  position: relative;
}
.portal-feature-tour .pft-mini-dash.dim { opacity: 0.4; }
.portal-feature-tour .pft-sec {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
  opacity: 0.55;
  color: #e2e8f0;
}
.portal-feature-tour .pft-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 110px));
  gap: 6px;
}
.portal-feature-tour .pft-tile {
  border-radius: 10px;
  border: 1px solid #243247;
  background: #182338;
  padding: 10px 6px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #e2e8f0;
}

.portal-feature-tour .pft-mde {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.portal-feature-tour .pft-mde .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}
.portal-feature-tour .pft-mde .count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.portal-feature-tour .pft-mde.green {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}
.portal-feature-tour .pft-mde.green .dot { background: #34d399; }
.portal-feature-tour .pft-mde.orange {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.portal-feature-tour .pft-mde.orange .count { background: #f59e0b; }
.portal-feature-tour .pft-mde.red {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.portal-feature-tour .pft-mde.red .count { background: #ef4444; }

.portal-feature-tour .pft-nudge {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  z-index: 8;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: #182338;
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  animation: pftNudgePulse 1.8s ease-in-out infinite;
}
.portal-feature-tour .pft-nudge:before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  margin-left: -5px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: inherit;
  border-left: 1px solid inherit;
  border-top: 1px solid inherit;
}
@keyframes pftNudgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

.portal-feature-tour .pft-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: min(250px, 70vw);
  border-radius: 12px;
  border: 1px solid #243247;
  overflow: hidden;
  background: #121c2d;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  text-align: left;
}
.portal-feature-tour .pft-pop-h {
  padding: 8px 10px;
  border-bottom: 1px solid #243247;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: flex-start;
}
.portal-feature-tour .pft-pop-h h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #f1f5f9;
}
.portal-feature-tour .pft-pop-h p {
  margin: 2px 0 0;
  font-size: 9px;
  color: #94a3b8;
}
.portal-feature-tour .pft-pop-badge {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  flex-shrink: 0;
}
.portal-feature-tour .pft-pop-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portal-feature-tour .pft-alert {
  border-radius: 8px;
  border: 1px solid;
  padding: 7px 8px;
}
.portal-feature-tour .pft-alert.red {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
}
.portal-feature-tour .pft-alert.orange {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
}
.portal-feature-tour .pft-alert .t {
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 2px;
  color: #fecaca;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.portal-feature-tour .pft-alert.orange .t { color: #fde68a; }
.portal-feature-tour .pft-alert .m {
  margin: 0;
  font-size: 9.5px;
  color: #cbd5e1;
  line-height: 1.3;
}
.portal-feature-tour .pft-alert .meta {
  margin: 4px 0 0;
  font-size: 8px;
  color: #64748b;
}
.portal-feature-tour .pft-tag {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid;
}
.portal-feature-tour .pft-tag.outage {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.35);
}
.portal-feature-tour .pft-tag.heads {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.35);
}
.portal-feature-tour .pft-pop-f {
  padding: 6px 10px;
  border-top: 1px solid #243247;
  font-size: 9px;
  color: #94a3b8;
  background: rgba(24, 35, 56, 0.5);
}

.portal-feature-tour .pft-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 8px 4px;
}
.portal-feature-tour .pft-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}
.portal-feature-tour .pft-legend-pill .ldot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.portal-feature-tour .pft-legend-pill.green { border-color: rgba(16, 185, 129, 0.45); }
.portal-feature-tour .pft-legend-pill.green .ldot { background: #10b981; }
.portal-feature-tour .pft-legend-pill.orange { border-color: rgba(245, 158, 11, 0.5); }
.portal-feature-tour .pft-legend-pill.orange .ldot { background: #f59e0b; }
.portal-feature-tour .pft-legend-pill.red { border-color: rgba(239, 68, 68, 0.45); }
.portal-feature-tour .pft-legend-pill.red .ldot { background: #ef4444; }
.portal-feature-tour .pft-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 8px 12px 16px;
  align-items: center;
  background: #121c2d;
  border-radius: 12px;
  margin: 0 12px 12px;
  border: 1px solid #243247;
}

.portal-feature-tour .pft-copy {
  flex: 0 0 auto;
  padding: 22px 28px 26px;
  background: #1b2333;
  color: #fff;
  text-align: center;
}
.portal-feature-tour .pft-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.portal-feature-tour .pft-copy p {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
}

.portal-feature-tour .pft-controls {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.portal-feature-tour .pft-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}
.portal-feature-tour .pft-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: 0;
  padding: 0;
  cursor: default;
  transition: transform 0.2s ease, background 0.2s ease;
}
.portal-feature-tour .pft-dot.on {
  background: #fff;
  transform: scale(1.35);
}
.portal-feature-tour .pft-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.portal-feature-tour .pft-back {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 0;
  background: #0078d4;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 120, 212, 0.35);
}
.portal-feature-tour .pft-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}
.portal-feature-tour .pft-back:hover:not(:disabled) { filter: brightness(1.08); }
.portal-feature-tour .pft-next,
.portal-feature-tour .pft-close {
  min-width: 148px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: #60cdff;
  color: #0b1a2a;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(96, 205, 255, 0.28);
}
.portal-feature-tour .pft-next:hover,
.portal-feature-tour .pft-close:hover { filter: brightness(1.05); }
.portal-feature-tour .pft-close {
  background: #fff;
  color: #0b1a2a;
}
.portal-feature-tour .pft-next[hidden],
.portal-feature-tour .pft-close[hidden],
.portal-feature-tour [hidden] {
  display: none !important;
}

.portal-feature-tour .pft-brand {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.portal-feature-tour .pft-brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f81f7, #60cdff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

body.portal-feature-tour-lock {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .portal-feature-tour .pft-stage {
    width: min(100%, calc(100vw - 32px));
    height: min(560px, calc(100vh - 150px));
  }
  .portal-feature-tour .pft-stack.left-2,
  .portal-feature-tour .pft-stack.right-2 { display: none; }
  .portal-feature-tour .pft-stack.left-1 { transform: translateX(-18px) rotate(-2.5deg) scale(0.97); }
  .portal-feature-tour .pft-stack.right-1 { transform: translateX(18px) rotate(2.5deg) scale(0.97); }
  .portal-feature-tour .pft-copy { padding: 18px 18px 20px; }
  .portal-feature-tour .pft-copy h2 { font-size: 1.15rem; }
  .portal-feature-tour .pft-copy p { font-size: 0.84rem; }
  .portal-feature-tour .pft-brand { left: 12px; bottom: 12px; font-size: 0.72rem; }
}
