



/* =====================================================
   TEMPLATE TAB - STYLES
   Location: profile/tabs/template/template-tab.css

   SCOPING RULE: todo bajo .profile-details-dialog.
   Este tab vive siempre dentro del profile dialog,
   por lo que el scope es seguro y no hay colisiones.
   ===================================================== */

/* =====================================================
   TAB CONTAINER
   ===================================================== */

.profile-details-dialog .template-tab-content {
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}



/* =====================================================
   TEMPLATE INFO CARD
   ===================================================== */

.profile-details-dialog .template-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-details-dialog .template-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-details-dialog .template-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.profile-details-dialog .template-id {
  background: #f0f4c3;
  color: #827717;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Roboto Mono', monospace;
}

.profile-details-dialog .template-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-details-dialog .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.profile-details-dialog .meta-pill md-icon {
  font-size: 16px !important;
}

.profile-details-dialog .pill-domain {
  background: #e3f2fd;
  color: #1976d2;
}

.profile-details-dialog .pill-stack {
  background: #e8f5e9;
  color: #388e3c;
}

.profile-details-dialog .pill-language {
  background: #fff3e0;
  color: #f57c00;
}

.profile-details-dialog .template-description {
  margin-bottom: 16px;
}

.profile-details-dialog .template-description h4 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin: 0 0 8px 0;
}

.profile-details-dialog .template-description p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.profile-details-dialog .template-footer {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #999;
}

.profile-details-dialog .template-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-details-dialog .template-date md-icon {
  font-size: 16px !important;
}



/* =====================================================
   TEMPLATE VERSIONS SECTION
   ===================================================== */

.profile-details-dialog .template-versions-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


/* Header */
.profile-details-dialog .versions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.profile-details-dialog .versions-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-details-dialog .versions-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.profile-details-dialog .versions-title md-icon {
  font-size: 24px !important;
  color: #667eea;
}

.profile-details-dialog .versions-count {
  background: #f0f4c3;
  color: #827717;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}


/* Sort toggle */
.profile-details-dialog .versions-sort-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid #e6e6e6;
  background: #fff;
}

.profile-details-dialog .sort-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.profile-details-dialog .sort-value {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  font-family: 'Roboto Mono', monospace;
  min-width: 40px;
  text-align: right;
}

.profile-details-dialog .sort-icon-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 16px !important;
  background: rgba(102, 126, 234, 0.08) !important;
}

.profile-details-dialog .sort-icon-btn md-icon {
  color: #667eea !important;
  font-size: 18px !important;
}

.profile-details-dialog .sort-icon-btn:hover {
  background: rgba(102, 126, 234, 0.16) !important;
}


/* Loading State */
.profile-details-dialog .versions-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.profile-details-dialog .versions-loading p {
  color: #999;
  font-size: 14px;
  margin: 0;
}


/* Empty State */
.profile-details-dialog .versions-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
}

.profile-details-dialog .versions-empty md-icon {
  font-size: 64px !important;
  color: #e0e0e0;
}

.profile-details-dialog .versions-empty p {
  color: #999;
  font-size: 14px;
  margin: 0;
}



/* =====================================================
   VERSIONS LIST (flat list)
   ===================================================== */

.profile-details-dialog .versions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-details-dialog .version-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.profile-details-dialog .version-row:hover {
  background: #f5f5f5;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.profile-details-dialog .version-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.profile-details-dialog .version-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Roboto Mono', monospace;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.profile-details-dialog .version-pill md-icon {
  font-size: 18px !important;
}

.profile-details-dialog .version-status-pill {
  flex-shrink: 0;
}

.profile-details-dialog .version-default-pill {
  flex-shrink: 0;
}

.profile-details-dialog .version-metadata {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}


/* ── metadata-row SCOPED: evita pisar home.css ── */
.profile-details-dialog .metadata-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.profile-details-dialog .metadata-icon {
  font-size: 16px !important;
  color: #999;
  flex-shrink: 0;
}

.profile-details-dialog .metadata-label {
  font-weight: 600;
  color: #666;
  min-width: 70px;
  flex-shrink: 0;
}

