/* ══════════════════════════════════════════════════════════════
   МОДУЛИ (ИНТЕРАКТИВНЫЕ ТАБЫ)
   ══════════════════════════════════════════════════════════════ */

.mod-tabs-layout { 
  display: grid; 
  grid-template-columns: 420px 1fr; 
  gap: 48px; 
  align-items: start; 
  min-height: 620px; 
}

.mod-tabs-left { 
  display: flex; 
  flex-direction: column; 
  gap: 0; 
  position: sticky; 
  top: 80px; 
  height: 570px; 
  overflow: hidden; 
}

.mod-tab-btn {
  display: flex; 
  align-items: flex-start; 
  gap: 20px;
  padding: 24px 28px; 
  background: transparent; 
  border: none;
  border-left: 3px solid var(--border); 
  cursor: pointer;
  transition: all .4s ease; 
  text-align: left; 
  position: relative;
}

.mod-tab-btn:hover { 
  background: rgba(var(--accent-rgb), 0.04); 
}

.mod-tab-btn.active { 
  border-left-color: var(--accent); 
  background: rgba(var(--accent-rgb), 0.06); 
}

.mod-tab-num { 
  font-size: 12px; 
  font-weight: 800; 
  color: var(--accent); 
  letter-spacing: 2px; 
  min-width: 26px; 
  padding-top: 3px; 
}

.mod-tab-info h4 { 
  font-size: 17px; 
  font-weight: 700; 
  color: var(--muted); 
  margin-bottom: 6px; 
  transition: color .3s; 
}

.mod-tab-btn.active .mod-tab-info h4 { 
  color: var(--white); 
}

.mod-tab-info p { 
  font-size: 14px; 
  color: var(--muted); 
  line-height: 1.5; 
  opacity: 0.6; 
  transition: opacity .3s; 
}

.mod-tab-btn.active .mod-tab-info p { 
  opacity: 1; 
}

.mod-tab-features { 
  max-height: 0; 
  overflow: hidden; 
  transition: max-height .45s ease, opacity .35s, margin-top .35s; 
  opacity: 0; 
  margin-top: 0; 
  list-style: none; 
}

.mod-tab-btn.active .mod-tab-features { 
  max-height: 300px; 
  opacity: 1; 
  margin-top: 12px; 
}

.mod-tab-features li { 
  font-size: 13px; 
  color: var(--muted); 
  padding: 4px 0; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.mod-tab-features li::before { 
  content: ''; 
  width: 5px; 
  height: 5px; 
  border-radius: 50%; 
  background: var(--accent3); 
  flex-shrink: 0; 
}

.mod-preview-area {
  position: relative; 
  min-height: 620px;
  background: transparent; 
  border: none;
  border-radius: 20px; 
  overflow: hidden;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.mod-preview-panel {
  position: absolute; 
  inset: 0; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  opacity: 0; 
  transform: translateY(20px); 
  transition: all .5s ease; 
  pointer-events: none; 
  padding: 32px;
}

.mod-preview-panel.active { 
  opacity: 1; 
  transform: translateY(0); 
  pointer-events: auto; 
}

.mod-tab-progress { 
  position: absolute; 
  left: 0; 
  bottom: 0; 
  height: 2px; 
  background: var(--accent); 
  width: 0; 
}

.mod-tab-btn.active .mod-tab-progress { 
  animation: modTabProgress 6s linear forwards; 
}

/* ── CONNECTIONS VISUALIZATION ── */
.viz-connections { 
  position: relative; 
  width: 456px; 
  height: 456px; 
}

.viz-center {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  width: 96px; 
  height: 96px; 
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 34px; 
  color: #fff; 
  z-index: 2;
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.4);
}

.viz-node {
  position: absolute; 
  width: 72px; 
  height: 72px; 
  border-radius: 18px;
  background: var(--surface); 
  border: 1px solid var(--border);
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
  font-size: 13px; 
  color: var(--muted); 
  gap: 2px; 
  z-index: 2; 
  transition: all .3s;
}

.viz-node:hover { 
  border-color: rgba(var(--accent-rgb), 0.5); 
  transform: scale(1.1); 
}

.viz-node-icon { 
  font-size: 24px; 
}

.viz-line { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform-origin: 0 0; 
  height: 2px; 
  z-index: 1; 
}

.viz-line-inner { 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.6), rgba(var(--accent-rgb), 0.1)); 
}

.viz-pulse {
  position: absolute; 
  width: 6px; 
  height: 6px; 
  border-radius: 50%;
  background: var(--accent); 
  top: -2px; 
  left: 0;
  animation: pulseFlow 2.5s ease-in-out infinite;
}

