/* ============================================================
   tier-modal.css — simulated evo app preview modal
   ============================================================ */

.tier-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tier-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.tier-modal {
  width: 90vw;
  max-width: 1100px;
  height: 75vh;
  max-height: 700px;
  background: var(--bg-primary);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 214, 0, 0.08);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tier-modal-overlay.open .tier-modal {
  transform: scale(1) translateY(0);
}

.tier-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  transition: color var(--transition);
}
.tier-modal-close:hover {
  color: var(--accent-yellow);
}

/* Tab header */
.tier-modal-header {
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 0;
  background: var(--bg-surface);
}

.tier-modal-tabs {
  display: flex;
  gap: 0;
}

.tier-tab {
  padding: 10px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}
.tier-tab:hover {
  color: var(--text-secondary);
}
.tier-tab.active {
  color: var(--accent-yellow);
  border-bottom-color: var(--accent-yellow);
}

/* Modal body */
.tier-modal-body {
  flex: 1;
  overflow: hidden;
}

/* Simulated App */
.sim-app {
  display: flex;
  height: 100%;
}

.sim-sidebar {
  width: 220px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sim-logo {
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-yellow);
  border-bottom: 1px solid var(--border);
}
.sim-logo-dim {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
}

.sim-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.sim-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sim-nav-item:hover {
  background: rgba(255, 214, 0, 0.04);
  color: var(--text-primary);
}
.sim-nav-item.active {
  background: rgba(255, 214, 0, 0.06);
  color: var(--accent-yellow);
  border-left-color: var(--accent-yellow);
}
.sim-nav-item.locked {
  opacity: 0.3;
  cursor: not-allowed;
}
.sim-nav-item.locked:hover {
  background: none;
  color: var(--text-secondary);
}
.sim-nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sim-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 16px;
}

.sim-nav-label {
  padding: 8px 18px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.sim-sidebar-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.sim-license-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse 2s ease-in-out infinite;
}

/* Main content area */
.sim-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.sim-view-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.sim-project-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sim-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  position: relative;
}

/* --- Simulated content blocks --- */
.sim-mesh {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.sim-mesh-node {
  position: absolute;
  border-radius: 50%;
  transition: all 0.4s ease;
}

.sim-mesh-node.phase {
  width: 36px;
  height: 36px;
  background: rgba(139, 92, 246, 0.8);
  border: 2px solid #8B5CF6;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
}

.sim-mesh-node.ticket {
  width: 14px;
  height: 14px;
  box-shadow: 0 0 8px rgba(0, 214, 143, 0.3);
}

.sim-mesh-node.ticket .ring-outer {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-mesh-node.ticket .ring-mid {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sim-mesh-node.ticket .ring-center {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

/* Roadmap cards */
.sim-roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.sim-roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  border-left: 3px solid;
}
.sim-roadmap-card h5 {
  font-size: 0.7rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.sim-roadmap-card p {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.sim-roadmap-card .status {
  display: inline-block;
  font-size: 0.55rem;
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 6px;
  font-weight: 600;
}

/* Workspace cards */
.sim-ws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sim-ws-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.sim-ws-card h5 {
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.sim-ws-card p {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.sim-ws-card .sim-stat {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-emerald);
  display: block;
  margin-top: 8px;
}

/* Team list */
.sim-team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sim-team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.sim-team-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-primary);
}
.sim-team-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sim-team-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Org nav */
.sim-org-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.75rem;
}
.sim-org-breadcrumb span {
  color: var(--text-muted);
}
.sim-org-breadcrumb .active {
  color: var(--accent-yellow);
  font-weight: 700;
}
.sim-org-breadcrumb .sep {
  color: var(--text-muted);
  opacity: 0.4;
}

/* Description text */
.sim-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  padding: 12px 16px;
  background: rgba(255, 214, 0, 0.03);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-yellow);
}

/* Responsive */
@media (max-width: 700px) {
  .sim-sidebar { width: 160px; }
  .sim-ws-grid { grid-template-columns: 1fr 1fr; }
  .tier-modal { height: 85vh; }
}