.profile-details-dialog .metadata-value {
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-details-dialog .version-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.profile-details-dialog .version-action-btn {
  min-width: 100px !important;
  height: 36px !important;
  line-height: 36px !important;
  padding: 0 16px !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  text-transform: none !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.profile-details-dialog .version-action-btn md-icon {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}



/* =====================================================
   VERSION ACTION BUTTONS
   ===================================================== */

.profile-details-dialog .btn-edit-version {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2) !important;
}

.profile-details-dialog .btn-edit-version:hover {
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4) !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .btn-explorer-version {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(38, 166, 154, 0.2) !important;
}

.profile-details-dialog .btn-explorer-version:hover {
  box-shadow: 0 4px 10px rgba(38, 166, 154, 0.4) !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .btn-promote-version {
  background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(102, 187, 106, 0.2) !important;
}

.profile-details-dialog .btn-promote-version:hover {
  box-shadow: 0 4px 10px rgba(102, 187, 106, 0.4) !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .btn-promote-version[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

.profile-details-dialog .btn-reject-version {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(239, 83, 80, 0.2) !important;
}

.profile-details-dialog .btn-reject-version:hover {
  box-shadow: 0 4px 10px rgba(239, 83, 80, 0.4) !important;
  transform: translateY(-1px) !important;
}


/* Delete version button */
.profile-details-dialog .delete-version-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
}

.profile-details-dialog .delete-version-btn md-icon {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
}

.profile-details-dialog .delete-version-btn.delete-neutral {
  color: #757575 !important;
  transition: all 0.3s ease !important;
}

.profile-details-dialog .delete-version-btn.delete-neutral:hover {
  background-color: rgba(244, 67, 54, 0.08) !important;
}

.profile-details-dialog .delete-version-btn.delete-neutral:hover md-icon {
  color: #f44336 !important;
}

.profile-details-dialog .delete-version-btn.delete-warning {
  background-color: rgba(244, 67, 54, 0.12) !important;
  color: #f44336 !important;
}

.profile-details-dialog .delete-version-btn.delete-warning md-icon {
  color: #f44336 !important;
  animation: deleteWarningPulseTab 1.5s ease-in-out infinite !important;
}

.profile-details-dialog .delete-version-btn.delete-warning:hover {
  background-color: rgba(244, 67, 54, 0.2) !important;
}



/* =====================================================
   STATUS PILLS
   Scoped: sin scope afectarían a toda la app
   ===================================================== */

.profile-details-dialog generic-type-pill[type="DRAFT"] {
  background: #e3f2fd !important;
  color: #1976d2 !important;
  border: 1px solid #90caf9 !important;
}

.profile-details-dialog generic-type-pill[type="PENDING_REVIEW"] {
  background: #fff3e0 !important;
  color: #f57c00 !important;
  border: 1px solid #ffb74d !important;
}

.profile-details-dialog generic-type-pill[type="REVIEWED"] {
  background: #f3e5f5 !important;
  color: #7b1fa2 !important;
  border: 1px solid #ce93d8 !important;
}

.profile-details-dialog generic-type-pill[type="PUBLISHED"] {
  background: #e8f5e9 !important;
  color: #388e3c !important;
  border: 1px solid #a5d6a7 !important;
  font-weight: 600 !important;
}

.profile-details-dialog generic-type-pill[type="DEFAULT"] {
  background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%) !important;
  color: #ffffff !important;
  border: 1px solid #ffa726 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.profile-details-dialog generic-type-pill[type="RETIRED"] {
  background: #eceff1 !important;
  color: #607d8b !important;
  border: 1px solid #b0bec5 !important;
  font-style: italic !important;
}



/* =====================================================
   VERSION TREE
   ===================================================== */

.profile-details-dialog .version-tree-wrapper {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.profile-details-dialog .version-tree-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding-top: 10px !important;
  padding-right: 12px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  border-left: 3px solid transparent !important;
  transition: background 0.15s ease !important;
  box-sizing: border-box !important;
  position: relative !important;
}

.profile-details-dialog .version-tree-row:last-child {
  border-bottom: none !important;
}

.profile-details-dialog .version-tree-row:hover {
  background: #fafafa !important;
}

.profile-details-dialog .version-tree-row.vtrow--draft {
  border-left-color: #42a5f5 !important;
}

.profile-details-dialog .version-tree-row.vtrow--pending {
  border-left-color: #ffa726 !important;
}

.profile-details-dialog .version-tree-row.vtrow--reviewed {
  border-left-color: #ab47bc !important;
}

.profile-details-dialog .version-tree-row.vtrow--published {
  border-left-color: #66bb6a !important;
}

.profile-details-dialog .version-tree-row.vtrow--rejected {
  border-left-color: #ef5350 !important;
  opacity: 0.72 !important;
}

.profile-details-dialog .version-tree-row.vtrow--in-use {
  background: #f1f8e9 !important;
}

.profile-details-dialog .version-tree-row.vtrow--retired {
  border-left-color: #b0bec5 !important;
  opacity: 0.65 !important;
}


/* Tree guide lines */
.profile-details-dialog .vt-tree-guide {
  position: relative !important;
  width: 16px !important;
  flex-shrink: 0 !important;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
}

.profile-details-dialog .vt-guide-v {
  position: absolute !important;
  left: 2px !important;
  top: -10px !important;
  bottom: 50% !important;
  width: 1px !important;
  background: #d0d0d0 !important;
}

.profile-details-dialog .vt-guide-h {
  position: absolute !important;
  left: 2px !important;
  top: 50% !important;
  width: 12px !important;
  height: 1px !important;
  background: #d0d0d0 !important;
}


/* Node icon */
.profile-details-dialog .vt-node-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 20px !important;
}

.profile-details-dialog .vt-node-icon md-icon {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}


/* Left: version + status pills (fixed width) */
.profile-details-dialog .vt-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
  width: 260px !important;
  overflow: hidden !important;
}