/* ── ORBIT VISUALIZATION ── */
.viz-orbit { 
  position: relative; 
  width: 360px; 
  height: 360px; 
}

.viz-phone {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  width: 72px; 
  height: 130px; 
  border: 2px solid var(--viz-border2); 
  border-radius: 16px;
  background: var(--viz-bg); 
  display: flex; 
  flex-direction: column; 
  align-items: center;
  justify-content: center; 
  z-index: 2; 
  overflow: hidden;
}

.viz-phone-screen { 
  width: 56px; 
  height: 96px; 
  border-radius: 8px; 
  background: linear-gradient(180deg, var(--viz-surface), var(--viz-bg)); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  gap: 4px; 
}

.viz-phone-tg { 
  font-size: 24px; 
}

.viz-phone-label { 
  font-size: 6px; 
  color: var(--muted); 
  text-align: center; 
}

.viz-orbit-ring {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  border: 1px dashed rgba(var(--accent-rgb), 0.2);
  border-radius: 50%; 
  transform: translate(-50%, -50%);
}

.viz-orbit-ring.r1 { 
  width: 240px; 
  height: 240px; 
  animation: orbitSpin 25s linear infinite; 
}

.viz-orbit-ring.r2 { 
  width: 334px; 
  height: 334px; 
  animation: orbitSpin 35s linear infinite reverse; 
}

.viz-orbit-item {
  position: absolute; 
  width: 44px; 
  height: 44px; 
  border-radius: 12px;
  background: var(--surface); 
  border: 1px solid var(--border);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.viz-orbit-ring.r1 .viz-orbit-item { 
  animation: orbitCounterSpin 25s linear infinite; 
}

.viz-orbit-ring.r2 .viz-orbit-item { 
  animation: orbitCounterSpin 35s linear infinite reverse; 
}

/* ── WEBAPP MOCKUP ── */
.viz-webapp { 
  width: 240px; 
  background: var(--viz-bg); 
  border-radius: 20px; 
  overflow: hidden; 
  border: 1px solid var(--viz-border); 
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); 
}

.viz-webapp-header { 
  padding: 12px 16px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  border-bottom: 1px solid var(--viz-border2); 
}

.viz-webapp-header span { 
  font-size: 11px; 
  color: var(--muted); 
}

.viz-webapp-search { 
  margin: 10px 12px; 
  padding: 8px 12px; 
  background: var(--viz-surface); 
  border-radius: 8px; 
  font-size: 10px; 
  color: #666; 
  border: 1px solid var(--viz-border); 
}

.viz-webapp-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 8px; 
  padding: 8px 12px; 
}

.viz-product-card { 
  background: var(--viz-surface); 
  border-radius: 10px; 
  padding: 10px; 
  border: 1px solid var(--viz-border); 
}

.viz-product-img { 
  width: 100%; 
  height: 56px; 
  border-radius: 6px; 
  background: linear-gradient(135deg, var(--viz-surface), var(--viz-bg)); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 20px; 
  margin-bottom: 6px; 
}

.viz-product-name { 
  font-size: 9px; 
  color: var(--white); 
  font-weight: 600; 
  margin-bottom: 3px; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.viz-product-price { 
  font-size: 10px; 
  color: var(--accent3); 
  font-weight: 700; 
  margin-bottom: 6px; 
}

.viz-product-btn { 
  width: 100%; 
  padding: 5px; 
  border-radius: 6px; 
  background: var(--accent3); 
  border: none; 
  color: #000; 
  font-size: 9px; 
  font-weight: 700; 
  cursor: pointer; 
}

.viz-product-btn.added { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  background: var(--accent3); 
  padding: 3px 6px; 
}

.viz-product-btn.added span { 
  font-size: 12px; 
  cursor: pointer; 
}

.viz-webapp-footer { 
  padding: 10px 12px; 
  border-top: 1px solid var(--viz-border2); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
}

.viz-webapp-footer-badge { 
  width: 20px; 
  height: 20px; 
  border-radius: 50%; 
  background: var(--accent3); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 10px; 
  font-weight: 700; 
  color: #000; 
}

.viz-webapp-footer-text { 
  font-size: 10px; 
  color: var(--white); 
  font-weight: 600; 
}

.viz-webapp-footer-price { 
  font-size: 11px; 
  color: var(--accent3); 
  font-weight: 700; 
}

/* ── DASHBOARD MOCKUP ── */
.viz-dashboard { 
  width: 240px; 
  background: var(--viz-bg); 
  border-radius: 20px; 
  overflow: hidden; 
  border: 1px solid var(--viz-border); 
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); 
}