.profile-details-dialog .vt-version-pill {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px 10px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  font-family: 'Roboto Mono', monospace !important;
  box-shadow: 0 1px 4px rgba(102, 126, 234, 0.35) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  height: auto !important;
  line-height: 1.5 !important;
  min-width: 0 !important;
}

.profile-details-dialog .vt-from-hint {
  font-size: 11px !important;
  color: #bdbdbd !important;
  font-style: italic !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}


/* Middle: metadata */
.profile-details-dialog .vt-meta {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 3px !important;
  min-width: 0 !important;
  padding: 0 16px !important;
}

.profile-details-dialog .vt-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.profile-details-dialog .vt-meta-icon {
  font-size: 12px !important;
  width: 12px !important;
  height: 12px !important;
  color: #ccc !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.profile-details-dialog .vt-meta-icon.vt-meta-icon--updated {
  color: #b8c4d8 !important;
}

.profile-details-dialog .vt-meta-date {
  font-size: 11px !important;
  color: #999 !important;
  font-family: 'Roboto Mono', monospace !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.profile-details-dialog .vt-meta-sep {
  font-size: 10px !important;
  color: #ddd !important;
  flex-shrink: 0 !important;
}

.profile-details-dialog .vt-meta-user {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #555 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}


/* Right: actions (7 slots × 32px + 6 × 3px gap = 242px) */
.profile-details-dialog .vt-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
  width: 277px !important;
  margin-left: auto !important;
  
}

.profile-details-dialog .vt-action-placeholder {
  display: inline-block !important;
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
}


/* Icon buttons */
.profile-details-dialog .vt-icon-btn,
.profile-details-dialog .vt-icon-btn.md-button {
  min-width: 32px !important;
  max-width: 32px !important;
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  line-height: 32px !important;
  transition: background 0.15s ease, transform 0.1s ease !important;
}

.profile-details-dialog .vt-icon-btn md-icon,
.profile-details-dialog .vt-icon-btn.md-button md-icon {
  font-size: 17px !important;
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}


/* Button color variants */
.profile-details-dialog .vt-btn-edit {
  background: rgba(102, 126, 234, 0.08) !important;
}

.profile-details-dialog .vt-btn-edit md-icon {
  color: #667eea !important;
}

.profile-details-dialog .vt-btn-edit:hover {
  background: #667eea !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-edit:hover md-icon {
  color: white !important;
}

.profile-details-dialog .vt-btn-explorer {
  background: rgba(38, 166, 154, 0.08) !important;
}

.profile-details-dialog .vt-btn-explorer md-icon {
  color: #26a69a !important;
}

.profile-details-dialog .vt-btn-explorer:hover {
  background: #26a69a !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-explorer:hover md-icon {
  color: white !important;
}

.profile-details-dialog .vt-btn-promote {
  background: rgba(102, 187, 106, 0.08) !important;
}

.profile-details-dialog .vt-btn-promote md-icon {
  color: #43a047 !important;
}

.profile-details-dialog .vt-btn-promote:hover {
  background: #43a047 !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-promote:hover md-icon {
  color: white !important;
}

.profile-details-dialog .vt-btn-reject {
  background: rgba(239, 83, 80, 0.08) !important;
}

.profile-details-dialog .vt-btn-reject md-icon {
  color: #ef5350 !important;
}

.profile-details-dialog .vt-btn-reject:hover {
  background: #ef5350 !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-reject:hover md-icon {
  color: white !important;
}

.profile-details-dialog .vt-btn-diff {
  background: rgba(255, 152, 0, 0.08) !important;
}

.profile-details-dialog .vt-btn-diff md-icon {
  color: #fb8c00 !important;
}

.profile-details-dialog .vt-btn-diff:hover {
  background: #fb8c00 !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-diff:hover md-icon {
  color: white !important;
}

.profile-details-dialog .vt-btn-delete {
  background: transparent !important;
}

.profile-details-dialog .vt-btn-delete md-icon {
  color: #ccc !important;
}

.profile-details-dialog .vt-btn-delete:hover:not([disabled]) {
  background: rgba(244, 67, 54, 0.08) !important;
}

.profile-details-dialog .vt-btn-delete:hover:not([disabled]) md-icon {
  color: #f44336 !important;
}

.profile-details-dialog .vt-btn-delete.vt-btn-delete--warn md-icon {
  color: #f44336 !important;
  animation: deleteWarningPulseTab 1.5s ease-in-out infinite !important;
}

.profile-details-dialog .vt-btn-delete.vt-btn-delete--disabled {
  opacity: 0.25 !important;
  cursor: not-allowed !important;
}

.profile-details-dialog .vt-btn-delete-cascade {
  background: transparent !important;
}

.profile-details-dialog .vt-btn-delete-cascade md-icon {
  color: #ccc !important;
  transition: color 0.15s ease !important;
}

.profile-details-dialog .vt-btn-delete-cascade:hover:not([disabled]) {
  background: rgba(183, 28, 28, 0.08) !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-delete-cascade:hover:not([disabled]) md-icon {
  color: #b71c1c !important;
}

.profile-details-dialog .vt-btn-delete-cascade.vt-btn-delete-cascade--disabled {
  opacity: 0.25 !important;
  cursor: not-allowed !important;
}

.profile-details-dialog .vt-btn-delete-cascade.vt-btn-delete-cascade--disabled md-icon {
  color: #bbb !important;
}

.profile-details-dialog .vt-btn-retire {
  background: rgba(96, 125, 139, 0.08) !important;
}

.profile-details-dialog .vt-btn-retire md-icon {
  color: #607d8b !important;
}

.profile-details-dialog .vt-btn-retire:hover {
  background: #607d8b !important;
  transform: translateY(-1px) !important;
}

.profile-details-dialog .vt-btn-retire:hover md-icon {
  color: white !important;
}


/* Pills in tree rows */
.profile-details-dialog .version-tree-row .version-status-pill,
.profile-details-dialog .version-tree-row .version-default-pill {
  height: auto !important;
  line-height: 1.4 !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  flex-shrink: 0 !important;
}



/* =====================================================
   LIVE INDICATOR DOT
   Same visual pattern as biz-events (be-live-dot),
   scoped to this tab with the vt-live- prefix.
   ===================================================== */

.profile-details-dialog .vt-live-dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  cursor: default;
}


/* CSS tooltip via data-tooltip attribute */
.profile-details-dialog .vt-live-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 40, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 200;
}
.profile-details-dialog .vt-live-dot:hover::after { opacity: 1; }

.profile-details-dialog .vt-live-dot-inner {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  pointer-events: none;
}

.profile-details-dialog .vt-live-dot--on .vt-live-dot-inner {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: vtLivePulse 2s ease-in-out infinite;
}

.profile-details-dialog .vt-live-dot--off .vt-live-dot-inner {
  background: #d1d5db;
}

/* =====================================================
   ANIMATIONS — prefijadas con "Tab"
   ===================================================== */

@keyframes vtLivePulse {
  0%   { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0.55); }
  50%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0);    }
}

@keyframes deleteWarningPulseTab {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1200px) {
  .profile-details-dialog .version-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .profile-details-dialog .version-info,
.profile-details-dialog .version-metadata,
.profile-details-dialog .version-actions {
    width: 100%;
    min-width: auto;
  }

  .profile-details-dialog .version-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .profile-details-dialog .version-action-btn {
    flex: 1;
    min-width: 120px !important;
  }
}

@media (max-width: 768px) {

  .profile-details-dialog .template-card,
.profile-details-dialog .template-versions-section {
    padding: 16px;
  }

  .profile-details-dialog .versions-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .profile-details-dialog .version-pill {
    font-size: 12px;
    padding: 6px 12px;
  }

  .profile-details-dialog .version-action-btn {
    font-size: 12px !important;
    height: 32px !important;
    line-height: 32px !important;
    min-width: 90px !important;
  }

  .profile-details-dialog .metadata-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .profile-details-dialog .metadata-label {
    min-width: auto;
  }
}