.viz-dash-header { 
  padding: 14px 16px; 
  text-align: center; 
  font-size: 12px; 
  font-weight: 700; 
  color: var(--white); 
  border-bottom: 1px solid var(--viz-border2); 
}

.viz-dash-welcome { 
  margin: 12px; 
  padding: 14px; 
  background: var(--viz-surface); 
  border-radius: 12px; 
  border: 1px solid var(--viz-border); 
}

.viz-dash-welcome h5 { 
  font-size: 13px; 
  color: var(--white); 
  font-weight: 700; 
  margin-bottom: 2px; 
}

.viz-dash-welcome p { 
  font-size: 10px; 
  color: var(--muted); 
}

.viz-dash-stats { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 8px; 
  padding: 0 12px 8px; 
}

.viz-dash-stat { 
  background: var(--viz-surface); 
  border-radius: 10px; 
  padding: 10px; 
  border: 1px solid var(--viz-border); 
}

.viz-dash-stat-icon { 
  width: 26px; 
  height: 26px; 
  border-radius: 8px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 12px; 
  margin-bottom: 6px; 
}

.viz-dash-stat-label { 
  font-size: 9px; 
  color: var(--muted); 
  margin-bottom: 2px; 
}

.viz-dash-stat-val { 
  font-size: 16px; 
  font-weight: 800; 
  color: var(--white); 
}

.viz-dash-actions { 
  padding: 8px 12px 12px; 
}

.viz-dash-actions-title { 
  font-size: 11px; 
  color: var(--white); 
  font-weight: 700; 
  margin-bottom: 8px; 
  padding-bottom: 6px; 
  border-bottom: 1px solid var(--viz-border2); 
}

.viz-dash-action-row { 
  display: flex; 
  gap: 6px; 
}

.viz-dash-action-chip { 
  flex: 1; 
  padding: 8px; 
  background: var(--viz-surface); 
  border-radius: 8px; 
  text-align: center; 
  border: 1px solid var(--viz-border); 
}

.viz-dash-action-chip-icon { 
  font-size: 16px; 
  margin-bottom: 2px; 
}

.viz-dash-action-chip-text { 
  font-size: 8px; 
  color: var(--muted); 
}

.viz-dash-nav { 
  display: flex; 
  justify-content: space-around; 
  padding: 8px 8px 12px; 
  border-top: 1px solid var(--viz-border2); 
}

.viz-dash-nav-item { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 2px; 
  font-size: 7px; 
  color: var(--muted); 
  position: relative; 
}

.viz-dash-nav-item.active { 
  color: var(--accent); 
}

.viz-dash-nav-item span:first-child { 
  font-size: 14px; 
}

/* ══════════════════════════════════════════════════════════════
   УЛУЧШЕННОЕ ВЫДЕЛЕНИЕ ДЛЯ ОБЕИХ ТЕМ
   ══════════════════════════════════════════════════════════════ */

/* Добавляем акцентное свечение для viz-элементов */
.viz-webapp,
.viz-dashboard {
  position: relative;
}

.viz-webapp::before,
.viz-dashboard::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* Акцентная обводка сверху */
.viz-webapp::after,
.viz-dashboard::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}

/* Orbit phone - акцентное свечение */
.viz-phone {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3);
}

/* Orbit items - акцентные обводки */
.viz-orbit-item {
  border-color: rgba(var(--accent-rgb), 0.3);
}

.viz-orbit-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.4);
}

/* Viz-center - усиленное свечение */
.viz-center {
  box-shadow: 
    0 0 40px rgba(var(--accent-rgb), 0.5),
    0 0 80px rgba(var(--accent2-rgb), 0.3),
    0 4px 20px rgba(0,0,0,0.3);
}

/* Viz-connections - акцентная рамка */
.viz-connections {
  border-radius: 20px;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.03) 0%, transparent 70%);
}

/* Viz-orbit - акцентная рамка */
.viz-orbit {
  border-radius: 20px;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.03) 0%, transparent 70%);
}

/* ── Светлая тема: viz элементы ── */
html.light .viz-center {
  box-shadow: 
    0 0 0 3px rgba(var(--accent-rgb), 0.15),
    0 4px 12px rgba(0,0,0,0.1),
    0 8px 32px rgba(var(--accent-rgb), 0.25);
}

html.light .viz-connections,
html.light .viz-orbit {
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.04) 0%, transparent 70%);
}

html.light .viz-node {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

html.light .viz-node:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.2);
}

html.light .viz-orbit-item {
  background: #ffffff;
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

html.light .viz-phone {
  background: #ffffff;
  border-color: rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.2);
}