:where(.template-tab-content) .versions-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}

:where(.template-tab-content) .versions-jump-select {
  min-width: 220px;
}


/* highlight animation */
.vtrow--highlight {
  box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.35);
  border-radius: 10px;
}


/* Highlight rojo claro al navegar */
.vtrow--highlight-red {
  background: rgba(255, 77, 77, 0.16) !important;
  /* rojo claro */
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.40) !important;
  border-radius: 10px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}



.vtrow--highlight-red {
  background: rgba(244, 67, 54, 0.16) !important;
  /* rojo claro */
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.35) inset !important;
  border-left: 4px solid rgba(244, 67, 54, 0.70) !important;
  border-radius: 10px;
  transition: background 160ms ease, box-shadow 160ms ease;
}


/* ============================================================
   LIVE FILTER TOGGLE
   ============================================================ */

:where(.template-tab-content) .versions-live-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid #e0e0e0;
}

:where(.template-tab-content) .vt-live-switch { margin: 0 !important; }

:where(.template-tab-content) .vt-live-switch-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.2px;
}


/* Active toggle: accent the switch track with the platform purple */
.vt-live-switch.md-checked .md-bar {
  background-color: rgba(102, 126, 234, 0.5) !important;
}
.vt-live-switch.md-checked .md-thumb {
  background-color: #667eea !important;
}


/* Live filter mode: rows have uniform left padding (no tree indent) */
:where(.template-tab-content) .version-tree-wrapper .version-tree-row {
  transition: padding-left 0.15s ease;
}


/* Live empty state */
:where(.template-tab-content) .vt-live-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: #9ca3af;
  gap: 12px;
}
:where(.template-tab-content) .vt-live-empty md-icon {
  font-size: 40px !important;
  width: 40px !important;
  height: 40px !important;
  color: #d1d5db;
}
:where(.template-tab-content) .vt-live-empty p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}



/* ============================================================
   VERSION LAYOUT — 2-line structure
   ============================================================ */

:where(.template-tab-content) .vt-version-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}



/* ============================================================
   ENV CHIPS — line 2, clearly distinct from version pills
   Plain text + dot, no pill shape — avoids visual confusion
   ============================================================ */

:where(.template-tab-content) .vt-env-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

:where(.template-tab-content) .vt-env-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: #6b7280;
  white-space: nowrap;
  line-height: 1;
}


/* State dot — always shown, color reflects live status */
:where(.template-tab-content) .vt-env-chip-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}


/* Not live — grey dot */
:where(.template-tab-content) .vt-env-chip--assigned .vt-env-chip-dot {
  background: #d1d5db;
}
:where(.template-tab-content) .vt-env-chip--assigned {
  color: #9ca3af;
}


/* Live — green dot + emphasized text */
:where(.template-tab-content) .vt-env-chip--live .vt-env-chip-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
:where(.template-tab-content) .vt-env-chip--live {
  color: #065f46;
  font-weight: 600;
}

/* ============================================
   IN-PLACE TRANSITION SPINNER
   Shown inside workflow buttons while PATCH + getById are in flight.
   Mirrors the biz-events vt-transition-spinner pattern.
   ============================================ */
.profile-details-dialog .vt-transition-spinner {
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  width:          18px;
  height:         18px;
  pointer-events: none;
}


/* Tint the spinner to match the button's icon colour */
.profile-details-dialog .vt-btn-promote .vt-transition-spinner circle,
.profile-details-dialog .vt-btn-retire .vt-transition-spinner circle,
.profile-details-dialog .vt-btn-reject .vt-transition-spinner circle {
  stroke: currentColor;
}